The transfer function of a system
About this lesson
Take the cart from the lesson on equations of motion, 2ẍ + 4ẋ + 50x = f(t), and Laplace-transform it term by term. The ratio of output to input, G(s) = 1/(2s² + 4s + 50), is its transfer function: one block that turns any input into an output by multiplication. Read its DC gain and poles, then feed it a push and a tap and watch the exact responses it predicts.
Start from the equation
The 2 kg cart from the equations-of-motion lesson obeys 2ẍ + 4ẋ + 50x = f(t), where ẋ is velocity and ẍ is acceleration. The push f(t) is the input; the position x(t) is the output. Re-solving it for every push is slow.
the cart: m = 2 kg b = 4 N·s/m k = 50 N/m 2x'' + 4x' + 50x = f(t) input f(t) push on the cart (N) output x(t) position (m) Goal of this lesson: one object, G(s), that holds everything the cart does to ANY push.
Read the lesson step by step
Start from the equation
The 2 kg cart from the equations-of-motion lesson obeys 2ẍ + 4ẋ + 50x = f(t), where ẋ is velocity and ẍ is acceleration. The push f(t) is the input; the position x(t) is the output. Re-solving it for every push is slow.
the cart: m = 2 kg b = 4 N·s/m k = 50 N/m 2x'' + 4x' + 50x = f(t) input f(t) push on the cart (N) output x(t) position (m) Goal of this lesson: one object, G(s), that holds everything the cart does to ANY push.Derivatives become multiplication
The Laplace transform turns a function of time into a function of a new variable, s. Its key trick: if the cart starts at rest, a derivative becomes a multiplication by s. So ẋ becomes sX(s) and ẍ becomes s²X(s).
Laplace transform: x(t) → X(s) derivative rule (starting at rest, x(0) = 0 and x'(0) = 0): dx/dt → s·X(s) d²x/dt² → s²·X(s) Calculus in time becomes algebra in s. The transform itself is taught in the Circuits lesson on Laplace analysis.Transform every term
Transform each term: 2ẍ becomes 2s²X(s), 4ẋ becomes 4sX(s), 50x becomes 50X(s) and f(t) becomes F(s). The differential equation is now plain algebra: (2s² + 4s + 50)X(s) = F(s).
term by term (zero initial conditions): 2x'' → 2s²·X(s) 4x' → 4s·X(s) 50x → 50·X(s) f(t) → F(s) (2s² + 4s + 50)·X(s) = F(s) X(s) is just a factor now: no derivatives.Output over input
Divide the output by the input: G(s) = X(s)/F(s) = 1/(2s² + 4s + 50). That ratio is the transfer function. It holds only the cart's mass, damper and spring, and nothing about how hard we push.
transfer function X(s) 1 G(s) = ---- = -------------- F(s) 2s² + 4s + 50 Defined for a linear, time-invariant system with every initial condition zero. m, b and k are the denominator's coefficients: 2, 4 and 50.One block in a diagram
Draw the cart as one box holding G(s). An arrow carries the input F(s) in and another carries the output X(s) out. The box has one rule: output equals G(s) times input. This picture is a block diagram.
F(s) ──▶ [ G(s) ] ──▶ X(s) X(s) = G(s) · F(s) Every block in a control diagram works this way: multiply what comes in by the block's transfer function.Push with a step
Push with a steady 10 N from t = 0. Its transform is F(s) = 10/s, so X(s) = 10/(s(2s² + 4s + 50)). A transform table turns that back into x(t): the cart overshoots to 0.305 m, then settles.
# X(s) = 10/(s(2s²+4s+50)) # = 0.2/s - 0.2(s+2)/((s+1)² + 24) # so x(t) = 0.2(1 - e^-t (cos wd·t + sin(wd·t)/wd)) import math wd = math.sqrt(24) t = math.pi / wd # first peak x = 0.2 * (1 - math.exp(-t) * (math.cos(wd*t) + math.sin(wd*t)/wd)) print(round(t, 2), round(x, 3)) # 0.64 0.305Where it settles: G(0)
Set s = 0: G(0) = 1/50 = 0.02 m per newton, the DC gain. The final value theorem says a steady 10 N push ends at 10 × 0.02 = 0.2 m, the same answer as kx = F.
DC gain G(0) = 1/50 = 0.02 m/N final value theorem x(∞) = lim s→0 s·X(s) = lim s→0 s · (10/s) · G(s) = 10 · G(0) = 0.2 m Check: at rest the spring holds the push, kx = F, x = 10/50 = 0.2 m.The denominator shapes the motion
Where 2s² + 4s + 50 = 0, G(s) blows up. Those values, s = −1 ± 4.90j, are the poles. The −1 sets the e^−t envelope the swings shrink inside. The 4.90 rad/s sets their 1.28 s period.
poles: roots of 2s² + 4s + 50 = 0 s = (-4 ± √(16 - 400)) / 4 = -1 ± j√24 = -1 ± 4.90j real part -1 → decays like e^-t imag part 4.90 → rings at 4.90 rad/s, period 2π/4.90 = 1.28 s The next lesson puts poles on the s-plane.A tap instead of a push
Now strike the cart with a quick tap of 2 N·s, an impulse. Its transform is just 2, so X(s) = 2G(s). Same box, new input: the cart jumps to 0.151 m, rings at the same rate and returns to rest.
# X(s) = 2·G(s) = 1/((s+1)² + 24) # so x(t) = e^-t · sin(wd·t) / wd import math wd = math.sqrt(24) t = math.atan(wd / 1) / wd # peak: atan(wd/sigma)/wd, sigma = 1 x = math.exp(-t) * math.sin(wd*t) / wd print(round(t, 2), round(x, 3)) # 0.28 0.151G(s) in Python
In Python, G(s) is just a function. G(0) gives the DC gain, and the quadratic formula on the denominator gives the poles. The python-control library builds the same object with ct.tf([1], [2, 4, 50]).
import cmath def G(s): return 1 / (2*s**2 + 4*s + 50) a, b, c = 2, 4, 50 p = (-b + cmath.sqrt(b*b - 4*a*c)) / (2*a) print(G(0), round(p.real, 2), round(p.imag, 2)) # 0.02 -1.0 4.9 # python-control: import control as ct # G = ct.tf([1], [2, 4, 50]) # ct.dcgain(G) -> 0.02, G.poles() -> -1 ± 4.899j
5 quick questions
Choose one answer per question. You can change your choices before checking them.
01With zero initial conditions, what does the Laplace transform turn d²x/dt² into?
Each derivative multiplies by s when the system starts at rest, so a second derivative becomes s²·X(s).
02A system obeys 3ÿ + 6ẏ + 12y = u(t). What is its transfer function Y(s)/U(s)?
Transform term by term: (3s² + 6s + 12)Y(s) = U(s). Output over input is 1/(3s² + 6s + 12).
03For the cart, G(s) = 1/(2s² + 4s + 50). A steady 5 N push is applied. Where does the cart settle?
The DC gain is G(0) = 1/50 = 0.02 m/N, so 5 N gives 5 × 0.02 = 0.1 m. The final value theorem gives the same: lim s→0 of s·(5/s)·G(s).
04Why does the same block G(s) predict both the response to a steady push and the response to a quick tap?
G(s) holds the mass, damper and spring. Each input brings its own F(s) (10/s for the push, 2 for the tap), and the output is their product.
05The cart's poles are s = −1 ± 4.90j. What does the −1 tell you?
The real part of a pole sets how fast its part of the motion decays: here like e^−t. The imaginary part, 4.90 rad/s, sets how fast it rings.
Glossary
- Laplace transform
- A way to turn a function of time, x(t), into a function of a complex variable s, X(s). With zero initial conditions it turns each time derivative into a multiplication by s.
- Transfer function
- The Laplace transform of the output divided by the Laplace transform of the input, with every initial condition zero. Only linear, time-invariant systems have one.
- Block diagram
- A drawing of a system as boxes joined by arrows. Each box holds a transfer function and multiplies the signal coming in by it.
- DC gain
- G(0): how much the output moves per unit of a steady input once everything has settled.
- Final value theorem
- x(∞) = lim s→0 of s·X(s). It gives where a settling output ends up without solving for x(t).
- Pole
- A value of s where the transfer function's denominator is zero. Its real part sets how fast a part of the motion decays and its imaginary part how fast it rings.
- Impulse
- An idealised, very short, sharp input such as a hammer tap, measured by its total push (N·s). A unit impulse has Laplace transform 1, so its response is the inverse transform of G(s) itself.
Notes and sources
- A transfer function exists only for a linear, time-invariant system, and it is defined with every initial condition zero. A cart that starts moving adds terms that G(s) does not hold.
- G(s) is itself the Laplace transform of the impulse response g(t): a unit impulse has transform 1, so X(s) = G(s). The tap in step 9 is two units of impulse, so its curve is 2·g(t).
- The final value theorem only applies when the output settles, which needs every pole of s·X(s) in the left half of the s-plane. Here the poles are at −1 ± 4.90j, so it holds.
- Every curve in the figure is the exact inverse transform of X(s), sampled every 0.02 s, and the tests check it against a direct simulation of 2ẍ + 4ẋ + 50x = f(t).
- N. S. Nise, Control Systems Engineering, 8th ed., Wiley (ch. 2 transfer functions, ch. 4 poles)
- K. Ogata, Modern Control Engineering, 5th ed., Pearson (§2-2 Transfer function and impulse response function)
- G. F. Franklin, J. D. Powell, A. Emami-Naeini, Feedback Control of Dynamic Systems, 8th ed., Pearson (ch. 3 Dynamic response)
- MIT OpenCourseWare 16.06 Principles of Automatic Control (S. Hall)
- MIT OpenCourseWare 6.302 Feedback Systems (Roberge, Dawson, Lundberg)
- python-control: control.tf
- python-control: control.TransferFunction (poles, zeros)
- python-control: control.dcgain
Quiz Unlocks after the last step.