Linear System Theory - Laplace Transform Prof. Robert X. Gao Department of Mechanical Engineering University of Connecticut Storrs, CT 06269
Outline What we ve learned so far: Setting up Modeling Equations (DEQs) Mechanical Systems: translational & rotational, use FBDs Electrical Systems : RCL element laws, Ohm s & Kirchhoff s laws (current, voltage) Solve State Variable (SV) Equations: MATLAB & Simulink Solve Input Output Equations: Laplace Transform What we ll learn next: Transfer Functions and Laplace Transform Inverse Laplace Transform Analysis of system dynamics behavior Update of project 2 /20
Problem Solving Numerical Given the Input, How to Find the Output Method 1. Establish State Variable Equations and Find a Numerical Solution Example: Initial Condition: x 1 = 0, x 2 = 2 m, v 1 = 0, v 2 = 0 Find Output: Energy stored in K 2 Procedure: FBD Equilibrium Equations State-Variable Equations Numerical Solution: Given: M 1 = 20 kg, M 2 =10 kg, K 1 = 25 N/m, K 2 = 100 N/m, K 3 = 50 N/m B= 45 N.s/m, g= 9.8 m/s 2 Energy(Joules) 500 450 400 350 300 250 200 150 100 50 0 2 4 6 8 10 Time (seconds) 3 /20
Problem Solving Analytical Given the Input, How to Find the Output Method 2. Establish Input Output Equation, Find Analytical Expression of the Output Procedure for Input Output w/ Input-Output Equation Establish Input-Output Equation Find Transfer Function Perform Laplace Transform for Input Function Output Function = Laplace (Input) x Transfer Function Inverse Laplace Transform Find Output vs. Time 4 /20
Establish Input-Output Equation B e 1 A Find the Input Output Equation between i(t) and e o Solution: Apply Kirchhoff s current law to nodes A,B e i 1 C(e 1 e o ) R e1 1 i i0 e o( )d R L e1 de1 de i C( o ) R dt dt di 1 de1 1 eo dt R dt L Use p operator to eliminate terms related with e 1 Input Output Equation: 2 2 d i d eo RC deo 1 RC C e 2 2 o dt dt L dt L 5 /20
Laplace Transform The Laplace Transform of a continuous function f(t): st Ls () f () te dt Illustration: input(t) output(t) Dynamic System Laplace Transform Pairs 0 input(t) Laplace Transform I(s) output(t) Laplace Transform O(s) 6 /20
Transfer Function Definition: relation between input and output in frequency domain. Analytical Expression: Output(s) Input(s) Example: Transfer Function(s) Output(s): Laplace Transform of output(t) Input(s): Laplace Transform of input(t) 2 2 d i d eo RC deo 1 RC C e 2 2 o dt dt L dt L Similarly to p-operator, using s-operator for Laplace Transform 2 2 RC 1 RC[s I(s) i( 0)] C[s E(s) e( 0)] [se(s) e( 0)] [E(s) e( 0)] L L Transfer Function (TF) Initial Conditions set to 0, and R = C = L = 1 TF E 2 2 o RCs Rs I 2 RC 1 2 R 1 Cs s s s L L L LC 7 /20
Define a Transfer Function in MATLAB Transfer Function (TF) Laplace Transform that represents the relation between the input and output of a system MATLAB Codes tf tf - Create or convert to transfer function model Example: Transfer Function Hs () s 1 2 2 2 s s INPUT num = {[1 1]}; den = {[1 2 2]}; H = tf(num,den) OUTPUT Transfer function: s + 1 ------------- s^2 + 2 s + 2 8 /20
Example Problem Transfer Function TF 2 Rs 2 R 1 s s L LC Let R = L = C = 1, in a consistent unit setting Transfer Function: 2 s TF 2 s s 1 MATLAB Codes INPUT num = {[1 0 0]}; den = {[1 1 1]}; H = tf(num,den) OUTPUT Transfer function: s^2 ----------- s^2 + s + 1 9 /20
Find the Laplace Form for Output Input: y = sin(2πt) Y laplace( y ) s 2 2 2 4 Transfer Function TF s 2 s 2 s 1 Laplace Representation of Output Output Y TF 2 s 4 3 2 3 2 2 2 s s ( 4 1)s 4 s 4 2 10 /20
Find the Output vs. Time Relation Back to the time domain: Inverse Laplace Transform st L { F( s)} f( t) e F( s) ds it 2 i 1 1 Function in MATLAB: ilaplace(f) Inverse Laplace transform of the scalar symbolic object L with default independent variable s Example Ls () f () t 24 5 s t 4 it INPUT syms s f f = 24/t^5 ilaplace(f) OUTPUT f = 24/t^5 ans = x^4 11 /20
Inverse Laplace for Given Example Equation Output Inverse Transform 2 s 4 3 2 3 2 2 2 s s ( 4 1)s 4 s 4 2 output( t ) 01632. cos( 2 t ) sin( 2 t) 0. 1632(cos( 2 t) 0. 548sin( 2 t)) e 05.t 12 /20
Plot 13 /20
System Analysis Bode Plot Bode Plot For Transfer Function Type bode(h) s^2 H = ------------------ s^2 + s + 1 50 Bode Diagram Magnitude (db) 0-50 Phase (deg) -100 180 135 90 45 0 10-2 10-1 10 0 10 1 10 2 Frequency (rad/sec) 14 /20
System Analysis Step Response Step Response For Transfer Function Type step(h) s^2 H = ------------------ s^2 + s + 1 1 Step Response 0.8 0.6 Amplitude 0.4 0.2 0-0.2-0.4 0 1 2 3 4 5 6 7 8 9 10 Time (sec) 15 /20
Example After steady state is reached, the switch is opened at t = 0. What is the voltage across the capacitor at all t>0? 16 /20
Analyze the Circuit When switch is opened at t > 0, circuit can be represented by following figure: For node e o and e A, apply Kirchhoff s Current law: Perform Laplace Transform to find transformed Eqs: At steady state when switch closed: Capacitor open circuit Inductor short circuit 17 /20
Determine e o Using steady-state condition, we find: e o (0) = 4V and i L (0) = 8 A. Substitute back into the transformed equations: Inverse Laplace Transform of e o : 10 eo Solve for E A (s) and E 0 (s): 9 8 Volts. 7 6 5 4 0 2 4 6 8 10 Time / Sec. 18 /20
Workflow for Class Project Chapts. 2-4 Chapts. 7-8 19 /20
Summary Illustration on how to determine the behavior of a dynamic system (e.g. an electrical circuit containing several energystoring elements) for t > 0, by following the procedure: Laplace Transform: solve differential or integral-differential modeling equations by transforming them into algebraic equations in the variable s; Inverse Laplace Transform: obtain system s response for all t > 0, without leaving unknown constants to be resolved. Demonstrated technique is relevant for the class project. 20 /20