Documente Academic
Documente Profesional
Documente Cultură
7
Time Responses of Dynamic Systems Using Matlab Simulink
1. Objective:
The activity aims to understand the different time responses of dynamic systems using matlab simulink.
3. Discussion:
A dynamic system is a system in which a function describes the time dependence of a point in
a geometrical space. Examples include the mathematical models that describe the swinging of a
clock pendulum, the flow of water in a pipe, and the number of fish each springtime in a lake.
The time response represents how the state of a dynamic system changes in time when subjected
to a particular input. Since the models consist of differential equations, some integration must be performed
in order to determine the time response of the system. For some simple systems, a closed-form analytical
solution may be available. However, for most systems, especially nonlinear systems or those subject to
complicated input forces, this integration must be carried out numerically. Fortunately, MATLAB provides
many useful resources for calculating time responses for many types of inputs.
The time response of a linear dynamic system consists of the sum of the transient response which
depends on the initial conditions and the steady-state response which depends on the system input. These
correspond to the free (homogeneous or zero input) and the forced (inhomogeneous or non-zero input)
solutions of the governing differential equations respectively.
Simulink, developed by MathWorks, is a graphical programming environment for modeling,
simulating and analyzing multidomain dynamic systems. Its primary interface is a graphical block
diagramming tool and a customizable set of block libraries. Visual modeling is the graphic representation of
objects and systems of interest using graphical languages.
4. Resources:
Matlab
5. Procedure:
1. To start Simulink from the Matlab IDE, select the Simulink Icon in the toolbar to open
the Simulink Start Page. Click a blank model.
2. Open Simulink Library Browser by clicking Tools and choosing Library Browser. Click
Commonly Used Blocks. Enumerate the different commonly used blocks and identify the
function of each block. Show your answers in Data and Results.
3. Click Continuous . Enumerate the different blocks under Continuous and identify the function of
each block. Show your answers in Data and Results.
4. Click Discrete . Enumerate the different blocks under Discrete and identify the function of each
block. Show your answers in Data and Results.
5. Click Sinks . Enumerate the different blocks under Sinks and identify the function of each
block. Show your answers in Data and Results.
6. Click Sources. Enumerate the different blocks under Sources and identify the function of each
block. Show your answers in Data and Results.
7. To determine the step response of the system
The input u is the step block from sources. Drag and drop this step block to the Simulink
window. The transfer function block can be taken from Continuous blocks. Drag and drop
two transfer function blocks and specify the numerical coefficients of the numerator and
denominator of the two transfer functions by double clicking the transfer function blocks.
The output y can be determined by using Scope block which can be taken from Sinks blocks.
Drag and drop Scope block to the Simulink window. Connect them. It should look like this in
the Simulink window:
Click the run button and when it is ready, double click the Scope. Save the simulation with the
filename yourSurnameSimPro7. Show the time response of the system in Data and Results.
Compare the results of the previous activity. Are the results the same ?
8. Using following dynamic systems , simulate each of them. Show the assembled blocks and the
result of each simulation. Use step block as the input to the system. Save the simulation using
file names as yourSurnameMatlabExer02Proc8a to yourSurnameMatlabExer02Proc8e.
b
c
9. Repeat Procedure 8 using ramp block as input. Save the simulation using file names as
yourSurnameMatlabExer02Proc9a to yourSurnameMatlabExer02Proc9e
10. Using the dynamic systems in Procedure 9, reduce each of them into a single block and
simulate each of them.
a. Use step block as the input to the system. Save the simulation using file names as
yourSurnameMatlabExer02Proc10Partaa to yourSurnameMatlabExer02Proc10Partae.
b. Use ramp block as the input to the system. Save the simulation using file names as
yourSurnameMatlabExer02Proc8Partba to yourSurnameMatlabExer02Proc8Partbe
5. Delay
Delay input signal by a specified
number of samples.
6. Demux Split vector signals into scalars
or smaller vectors. Check 'Bus
Selection Mode' to split bus
signals.
11. Integrator
Continuous-time integration of
the input signal.
Procedure 3
Continuous
Name of the Block Image of the Block Function
1. Derivative
Numerical derivative: du/dt.
4. Integrator second-order
limited Second-order continuous-time
integration of the input signal.
State-space model:
8. State-space
dx/dt = Ax + Bu
y = Cx + Du
Procedure 4
Discrete
Name of the Block Image of the Block Function
Discrete-time integration or
9. Discrete-Time Integrator accumulation of the input signal.
Procedure 5
Sinks
Name of the Block Image of the Block Function of the Block
Y(t) = Amp*Waveform(Freq, t)
Output a sine wave:
O(t) = Amp*Sin(Freq*t+Phase) +
22. Sine Wave Bias
23. Step
Output a step.
sin(2, 3, 1) or
25. Waveform Generator
sin('Amplitude', 2, 'Frequency', 3,
'Phase', 1)
The Step Response as discussed in the former activity has a staircase-like graphical representation.
Also, the plots from the previous activity also shows a parabolic graph. However, in this activity, with the
use of the simulink, we came up with a wave like graph as shown above.
Procedure 8
8c
8d
8e
Procedure 9
9b
9c
9d
9e
Procedure 10 Part a
Procedure Single Block in Simulation Window Step Response
10a
10b
10c
10d
10e
Procedure 10 Part b
Procedure Single Block in Simulation Window Ramp Response
10a
10b
10c
10d
10e
7. Conclusion:
I therefore conclude that using the Simulink in Matlab makes the solving of a problem easier with the use of
graphs. Simulink is a graphical programming environment for modeling, simulating and analyzing
multidomain dynamical systems. Its primary interface is a graphical block diagramming tool and a
customizable set of block libraries. In comparison to programming with the use of codes, solving by drag-
and-click interface is much easier.
8. Further Readings:
Ferraris, G. and Manenti, F. (2010). Interpolation and regression models for the chemical engineer:
solving numerical problems. Germany: Wiley-VCH Verlag
Filo, O. (2010). Information processing by biochemical systems: neural network type configurations.
New Jersey: Wiley.
Gopal, S. (2009). Bioinformatics: a computing perspective. India: McGraw-Hill Science/Engineering
Math.
Jaluria, Y. (2012). Computer methods for engineering with MATLAB applications (2 nd ed.). Boca,
Raton,Florida: CRC Press.
Knopf, F. C. (2012). Modeling, analysis and optimization of process and energy systems.Hoboken,
New Jersey: John Wiley and Sons.
Velten, K. (2009). Mathematical modeling and simulation: introduction for scientists and engineers.
Singapore: Wiley-VCH.