Low-pass filter
A low-pass filter is a filter that passes signals with a frequency lower than a selected cutoff frequency and attenuates signals with frequencies higher than the cutoff frequency. The exact frequency response of the filter depends on the filter design. The filter is sometimes called a high-cut filter, or treble-cut filter in audio applications. A low-pass filter is the complement of a high-pass filter.
In optics, high-pass and low-pass may have different meanings, depending on whether referring to the frequency or wavelength of light, since these variables are inversely related. High-pass frequency filters would act as low-pass wavelength filters, and vice versa. For this reason, it is a good practice to refer to wavelength filters as short-pass and long-pass to avoid confusion, which would correspond to high-pass and low-pass frequencies.
Low-pass filters exist in many different forms, including electronic circuits such as a hiss filter used in audio, anti-aliasing filters for conditioning signals before analog-to-digital conversion, digital filters for smoothing sets of data, acoustic barriers, blurring of images, and so on. The moving average operation used in fields such as finance is a particular kind of low-pass filter and can be analyzed with the same signal processing techniques as are used for other low-pass filters. Low-pass filters provide a smoother form of a signal, removing the short-term fluctuations and leaving the longer-term trend.
Filter designers will often use the low-pass form as a prototype filter. That is a filter with unity bandwidth and impedance. The desired filter is obtained from the prototype by scaling for the desired bandwidth and impedance and transforming into the desired bandform.
Examples
Examples of low-pass filters occur in acoustics, optics and electronics.A stiff physical barrier tends to reflect higher sound frequencies, acting as an acoustic low-pass filter for transmitting sound. When music is playing in another room, the low notes are easily heard, while the high notes are attenuated.
An optical filter with the same function can correctly be called a low-pass filter, but conventionally is called a longpass filter, to avoid confusion.
In an electronic low-pass RC filter for voltage signals, high frequencies in the input signal are attenuated, but the filter has little attenuation [|below] the cutoff frequency determined by its RC time constant. For current signals, a similar circuit, using a resistor and capacitor in parallel, works in a similar manner.
Electronic low-pass filters are used on inputs to subwoofers and other types of loudspeakers, to block high pitches that they cannot efficiently reproduce. Radio transmitters use low-pass filters to block harmonic emissions that might interfere with other communications. The tone knob on many electric guitars is a low-pass filter used to reduce the amount of treble in the sound. An integrator is another time constant low-pass filter.
Telephone lines fitted with DSL splitters use low-pass filters to separate DSL from POTS signals, which share the same pair of wires.
Low-pass filters also play a significant role in the sculpting of sound created by analogue and virtual analogue synthesisers. See subtractive synthesis.
A low-pass filter is used as an anti-aliasing filter before sampling and for reconstruction in digital-to-analog conversion.
Ideal and real filters
An ideal low-pass filter completely eliminates all frequencies above the cutoff frequency while passing those below unchanged; its frequency response is a rectangular function and is a brick-wall filter. The transition region present in practical filters does not exist in an ideal filter. An ideal low-pass filter can be realized mathematically by multiplying a signal by the rectangular function in the frequency domain or, equivalently, convolution with its impulse response, a sinc function, in the time domain.However, the ideal filter is impossible to realize without also having signals of infinite extent in time, and so generally needs to be approximated for real ongoing signals, because the sinc function's support region extends to all past and future times. The filter would therefore need to have infinite delay, or knowledge of the infinite future and past, to perform the convolution. It is effectively realizable for pre-recorded digital signals by assuming extensions of zero into the past and future, or, more typically, by making the signal repetitive and using Fourier analysis.
Real filters for real-time applications approximate the ideal filter by truncating and windowing the infinite impulse response to make a finite impulse response; applying that filter requires delaying the signal for a moderate period of time, allowing the computation to "see" a little bit into the future. This delay is manifested as phase shift. Greater accuracy in approximation requires a longer delay.
Truncating an ideal low-pass filter result in ringing artifacts via the Gibbs phenomenon, which can be reduced or worsened by the choice of windowing function. Design and choice of real filters involves understanding and minimizing these artifacts. For example, simple truncation of the sinc function will create severe ringing artifacts, which can be reduced using window functions that drop off more smoothly at the edges.
Time response
The time response of a low-pass filter is found by solving the response to the simple low-pass RC filter.Using Kirchhoff's Laws we arrive at the differential equation
Step input response example
If we let be a step function of magnitude then the differential equation has the solutionwhere is the cutoff frequency of the filter.
Frequency response
The most common way to characterize the frequency response of a circuit is to find its Laplace transform transfer function,. Taking the Laplace transform of our differential equation and solving for we getDifference equation through discrete time sampling
A discrete difference equation is easily obtained by sampling the step input response above at regular intervals of where and is the time between samples. Taking the difference between two consecutive samples we haveSolving for we get
Where
Using the notation and, and substituting our sampled value,, we get the difference equation
Error analysis
Comparing the reconstructed output signal from the difference equation,, to the step input response,, we find that there is an exact reconstruction. This is the reconstructed output for a time-invariant input. However, if the input is time variant, such as, this model approximates the input signal as a series of step functions with duration producing an error in the reconstructed output signal. The error produced from time variant inputs is difficult to quantify but decreases as.Discrete-time realization
Many digital filters are designed to give low-pass characteristics. Both infinite impulse response and finite impulse response low pass filters, as well as filters using Fourier transforms, are widely used.Simple infinite impulse response filter
The effect of an infinite impulse response low-pass filter can be simulated on a computer by analyzing an RC filter's behavior in the time domain, and then discretizing the model.From the circuit diagram to the right, according to Kirchhoff's Laws and the definition of capacitance:
where is the charge stored in the capacitor at time . Substituting equation into equation gives, which can be substituted into equation so that
This equation can be discretized. For simplicity, assume that samples of the input and output are taken at evenly spaced points in time separated by time. Let the samples of be represented by the sequence, and let be represented by the sequence, which correspond to the same points in time. Making these substitutions,
Rearranging terms gives the recurrence relation
That is, this discrete-time implementation of a simple RC low-pass filter is the exponentially weighted moving average
By definition, the smoothing factor is within the range. The expression for yields the equivalent time constant in terms of the sampling period and smoothing factor ,
Recalling that
note and are related by,
and
If =0.5, then the RC time constant equals the sampling period. If, then RC is significantly larger than the sampling interval, and.
The filter recurrence relation provides a way to determine the output samples in terms of the input samples and the preceding output. The following pseudocode algorithm simulates the effect of a low-pass filter on a series of digital samples:
// Return RC low-pass filter output samples, given input samples,
// time interval dt, and time constant RC
function lowpass
var real y
var real α := dt /
y := α * x
for i from 2 to n
y := α * x + * y
return y
The loop that calculates each of the n outputs can be refactored into the equivalent:
for i from 2 to n
y := y + α *
That is, the change from one filter output to the next is proportional to the difference between the previous output and the next input. This exponential smoothing property matches the exponential decay seen in the continuous-time system. As expected, as the time constant RC increases, the discrete-time smoothing parameter decreases, and the output samples respond more slowly to a change in the input samples ; the system has more inertia. This filter is an infinite-impulse-response single-pole low-pass filter.