Software Implementation Method of Digital Filter Based on ARM Platform

Publisher:Dingsir1902Latest update time:2018-02-17 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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.


Reference address:Software Implementation Method of Digital Filter Based on ARM Platform

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

Latest Microcontroller 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号