In this example we will once again consider the motion of a truck seat equipped with suspension mounted inside a truck which has a suspension of its own. 

The dynamic equations derived from the free body diagram are in the time domain.  We will now learn how to convert the model into the frequency domain by using the Laplace Transform and determining the transfer function from the input yg to the output z2

HOW TO FIND THE LAPLACE TRANSFORM GOVERNING EQUATION

From the free body diagrams the time domain differential equations are:

0 = -m1z1" + b1(yg(t)' - z1') + k1(yg(t) - z1) - b2(z1' - z2') - k2(z1 - z2)

0 = - m2z2" + b2(z1' - z2') + k2(z1 - z2)

The notation for the Laplace Transform operation is L{ }

The Laplace Transform relations for a variable and its first and second derivatives are the following:

L{ z(t) } = Z(s)

L{ z’(t) } = sZ(s) – z(0)

L{ z"(t) } = s2Z(s) – sz(0) – z'(0)

To determine the transfer function, the initial conditions for this system are assumed to be zero.  z1(0) = z2(0) = 0, z1'(0) = z2'(0) = 0.

Taking the Laplace Transform of the governing equation and rearranging yields the following:

(m1s2 + (b1 + b2)s + (k1 + k2))Z1(s) - (b2s + k2)Z2(s) = (b1s + k1)Yg(s)

-(b2s + k2)Z1(s) + (m2s2 + b2s + k2)Z2(s) = 0

To solve for the variable Z2(s) in terms of Yg(s) it is useful to arrange the equations into vector-matrix form and apply linear algebra:

The next step is to multiply both sides of the above equation by the inverse of the 2-by-2 matrix.  The formula for the inverse of a 2-by-2 matrix is:

where:

In this example:

After substituting in q, and multiplying both sides of the equation by the inverse, the result is:

Continuing to reduce the right hand side gives:

Finally the expression for Z2(s) is:

Substituting in for g21, q, and gives:

The transfer function is the ratio of the output Laplace transform to the input Laplace transform.  So the transfer function of this fourth order system is:

 

HOW TO INPUT THE TRANSFER FUNCTION INTO MATLAB

We will now enter this transfer function into MATLAB.  Because MATLAB cannot manipulate symbolic variables, we will now assign numerical values to each parameter. 

m1 = 10000 kg
m2 = 150 kg
b1 = 300,000 Ns/m
b2 = 1200 Ns/m
k1 = 100,000 N/m
k2 = 11000 N/m

>> m1 = 10000; m2 = 150; b1 = 300000; b2 =1200; k1 = 100000; k2 = 11000;

MATLAB's tf function allows the variable s to be used symbolically in the frequency domain.  To convert s to the Laplace variable, type:

>> s = tf('s')

Transfer function:
s

Once s has been assigned as the Laplace variable, transfer functions can be specified directly as rational expressions in s.  To assign our example transfer function to the system named higher_tf, type the following:

>> higher_tf = (b2*s+k2)*(b1*s+k1)/((m1*s^2 + (b1+b2)*s + (k1+k2))*(m2*s^2+b2*s+k2)-(b2*s+k2)^2)

Transfer function:
                3.6e008 s^2 + 3.42e009 s + 1.1e009
------------------------------------------------------------------
1.5e006 s^4 + 5.718e007 s^3 + 4.867e008 s^2 + 3.42e009 s + 1.1e009

 

STEP RESPONSE USING THE TRANSFER FUNCTION

Now that we have the transfer function entered into MATLAB we can use MATLAB to do many useful calculations including determining the step response.  Because the transfer function is in the form of output over input and we are interested in finding the output, the transfer function must be multiplied by the input function.  The step response models how the truck seat would respond to a sudden change in the level, yg = 0.1m, of the pavement like an uneven transition between an older road and a newly paved section.  

>> yg = 0.1;
>> step(yg * higher_tf)

BODE PLOT USING THE TRANSFER FUNCTION

MATLAB’s bode command plots the frequency response of a system as a bode plot.  This helps to model how the truck will respond over rutty pavement of various frequencies.

>> bode(higher_tf)

Carnegie Mellon University | University of Michigan

Mechanical Engineering Department