(ECE411) Lectures 7 & 8, Professor Department of Electrical and Computer Engineering Colorado State University Fall 2016
Signal Flow Graph Examples Example 3: Find y6 y 1 and y5 y 2. Part (a): Input: y 1 Output: y 6 M 1 = abe M 2 = acde Loops: P 11 = cg P 21 = eh P 31 = cdei P 41 = bei Loops 1 and 2 are non-touching: P 12 = P 11 P 21 = cgeh = 1 P 11 P 21 P 31 P 41 + P 12 = 1 + cg + eh + cdei + bei + cgeh
Signal Flow Graph Examples-Cont. Both paths touch all loops, hence 1 = 1 and 2 = 1. Then we have, y 6 = M 1 1 + M 2 2 abe + acde = y 1 Part (b): Note that y 2 is not an input node. Thus, to find y5 y 2, we find y5 y 1 and then divide them. But since y 5 = y 6 we only need to find y2 y 2 y 1 For y2 y 1 : Output: y 2 Input: y 1 M 1 = a 1 = 1 + eh y 2 y 1 = a(1+eh) Using the result in part (a) we get y 5 y 2 = y5 y 1 / y2 y 1 = abe+acde a(1+eh) y 1. and
Signal Flow Graph Examples-Cont. Example 4 G 11 (s) = C1 R 1 R2=0 Input: R 1 (s) Output: C 1 (s) M 11 = G 1 G 2 P 11 = G 1 G 2 H 1 P 21 = G 5 G 6 H 2 P 31 = G 3 G 4 G 6 H 2 Loops 1 and 2 are non-touching, thus P 12 = P 11 P 21 = G 1 G 2 G 5 G 6 H 1 H 2 = 1 P 11 P 21 P 31 + P 12
Signal Flow Graph Examples-Cont. Path 1 is non-touching with loop 2, 1 = 1 + G 5 G 6 H 2 G 11 (s) = C 1 = G 1G 2 (1 + G 5 G 6 H 2 ) R 1 R2=0 G 12 (s) = C1 R 2 R1=0 M 1 = G 2 G 3 1 = 1. Thus G 12 (s) = C 1 For G 21 (s) = C2 R 1 R2=0: M 1 = G 1 G 4 G 6 1 = 1. Thus, G 21 (s) = C 2 R 2 R1=0 R 1 R2=0 = G 2G 3 = G 1G 4 G 6
Signal Flow Graph Examples-Cont. Finally, for G 22 (s) = C2 R 2 R1=0 M 1 = G 5 G 6 1 = 1 + G 1 G 2 H 1, and M 2 = G 3 G 4 G 6 2 = 1. Thus G 22 (s) = C 2 = G 5G 6 (1 + G 1 G 2 H 1 ) + G 3 G 4 G 6 R 2 R2=0
Idea: Convert an n th -order differential equation of an LTI system to n 1 st -order simultaneous differential equations where variables are called state-variables and specification of their values at same time instant is the state of the system at that time. Given the state of the system at time t 0 and all the inputs from time t 0 to t, the behaviour of the system can be completely determined for all t > t 0. State Variables: Smallest set of variables that determine the behaviour of an LTI system. We use the notation x 1,... x n. Note: They might not be physically measurable or observable quantities. State Vector: State variables arranged in a n D vector: x 1 (t) x 2 (t) x(t) =. Rn x n (t) State-Space: n-dimensional space whose coordinates axis are x 1,... x n.
-Cont. State-Space Equations (SISO): (a) LTI System Let u(t): input, y(t): output, and x(t): state vector. Then, state equations for LTI systems are ẋ(t) = Ax(t) + Bu(t) (state equation) y(t) = Cx(t) + du(t) (output equation) where A is a n n matrix, B is a n 1 vector, C is 1 n, and d is a scalar. Also, ẋ(t) = (b) Linear Time-Varying (LTV) System ẋ(t) = A(t)x(t) + B(t)u(t) y(t) = C(t)x(t) + d(t)u(t) where A, B, C, d are now time-dependent. dx 1(t). dx N (t)
-Cont. (c) Nonlinear System ẋ(t) = f (x(t), u(t); t) y(t) = g (x(t), u(t); t) where f(.) = [f 1 (.) f 2 (.), f n (.)] T i.e. a vectorial function of state vector x(t) and g(.) is a scalar (for SISO) function of x(t). Advantages of : 1 Unified way of representing all types systems e.g., nonlinear, time-varying, MIMO and large scale systems. 2 Gives more insight into structure of the system (via state variables). 3 Controller design using state feedback is a more versatile and effective strategy when compared to the traditional methods e.g., PID control.
-Cont. Example 1: Express equations of the RLC circuit below in state-space form. KCL i 1 (t) = C dvc(t) + i 2 (t) KVL di R 1 i 1 (t) + L 1(t) 1 + v c (t) = v s (t) di L 2(t) 2 + R 2 i 2 (t) v c (t) = 0 Let us assign state variables as follows: v c (t) = x 1 (t) i 1 (t) = x 2 (t) i 2 (t) = x 3 (t)
-Cont. Then di 1 (t) dx 3(t) dv c (t) = dx 2(t) = dx 1(t) = 1 C x 2(t) 1 C x 3(t) = 1 L 1 x 1 (t) R 1 L 1 x 2 (t) + 1 L 1 v s (t) di 2 (t) = dx 3(t) = 1 x 1 (t) R 2 x 3 (t) L 2 L 2 Thus, we get the following state equation dx 1(t) 1 0 C 1 C x 1 (t) dx ẋ(t) = 2(t) = 1 L 1 R1 L 1 0 x 2 (t) + 1 L 2 0 R2 L 2 x 3 (t) If we want to get the voltage across R 2 as output, then: y(t) = v R2 = R 2 i 2 (t) = [ ] x 1 (t) 0 0 R 2 x 2 (t) x 3 (t) 0 1 L 1 0 v s (t)
-Cont. Now, suppose we want to get both v R2 and v c as outputs, then : [ ] [ ] vr2 0 0 1 (t) R2 y(t) = = x x v c 1 0 0 2 (t) x 3 (t) Note: The states, voltages across capacitors and currents through inductors, capture everything to know about this RLC circuit. Transformation from Differential Equation (or Transfer Function) to State-Space Formulation: Given an LTI system described by, n i=0 a i d i y(t) i = m j=0 b j d j u(t) j y(t): output, u(t): input, n: order. Let m = n and a n = 1 (normalize if not). Alternatively, the transfer function (all ICs=0) is H(s) = Y (s) n U(s) = j=0 b js j n i=0 a is = B(s) i A(s)
-Cont. Decompose the transfer function into two cascaded parts with an All-Pole, 1 A(s), and All-Zero, B(s), parts as shown. All-pole part: W (s) U(s) = 1 A(s) = 1 n i=0 a is i ( n i=0 a is i) W (s) = U(s) = ( ) s n + a n 1 s n 1 + + a 0 W (s) = U(s) Convert to time-domain by taking inverse LT: d n w(t) n + a n 1 d n 1 w(t) n 1 + + a 0 w(t) = u(t)
-Cont. Assign state variables as follows: x 1 (t) = w(t) x 2 (t) = dw(t). x n (t) = dn w(t) n 1 in matrix form, or dx 1(t). d N x(t) N = = dx1(t). = dxn(t) = x 2 (t) = dn w(t) n 0 1 0... 0 0 0 1... 0.... 1 a 0 a 1 a 2... a n 1 = a n 1 x n (t) a 0 x 1 (t) + u(t) Or ẋ(t) = Ax(t) + Bu(t) x 1 (t) 0. x n 1 (t) +. 0 u(t) x n (t) 1 This structure is known as Phase Variable Canonical Form (PVCF).
-Cont. All-zero part: ( n ) Y (s) = B(s)W (s) = j=0 b js j W (s) Convert to time-domain by taking inverse LT: d n w(t) d n 1 w(t) y(t) = b n n + b n 1 n 1 + + b 0 w(t) Substituting terms from previous state equations: y(t) = b n ( a 0 x 1 (t) a 1 x 2 (t) a n 1 x n (t) + u(t)) + b n 1 x n (t) + + b 0 y(t) = (b 0 b n a 0 )x 1 (t)+(b 1 b n a 1 )x 2 (t)+ +(b n 1 b n a n 1 )x n 1 (t)+b n u(t) y(t) = c 0 x 1 (t) + c 1 x 2 (t) + + c n 1 x n 1 + du(t) = Cx(t) + du(t) where c i = b i b n a i for all i [0, n 1] and d = b n. Remark: If m < n (strictly proper), then b n = 0, c i = b i. Note: Given a transfer function you can always using these general equations (without derivation) to arrive at PVCF form.
-Cont. Example: An LTI system is given by: d 3 y(t) 3 + 3 d2 y(t) 2 + 2y(t) + Convert to PVCF. We first take LT and apply the properties, ˆ t 0 y(τ)dτ = u(t) (s 3 + 3s 2 + 2 + 1 )Y (s) = U(s) s Thus, the transfer function: H(s) = Y (s) U(s) = s s 4 +3s 3 +2s+1 From this transfer function, a 0 = 1, a 1 = 2, a 2 = 0, a 3 = 3 while b 1 = 1 and b 0 = b 2 = b 3 = 0. Thus, we get 0 1 0 0 0 ẋ(t) = 0 0 1 0 0 0 0 1 x(t) + 0 0 u(t) 1 2 0 3 1 and y(t) = [0 1 0 0]x(t).