A10 · Lesson 24 · Impulse response
Predicting any output from one measurement
Hit a linear system with one very short, sharp pulse and record what comes out: that recording, the impulse response, completely describes the system. Room acoustics are measured this way, by popping a balloon; so are loudspeakers, cables and control loops. Any other input's output is then a convolution, which a computer does in one line. In this lesson you'll go between the impulse response, the transfer function and the output, and compute a convolution in NumPy.
- A pulse of 1 V lasting goes into an RC low-pass with time constant . The output rises toward 1 V while the pulse is on, then decays.
- Make the pulse much shorter than . The output becomes a small, sharp rise and a slow fall: almost the impulse response itself, scaled by the pulse's area.
- Make the pulse much longer than . Now the output copies the pulse, with rounded edges.
Predict
A filter's impulse response has an area of 2 under it. What does its output settle to for a 1 V step input?
2 V. A step is a steady stream of tiny impulses, so the step response is the running integral of the impulse response, and it settles at the total area. That area is also , the DC gain.
Name it
Three descriptions of one system
| Domain | Description | Output |
|---|---|---|
| time | impulse response | |
| Laplace | transfer function | |
| frequency | frequency response | each sinusoid scaled by |
The step response is , or in Laplace, and its final value is .
For an RC low-pass, and .
Convolution on a computer
Sample both signals at spacing ; then
which is np.convolve(x, h) * dt, truncated to the length you want. The error shrinks with : this is the rectangle rule (A6), so expect errors of order .
Short and long inputs
A pulse much shorter than the system's time constant acts like an impulse of the same area. A pulse much longer than it passes through nearly unchanged. In between, the output is a rounded copy, which is the "rise time" of a scope or a data link.
Worked example
A 1 V, 2 ms pulse enters an RC low-pass with = 1 ms. Find the output at 2 ms and 4 ms.
Show the solution
- During the pulse. The output is a step response, so at 2 ms
- After the pulse. That value decays, so at 4 ms
- Check numerically. A numerical convolution with = 10 µs gives 0.860 and 0.116.
Answer 0.865 V at 2 ms and 0.117 V at 4 ms.
Worked example
A system has . What is its impulse response, and its step response's final value?
Show the solution
- Partial fractions.
- Invert.
- The final value. The step response settles at
- Check. That's also the area under :
Answer , and the step response settles at 1.
Worked example
Find the impulse response of and its peak.
Show the solution
- The impulse response.
- Find the peak. Its derivative is zero where , first at
- The peak value.
- After the peak. It then rings, each swing times the size of the one before.
Answer , which peaks at 0.257 at s.
Check
A 1 V pulse lasting 1 ms enters an RC low-pass with = 0.5 ms. What is the output at the end of the pulse?
Write units the way you normally would: 1.5 V, 1500 mV and 0.0015 kV are the same answer.
Check
The same kind of pulse (1 ms, = 1 ms) has ended. What is the output at = 5 ms?
Write units the way you normally would: 1.5 V, 1500 mV and 0.0015 kV are the same answer.
Check
A system has . What does its step response settle to?
Check
A 1 V pulse lasting 1 µs enters an RC low-pass with = 1000 µs, much longer. About what peak does the output reach?
Write units the way you normally would: 1.5 V, 1500 mV and 0.0015 kV are the same answer.
Check
np.convolve of arrays of length 100 and 50 returns how many samples?
Check
Compute the output of an RC low-pass ( = 1 ms) to a 1 V, 2 ms pulse by convolution: sample at dt = 1e-5 s for 6 ms, build x and h = exp(-t/tau)/tau, and set y = np.convolve(x, h)[:len(t)] * dt.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
.
(a)
When does its impulse response first peak?
Write units the way you normally would: 1.5 s and 1500 ms are the same answer.
(b)
What is its step response's final value?
Check
A unit pulse of length enters an RC low-pass with time constant .
Step 1
What is the output at the end of the pulse?
Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.
Step 2
What is it a further later?
Explain why
Why does a very short pulse produce an output shaped like the impulse response, whatever the pulse's own shape?
The output is the convolution . If the pulse lasts much less than the time over which changes, is nearly the same for every inside the pulse, so it can be pulled out of the integral: the output is about , the impulse response times the pulse's area. The pulse's detailed shape washes out. That's why a balloon pop or a hammer tap can measure an impulse response.
Practice
Keep practicing
9 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.