ME121 Week1 2 Review

download ME121 Week1 2 Review

of 21

Transcript of ME121 Week1 2 Review

  • 8/18/2019 ME121 Week1 2 Review

    1/21

    University of California at Riverside, Department of Mechanical Engineering

    ME 121, Spring 2016, Elisa Franco

    Week 1

    Review

    Contents

    I Modeling physical systems   1

    I.1 A cart system   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

    I.2 Mass-spring-damper systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

    I.3 Electrical circuits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

    I.4 Using Matlab to numerically solve ordinary differential equations . . . . . . . . . . . . . . . . . . 8

    II The Laplace transform method to solve ordinary differential equations   10

    II.1 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

    II.2 Common Laplace transforms (LT)   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

    II.3 Properties of Laplace transforms   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

    II.4 Inverse Laplace Transform   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

    II.5 Using Laplace Transforms to solve ODEs   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

    II.6 Poles and zeros   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

    III Block diagrams   19

    III.1 Exercises   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

    I Modeling physical systems

    I.1 Dynamics of a moving cart

    M

    u

    Friction ~ bv

    Figure 1: Sketch of a cart moving on a surface with viscous friction

    Figure   1  shows a scheme for one of the simplest mechanical systems: a cart having mass M , moving onwheels on a surface with dynamic friction coefficient  b. The cart could represent a vehicle or a dolly used tomove loads in a factory. We want do describe the dynamics of its speed. Suppose the cart has an engine,

    which produces a force u  in the direction shown in the figure.We start from the fundamental laws:

    M a =  u − bv

  • 8/18/2019 ME121 Week1 2 Review

    2/21

    Elisa Franco    2

    Now remember that a  =   dvdt

    . Therefore, we instantly get a simple ordinary differential equation (ODE) model:

    v̇  = −   bM 

    v +  u

    What is the solution?

    This differential equation is LINEAR. Therefore, we can use the superposition principle to find the solution.

    When u = 0, and v(0) = v0  we find the natural response of the system:

    vN (t) = v0e−   b

    M t

    When initial conditions are zero, but we have an input u = 0, we find the   forced response using the convolu-tion1 integral:

    vF (t) =

       t0

    e−  bM  (t−τ )   1

    M u(τ )dτ 

    Note: If you never heard of convolution - that is how “forced” response solutions to ODEs are computed. Do not

    worry too much about it, since we will hardly use convolution throughout this course. The overall solution is:

    v(t) = vN (t) + vF (t) = v0e−   b

    t

    +    t

    0 e−   b

     (t−τ )   1

    M u(τ )dτ 

    Let us take u  = 1 for simplicity:

    v(t) = v0e−   b

    M t +

      1

       t0

    e−  bM  (t−τ )dτ 

    = v0e−   b

    M t +

      1

    M e−

      bM t

       t0

    e  bM τ dτ 

    = v0e−   b

    M t +

      1

    M e−

      bM tM 

    b

    e  bM τ τ =tτ =0

    = v0e−   b

    M t + e−

      bM t 1

    b e  bM t

    −1

    =   v0e−   b

    M t   

    →0   as   t→∞

    + 1

    b

    1− e−   bM t

       → 1

    b  as   t→∞

    As you probably remember from your Linear Systems course, there are better ways to find solutions to linear

    ODEs. The Laplace transform method will be our standard choice in the following weeks.

    We call this system a FIRST ORDER system, since there is only ONE dynamic variable, an the natural response

    dynamics are ALWAYS of exponential type, regardless of b, M   and u.The only dynamic variable is called the  STATE of the system. We were able to find analytically the state for this

    simple case. As you can see,  v(t)  only depends on  INITIAL CONDITIONS,  INPUT  and  PARAMETERS. Wesay that the system is  CAUSAL, as it does not depend on future values of the external inputs. In addition, we

    say that the system is  LINEAR TIME INVARIANT, because the dynamics are linear, and because the solution

    does not depend on the specific times at which we begin or finish observing it, but only on their difference.

    For first order system, whose natural response is of type e pt we can define a characteristic timescale τ  =   1 p .

    At t =  τ , the steady state of the system has reached a value  (1− e−1) = %63 of its steady state value. Finally,1Convolution integral : given f (t), g(t), with f (t) =  g(t) = 0  for  t ≤ 0:  h(t) f (t) g(t) =

      t0

     f (τ )g(t− τ )dτ 

  • 8/18/2019 ME121 Week1 2 Review

    3/21

    Elisa Franco    3

    engineers like to represent dynamical systems with simple block diagrams: see figure 2.

    vu

    1

    b

    +

    -

    Figure 2: Block diagram representing the cart dynamics

    I.2 Mass-spring-damper systems

    1. A mass-spring system (Figure 3). Suppose a mass M  hangs from support with a spring having springconstant k. For example,  M  could represent a cable cart or a load on a crane. We assume that theresting length of the spring is zero. We are interested in describing mathematically the dynamics of the

    mass. A static description would not give us a lot of useful information: for example, suppose  M   changessuddenly. Does the system oscillate? If it does, how long? What happens if  M  changes very slowly overtime or very fast?

    0

    k

    Mg

    r(t

    Figure 3: Mass-spring system

    We use the fundamental laws of physics, and simply write the resultant force on the mass. We choose

    our axes as in the figure, and define  r  as the position of the mass.

    M a =  M g − kr ⇒⇒ M  v̇ =  M g − kr, v  = ṙ⇒ M ̈r =  M g − kr

    We want to reduce this equation to a first order differential equation.

    We define two variables x1 =  r  and  x2 = ṙ, and we find:

    ẋ1 =  x2

    ẋ2 =  g −   kM 

    r =  g −   kM 

    x1

    We can rewrite the equations above in matrix form:ẋ1ẋ2

     =

      0 1

    − kM 

      0

    x1x2

     +

    01

    g

  • 8/18/2019 ME121 Week1 2 Review

    4/21

    Elisa Franco    4

    Variables  x1   and  x2  are the   STATES   of our system. Because we have two states, this is a   SECONDORDER  system. Second order systems can oscillate, in contrast with first order systems which we just

    saw in the first example. We will learn more about this in the next lectures.

    By solving the differential equation we can find x1(t) and x2(t), which depend only on the initial conditions,the parameters of the system, and on the external inputs (in this case only gravity).

    In general, we will write linear dynamical system in state space form as:

    ẋ =  Ax + Bu,

    where:

    •   x ∈   Rn is the state vector•   u ∈   Rm is a vector of inputs•   A  is a matrix in  Rn×n (also called the state matrix, describes how state affect the dynamics of the

    states)

    •   B  is a matrix in Rn×m (describes how external inputs affect the dynamics of the states)2. A mass-damper system (Figure  4). In this case, we assume that viscous friction “slows” the system

    proportionally to the speed. This is a standard assumption when we model hydraulic dampers commonlyused in industry.

    0

    Mg

    r(t

    b

    Figure 4: Mass-damper system

    M a =  M g − bvv  = ṙ, a = v̇ = r̈ ⇒

    ⇒ M ̈r =  M g − bṙ

    Now as done before, define two variables x1 =  r  and  x2 = ṙ, and we find:

    ẋ1 =  x2

    ẋ2 =  g −   bM 

    b =  g −   bM 

    x2

    In matrix form: ẋ1ẋ2

     =

    0 1

    0   −   bM 

    x1x2

     +

    01

    g ⇒  ẋ =  Ax + Bu

  • 8/18/2019 ME121 Week1 2 Review

    5/21

    Elisa Franco    5

    0

    Mg

    r

    (t

    )

    bk

    Figure 5: Mass-spring-damper system

    3. A mass-spring-damper system (Figure 5). This example combines the ones we just saw.

    M a =  M g − kr − bvM ̈r =  M g

    −kr

    −bṙ

    We define two states as before

    ẋ1 =  x2

    ẋ2 =  g −   bM 

    b =  g −   kM 

    x1 −   bM 

    x2

    In matrix form: ẋ1ẋ2

     =

      0 1

    − kM   −   b

    x1x2

     +

    01

    g ⇒  ẋ =  Ax + Bu

    4. A mass-spring-damper system with an active element (Figure 6). The active element can be, for example,a motor that we can control. Thus, it is a new external input. (This is useful for your homework Matlab

    project!)

    0

    Mg

    r(t)

    bk  F

    F

    Figure 6: Mass-spring-damper system with an active element

    Newton’s law gives:

    M  v̇  =  M g − kr − bv + F 

  • 8/18/2019 ME121 Week1 2 Review

    6/21

    Elisa Franco    6

    In matrix form:ẋ1ẋ2

     =

      0 1

    − kM   −   b

    x1x2

     +

    01

    g +

     01M 

    F   =

      0 1

    − kM   −   b

    x1x2

     +

    0 01   1

    g F 

    Implementing an  AUTOMATIC CONTROL   action on the system means determining  F  as a function ofx1   =  r  and  x2  =  v. Sensors will measure the actual x1   and x2, provide that information to a computer

    that will compare those values to the desired ones, and  feed-back   automatically a value of  F   that willdecrease the error. Just to give a simple example, take  F   = K (xd1−x1) = −Ke, where xd1  is the desiredposition of the mass M   and e  stands for  error, e  =  x1 − xd1.   Note:   if x1   > xd1, then e >  0  but  F <  0;if instead x1  < x

    d1, then e  0. Error and control action have the opposite sign: this is called

    negative feedback. The system model will change:

    ẋ1ẋ2

     =

      0 1

    − kM   −   b

    x1x2

     +

    01

    g +

     0K M 

    (xd1 − x1)

    =   0 1

    −k+K M 

      −  bM    

    New matrix!

    x1x2 +

    0 01   1

    M  g xd1

    5. Finally, we can represent with simple schemes all the dynamic relationships we just described with ODEs:

    b

    +-

    xd

    1

    g

    x1

    x2

    -

    -+

    +

    Z +

    -

    d

    1

    g

    x1

    x2

    -

    -+

    +

    b

    k

    1

    Equivalent scheme

    k

    Figure 7: Mass-spring-damper system: block diagram. Note: the common factor 1/M   can be moved in thediagram as long as the overall physical interconnections are consistent.

    I.3 Electrical circuits

    Electronic devices are present in almost every technological application! Control theory developed around

    analysis of electrical circuits.

    1. Resistances, capacities and inductors. These are the fundamental elements of any circuit, and are char-

    acterized by specific dynamic relationships between their currents and voltages.

    Resistance Inductor Capacity

    V   = Ri V   = Ldi

    dt  i =  C 

    dV 

    dt

  • 8/18/2019 ME121 Week1 2 Review

    7/21

    Elisa Franco    7

    +

    i(t)

    +

    +

    _

    i(t)

    V   (t)

    __

    V   (t)   V   (t)

    i(t)

    Figure 8: Fundamental elements of electrical circuits

    R

    Lu(t)   i(t)

    Figure 9: A series RL circuit

    2. A series RL circuit.

    We use Kirchhoff’s voltage law:  u =  V R + V L  = Ri + Ldidt . We immediately have a dynamic relationship

    describing the only state of the system:di

    dt =

      1

    Lu−  R

    Li

    This is a first order system and has exponential dynamics.

    3. An RC circuit: derive its state space representation as homework.

    R

    u(t)   i(t)   C

    Figure 10: A series RC circuit

    4. An LC circuit.

    Now Kirchhoff’s voltage law tells us:

    u =  V L + V C  = Ldi

    dt + V C 

    Now, note that i  =  iL =  iC , and i  =  C dV  dt

      . This yields:

    u =  LC d2V C 

    dt2  + V C 

    We have now a second order differential equation; as done for the mechanical system, we define x1 =  V C ,x1  =

      dV  cdt

      :

    ẋ1 =  x2

    ẋ2 = −   1LC 

    x1 +  1

    LC u

  • 8/18/2019 ME121 Week1 2 Review

    8/21

    Elisa Franco    8

    u(t)   i(t)   C

    L

    Figure 11: A series LC circuit

    In matrix form: ẋ1ẋ2

     =

      0 1−   1

    LC   0

    x1x2

     +

      01LC 

    u =  Ax + Bu

    Notice the similarity of the A matrix structure with that of the mass-spring example.

    5. An RLC circuit: derive its state space representation as homework.

    R L

    Cu(t)   i(t)

    Figure 12: A series RLC circuit

    I.4 Using Matlab to numerically solve ordinary differential equations

    Matlab is extremely useful to solve differential equations numerically.

    Matlab offers several ordinary differential equation solvers. The syntax is the same for all of them. The most

    important feature: the dynamics of the system have to be defined in a separate  function file (see below). (In

    some cases, functions can be nested in the main file.) As an example, here is the code that will simulate themass-spring-damper system. Try to run this code, change the damping and spring constants and see what

    happens!

    Main file:

    %MAIN FILE

    clear all

    close all

    % DEFINE PARAMETERS:

    par.k= 14.8e3; % N/m

    par.b= 800; % Ns/m

    par.M= 400; % Kg

    % NOTE: WE ARE PUTTING ALL THE PARAMETERS IN A SINGLE struct ELEMENT, SO

    % IT IS EASIER TO PASS IT TO THE SOLVER!

    % WE COULD ALSO DEFINE THEM AS

    % SEPARATE VARIALBES AND PASS EACH OF THEM TO THE SOLVER

  • 8/18/2019 ME121 Week1 2 Review

    9/21

    Elisa Franco    9

    % INITIAL CONDITION

    x0=[10 1];

    % TIME DURATION OF THE SIMULATION

    tspan=[0:.1:10];

    %OPTIONS FOR THE SOLVER

    options = odeset(’RelTol’,10^-11,’AbsTol’,10^-13);

    [t,x]=ode45(@MassSpringDamper,tspan,x0,options,par);

    plot(t,x(:,1),’b’,’LineWidth’,3)

    hold on

    plot(t,x(:,2),’r’,’LineWidth’,3)

    hold on

    % PLOT, PRINT AND SAVE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    legend(’Position’, ’Speed’)legend boxoff

    Fsize=16;

    FontForPlot=’Arial’;

    set(gca,’Fontsize’,Fsize, ’FontName’,FontForPlot) % SETS FONT AND FONTSIZE FOR AXES

    xlabel(’Time, [s]’,’Fontsize’,Fsize, ’FontName’,FontForPlot)

    ylabel(’Response’,’Fontsize’,Fsize, ’FontName’,FontForPlot)

    set(gcf, ’PaperPositionMode’, ’manual’);set(gcf, ’PaperUnits’, ’centimeters’);

    set(gcf, ’PaperPosition’, [0 0 15 10])

    print(gcf,’-dpdf’, [’MassSpringDamper’])

    Function fileMust be saved with the same name as the function! In this case, save as  MassSpringDamper.m

    function dx=MassSpringDamper(t,x,par)

    % F(1) AND F(2) ARE THE DYNAMICS OF THE SYSTEM

    F(1)= x(2);

    F(2)= -(par.k/par.M)*x(1) - (par.b/par.M)*x(2);

    dx=F’; % MUST RETURN A COLUMN VECTOR

  • 8/18/2019 ME121 Week1 2 Review

    10/21

    Elisa Franco    10

    II The Laplace transform method to solve ordinary differential equations

    Laplace transforms are useful to solve linear time invariant differential equations. Differential equations are

    turned into algebraic equations; the solution in the time domain can be found by decomposing the algebraic

    solution in the Laplace domain into terms that are easy to reverse-transform.

    II.1 DefinitionLaplace Transform (LT): bijective (invertible) transformation that maps functions of time  f (t)   with functions ofcomplex argument F (s), s =  σ  + jω  ∈ C.

    t   ∈   RFunctions of time

    Differential equations

    L

    L−1

    Functions of complex variables

    Algebraic equationss   ∈   C

    THE SCHEME ABOVE IS THE MOST IMPORTANT THING YOU SHOULD REMEMBER ABOUT LAPLACE

    TRANSFORMS!

    Given f (t), piecewise continuous and bounded, f (t) = 0 for t ≥ 0

    F (s) = L[f (t)]    +∞0−

    f (t)e−stdt

    For those values of s ∈   C such that the integral converges.If the integral converges for  s0, then it does ∀ s such that Re{s} > Re{s0} = σ0.The value σ0  limits the region of convergence , or ROC, of the transform (Figure  13).

    σ

     j ω

    σ0

    Figure 13: Example of region of convergence of Laplace Transforms

    II.2 Common Laplace transforms (LT)

    Notation: I will indicate as  1(t)  a  step function, which is zero for negative time, and equal to one for  t ≥  0.When we multiply a function by  1(t), for instance et 1(t), it means we consider the function only for t ≥ 0.

    1. LT of Dirac’s δ  function:

  • 8/18/2019 ME121 Week1 2 Review

    11/21

    Elisa Franco    11

    Dirac’s delta function, can be defined in many ways...   Intuitively, it is a very large signal with a very

    short duration. Also called impulse.

    δ σ(x− x0) = limσ→0 1σ√ πe−(x−x0)

    2

    σ2

     x x 0

       

    In the limit for σ → 0:

       t

    0f (τ )δ σ(τ  − τ 0)dτ  = f (τ 0)

    L [δ (t)] =   +∞0−

    δ (t)e−stdt =

       +∞−∞

    δ (t)e−stdt = 1

    2.  LT of the step function:

    L [1(t)] =   +∞0−

    1(t)e−stdt = −1s

    [e−st]∞0   = 1

    s

    3.  LT of the exponential function:

    L ekt1(t) =    +∞

    0− ekt

    e−st

    dt =    +∞

    0− e(k−s)t

    dt =

      1

    k − s [e(k−s)t

    ]+∞

    0   =

      1

    s− k

    4.  LT of time to the power n:  tn

    L [tn1(t)] = (−1)n{(−1)n   n!sn+1

    } =   n!sn+1

    5.  LT of the sine function  sin(ωt).Use Euler formulas e jφ = cos φ + j   sin φ ,  e− jφ = cos φ− j   sin φ.

    L e jωt − e− jωt

    2 j  · 1(t) =

      1

    2 j   1

    s

    − jω −   1

    s + jω =  1

    2 j

    2 jω

    s2 + ω2  =

      ω

    s2 + ω2

    6.  LT of the cosine function cos(ωt).

    L

    e jωt + e− jωt

    2  · 1(t)

     =

     1

    2

      1

    s − jω  +  1

    s + jω

     =

     1

    2

    2s

    s2 + ω2  =

      s

    s2 + ω2

  • 8/18/2019 ME121 Week1 2 Review

    12/21

    Elisa Franco    12

    II.3 Properties of Laplace transforms

    1.   Linearity The integral operation is linear, therefore the LT inherits such property:

    L[c1f 1(t) + c2f 2(t)] = c1L[f 1(t)] + c2L[f 2(t)]

    2.  Transformation of the integral Given f (t) and g(t) =

     t

    0− f (τ )dτ , where the LT of  f (t) is  F (s):

    L[g(t)] = 1sL[f (t)]

    3.  Trasformation of the derivative Given f (t) and its derivative f (t), where the LT of  f (t) is  F (s):

    L f (t) =  sL [f (t)]− f (0−)This can be extended to the derivative of order  n:

    L

     dn

    dtnf (t)

     =  snL [f (t)] −

    n−1k=0

    sn−k−1f k(0−)

    4.   Frequency shift Given F (s), the LT of f (t), and k

     ∈C. Then, the LT of function ektf (t) is:

    L

    ektf (t)

     =  F (s− k)In fact:    +∞

    0−ektf (t)e−stdt =

       +∞0−

    f (t)e−(s−k)tdt

    5.   Multiplication by tn Assume n  = 1, and develop the derivative of F (s):

    d

    dsF (s) =

      d

    ds

       +∞0−

    f (t)e−stdt =

       +∞0−

    f (t) d

    dse−stdt

    =

      −    +∞

    0−

    f (t)te−stdt =

    −    +∞

    0−

    tf (t)e−stdt =

    −L[tf (t)]

    This yields the general formula:

    L [tnf (t)] = (−1)n  dn

    dsnF (s)

    6.   Convolution VERY IMPORTANT property of the LT.

    Given f (t), g(t), f (t) = g(t) = 0 for t ≤ 0,

    z(t) f (t) g(t) =

       t0

    f (τ )g(t− τ )dτ 

    Then the Laplace transform of z(t) isZ (s) = F (s)G(s)

    LAPLACE TRANSFORMS CONVERT CONVOLUTION INTEGRALS IN SIMPLE PRODUCTS!

    Application: remember the general expression for the forced response of an linear time invariant system?

    xF (t) =

       t0−

    eA(t−τ )Bu(τ )dτ  =

       t0−

    h(t− τ )w(τ )dτ,

    where h(t) := eA(t−τ ) is the state transition matrix and w(t) := Bu(t). We find:

    X (s) = H (s)W (s)

    We will see that this product is very easy to handle!

  • 8/18/2019 ME121 Week1 2 Review

    13/21

    Elisa Franco    13

    7.  Time shift If  f (t)  admits a LT, the introduction of a time shift t0  > 0  still yields a LT with the same ROCand :

    L [f (t− t0) · 1(t− t0)] = e−st0F (s)This can be shown with a change of variable:

       +∞

    0−

    f (t

    −t0)e

    −stdt =    +∞

    −t0

    f (τ )e−sτ e−st0dt =  e−st0F (s)

    8.   Time scaling (Not too frequently used)

    L [f (at)] = 1a

    F s

    a

    , a ∈ R+

    Again this can be proved with a change of variables:   +∞0−

    f (at)e−stdt =

       +∞0−

    f (t)e−sτ a dτ 

    a

     =

     1

    aF  s

    a

    II.4 Inverse Laplace Transform

    Given F (s) = L [f (t)], its Inverse Laplace Transform (ILT) is denoted as  f (t) = L−1 [F (s)]; the operatorL−1 is linear. The general formula is:

    f (t) =  1

    2π j

       σ̄+ j∞σ̄− j∞

    F (s) estds

    where  σ̄ > σ0  delimits the ROC and the integration is along the vertical line σ  = σ̄.There is a lot of theory on the ILTs. This is outside of the scope of this course.

    Our approach to inverting LTs will be to try to reduce a general complex function to a sum of

    elementary, known LTs which we can straightforwardly invert.Most LTs we will encounter are rational polynomial functions which can be expanded in partial fractions.

    PARTIAL FRACTION EXPANSION

    (a) Example 1 Antitransform

    G(s) =  1

    s2 − 3s + 2We want to reduce this to a sum of simple monomial fractions.

    i. Find the roots of the denominator of G(s)

    s1,2 = 3±√ 9 − 8

    2  =

    21

    ii. Expand in partial fractions

    G(s) =  1

    s2 − 3s + 2  =  A

    s− 2 +  B

    s − 1 = A(s − 1) + B(s − 2)

    (s− 2)(s− 1)

    s(A + B)− (A + 2B) = 1   ⇔

    A + B = 0

    A + 2B = −1

  • 8/18/2019 ME121 Week1 2 Review

    14/21

    Elisa Franco    14

    So we find A  = 1, B  = −1. Therefore:

    G(s) =  1

    s − 2 −  1

    s − 1   ⇒ L−1 [G(s)] = g(t) = e2t − et

    Which was easy to find using the Laplace transform of the exponential function.

    (b)   Example 2 Antitransform:

    G(s) =

      1

    s(s2 + 1)

    Using partial fractions expansion:

    G(s) = 1

    s

    1

    s2 + 1 =

      −ss2 + 1

     + 1

    s

    The time function is g(t) = 1(t)− cos(t)(c)   Example 3 Antitransform:

    G(s) =  1

    s2 + 2s + 2

    G(s) =  1

    s2

    + 2s + 2

     =  1

    (s + 1 − j)(s + 1 + j)=

      1

    (s + 1)2 + 1

    Now we apply the frequency shift property, and we can find:

    g(t) = e−t sin t

    II.5 Using Laplace Transforms to solve ODEs

    We will start with an example. Consider this differential equation:d2ydt

      + 3  dydt

     + 2y(t) = (1 + 3t)u(t)

    y(0−) = 1,   dydt |

    t=0−  = 0

    If u(t) = 1(t), let’s apply the property of LT for the derivatives:s2 Y (s)− s y(0−) −  ẏ(0−) + 3 [s Y (s)− y(0−)] + 2 Y (s) = 1

    s +

      3

    s2

    s2 Y (s)− s

     + {3 [s Y (s)− 1]}+ 2 Y (s) = 1

    s +

      3

    s2

    (s2 + 3 s + 2)Y (s)− s − 3 = 1

    s  +  3

    s2

    This is an algebraic equation in s  we can easily solve for Y (s) :

    Y (s) =  s + 3

    s2 + 3 s + 2 +

      1

    s2 + 3 s + 2

    1

    s +

      3

    s2

     =  Y N (s) + Y F (s)

    Y N (s):   Natural response , depends on initial conditions!Y F (s):  Forced response , depends on the input u(t)!Now we need to go back to the time domain to find y(t)!

  • 8/18/2019 ME121 Week1 2 Review

    15/21

    Elisa Franco    15

    •  Natural response Y N .The roots of the denominator are:  s1 = −1, s2 = −2. Then:

    Y N  =  C 1(s + 1)

     +  C 2(s + 2)

    Find C 1  and  C 2:

    Y N  =  C 1(s + 2) + C 2(s + 1)(s2 + 3s + 2)

      =  s(C 1 + C 2) + 2 C 1 + C 2(s2 + 3s + 2)

      =   s + 3s2 + 3 s + 2

    Equating the numerators: C 1 + C 2 = 1

    2 C 1 + C 2 = 3

    We get C 1 = 2, C 2 = −1.

    Y N  =  2

    (s + 1) −   1

    (s + 2)

    These two terms are in our list of common LTs...

    =⇒ L−1 [Y N ] =⇒ yN (t) = 2 e−t − e−2t

    •   Forced response Y F .Roots of the denominator:  s1  = −1, s2  = −2, s3  = 0, where zero is a root that is repeated twice.Expansion in simple fractions:

    Y F   =  C 1(s + 1)

     +  C 2(s + 2)

     + C 3,1

    s2  +

     C 3,2s

    The final inverse transform is:

    yF (t) = 3

    2t−  7

    41(t) + 2 e−t −  1

    4e−2t

    9. Let’s recap:

    (a) We have a method to write down systems in state space form and solve the ODEs.

    (b) We have seen how to find the solution to an ODEs applying directly the Laplace transform method

    to the differential equation.

    Now let’s use this method to analyze a model of a physical system and find the solution to the ODEs.

    Consider a modification of our mass-spring system, operating on a horizontal plane with dynamic friction

    - Figure 14.

    0

    kl0   u(t)

    l(t)

    Figure 14: Another mass-spring system with dynamic friction

    We know how to obtain the differential equation that describes it:

    M d2(l − l0)

    dt2  + k(l − l0) + b d(l − l0)

    dt  = u(t)

  • 8/18/2019 ME121 Week1 2 Review

    16/21

    Elisa Franco    16

    b  ddt

    (l − l0) is a term describing viscous friction.Defining y  = (l − l0):

    M d2y

    dt2  + k y + b

    dy

    dt  = u(t)

    Applying directly the Laplace Transform Method:

    M  [s2Y (s)− sy(0) −  ẏ(0)] + kY (s) + b [sY (s)− y(0)] = U (s)Solve for Y (s):

    Y (s)(M s2 + bs + k) = sM y(0) + M  ẏ(0) + by(0) + U (s)

    Y (s) = (sM  + b)y(0) + M  ẏ(0)

    M s2 + bs + k   natural response

    +  U (s)

    M s2 + bs + k   forced response

    II.6 Poles and zeros

    The most common type of Laplace transforms we will encounter is:

    F (s) = N (s)

    D(s), N (s), D(s) polynomials in s  =  σ + jω

    deg(D) = nd, deg(N ) = nd, nn < nd

    This can be rewritten as:

    F (s) = N (s)

    D(s) = K 

      (s− z1)r1(s− z2)r2 · · · (s − zr)rq(s−

     p1)m1(s−

     p2)m2

    · · ·(s−

     pn)mn

    IMPORTANT DEFINITIONS:

    •   z j  zeros, j  = 1,...,q . The scalar r j   is called multiplicity of each zero.•   pi  poles of the function, i  = 1,...,n. The scalar mi  is called multiplicity or each pole.

    Expand in partial fractions:

    F (s) =  C 1,1(s− p1) +   ...   +

      C 1,m1(s− p1)m1 +

    +  C 2,1(s−

     p2) +   ...   +

      C 2,m2(s−

     p2)m2+

    +  C n,1(s− pn) +   ...   +

      C n,mn(s− pn)mn

    Linearity:

    L−1 [F (s)] =ni=1

    mik=1

    L−1

      C i,k(s − pi)k

    The ILT of each simple fraction has the form:

    L−1

      C i,k(s − pi)k

     =

      C i,k(k − 1)! t

    (k−1) e pit 1(t)

  • 8/18/2019 ME121 Week1 2 Review

    17/21

    Elisa Franco    17

    NOTE: Repeated poles are associated to exponential functions multiplied by a power of time factor. What drives

    the convergence of each term is the sign of the real part of the pole. (Exponential functions converge or diverge

    faster than any power.)

    Going back to the use of Laplace transforms to solve linear time invariant systems.: recall our definition of

    eigenvalues of the A  matrix in state space form. The poles are a subset of the eigenvalues of A.

    Real poles:

    L−1

      1

    (k − 1)! t(k−1) e pt

    For p > 0: time function diverges!!

    0 5 100

    0.2

    0.4

    0.6

    0.8

    1

    p0

    0 5 100

    0.1

    0.2

    0.3

    0.4

            k    =        2

    0 5 100

    2

    4

    6

    8

    10

    0 5 100

    0.5

    1

    1.5

    2

    2.5x 10

    5

    0 5 100

    0.1

    0.2

    0.3

    0.4

            k    =        3

    Time0 5 10

    0

    10

    20

    30

    40

    50

    Time0 5 10

    0

    5

    10

    15x 10

    5

    Time

  • 8/18/2019 ME121 Week1 2 Review

    18/21

    Elisa Franco    18

    Complex poles

    L−1

      1

    (k − 1)! t(k−1) e(σ+ jω)t

    For   σ >   0: time function diverges!!   ω   =5rad/s

    0 5 10−1

    −0.5

    0

    0.5

    1

    σ0

    0 5 10−0.4

    −0.2

    0

    0.2

    0.4

            k    =        2

    0 5 10−10

    −5

    0

    5

    10

    0 5 10−2

    −1

    0

    1

    2

    3x 10

    5

    0 5 10−0.4

    −0.2

    0

    0.2

    0.4

            k    =        3

    Time

    0 5 10−50

    0

    50

    Time

    0 5 10−1

    −0.5

    0

    0.5

    1

    1.5x 10

    6

    Time

  • 8/18/2019 ME121 Week1 2 Review

    19/21

    Elisa Franco    19

    III Block diagrams

    As a consequence of the convolution property of Laplace transforms (convolution integrals become products!)

    we can represent dynamical systems in a very simple and convenient way.

    As an example, consider again the mass-spring-damper system in Fig.  15:

    0

    Mg

    r(t)

    bk

    Figure 15: Mass-spring-damper system

    M ̈r =  M g − kr − bṙAssuming zero initial conditions, and applying the derivative rule:

    M s2R(s) = M g − kR(s)− sbR(s)R(s) =

      M 

    M s2 + sb + kg

    See Figure 16. This is an input-output (I/O) representation.

    We do not include information about initial conditions.

    g   R(s)Ms2 + sb+ k

    Figure 16: Mass-spring-damper system: block diagram in the Laplace complex domain

    With Laplace transforms we can represent interconnected systems of differential equations with blocks. And

    (because of the convolution property) there are some useful simplification rules. These block diagrams are

    much simpler than the diagrams in the time domain - see, for instance, Fig. 7.1) Series, Figure 17

    H 1(s)   H 2(s)U (s)   Y   (s)

    H 1(s) ·  H 2(s)U (s)   Y   (s)

    Figure 17: Representation of blocks in series the Laplace domain

    2) Parallel, Figure 18. 3) Negative feedback: In this case, we need to do a few steps to derive the mathematical

    expression of the equivalent block in Figure 19.

  • 8/18/2019 ME121 Week1 2 Review

    20/21

    Elisa Franco    20

    U (s)   Y   (s)   U (s)   Y   (s)H 1(s) +  H 2(s)

    H 1(s)

    H 2(s)

    Figure 18: Representation of blocks in parallel the Laplace domain

    If our error is E (s) = Y d(s)−H (s)Y (s), where Y d(s) is the desired  output in the Laplace domain, we have thatY (s) = G(s) [Y d(s)−H (s)Y (s)]. Therefore, we collect Y (s) and derive:

    Y (s)(1 + G(s)H (s)) = G(s)Y d(s) =⇒   Y (s) =   G(s)1 + G(s)H (s)

    Y d(s)

    Y s   Y   (s)+ _ 

    H (s)

    G(s)E (s)   G(s)

    1 + G(s)H (s)

    Y  d(s)   Y  d(s)

    Figure 19: Representation of blocks in a negative feedback interconnection, in the Laplace domain

  • 8/18/2019 ME121 Week1 2 Review

    21/21

    Elisa Franco    21

    III.1 Exercises

    Antitransform the following complex functions:

    •  Exercise 1:F (s) =

     s + 3

    s + 5

    Solution: f (t) = δ (t)− 2e−5t

    •  Exercise 2:F (s) =

      s + 1

    s2 + 2s + 5

    Solution: f (t) = e−t cos(2t)

    •  Exercise 3:F (s) =

      12

    (s + 2)2 + 9

    Solution: f (t) = 4e−2t sin(3t).

    •  Exercise 4:F (s) =

      (s − 1)(s2 − 6s + 25)

    Solution: f (t) = e3t(cos(4t) +   12 sin(4t))