Skip to content
Tutorials Center
My learning

Topics

Lesson 15 of 36 ยท Continuous and Discrete Systems

Simulink Transfer Function, Zero-Pole and State-Space Blocks

Use the Transfer Fcn, Zero-Pole and State-Space blocks for linear systems: coefficient order, poles and stability, DC gain, step response, and conversion between forms.

Many physical systems are, at least approximately, linear and time-invariant (LTI). For these you do not need to draw integrators one by one: Simulink has blocks that take the whole model as a transfer function, a set of poles and zeros, or a state-space description. Each form is the same mathematics in a different notation, and each has a block.

Simulink is not available on this site. We describe the blocks and commands of the real product; a Python stand-in simulates the same transfer function so you can see poles, gain and step response.

Transfer function

A transfer function relates output to input in the Laplace domain:

G(s) = (b_m s^m + ... + b_0) / (a_n s^n + ... + a_0).

The Transfer Fcn block (Continuous library) takes two row vectors, with coefficients in descending powers of s:

TEXT
Numerator coefficients:    [1]
Denominator coefficients:  [1 0.5 4]        % s^2 + 0.5 s + 4

That block represents G(s) = 1/(s^2 + 0.5 s + 4): the same spring-mass-damper as in Integrators and Differential Equations with force in and position out. Other facts:

  • The numerator order cannot exceed the denominator order (a proper system). When they are equal there is direct feedthrough.
  • Parameters can be workspace variables, so den = [m c k] works.
  • The block starts from a zero initial state. If you need a nonzero starting state, use a State-Space block.

Zero-Pole form

G(s) = K (s - z1)(s - z2) ... / ((s - p1)(s - p2) ...). The Zero-Pole block takes the vectors [z1 z2 ...], [p1 p2 ...] and the Gain K. Complex values must come in conjugate pairs: [-1+2i -1-2i]. Use it when you know the poles (for example from a design) and want to see them directly.

State-space form

x' = A x + B u, y = C x + D u. The State-Space block takes A, B, C, D and the initial state x0. It supports several inputs and outputs (MIMO), where one Transfer Fcn is only SISO. For the spring-mass-damper with state [x; v]:

MATLAB
A = [0 1; -4 -0.5];  B = [0; 1];  C = [1 0];  D = 0;

Which to choose?

Form Strength
Transfer Fcn Compact for one input, one output; matches textbook formulas
Zero-Pole Poles and zeros explicit
State-Space Multiple inputs/outputs, internal states, initial conditions, modern control design
LTI System (Control System Toolbox) Feeds any tf, zpk, ss object, including delays

Three ways to say the same thing

Transfer Fcn Coefficients of s
Zero-Pole Roots and gain
State-Space A, B, C, D matrices

Equivalent models, different strengths.

1 / 2

Poles tell the story

The poles are the roots of the denominator. They determine the response:

  • All poles in the left half plane (negative real part): stable; the output decays after a disturbance.
  • Any pole with positive real part: unstable; the output grows.
  • Complex poles: oscillation; the imaginary part sets the frequency, the real part sets the decay.
  • Poles far to the left are fast; the time constant of a real pole at -p is 1/p.

The DC gain (steady state response to a unit step) is G(0) = b_0 / a_0 for a stable system.

Python Stand-in: poles, DC gain and stability (Python)

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Simulating a transfer function

A Transfer Fcn block is simulated internally as a state-space model in a canonical form. For G(s) = b0 / (s^2 + a1 s + a0), the controllable canonical form is x1' = x2, x2' = -a0 x1 - a1 x2 + u, y = b0 x1. The Python below does just that with fixed steps.

Python Stand-in: Transfer Fcn as a state-space simulation (Python)

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The final value is close to the DC gain 1/4 = 0.25 after the ringing has died away.

Converting between forms

With the Control System Toolbox (read-only MATLAB):

MATLAB
G  = tf(1, [1 0.5 4]);          % transfer function object
sys = ss(G);                    % to state-space
[num, den] = ss2tf(A, B, C, D); % from matrices
z = zpk(G);                     % zero-pole-gain form
p = pole(G); step(G); bode(G)   % analyze

Converting transfer function to state-space is not unique: different state choices (realizations) give the same input-output behavior. Initial conditions mean different things in each, which is why the State-Space block is preferable if the starting state matters.

Pitfalls

  • Coefficient order is a classic mistake: [1 0.5 4] is s^2 + 0.5 s + 4, not 1 + 0.5 s + 4 s^2.
  • A pure differentiator s cannot be written as an improper Transfer Fcn; use a Derivative block with a filter or a proper approximation s/(tau*s+1).
  • Very high order transfer functions are numerically fragile; use zero-pole, state-space or split them in cascaded second-order sections.
  • Time delays are not rational: use a Transport Delay (see Delays, Lookup Tables and Nonlinear Blocks) or a Pade approximation.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What does the denominator vector [1 3 2] represent?

    Coefficients are in descending powers of s.
  2. 2. Which poles indicate a stable system?

    Stability requires all poles in the left half plane.
  3. 3. What is the DC gain of G(s) = 3/(s^2 + 2s + 6)?

    G(0) = 3/6 = 0.5.
  4. 4. Which block handles multiple inputs and outputs and explicit initial states?

    The State-Space block uses A, B, C, D matrices, an initial state vector, and supports MIMO.

Summary

  • Transfer Fcn, Zero-Pole and State-Space blocks describe linear systems in different equivalent forms.
  • Coefficients go in descending powers of s; the numerator order may not exceed the denominator order.
  • Poles in the left half plane mean stability; DC gain is b0/a0.
  • Choose State-Space for MIMO or when initial states matter; use the Control System Toolbox to convert and analyze.

Next: Discrete Time and Sample Times