A deeper understanding of the principles of filters

Publisher:创意梦者Latest update time:2023-08-03 Source: elecfans Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

We have learned about audio filters and explained that audio filters also have the function of phase modulation. However, in the previous article, we skipped the most important function of the filter: removing part of the harmonics in the spectrum to create new sounds. But the working method of the filter is far from simple as it sounds. In this article, we will continue to have a deeper understanding of the principles of the filter.

picture

Figure 1: A simple low-pass filter circuit

Figure 1 shows the passive low-pass RC filter we introduced in the previous article (the reason why it is called "passive" is that we call electronic components that only need input signals and do not need additional power "passive components", so resistors, capacitors and inductors are all passive components, while transistors and other amplifiers are not passive components). If you have read the previous article, you may remember that the cutoff frequency of the RC filter can be determined by the capacitance of the two passive components in its circuit.


The relationship between the input signal to a filter and the output signal after the filter is called the transfer function. More precisely, the transfer function describes the filter's amplitude response (the filter's effect on the volume) and phase response, but since we've already discussed the filter's effect on the audio phase in the previous article, we'll only focus on the amplitude response in this article. Ideally, the transfer function of our RC filter is very simple: for every two times above the cutoff frequency (denoted as Fc in this article), the output of the signal will be halved (see Figure 2).

picture

Figure 2: RC low-pass filter response diagram under ideal conditions

So, for example, if Fc is 1kHz, then the signal at 2kHz will have a gain of 1/2 (half the volume), at 4kHz it will have a gain of 1/4 (one quarter the volume), and so on... Since the pitch rises one octave every time the frequency doubles, and the amplitude is attenuated by 6 decibels every time the gain is halved, this response is also called a 6dB/octave filter.


But while diagrams like Figure 2 are widely used in the music industry, they are not accurate. Figure 3 shows a more accurate transfer function diagram.

picture

Figure 3: A more accurate representation of the RC low-pass filter response

It can be seen that the signal has been attenuated by 3dB at the cutoff frequency. This is not a mistake. In fact, in electrical engineering, the cutoff frequency is the position where the signal attenuates by 3dB. So the first rule to be summarized in this article is:

The position where the passive low-pass filter starts to work is not determined by the cutoff frequency; the cutoff frequency is the position where the signal has been attenuated by 3dB. In addition, since the 3dB attenuation can be easily perceived by the human ear, this means that the signal has been significantly affected at the cutoff frequency.


Let's step back and think about how a simple low-pass filter affects common waveforms. For simplicity, we will use the ideal low-pass filter in Figure 2 as an example, because its sharp "knee" simplifies the filter's work a lot.

picture

Figure 4: The first 200 harmonics of a sawtooth wave

Figure 4 shows the harmonic structure of the sawtooth wave, one of the most common analog synthesizer waveforms. All of its harmonics exist, and the amplitude of each harmonic has a simple relationship of 1/n to the amplitude of the fundamental frequency (n is the harmonic number).

picture

Figure 5: Harmonic structure of the above 100Hz sawtooth wave using a logarithmic axis

Figure 4 shows the amplitude of the first 200 harmonics of the sawtooth wave in traditional units. However, it is much more appropriate to use a logarithmic axis to show these harmonics in Figure 5 than in Figure 4. But even if you don’t understand what logarithms are, it doesn’t matter because even though Figure 4 and Figure 5 look very different, they are actually showing the same information. The reason I chose to use a logarithmic graph here is because the amplitude expressed logarithmically is a straight line, so it is easier to show the effect of the filter on it. In fact, if you look back at Figures 2 and 3, they also use logarithmic axes.

picture

Figure 6: Effect of a 3kHz, 6dB/octave lowpass filter on a 100Hz sawtooth wave

Suppose we have a 6dB/octave RC filter with a cutoff frequency of 3kHz, let's see what effect it will have on a sawtooth wave with a base frequency of 100Hz. Figure 6 shows the attenuation of the filter for frequencies above 3kHz. It is not difficult to find that the graph in Figure 6 has a "fold" compared to Figure 5, and the graph conforms to the 6dB/octave rule mentioned above.

picture

Figure 7-8: 100Hz sawtooth waveform under ideal conditions (top); the sawtooth waveform processed by a 3kHz filter (bottom)

Now look at Figure 7 and Figure 8. Figure 7 shows the waveform of the 100Hz sawtooth wave in the ideal state mentioned above, and Figure 8 shows the sawtooth wave processed by our 3kHz filter. Although there is not much difference in the visual aspect between the two waveforms, because the 3kHz cutoff frequency allows the first thirty harmonics of the waveform to pass, and only the low-amplitude high-frequency harmonics are affected, but because the human ear is very sensitive, when you compare the two waveforms, you can obviously hear that the filtered waveform is more "dim", or lacks "high frequency".

6dB/octave filters are widely used in sound system tone control units and are occasionally used by synthesizers as auxiliary brightness controls, but they are not usually used in real sound synthesis. This is because they usually do not cause a noticeable change in the timbre - a waveform processed by a 6dB/octave filter sounds just like the original waveform, just a little darker. Obviously, to create completely new timbres we need more powerful filters.

So what passive components do we need to make a 12dB/octave, 18dB/octave, or even 24dB/octave filter? Unfortunately, there are no passive components that can meet such requirements, so we need a different approach. Why not combine a series of RC filters to get the steeper frequency response we need? For example, two RC filters combined will give a 12dB/octave filter, three will give an 18dB/octave filter, four will give a 24dB/octave filter... Ideally, such a circuit composed of four RC filters stacked together will look similar to Figure 9. If this filter is working properly, its ideal transfer function should be similar to the graph shown in Figure 10.

picture

Figure 9: A 24dB/octave low-pass RC filter composed of four 6dB/octave filters stacked together

picture

Figure 10: The above hypothetical 24dB/octave attenuation of high frequency harmonics

However, the working method of the filter is not as simple as imagined. Our passive RC filter response model needs to have certain assumptions about its input and output values. Although a single RC circuit can meet this requirement, if you stack multiple such circuits together, the response will be completely different. So how can we make the filter we need?

If you know anything about synthesizers, you may have heard that 12dB/octave filters are sometimes called "2-pole" filters, and 24dB/octave filters are called "4-pole" filters. So you might assume that each 6dB/octave block in Figure 9 is a "pole". However, this assumption is not accurate.

In fact, the names "2-pole" and "4-pole" are the result of a mathematical operation called "Laplace transform". This transformation allows mathematicians to analyze the linear response of audio signals (as for what is a "linear system" and the mathematical principles behind it, it is too complicated to be discussed in this article). In short, the reason why we use "pole" to describe filters is because the Laplace transform diagram of an RC filter looks like a rubber plane supported by tent poles. A single 6dB/octave filter has one such "tent pole", so it is called a "1-pole" filter, a 12dB/octave filter has two such "tent poles", and so on...

picture

Figure 11: Illustration of the Laplace transform of a 1-pole (left), 2-pole (center), and 3-pole (right) filter

Therefore, if you want to make a passive RC filter with a single cutoff frequency of 24dB/octave, you need to make the four poles in the same position in the figure. But as I explained before, it is impossible to achieve such an effect using passive components, because multiple passive components will interact with each other, and the working method of the combined passive components is different from that of a single passive component. Therefore, the frequency response composed of four 6dB/octave RC filters cannot achieve the ideal effect in Figure 10. On the contrary, in reality, we will get a transfer function curve with four "inflection points", as shown in Figure 12.

picture

Figure 12: Transfer function curve composed of four 6dB/octave filters superimposed

We can therefore draw an important conclusion: although the passive 4-pole filter will be close to the 24dB/octave response at high frequencies, in some frequency bands, its response will be more or less similar to 6dB/octave, 12dB/octave, and 18dB/octave. In addition, if you look closely at the above graph, you can see that these middle areas are not exactly straight lines, that is, the frequency and input and output signals are not as direct as before.

Although we have designed a circuit that theoretically has 24dB/octave, the cutoff frequencies of the filters are not exactly the same due to the interaction between them. In addition, the inflection point of each cutoff frequency is smooth, and even if the cutoff frequencies of the four sub-filters are exactly the same, the synthesized inflection point will not become "sharp". Moreover, we have also ignored its impact on frequencies below the cutoff frequency. Signals below the cutoff frequency should not be affected by the filter in theory, but in fact, due to the working principle of the above-mentioned filter, the signals below the cutoff frequency will also be attenuated to a certain extent, and may also produce some other unwanted results. And one last point: we have also completely ignored the phase shift of the waveform caused by each sub-filter.

[1] [2]
Reference address:A deeper understanding of the principles of filters

Previous article:Frequently Asked Questions about Image Acquisition Cards
Next article:High-loudness alarm generator/electronic sound-imitation mouse repellent/voice recording and playback circuit design

Latest Embedded Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号