Lab3 2
Lab3 2
System
Analytical Solution
Simulation
1
Model
• A model is a simplified representation or
abstraction of reality.
• Reality is generally too complex to copy
exactly.
• Much of the complexity is actually
irrelevant in problem solving.
2
Types of Models
Model
3
What is Mathematical Model?
A set of mathematical equations (e.g., differential eqs.) that
describes the input-output behavior of a system.
5
Black Box Model
• When only input and output are known.
• Internal dynamics are either too complex or
unknown.
Input Output
6
Grey Box Model
• When input and output and some information
about the internal dynamics of the system is
known.
u(t) y(t)
y[u(t), t]
7
White Box Model
• When input and output and internal dynamics
of the system is known.
3
Different Mathematical Models
Commonly used mathematical models are
Differential equation model (Time Domain).
Transfer function model (S-Domain).
State space model (Time Domain).
Use of the models depends on the application. For example, to find the
transient or steady state response of SISO (Single Input Single Output)
LTI (Linear Time Invariant) system transfer function model is useful. On
the other hand for optimal control application state space model is
useful.
4
State space:
For continuous linear time-invariant (LTI) systems, the standard state-space representation is given
below:
Where:
5
The approach to dynamic system problems can be as follows:
8
TRANSFER FUNCTION
Transfer functions are commonly used to characterize the input—output
relationships of components or systems that can be described by linear,
time-invariant, differential equations.
The transfer function of a linear, time-invariant, differential equation
system is defined as “the ratio of the Laplace transform of the output
(response function) to the Laplace transform of the input (driving
function) under the assumption that all initial conditions are zero”.
9
TRANSFER FUNCTION
The general form of the differential equation for LTI-System is given by
(𝒏) (𝒏−𝟏) (𝒎) (𝒎−𝟏)
𝒂𝟎 𝒚 + 𝒂𝟏 𝒚 + … + 𝒂𝒏−𝟏 𝒚 + 𝒂𝒏 𝒚 = 𝒃𝟎 𝒙 + 𝒃𝟏 𝒙 + … + 𝒃𝒎−𝟏 𝒙 + 𝒃𝒎 𝒙
10
TRANSFER FUNCTION
Then the transfer function is
𝑳𝒂𝒑𝒍𝒂𝒄𝒆 𝒐𝒇 𝑶𝒖𝒕𝒑𝒖𝒕
𝑻𝒓𝒂𝒏𝒔𝒇𝒆𝒓 𝑭𝒖𝒏𝒄𝒕𝒊𝒐𝒏 = 𝑮 𝒔 =
𝑳𝒂𝒑𝒍𝒂𝒄𝒆 𝒐𝒇 𝑰𝒏𝒑𝒖𝒕 𝑨𝒔𝒔𝒖𝒎𝒊𝒏𝒈 𝒁𝒆𝒓𝒐 𝒊𝒏𝒊𝒕𝒊𝒂𝒍 𝑪𝒐𝒏𝒅𝒊𝒕𝒊𝒐𝒏
𝑌(𝑠) 𝑏0 𝑆 𝒎 + ⋯ + 𝑏𝑚−1 𝑆 𝟏 + 𝑏𝑚
𝐺 𝑠 = =
𝑋(𝑠) 𝑎0 𝑆 𝑛 + 𝑎1 𝑆 𝑛−1 + ⋯ + 𝑎𝑛−1 𝑆 1 + 𝑎𝑛
12
Transfer Function (Matlab)
• Transfer function is a ratio of polynomials.
• In Matlab polynomials are represented be a row vector containing
the polynomials coefficients in a descending order.
• Example :
Transfer Function (Matlab)
• Multiplications of polynomials.
Example :
o conv function is used to multiply polynomials.
2. By Using Coefficients
T_F= tf([10 0],[1 10 25]);
3. By Using Coefficients
syntax: zpk([zeros],[poles],gain)
example :T_F=zpk([0],[-5 -5],10)
The natural frequency and damping ratio of Spring-Mass-Damper system is found using the statndrad
form of the second-order system.
𝑘𝑘
𝑤𝑤𝑛𝑛 = � 𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓
𝑚𝑚
𝑏𝑏
𝜁𝜁 = 𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑 𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟
2𝑤𝑤𝑛𝑛
Damping ratio
Damping is the power on or to prevent or reduce its oscillation in an oscillatory system.
A damping ratio definition is a dimensionless measure used to describe how
oscillations within a system can decompose once a disturbance occurs is known as the
damping ratio.
The system parameter like damping ratio is used to describe how quickly the oscillations
decompose from one bounce to another. The damping ratio symbol is zeta (ζ), that can
change from undamped like ζ = 0, underdamped like ζ < 1, critically damped like ζ = 1 &
overdamped like ζ > 1.
The response can be classified as one of three types of damping that describes the output
in relation to the steady-state response.
Underdamped
The more underdamped the system, the more oscillations and longer it takes to reach
steady-state. Here damping ratio is always less than one.
Critically damped
A critically damped response is that response that reaches the steady-state value the
fastest without being underdamped. Here, the damping ratio is always equal to one. There
should be no oscillation about the steady-state value in the ideal case.
Overdamped
An overdamped response is the response that does not oscillate about the steady-state
value but takes longer to reach steady-state than the critically damped case. Here
damping ratio is greater than one.
Natural Frequency
Natural frequency is the frequency at which a system tends to oscillate in the absence
of any driving force.
Natural frequencies are different from forced frequencies, which occur by applying
force to an object at a specific rate. The forced frequency can occur at a frequency that is
the same as or different from the natural frequency.
• When the forced frequency is not equal to the natural frequency, the amplitude of
the resulting wave is small.
• When the forced frequency equals the natural frequency, the system is said to
experience “resonance”: the amplitude of the resulting wave is large compared to
other frequencies.
A child sitting on a swing that is pushed and then left alone will first swing back and
forth a certain number of times within a specific timeframe. During this time, the swing
is moving at its natural frequency.
To keep the child swinging freely, they must be pushed at just the right time. These
“right times” should correspond to the natural frequency of the swing to make the swing
experience resonance, or yield the best response. The swing receives a little more energy
with each push.
Spring-Mass-Damper Matlab
close all
clear all
clc
% System coefficients
m= 1; % mass
k= 1; %spring constant
b=0.2 ; %coefficient of viscous friction.
Simulation
Block Diagram Models
A block diagram of a system is a pictorial representation of the
functions performed by each component and of the flow of signals.
Such diagram depicts the interrelationships that exist among the various
components. Differing from a purely abstract mathematical
representation, a block diagram has the advantage of indicating more
realistically the signal flows of the actual system.
Transfer function can be represented as a block diagram:
m 1
bm s bm1s
m
b0
R(s) n 1 C (s)
an s an 1s a0
n
26
Components Of a block diagram for a LTI system
27
Procedures for drawing block diagram
1. Write the equations that describe the dynamic behavior for each
component.
2. Take Laplace transform of these equations, assuming zero initial
conditions.
3. Represent each Laplace-transformed equation individually in block
form.
4. Assembly the elements into a complete block diagram.
28
Block Diagram Reduction
Rules for reduction of the block diagram:
1. Any number of cascaded blocks can be reduced by a single block
representing transfer function being a product of transfer functions of
all cascaded blocks.
30
Block Diagram Reduction
2. Moving a summing point
33
Block Diagram Reduction
5. Feedback control system
34
Example reduce the following block diagram:
H2
R _ C
+_ + G1 + G2 G3
+
H1
35
Moving the summing point ahead of G1, we have:
H2
G1
R _ C
+_ + + G1 G2 G3
+
H1
36
Combing G1 and G2 in Cascade, we get:
H2
G1
R _ C
+_ + + G1G2 G3
+
H1
37
Eliminating the feedback loop G1, G2 and H1 we get:
H2
G1
R _ C
+_ + + G1G2 G3
+
H1
38
Combing the two blocks in Cascade, we get
H2
G1
R _ G1G2 C
+_ + G3
1 G1G2 H1
39
Similarly eliminating the second feedback loop we get:
H2
G1
R _ G1G2G3 C
+_ +
1 G1G2 H1
40
Similarly eliminating the third feedback loop we get:
R G1G2G3 C
+_ 1 G1G2 H1 G2G3 H 2
41
The system is reduced to the following block diagram:
R G1G2G3 C
1 G1G2 H1 G2G3 H 2 G1G2G3
42
Conclusions of block diagram reduction Technique
1. Numerator of the closed-loop transfer function C(s)/R(s) is the product
of the transfer functions of the feedforward path.
43
Conclusions of block diagram reduction Technique
Matlab
43
Simulation
• Computer simulation is the discipline of
designing a model of an actual or theoretical
physical system, executing the model on a
digital computer, and analyzing the execution
output.
• Simulation embodies the principle of
``learning by doing'' --- to learn about the
system we must first build a model of some
sort and then operate the model.
12
Modelling and Simulation Process
Project
Description
Conceptual
Model
Simulation
Model
Simulation
Program
Model
Validation
13
Advantages to Simulation
Can be used to study existing systems without
disrupting the ongoing operations.
15