0% found this document useful (0 votes)
29 views28 pages

System and Control - Lecture of Systems in Time Domain

This document provides an introduction to linear dynamical models and state space representations. It discusses linear differential equations and how they can be used to model systems. It also introduces homogeneous solutions and stability characteristics as well as transforming systems to state space form.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views28 pages

System and Control - Lecture of Systems in Time Domain

This document provides an introduction to linear dynamical models and state space representations. It discusses linear differential equations and how they can be used to model systems. It also introduces homogeneous solutions and stability characteristics as well as transforming systems to state space form.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

Introduction Linear dynamical models State space Exercises

Linear dynamical models | State space

Sebastiaan Mulders & Sander Bregman & Jan-Willem van Wingerden

Delft Center for Systems and Control, Delft University, 2628 CD, the Netherlands
[email protected]

WB3240, 2023-2024

DCSC (DCSC, TU Delft) 1 / 28


Introduction Linear dynamical models State space Exercises

Introduction

Sebastiaan Mulders, 33 y/o, Rotterdam


Assistant professor at DCSC, TU Delft
BSc: Mechanical Engineering (3mE, TUD)
MSc: Systems and Control (DCSC, TUD)
PhD: Wind turbine control (DCSC, TUD)
Postdoc: Learning control for wind turbines
(DCSC, TUD)
Research: Control for large flexible wind turbines
and co-design using machine learning techniques

DCSC (DCSC, TU Delft) 2 / 28


Introduction Linear dynamical models State space Exercises

My goal and approach

GOAL: Provide lectures to bring control to life! Control is a difficult and abstract subject, but
incredibly powerful. My goal is to inspire you.
I will be:
• Providing context on topics
• Explaining fundamental theory
• Working out examples together
• Showing numerical examples in Python code
• Demonstrating on practical setups

Feedback is always appreciated! Feel free to contact me


directly after the lecture or by e-mail.

DCSC (DCSC, TU Delft) 3 / 28


Introduction Linear dynamical models State space Exercises

Meaning of colored blocks (below are examples)


Theory or definition
The unit step signal u(t) is zero for negative arguments and one for positive arguments, and is
defined as: (
1, t ≥ 0
u(t) :=
0, t < 0

Notes, further information, or insights


The step signal is an important signal used for analysis of many systems, as it gives information
about how quickly the system responds to a sudden change in the input signal (step response).

Question or exercise
Provide a step signal definition with a final value of 3, starting at t = 2. Draw the signal.

DCSC (DCSC, TU Delft) 4 / 28


Introduction Linear dynamical models State space Exercises

The landscape of control

Map courtesy of Brian Douglas


Learn about more advanced
control in the master Systems
and Control!

Additional control material:


Control videos: Steve Brunton
Control lectures: Brian Douglas

DCSC (DCSC, TU Delft) 5 / 28


Introduction Linear dynamical models State space Exercises

Preliminary outline - Upcoming weeks

In the coming 4 weeks, we will discuss dynamical systems and time-domain control:
• Lecture 2: Introduction | Linear dynamical models, State space
• Lecture 3: State space, Simulation, Block diagrams, Phase portraits, Linearization
• Lecture 4: Equilibrium points, Stability, Diagonal dynamics, Examples

• Lecture 5: I/O responses, Reachability, State-feedback control


• Lecture 6: Reference gain, Integral action
• Lecture 7: Design considerations, Linear-quadratic regulators (LQR)
• Lecture 8: Observers | Wrap-up time-domain control: Questions, live demo, examples

See Vakplanning on BrightSpace for the corresponding book chapters

DCSC (DCSC, TU Delft) 6 / 28


Introduction Linear dynamical models State space Exercises

Practicalities - Announcements

• English vs. Dutch


• Book chapter order vs. Lectures
• Assignments: This week still Block 0 (prior knowledge, non-graded), next week Block A.
Enroll in a group!
• Separate written reports for Block A and B; assignment in Vocareum. See BrightSpace
Content – Vakinformatie for more information!
• Any questions?

DCSC (DCSC, TU Delft) 7 / 28


Introduction Linear dynamical models State space Exercises

Linear dynamical models


Book – Section 2.2

DCSC (DCSC, TU Delft) 8 / 28


Introduction Linear dynamical models State space Exercises

Learning objectives

After this lecture, you should be able to:

• Explain what a linear time-invariant (LTI) system is

• Find the analytical solution for a homogeneous differential equation

• Analyze the (stability) characteristics of a system and relate to exponential signals

• Transform system differential equation(s) into state space representation

DCSC (DCSC, TU Delft) 9 / 28


Introduction Linear dynamical models State space Exercises

Linear differential equations


The input-output behavior of systems can, in many practical situations, be modeled
(approximated) by the linear differential equation of the following form:

dn y dn−1 y dm u dm−1 u
n
+ a1 n−1 + · · · + an y = b0 m + b1 m−1 + · · · + bm u,
dt dt dt dt
with u the input, y the output, coefficients {ak , bk } ∈ R, and n the system order.

Linear-time invariant (LTI) systems


A linear differential equation is considered linear when {u1 (t), y1 (t)} and {u2 (t), y2 (t)} satisfy
the equation, and so do αu1 + βu2 and αy1 + βy2 with {α, β} ∈ R.
It is time-invariant when both the pairs {u(t), y(t)} and {u(t + τ ), y(t + τ )} satisfy the
equation. In other words, the output response does not depend on when the input is applied.

DCSC (DCSC, TU Delft) 10 / 28


Introduction Linear dynamical models State space Exercises

Homogeneous differential equation


Consider the following input-independent linear homogeneous differential equation

dn y dn−1 y
+ a1 + · · · + an y = 0.
dtn dtn−1

The homogeneous differential equation is characterized by the characteristic polynomial

a(s) = sn + a1 sn−1 + · · · + an

Derive the characteristic polynomial a(s) from the homogeneous differential equation.

We will often consider initial value problems (IVPs), of which the solution results from the
considered differential equation together with an initial condition.

DCSC (DCSC, TU Delft) 11 / 28


Introduction Linear dynamical models State space Exercises

Homogeneous solution and stability


The analytical solution to the input-independent homogeneous equation

dn y dn−1 y
+ a1 + · · · + an y = 0,
dtn dtn−1
is of the form
n
X
y(t) = Ck esk t ,
k=1

with sk the unique roots of the characteristic equation a(s) = 0, and the coefficients Ck are
determined through the initial conditions at t = 0.
When all solutions of the homogenous equation go to 0, the system is stable. Stability is
determined by the solutions (roots) of a(s) = 0, for which it is required that all roots have
negative real parts, i.e., Re{sk } < 0.

DCSC (DCSC, TU Delft) 12 / 28


Introduction Linear dynamical models State space Exercises

Example: Homogeneous solution for a mass-spring-damper system

Mass-spring-damper system linear


differential equation:

mq̈(t) + cq̇(t) + kq(t) = u(t)

m = 1, c = 7, k = 12
q(0) = 4, q̇(0) = 8, u(t) = 0

1. Propose a symbolic solution q(t) for a system with unique roots of a(s).
2. Find the characteristic polynomial a(s). Is this system stable, why?
3. Find the analytical solution q(t) for the given system parameters and initial conditions.
4. What parameter changes would destabilize the system? Could an input attain this?

DCSC (DCSC, TU Delft) 13 / 28


Introduction Linear dynamical models State space Exercises

Solution: Homogeneous solution for a mass-spring-damper system

1 Propose a symbolic solution q(t):


Because the system has unique roots and is of order n = 2, a solution to the homogeneous
differential equation is:
q(t) = c1 es1 t + c2 es2 t ,
and we directly define q̇(t) = s1 c1 es1 t + s2 c2 es2 t , which we will need later on.
2 Find the characteristic polynomial a(s):

a(s) = s2 + cs + k = s2 + 7s + 12 = (s + 3)(s + 4)

So the roots of the characteristic equation are s1 = −3 and s2 = −4. All Re{sk } < 0, so
the system is stable.

DCSC (DCSC, TU Delft) 14 / 28


Introduction Linear dynamical models State space Exercises

Solution: Homogeneous solution for a mass-spring-damper system


3 Find the analytical solution q(t) for the given system:
With the roots of a(s), proposed solutions q(t) (and q̇(t)), and initial conditions q(0), q̇(0)
at hand, we can determine the coefficients c1 and c2 :

q(0) = c1 + c2 = 4, q̇(0) = −3c1 − 4c2 = 8

Rewite in matrix-vector form, and solve by least squares (matrix inversion):


        
1 1 c1 4 c1 24
= → =
−3 −4 c2 8 c2 −20

So the analytic solution is: q(t) = 24e−3t − 20e−4t


4 Parameter changes or inputs that would destabilize the system: Making the
damping c or spring constant k negative, this would be possible by feeding back the
position q of velocity q̇ as the system input u(t).

DCSC (DCSC, TU Delft) 15 / 28


Introduction Linear dynamical models State space Exercises

Exponential signals
When the coefficients ak are real, the roots sk ∈ C of the characteristic equation are either
real-valued or complex-conjugate pairs.

For real-valued sk = σ, the solution


y(t) = eσt exponentially decreases
(σ < 0), exponentially increases (σ > 0),
or remains constant (σ = 0).
For complex-valued sk,k+1 = σ ± iω, the
solution y(t) = e(σ±iω)t =
eσt eiωt + e−iωt = eσt (2 cos ωt), shows
similar behavior in an oscillatory fashion.
The time constant T = 1/Re{sk } defines
how quickly the signal decays.

DCSC (DCSC, TU Delft) 16 / 28


Introduction Linear dynamical models State space Exercises

Routh-Hurwitz stability criterion


It is often difficult to analytically compute the roots for higher-order polynomials. The
Routh-Hurwitz stability criterion provides a means to verify system stability by inspection of
the characteristic equation a(s) and without explicit calculations.

Routh-Hurwitz stability criterion


The Routh-Hurwitz stability prescribes stability by ensuring that all roots have negative real
parts (Re{sk } < 0) for the characteristic equation

a(s) = sn + a1 sn−1 + · · · + an ,

when the following conditions are met for polynomials of first-order: {a1 > 0},
second-order: {a1 > 0, a2 > 0}, and third-order: {a1 , a2 , a3 > 0} and {a1 a2 > a3 }.

Are systems with the following characteristic polynomials stable?


[1] s − 2, [2] s2 + 2s + 3, [3] s3 + 2s2 + 3s + 8, [4] s3 + 2s2 + 3s + 2
DCSC (DCSC, TU Delft) 17 / 28
Introduction Linear dynamical models State space Exercises

Particular solution
We shall now revert to the originally defined linear differential equation

dn y dn−1 y dm u dm−1 u
n
+ a1 n−1 + · · · + an y = b0 m + b1 m−1 + · · · + bm u,
dt dt dt dt
Given the exponential input u(t) = est , let us investigate the unique particular solution of the
form y(t) = G(s)est .

The solution to the linear differential equation is the summation of the homogeneous solution
(input-independent, first term), and the particular solution (input-dependent, second term):
m
X b(s) b0 sm + b1 sm−1 + · · · + bm
y(t) = Ck (t)esk t + G(s)u(t), G(s) = =
a(s) sn + a1 sn−1 + · · · + an
k=1

with G(s) being the system’s transfer function a complete and shorthand characterization of
the linear differential equation, describing the particular solution for the input u(t) = est .

DCSC (DCSC, TU Delft) 18 / 28


Introduction Linear dynamical models State space Exercises

State space models


Book – Sections 3.1, 3.2

DCSC (DCSC, TU Delft) 19 / 28


Introduction Linear dynamical models State space Exercises

State space representation


In the state-space system representation, higher-order (and possibly nonlinear) differential
equations are split into multiple first-order ODEs:

ẋ(t) = f (x(t), u(t))


y(t) = h(x(t), u(t))

where f : Rn × Rp → Rn is the state equation, and h : Rn × Rp → Rq the output equation.

State vector
The state vector x ∈ Rn contains time-dependent variables and determines the present
internal behavior (condition) of the system. State information completely captures the system’s
past, allowing to predict future system output(s) of the system, given future input(s).
The dimension n of the state vector is called the order of the model.

DCSC (DCSC, TU Delft) 20 / 28


Introduction Linear dynamical models State space Exercises

State space representation


In the state-space system representation, higher-order (and possibly nonlinear) differential
equations are split into multiple first-order ODEs:
ẋ(t) = f (x(t), u(t))
y(t) = h(x(t), u(t))
where f : R × R → R is the state equation, and h : Rn × Rp → Rq the output equation.
n p n

Using the state space representation, an n-th order system with p inputs and q outputs is
represented by n first-order differential equations with n states.

In this way, we end up with:


       
ẋ1 f1 (x, u) y1 h1 (x, u)
 ẋ2   f2 (x, u)  y2  h2 (x, u)
 ..  =  ..  ..  =  ..
       
 .   . .  .
 
 
ẋn fn (x, u) yq hq (x, u)
DCSC (DCSC, TU Delft) 21 / 28
Introduction Linear dynamical models State space Exercises

Pendulum and mass-spring-damper systems to state space (1/2)


ẋ(t) = f (x(t), u(t))
y(t) = h(x(t), u(t))

g b
θ̈ = − sin θ − θ̇ [1]
mq̈ + cq̇ + kq = F
l ml

DCSC (DCSC, TU Delft) 22 / 28


Introduction Linear dynamical models State space Exercises

Simulating state-space models

In simulation software libraries,


state space is the standard expected
form for simulation (prediction) of
the state evolution given an initial
condition x0 and input u.

Show a numerical solver


implementation for a nonlinear state
space pendulum model with
damping

DCSC (DCSC, TU Delft) 23 / 28


Introduction Linear dynamical models State space Exercises

Exercises: State space

DCSC (DCSC, TU Delft) 24 / 28


Introduction Linear dynamical models State space Exercises

Exercise 1: Rewriting a first-order ODE to state space


Given the following ODE representing a dynamical system

3Ω̇(t) + 9Ω(t) = 6u(t).

Determine the state space representation by finding expressions for f and h, with the input
u(t) = F (t) and measuring Ω(t).

Note that this is a first-order system. What is the system order n? How many does states the
system consequently have? Can we therefore speak of a state vector ?

The one-dimensional (n = 1) state vector x ∈ R1 is uniquely defined as x(t) = [Ω(t)] = Ω(t).


The system can be written in state space as follows:

ẋ = f (x, u) = −3x + 2u
y = h(x, u) = x
DCSC (DCSC, TU Delft) 25 / 28
Introduction Linear dynamical models State space Exercises

Exercise 2: Rewriting a second-order ODE to state space


Given the following ODE representing a dynamical system

2q̈ + 8q̇ + 4q = 6u.

Determine the state space representation by finding expressions for f and h, by choosing the
state variables as x1 = q̇ and x2 = q, control input u, and measuring q̇.

The two-dimensional (n = 2) state vector x ∈ R2 is chosen as x = [x1 , x2 ] = [q̇, q] . Now,


> >

the system can be written as follows:


     
ẋ1 f1 (x, u) −4x1 − 2x2 + 3u
ẋ = f (x, u) = = =
ẋ2 f2 (x, u) x1
y = h(x, u) = x1

Now define the state vector as x = [x1 , x2 ] = [q, q̇] ; same input and output. What changes?
> >

Is this state space system linear?


DCSC (DCSC, TU Delft) 26 / 28
Introduction Linear dynamical models State space Exercises

Exercise 3: Rewriting a second-order ODE to state space


Given is the following ODE representing a dynamical system

q̈ + 5q̇ 3 − 3q = 4u.

Determine the state space representation by finding expressions for f and h, by choosing the
state variables as x1 = q and x2 = q̇, control input u, and measuring q.

The two-dimensional (n = 2) state vector x ∈ R2 is defined as x = [x1 , x2 ] = [q, q̇] . Now,


> >

the system can be written as follows:


     
ẋ f (x, u) x2
ẋ = f (x, u) = 1 = 1 =
ẋ2 f2 (x, u) −5x32 + 3x1 + 4u
y = h(x, u) = x1
Is this state space system linear?

DCSC (DCSC, TU Delft) 27 / 28


Introduction Linear dynamical models State space Exercises

Exercise 4: Rewriting a third-order ODE to state space


Given is the following third-order ODE
...
q + 9q̇ 3 q − sin q̇ = u.

determine a state space representation by finding f and h for this system (measuring q).

The three-dimensional (n = 3) state vector x ∈ R3 is defined as


x = [x1 , x2 , x3 ] = [q̈, q̇, q] . Now, the system can be written as follows:
> >

−9x32 x3 + sin x2 + u
     
ẋ1 f1 (x, u)
ẋ = f (x, u) = ẋ2  = f2 (x, u) =  x1 
ẋ3 f3 (x, u) x2
y = h(x, u) = x3
Is this state space system linear?

DCSC (DCSC, TU Delft) 28 / 28

You might also like