Design of a Programmable Filter

Publisher:MysticSerenadeLatest update time:2011-11-12 Source: 互联网 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
The signal picked up by the measurement system from the sensor often contains noise and many signals that are irrelevant to the measured value. In addition, the original measurement signal will be mixed with various forms of noise after transmission, amplification, transformation, calculation and various other processing processes, thus affecting the measurement accuracy. These noises are generally highly random and difficult to separate directly from the time domain, but due to the mechanism of their generation, their noise power is limited and distributed in a certain frequency band in the frequency domain according to certain rules. The signal separation circuit generally uses a filter to suppress noise and extract the required measurement signal. However, the form and cutoff frequency of the filter used in the system are often fixed, and it is difficult to make them adjustable, which brings certain inconveniences to the design of the system. However, the use of switched capacitor filters can solve this problem well, but the price of switched capacitor filters is relatively high, which will increase the design cost of the system. Therefore, a solution based on state variable filters is proposed here. This design can greatly reduce the production cost and has a high application prospect.

1 System Design

A programmable filter whose filtering form and cutoff frequency can be set by keyboard is designed. The filter input uses a common-phase amplifier circuit for impedance matching, so that the input resistance reaches the megaohm level. The system mainly consists of three parts: human-computer interaction module, dual second-order loop filter module, and variable resistor module.

The cutoff frequency and Q value of the dual second-order loop filter circuit are determined by some of the resistors and capacitors, and the two parameters are independent of each other. The R-2R ladder network and current output DAC can be equivalent to a resistor whose resistance is only controlled by the input data. By using the DAC controlled by a single-chip microcomputer as an equivalent resistor to control the cutoff frequency and Q value of the filter, precise program control of the filter parameters can be achieved, and the accuracy of the filter parameter adjustment increases with the increase of the DAC bit number. This solution can generate high-pass, low-pass, band-pass, and band-stop filters by the same circuit, saving hardware resources and effectively reducing the design cost. Figure 1 is a block diagram of the system design.



2 Hardware Circuit Design

2.1 Biquad Loop Filter

The core part of this system is the dual second-order loop filter. The dual second-order loop filter uses more than two operational amplifier circuits composed of adders, integrators, etc., and introduces appropriate feedback to form a filter circuit according to the required transfer function. Its outstanding feature is that the circuit has low sensitivity, so the characteristics are stable, and it can realize a variety of filtering functions. After appropriate improvement, the number of operational amplifiers can also be reduced. This system uses TI's four-channel operational amplifier OPA404 and designs a dual second-order loop filter circuit. OPA404 is a four-way high-speed precision operational amplifier with a bandwidth of up to * MHz and a voltage slew rate of up to 35 V/s, which can meet the design requirements of this system. The circuit schematic is shown in Figure 2.

2.2 Variable resistor

In circuit analysis, a fixed resistor can be considered as a single-ended network. Given an excitation voltage Un, it can output a response current I0, and the impedance of the resistor is defined as R0=U0/I0. The same can be said for current-type D/A converters. If the reference voltage of the D/A converter is regarded as the excitation voltage input, then the output current can be regarded as the response current. By setting the digital value of the output voltage of the D/A converter through software, the response current can be changed.

Using a four-channel current output serial D/A converter MAX514, MA514 is an inverted T-shaped R-2R resistor network D/A converter, then its output voltage formula is



2.3 Filter parameter analysis

As shown in Figure 2, the four operational amplifiers output high pass, low pass, band pass, and band stop, respectively. And R01=R02=R03=R04=10 kΩ, R05=R06=R07=10 kΩ, which determines the gain of the filter output: KHP=1, RBP=-1, RLP=1, RBS=-1. In the design, Cl=C2=180 pF is selected, and the cutoff frequency (or center frequency) of the filter is:



Therefore, the range of the cutoff frequency (or center frequency) that can be set is 15.8 Hz to 64.5 kHz. The frequency range of this system design is 100 Hz to 50 kHz. Within a certain cutoff frequency range, the setting range of the Q value is 0.5 to 5.

3 System Software Design

The system software adopts modular and hierarchical design ideas. The modular method means that when controlling a certain hardware module, you only need to call the corresponding control module. The module adopts hierarchical design, compiles the underlying hardware interface processing into an independent underlying subroutine, and provides the processed data upward, and shields the underlying hardware interface part from the upper functional module. Finally, the main program only needs to call the relevant functional modules to easily build the system.

The software part of this system is mainly composed of a single-chip microcomputer, which mainly includes system initialization, interrupt response and interrupt processing. The function of this design is based on the keyboard key interrupt. By reading the key value entered by the user, the corresponding interrupt response function exchanges data with the external hardware circuit in a bus manner to achieve the setting of the filter cutoff frequency (center frequency) and Q value. The system software flow is shown in Figure 3.



4 System Testing

The system was tested using a digital synthetic signal source, a dual-trace oscilloscope, a simulator, and an AC voltmeter. The frequency of the input signal was adjusted, and the effective value of the output voltage was recorded using an AC voltmeter. The actual measured value was compared and analyzed with the preset value.

For low-pass or high-pass filters, the Q value (quality factor) is preset to 0.707. The test results show that the filter cutoff frequency is adjustable from 100 Hz to 50 kHz, and the error between the actual measured cutoff frequency and the set value is less than 1%. In the stop band of the filter, the effect of 40 dB attenuation in 10 times the frequency is achieved, and the fluctuation in the pass band is less than 0.5 dB.

For the bandpass or bandstop filter, the Q value is preset to 5. The test results show that the center frequency of the filter is adjustable in the range of 600 Hz to 7.2 kHz, and the error between the actual measured Q value and the preset value is less than 3%.

5 Conclusion

A programmable filter is designed. The principle of this scheme is different from that of the switched capacitor filter. Instead, it uses a state variable filter and a current-type D/A converter. In terms of the essence of this scheme, the inverted T-shaped R-2R resistor network of the current-type D/A converter is used to change the resistor value used to determine the cutoff frequency and Q value in the state variable filter, thereby realizing the program control of the filter. The resolution of the filter cutoff frequency and Q value increases with the increase in the scale of the resistor network. In the design of large-scale integrated circuits, the state variable filter and the inverted T-shaped R-2R resistor network can be integrated into a single chip, which can greatly reduce the design cost and has a good application prospect. This article only proposes a general design idea, which needs to be further improved in practical application.


Reference address:Design of a Programmable Filter

Previous article:Design and implementation of adaptive filter in digital noise reduction headphones
Next article:Design of a low-cost, 8-channel, synchronous sampling data acquisition system

Latest Power Management 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号