Transfer Function · Lesson

English translation

Execution conditions

Find poles and zeros using python-control's ctl.poles and ctl.zeros.

If the module is missing, run %pip install control==0.10.2 in a Colab or Jupyter code cell.

Topics covered

Even with the same coefficients, responses depend on the interconnection and cancellation conditions. Practice predicting behavior from coefficients.

Overall workflow

Coefficient arrays → transfer function → poles and zeros → step response

Interpreting coefficient arrays as transfer functions

Connecting poles to actual responses

The time constant of exp(−0.2t), corresponding to the negative real pole −0.2, is 5 s. Examining the roots calculated from coefficients alongside the time response reveals the physical meaning of the calculation.

Series connection multiplies, parallel connection adds, and negative unity feedback also changes the denominator, giving H/(1+H).

Cancellation of common factors

(s+2)/((s+1)(s+2)) can be expressed as 1/(s+1) after cancellation. If the numerator's 2 changes to 2.1, cancellation is no longer exact. Examine both the model order and small response differences.

From coefficients to poles and responses

H(s)=1/(2s+1) has a pole at −0.5, a DC gain of 1, and a time constant of 2 s. Examine the equation and plot together below.

import numpy as np
import matplotlib.pyplot as plt
import control as ctl
s=ctl.tf('s')
H=1/(2*s+1)
print('Pole:',ctl.poles(H),'Zero:',ctl.zeros(H),'DC gain:',ctl.dcgain(H))
t=np.linspace(0,10,501);t,y=ctl.step_response(H,t)
fig,axes=plt.subplots(1,2,figsize=(9,3));axes[0].scatter([-0.5],[0],marker='x');axes[0].axvline(0,color='gray');axes[0].set(xlabel='Real',ylabel='Imaginary',title='Pole location');axes[0].grid()
axes[1].plot(t,y);axes[1].axvline(2,linestyle='--',color='gray');axes[1].set(xlabel='Time [s]',ylabel='Output',title='Unit step');axes[1].grid();fig.tight_layout()
Pole: [-0.5+0.j] Zero: [] DC gain: 1.0
실행 결과

Reference example

View more examples

Reference materials