Sie sind auf Seite 1von 5

Simulink

for Process Control Applications

Simulink is a computational tool, which can be used to model, simulate and analyse dynamical systems. It is
integrated with MATLAB and its toolboxes and allows interaction with the MATLAB workspace and/or scripts. It is a
visual tool, the main feature of which is graphical block diagramming. Its use in control engineering is widespread,
both in industrial and academic applications.

One can run Simulink either by typing simulink in MATLAB command prompt, or by pressing the icon:
In a PC with the University Windows Student Desktop Image, you should first find the Teaching License version of
MATLAB.

The library browser is then shown (Fig. 1).

Figure 1 : The Simulink Library Browser

To open a new Simulink model, one can either click File > New > Model in the command bar, or Ctrl+N on the
keyboard or the icon:

A block diagram can be constructed in the new window, by dragging and dropping components from the Simulink
Library Browser Window. Most of the blocks used in this course will be found under Continuous, Sinks, Sources and
Math Operations.
1


By double clicking on a block in the Library browser one can see the customizable properties, but can only set the
appropriate values after dragging and dropping the appropriate block to the model window.

Using continuous blocks, one can define continuous transfer function models in the time or frequency (Laplace)
domain. Here we will only mention useful blocks in the frequency domain. Most models will be defined using the
transfer function and the transport delay blocks. Alternatively, a transfer function can be defined using the zero-pole
block. A PID controller can either be defined using the PID Controller block, or by assembling it from its components:
the blocks that need to be used are: gain (from the math operations class of blocks), a derivative and an integrator
from the continuous class.

Drag-and-drop

Figure 2: The continuous class blocks of Simulink


Figure 3: The Simulink model window

After the transfer function block is moved to the new model window (Fig. 3), by double clicking on the icon, one can
edit its properties (Fig. 4). The numerator and the denominator are defined as polynomials, e.g. the value [5 2 1] in
the Numerator Coefficients box defines the polynomial 5s2+2s+1.



Figure 4: Editing the Transfer function block properties

One can notice 2 arrows on either side of the Transfer fcn block (Fig. 3). These are the points where the block is
connected to other blocks. The left arrow, inwards the Transfer fcn block is for the input signal and the right arrow is
for the output. One may hook another unit at the output and/or scope, which is available from the Sinks class of
blocks and plots the output signal with respect to time.


Figure 5: The sinks class blocks of Simulink

Similarly, in the input of the Transfer fcn block, either another process or an input signal can be hooked. Input signals
are available from the sources class of blocks. Among the most commonly used are: steps, constants, ramps and
uniform random numbers.

Figure 6: The sources class blocks of Simulink

When all blocks are in the model window (Fig. 7), one can link them either by dragging the arrows from one unit to
the other, or by clicking the units sequentially, while having the ctrl key pressed.


Figure 7: The model window with all blocks

After all units are linked, a simulation can be performed by clicking the icon. The box next to the start and stop
buttons defines the simulation time (the default is 10.0). The output of the simulation using the default values in all
blocks is retrieved by double clicking the Scope block icon:



Figure 8: Output of the simulation of Fig. 7

The scope can have multiple inputs, so that in the same graph multiple quantities can be plotted. This is possible by
combining the signals that need to be visualized in a vector using the Mux block, available from the Signal routing
class. For example, if we would like to compare the dynamics of second order systems, we can formulate the
Simulink model of Fig.9a, which gives the response of Fig.9b. Note that the simulation time is extended to 30, to
allow for the systems to reach steady state. You should interpret Fig.9b in conjunction with your course notes on the
dynamics on second order systems.

(a) (b)

Figure 9: Response of second order systems: simulink model (a) and output (b)

Note that in Simulink arrows represent signals. Hence, irrespective if the signal is about an intensive (e.g.
temperature) or extensive quantity (e.g. flow rate), when there are forks, the signal is passed unchanged to the
subsequent blocks. In Fig.9, all 3 transfer functions receive the same input, which is the output of the step block.

Tutorial tasks
1. Simulate the dynamic response of a second order system with transfer function G(s) = 6 / (2s2+4s+1) with a
unit step input at time t=0, until it reaches steady state.
2. Approximate this system with a 1st order system with time delay.
You can calculate both the delay and the first order system parameters graphically from the
response curve of the 2nd order system as we have discussed in class.
3. Plot the outputs of the original (2nd order) and approximate (1st order) system under various inputs:
a. Unit step function at time t=0
b. Unit step function at time t=0 + sine wave
c. Unit step function at time t=0 + ramp function
d. Unit step function at time t=0 + uniform random number
Plot all outputs for the different inputs on the same graph. What do you observe?
5

Das könnte Ihnen auch gefallen