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

Lecture 2_Part2_Lecture 3

Uploaded by

George Joseph
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

Lecture 2_Part2_Lecture 3

Uploaded by

George Joseph
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

Dr. Ahmed M.

Zaki

Associate Professor
Computer and Systems Engineering Department
Ain Shams University, Cairo, Egypt

CSE-271s
Fall 2024 (34881)
• In studying control systems, the reader must be able to model dynamic systems in
mathematical terms and analyze their dynamic characteristics
• A mathematical model of a dynamic system is defined as a set of equations that
represents the dynamics of the system accurately, or at least fairly well
• The dynamics of many systems, whether they are mechanical, electrical, thermal,…
etc.
• The dynamics of may be described in terms of differential equations
• Throughout this book we assume that the principle of causality applies to the systems
considered. This means that the current output of the system (the output at time t=0)
depends on the past input (the input for t<0) but does not depend on the future input
(the input for t>0).

Slide 2
A system is called linear if the principle of superposition
applies.

The principle of superposition states that the response


produced by the simultaneous application of two different
forcing functions is the sum of the two individual
responses.

Slide 3
• A differential equation is linear if the coefficients are constants or
functions only of the independent variable. Such systems are called
linear time-invariant (or linear constant-coefficient) systems

• Systems that are represented by differential equations whose


coefficients are functions of time are called linear time-varying
systems. An example of a time-varying control system is a
spacecraft control system. (The mass of a spacecraft changes due to
fuel consumption.)
Slide 4
• Transfer Function. 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

Slide 5
Slide 6
Slide 7
Obtaining Cascaded, Parallel, and Feedback (Closed-Loop) Transfer Functions with MATLAB

Slide 8
Slide 9
Slide 10
[P] [I] [PI]

Slide 11 [PD] [PID]


Slide 12
Slide 13
𝐸𝑜 (𝑠) 𝐺(𝑠)
=
𝐸𝑖 (𝑠) 1 + 𝐺 𝑠 𝐻(𝑠)
1 1
𝐸𝑜 (𝑠) ×
𝑅 𝐶𝑠 1 1
= 1 1 = =
𝐸𝑖 (𝑠) 1+𝑅×𝐶𝑠 𝑅𝐶𝑠+1 𝜏𝑠+1

1 1 1Τ 1 −1
𝜏
𝑖𝑓 𝐸𝑖 𝑠 is step input , 𝐸𝑖 (𝑠)= , 𝑡ℎ𝑒𝑛 𝐸𝑜 (𝑠)= 𝑠 𝜏𝑠+1 =𝑠 = +
𝑠 𝑠+1Τ𝜏 𝑠 𝑠+1Τ𝜏
𝑡
𝑒𝑜 (𝑡)= 1- 𝑒 − Τ𝜏
Slide 14
1 1
𝐸𝑜 (𝑠) ×
𝑅 𝐶𝑠 1 1
= 1 1 = =
𝐸𝑖 (𝑠) 1+𝑅×𝐶𝑠 𝑅𝐶𝑠+1 𝜏𝑠+1

1 1 1Τ 1 −1
𝜏
𝑖𝑓 𝐸𝑖 𝑠 is step input , 𝐸𝑖 (𝑠)= , 𝑡ℎ𝑒𝑛 𝐸𝑜 (𝑠)= 𝑠 𝜏𝑠+1 =𝑠 = +
𝑠 𝑠+1Τ𝜏 𝑠 𝑠+1Τ𝜏
𝑡
𝑒𝑜 (𝑡)= 1- 𝑒 − Τ𝜏
num1=[1];
den1=[0.1 1];
num2=[1];
den2=[0.2 1];
num3=[1];
−1ൗ
den3=[0.3 1]; 𝜏
t=linspace(0, 1, 100);
y1=step(num1, den1, t);
y2=step(num2, den2, t);
y3=step(num3, den3, t); -10 -5 -3.3
plot(t, y1, 'r’, t, y2, 'b’, t, y3, 'g');
grid on
Slide 15
Slide 16
Slide 17
Slide 18
𝐺1 𝐺2
𝐶(𝑠) 1−𝐺1 𝐺2 𝐻1
×𝐺3 𝐺1 𝐺2 𝐺3
= 𝐺 𝐺 𝐻 =
𝑅(𝑠) 1+1−𝐺 1𝐺 2𝐻 ×𝐺3 × 𝐺 2 1−𝐺1 𝐺2 𝐻1 +𝐺2 𝐺3 𝐻2
1 2 1 1

Slide 19
Slide 20
Slide 21
Slide 22
Modern Control Theory.
The modern trend in engineering systems is toward greater complexity, due mainly to the requirements of complex tasks and good
accuracy. Complex systems may have multiple inputs and multiple outputs and may be time varying. Because of the necessity
of meeting increasingly stringent requirements on the performance of control systems, the increase in system complexity, and easy
access to large scale computers, modern control theory, which is a new approach to the analysis and design of complex control
systems, has been developed since around 1960. This new approach is based on the concept of state. The concept of state by
itself is not new, since it has been in existence for a long time in the field of classical dynamics and other fields.

State. The state of a dynamic system is the smallest set of variables (called state variables) such that knowledge of
these variables at t= t0 , together with knowledge of the input for t ≥ t0 , completely determines the behavior of the
system for any time t ≥ t0 .

State Variables. The state variables of a dynamic system are the variables making up the smallest set of variables
that determine the state of the dynamic system. If at least n variables x1, x2 , … , xn are needed to completely describe
the behavior of a dynamic system (so that once the input is given for t ≥ t0 and the initial state at t=t0 is specified, the
future state of the system is completely determined), then such n variables are a set of state variables.

Note that state variables need not be physically measurable or observable quantities. Variables that do not
represent physical quantities and those that are neither measurable nor observable can be chosen as state variables.
Slide 23
State Vector. If n state variables are needed to completely describe the behavior of a given system, then these n state
variables can be considered the n components of a vector x.

State Space. The n-dimensional space whose coordinate axes consist of the x1 axis, x2 axis,…., xn axis, where x1, x2,…
, xn are state variables, is called a state space. Any state can be represented by a point in the state space.

State-Space Equations. In state-space analysis we are concerned with three types of variables that are involved in the
modeling of dynamic systems:
1) Input variables
2) Output variables
3) State variables.

Note: The state-space representation for a given system is not unique, except that the number of state variables is the
same for any of the different state-space representations of the same system.

The dynamic system must involve elements that memorize the values of the input for t ≥ t1. Since integrators in a
continuous-time control system serve as memory devices, the outputs of such integrators can be considered as the
variables that define the internal state of the dynamic system.
Slide 24
Free body diagram

𝑚𝑦ሷ 𝑘(𝑦 − 0) 𝑢

m
y Newton's second law of motion

𝑏(𝑦ሶ − 0) 𝑚g
Let we assume that the displacement y(t) is
𝑚𝑦ሷ + 𝑏𝑦ሶ + 𝑘𝑦 = 𝑢(𝑡) + 𝑚𝑔 measured from the equilibrium
𝑙𝑒𝑡 𝑦 = 𝑦ො + 𝑦ത i.e., 𝑦ത =0, then remove 𝑚𝑔 and assume y = 𝑦ො
𝑖𝑛𝑖𝑡𝑖𝑎𝑙𝑙𝑦, 𝑤𝑖𝑡ℎ𝑜𝑢𝑡 𝑎𝑛𝑦 𝑖𝑛𝑝𝑢𝑡 , 𝑤𝑖𝑡ℎ𝑜𝑢𝑡 𝑚𝑜𝑡𝑖𝑜𝑛

𝑚 × 0 + 𝑏 × 0 + 𝑘𝑦ത = 0 + 𝑚𝑔
𝑚𝑔
Slide 25 𝑦ത = ൗ𝑘
𝑚𝑦ሷ + 𝑏𝑦ሶ + 𝑘𝑦 = 𝑢(𝑡)
−1 1 𝑙𝑒𝑡 𝑑𝑖𝑠𝑝𝑙𝑎𝑐𝑚𝑒𝑛𝑡 [𝑦] = 𝑥1
𝑦ሷ = 𝑏𝑦ሶ + 𝑘𝑦 + 𝑢(𝑡) 𝑙𝑒𝑡 𝑣𝑒𝑙𝑜𝑐𝑖𝑡𝑦 [𝑦]ሶ = 𝑣 = 𝑥2
𝑚 𝑚
−𝑏 −𝑘 1
𝑦ሷ = 𝑦ሶ + 𝑦 + 𝑢(𝑡)
𝑚 𝑚 𝑚

𝑦ሷ 𝑦ሶ 𝑦

𝑥2ሶ 𝑥1ሶ 𝑥1
𝑥1ሶ = 𝑥2
−𝑏 −𝑘 1
𝑥2ሶ = 𝑦ሶ + 𝑦 + 𝑢(𝑡)
𝑚 𝑚 𝑚
−𝑏 −𝑘 1
𝑥2ሶ = 𝑥2 + 𝑥1 + 𝑢(𝑡)
𝑚 𝑚 𝑚

Slide 26
𝑚𝑦ሷ + 𝑏𝑦ሶ + 𝑘𝑦 = 𝑢(𝑡) 𝑙𝑒𝑡 𝑑𝑖𝑠𝑝𝑙𝑎𝑐𝑚𝑒𝑛𝑡 [𝑦] = 𝑥1
𝑙𝑒𝑡 𝑣𝑒𝑙𝑜𝑐𝑖𝑡𝑦 [𝑦]ሶ = 𝑣 = 𝑥2
𝑥1ሶ = 𝑥2
−𝑏 −𝑘 1
𝑥2ሶ = 𝑦ሶ + 𝑦 + 𝑢(𝑡)
𝑚 𝑚 𝑚
−𝑏 −𝑘 1
𝑥2ሶ = 𝑥2 + 𝑥1 + 𝑢(𝑡)
𝑚 𝑚 𝑚

Slide 27
Slide 28
Slide 29
𝑤𝑖𝑡ℎ 𝑧𝑒𝑟𝑜 𝑖𝑛𝑖𝑡𝑖𝑎𝑙 𝑐𝑜𝑛𝑑𝑖𝑡𝑖𝑜𝑛

𝑚𝑠2𝑌 𝑠 + 𝑏𝑠𝑌 𝑠 + 𝑘𝑌 𝑠 = 𝑈 𝑠

[𝑚𝑠2 + 𝑏𝑠 + 𝑘]𝑌 𝑠 = 𝑈 𝑠

𝑌(𝑠) 1
=𝐺 𝑠 =
𝑈(𝑠) 𝑚𝑠2 + 𝑏𝑠 + 𝑘

Slide 30
𝑌(𝑠) 1
=𝐺 𝑠 =
𝑈(𝑠) 𝑚𝑠2 + 𝑏𝑠 + 𝑘

Slide 31
Slide 32 note 𝐃 = [0]
Slide 33
𝑥ഺ1 = 𝑥2ሶ − 14𝑥1ሷ − 56𝑥1ሶ MATLAB Check
𝑥1ሷ = 𝑥2 − 14𝑥1ሶ − 56𝑥1
A=[-14 0 1 ;-160 0 0 ; -56 1 0]
Let 𝑥3ሶ = 𝑥2 − 56𝑥1 B=[0;1;0]
𝑥1ሷ = 𝑥3ሶ − 14𝑥1ሶ C=[-14 0 1]
There are many (infinitely many) possible D=[0]
state-space representations for this 𝑥1ሶ = 𝑥3 − 14𝑥1 [num,den]=ss2tf(A,B,C,D)
system. num=
𝑦 = 𝑥1ሶ = 𝑥3 − 14𝑥1
𝑌(𝑠) 𝑠 𝑥 0 0 1 0
= 3 × den=
𝑈(𝑠) 𝑠 + 14𝑠2 + 56𝑠 + 160 𝑥 𝑥1ሶ −14 0 1 𝑥1 0
1 14 56 160
𝑦 = 𝑥ሶ 𝑥2ሶ = −160 0 0 𝑥2 + 1 𝑢
𝑢 = 𝑥ഺ + 14𝑥ሷ + 56𝑥ሶ + 160𝑥 𝑥3ሶ −56 1 0 𝑥3 0
𝑥ഺ = 𝑢 − 14𝑥ሷ − 56𝑥ሶ − 160𝑥 G=tf(num,den)
𝑥1
Let 𝑥1 = 𝑥 , then 𝑦 = 𝑥ሶ 1 𝑦 = −14 0 1 𝑥2 + 0 𝑢
s -2.512e-15
𝑥ഺ1 = 𝑢 − 14𝑥1ሷ − 56𝑥1ሶ − 160𝑥1 𝑥3
--------------------------------
Let 𝑥2ሶ = 𝑢 − 160𝑥1 S^3 + 14 S^2 + 56 s + 160
Slide 34
There are many (infinitely many) possible
state-space representations for this system.

Slide 35
Slide 36
Using (Taylor series)

Slide 37
Slide 38
Slide 39
• Katsuhiko Ogata, 5th Ed. “Modern Control Engineering “, Pearson Chapter 2
• https://theory.labster.com/components-form-of-newtons-second-law

Slide 40

You might also like