Subsections

8.3 Simulink: Linear system with integrated noise  

This third example guides you through a more academic example. It is however instructive, since it illustrates a nice design methodology, which can be used for any process. Start RaPID in Simulink mode and load the demo project ``Linear system with integrated noise'' through the file menu File $\rightarrow \;$Demo Projects. When you load the demo project, not only the project is loaded, but also a good input excitation signal. Figure 8.23 shows the main ``Data Acquisition'' window after the project was loaded.


  
Figure 8.23: The ``Data Acquisition'' window after you loaded the demo project ``Linear system with integrated noise'' and conducted the open loop experiment.
\begin{figure}
\centering
\includegraphics [width=13cm]{line1.ps}
\end{figure}


Process Description

This academic model refers to the paper ``A methodology for integrated system identification and PID Control Design'' by D.E. Rivera and S. Adusumilli (1997 IFAC ADCHEM International Symposium on Advanced Control of Chemical Processes, Banff, Canada, June 1997, pp. 19-24).

The writers state: ``PID controller tuning is relatively straightforward when a plant model is available or the plant is disturbance-free; .... However, in the presence of significant noise or drifting disturbances, most of these 'established' techniques for PID controller tuning from plant data fail. A simple example can be used to demonstrate this point.''

It is this simple example that has been included in this demo project. The signals are sampled with a sample rate of 1 Hz. The process input should be between -15 and 15. The main control objective is to reject the noise (which is a random walk or an integrated and filtered random noise sequence).

Have a look at the process by opening the Simulink model with the menu Simulink $\rightarrow \;$Model, or by editing the project with the menu Edit $\rightarrow \;$Project. Inspect the parameter file with the menu Simulink $\rightarrow \;$ Parameter File and the text file with Simulink $\rightarrow \;$Text File.

Data acquisition

The data acquisition is simply started by hitting the ``Start'' button in the acquisition window. The PRBNS is easily designed with the ``Input Design'' window. The automatically loaded PRBNS varies between -2.5 and 2.5.

From the response to this PRBNS, it is clear that there is a ``drifting'' disturbance. Furthermore can the DC gain approximately be estimated from for instance the step up at 69 seconds. The process input step up is 5 Volt. The process output jumps from -4.4 to 1. The process DC gain will thus be around 1.

Identification

Hit the identification button to switch to the ``Identification'' window. In the ``PreProcessing'' window (Figure 8.24) filter out the low frequent disturbance in input and output with a high pass filter with cut off frequency 0.03 Hz. There is no integrator in the system. Figure 8.24 shows the resulting ``PreProcessing'' window. Hit the ``OK'' button. The model is automatically computed and the signals displayed. Figure 8.25 shows the resulting ``Identification'' window.


  
Figure 8.24: Resulting ``PreProcessing'' window.
\begin{figure}
\centering
\includegraphics [width=12.7cm]{line1.ps}
\end{figure}



  
Figure 8.25: Resulting ``Identification'' window.
\begin{figure}
\centering
\includegraphics [width=13cm]{line1.ps}
\end{figure}


The resulting default model is very good in this case and does not need any further refinement. Inspection of the ``Model Numerics'' shows a DC gain of 1.04 which is around what you predicted. The time constant $\tau$ is 10.4 sec. You can also inspect the ``Model Properties'' window for the step and frequency responses of the identified model.

Clearly, the process is not only disturbed by measurement noise, but also by low frequent process noise, which should be rejected as much as possible by the controller. You will use the specific knowledge of the process noise in the design of the controller. We described two ways to obtain this knowledge:

Even though in this case study it is perfectly possible to do a new experiment, we will use the second technique described above (for illustrative purposes). Use the menu entry File $\rightarrow \;$Save Data to save the data related to the identification in a temporary .mat file. During the control design you will use the signal Eraw_sim (Section 5.4.3), which is the difference between the raw output (including system and noise related signals) and the simulated output (only system related signals).

Control Design

You are now ready to start the Control Design for this linear system. Hit the ``Controller'' button in the task bar to switch to the ``Control Design'' window. The ``Control Design Parameter'' window pops up. The objective of the controller is to reject the disturbance that was measured during identification. You should thus select ``Variance and Tracking'' as ``Controller Type'' and ``Disturbance'' as ``Origin''. Set the ``Initial Input'' and ``Initial Output'' equal to zero and hit the ``OK'' button in the ``Control Design Parameter'' window.

The ``Design Disturbance Definition'' window, which is the next window popping up, allows you to define the disturbance signal shape. You should select ``Matlab File'' and load the file you saved the identification data to. The variable name is Eraw_sim. Finally, detrend the disturbance signal with it's initial value. Figure 8.26 shows the ``Design Disturbance Definition'' window filled out appropriately. Hitting the ``OK'' button starts the computation of the controller. The resulting ``Control Design'' window is shown in Figure 8.27.


  
Figure 8.26: The ``Design Disturbance Definition'' window containing the disturbance extracted from the identification stage.
\begin{figure}
\centering
\includegraphics [width=10.8cm]{line1.ps}
\end{figure}



  
Figure 8.27: Resulting ``Control Design'' window after the initial control design.
\begin{figure}
\centering
\includegraphics [width=13cm]{line1.ps}
\end{figure}


Since the measured signals did not contain much high frequency noise, the ``HF Gain'' parameter can be increased to obtain a better disturbance rejection. Setting this parameter to 10 shows a slight improvement of the controller. Note that the ``HF Gain'' of 10 is not reached (only 4.5). This implies that this constraint is not active any more during the design but the ``Robustness'' is. You can now trade in a bit of the robustness for a higher performance. Change the ``Robustness'' parameter to 50. Once again, the performance is improved.

As a final step, save this designed controller as a benchmark controller using Edit $\rightarrow \;$Designed $\rightarrow \;$Benchmark Controller.

Controller validation

Now you are ready to test the controller in practice. Hit the ``Closed Loop'' button in the task bar, resulting in the ``Closed Loop Data Acquisition'' window. The reference is drawn as a blue line, while the simulation is yellow dotted. For this example, the reference is constant and the simulation too. Hit the ``Start'' button to start the Simulink experiment. The result is shown in Figure 8.28. The process input is quite acceptable (not spiky at all) and the integrating disturbance is suppressed good. Save the measured data as benchmark data with the menu Edit $\rightarrow \;$ Measured $\rightarrow \;$Benchmark Data.


  
Figure 8.28: Resulting ``Closed Loop Data Acquisition'' window with the RaPID controller (dotted line) and the controller from the proceedings (full line).
\begin{figure}
\centering
\includegraphics [width=13cm]{line1.ps}
\end{figure}


Some re-designs

Finally you will compare the RaPID controller with the controller described in the proceedings (this comparison is done mainly for the purpose of illustrating how you can enter a controller designed by some one else). The controller in the paper is of the extended PID type:  
 \begin{displaymath}
k_c \left( 1 + \tau_D s + \frac{1}{\tau_I s} \right) \frac{1}{\tau_F s + 1} 

\end{displaymath} (13)
with $k_c = 0.6102, \tau_D = 2.384, \tau_I = 13.85$ and $\tau_F =
1.901$. The PID controllers used in RaPID are however of the form:  
 \begin{displaymath}
K \left( 1 + \frac{1}{T_i s} + \frac{T_d s}{T_d s/N + 1} \right)

\end{displaymath} (14)
The controller in (8.2) can be made almost equal to the controller in (8.1) by setting K = 0.6102, Ti = 13.85, Td = 0.4830, N = 0.25.

This controller can now be entered in RaPID as follows. First, return to the ``Control Design'' window, and hit the ``Controller'' block in the configuration window (menu Controller $\rightarrow \;$Structure). Hit the ``Template'' button (lower left corner), and change the controller template such that the ``Deriv Gain Limit'' is ``On'' and the ``Limiting Value'' is equal to 0.25 (the is the N value in formula (8.2). The ``Controller Template'' window is shown in Figure 8.29. Hit ``OK'' in both the ``Controller Template'' window and the ``Controller Structure'' window. A new controller is computed. Note that it has a similar performance as before. Now, enter the controller of the paper through the menu Edit $\rightarrow \;$Controller. The result is shown in Figure 8.30.


  
Figure 8.29: The ``Controller Template'' window.
\begin{figure}
\centering
\includegraphics [width=10.8cm]{line1.ps}
\end{figure}



  
Figure 8.30: The ``Edit Designed Controller'' window allows you to enter a controller designed by some one else.
\begin{figure}
\centering
\includegraphics [width=11.6cm]{line1.ps}
\end{figure}


The controller of the paper clearly has a higher robustness as the one designed in the previous section 80 % versus 50 % and a lower ``HF Gain'' 0.75 versus 1.7. The performance however is also lower. The implementation of this controller in the ``Closed Loop Data Acquisition'' window is also shown in Figure 8.28.



Peter Van Overschee
1/21/1998