You are on page 1of 33

MCEN 467 Control Systems

Chapter 2:
Chapter 2:
Dynamic Models
Dynamic Models
Part B: Differential Equations in
State-Variable Form

MCEN 467 Control Systems
Material covered in the PRESENT LECTURE
is shown in yellow
I. DYNAMIC MODELING
Deriving a dynamic model for mechanical, electrical,
electromechanical, fluid- & heat-flow systems
Linearization the dynamic model if necessary
II. DESIGN OF A CONTROLLER: Several design methods exist
1. Classical control or Root Locus Design:
Define the transfer function; Apply root locus, loop shaping,
2. Modern control or State-Space Design:
Convert ODE to state equation; Apply Pole Placement,
Robust control,
3. Nonlinear control: Apply Lyapunovs stability criterion

MCEN 467 Control Systems
Motivations for Deriving the Dynamic
Model in STATE-VARIABLE FORM

Be able to apply the State-Space design method


(more on this later)

Enhances our ability to apply the computational


efficiency of analysis tools such as MATLAB,
since the state-variable form is one of the methods
used for specifying differential equations in
computer-aided control systems design
software packages.

MCEN 467 Control Systems
Foundation

Use of Newtons law typically leads to SECOND-


order differential equations, that is equations
that contain a second derivative of the system
variables such as:

These differential equations also can be expressed as


a set of simultaneous FIRST-order
differential equations.
.. etc , , x



MCEN 467 Control Systems
Foundation - Example

Consider a system composed of a single mass (m), attached to


a spring (k) and a damper (b), submitted to an external force
(u) and characterized by the following dynamic model:

(1) can be rewritten as follows:


u kx x b x m + +

u kx bv v m + +

v x

(1)
(1a)
(1b)
(1) (1a) & (1b)
by defining v as:

MCEN 467 Control Systems
State-Variables: Recall Example

x is the variable that describe any arbitrary position of the


system (also called system variable)

are the state-variables of the system.

Since , the state-variables can be defined as

'

+ +
v x
u kx bv v m


v x

x and x

v and x

MCEN 467 Control Systems
Deriving differential equations in state-variable form
consists of writing them as a vector equation
as follows:
u J X H y
u G X F X
+
+

where is the output


and u is the input
State-Variable Form

MCEN 467 Control Systems
Definitions

is called state of the


system.

X is the state vector. It


contains n elements for an
n
th
-order system, which are
the n state-variables of the
system.
X

1
1
1
1
]
1

n
x
x
x
X

2
1

The constant J is called


direct transmission term
1
1
1
1
]
1

n
x
x
x
X

2
1
I
m
p
o
r
t
a
n
t
Y
o
u

c
a
n

f
o
r
g
e
t

t
h
a
t

MCEN 467 Control Systems
Deriving the State-Variable Form requires to
specify F, G, H, J for a given X and u

[ ]
input the is u and
output the is u J
x
x
x
h h h y where
u
g
g
g
x
x
x
f f
f
f f f
x
x
x
n
H
n
G
n
X
n
F
nn n
n
n
+
1
1
1
1
]
1

1
1
1
1
]
1

+
1
1
1
1
]
1

1
1
1
1
]
1

1
1
1
1
]
1

2
1
2 1
2
1
2
1
1
21
1 12 11
2
1

MCEN 467 Control Systems
Ex 1: Recall the Satellite
Altitude Control Example
Q: Dynamic model
in state-variable
form?
Assumptions:

is the angular velocity

The desired system output is



MCEN 467 Control Systems
Strategy (recommended but not required)
1. Derive the dynamic model.
2. Identify the input control variable, denoted by u.
3. Identify the output variable, denoted by y.
4. Define a state vector, X , having for elements the system
variables and their first derivative.
5. Determine
6. Determine F and G, in manner that
7. Determine H and J, in manner that
X

Gu FX X +

Ju HX y +

MCEN 467 Control Systems
Ex 1: Dynamic Model

Applying Newtons law for 1-D


rotational motion leads to:
=> (1)


I M d F
D c
+
I
M d F
D C
+



MCEN 467 Control Systems
Example 1 (contd)
Given:

The control input, denoted


by u, is given by:

The output, denoted by y, is


the displacement angle:
y =
Assumption:

The state vector, denoted


by X, is defined as:

Known: The dynamic model
(1)
Required: Rewrite (1) as:
D C
M d F u +
I
M d F
D C
+


[ ]

+
1
]
1

1
]
1

+
1
]
1

1
]
1

1
]
1



u and
u y where
u
J
H
G X
F X

1
]
1

with X

MCEN 467 Control Systems
Example 1 (contd)

By definition: . As a result,

Expressing the dynamic model:




as a function of and u (with ) yields:

I
u

I
M d F
D C
+






D c
M d F u +
(1)

MCEN 467 Control Systems
Example 1 (contd)
Available equations:

From the dynamic model:


The output y is defined as:


y =

The input u is given by:


Equivalent form of available eq:
where
and
Therefore:
D C
M d F u +

'

I u

'

+ +
+ +
u ) I (
u
1 0 0
0 1 0

u y + + 0 0 1
D C
M d F u +


[ ]

D C
J
H
G X
F X
M d F u and
u y where
u
I
+
+
1
]
1

1
]
1

+
1
]
1

1
]
1

1
]
1



0 0 1
1
0
0 0
1 0


MCEN 467 Control Systems
Example 1: Dynamic Model in
State-Variable Form
[ ] 0 0 1
1
0
0 0
1 0

1
]
1

1
]
1

J H
I
G F
D C
M d F u
X
+
1
]
1

input
state-variables
By defining X and u as: The state-variable form is given by:

MCEN 467 Control Systems
Ex 1: Recall the
Satellite Altitude Control
Example
Q: Dynamic model
in state-variable
form?
Assumptions:

is the angular velocity

The system output is



MCEN 467 Control Systems
Example 1: Dynamic Model in
State-Variable Form
[ ] 0 1 0
1
0
0 0
1 0

1
]
1

1
]
1

J H
I
G F
D C
M d F u
X
+
1
]
1

By defining X and u as: The state-variable form is given by:


Only change

MCEN 467 Control Systems
Analysis in Control Systems

Step 1: Derive a dynamic model

Step 2: Specifying the dynamic model to software by


writing it
in STATE-VARIABLE form
in terms of its TRANSFER FUNCTION
(see chapter 3)
either
or

MCEN 467 Control Systems
Example 2: Cruise Control Step Response

Q1: Rewrite the


equation of motion in
state-variable form
where the output is the
car velocity v ?

Q2: Use MATLAB to find the step response of the


velocity of the car ?
Assume that the input jumps from being u(t) = 0 N at time
t = 0 sec to a constant u(t) = 500 N thereafter.

MCEN 467 Control Systems
Reminder: Strategy
1. Derive the dynamic model.
2. Identify the input control variable, denoted by u.
3. Identify the output variable, denoted by y.
4. Define a state vector, X , having for elements the system
variables and their first derivative.
5. Determine
6. Determine F and G, in manner that
7. Determine H and J, in manner that
X

Gu FX X +

Ju HX y +

MCEN 467 Control Systems
Ex 2, Q1:Dynamic Model

Applying Newtons law


for translational motion
yields:
(2)
m
u
x
m
b
x +

x m u x b

+
=>

MCEN 467 Control Systems
Example 2, Question 1 (contd)
Given:

The input ( = external force


applied to the system) is
denoted by u

The output, denoted by y, is


the cars velocity:
y = v
Assumption:

The state-vector is defined


as:
Known: The dynamic model
(2)
Required: Rewrite (2) as:
m
u
x
m
b
x +


[ ]

+
1
]
1

1
]
1

+
1
]
1

1
]
1

1
]
1



u and
u
v
x
y where
u
v
x
v
x
J
H
G X
F X

x v with
v
x
X

1
]
1


MCEN 467 Control Systems
Example 1 (contd)

By definition: . As a result,

Expressing the dynamic model:




as a function of v and u leads to:

v x

y x


(2)
m
u
v
m
b
v +

m
u
x
m
b
x +


MCEN 467 Control Systems
Ex 2, Q1 (contd)
Available equations:

From the dynamic model:


The output y is defined as:


y = v

The input is the step


function u
Equivalent form of available eq:

where

Therefore:

'

m
u
v
m
b
v
v x

'

,
_

,
_


+
+ +
u
m
v
m
b
x v
u v x x
1
0
0 1 0

u v x y + + 0 1 0

[ ]

u
v
x
y where
u
m v
x
m b v
x
J
H
G
X
F X
+
1
]
1

1
]
1

+
1
]
1

1
]
1

1
]
1


0 1 0
1
0
0
1 0


MCEN 467 Control Systems
Example 2, Question 1: Dynamic Model
in State-Variable Form
By defining X as: The state-variable form is given by:
[ ] 0 1 0
1
0
0
1 0

1
]
1

1
]
1

J H
m
G
m b
F
1
]
1

v
x
X

MCEN 467 Control Systems
Example 2, Question2: Step Response
using MATLAB?
[ ] 0 1 0
001 0
0
05 0 0
1 0

1
]
1

1
]
1

J H
.
G
.
F
Assumptions: m = 1000 kg and b = 50 N.sec/m.

MCEN 467 Control Systems
Ex 2, Q2: Step Response with MATLAB?

The step function in MATLAB calculates the time


response of a linear system to a unit step input.

In the problem at hand, the input u is a step function of


amplitude 500 N:
u = 500 * unity step function.

Because the system is linear ( ):


G * u = (500 * G) * unity step function
G * Step 0 to 500 N 500*G * Step 0 to 1 N
Gu FX X +


MCEN 467 Control Systems
MATLAB Statements
F = [0 1;0 -0.05];
G = [0;0.001];
H = [0 1];
J = 0;
sys = ss(F, 500*G, H, J);
t = 0:0.2:100;
y = step(sys,t);
plot (t,y)
% defines state variable matrices
% defines system by its state-
space matrices
% setup time vector ( dt = 0.2 sec)
% computes the response to a
unity step response
% plots output (i.e., step response)

MCEN 467 Control Systems
Response of the car velocity to a
step input u of amplitude 500 N

MCEN 467 Control Systems
Example 3: Flexible Disk-Drive
Q: Find the state-variable
form of the differential
equations describing the
dynamics of the system if
the output is the
rotation angle
2
?
Note: Define the state vector to be
[ ]
T
X
2 2 1 1


MCEN 467 Control Systems
Example 3: Dynamic Model

Newtons law for 1-D


rotational motion
yields to:
( )
( )

'

+
+
+
) (
I
k
I
b
I
M M
) (
I
k
I
b
D C
2 1
2
2 1
2
2
1
2 1
1
2 1
1
1





MCEN 467 Control Systems
Example 3: Dynamic Model
in State-Variable Form
[ ]
D C
T
M M u X +
2 2 1 1


[ ] 0 0 1 0 0
0
0
1
0
1 0 0 0
0 0 1 0
1
2 2 2 2
1 1 1 1

1
1
1
1
]
1

1
1
1
1
]
1

J H
I
G
I b I k I b I k
I b I k I b I k
F
By defining X and u as:
The state-variable form is given by:

You might also like