PID Control in SWMM 5 for a Type 3 Pump

Subject: PID Control in SWMM 5 for a Type 3 Pump

Figure 2 shows the code in Function getPIDSetting which returns the PID setting at each time step. The PID parameter set defines the degree of control. The PID parameter set contains three values -- a proportional gain coefficient, an integral time (in minutes), and a derivative time (in minutes) which are kp, ki and kd, respectively. More about the theory of PID controllers can be found at  http://en.wikipedia.org/wiki/PID_controllerand shown in Figure 3.

Here is an example PID Rule that will keep the node depth at 3 feet in a SWMM 5 model.

RULE PID1
 ; the PID controller adjusts the flow in the pump to have a
;     depth of 3 feet in Node 82309e
IF NODE 82309e DEPTH <> 3
THEN PUMP PUMP1@82309e-15009e SETTING = PID  10     -1  -1
;                                                                                 kp     ki   kd
PRIORITY 1


Figure 1:  SWMM 5.0.021 Simulation Results

Figure 2:  Source code for getPIDSetting in SWMM 5.0.021

Figure 3:  Image source for the Block Diagram of a PID Controller Pid-feedback-nct-int-correct.png

views

Tags