Qudi
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
software_pid_controller.SoftPIDController Class Reference

Control a process via software PID. More...

Inheritance diagram for software_pid_controller.SoftPIDController:
Inheritance graph
[legend]
Collaboration diagram for software_pid_controller.SoftPIDController:
Collaboration graph
[legend]

Public Member Functions

def __init__ (self, config, kwargs)
 
def on_activate (self)
 Initialisation performed during activation of the module.
 
def on_deactivate (self)
 Perform required deactivation.
 
def startLoop (self)
 Start the control loop. More...
 
def stopLoop (self)
 Stop the control loop. More...
 
def getSavingState (self)
 Find out if we are keeping data for saving later. More...
 
def startSaving (self)
 Start saving process and control data. More...
 
def saveData (self)
 Write process and control data to file. More...
 
def get_kp (self)
 Return the proportional constant. More...
 
def set_kp (self, kp)
 Set the proportional constant of the PID controller. More...
 
def get_ki (self)
 Get the integration constant of the PID controller. More...
 
def set_ki (self, ki)
 Set the integration constant of the PID controller. More...
 
def get_kd (self)
 Get the derivative constant of the PID controller. More...
 
def set_kd (self, kd)
 Set the derivative constant of the PID controller. More...
 
def get_setpoint (self)
 Get the current setpoint of the PID controller. More...
 
def set_setpoint (self, setpoint)
 Set the current setpoint of the PID controller. More...
 
def get_manual_value (self)
 Return the control value for manual mode. More...
 
def set_manual_value (self, manualvalue)
 Set the control value for manual mode. More...
 
def get_enabled (self)
 See if the PID controller is controlling a process. More...
 
def set_enabled (self, enabled)
 Set the state of the PID controller. More...
 
def get_control_limits (self)
 Get the minimum and maximum value of the control actuator. More...
 
def set_control_limits (self, limits)
 Set the minimum and maximum value of the control actuator. More...
 
def get_control_value (self)
 Get current control output value. More...
 
def get_process_value (self)
 Get current process input value. More...
 
def get_extra (self)
 Extra information about the controller state. More...
 

Public Attributes

 NumberOfSecondsLog
 
 threadlock
 
 previousdelta
 
 cv
 limit contol output to maximum permissible limits
 
 timer
 
 history
 
 savingState
 
 enable
 
 integrated
 
 countdown
 
 pv
 
 P
 Calculate PID controller:
 
 I
 
 D
 

Static Public Attributes

 process = Connector(interface='ProcessInterface')
 declare connectors
 
 control = Connector(interface='ProcessControlInterface')
 
 timestep = ConfigOption(default=100)
 
 kP = StatusVar(default=1)
 
 kI = StatusVar(default=1)
 
 kD = StatusVar(default=1)
 
 setpoint = StatusVar(default=273.15)
 
 manualvalue = StatusVar(default=0)
 
 sigNewValue = QtCore.Signal(float)
 

Detailed Description

Control a process via software PID.

Member Function Documentation

◆ get_control_limits()

def software_pid_controller.SoftPIDController.get_control_limits (   self)

Get the minimum and maximum value of the control actuator.

Returns
list(float): (minimum, maximum) values of the control actuator

◆ get_control_value()

def software_pid_controller.SoftPIDController.get_control_value (   self)

Get current control output value.

Returns
float: control output value

◆ get_enabled()

def software_pid_controller.SoftPIDController.get_enabled (   self)

See if the PID controller is controlling a process.

Returns
bool: whether the PID controller is preparing to or conreolling a process

◆ get_extra()

def software_pid_controller.SoftPIDController.get_extra (   self)

Extra information about the controller state.

Returns
dict: extra informatin about internal controller state

Do not depend on the output of this function, not every field exists for every PID controller.

◆ get_kd()

def software_pid_controller.SoftPIDController.get_kd (   self)

Get the derivative constant of the PID controller.

Returns
float: the derivative constant of the PID controller

◆ get_ki()

def software_pid_controller.SoftPIDController.get_ki (   self)

Get the integration constant of the PID controller.

Returns
float: integration constant of the PID controller

◆ get_kp()

def software_pid_controller.SoftPIDController.get_kp (   self)

Return the proportional constant.

Returns
float: proportional constant of PID controller

◆ get_manual_value()

def software_pid_controller.SoftPIDController.get_manual_value (   self)

Return the control value for manual mode.

Returns
float: control value for manual mode

◆ get_process_value()

def software_pid_controller.SoftPIDController.get_process_value (   self)

Get current process input value.

Returns
float: current process input value

◆ get_setpoint()

def software_pid_controller.SoftPIDController.get_setpoint (   self)

Get the current setpoint of the PID controller.

Returns
float: current set point of the PID controller

◆ getSavingState()

def software_pid_controller.SoftPIDController.getSavingState (   self)

Find out if we are keeping data for saving later.

Returns
bool: whether module is saving process and control data

◆ saveData()

def software_pid_controller.SoftPIDController.saveData (   self)

Write process and control data to file.

Does not do anything right now.

◆ set_control_limits()

def software_pid_controller.SoftPIDController.set_control_limits (   self,
  limits 
)

Set the minimum and maximum value of the control actuator.

Parameters
list(float)limits: (minimum, maximum) values of the control actuator

This function does nothing, control limits are handled by the control module

◆ set_enabled()

def software_pid_controller.SoftPIDController.set_enabled (   self,
  enabled 
)

Set the state of the PID controller.

Parameters
boolenabled: desired state of PID controller

◆ set_kd()

def software_pid_controller.SoftPIDController.set_kd (   self,
  kd 
)

Set the derivative constant of the PID controller.

Parameters
floatkd: the derivative constant of the PID controller

◆ set_ki()

def software_pid_controller.SoftPIDController.set_ki (   self,
  ki 
)

Set the integration constant of the PID controller.

Parameters
floatki: integration constant of the PID controller

◆ set_kp()

def software_pid_controller.SoftPIDController.set_kp (   self,
  kp 
)

Set the proportional constant of the PID controller.

float kp: proportional constant of PID controller

◆ set_manual_value()

def software_pid_controller.SoftPIDController.set_manual_value (   self,
  manualvalue 
)

Set the control value for manual mode.

Parameters
floatmanualvalue: control value for manual mode of controller

◆ set_setpoint()

def software_pid_controller.SoftPIDController.set_setpoint (   self,
  setpoint 
)

Set the current setpoint of the PID controller.

Parameters
floatsetpoint: new set point of the PID controller

◆ startLoop()

def software_pid_controller.SoftPIDController.startLoop (   self)

Start the control loop.

◆ startSaving()

def software_pid_controller.SoftPIDController.startSaving (   self)

Start saving process and control data.

Does not do anything right now.

◆ stopLoop()

def software_pid_controller.SoftPIDController.stopLoop (   self)

Stop the control loop.


The documentation for this class was generated from the following file: