Linear Time-Invariant Systems sinfo(sys) ystem with 1 state(s),1 input(s), and 1 output(s) Similarly, the poles of the system are given by spol: The function ssub selects particular inputs and outputs of a system and returns the corresponding subsystem. For instance, if G has two inputs and hree outputs, the subsystem mapping the first input to the second and third outputs is given by The function sinv computes the inverse H(s)=G(s-l of a system G(s)with square invertible D matrix h Finally, the state-space realization of an Lti system can be"balanced"with balanc. This function seeks a diagonal scaling similarity that reduces the norms of A, B, C 25
Linear Time-Invariant Systems 2-5 sinfo(sys) System with 1 state(s), 1 input(s), and 1 output(s) Similarly, the poles of the system are given by spol: spol(sys) ans = 1 The function ssub selects particular inputs and outputs of a system and returns the corresponding subsystem. For instance, if G has two inputs and three outputs, the subsystem mapping the first input to the second and third outputs is given by ssub(g,1,2:3) The function sinv computes the inverse H(s) = G(s) –1 of a system G(s) with square invertible D matrix: h = sinv(g) Finally, the state-space realization of an LTI system can be “balanced” with sbalanc. This function seeks a diagonal scaling similarity that reduces the norms of A, B, C
Time and Frequency Response Plots Time and frequency responses of linear systems are plotted directly from the SYSTEM matrix with the function splot. For the sake of illustration, consider system m元+f+kx= with m=2, f=0.01, and k=0.5. This system is specified in descriptor form by sys=1 tisys([01,0.50.01],[0,1],[10],0,[10,02]) the last input argument being the E matrix. To plot its Bode diagram, type The second argument is the string consisting of the first two letters of"bode. This command produces the plot of Figure 2-1. a third argument can be to adjust the frequency range. For instance, displays the Bode plot of Figure 2-2 instead Frequency(rad/sec) 80 Frequency (rad/sec) 2-6
2 Uncertain Dynamical Systems 2-6 Time and Frequency Response Plots Time and frequency responses of linear systems are plotted directly from the SYSTEM matrix with the function splot. For the sake of illustration, consider the second-order system with m = 2, f = 0.01, and k = 0.5. This system is specified in descriptor form by sys = ltisys([0 1, 0.5 0.01],[0,1],[1 0],0,[1 0,0 2]) the last input argument being the E matrix. To plot its Bode diagram, type splot(sys,'bo') The second argument is the string consisting of the first two letters of “bode.” This command produces the plot of Figure 2-1. A third argument can be used to adjust the frequency range. For instance, splot(sys,'bo',logspace( 1,1,50)) displays the Bode plot of Figure 2-2 instead. Figure 2-1: splot (sys,'bo') mx·· fx · + + kx = u yx , = 10−1 100 −50 0 50 Frequency (rad/sec) Gain dB 10−1 100 −90 −180 0 Frequency (rad/sec) Phase deg
Time and fre requency(radl sec) Figure 2-2: splot(sys, bo, logspace(-1, 1, 50)) To draw the singular value plot of this second-order system, type For a system with transfer function G(s)=D+C(sE-A)B, the singular value plot consists of the curves 0,O where o denotes the i-th singular value of a matrix M in the order Similarly, the step and impulse responses of this system are plotted by splot(sys, 'st')and splot(sys, 'im), respectively. See the"Command list of available diagram The function splot is also applicable to discrete-time systems. For such systems, the sampling period T must be specified to plot frequency responses For inst he Bode plot of the system 27
Time and Frequency Response Plots 2-7 Figure 2-2: splot (sys,'bo',logspace (–1,1,50)) To draw the singular value plot of this second-order system, type splot(sys,'sv'). For a system with transfer function G(s) = D + C(sE – A) –1B, the singular value plot consists of the curves (ω, σi(G(jω))) where σi denotes the i-th singular value of a matrix M in the order σ1(M) Š σ2(M) Š . . . Š σp(M). Similarly, the step and impulse responses of this system are plotted by splot(sys,'st') and splot(sys,'im'), respectively. See the “Command Reference” chapter for a complete list of available diagrams. The function splot is also applicable to discrete-time systems. For such systems, the sampling period T must be specified to plot frequency responses. For instance, the Bode plot of the system 10−1 100 101 −50 0 50 Frequency (rad/sec) Gain dB 10−1 100 101 −90 −180 0 Frequency (rad/sec) Phase deg
Uncertain Dynamical Syster k+1 0.1x+0.2 Jk=-t with sampling period t=0.01 s is drawn by splot(1 tisys(0.1,0.2,1),0.01,"bo") 2-8
2 Uncertain Dynamical Systems 2-8 with sampling period t = 0.01 s is drawn by splot(ltisys(0.1,0.2, 1),0.01,'bo') xk + 1 0.1xk 0.2uk = + yk –xk =
Interconnections of Linear Systems Interconnections of Linear Systems Tools are provided to form series, parallel, and simple feedback inter connections of LTI systems. More complex interconnections can be built either incrementally with these basic facilities or directly with sconnect (see"Polytopic Models"on page 2-14 for details). The interconnection functions work on the SYSTEM matrix representation of dynamical systems and their names start with an s. Note that most of these functions are also applicable to polytopic or parameter-dependent models(see"Polytopic Models"on Series and parallel interconnections are performed by sadd and smult In terms of transfer functions returns the system with transfer function G,(s)+G,(s)while smut(g1, g2) ten input arguments, at most one of which can be a parameter dependen up to returns the system with transfer function G(s)Gi(s). Both functions take system. Similarly, the command appends(concatenates)the systems Gi and Ge and returns the system with transfer function G(s) G1(s) 0G2(s) This corresponds to combining the input/output relations y1=G1(s)u1,y2=G2(s)川2 into the single relation 2-9
Interconnections of Linear Systems 2-9 Interconnections of Linear Systems Tools are provided to form series, parallel, and simple feedback interconnections of LTI systems. More complex interconnections can be built either incrementally with these basic facilities or directly with sconnect (see“Polytopic Models” on page 2-14 for details). The interconnection functions work on the SYSTEM matrix representation of dynamical systems and their names start with an s. Note that most of these functions are also applicable to polytopic or parameter- dependent models (see “Polytopic Models” on page 2-14). Series and parallel interconnections are performed by sadd and smult. In terms of transfer functions, sadd(g1,g2) returns the system with transfer function G1(s) + G2(s) while smult(g1,g2) returns the system with transfer function G2(s)G1(s). Both functions take up to ten input arguments, at most one of which can be a parameter-dependent system. Similarly, the command sdiag(g1,g2) appends (concatenates) the systems G1 and G2 and returns the system with transfer function This corresponds to combining the input/output relations y1 = G1(s)u1, y2 = G2(s)u2 into the single relation G s( ) G1( ) s 0 0 G2( ) s = y1 y 2 G s( ) u1 u 2 =