The PID controller module works by continuously adjusting its output based on the difference between the desired value (setpoint) and the measured value (feedback). It does this using three components:
Proportional Term (P): This term corrects the error in proportion to the current difference between the setpoint and the feedback. It applies an immediate response to reduce the error.
Integral Term (I): This term accumulates the past error over time, helping to eliminate any steady-state error that may persist after the proportional correction.
Derivative Term (D): This term predicts future error by observing the rate of change of the current error, thus providing a damping effect to reduce overshooting.
The controller outputs a signal only in the positive direction. That means that we expect a system that naturally tends towards one point. Regarding a application in heating that means that we are not aiming to cool down the system when overshooting or if the setpoint is higher then our feedback but we just output 0 for control.
Set different values for setpoint and feedback and observe the output in response to it. Change the setpoint to play around.
No specific external hardware is required to test the module in a simulation environment. However, for practical deployment, you may need:
Sensor: A sensor to provide the feedback signal, representing the process variable you wish to control.
Actuator: An actuator driven by the control_out signal to affect the process, such as a motor or a heating element.
# | Input | Output | Bidirectional |
---|---|---|---|
0 | setpoint 0 | control_signal 0" | feedback 0 |
1 | setpoint 1 | control_signal 1 | feedback 1 |
2 | setpoint 2 | control_signal 2 | feedback 2 |
3 | setpoint 3 | control_signal 3 | feedback 3 |
4 | setpoint 4 | control_signal 4 | feedback 4 |
5 | setpoint 5 | control_signal 5 | feedback 5 |
6 | setpoint 6 | control_signal 6 | feedback 6 |
7 | setpoint 7 | control_signal 7 | feedback 7 |