A MATLAB function kalmdec() is written which can be used to perform the Kalman decomposition of a given system:
1 function [Gk,T,K]=kalmdec(G)
2 G=ss(G); A=G.a; B=G.b; C=G.c; [Ac,Bc,Cc,Tc,Kc]=ctrbf(A,B,C);
3 nc=rank(ctrb(A,B),eps*100); n=length(A); ic=n-nc+1:n;
4 [Ao1,Bo1,Co1,To1,Ko1]=obsvf(Ac(ic,ic),Bc(ic),Cc(ic));
5 if nc<n, inc=1:n-nc;
6 [Ao2,Bo2,Co2,To2,Ko2]=obsvf(Ac(inc,inc),Bc(inc),Cc(inc));
7 end
8 [m1,n1]=size(To1); [m2,n2]=size(To2); To=blkdiag(To2,To1);
9 T=To*Tc; e0=eps*100; n1=rank(obsv(Ac(ic,ic),Cc(ic)),e0);
10 n2=rank(obsv(Ac(inc,inc),Cc(inc)),e0);
11 K=[zeros(1,n-nc-n2),ones(1,n2), 2*ones(1,nc-n1), 3*ones(1,n1)];
12 Ak=T*A*inv(T); Bk=T*B; Ck=C*inv(T); Gk=ss(Ak,Bk,Ck,G.d);
The syntax of the function is [Gk,Tk,k]=kalmdec(G). The returned variable Gk is the Kalman decomposition of the system G. The variable Tk is the transformation matrix, while the vector k returns a vector which holds the flags for the modes of each state. If the flag is zero, the corresponding state is uncontrollable/unobservable. The flag values of 1, 2, 3 correspond to the uncontrollable/observable, controllable/unobservable, and controllable/observable modes, respectively.
Example 3.7. Consider a linear system model
˙x =
Its Kalman decomposition can be performed using the following MATLAB scripts:
>> A=[-1,1,0,0,0,0; 0,-1,0,0,0,0; 0,0,-2,1,0,0;
0,0,0,-2,0,0; 0,0,0,0,-3,1; 0,0,0,0,0,-3];
B=[1; 2; 3; 0; 4; 0]; C=[4,5,0,6,0,0]; G=ss(A,B,C,0);
[Gk,Tk,K]=kalmdec(G),
which yield the following familiar mathematical format:
−0.0832 −0.9965 −2.007−0.08288 0 0
−0.9965 0.0832 −0.08288 −2.993 0 0
0 0 0 0 −1.488 −0.6098
Minimum realization problems revisited
If all the initial states are zero, the output signal y(t) of a linear continuous state space model can be simplified to
y(t)= Cc,o
t
0
eAc,o(t−τ)Bc,ou(τ )dτ, (3.12) which is exactly the solution of the controllable/observable subspace. Therefore, in the Kalman decomposition form, the subspace ( Ac,o, Bc,o, Cc,o)is referred to as the minimum realization of the original system. That is, the minimum realized model is always fully controllable and observable. For transfer function models, the “minimum realized model”
is the one in which all the pole-zero pairs have the same value canceled out.
The procedures to obtain the minimum realization of a linear system are summarized in the following:
1. Find a similarity transformation matrix Tc−1to separate the controllable and uncon-trollable parts: be further decomposed to find the observable part:
Ao= To−1AcTo= Ac,¯o Ac,12
3. Construct a matrix
Then, define the similarity transformation matrix T−1 = To−1Tc−1to transform the original system into the minimum realized form ( Ac,o, Bc,o, Cc,o). Under the similar-ity transformation matrix T , the whole system can be transformed into the canonical form as
Example 3.8. Revisit the state space model in Example 2.23. The above three steps can be implemented using the following MATLAB scripts to find the minimum realized model
>> A=[-5,8,0,0; -4,7,0,0; 0,0,0,4; 0,0,-2,6]; B=[4; -2; 2; 1];
C=[2,-2,-2,2]; D=0; [Ac,Bc,Cc,Tc]=ctrbf(A,B,C);
[Ao,Bo,Co,To]=obsvf(Ac,Bc,Cc); A_r=Ao(3:4,3:4); B_r=Bo(3:4);
C_r=Co(3:4); G_r=zpk(ss(A_r,B_r,C_r,D))
The minimum realized model is obtained as Gm(s) = 10(s − 2.6)/[(s − 2)(s + 1)]. It can be seen from the above that we did not find the canonical form as in (3.15), since the realized model has already been obtained and is the same as that given in Example 2.23.
3.1.4 Time Moments and Markov Parameters
Assume that the original transfer function G(s) is described by G(s)= b1sk+ b2sk−1+ · · · + bks+ bk+1
a1sn+ a2sn−1+ · · · + ans+ an+1, k≤ n, (3.16) where for simplicity, it is assumed that an+1= 1.
Consider the initial and final value properties of the Laplace transformation. It is seen that the Taylor series, in particular the expansion around s = 0 and s = ∞, are useful in describing the steady-state response and initial transient of the system behavior.
Expansion around s= 0: the time moments
The Taylor series expansion of G(s) around s= 0, or the Maclaurin series, can be written as
G(s)=
∞ i=0
cisi = c0+ c1s+ c2s2+ · · · . (3.17)
If e−st is expanded around s = 0 in the Laplace transformation of the impulse response function g(t), G(s) can be written as
G(s)=
where Mi = ∞
0 tig(t )dt is referred to as the ith time moment of the impulse response function g(t ). From (3.17),
ci = (−1)i i! Mi.
Assume that the state space model is given by (A, B, C, D). The transfer function of the system can be equivalently obtained from
G(s)= C(sI − A)−1B+ D. (3.19)
The time moments ci of the system can then be evaluated from
ci = 1 i!
diG(s) dsi
s=0= −CA−(i+1)B, i= 0, 1, . . . . (3.20) A MATLAB functiontimmomt()can be used to compute the time moments of a given LTI model object G:
1 function c=timmomt(G,k)
2 G=ss(G); C=G.c; B=G.b; iA=inv(G.a); iA1=iA;
3 c=zeros(1,k); for i=1:k, c(i)=-C*iA1*B; iA1=iA*iA1; end
The syntax of the function is c=timmomt(G,k), where G is the LTI object model and k is the number of time moments to be evaluated, and the returned variable c is a vector containing the first k time moments.
Example 3.9. Consider a fourth-order model
G(s)= s3+ 7s2+ 24s + 24 s4+ 10s3+ 35s2+ 50s + 24.
The first seven time moments of the system can be obtained from the following MATLAB scripts:
>> G=tf([1,7,24,24],[1,10,35,50,24]);
c=timmomt(G,7); [n,d]=rat(c)
which indicates that G(s) can be approximated by the Taylor series expansion G(s)= 1 − 13
12s+157
144s2−609
571s3+899
863s4−128
125s5+386
381s6+ o[s7].
Expansion around s= ∞: the Markov parameters
The G(s) given in (3.16) can be expanded as a power series of 1/s, i.e.,
G(s)= ∞
i=n−k
δi
1 s
i
, (3.21)
where the coefficients δi are referred to as the Markov parameters. Alternatively, it is equivalent to performing the Taylor series expansion of G(s) around s = ∞. For state space model (A, B, C, D), the Markov parameters δi can be evaluated from
δ0= CB + D, and δi = CAiB, i = 1, 2, . . . . (3.22) Recall the properties of the Laplace transformation. It is easily seen that the time moments determine the steady-state time response of the system, while the Markov param-eters determine the transient responses. In frequency response terms, the time moments determine the response over the low- and mid-frequency ranges, while Markov parameters determine the response over the mid- and high-frequency ranges.
A MATLAB functionmarkovp()can be used to evaluate the Markov parameters of a given transfer function G(s):
1 function m=markovp(G,k)
2 G=ss(G); A=G.a; B=G.b; C=G.c; D=G.d; m=[C*B+D,zeros(1,k-1)];
3 A1=A; for i=1:k-1, m(i+1)=C*A1*B; A1=A*A1; end
The syntax of the function is m=markovp(G,k), where G is an LTI object and kis the number of Markov parameters to be evaluated. The returned variable m is a vector containing the first k Markov parameters.
Example 3.10. For the system in Example 3.9, the first seven Markov parameters can be evaluated using the following MATLAB statement:
>> M=markovp(G,7)
such that the Taylor series expansion about s= ∞ can be obtained as G(s)= 1 − 3
s +19 s2 −111
s3 +571
s4 −2703
s5 +12139 s6 + o
1 s7
.
3.1.5 Norm Measures of Signals and Systems
Robustness of a feedback control system is very important in control engineering practice.
In actual control problems, there are always disturbances due to the environment and un-certainties due to the imperfect model used in the controller design. Clearly, it is desirable for the controlled system to have certain robustness against these disturbances and uncer-tainties. To assess the robustness, first of all, a proper measure is needed. Norm measures to signals and systems are introduced, which can be regarded as the basis of robust control.
Norm measures of signals
The size of a signal u(t) is usually measured in itsLp-norm defined as u(t)p=
∞
−∞|u(t)|pdt
1/p
, (3.23)
where p is a positive integer. The following norms are commonly used:
1. TheL1-norm: u(t)1=∞
−∞|u(t)|dt.
2. TheL2-norm, the measure of signal power: u(t)2=∞
−∞u2(t )dt.
3. TheL∞-norm, the least upper bound of|u(t)|: u(t)∞= supt|u(t)|.
Norm measures of systems
The size of a system in a transfer function form is usually measured by itsH2- andH∞ -norms.
1. TheH2-norm is defined by
G(s)2= 1 2π j
j∞
−j∞|G(jω)|2dω. (3.24) TheH2-norm is in fact a measure of the square root of the integral squared value of the output when the input is an impulse signal. In stochastic system terminology, the H2-norm is the root mean square value of the output signal when the input is white noise.
2. TheH∞-norm is defined by
G(s)∞= sup
u(t ) =0
y(t)2
u(t)2
, (3.25)
where u(t ) and y(t ) are the input and output of the system, respectively. For stable systems, theH∞-norm of the system can be computed from
G(s)∞= sup
ω |G(jω)|. (3.26)
It is readily seen that theH∞-norm is in fact the peak value of the magnitude of the frequency response.
The symbolsL and H are due to Lebesgue and Hardy, respectively.
Properties of L- and H-norms