Beruflich Dokumente
Kultur Dokumente
TIME EVOLUTION
OF DYNAMIC SYSTEMS
Claudio Melchiorri
Summary
!
R1 1
ẋ!1 ẋ = =−− Rx1 + u
L 1 x1 +L1 u
1
y y = =R1Rx11Lx1 L
PROBLEM: Computation of the time-evolution of the state x(t) of a
dynamic system
1 1 11
! !
ẋ2 ẋ2= =− −
CRCR
x x
2 +
2 +CR
CR
uu
u Σ y y= y =x2x2
2 2 22
input output
x state
u Σ y
input output
x state
Then, we have:
1. Single-Input Single-Output (SISO) systems
if p=q=1
• Linear models
Time invariant Time variant
x(0)
u f x + y
B C
+
D
u : input; y : output; f : forcing action; x : state
A : system matrix
B : input distribution matrix
C : output distribution matrix
D : algebraic input/output connection matrix
t1 t2 t3 t
trajectory
t
x(t) Set of the admissible velocities
x(0)
State space
Example
Two dof robot θi: joint variable
τi: joint torque
mi: link’s mass
ai: link’s length
θ2 aci: centre of mass position
Ii: inertia
θ1 g: gravity acceleration
Si, Ci: sin(θi), cos(θi)
Not simple ! ! ! ! …
Same problem as
Function h: 0.5
1
Rectangle rule: 3.00236726015005
0.8 Trapezoidal rule: 2.85542094707693
Simpson rule: 2.87929762575957
0.6
0.4
h: 0.25
Rectangle rule: 2.94669069425499
0.2 Trapezoidal rule: 2.87321753771844
Simpson rule: 2.87914973459894
0
h: 0.1
Rectangle rule: 2.90758196912244
-0.2
h: 0.0001
Rectangle rule: 2.87916935623558
Trapezoidal rule: 2.87913996697296
Simpson rule: 2.87913996792015
C. Melchiorri (DEI) Automatic Control & System Theory 10
AC&ST
These are the first two elements of the Taylor series expression of function
x(ti+1):
with
Since it is linear, the decomposition property holds for both the motion
and response functions
• From
x(t) is a n x 1 vector
A(t) is a n x n matrix whose elements are piecewise continuous functions
• Let us define the State transition matrix Φ(t, t0) as the (unique) solution of
the matrix differential equation
• Peano-Baker succession
Matrix functions
• Given a m x n matrix whose elements are functions of time
Example:
• Theorem: The solution of (2), given the input function u(t) piecewise
continuous in [t0, t1] and initial conditions x0, t0, is
one obtains (= 0)
Z t
d (t, t0 ) d (t, )
ẋ(t) = x(t0 ) + (t, t)B(t)u(t) + B( )u( )d
dt t0 dt
Z t
= A(t) (t, t0 )x(t0 ) + B(t)u(t) + A(t) (t, )B( )u( )d
t0
Z t
= A(t) (t, t0 )x(t0 ) + (t, )B( )u( )d +B(t)u(t)
t0
| {z }
x(t)
and, by integration Z t
1 1
(t, t0 )x(t) = c + (t, t0 )B( )u( )d
t0
where c is a constant vector depending on the initial conditions. By exploiting
the composition and inversion properties of Φ the proof is concluded.
u f x + y
B(t) C(t)
+
D(t)
These functions define the effect at time t on the state or on the output
of an impulse applied at time τ
Dirac Impulse
Dirac impulse
Δ(τ,t0,t)
This piecewise continuous function, if τ
1/τ tends to zero, is a signal with infinite
amplitude and unitary area.
It is indicated as δ(t-t0) or δ(t) if t0 = 0
t
t0 t0 + τ
We also define
Z t2 Z t2
(t t0 )dt := lim (⇥, t0 , t)dt = 1
t1 !0 t1
Dirac Impulse
Let us consider now a purely dynamic system, i.e. D(t)=0, with zero initial
state.
If a Dirac impulse is applied to the i-th input, and all the other inputs are
null, then
Z t
yi (t) = W (t, ⇥ ) ei (t t0 )d⇥ = W (t, t0 ) ei i = 1, . . . , p
t0
Hence each single column of W(t, t0) represents the system response to
a Dirac impulse applied at t0 to each single input.
Dirac Impulse
If a Dirac impulse is applied at the input, then for the following system
one obtains x(t) = Φ(t, τ)
In fact, since x(t) = Φ(t, t0) x(t0), it is possible to see that an impulsive
input is equivalent (from the point of view of the state time-evolution) to
an initial state (for continuous time systems).
Dirac Impulse
• Therefore:
(
x(t) = Ax(t) + Bu(t)
y(t) = Cx(t) + Du(t)
while
det(λ I - A) = 0 eigenvalue
(λ I - A) x = 0 eigenvector
c1 3
=
c2 1
(1)
This equation admits nontrivial solutions x ≠ 0 if and only if (λ I - A) is singular, that is:
(2)
• The left-hand side member is a polynomial q(λ) with order n called characteristic
polynomial of A. If A is real, its coefficients are real as well
• Eq. (2) is called characteristic equation of A and admits n roots λ1, …, λn , in general
complex, called eigenvalues or characteristic values of A
• The set σ(A) = ⎨λ1, …, λn⎬ of all the eigenvalues of A is called the spectrum of A
Impossibile visualizzare l'immagine. La memoria del computer potrebbe essere insufficiente per aprire l'immagine oppure l'immagine potrebbe essere
2
danneggiata. Riavviare il computer e aprire di nuovo il file. Se viene visualizzata di nuovo la x rossa, potrebbe essere necessario eliminare l'immagine e
inserirla di nuovo.
Impossibile visualizzare l'immagine. La memoria del computer potrebbe essere insufficiente per aprire
l'immagine oppure l'immagine potrebbe essere danneggiata. Riavviare il computer e aprire di nuovo il file. Se
viene visualizzata di nuovo la x rossa, potrebbe essere necessario eliminare l'immagine e inserirla di nuovo.
0
-1
Impossibile visualizzare l'immagine. La memoria del computer potrebbe essere insufficiente per aprire l'immagine oppure
l'immagine potrebbe essere danneggiata. Riavviare il computer e aprire di nuovo il file. Se viene visualizzata di nuovo la x
rossa, potrebbe essere necessario eliminare l'immagine e inserirla di nuovo.
-2
-3
-3 -2 -1 0 1 2 3
C. Melchiorri (DEI) Automatic Control & System Theory 38
AC&ST
• Example
[V, D] = eig(A)
• sempio
[V, D] = eig(A)
-1
-2
-3 -3 -2 -1 0 1 2 3
Similar matrices
• Two matrices A and B are similar if there exists a non-singular matrix T such that
• Similar matrices have the same eigenvalues. In fact, from B = T-1 A T with T non
singular, it follows that
• The similarity property allows to solve in a simple manner a LTI homogeneous system
Similar matrices
• An important case is the transformation matrix T that transforms a generic square
matrix A in Jordan form, very convenient for the analysis of dynamic systems.
• In fact, given a generic matrix A, if it is possible to determine a `similar’ matrix B
such that the corresponding matrix exponential eB t is simple to be computed, then
one obtains
Eigenvectors
by defining T = [t1, …, tn] one obtains A T = T Λ , being Λ a diagonal matrix with
the eigenvalues on the diagonal. Therefore
Then:
and
In this way it is simple to compute the solution z(t) from z0, and then the solution x(t) of
the original problem (being z = T-1 x , then z0 = T-1 x0)
Similar matrices
Block diagonal
matrix
Where Ji,j, the Jordan block corresponding to the eigenvalue λi, is defined as
N.B.:
Or, equivalently
trajectory
t
x(t)
Set of the admissible
velocities
x(0)
State space
Example 1
Problem. Determine the solution x(t) of the dynamic system described by
In this case:
and then
This results could also have been obtained by noticing that matrix A is lower triangular,
and therefore its eigenvalues are the elements of the diagonal.
C. Melchiorri (DEI) Automatic Control & System Theory 52
AC&ST
Example 1
• Computation of the eigenvectors
Let t be the generic eigenvector associated to the eigenvalue λ. The following equation
must hold
Then:
• if λ = -1
• if λ = -2
Example 1
• Therefore
Check:
Example 1
Then:
• Simulation in Matlab/Simulink
x
x' = Ax+Bu
y
y = Cx+Du
Step State-Space To Workspace
T
x' = Ax+Bu
K*u y1
t y = Cx+Du
To Workspace3
C. Melchiorri (DEI) Automatic Control & System Theory 55
AC&ST
Example 1 Plot of z
Plot of x
1.2 2
1
1.5
0.8
1
0.6
0.5
0.4
0
0.2
0 -0.5
-0.2
0 2 4 6 8 10 -1
Time (sec) 0 2 4 Time (sec) 6 8 10
Plot of T z
1.2
0.8
0.4
0.2
-0.2
0 2 4 6 8 10
Time (sec)
C. Melchiorri (DEI) Automatic Control & System Theory 56
AC&ST
Example 2
Problem. Determine the solution x(t) of the dynamic system described by
In this case:
and then
Example 2
• Computation of the eigenvectors
Let t be the generic eigenvector associated to the eigenvalue λ., then (λΙ -Α) t = 0 and therefore:
• If λ = -1
• If λ = -2
• If λ = -3
Example 2
Therefore
Check:
Example 2
• Therefore, the solution of the new system (in z) is given by
Then:
• Simulation in Matlab/Simulink
x' = Ax+Bu
y
y = Cx+Du
Step State-Space To Workspace
x' = Ax+Bu
K*u y1
t y = Cx+Du
To Workspace3
C. Melchiorri (DEI) Automatic Control & System Theory 60
AC&ST
Example 2
Plot of x Plot of z
1.4 2
1.5
1.2
1
1
0.5
0.8
0
0.6 -0.5
0.4 -1
0.2 -1.5
0 -2
-0.2 -2.5
-3
-0.4 0 2 4 6 8 10
0 2 4 6 8 10 Time (sec)
Time (sec) Plot of T z
1.4
1.2
Time evolution of [x1; x2 ; x3] 1
0.8
Time evolution of [z1; z2 ; z3]
0.6
0.4
0.2
0
• As in the continuous time case, let define the state transition matrix
Φ(k,h) as the matrix whose columns are the n solutions
corresponding to the initial conditions x(h) = ei, being ei the i-th
column of the identity matrix. The transition matrix satisfies
• For a discrete time system, the transition matrix can be singular (in the
continuous time case, it is always non singular).
In fact
One obtains
Distinct eigenvalues
The system evolution is given by linearly independent terms since the eigenvalues λ1, …, λn are
distinct.
eλ1 t, …, eλn t λ1k, …, λnk
λi eigenvalue
µi multiplicity
λi eigenvalue
µi multiplicity
Stability
• Definition: The homogeneous system
is asymptotically stable if
NB: also the factors tn eλ t tend to 0 if t -> ∞ if the real part of λ is negative
C. Melchiorri (DEI) Automatic Control & System Theory 69
AC&ST
Stability
• Definition: The homogeneous system
is asymptotically stable if
Appendix
• Main definitions
• Some geometric properties
e2 AV⊆V
h3 h2
• If vector x contains the coordinates of point p in the
main basis, and z its coordinates in the new one, then
x = T z, z = T-1 x
e2
h1 • In the new basis, the n x n matrix A corresponds to
e1 A1 = T-1 A T
Pseudoinverse of a matrix
• Let consider a linear system defined by
Ax=b
Necessary and Sufficient Condition for the existence of at least
a solution is that
b ∈ im A (1)
Pseudoinverse of a matrix
• If (1) is not verified, it is possible to compute the value of x so
that the error (in norm) is minimized
|| A x1 – b||2 minimum
im A
A-1
C. Melchiorri (DEI) Automatic Control & System Theory 75
AC&ST
Pseudoinverse of a matrix
• If A is not square or it is singular, then its inverse does not exist and it is necessary
to use the pseudoinverse A+
• Given the m x n matrix A, there are two possibilities: 1) m < n; 2) m > n
1) m < n rank A = min(m,n) = m ➝ im(A) = Rm
∀ b ∈ im(A) ∃ x s.t. b = A x (more than one!)
x = A+ b ∃ ker(A) s.t. ∀ x ∈ ker(A) ➝ y = A x = 0
➝ x = A+ b + xn ➝ b = A(A+ b + xn) = b, ∀ xn ∈ ker(A)
➝ x = A+ b + (I – A+ A) α general expression of the solution
x = A+ b has minimun norm
A
Rn
0 Rm
ker A im {A}
A+
Automatic Control & System Theory
C. Melchiorri (DEI) 76
AC&ST
Pseudoinverse of a matrix
• If A is not square or it is singular, then its inverse does not exist and it is necessary
to use the pseudoinverse A+
• Given the m x n matrix A, there are two possibilities: 1) m < n; 2) m > n
2) m > n rank A = min(m,n) = n
∀ x ∃ ! b s.t. b = A x
∀ b ∈ im(A) ∃ ! x s.t. b = A x (x = A+ b)
if b ∉ im (A) ➝ ∄ x s.t. b = A x
but if b0 ∉ im (A) ➝ ∃ x0 = A+ b0 ➝ b = A x0 = A A+ b0 ≠ b0 (A A+ ≠ I)
|| b – b0 || is minimum
A
Rn
Rm
im{A}
A+
C. Melchiorri (DEI) Automatic Control & System Theory 77
AC&ST
Pseudoinverse of a matrix
x0 ker AT
b
ker A x
x0
Rn im A
im AT Rm
Positive homogeneity
Triangle inequality
2-norm
p-norm
Also called Sup-norm
gives the peak value
infinity-norm
C. Melchiorri (DEI) Automatic Control & System Theory 79
AC&ST
• Lemma: Let ||x||a and ||x||b be two norms of x ∈ Rn. There exists
an infinite number of positive scalar k1, k2 such that
The norms ||.||a and ||.||b are said to be equivalent. This property
holds between any pair of norms in Rn.
• Example:
⇥ A⇥ = | | ⇥A⇥,
• It follows that:
column sum
Frobenius norm
If
Definition
The characteristic polynomial of A is the polynomial of order n
Definition
The characteristic equation of A is the equation
Definition
The n solutions of the characteristic equation are the eigenvalues of A