None Notebook

This notebook contains material from cbe30338-2021; content is available on Github.

< 3.6 Lab Assignment 3: Relay and PI Control | Contents | Tag Index | 3.8 Lab Assignment 4: Cascade Control >

Open in Colab

Download

3.7 Integral Windup and Bumpless Transfer

3.7.1 Learning Goals

3.7.2 PI Control

Proportional-Integral (PI) Control is velecity form

\begin{align} MV_k & = MV_{k-1} - K_P (e_{k} - e_{k-1}) - \delta t K_I e_k \end{align}

where $MV_0= \bar{MV}$ is the initial value, and the error $e_k$ is the difference between the process variable and setpoint

\begin{align} e_k & = PV_k - SP_k \\ \end{align}

and $\delta t$ is the time step.

We encode the controller using the Python yield' statement. The implementation has addedt_step` to facilitate use of this code for situations where we may change the time step or have a variable time step.

The benefits of using the yield statement is that we can use the same code to create multiple instances of controller, each with it's own parameters and state. The communication between the main event loop and a controller instance is illustrated in this diagram:

The following cells demonstrate performance of the controller when subject to a step change in setpoint and a disturbance input.

3.7.3 What is Integral Windup?

Let's increase the magnitude of the control gains to see if we an acheive even better control performance.


Study Question: Carefully exammine the results of this experiment. The PI velocity algorithm is given by an equation

\begin{align} MV_{k} & = MV_{k-1} - K_p(e_{k} - e_{k-1}) - h K_i e_{k} \end{align}

Looking at the period from 0 to 100 seconds, is this equation being satisfied? Why or why not?

Study Question: Carefully examine the code for the PI controller. How is it possible for $MV$ to be different from the actual input applied to the device?


Integral (aka Reset) windup is a consequence the controller computing values for the manipulable input that are outside the range of feasible values. The difference is due to the presence of upper and lower bounds on the manipulated variable.

3.7.3.1 Anti-reset windup - Version 1

There several common strategies for avoiding integral (aka reset) windup. The first of these, which should be part of any practical implementation, is to limit computed values of manipulated variable to the range of values that can be implemented in the actual process. This will avoid $MV$ 'winding up' due to range limits.

\begin{align} \hat{MV}_{k} & = MV_{k-1} - K_p(e_{k} - e_{k-1}) - \delta t K_i e_{k} \end{align}\begin{align} MV_k & = \begin{cases} MV^{min} & \text{if } \hat{MV}_k \leq MV^{min}\\ \hat{MV}_k & \text{if } MV^{min} \leq \hat{MV}_k \leq MV^{max}\\ MV^{max} & \text{if} \hat{MV_k} \geq MV^{max} \end{cases} \end{align}

3.7.3.2 Anti-reset Windup - Version 2

A more subtle form of windup occurs when the manipulated variable is subject to external interventions. This can occur when a valve stem in a process application gets stuck, an operator or user intervenes and resets a mechanical actuator, or there is some sort of system failure.

For these reasons, practical control systems often include a field measurement of the manipulated variable that is fed back to the controller. The following image, for example, shows a pneumatically operated globe valve with a positioner, and with feedback of position to the central control system.

Pl control valve.jpg

CC BY-SA 3.0

Stepper motors are commonly used actuators in lab equipment and robotics. The position of the stepper motor would be manipulated variable. This is an example of a stepper motor with an integrated encoder that can be used to verify the motor's position.

Valve position feedback is a feature of control valves used in process applications, and should be regarded as a 'best practice' for industrial automation.

This behavior also occurs in the Temperature Control Laboratory in which the manipulated power levels are constrained to the range 0% to 100%. This is demonstated in the following cell.

To accomodate feedback of the manipulated variable, we first need to modify the event loop to incorporate the measurement of the manipulated variable, then send that value to the controller.

The next change is to the controller. The controller now accepts values for PV, SP, and, additionally, MV. To demonstrate the impact of these changes, this example will comment out the software limits placed on MV to show that feedback of manipulated variable is also an anti-reset windwup strategy.

3.7.3.3 Anti-reset Windup - Complete

With these considerations in place, the following cell presents a version of the PI control algorithm incorporating both range limits and direct feedback of the manipulated variables.

3.7.4 Manual Operation

Manual operation can be implemented by specifying the manipulated variable. We will implement this by specifying a function that specifies values of manipulated variable whenever manual conteol is in effect.

3.7.5 Bumpless Transfer

3.7.5.1 Bumpless Transfer

\begin{align} e_k & = PV_k - SP_k \\ \hat{MV}_{k} & = MV_{k-1} - K_p(PV_{k} - PV_{k-1}) - \delta t K_i e_{k} \end{align}\begin{align} MV_k & = \max(MV^{min}, \min(MV^{max}, \hat{MV}_k) \end{align}

< 3.6 Lab Assignment 3: Relay and PI Control | Contents | Tag Index | 3.8 Lab Assignment 4: Cascade Control >

Open in Colab

Download