Control Systems EE 4314 Lecture 10 February 13, 2014 Spring 2014 Woo Ho Lee whlee@uta.edu Block Diagram Simplification • Example: Simplify the block diagram Woo Ho Lee Control Systems EE 4314, Spring 2014 Block Diagram Simplification • Example: Simplify the block diagram Woo Ho Lee Control Systems EE 4314, Spring 2014 Example Woo Ho Lee Control Systems EE 4314, Spring 2014 Closed-Loop System subject to Disturbance • Obtain transfer functions of C(s)/R(s) and C(s)/D(s) Woo Ho Lee Control Systems EE 4314, Spring 2014 Transfer Functions Woo Ho Lee Control Systems EE 4314, Spring 2014 Block Diagram Simplification • Simplify the block diagram and obtain transfer functions C(s)/R(s) and C(s)/D(s) Woo Ho Lee Control Systems EE 4314, Spring 2014 Block Diagram Simplification • Simplify the block diagram and obtain transfer functions C(s)/R(s) and C(s)/D(s) Woo Ho Lee Control Systems EE 4314, Spring 2014 Example Woo Ho Lee Control Systems EE 4314, Spring 2014 State Space Representation • Idea: An nth-order differential equation can be expressed as a first order vector-matrix differential equation. Consider nth-order system 𝑦 (𝑛) + 𝑎1 𝑦 (𝑛−1) + ⋯ + 𝑎𝑛−1 𝑦 + 𝑎𝑛 𝑦 = 𝑢 with I.C.=0 and define 𝑥1 = 𝑦 𝑥2 = 𝑦 ⋮ 𝑥𝑛 = 𝑦 (𝑛−1) Then 𝑥1 = 𝑥2 𝑥2 = 𝑥3 ⋮ 𝑥𝑛−1 = 𝑥𝑛 𝑥𝑛 = −𝑎𝑛 𝑥1 − ⋯ −𝑎1 𝑥𝑛 +𝑢 Woo Ho Lee Control Systems EE 4314, Spring 2014 State Space Representation • Matrix form 𝑿 = 𝑨𝑿 + 𝑩𝒖 𝑥1 0 1 0 ⋯ 0 𝑥2 0. 0. 1. ⋯ 0. . ⋯ Where 𝑿 = . , 𝑨 = . . . . ,𝐁 = ⋯ 0 0 0 1 . −𝑎𝑛 −𝑎𝑛−1 −𝑎𝑛−2 ⋯ −𝑎1 𝑥𝑛 𝑿: state vector, 𝑨: system matrix, 𝑩: input matrix • Output can be 𝑥1 𝑥2 . 𝑦 = 1 0 ⋯0 . . 𝑥𝑛 𝒚 = 𝑪𝑿 + 𝐷𝑢 Where 𝑪 = 1 0 ⋯ 0 , output matrix, Woo Ho Lee Control Systems EE 4314, Spring 2014 0 0. . . 1 State Space Representation • Nth-order system 𝑦 (𝑛) + 𝑎1 𝑦 (𝑛−1) + ⋯ + 𝑎𝑛−1 𝑦 + 𝑎𝑛 𝑦 = 𝑢 • State space representation 𝑿 = 𝑨𝑿 + 𝑩𝒖 𝑥1 0 𝑥2 0. . where 𝑿 = . , 𝐴 = . 0 . −𝑎𝑛 𝑥𝑛 • 1 0. . 0 −𝑎𝑛−1 0 1. . 0 −𝑎𝑛−2 ⋯ 0 ⋯ 0. ⋯ . ,B = ⋯ 1 ⋯ −𝑎1 Transfer function 𝑌(𝑠) 1 = 𝑈(𝑠) 𝑠 𝑛 + 𝑎1 𝑠 𝑛−1 + ⋯ + 𝑎𝑛−1 𝑠 + 𝑎𝑛 Woo Ho Lee Control Systems EE 4314, Spring 2014 0 0. . . 1 Modern Control vs. Classic Control • Modern control theory (State space model) – – – – Multi Input Multi Output (MIMO) system Linear and Nonlinear system Time invariant and Time varying system Internal variables (states)can be monitored • Classic control theory (Transfer function) – Only applied to Linear Time Invariant, Single Input Single Output (LTI SISO) system Woo Ho Lee Control Systems EE 4314, Spring 2014 State Space Representation • State space representation is not unique. • The number of state variables is the same for any representation. You need n state variables for nth-order system. – First order system: 𝑥1 – Second order system: 𝑥1 , 𝑥2 – Third order system: 𝑥1 , 𝑥2 , 𝑥3 • State variables determines the behavior of the system. – Mechanical systems: position, velocity, angle, angular velocity – Electrical systems: voltage, current, charge • Three variables – Input variables: u – Output variables: y – State variables: X Woo Ho Lee Control Systems EE 4314, Spring 2014 Mass Spring Dashpot System • Dynamic equations of motion 𝑚𝑦 + 𝑏𝑦 + 𝑘𝑦 = 𝑢 • Find state space equation and draw a block diagram Woo Ho Lee Control Systems EE 4314, Spring 2014 Mass Spring Dashpot System • Dynamic equations of motion 𝑚𝑦 + 𝑏𝑦 + 𝑘𝑦 = 𝑢 • Find state space equation and draw a block diagram Woo Ho Lee Control Systems EE 4314, Spring 2014 Mass Spring Dashpot System Woo Ho Lee Control Systems EE 4314, Spring 2014 Mass Spring Dashpot System • Ex] Obtain state space form 𝑚 = 1.5, 𝑏 = 2 𝑘 = 3 𝑢 = 1 0 𝑘 𝐴= − 𝑚 𝐴= 0 −2 1 0 𝑏 ,𝐵 = 1 ,𝐶 = 1 0 ,𝐷 = 0 − 𝑚 𝑚 1 0 ,𝐵 = ,𝐶 = 1 0 ,𝐷 = 0 −1.33 0.67 Woo Ho Lee Control Systems EE 4314, Spring 2014 Mass Spring Dashpot System • MATLAB – – – – m=1.5, b=2,k=3 num=1 den=[m b k] [A B C D]=tf2ss(num,den) 𝐴= −1.33 1 −2 1 ,𝐵 = , 𝐶 = 0 0.67 , 𝐷 = 0 0 0 State space form from MATLAB is different from previous form. 𝐴= 0 −2 1 0 ,𝐵 = ,𝐶 = 1 0 ,𝐷 = 0 −1.33 0.67 State space form is not unique. There are several different representations. Woo Ho Lee Control Systems EE 4314, Spring 2014 Mass Spring Dashpot System • Previously, we defined 𝑥1 = 𝑦, 𝑥2 = 𝑦 • At this time, 𝑥1 = 𝑦, 𝑥2 = 𝑦 • Then, we obtain 𝑥1 = − 𝑏 𝑥 𝑚 1 − 𝑘 𝑥 𝑚 2 + 𝑥2 = 𝑥1 𝑏 − 𝐴= 𝑚 1 𝐴= −1.33 1 Woo Ho Lee Control Systems EE 4314, Spring 2014 𝑘 𝑚 0 − −2 0 𝑢 𝑚 DC Motor in State Space Form • Dynamic equations of motion 𝐽𝑚 𝜃𝑚 + 𝑏𝜃𝑚 = 𝐾𝑡 𝑖𝑎 𝑑𝑖𝑎 𝐿𝑎 + 𝑅𝑎 𝑖𝑎 = 𝑣𝑎 − 𝐾𝑒 𝜃𝑚 𝑑𝑡 • Find state space equation – Define 𝑥1 = 𝜃𝑚 , 𝑥2 = 𝜃𝑚 , 𝑥3 = 𝑖𝑎 Woo Ho Lee Control Systems EE 4314, Spring 2014 DC Motor in State Space Form Woo Ho Lee Control Systems EE 4314, Spring 2014 DC Motor in State Space Form • Draw a block diagram Woo Ho Lee Control Systems EE 4314, Spring 2014 Canonical Form • Consider a 𝑏(𝑠) system 𝑎(𝑠) 𝑏(𝑠) = 𝑏1 𝑠 𝑛−1 + 𝑏2 𝑠 𝑛−2 + ⋯ + 𝑏𝑛 𝑎(𝑠) = 𝑠 𝑛 + 𝑎1 𝑠 𝑛−1 + 𝑎2 𝑠 𝑛−2 + ⋯ + 𝑎𝑛 −𝑎1 −𝑎3 −𝑎3 ⋯ −𝑎𝑛 1. 0. 0. ⋯ 0. 𝐴= . . ,B = . ⋯ . 0 0 1 ⋯ 0 0 1 0 0 0 𝐶 = 𝑏1 𝑏2 ⋯ 𝑏𝑛 , D = 0 • MATLAB symbolic canonical form Woo Ho Lee Control Systems EE 4314, Spring 2014 0 0. . . 1 Canonical Form • Ex] Find a state space representation and draw a block diagram 𝑦 + 6𝑦 + 11𝑦 + 6𝑦 = 6𝑢 Define 𝑥1 = 𝑦, 𝑥2 = 𝑦, 𝑥3 = 𝑦 Woo Ho Lee Control Systems EE 4314, Spring 2014