Differential and Difference Equations
Linear constant-coefficient equations, zero-input and zero-state responses, characteristic roots, first- and second-order systems and block diagrams
Pasadena — 1935
Charles Richter, working with Beno Gutenberg at Caltech, needs a way to compare the sizes of the small local earthquakes his network records. In a 1935 paper he defines a magnitude: the logarithm of the largest swing of one particular instrument's trace, corrected for distance. A quake that drives the trace 0.001 mm at 100 km is magnitude 0; each factor of ten in the swing adds one (Richter scale).
The instrument was the Wood–Anderson torsion seismometer, built by Harry Wood and John Anderson to catch the short-period waves of nearby quakes. It is a small mass on a taut wire with a natural period of 0.8 seconds, a nominal magnification of 2,800, and a damping constant of 0.8 (Wood–Anderson seismometer).
Those three numbers are the coefficients of a second-order differential equation, and the whole magnitude scale is defined by how that equation responds. This lesson is about such equations: where impulse responses come from.
Most physical LTI systems obey a linear constant-coefficient differential equation,
and their discrete-time cousins a difference equation,
Newton's second law gives one for every mass, spring and damper; Kirchhoff's laws give one for every circuit of resistors, capacitors and inductors; a digital filter is a difference equation by construction. The order counts the independent energy stores — a capacitor, a moving mass, a delay element.
💡Zero-input plus zero-state
The total response splits into two parts:
- the zero-input response, what the system does from its initial conditions with no input — a pendulum released from an angle, a capacitor discharging;
- the zero-state response, what the input does to a system starting from rest.
Derivation
The first-order system and its impulse response
The RC circuit, a thermometer and a leaky tank all obey
Multiply by the integrating factor :
Starting from rest, integrate from to :
That is a convolution, , with
The equation is the impulse response, written differently. For the RC circuit, .
💡Characteristic roots
Try in the homogeneous equation : every derivative brings down a , so
Its roots — the characteristic roots — are the system's natural modes . A real negative root is an exponential decay; a complex pair is a decaying oscillation ; any root with a positive real part is an instability. The impulse response is a sum of these modes. Unit 7 will call the same numbers poles.
Second-order systems. A mass on a spring with a damper, an RLC circuit and a seismometer pendulum all reduce to
with natural frequency and damping ratio . The characteristic roots are :
- , underdamped: complex roots, a decaying oscillation at the damped frequency ;
- , critically damped: a double real root, the fastest response with no overshoot;
- , overdamped: two real roots, a sluggish approach.
The step response of an underdamped system overshoots its final value by of the step.
The impulse response of an underdamped second-order system (ζ < 1).
📐The Wood–Anderson seismometer
Period s means rad/s, and the damping constant is . The characteristic roots are
The instrument rings at rad/s, but its envelope decays as — to a thousandth in about 1.1 s. A step would overshoot by . Heavy damping was the point: a lightly damped pendulum would keep swinging at its own period and write its own resonance over the earthquake's record. The magnification of 2,800 applies to ground displacements faster than the natural frequency — the instrument's displacement response is a second-order high-pass, which the lab simulates.
💡Difference equations run themselves
Solve a difference equation for its newest output and it becomes a recipe:
Start from rest, feed in , and run the recipe: out comes , one sample at a time. That is exactly what
scipy.signal.lfilter(b, a, x) does, and what every digital filter chip does in real time. The first-order recursion gives — the discrete version of the exponential decay.Block diagrams. A differential equation can be drawn with three blocks: integrators (or delays in discrete time), gains, and adders. The diagram for is an integrator whose input is — a feedback loop around an integrator. Analog computers were wired this way, and digital filters are still drawn this way. Unit 9 uses the diagrams to choose how to implement a filter.
It is written in the language of mathematics, and its characters are triangles, circles, and other geometric figures
🕰A scale defined by an instrument
Richter's local magnitude is , where is the maximum excursion of the Wood–Anderson trace and depends on the epicentral distance. Because the definition is tied to one instrument's response, later seismometers have their records converted — by simulating the Wood–Anderson equation — before an can be read from them.
⚠Initial conditions are not inputs
A system that is not at rest when the input starts has a zero-input response on top of the convolution. Leaving it out is the classic mistake in circuit problems with a pre-charged capacitor. Superposition holds for the zero-state part only: doubling the input does not double a response that includes initial conditions.
💡Where you will use this
Characteristic roots become the poles of Lessons 7-3 and 8-2. Second-order specifications — overshoot, settling time, damping — are the language of feedback design (Lesson 7-4). Difference equations are every digital filter (Unit 9), and the recursion you write in the lab is what
lfilter runs.📚Further reading
- Oppenheim and Willsky, Signals and Systems, section 2.4 — causal LTI systems described by differential and difference equations, and block diagrams.
- Lathi and Green, Linear Systems and Signals, chapter 2 — zero-input and zero-state responses in detail.
- Wood–Anderson seismometer and Richter scale on Wikipedia.
↓But there is a problem
We can now get from an equation and the output from a convolution. But convolution is laborious: an integral for every instant of the output.
Is there an input that an LTI system passes through unchanged in shape — scaled, perhaps delayed, but still the same kind of signal? If so, we could describe any system by what it does to that one kind of input, and replace convolution by multiplication. There is, and you have met it already.