0% found this document useful (0 votes)
41 views

Lab3 2

The document discusses mathematical modeling of control systems. It begins by introducing transfer functions and using the spring-mass damper system as an example. It then discusses different ways to study and model systems, including using physical models, mathematical models, and computer simulations. The document outlines the key components of a mathematical model and different types of models. It also covers classifying systems and representations, including state space models. Finally, it discusses deriving and representing transfer functions in MATLAB.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views

Lab3 2

The document discusses mathematical modeling of control systems. It begins by introducing transfer functions and using the spring-mass damper system as an example. It then discusses different ways to study and model systems, including using physical models, mathematical models, and computer simulations. The document outlines the key components of a mathematical model and different types of models. It also covers classifying systems and representations, including state space models. Finally, it discusses deriving and representing transfer functions in MATLAB.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 49

Modern Control System

Mathematical Modeling of Systems


Topics
1. Introduction.
2. Transfer function.
3. Spring-Mass Damper System.
4. Block Diagram Model
Ways to Study a System

System

Experiment with actual Experiment with a


System model of the System

Physical Model Mathematical Model

Analytical Solution

Simulation

Frequency Domain Time Domain Hybrid Domain

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

Physical Mathematical Computer

Static Dynamic Static Dynamic Static Dynamic

3
What is Mathematical Model?
A set of mathematical equations (e.g., differential eqs.) that
describes the input-output behavior of a system.

What is a model used for?


• Simulation
• Prediction/Forecasting
• Prognostics/Diagnostics
• Design/Performance Evaluation
• Control System Design
Classification of Mathematical Models

• Linear vs. Non-linear

• Deterministic vs. Probabilistic (Stochastic)

• Static vs. Dynamic

• Discrete vs. Continuous

• White box, black box and gray box

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.

dy(t ) du(t ) d 2 y(t )


u(t) =3 − y(t)
dt dt dt 2

• One should know have complete knowledge


of the system to derive a white box model.
8
Mathematical Modelling Basics

Mathematical model of a real world system is derived using a


combination of physical laws and/or experimental means

• Physical laws are used to determine the model structure (linear


or nonlinear) and order.
• The parameters of the model are often estimated and/or
validated experimentally.
• Mathematical model of a dynamic system can often be expressed
as a system of differential (difference in the case of discrete-time
systems) equations
Mathematical Model
 Mathematical modeling of any control system is the first and foremost task that a
control engineer has to accomplish for design and analysis of any control engineering
problem.
 A mathematical model of a dynamic system is defined as a set of differential equations
that represents the dynamics of the system accurately, or at least fairly well.
 Note that a mathematical model is not unique to a given system. A system may be
represented in many different ways and, therefore, may have many mathematical
models, depending on one’s perspective.
 Once a mathematical model of a system is obtained, various analytical and
computational techniques may be used for analysis and synthesis purposes. Because
the systems under consideration are dynamic in nature, the equations are usually
differential equations. If these equations can be linearized, then the Laplace
transform may be utilized to simplify the method of solution.

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:

: is the vector of state variables (nx1).

: is the time derivative of the state vector (nx1).

: is the input or control vector (px1).

: is the output vector (qx1).

: is the system matrix (nxn).

: is the input matrix (nxp).

: is the output matrix (qxn).

: is the feedforward matrix (qxp).


Control systems Classifications
Non-Linear System OR Linear System

Time Varying System OR Time Invariant System

Single Variable Control OR Multivariable Control

Classical Representation State Space Representation


OR
(Classical Control) (Modern Control)

Manual Control System OR Automatic Control System

Open-Loop Control system OR Closed-Loop Control system

5
The approach to dynamic system problems can be as follows:

1. Define the system and its components.

2. Formulate the mathematical model and list the necessary assumptions

3. Write the differential equations describing the model.

4. Solve the equations for the desired output variables.

5. Examine the solution and the assumptions.

6. If necessary reanalyze or redesign the system.

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
(𝒏) (𝒏−𝟏) (𝒎) (𝒎−𝟏)
𝒂𝟎 𝒚 + 𝒂𝟏 𝒚 + … + 𝒂𝒏−𝟏 𝒚 + 𝒂𝒏 𝒚 = 𝒃𝟎 𝒙 + 𝒃𝟏 𝒙 + … + 𝒃𝒎−𝟏 𝒙 + 𝒃𝒎 𝒙

 where y is the system output and x is the input of the System


 The transfer function of this system is obtained by taking the Laplace
transforms of both sides of Equation (under the assumption that all initial
conditions are zero),

𝑎0 𝑆 𝑛 𝑌 𝑠 + ⋯ + 𝑎𝑛−1 𝑆1 𝑌 𝑠 + 𝑎𝑛 𝑌 𝑠 = 𝑏0 𝑆 𝒎 𝑿(𝑠) + ⋯ + 𝑏𝑚−1 𝑆 𝟏 𝑿(𝑠) + 𝑏𝑚 𝑿(𝒔)

Then: 𝑎0 𝑆 𝑛 + ⋯ + 𝑎𝑛−1 𝑆 1 + 𝑎𝑛 𝑌 𝑠 = 𝑏0 𝑆 𝒎 + ⋯ + 𝑏𝑚−1 𝑆 𝟏 + 𝑏𝑚 𝑿(𝒔)

10
TRANSFER FUNCTION
 Then the transfer function is

𝑳𝒂𝒑𝒍𝒂𝒄𝒆 𝒐𝒇 𝑶𝒖𝒕𝒑𝒖𝒕
𝑻𝒓𝒂𝒏𝒔𝒇𝒆𝒓 𝑭𝒖𝒏𝒄𝒕𝒊𝒐𝒏 = 𝑮 𝒔 =
𝑳𝒂𝒑𝒍𝒂𝒄𝒆 𝒐𝒇 𝑰𝒏𝒑𝒖𝒕 𝑨𝒔𝒔𝒖𝒎𝒊𝒏𝒈 𝒁𝒆𝒓𝒐 𝒊𝒏𝒊𝒕𝒊𝒂𝒍 𝑪𝒐𝒏𝒅𝒊𝒕𝒊𝒐𝒏

𝑌(𝑠) 𝑏0 𝑆 𝒎 + ⋯ + 𝑏𝑚−1 𝑆 𝟏 + 𝑏𝑚
𝐺 𝑠 = =
𝑋(𝑠) 𝑎0 𝑆 𝑛 + 𝑎1 𝑆 𝑛−1 + ⋯ + 𝑎𝑛−1 𝑆 1 + 𝑎𝑛

 Poles: are roots of the denominator (Values of s such that transfer


function becomes infinite)
 Zeros: are roots of the numerator (Values of s such that transfer
function becomes 0)
11
To derive the transfer function
1. Write the differential equation for the system.

2. Take the Laplace transform of the differential equation, assuming all


initial conditions are zero.
3. Take the ratio of the output Y(s) to the input R(s). This ratio is the
transfer function.

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.

o Polyval function is used to evaluate the value of a polynomial at a given value of


the variable.
Transfer Function (Matlab)
• There are three ways to represent transfer function in matlab:
1. By Using Equation
s=tf('s');
T_F=10*s/(s^2+10*s+25)

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 Frequency vs. Forced Frequency

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.

Example of Natural Frequency: Child on a Swing

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.

% finding the natural frequency and damping ratio of the system


w_n=sqrt(k/m) % natural frequency
zeta=b/(2*w_n) % damping ratio
num = [1];
den = [m b k];
sys = tf(num,den)

% finding the step response


step(sys)

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  bm1s
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

(a) Behind the block

(b) Ahead of the block 31


Block Diagram Reduction
3. Moving a pickoff point

(a) Behind the block

(b) Ahead of the block 32


Block Diagram Reduction
4. Equivalent transfer function for parallel subsystems is the sum of
their transfer functions

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.

2. The denominator of the closed-loop transfer function C(s)/R(s) is equal


to:

1 − Σ( 𝑝𝑟𝑜𝑑𝑢𝑐𝑡 𝑜𝑓 𝑡ℎ𝑒 𝑡𝑟𝑎𝑛𝑠𝑓𝑒𝑟 𝑓𝑢𝑛𝑐𝑡𝑖𝑜𝑛𝑠 𝑎𝑟𝑜𝑢𝑛𝑑 𝑒𝑎𝑐ℎ 𝑙𝑜𝑜𝑝)


3. The positive feedback loop yields a negative term in the denominator.

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.

 Proposed systems can be “tested” before committing


resources.

 Allows us to control time.

 Allows us to identify bottlenecks.

 Allows us to gain insight into which variables are


most important to system performance.
14
Disadvantages to Simulation
 Model building is an art as well as a science. The
quality of the analysis depends on the quality of the
model and the skill of the modeler.

 Simulation results are sometimes hard to interpret.

 Simulation analysis can be time consuming and


expensive. Should not be used when an analytical
method would provide for quicker results.

15

You might also like