You are on page 1of 8

SIMULATION SESSION 2

SIGNALS, SYSTEMS AND CIRCUITS


BACHELOR IN ENGINEERING PHYSICS
2nd Course, 2nd Semester
2021-2022 Academic Course

Team
Full Name 1
Full Name 2

DEPARTAMENTO DE TECNOLOGÍA ELECTRÓNICA


Campus de Leganés
Avenida del Universidad 30
28911 Leganés
SSC/GIF/SS2/21_22

1 Introduction
The target of this session is to learn the tools to describe and model LTI systems in Matlab.
Firstly, we will learn the description of transfer functions, and the computation of impulse,
step and frequency response. Secondly, we will learn how to perform transient behavioral
simulations.

Control Toolbox and Simulink are required for this session.

2 Generating LTI objects in Matlab


Linear and Time Invariant systems can be numerically modelled in Matlab using a data
structure. The format of the data structure depends on the external representation we are
interested in. It is also possible to use an internal representation. We will focus on two external
representations:

- Transfer function as a ratio of polynomial functions (tf)


- Transfer function as a set of gain, zeros and poles (zpk)

Try and report the following commands.


Hs1=tf([1 2],[1 2 1])
Hz1=tf(1,[1 2 1],1)

Compute the .zpk representation of Hs1 and Hz1, and report zeros, poles and gain. Is the gain
reported the static gain?

2021/22 Course 2
SSC/GIF/SS2/21_22

3 Analysis of Continuous-Time systems


Describe the following transfer functions

1
H 1 ( s )= 2
s + 2 s+10
2 s +1
H 2 ( s )= 2
s + 2 s+10
Use ‘roots’ command to compute poles and zeros, or use zpk representation

Use ‘step’ to compute the step response. Report peak time and overshoot for each system.
What is the effect of adding a zero to the system?

2021/22 Course 3
SSC/GIF/SS2/21_22

Plot the frequency response of both systems with ‘bode’ command and comment the impact
of having complex poles. What is the influence of adding a real zero in this case?

2021/22 Course 4
SSC/GIF/SS2/21_22

4 Transient simulation of Continuous-Time systems

If we want to predict the transient response of the system to an arbitrary input, we need to
numerically solve the differential equations of the external representation. Although there are
commands in Matlab to perform this task, we prefer to use a graphical tool called Simulink.

Type ‘simulink’ in the command window and create a new blank model. Create the following
block diagram, and set the following Model Settings:

2021/22 Course 5
SSC/GIF/SS2/21_22

Run the simulation and open the scope to check the result. Can you check if the obtained
value corresponds to the predicted value in the bode plot? Please comment here

2021/22 Course 6
SSC/GIF/SS2/21_22

Change the input to a square wave. Check ‘Sources’ library. Set the square wave to have an
amplitude of 1 (between 0 and 1) and a period of 2 seconds. Run the system and check the
output. Copy the output waveform here. What is the amplitude? And the frequency? Can you
explain the waveform using the frequency response and the spectrum of the square wave?
Add your comments here

2021/22 Course 7
SSC/GIF/SS2/21_22

Now try to run the following system and check BIBO stability. Can you explain the results?

(hint: compute the poles of the whole transfer function)

2021/22 Course 8

You might also like