MATLAB can use the Transfer Function or the State Space Model to find the Poles and Zeros, Step Response, Impulse Response, and Bode Plot of a system.  This section shows the characteristics of the response of common types of systems to common test inputs.  In the MATLAB syntax that follows either a Transfer Function system or a State Space Model system can be used.

POLES AND ZEROS

The poles of a system are the values of 's' which make the denominator of the transfer function equal to zero or equivalently they are the eigenvalues of the 'A' matrix of the state space model.  They determine the stability of the system.  The zeros of a system are the values of 's' which make the numerator of the transfer function equal to zero.  They affect the time response but do not determine stability.

pole(system)

tzero(system)

where system is the name of the transfer function or state space system.

STEP RESPONSE

The Step Response illustrates how the system responds when a constant input is suddenly applied.

step(u * system)

where u is defined as the step input and  system is the name of the transfer function or state space system.

DC GAIN

The DC gain is the ratio of the steady state step response to the magnitude of a step input.  

dcgain(system)

where system is the name of the transfer function or state space system.

DAMPING RATIO

The damping ratio is the ratio of the actual damping to 2wn for a second order or higher system.  

damp(system)

where system is the name of the transfer function or state space system.

IMPULSE RESPONSE

The Impulse Response illustrates how the system responds when a brief input is applied.

impulse(u * system)

where u is defined as the impulse input and  system is the name of the transfer function or state space system.

BODE PLOT

Bode plots are a graphical representation of the frequency on a logarithmic scale.  They are useful for system identification, analysis, and controller design.  

The Bode consists of two plots, 20log(10) of the magnitude of the frequency response vs. log(10) of frequency, and the phase of the frequency response in degrees vs. log(10) of frequency.  

bode(system)

where system is the name of the transfer function or state space system.

 

CHARACTERISTICS OF VARIOUS SYSTEMS

FIRST ORDER SYSTEM  

G(s) = b/(s+a) = kdc/(ts+1)

Zero/Pole - The first order system has a single pole at -a.  If the pole is on the negative real axis, then the system is stable.  If the pole is on the positive real axis, then the system is not stable.  The zeros of a first order system are the values of s which makes the numerator of the transfer function equal to zero.

DC Gain - The DC gain is the ratio of the steady state step response to the magnitude of a step input.  The DC Gain is the value of the transfer function when s = 0, which is equal to b/a or kdc for a first order system.

Settling Time - The settling time is the time to fall within a certain percentage of the steady state value for a step input or equivalently to decrease to a certain percentage of the initial value for an impulse input.  The equations for settling time are:

10% 5% 2%
2/a or 2τ 3/a or 3τ 4/a or 4τ

Time Constant - The time constant is the time to reach 63% of the steady state value for a step input or to decrease to 37% of the initial value for an impulse input.  The equation for the time constant is:

Bode Plot - The low frequency magnitude of the bode plot is 20log(10) of the DC gain.  The magnitude plot has a bend at the frequency equal to the absolute value of the pole (ie. w = a), and then decreases at 20dB for every factor of ten increase in frequency (-20dB/decade).  The phase plot is asymptotic to 0 degrees at low frequency, and asymptotic to -90 degrees at high frequency.  Between frequency 0.1a and 10a, the phase changes by approximately -45 degrees for every factor of ten increase in frequency (-45 degrees/decade).

 

SECOND ORDER SYSTEM

G(s) = a/(s2+bs+c) = kdcωn2/(s2+2ζωns+ωn2)

Settling Time - The settling time is the time to fall within a certain percentage of the steady state value for a step input or equivalently to decrease to a certain percentage of the initial value for an impulse input.  The equations for settling time are:

10% 5% 2%
2 / ζωn 3 / ζωn 4 / ζωn

Percent Overshoot - The percent overshoot is the maximum fraction by which the response overshoots the steady state value expressed as a percentage.  It equals e-ζπ/sqrt(1-z2).

DC Gain - The DC gain is the ratio of the steady state step response to the magnitude of a step input.  The DC Gain is the value of the transfer function when s = 0, which is equal to a/c or kdc for a second order system.

Natural Frequency - The natural frequency is the frequency at which the system would oscillate if there were no damping (ie. if ζ = 0).  The natural frequency is ωn= sqrt(c).

Damping Ratio - The damping ratio is the ratio of the actual damping to 2ωn.  The damping ratio is ζ = b/(2sqrt(c)).

Zero/Pole - Zeros occur There are two poles at -ζωn ± jωn sqrt(1-ζ2).  The poles are real if the two poles lie on the real axis and contains no imaginary part (ωn sqrt(1-ζ2) = 0).  If the poles are real, the system is overdamped.  The poles are complex if neither ζωn or ωn sqrt(1-ζ2) equals zero giving the pole both a real and imaginary part.  If the poles are complex, the system is underdamped.  If the poles consist of only an imaginary part and no real part (ζωn = 0), the poles are imaginary.  If the poles are imaginary, the system is undamped.  If either pole has positive real component, the system is unstable.  The zeros of a second order system are the values of 's' which make the numerator of the transfer function equal to zero.

Bode Plot - The magnitude of the bode plot of a second order system drops off at -40dB per decade, while the relative phase changes from 0 to -180 degrees at -90 degrees per decade.

HIGHER ORDER SYSTEM

Frequency Response - Higher order systems have many variations and are so complex that parameters that characterize the first and second order systems are difficult to generalize on a higher order system.  The most general way to study a higher order system is by examining its frequency response.  

Zero/Pole - The stability of a higher order system can still be determined by the poles of the transfer function.

DC Gain - The DC gain is the ratio of the steady state step response to the magnitude of a step input.  The DC Gain is the value of the transfer function when s = 0.

 

EXAMPLE

Our tutorial system is a second order system governed by the transfer function in the form, G(s) = a/(s2+bs+c) = kdcωn2/(s2+2ζωns+ωn2):  

X(s)/F(s) = 1/[ms2 + bs + k] where m = 2, b = 5, and k = 3, so using MATLAB:

>> m = 2;
>> b = 5;
>> k = 3;
>> a = 1/m
>> b = b/m
>> c = k/m

a =

    0.5000


b =

    2.5000


c =

    1.5000

For the sake of simplicity the following example will use a new system name, tutorial_sys, which is interchangable with both the equivalent transfer function system, tutorial_tf, and the state space system, tutorial_ss, defined previously.

>> tutorial_sys = tutorial_tf = tutorial_ss

 

NATURAL FREQUENCY

The natural frequency is ωn= sqrt(c).  

>> wn = sqrt(c)

wn =

    1.2247

DAMPING RATIO

The damping ratio is ζ = b/(2sqrt(c)).

>> zeta = b/(2*sqrt(c))

zeta =

    1.0206

To find the damping ratio of the system using MATLAB's damp function.

>> damp(tutorial_sys)

ans = 

    1.0210

POLES

A second order system has two poles at -ζωn ± jωn sqrt(1-z2).

In this example the two poles occur at:

>> pole1 = -zeta*wn + j*wn*sqrt(1-zeta^2)

>> pole2 = -zeta*wn - j*wn*sqrt(1-zeta^2)

pole1 =

    -1.5000


pole2 =

    -1.0000

To find the pole(s) of the system using MATLAB's pole function.  

>> pole(tutorial_sys)

ans =

   -1.5000

   -1.0000

This second order system has two negative real poles, poles that have only negative real parts and no imaginary parts, so this system is overdamped and stable.

 

ZEROS

The zero of a system is when the numerator of the transfer function equals zero, which makes the value of the transfer function zero.  By inspection the numerator of this example problem equals 1, so no value of s will yield a numerator equaling zero.

To find the zero(s) of the system using MATLAB's tzero function.

>> tzero(tutorial_sys)

ans =

   Empty matrix: 0-by-1

This system has no zero, meaning that no value of s will make the numerator equal zero.

 

STEP RESPONSE

The Step Response illustrates how the system responds when a constant input is suddenly applied.  In order to find the step response of this system using MATLAB, use the step function.

First to find the unit step response, u = 1.

>> u = 1;

>> step(u * tutorial_sys)

The MATLAB output will be the following plot of the unit step response:

This shows how the system will respond with a constant input force of 1 unit applied suddenly at t = 0.

Next to find the step response when u = 4.

>> u = 4;

>> step(u * tutorial_sys)

The MATLAB output will be the following plot of the step response:

 

This shows how the system will respond with a constant input force of 4 units applied suddenly at t = 0.

 

SETTLING TIME

The settling time is the time it takes to fall within a certain percentage of the steady state value for a step input or equivalently to decrease to a certain percentage of the initial value for an impulse input.  The settling times for a system are:  

10% 5% 2%
2 / ζωn 3 / ζωn 4 / ζωn

With a damping ratio greater than 1, and with both real poles, this system is overdamped.  An overdamped system cannot have its settling time calculated this way.

 

PERCENT OVERSHOOT

The percent overshoot is the maximum fraction by which the response overshoots the steady state value expressed as a percentage.  It equals e-zp/sqrt(1-z^2).

With a damping ratio greater than 1, and with both real poles, this system is overdamped.  An overdamped system will not overshoot.  

 

DC GAIN

The DC Gain is the ratio of the steady state step response to the magnitude of a step input.  The DC Gain is the value of the transfer function when s = 0, which is equal to a/c or kdc.

In this example setup the DC Gain equals a/c

>> k = a/c

k =

    0.3333

To find the DC Gain using MATLAB's dcgain function:

>> dcgain(tutorial_sys)

ans =

    0.3333

 

IMPULSE RESPONSE

The Impulse Response illustrates how the system responds when a brief input is applied.  In order to find the impulse response of this system with an input impulse of 2 use MATLAB's impulse function.

>> u = 2;

>> impulse(u * tutorial_sys)

The MATLAB output will be the following plot of the impulse response:

 

 

BODE PLOT

Bode plots are a graphical representation of the frequency on a logarithmic scale.  They are useful for system identification, analysis, and controller design.  In order to find the bode plot of this tutorial system using MATLAB, use the bode function.

>> bode(tutorial_sys)

The MATLAB output will be the following bode plot of the frequency response:

The magnitude of the bode plot of a second order system drops off at -40dB per decade at high frequencies, while the relative phase changes from 0 to -180 degrees at -90 degrees per decade at the intermediate frequencies.

 

Carnegie Mellon University | University of Michigan

Mechanical Engineering Department