Dynamic Systems
Virtual Lab


THE PID-CONTROLLER AND THE ON/OFF-CONTROLLER USED IN SYSLAB

Here is a preview of the user interface of the controller used in SYSLAB.

Controller modes

The controller has the following two main operating modes:

  • Manual mode, where the value of the control (or manipulated) variable, u, is equal to the nominal control value, unom, which you can adjust on the front panel.
  • Automatic mode, where the value of the control variable is given by the PID-controller or by the on-off controller.

Units used for the set-point

The set-point has init of percent when it is used in the controller function. The set-point is however originally given in some physical unit, as degree Celsius or meter. To transform from the physical unit to percent, the measurement function must be used, as in the following:

rm = Km,LC(r - rm0)  (Eq. 3)
  • Km,LC [%/m] (LC is Level Controller) is the set-point gain, which must be equal to Km,LT given in Eq. 2.
  • rm0 is the lower limit of the set-point range, which is the same as the measurement range, namely 7.2 -  10.2 m.

PID-controller

The controller function is

u(t) = unom + Kpep(t) + (Kp/Ti) * e(t) dt +  KpTdded,f(t)/dt   (Eq. 1)
  • u [%] is the manipulated variable.
  • unom [%] is the nominal value of u.
  • e = rm - ym is the control error in unit percent.
  • ep = wprm - ym is the error term used i in the error term in the proportional term. Here wp is a set-point weight, which normally can be set to 1, but which also can be set to 0.3 in the cases where a smaller weight than 1 is desired.
  • ed,f is the error term used in the derivative term. ed,f is described in more detail below.
  • Kp [%/%] is the controller gain.
  • Ti [min] is the integral time.
  • Td [min] is the derivative time.

In Eq. 1, ed,f is the low-pass filtered derivative term given as follows:

ed,f(s) = [1/(Tfs+1)] ed(s) (Eq. 2)

where Tf is the filter-time, the value of which typically can be calculated as 

 Tf = aTd (Eq. 3)

where the ratio coefficient a typically is chosen as 0.1.

In Eq. 2 the error term ed is given by

ed = wdrm - ym (Eq. 4)

where wd is a reference weight which typically is set to 0 or 1 (the latter is the default).

The PID-controller used in this lab is equipped with anti-windup, but this feature can be turned off.

In the PID-controller the gain Kp can be given positive or negative sign (Kp is assumed to always have positive value). In the litterature positive sign is denoted "reverse action", while negative sign is denoted "direct action". The rule for choosing correct sign is: The sign must be positive if the process gain is positive.


On/off-controller

The on/off-controller function is

u(t) = unom + M sign[hyst(H,e)] (Eq. 5)
  • unom [%] is the nominal value of the manipulated variable.
  • M [%] is the amplitude value of the on/off-controller.
  • e [%] is the control error.
  • "sign" represents the ignum function.
  • "hyst(H,e)" represents a hysteresis function. The hysteresis width is 2H from the positive edge to the negative edge (thus, H is the hysteresis width from the abcisse axis).

[SYSLAB]


Updated October 21, 2000. Developed by Finn Haugen. E-mail: Finn@techteach.no