Conversion of transfer function to canonical state variable models
-
Upload
self-employed -
Category
Engineering
-
view
1.459 -
download
1
Transcript of Conversion of transfer function to canonical state variable models
Conversion of transfer function to
canonical state variable models
Presented by:
JYOTI SINGH
ME (I &C)
REGULAR (142511)
Contents
• Introduction
• First Companion Form
• Second Companion Form
• Jordan Canonical Form
• Computing Standard Forms in MATLAB
Introduction
• Realization of transfer function into state variable models is needed even if the
control system design based on frequency-domain design method.
• In these cases the need arises for the purpose of transient response simulation.
• But there is not much software for the numerical inversion of Laplace transform.
• So one ways is to convert transfer function of the system to state variable
description and numerically integrating the resulting differential equations rather
than attempting to compute the inverse Laplace transform by numerical method.
There are three problems involved in realization of a given transfer function into state
variable models.
1. Is it possible to obtain state variable description from the given transfer function?
2. If yes , is the state variable description unique for a given transfer function?
3. How do we obtain the state variable description from the given transfer function?
Answer 1: Yes it is possible if and only if G(s) is a proper rational function.
A proper rational transfer function will have state
ẋ (t) = A x(t) + B u(t)
y (t) = C x(t) + D u(t)
A strictly proper rational function will have state model of the form
ẋ (t) = A x(t) + B u(t)
y (t) = C x(t)
(1)
(2)
Answer 2: There are numerable system that have same transfer function so the
representation of a transfer function in state variable form is obviously not unique.
Answer 3: There are three standard or canonical representation of transfer functions.
• A LTI-SISO system is described by transfer function of the form
where αi and βi are real constant scalar .
• We now drive the result for m=n ; then use it for m<n by setting appropriate βi
coefficients equal to zero.
• So we have to obtain state variable model corresponding to the transfer function
nm
nsnsnmsmsm
sG
;
......11
........110)(
nsnsnnsnsn
sG
......11
........110)( (3)
First Companion Form
• Let us consider a transfer function in the form
)()()......11( sUsZnsnsn
nsnsnsU
sZ
......11
1
)(
)(
)()(......)(11)( tutzntzpntzpn
where
tkd
tzd ktzpk )()(
• Now solving for highest derivative of z(t) we get the equation
(4)
which can be written as
• The corresponding differential equation is
α2α1 αn-1 αn
+
+
+
+
+
+
+
upnz pn-1z pn-2z pz z
-
)()(......)(11)( tutzntzpntzpn
After realizing the system let us consider the transfer function in two parts.
)........11( 0)( nsnsnsY
nsnsnsU
sZ
......11
1
)(
)(
(6a)
(6b)
(5)
Realization of equation (5)
nsnsn ......11
1
nsnsn
........
110
Z(s)U(s) Y(s)
Decomposition of transfer function (3)
• Now the realization of transfer (5a) is straightforward. The output
)(........)(11)(0)( tzntzpntzpnty
is nothing but the sum of the scaled versions of the input to the n integrators.
• To get the state variable model of the system , identify the output of each integrator
with a state variable starting a the right & proceeding to the left.
• The corresponding differential equation using this identification of state variable are
ẋ1 = x2
ẋ2 = x3
:
ẋn = -αnx1 - αn-1x2 - .......... α1xn+u
(7a)
α2α1αn-1 αn
+
+
+
+
+
+
+
u xnxn-1 x1
-
β0 β1 βnβn-1
x2
y
z
+
+ +
+ +
+
Realization of the system (3)
β2
+
+
The output equation can be written as
y = ( βn - β0αn ) x1 + ( βn-1 - β0αn-1 ) x2 +……..+ ( β1 - β0α1 ) xn + β0 u (7b)
The state & output equations are organized in vector matrix form
ẋ (t) = A x(t) + B u(t)
y (t) = C x(t) + D u(t)with
0 1 0 … 0
0 0 1 … 0
: : : :
0 0 0 … 1
-αn -αn-1 -αn-2 … -α1
A =;
0
0
:
0
1
B =
C = [ βn - β0αn , βn-1 - β0αn-1 , . . . . . . . , β1 - β0α1] ; D = β0
(8)
• The matrix A has a very special structure : the coefficients of the denominator of the
transfer function preceded by minus sign form a string along the bottom of the
matrix.
• The rest of matrix is zero except for “superdiagonal” terms which all are unity.
• In matrix theory this structure is said to be in Companion form. For this reason the
realization of transfer function is identified as Companion form realization.
• This state-space realization is also called controllable canonical form because the
resulting model is guaranteed to be controllable (i.e., because the control enters a
chain of integrators, it has the ability to move every state).
Second Companion Form
• In this form the coefficient appear in a column of the A matrix.
• This can be obtain by writing equation (3) as
)()........110()()........1
1( sUnsnsnsYnsnsn
or
0)](0)([..........)](1)(1[1)](0)([ sUsYnsUsYsnsUsYsn
• On dividing by and solving for Y(s), we obtainsn
)]()([1.......)](1)(1[1)(0)( sYnsUnsn
sYsUs
sUsY
Note that is the transfer function of a chain of n integrators.sn1
(9)
• The signal passes through n integrators ; the signal
passes through n-1 integrators and so forth to complete the realization of equation
βn βn-1 βn-2 β1β0
αnαn-1 αn-2 α1
u
+
-
x1x2
xn-1 xn y
Realization of equation (9)
ynun ynun 11
•.• To write the differential equation for the realization identify the output of each
integrator with a state variable starting at the left and proceeding to the right
ẋn = xn-1 -α1 ( xn + β0 u ) + β1 u
ẋn-1 = xn-2 - α2 ( xn + β0 u ) + β2 u
:
ẋ2 = x1 - αn-1 ( xn + β0 u ) + βn-1 u
ẋ1 = - αn ( xn + β0 u ) + βn u
and the output equation is
y = xn + β0 u
• The state and output equation organized in vector matrix form are given below
ẋ (t) = A x(t) + B u(t)
y (t) = C x(t) + D u(t)(10)
0 0 … 0 -αn
1 0 … 0 -αn-1
0 1 … 0 -αn-2
: : : : :
0 0 0 1 -α1
A = ; B =
βn – αn β0
βn-1 – αn-1 β0
βn -2 – αn-2 β0
:
- β1 – α1 β0
C = [ 0 0 … 0 1 ]
;
D = β0
A , B , C or D matrix of second companion form correspond ot the transpose of
the A , B , C or D respectively to the first one.
• This state-space realization is also called observable canonical form because the
resulting model is guaranteed to be observable (i.e., because the output exits from
a chain of integrators, every state has an effect on the output).
• These form also play an important role in pole placement design through state
feedback.
Jordan Canonical Form
• In this form the poles of the transfer function form a string along the main diagonal of the
matrix.
nsnnsn
nsnsnsG
......1
......110)(
• By long division , G(s) can be written as
)('0.....1
1
'.....1'1
0)( sG
nsnsnnsn
sG
or
ns
rn
s
r
s
r
sU
sYsG
.....
2
2
1
10)(
)()(
• The coefficient (i = 1,2,…….,n ) are the residue of the transfer function G’(s)
at the poles at s = ( i = 1,2,…..,n).
rii
(11)
• The transfer function consists of a direct path with gain , and first order transfer
function in parallel.
0
λ1
λ2
λn
β0
r1
r2
rn
+
u y
Realization of G(s) in equation (11)
x1
x2
xn
• Identifying the outputs of integrator with the state variables results in following state
and output equations:
λ1 0 … 0
0 λ2 … 0
0 0 … 0
: : : :
0 0 0 λn
ẋ (t) = x(t) + B u(t)
y (t) = C x(t) + D u(t)
ʌ = ;
1
1
1
:
1
B =
C = [ r1 r2 ….. rn ] ; D = β0
• It is observed that for this canonical state variable model , the matrix A is a diagonal
with the poles of G(s) as its diagonal elements.
• The unique decoupled nature of the canonical model is obvious from eqn (12); the
n first order differential equation are independent of each other.
ẋ (t) = λi xi(t) + u(t) ; i = 1 , 2 , 3 …….,n
(12)
(13)
• Assume that G(s) has m distinct poles at s = λ1 , λ2 , ……… , λm of multiplicity
n1 , n2 , ……… , nm respectively: s = n1 + n2 + ……… + nm i.e. G(s) is of the form
)(. . . . . . . . .)2( 2)1( 1
'. . . . . . . . .2'2
1'1
0)(
ms nms ns nnsnsn
sG
• The partial fraction expansion of G(s) is of the form
)(
)()(.......)(10)(
sU
sYsH msHsG
where
)(
)(
)(.........
)( 12
)(
1)(sU
sY i
is
rini
is ni
ri
is ni
risH i
• The first term in Hi(s) can be synthesized as a chain of ni identical, first order
systems , each having transfer function 1/(s-λi).
• The second order term can be synthesized by a chain of (ni-1) first order system ,
and so forth.
(14)
(15)
• The entire Hi(s) can be synthesized by the system having block diagram shown in
figure.
rin1 ri2r i1
λi λi λi
u +
+
yi
xini xi2 xi1
Realization of Hi(s) in equation (15)
• Now to get state variable we identify the output of each integrator with a state variable
starting at the right and proceeding to the left.
• The corresponding differential equation are
ẋi1 = λi xi1 + xi2
ẋi2 = λi xi2 + xi3
:uxiniixini
.
And the output is given by
xiniin
yi x rrxr iiii
i
2211 .........
• If the state vector for the subsystem is defined by
rinixixiT
xi 21
• Then equation can be written in standard form
ẋi = ʌi xi + Bi u
yi = Ci xi
where
i
i
i
i
000
1000
010
001
1
0
0
0
Bi; ;
rrrC ini
iii
21
(16a)
(16b)
(17)
Note that the matrix has two diagonals- the principle diagonal has the
corresponding characteristic root (pole) and the super diagonal has all 1’s.
i
• In matrix theory , a matrix having this structure is said to be in Jordan form. That’s
why this realization is identified as Jordan Canonical Form.
• The state vector of the overall system consists of the concatenation of state vector
of each of the Jordan blocks:
xm
x
x
x
2
1
• Since there is no coupling between any of the subsystem , the matrix of the
overall system is ‘block diagonal’: where each of the sub matrices is in the
Jordan canonical form.
i
ẋ1=ʌ1x1+B1u
y1=C1x1
ẋ1=ʌ2x2+B2u
y2=C2x2
ẋm=ʌmxm+Bmu
ym=Cmxm
0
y1
y2
ym
yu
m
00
020
001
;
BM
B
B
B
2
1
C = [ C1 C2 … Cm] ; D = β0
Subsystems in Jordan canonical form combined into overall system
Computing Standard Forms in
MATLAB
• MATLAB contains a function for automatically transforming a state space equation
into a companion (e.g., controllable or observable canonical form) form.
[Ap, Bp, Cp, Dp, P] = canon(A, B, C, D, 'companion');
• Moving from one companion form to the other usually involves elementary
operations on matrices and vectors (e.g., transposes or interchanging rows).
• compan(P): P is the vector with the coefficients of a characteristic
polynomial
[Ap, Bp, Cp, Dp, P] = canon(tf(Pnum,Pden), 'companion');
P= vector with the coefficients of a transfer function's numerator polynomial.
• To transform a state space equation into a modal (e.g., diagonal) form, the same
command can be used.
[Ap, Bp, Cp, Dp, P] = canon(A, B, C, D, 'modal');
• However, MATLAB also includes a command to compute the Jordan form of a
matrix, which is a modified modal form suited for matrices that have repeated
eigenvalues. jordan(A)
• There are some more function which can be used to convert transfer function to
canonical state variable form.
csys=ss(A,B,C,D) Controllable form
osys=ss(A’,C’,B’,D) Observable form
Problem: A feedback system has a closed loop transfer function
Construct three different state models for this system:
(a) One where the system matrix A is a diagonal matrix.
(b) One where A is in first companion form.
(c) One where A is in second companion form.
)3)(1(
)4(10
)(
)(
sss
s
sR
sY
THANKS