ELECTRONICS - FilterS - guide series
Introduction to Electronics - Filters: Step response of first-order filters
Learn how first-order filters respond to sudden input changes through exponential transitions defined by their time constant. Understand the step response of RC and RL circuits and how it reveals a system’s ability to smooth, delay, or adapt to signal changes.
A step response is the reaction of a filter when a sudden change (or "step") is applied to its input—typically from 0 V to a fixed voltage. In real-life circuits, step responses are observed when devices are turned on, during power-up sequences, or when rapid changes occur in signal levels. First-order filters, such as RC or RL filters, respond to a step input by gradually transitioning from one state to another. In an RC low-pass filter, for example, the capacitor charges over time, and the output voltage rises exponentially toward the steady-state input voltage. This behaviour is characterised by the filter's time constant, which is determined by the product [math]RC[/math] (or [math]L/R[/math] for an RL filter).
Using a filter can be crucial in applications that require smoothing out abrupt changes, reducing high-frequency noise, or controlling the rise time of signals. The step response provides valuable insight into the transient behaviour of a circuit and helps in understanding how quickly a system can adapt to changes in its input.
Circuit Diagram
Consider an RC low-pass filter with a step input. The circuit diagram is as follows:
In this circuit, the resistor [math]R[/math] and capacitor [math]C[/math] form a voltage divider whose output gradually increases as the capacitor charges. Initially, when the step is applied, the capacitor behaves like a short circuit (resulting in 0 V output), but as time passes, it charges exponentially until the output reaches the input voltage.
Mathematical Underpinning
For an RC low-pass filter subjected to a step input of amplitude [math]V_{in}[/math], the output voltage as a function of time is given by:
[math]V_{out}(t)=V_{in}\left(1-e^{-t/RC}\right)[/math]
Here:
- [math]V_{in}[/math] is the amplitude of the step input.
- [math]RC[/math] is the time constant ([math]\tau[/math]) of the circuit.
- At time [math]t=\tau[/math], the output reaches approximately 63.2% of [math]V_{in}[/math].
- As [math]t[/math] approaches infinity, [math]V_{out}(t)[/math] approaches [math]V_{in}[/math].
This exponential behaviour shows how quickly or slowly the filter reacts to a sudden change in input and is essential for understanding the transient properties of the filter.
Demo Python script
The following Python script simulates the step response of an RC low-pass filter. It calculates the output voltage over time for a step input and plots the result, with the time axis displayed in milliseconds.
import numpy as np
import matplotlib.pyplot as plt
# Define filter parameters
R = 1e3 # Resistance in ohms
C = 1e-6 # Capacitance in farads
V_in = 5 # Step input voltage in volts
# Calculate the time constant
tau = R * C
# Create a time vector over 5 time constants (in seconds)
t = np.linspace(0, 5 * tau, 1000)
# Calculate the step response of an RC low-pass filter
V_out = V_in * (1 - np.exp(-t / tau))
# Convert time to milliseconds for plotting
t_ms = t * 1e3
# Plot the step response
plt.figure(figsize=(8, 4))
plt.plot(t_ms, V_out, label="Step Response")
plt.xlabel("Time (ms)")
plt.ylabel("Output Voltage (V)")
plt.title("RC Low-Pass Filter Step Response")
plt.grid(True, linestyle="--")
plt.legend()
plt.show()
When you run this script, the plot will display an exponential curve, starting at 0 V and gradually approaching the step input value of 5 V. This curve illustrates how the capacitor charges over time and how the output voltage reaches the steady-state condition.
Here is the output of this script:
The input step signal is defined to be 0 V for times less than the specified delay (5 ms) and 5 V for times equal to or greater than the delay. For times before the step (i.e., [math]t < 5[/math] ms), the output is 0 V. After the step, the output follows the exponential charging characteristic of the RC filter.
Key takeaways
Here's what to remember from this article:
- The step response describes how a filter reacts to an abrupt change in input voltage, revealing the transient behaviour of the circuit.
- For an RC low-pass filter, the output follows the equation [math]V_{out}(t)=V_{in}\left(1-e^{-t/RC}\right)[/math], which is an exponential function. The time constant [math]\tau=RC[/math] determines the rate of this transition.
- Step responses are observed when devices are powered on or when sudden changes occur in signals. Understanding the step response is essential for designing circuits that must handle transient events smoothly.
- Filters are used to shape, smooth, or delay signals, making them vital for applications in audio processing, power supplies, and various control systems.
Ready for the next tutorial in this series? Here's the next one, or choose an alternative from the list of articles in the side bar. There's also lots of interesting article in our Blog. where you can read about off-grid communication technologies, electronics test equipment, course updates, and much more.
INTRODUCTION TO ELECTRONICS FILTERS
This course and eBook introduces the core concepts of RC and RL filters, helping you understand, design, and analyse these essential circuits. You will learn how low-pass and high-pass filters shape signals, calculate key parameters like cutoff frequency and phase shift, and explore practical applications such as audio tone control, noise filtering, sensor signal conditioning, and switch debouncing.
Jump to another article
- Introduction to Filters
- Real-world applications of first- and second-order filters
- The four filters: low-pass, high-pass, band-pass, and band-stop
- Example: Compare a filtered and unfiltered signal
- Dive into first order RC and RL filters
- What is a first-order filter?
- RC low-pass filter behaviour
- RC high-pass filter behaviour
- RL low-pass filter behaviour
- RL high-pass filter behaviour
- Voltage division in AC using reactance
- Cutoff frequency
- Phase shift
- Step response of first-order filters
- Impulse response of first-order filters
- Just in case... definitions
We publish fresh content each week. Read how-to's on Arduino, ESP32, KiCad, Node-RED, drones and more. Listen to interviews. Learn about new tech with our comprehensive reviews. Get discount offers for our courses and books. Interact with our community. One email per week, no spam; unsubscribe at any time