Unitronics PID Control
Unitronics PID Control
Simple, robust (works also poorly config. ) the most widely used
1 de(t )
CV (t ) Kp e(t ) e(t )dt Td
P
Ti dt ideal non-interacting PID algorithm
coefficient
I D Basics: https://youtu.be/EqEqEdOx-x8
part part
e(t) D
Regulator output (CV ) is computed from error
P
signal present and past values and future
I
tendency
t
Google: „Control Engineering A guide for beginners“
PV(t)
Overshoot
+
SP
-
offset
t t
PV(0)
tsettling
1
PID controller
VisiLogic Help > Ladder > FBs Library > PID FB + Auto-tune
> General Background > Inside the PID Function
> Integral Action
2
V200-18-E2B Analog I/O
A input0
3
Temperature control kit components
LM35DZ – 2...100 Centigrade Temperature Sensor
(linear 10mV/C°, 1.5°C accuracy)
LM358N – Low-power dual operational amplifiers DIP8
L7812CV – 12V voltage regulator - generates heat flow
(w. thermal overload protection)
A transistor amplifies control signal and modulates heating current
+4…30V +(3)..11,5…30V +15…25V ≤ 35V
0,33F
VOUT 11,4…12,6V
LM35 VOUT 0…1V
VOUT 0…10V
L7812
Rin CV
DZ
T ≤ 125°C
Control
output 0…10V
Umax ≤ 32V
OUTPUT
INPUT
T ≤ 175°C
BOTTOM VIEW GROUND
C B
30°C
time [s]
Analog Output0 value = 0; CV =0
4
Write to Data Tables
0...1023
0...1000
0...1000
0...1000
0...1000
Read
row #; 0...299 from
Read Table
Read from
from Table Linearization
Table
0...1000
cur-3
cur-2
cur-1
current row
5
PID Configuration
350
Run PID
Reset to
stop PID loop
MB 0 ?
6
PID Auto-Tune Stages
Reset if
AT does
not ends
CV=2048
= 5V
Temperature
sensor
T(0)=29°C 0%
time [s]
7
PID FB Status Integer
PID error indications are given in the Status Messages MI
See VisiLogic Help > Ladder > FBs Library > PID FB + Auto-tune
0 FB status OK
1, 2, 3 Auto-tune in progress
4 PID running
5, 6 Setpoint change in progress
7 Integral-wind up
8 integral-wind down
9 Pause mode, Integral and Derivative values are not currently being calculated
10, 11 PV exceeds proportional band, no calculation performed
…
Tasks:
Program a process PID control algorithm for temperature control in controller.
Program must be able to stop the PID control (CV = 0),
adjust the temperature setpoint between reasonable limits and run it again.
On controller display User Interface show temperature current value (and short
history), control variable (CV) current value, PID current mode
and all (manual mode) commands choices: STOP, RUN AT | PID.
In your report list the program, PID controller configuration, user interface
manual and a setpoint change response (from self heated temperature level to
45..55°C level) graph. To draw graph, program must be able to store CV, (SP)
and PV values for approx. 5 minutes.