Download as pdf or txt
Download as pdf or txt
You are on page 1of 25

UST

Control Systems

Modelling – Part 2

Prof. Abdel-Latif Elshafei

CIE 318: State Space Models A. L. Elshafei 1


UST

Outline

• Block Diagrams
– Transformations
– Block diagram reduction

• State Space Models


– Modeling electrical and mechanical systems
– Relation between state space models and transfer functions

CIE 318: State Space Models A. L. Elshafei 2


UST

Block Diagrams

CIE 318: State Space Models A. L. Elshafei 3


UST

Block Diagram Transformations

• Cascaded (series) blocks

• Moving a summing point behind a block

• Moving a pick off point ahead of a block

CIE 318: State Space Models A. L. Elshafei 4


UST

Block Diagram Transformations

• Moving a pickoff point behind of a block

• Moving a summing point ahead of a block

• Eliminating a feedback loop

CIE 318: State Space Models A. L. Elshafei 5


UST

Example 1

Simplify the following block diagram

CIE 318: State Space Models A. L. Elshafei 6


UST

Example 1 (contd.)

CIE 318: State Space Models A. L. Elshafei 7


UST

State Space Models

CIE 318: State Space Models A. L. Elshafei 8


UST

Basic Definitions

System variable: Any variable that responds to an input or initial


conditions in the system.

State variables: The smallest set of linearly independent system


variables such that the values of the members of the set at 𝑡0
along with known forcing functions completely determine the values
of all the state variables for 𝑡 ≥ 𝑡0 .

State vector: A vector whose elements are the state variables.

CIE 318: State Space Models A. L. Elshafei 9


UST

Basic Definitions (contd.)

State space: The n-dimensional space whose axes are the state
variables.

State equations: A set of n simultaneous first-order differential


equations with n state variables

Output equation: The algebraic equation that expresses the output


variables of a system as linear combinations of the state variables
and the inputs.

CIE 318: State Space Models A. L. Elshafei 10


UST

General State Space Representation

State variable equation: 𝑥ሶ = 𝐴𝑥 + 𝐵𝑢


Output equation: 𝑦 = 𝐶𝑥 + 𝐷𝑢

𝑥: state vector
𝑥:ሶ derivative of the state vector
𝑦: output vector
𝑢: input vector
𝐴: system matrix
𝐵: input matrix
𝐶: output matrix
𝐷: feed-forward matrix

CIE 318: State Space Models A. L. Elshafei 11


UST

Notes

• A minimum number of states must be selected as components of


the state vector.

• The components of the state vector must be linearly independent.

• One way to determine the number of state variables is to count


the number of independent energy storage elements.

• The order of a system is the order of the denominator of the


corresponding transfer after canceling the common poles and
zeros.

CIE 318: State Space Models A. L. Elshafei 12


UST

Example of an Electric Network

1. Label all branch currents.


2. Select the state variables by writing the derivative equation
for each energy storage element
𝑑𝑣𝑐 𝑑𝑖𝐿
𝐶 = 𝑖𝐶 and 𝐿 = 𝑣𝐿
𝑑𝑡 𝑑𝑡
Select the differentiated variables 𝑣𝑐 , 𝑖𝐿 as state variables.

CIE 318: State Space Models A. L. Elshafei 13


UST

Example of a Electric Network


3. Apply Kirchhoff’s laws
1
𝑖𝐶 = −𝑖𝑅 + 𝑖𝐿 = − 𝑣𝐶 + 𝑖𝐿
𝑅
𝑣 = 𝑣𝐿 + 𝑣𝐶

4. From steps (2) and (3), we can write


𝑑𝑣𝑐 1
𝐶 = − 𝑣𝑐 + 𝑖𝐿
𝑑𝑡 𝑅
𝑑𝑖𝐿
𝐿 = −𝑣𝐶 + 𝑣
𝑑𝑡

𝑑𝑣𝐶 −1 1
𝑣𝐶 0
5. The state variable equation is 𝑑𝑡
𝑑𝑖𝐿 = 𝑅𝐶
1
𝐶
𝑖 + 1 𝑣
− 0 𝐿 𝐿
𝑑𝑡 𝐿

CIE 318: State Space Models A. L. Elshafei 14


UST

Example of a Mechanical System

1- Draw the free body diagram


2- Modeling equations:
𝑀1 𝑥ሷ 1 = −𝐷𝑥ሶ 1 − 𝐾 𝑥1 − 𝑥2
𝑀2 𝑥ሷ 2 = 𝑓 − 𝐾 𝑥2 − 𝑥1

CIE 318: State Space Models A. L. Elshafei 15


UST

Example (contd.)

𝑑𝑥1 𝑑𝑥2
Define 𝑣1 = and 𝑣2 = .
𝑑𝑡 𝑑𝑡

The state variable equations are

𝑑𝑥1
= 𝑣1
𝑑𝑡
𝑑𝑣1 𝐾 𝐷 𝐾
=− 𝑥 − 𝑣 + 𝑥
𝑑𝑡 𝑀1 1 𝑀1 1 𝑀1 2
𝑑𝑥2
= 𝑣2
𝑑𝑡
𝑑𝑣2 𝐾 𝐾 1
= 𝑥1 − 𝑥2 + 𝑓 𝑡
𝑑𝑡 𝑀2 𝑀2 𝑀2

CIE 318: State Space Models A. L. Elshafei 16


UST

C0nverting a Transfer Function to State


Space
𝑌 𝑏0
Consider a system described by =𝐺=
𝑈 𝑠 3 +𝑎2 𝑠 2 +𝑎1 𝑠 +𝑎0
𝑑3 𝑦 𝑑2 𝑦 𝑑𝑦
+ 𝑎2 2 + 𝑎1 + 𝑎0 𝑦 = 𝑏0 𝑢
𝑑𝑡 3 𝑑𝑡 𝑑𝑡

Select the state variables to be 𝑦, 𝑦,ሶ and 𝑦.ሷ


𝑥1 = 𝑦
𝑑𝑦
𝑥2 = → 𝑥ሶ 1 = 𝑥2
𝑑𝑡
𝑑2 𝑦
𝑥3 = → 𝑥ሶ 2 = 𝑥3
𝑑𝑡 2
𝑑3𝑦 𝑑2 𝑦 𝑑𝑦
= −𝑎2 2 − 𝑎1 − 𝑎0 𝑦 + 𝑏0 𝑢 → 𝑥ሶ 3 = −𝑎2 𝑥3 − 𝑎1 𝑥2 − 𝑎0 𝑥1 + 𝑏0 𝑢
𝑑𝑡 3 𝑑𝑡 𝑑𝑡

CIE 318: State Space Models A. L. Elshafei 17


UST

C0nverting a Transfer Function to State


Space
The state space model is

𝑥ሶ 1 0 1 0 𝑥1 0
𝑥ሶ 2 = 0 0 1 𝑥2 + 0 𝑢
𝑥ሶ 3 −𝑎0 −𝑎1 −𝑎2 𝑥3 𝑏0

𝑥1
𝑦 = 1 0 0 𝑥2
𝑥3

CIE 318: State Space Models A. L. Elshafei 18


UST

Example
𝑌 24
Find the state space model of = .
𝑅 𝑠 3 +9𝑠 2 +26𝑠+24

𝑥ሶ 1 0 1 0 𝑥1 0
𝑥ሶ 2 = 0 0 1 𝑥2 + 0 𝑢
𝑥ሶ 3 −24 −26 −9 𝑥3 24

𝑥1
𝑦 = 1 0 0 𝑥2
𝑥3

CIE 318: State Space Models A. L. Elshafei 19


UST

Example (contd.)

CIE 318: State Space Models A. L. Elshafei 20


UST

Example (contd.)

𝑥ሶ 1 0 1 0 𝑥1 0
𝑥ሶ 2 = 0 0 1 𝑥2 + 0 𝑢
𝑥ሶ 3 −24 −26 −9 𝑥3 1
𝑥1
𝑦= 2 7 1 𝑥2
𝑥3

CIE 318: State Space Models A. L. Elshafei 21


UST

Conversion from State Space to Transfer


Function
Consider the state-space model: 𝑥ሶ = 𝐴𝑥 + 𝐵𝑢 and 𝑦 = 𝐶𝑥 + 𝐷𝑢

Assume zero initial conditions. Laplace transform leads to


𝑠𝑋 𝑠 = 𝐴𝑋 𝑠 + 𝐵𝑈 𝑠
𝑌 𝑠 = 𝐶𝑋 𝑠 + 𝐷𝑈 𝑠

The above equations lead to


𝑠𝐼 − 𝐴 𝑋 𝑠 = 𝐵𝑈 𝑠
𝑋 𝑠 = 𝑠𝐼 − 𝐴 −1 𝐵𝑈 𝑠
𝑌 𝑠 = 𝐶 𝑠𝐼 − 𝐴 −1 𝐵𝑈 𝑠 + 𝐷𝑈 𝑠

CIE 318: State Space Models A. L. Elshafei 22


UST

Conversion from State Space to Transfer


Function

For a single-input single-output system, the transfer function is


𝑌
= 𝐶 𝑠𝐼 − 𝐴 −1 𝐵 + 𝐷
𝑈

The transfer function is


𝑌 −1 𝐵
𝑎𝑑𝑗 𝑠𝐼 − 𝐴
= 𝐶 𝑠𝐼 − 𝐴 +𝐷 =𝐶 𝐵+𝐷
𝑈 𝑠𝐼 − 𝐴

The characteristic equation is 𝑠𝐼 − 𝐴 = 0. This yields the system


poles which are identical to the eigenvalues of the matrix 𝐴.

The transfer function of a given system is unique.

CIE 318: State Space Models A. L. Elshafei 23


UST

Example

Consider the state-space model


𝑥ሶ 1 0 1 𝑥1 2
= 𝑥2 + 𝑢
𝑥ሶ 2 −2 −3 0
𝑥1
𝑦= 1 0 𝑥2
𝑌
Find the transfer function , the poles of the system, and the
𝑈
eigenvalues.
𝑌
The transfer function is = 𝐶 𝑠𝐼 − 𝐴 −1
𝐵+𝐷
𝑈
0 1 2
𝐴= , 𝐵= , 𝐶 = 1 0 , and 𝐷 = 0.
−2 −3 0

CIE 318: State Space Models A. L. Elshafei 24


UST

Example (contd.)

−1 𝑠+3 1
𝑠 −1 −1 𝑠 −1 −2 𝑠
𝑠𝐼 − 𝐴 = → 𝑠𝐼 − 𝐴 = =
2 𝑠+3 2 𝑠+3 𝑠 2 +3𝑠+2

𝑠+3 1
𝑌 −1 𝐵 −2 𝑠 2
= 𝐶 𝑠𝐼 − 𝐴 +𝐷 = 1 0 +0
𝑈 𝑠 2 +3𝑠+2 0

𝑌 2 𝑠+3
= (transfer function)
𝑈 𝑠 2 +3𝑠+2

𝑠 −1
𝑠𝐼 − 𝐴 = = 𝑠 2 + 3𝑠 + 2 = 0 . The eigenvalues are at -2
2 𝑠+3
and -1. The poles are the same as the eigenvalues.

CIE 318: State Space Models A. L. Elshafei 25

You might also like