LTI Systems Lab

Computer Systems Modelling · Section 5.4 · Interactive lab

Analysis of a linear time-invariant system

Linear time-invariant (LTI) systems are relatively easy to analyse, and many common systems can be approximated by them. This lab follows the three questions of Section 5.4: what an LTI system does to a complex exponential, what it does when its input is zero, and how to find its output for an arbitrary input. Like the book, it works in continuous time.

How it works and what to try

How it works: In three tabs. (1) Exponential in, exponential out: feed k est into the systems of Examples 5.7 and 5.8 and watch input and output turn together in the complex plane. Their ratio stays constant, so the exponential is an eigenfunction (Equations 5.18–5.21). A plot shows the gain at each frequency. (2) Natural response: drag the roots of the characteristic polynomial, set y(0) and y′(0), and see the response of Equations 5.23 and 5.24. (3) Arbitrary input: cut the input into strips, add up a scaled, shifted impulse response for each, and watch the sum converge to the solution of the differential equation as the strips narrow (Equation 5.28).

Try this: Compare Example 5.7 with a squaring system to see why only an LTI system has an eigenvalue. Set s = j on Example 5.8 to find resonance. Move a root across the imaginary axis to turn decay into growth. Drive the lightly damped system at its natural frequency and watch the output build up, strip by strip.

Section, example and equation numbers refer to Chapter 5 of S. Keshav, Mathematical Foundations of Computer Networking, Addison-Wesley, 2012.

The complex exponential is an eigenfunction of every LTI system

Feed an LTI system the input x(t) = kest, where s = σ + jω is complex and k is real, so that y(t) = H(kest) (EQ 5.17). Multiplying the input by the constant esτ multiplies the output by esτ, because the system is linear. But esτ·kest = kes(t+τ) is also the input shifted in time, so by time invariance the output is y(t + τ). Hence

y(t + τ) = esτ y(t)(EQ 5.18)

Setting t = 0 and differentiating with respect to τ gives dy/dτ = sy(τ) (EQ 5.19, 5.20), whose solution is

y(t) = f(s) est(EQ 5.21)

So the output is the input multiplied by the constant f(s)/k. The input kest is an eigenfunction of the system, and f(s)/k is the corresponding eigenvalue. We know this without knowing anything about the inside of the system.

For a system described by a differential equation we can find the eigenvalue. Substituting y = λkest into Example 5.7's equation y″ + 5y′ + 6y = 8x, and using y′ = sy and y″ = s2y, gives (s2 + 5s + 6)λ = 8, so λ = 8/(s2 + 5s + 6). Chapter 8 calls this the transfer function.

This is why transforms help: if we can write an arbitrary input as a sum of complex exponentials, the output is the sum of the scaled exponentials.

−0.20
1.50
1.00

At the current time

s
—
t (s)
—
input x(t)
—
output y(t)
—

Face on at the current time. The violet arc is the angle from x to y.

—
The phasors in 3Dx(t) and y(t) trace helices along the time axis; drag to rotate
Real parts over timeRe x(t) and Re y(t)
Scaling: |y(t)| / |x(t)|how much longer the output phasor is than the input phasor
Turning: phase of y(t) − phase of x(t)the angle from the input phasor to the output phasor, in radians

For an LTI system both lines are flat: the output is always the input scaled by |λ| and turned by arg λ. If either line moves, the input is not an eigenfunction.

Python · the eigenvalue, and a check

    

What to notice

For both LTI systems, the output phasor is the input phasor rotated by a fixed angle and stretched by a fixed factor. It turns at the same rate and grows or decays at the same rate. The scaling and turning plots are both flat.

In 3D, each phasor traces a helix along the time axis, widening when σ > 0 and narrowing when σ < 0. For an LTI system the output helix is the input helix scaled by |λ| and turned by the fixed angle arg λ. Press "Re against t" and you see the real parts plotted below: a real signal is the shadow of the helix on the real plane.

Switch to the squaring system: the output turns twice as fast, at frequency 2ω, so it is not a multiple of the input. Its turning angle keeps growing, so the turning plot climbs and wraps round each time it reaches π. The time-varying gain turns with the input, so its turning angle stays at 0, but its scaling grows with t. Neither has an eigenvalue, because each breaks one half of the argument above.

Choose Example 5.8 and set σ = 0 and ω = 1. Then s = j is a root of s2 + 1, a natural frequency of the system (next tab), and the eigenvalue is infinite. This is resonance. The result y = f(s)est breaks down here because no finite f(s) works.

Try these

  1. For Example 5.7, compute the eigenvalue for a constant input (s = 0) by hand. Then set σ = ω = 0 and check.
    Show answer
    λ = 8/(0 + 0 + 6) = 4/3 ≈ 1.3333. A constant input k gives the constant output 4k/3. You can check this directly: with y constant, y′ = y″ = 0, so 6y = 8k.
  2. Press "Face on" and compare with the small face-on view on the left. Then press "Re against t" and compare with the plot of real parts. What is each view showing?
    Show answer
    Face on, you look down the time axis, so the helix collapses into the familiar picture of a phasor turning in the complex plane, with every time drawn on top of each other. From the side, the imaginary part is hidden and you see the real part against time, which is exactly the real signal Re kest = keσt cos ωt. The helix holds both pictures at once.
  3. Set ω to −1.5 instead of 1.5. What changes in the complex plane, and what happens to the eigenvalue?
    Show answer
    Both phasors now turn clockwise, so the helices twist the other way. The eigenvalue becomes the complex conjugate of its value at ω = 1.5: the same magnitude with the opposite phase. This is because the coefficients of the differential equation are real, so λ(s̄) is the conjugate of λ(s).
  4. Example 5.8 with σ = 0: watch the eigenvalue for |ω| just below 1 and just above 1. How does this relate to tuning a radio?
    Show answer
    λ = 8/(1 − ω2), which is large and positive just below 1 and large and negative (a phase of π) just above 1. Inputs near the natural frequency are amplified far more than others. A radio receiver uses this: its circuit is tuned so that its resonant frequency matches the wanted transmitter (footnote 5 of the book notes that, strictly, it is tuned to a range around it).