Graphics and audio editing and processing software often contain functions called 'High-Pass Filter' and 'Low-Pass Filter'. Exactly what do these do, and what are the algorithms for implementing them?
Andrew EdgecombeThen I used a second order high pass filter and a second order low pass filter one after the other and found that that eliminated more noise than a bandpass filter. That now becomes equivalent to a 4th order bandpass filter and hence will generally be better than a 2nd order bandpass filter. High pass tends to transmit more of the high frequency parts and low pass tends to pass more of the low frequency parts. They can be simulated in software. A walking average can act as a low pass filter for instance and the difference between a walking average and it's input can work as a high pass filter.
Kristopher JohnsonKristopher Johnson6 Answers
Wikipedia:
These 'high', 'low', and 'band' terms refer to frequencies. In high-pass, you try to remove low frequencies. In low-pass, you try to remove high. In band pass, you only allow a continuous frequency range to remain.
Choosing the cut-off frequency depends upon your application. Coding these filters can either be done by simulating RC circuits or by playing around with Fourier transforms of your time-based data. See the wikipedia articles for code examples.
Frank KruegerFrank KruegerHere is how you implement a low-pass filter using convolution:
Note that the example is extremely simplified. It does not do range checks and does not handle the edges properly. The filter used (box-car) is a particularly bad lowpass filter, because it will cause a lot of artifacts (ringing). Read up on filter design.
You can also implement the filters in the frequency domain. Here is how you implement a high-pass filter using FFT:
Again, this is simplified, but you get the idea. The code does not look as complicated as the math.
Jonathon ReinhartThey are generally Electrical circuits that tend to pass parts of analog signals. High pass tends to transmit more of the high frequency parts and low pass tends to pass more of the low frequency parts.
They can be simulated in software. A walking average can act as a low pass filter for instance and the difference between a walking average and it's input can work as a high pass filter.
BCSBCSHigh-pass filter lets high-frequency (detailed/local information) pass.
Low-pass filter lets low-frequency (coarse/rough/global information) pass.
Filtering describes the act of processing data in a way that applies different levels of attenuation to different frequencies within the data.
A high pass filter will apply minimal attentuation (ie. leave levels unchanged) for high frequencies, but applies maximum attenuation to low frequencies.
A low pass filter is the reverse - it will apply no attenuation to low frequencies by applies attenuation to high frequencies.
![Filter Filter](https://www.norwegiancreations.com/wp-content/uploads/2016/03/filters.png)
There are a number of different filtering algorithms that are used. The two simplest are probably the Finite Impulse Response filter (aka. FIR filter) and the Infinite Impulse Response filter (aka. IIR filter).
The FIR filter works by keeping a series of samples and multiplying each of those samples by a fixed coefficient (which is based on the position in the series). The results of each of these multiplications is accumulated and is the output for that sample. This is referred to as a Multiply-Accumulate - and in dedicated DSP hardware there is a specific MAC instruction for doing just this.
When the next sample is taken it's added to the start of the series, and the oldest sample in the series is removed, and the process repeated.
The behavior of the filter is fixed by the selection of the filter coefficients.
One of the simplest filters that is often provided by image processing software is the averaging filter. This can be implemented by an FIR filter by setting all of the filter coefficients to the same value.
Andrew EdgecombeAndrew EdgecombeHere is a super simple example of a low pass filter in C++ that processes the signal one sample at a time:
Here is pretty much the same thing, except it's high pass:
Jonathon ReinhartNot the answer you're looking for? Browse other questions tagged algorithmgraphicsaudiophotoshopsignal-processing or ask your own question.
Draw the circuit diagram of a second-order series High pass filter RLC filter.
Given:
R = 50 ohm
Q_s = .5
f_0 = 30 MHz
determine L and C
2. Relevant equations
f_0 = 1/(2*pi*sqrt(LC))
Q_s = 2*pi*f_0*L/R = 1/(2*pi*f_0*R)
3. The attempt at a solution
I know how to find L and C, given two variables and the two equations listed above, its simply a plug and chug. But I am confused on how to draw the circuit diagram. Also, more generally, how do I determine if a circuit diagram is high or low pass? or first or second order? If I was given just the diagram, with no values, how would I be able to tell?
As an example, looking at this diagram :
I am told that it is a first order High Pass filter, but if I was not told, how would I be able to tell?