As the most basic processing component in applications such as speech and image processing, pattern recognition, radar signal processing, and spectrum analysis, digital filters have become one of the most commonly used tools. They can not only meet the strict requirements of filters on amplitude and phase characteristics, but also avoid problems such as voltage drift, temperature drift, and noise that analog filters cannot overcome. For filtering problems with linear phase characteristics, FIR filters are generally selected during design. Compared with the window function method and frequency design method, when the theory is
As the most basic processing component in applications such as speech and image processing, pattern recognition, radar signal processing, and spectrum analysis, digital filters have become one of the most commonly used tools. They can not only meet the strict requirements of filters on amplitude and phase characteristics, but also avoid problems such as voltage drift, temperature drift, and noise that analog filters cannot overcome. For filtering problems with linear phase characteristics, FIR filters are generally selected during design.
Compared with the window function method and the frequency design method, the Chebyshev approximation method can be regarded as the best design criterion in the sense that the weighted approximation error between the ideal frequency response and the actual frequency response is uniformly distributed over the entire passband and stopband of the filter to minimize and maximize the error.
1 Design Principles
1.1 FIR digital filter
For an FIR filter with a length of N, an input of x(n), and an output of y(n), its output function can be expressed by a difference equation:
1.2 Chebyshev approximation
(1) Four cases of linear phase FIR filter
Depending on the symmetry or antisymmetry of the unit sample response and the odd or even filter length, there are four cases for linear phase FIR filters:
Case 1: The unit sample response is symmetrical, that is, h(n)=h(N-1-n), and N is an odd number;
Case 2: The unit sample response is symmetrical, that is, h(n)=h(N-1-n), and N is an even number;
Case 3: The unit sample response is antisymmetric, that is, h(n)=-h(N-1-n), and N is an odd number;
Case 4: The unit sample response is antisymmetric, that is, h(n)=-h(N-1-h), and N is an even number.
If the error function is known, the Chebyshev approximation only needs to determine the filter parameters {α(k)} and then minimize the maximum absolute value of the approximation frequency band E(ω). That is, to find the solution of the following equation:
The solution to this problem has been solved by Parks and MCClellan, and is called the Remez exchange algorithm. The algorithm is based on the alternation theorem. Figure 1 shows the flow chart of the Remez algorithm.
(2) Error function E(ω)
If the real-valued ideal frequency response Hd(ω) is defined as 1 in the passband and 0 in the stopband; at the same time, the weighting function W(ω) is defined as δ2/δ1 in the passband (δ1 is the passband ripple, δ1 is the stopband ripple) and 1 in the stopband. Then the weighted approximation error E(ω) can be defined as:
(3) Alternation Theorem
2 Implementation of FIR digital filter on ARM
The Chebyshev approximation method is mainly implemented using the Remez exchange algorithm, and its design flow chart is shown in Figure 1. This article mainly discusses how to implement the algorithm on the ARM platform to design a FIR digital filter. Its specific design flow chart is shown in Figure 2, and the steps are as follows:
Find the value of P(ωk). In fact, we can also use the Lagrange difference formula for P(ω) to solve P(ω), the specific formula is:
(5) Calculation of error E(ω)
With the above foundation, we can use formula (4) to calculate E(ω), and then repeat the above process until we find E(ω) that meets the requirements. In this way, we can determine the value of P(ω).
(6) Determination of the real-valued frequency response H(ω)
After obtaining the optimal solution through P(ω), the real-valued frequency response can be determined directly using formula (3) without having to solve the parameter {αk}.
3 Conclusion
Based on the Chebyshev approximation method, this paper proposes a software implementation method for digital filters based on the ARM platform. The experimental results show that this method is feasible and can meet the requirements, and can be preliminarily used in actual signal processing, laying a good foundation for further practical application.
As the most basic processing component in applications such as speech and image processing, pattern recognition, radar signal processing, and spectrum analysis, digital filters have become one of the most commonly used tools. They can not only meet the strict requirements of filters on amplitude and phase characteristics, but also avoid problems such as voltage drift, temperature drift, and noise that analog filters cannot overcome. For filtering problems with linear phase characteristics, FIR filters are generally selected during design.
Compared with the window function method and the frequency design method, the Chebyshev approximation method can be regarded as the best design criterion in the sense that the weighted approximation error between the ideal frequency response and the actual frequency response is uniformly distributed over the entire passband and stopband of the filter to minimize and maximize the error.
1 Design Principles
1.1 FIR digital filter
For an FIR filter with a length of N, an input of x(n), and an output of y(n), its output function can be expressed by a difference equation:
1.2 Chebyshev approximation
(1) Four cases of linear phase FIR filter
Depending on the symmetry or antisymmetry of the unit sample response and the odd or even filter length, there are four cases for linear phase FIR filters:
Case 1: The unit sample response is symmetrical, that is, h(n)=h(N-1-n), and N is an odd number;
Case 2: The unit sample response is symmetrical, that is, h(n)=h(N-1-n), and N is an even number;
Case 3: The unit sample response is antisymmetric, that is, h(n)=-h(N-1-n), and N is an odd number;
Case 4: The unit sample response is antisymmetric, that is, h(n)=-h(N-1-h), and N is an even number.
(2) Error function E(ω)
If the real-valued ideal frequency response Hd(ω) is defined as 1 in the passband and 0 in the stopband; at the same time, the weighting function W(ω) is defined as δ2/δ1 in the passband (δ1 is the passband ripple, δ1 is the stopband ripple) and 1 in the stopband. Then the weighted approximation error E(ω) can be defined as:
If the error function is known, the Chebyshev approximation only needs to determine the filter parameters {α(k)} and then minimize the maximum absolute value of the approximation frequency band E(ω). That is, to find the solution of the following equation:
The solution to this problem has been solved by Parks and MCClellan, and is called the Remez exchange algorithm. The algorithm is based on the alternation theorem. Figure 1 shows the flow chart of the Remez algorithm.
(2) Error function E(ω)
If the real-valued ideal frequency response Hd(ω) is defined as 1 in the passband and 0 in the stopband; at the same time, the weighting function W(ω) is defined as δ2/δ1 in the passband (δ1 is the passband ripple, δ1 is the stopband ripple) and 1 in the stopband. Then the weighted approximation error E(ω) can be defined as:
(3) Alternation Theorem
2 Implementation of FIR digital filter on ARM
The Chebyshev approximation method is mainly implemented using the Remez exchange algorithm, and its design flow chart is shown in Figure 1. This article mainly discusses how to implement the algorithm on the ARM platform to design a FIR digital filter. Its specific design flow chart is shown in Figure 2, and the steps are as follows:
Find the value of P(ωk). In fact, we can also use the Lagrange difference formula for P(ω) to solve P(ω), the specific formula is:
(5) Calculation of error E(ω)
With the above foundation, we can use formula (4) to calculate E(ω), and then repeat the above process until we find E(ω) that meets the requirements. In this way, we can determine the value of P(ω).
(6) Determination of the real-valued frequency response H(ω)
After obtaining the optimal solution through P(ω), the real-valued frequency response can be determined directly using formula (3) without having to solve the parameter {αk}.
3 Conclusion
Based on the Chebyshev approximation method, this paper proposes a software implementation method for digital filters based on the ARM platform. The experimental results show that this method is feasible and can meet the requirements, and can be preliminarily used in actual signal processing, laying a good foundation for further practical application.
Previous article:How to design and compile software in an energy-efficient way on the ARM platform
Next article:Design of a set-top box streaming media player based on embedded Linux
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Detailed explanation of intelligent car body perception system
- How to solve the problem that the servo drive is not enabled
- Why does the servo drive not power on?
- What point should I connect to when the servo is turned on?
- How to turn on the internal enable of Panasonic servo drive?
- What is the rigidity setting of Panasonic servo drive?
- How to change the inertia ratio of Panasonic servo drive
- What is the inertia ratio of the servo motor?
- Is it better for the motor to have a large or small moment of inertia?
- What is the difference between low inertia and high inertia of servo motors?
- Showing off the goods + the first wave of development boards
- RF Circuit Engineering Design
- What is the role of the pull-up resistor? How to choose the value of the pull-up resistor
- How to obtain additional information of Pingtouge scenario-based Bluetooth MESH
- I have encountered a problem with the iTOP4418 development board. Is there any big guy who can help me?
- FLASH cannot be downloaded
- [GD32E231 DIY Contest] 3. Timer + button (supports long press and short press) + LED
- New findings from Nature's sub-journal: Do we need to work 10% more per week after working from home?
- Harbin in my eyes in 2020
- RISC-V IDE MRS usage notes (I): Target mode doesn't match