The design of analog filter generally includes two aspects: Determining the transfer function H (s) of the filter according to the technical indicator, the filter is determined; the implementation of the actual network implementation.
The key to the design filter H (s) is to find approximation functions, and there is currently a variety of approximation functions. However, regardless of which approximation function needs to make very cumbersome calculations, it is also necessary to check the table according to the calculation results.
The MATLAB language is a simple, efficient senior language, is a rich and powerful analysis tool, with almost all scientific and engineering calculations. MATLAB provides a rich function for analog filter design, which can easily achieve low-pass, high-pass, bandpass, band-blocked filter, and draw the amplitude frequency, phase frequency characteristic curve, greatly Simplifies the design of the analog filter. Here, the MATLAB design is introduced to implement a non-distortion analog filter, and the simulation results of the amplitude, the phase frequency characteristics, and the signal passing after passing without distortion filters.
1 Non-distortion filter design based on matlab
Design requirements: A frequency of 8 kHz digital baseband signal After the number / mode (D / A) conversion is converted, a simulation signal is obtained, and the analog signal is input without distortion filter, which requires attenuation to ~ 6 dB at 8 kHz; The 16 kHz frequency (cutoff frequency) is after the attenuation reaches a 60 dB. The purpose of this is to cause the analog signal to suppress harmonic interference after passing through a non-distortion filter, and reduce the undulation of the waveform after the cutoff frequency.
The non-distortion filter consists of three parts, sequentially low-pass filters, with blocking filters, phase shift circuits. Where the low-pass filter function is to inhibit 16 kHz signals by inhibition of 16 kHz signals, it can reach a 60 dB of the signal at 16 kHz. The above, effectively suppressed each harmonic interference, and reduced the fluctuation of the waveform after 16 kHz; the action of the phase shift circuit is to compensate the phase offset of the previous two-stage circuit, so that the phase characteristics of the entire non-distortion filter becomes a straight line.
1.1 low pass filter design
The low-pass filter uses the Badworth type filter because it has a flattening amplitude frequency characteristic, and the phase frequency characteristics are linear, often as the primary of the filter. In Matlab, the design of the Butter Worth filter is implemented with the [B, A] = Butter (n, Wn, 's') statements. Wherein [6, A] is the coefficient of the filter transfer function; n is the order of the filter; the angular frequency at 3 dB; 's' represents an analog filter.
In this design, an 8-stage Badworth filter is used, and the frequency at 3 dB is 8 kHz. The main procedures are as follows:
Be
Click to see the original picture
The final picture of the low-pass filter, the phase frequency characteristics are shown in FIG. 1 (a). The actual circuit uses the MAX291 chip to implement the Badworth filter, which is equivalent to the 8th order Badworth filter, as shown in Figure 1 (b).
Click to see the original picture
1.2 Belt Brew Filter Design
The action of the strip filter (also known as the notvers) is to suppress a certain frequency signal and passing the signals of other frequencies. With [B, A] = Butter (N, Wn, 'STOP', ') statements in Matlab, where [B, A] is the coefficient of the filter transfer function; n is filtering The order of the unit; Wn = [fl * 2 * pi fu * 2 * pi] is the angular frequency at the lower end one 3 dB and high end one 3 dB, respectively; 's' represents an analog filter. The main procedures are as follows:
Click to see the original picture
Similar to the amplitude frequency, phase frequency characteristics of the low pass filter, the amplitude frequency of the strip filter, as shown in Fig. 2 (a). In this design, the actual circuit uses the VCVS type second-order straightening filter as shown in Figure 2 (b). The resistors R1, R2, R3, and the value of the capacitor C1 need to be determined, and their calculation formula can be obtained by MATLAB, and finally select the corresponding nominal value according to the calculation result.
Click to see the original picture
1.3 Low pass filter and cascading with blocking filter
The low-pass low-through and the band-blocked filter allows the level of the circuit after the level, which satisfies the design requirements, that is, attenuated at the 8 kHz frequency to one 6 dB; 16 kHz frequency (cutoff frequency) The attenuation reaches a 60 dB or more. If the requirements are not met, according to the simulation results, the Q value in the band-resistant filter is constantly modified until the design requirements are met. In Matlab, the CONV function is achieved with a cascade of two circuits. The main procedures are as follows:
% B3, A3 is low-pass and strip-resistant filter stage, and the frequency, phase frequency characteristics of the low pass filter, the amplitude frequency, and the phase frequency characteristics of the cascading circuit, the phase frequency characteristics of the cascade circuit, and the phase frequency characteristics are shown in FIG. It can be seen that when Q takes O. At 7 o'clock, the frequency characteristics met the design requirements, but the phase frequency characteristics were not a straight line within 8 000 Hz. In order to make the output signal not distorted, the phase shift filter must be added to make the total phase shift characteristic becomes A straight line.
Click to see the original picture
1.4 phase shift filter design and phase frequency characteristics of non-distortion filters
In this design, it is a first-order reverse phase gain full pass filter circuit, and its transmission function is:
The circuit diagram is shown in Figure 4. Leading low pass, strain, and phase shift circuits constitute a non-distortion filter. In MATLAB, a phase shift can be obtained by programming, a phase-frequency characteristic curve of no distortion filter.
Click to see the original picture
The main procedures are as follows:
% B, A is the transfer function polynomial coefficient of non-distortion filters, where B3, A3 is low-pass and the phase-resistant filter stage, and the phase curve finally obtained by the multiplicate coefficient of the function is shown in Figure 5. It can be seen that the phase frequency characteristics of the non-distortion filter are a straight line.
The actual circuit of each portion is cascaded to obtain an actual circuit of the non-distortion filter, and the input analog signal and output signal of the non-distortion filter are shown in Figure 6. As can be seen from the figure, the eye graph is clear. The eyes are large and the intersection between the eyes is clear. Note the amplitude frequency of the non-distortion filter, the phase frequency characteristics are good, and the design requirements can be achieved.
Click to see the original picture
2 knot
Using the MATLAB design analog filter, it is simple and convenient, avoiding complex operations and surfackers. Through the simulation, it can be visually seen the frequency response curve after the parameter modification, which can meet the requirements of the system design, avoiding the trouble of repeatedly adjusting the hardware circuit, greatly improving the work efficiency, but matlab can not only use the analog filter. Design, it can also be used for the design of digital filters such as FIR, IIR, and is a powerful tool in terms of filter design. , Reading the full text, the technology area
Hardware simulation commissioning based on embedded systems
MS1830 chip brief description of HDMI turns CVBS function analysis
MS9282 chip introduction function is VGA to HDMI
Detailed integrated transceiver brings SWAP solutions
How to use DFT APP for hardware simulation
Our other product: