CIC filter compensator selection method and device, electronic equipment and medium
The CIC filter compensator selection method addresses passband ripple issues in sigma-delta DACs by optimizing filter parameters and adder usage, ensuring consistent signal amplitudes and efficient resource utilization.
Patent Information
- Application Number
- CN202411334668.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2025-01-03
AI Technical Summary
Existing digital filters in sigma-delta DACs face challenges with large ripples in the passband, leading to inconsistent signal amplitudes and increased implementation costs due to the need for arithmetic operations in compensators, which are not optimally resource-efficient.
A method for selecting a CIC filter compensator by determining filter parameters, performing CSD fixed-point processing, and calculating compensated passband ripple to minimize the number of adders required, thereby reducing resource occupation while maintaining passband flatness.
The method achieves high passband flatness with reduced resource usage, minimizing the area occupied by the filter compensator while maintaining optimal performance.
Smart Images

Figure CN119254190A_ABST
Abstract
Description
Technical Field
[0001] This document relates to the field of filter compensation technology, and in particular to a CIC filter compensator selection method, device, electronic device and medium. Background Art
[0002] In the sigma-delta DAC, the digital downsampling filter is a very important part. Existing digital filters are generally implemented directly using cascaded integrator comb filters, which have large ripples in the passband, resulting in different output amplitudes of signals with the same amplitude after filtering due to different frequencies. The introduction of a compensator can improve the flatness of the passband, ensure the consistent attenuation of signals of various frequencies in the passband, and thus ensure the correctness of the filtered signal; but because the compensator needs to perform arithmetic operations on the digitally filtered signal, it will increase the overall implementation cost of the CIC filter. In order to reduce the challenge of adding a compensator to the system cost, it is necessary to consider the low-cost implementation of the compensator.
[0003] The compensation filter works at the post-stage of the CIC filter, and its bit width is the full bit width of the CIC filter. The resource occupied by the compensation filter can be reduced by designing without multiplication, but it cannot achieve the optimal solution. The existing algorithms usually only use one structure, which makes it difficult to achieve the optimal solution for resources. Summary of the invention
[0004] The object of the present invention is to provide a CIC filter compensator selection method, device, electronic device and medium, aiming to solve the above-mentioned problems in the prior art.
[0005] The present invention provides a CIC filter compensator selection method, comprising:
[0006] Determine the filter parameters of the filter compensator according to the downsampling multiple and the filter order of the downsampling filter;
[0007] Performing CSD fixed-point processing on the filtering parameters to obtain the fixed-point filtering parameters and the number of adders corresponding to the fixed-point filtering parameters;
[0008] The compensated passband ripple is calculated according to the fixed-point filtering parameters, and the filter type and implementation method are selected according to the number of adders and the compensated passband ripple.
[0009] The present invention provides a CIC filter compensator selection device, comprising:
[0010] A filter parameter determination module, used to determine the filter parameters of the filter compensator according to the downsampling multiple and the filter order of the downsampling filter;
[0011] A fixed-point module, used for performing CSD fixed-pointing on the filtering parameters to obtain the fixed-point filtering parameters and the number of adders corresponding to the fixed-point filtering parameters;
[0012] A selection module is used to calculate the compensated passband ripple according to the fixed-point filtering parameters, and select the filter type and implementation method according to the number of adders and the compensated passband ripple.
[0013] An embodiment of the present invention further provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps of the above-mentioned CIC filter compensator selection method when executed by the processor.
[0014] An embodiment of the present invention further provides a computer-readable storage medium, on which a program for implementing information transmission is stored, and when the program is executed by a processor, the steps of the above-mentioned CIC filter compensator selection method are implemented.
[0015] According to an embodiment of the present invention, by adopting a method of selecting the best from the two compensators and flexibly selecting the filter structure, the flatness of the filter in the passband is achieved while minimizing the number of adders required for the filter compensation function, thereby reducing the area occupied by it. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate one or more embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0017] Figure 1 is a flow chart of a CIC filter compensator selection method according to an embodiment of the present invention;
[0018] Figure 2 is a schematic diagram of the structure of a CIC filter compensation system according to an embodiment of the present invention;
[0019] Figure 3 is a schematic diagram of a CIC filter compensator selection device according to an embodiment of the present invention;
[0020] Figure 4 is a schematic diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0021] In order to enable those skilled in the art to better understand the technical solutions in one or more embodiments of this specification, the following will be combined with the drawings in one or more embodiments of this specification to clearly and completely describe the technical solutions in one or more embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on one or more embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this document.
[0022] Method Embodiment
[0023] According to an embodiment of the present invention, a CIC filter compensator selection method is provided. Figure 1 is a flow chart of a method for selecting a CIC filter compensator according to an embodiment of the present invention. Figure 1 As shown, the CIC filter compensator selection method according to an embodiment of the present invention specifically includes:
[0024] Step S101, determining the filtering parameters of the filter compensator according to the downsampling multiple and the filtering order of the downsampling filter; specifically comprising:
[0025] The filtering parameters A1, B1 and A2, B2 of the two filter compensators are determined according to the downsampling multiple and the filter order of the downsampling filter. Among them, the first filter compensator is implemented by multiplying sinusoidal terms, and the second filter compensator is implemented by adding sinusoidal terms. The coefficients of the first filter compensator and the second filter compensator are both expressed by CSD without multiplication, and shift and addition are used instead of multiplication and addition.
[0026] The first filter compensator is the multiplication of the fourth-order term and the second-order term of the sine wave, and the expression is shown in Formula 1:
[0027]
[0028] Among them, A1 and B1 are the fixed filter parameters of the first filter compensator, M is the downsampling multiple of the CIC filter, and ω is the angular frequency;
[0029] The second filter compensator is the addition of the fourth-order and second-order terms of the sine wave, and the expression is shown in Formula 2:
[0030]
[0031] Wherein, A2 and B2 are fixed filter parameters of the second filter compensator, M is the downsampling multiple of the CIC filter, and ω is the angular frequency.
[0032] Step S102, performing CSD fixed-point processing on the filter parameters to obtain the fixed-point filter parameters and the number of adders corresponding to the fixed-point filter parameters;
[0033] Step S103, calculating the compensated passband ripple according to the fixed-point filter parameters, and selecting the filter type and implementation method according to the number of adders and the compensated passband ripple. Specifically including:
[0034] According to the number of adders and the compensated in-passband ripple, the selection is performed based on the principle of the minimum number of adders, that is, under the same in-passband ripple condition, a compensator with a smaller number of adders is selected.
[0035] The technical solution of the embodiment of the present invention proposes a flexible compensation method, which compromises between two CIC filter compensator design methods to achieve the maximum passband flatness and the lowest implementation cost. In the two CIC filter compensator design methods, the CIC filter compensator uses a function related to the sine, selects a smaller passband ripple as a criterion under the same cost conditions, and selects a better compensation function to achieve CIC filter compensation. Compared with the prior art, the passband flatness is high, and the overall filter occupies less area, which has a better cost advantage under the same performance conditions.
[0036] The above technical solution of the embodiment of the present invention is described in detail below in conjunction with the accompanying drawings.
[0037] In the embodiment of the present invention, the compensation filter is selected in a best-of-best manner, and the specific steps are:
[0038] Step 1, determining parameters A1, B1 and A2, B2 of two filter compensators according to the downsampling multiple and filter order of the downsampling filter;
[0039] Step 2, performing CSD (Canonical Signed Digit) fixed-point processing on the parameters of the two filter compensators to obtain the fixed-point filter parameters and the number of adders for comparing the parameters;
[0040] Step 3: Calculate the fixed-point coefficient A1 ’ 、B1 ’ and A2 ’ 、B2 ’ , recalculate the compensated passband ripple. Select the filter type and implementation method based on the number of overall adders after fixed-point conversion and the maximum ripple requirement within the band.
[0041] Through the above selection method, the CIC compensation filter can achieve the same compensation effect while occupying lower resources. On the one hand, the compensation effect is good and the in-band ripple is small; on the other hand, the occupied area is small and the resource utilization rate is high.
[0042] like Figure 2 The system structure shown in the figure sets the total downsampling rate of the system to M = 32, the order K = 5, and the input signal is a 3.2M single-bit digital signal sampled by the sigma-delta modulator. The transfer function of the CIC filter 1 is shown in the following formula:
[0043]
[0044] Substitute Z = e jω The amplitude of CIC filter 1 can be obtained as follows:
[0045]
[0046] After calculation, the signal passes through the CIC filter (CIC filter 1), the rate is reduced to 1 / 32 of the original rate, which is 100KHz, and the in-band (bandwidth f p =50KHz) the ripple is as high as 5dB, which makes it difficult to meet the requirement of uniform amplitude within the passband.
[0047] After adding the compensator, the overall amplitude response of the filter is:
[0048] Compensation method 1:
[0049]
[0050] Compensation method 2:
[0051]
[0052] Where ω is the angular frequency, M is the downsampling rate, and K is the CIC filter order. Taking M = 32 and K = 5 as an example, the parameters A1, B1 and A2, B2 that meet the passband ripple requirements can be calculated by the following formula:
[0053] 20log 10 |H ci (e jω )|≤δ……0≤ω≤ω p , i=0,1
[0054] in, δ is the maximum ripple allowed in the passband. For a given in-band ripple value δ, the Matlab program can be used to calculate the two filter compensator parameters A1, B1, A2, B2 that meet the requirements. Taking the requirements of this article as an example, under the conditions of meeting the maximum flatness criterion and δ≤0.3, the optimal solution can be obtained as A1=0.77, B1=0.81; A2=1.12, B2=0.77.
[0055] After the parameters are fixed-pointed, the number of adders used by compensator 1 and compensator 2 is:
[0056] Compensator 1: N1 = 9 + Na1 + Nb1;
[0057] Compensator 2: N2=6+Na2+Nb2
[0058] Among them, Na1 and Nb1 represent the number of non-zero bits of the fixed-point parameters a1 and b1 of compensator 1, respectively; Na1 and Nb1 represent the number of non-zero bits of the fixed-point parameters a2 and b2 of compensator 2. N1 and N2 represent the total number of adders required by compensators 1 and 2.
[0059] The parameters are fixed-pointed using the CSD method, and the in-band ripple is recalculated for the fixed-point parameters. The maximum ripple values of compensator 1 and compensator 2 after fixed-pointing are obtained. The optimal implementation scheme can be selected based on the fixed-point ripple values and the total number of adders N1 and N2.
[0060] The fixed-point parameters and ripple values of compensation method 1 and compensation method 2 are shown in Table 1 and Table 2 respectively:
[0061] Table 1: Fixed-point parameters and ripple values for compensation method 1
[0062]
[0063] Table 2: Fixed-point parameters and ripple values for compensation method 2
[0064]
[0065]
[0066] Comparing Table 1 and Table 2, it can be obtained that when δ≤0.3 is set, Scheme 1 with Compensator 2 is the optimal solution, with a maximum ripple of 0.123dB and only 8 adders; when δ≤0.2 is set, Scheme 1 with Compensator 2 is still the optimal solution, with 8 adders; when δ≤0.1 is set, Scheme 2 with Compensator 1 is the optimal solution, with coefficients A1 and B1 quantized to 0.75 and 0.8125, and 12 adders. If only Compensator 1 is used, the number of adders is not advantageous when δ>0.1 is required; if only Compensator 2 is used, the overall compensation performance can only reach more than 0.1dB, and there is no suitable option under the condition of δ<0.1.
[0067] In summary, by means of the technical solution of the embodiment of the present invention, through the above selection method, the CIC compensation filter can achieve the same compensation effect while occupying lower resources. On the one hand, the compensation effect is good and the in-band ripple is small; on the other hand, the occupied area is small and the resource utilization rate is high.
[0068] Device Example 1
[0069] According to an embodiment of the present invention, a CIC filter compensator selection device is provided. Figure 3 Schematic diagram of a CIC filter compensator selection device according to an embodiment of the present invention. Figure 3 As shown, the CIC filter compensator selection device according to the embodiment of the present invention specifically includes:
[0070] The filter parameter determination module 30 is used to determine the filter parameters of the filter compensator according to the downsampling multiple and the filter order of the downsampling filter; specifically used for:
[0071] The filtering parameters A1, B1 and A2, B2 of the two filter compensators are determined according to the downsampling multiple and the filter order of the downsampling filter. Among them, the first filter compensator is implemented by multiplying sinusoidal terms, and the second filter compensator is implemented by adding sinusoidal terms. The coefficients of the first filter compensator and the second filter compensator are both expressed by CSD without multiplication, and shift and addition are used instead of multiplication and addition.
[0072] The first filter compensator is the multiplication of the fourth-order term and the second-order term of the sine wave, and the expression is shown in Formula 1:
[0073]
[0074] Among them, A1 and B1 are the fixed filter parameters of the first filter compensator, M is the downsampling multiple of the CIC filter, and ω is the angular frequency;
[0075] The second filter compensator is the addition of the fourth-order and second-order terms of the sine wave, and the expression is shown in Formula 2:
[0076]
[0077] Wherein, A2 and B2 are fixed filter parameters of the second filter compensator, M is the downsampling multiple of the CIC filter, and ω is the angular frequency.
[0078] A fixed-point module 32, used for performing CSD fixed-pointing on the filter parameters to obtain the fixed-point filter parameters and the number of adders corresponding to the fixed-point filter parameters;
[0079] The selection module 34 is used to calculate the compensated passband ripple according to the fixed-point filtering parameters, and select the filter type and implementation method according to the number of adders and the compensated passband ripple. Specifically used for:
[0080] According to the number of adders and the compensated in-passband ripple, the selection is performed based on the principle of the minimum number of adders, that is, under the same in-passband ripple condition, a compensator with a smaller number of adders is selected.
[0081] The embodiment of the present invention is a device embodiment corresponding to the above-mentioned method embodiment. The specific operations of each module can be understood by referring to the description of the method embodiment, which will not be repeated here.
[0082] Device Example 2
[0083] An embodiment of the present invention provides an electronic device, such as Figure 4 As shown, it includes: a memory 40, a processor 42, and a computer program stored in the memory 40 and executable on the processor 42. When the computer program is executed by the processor 42, the steps described in the method embodiment are implemented.
[0084] Device Example 3
[0085] An embodiment of the present invention provides a computer-readable storage medium, on which a program for implementing information transmission is stored. When the program is executed by the processor 42, the steps described in the method embodiment are implemented.
[0086] The computer-readable storage medium in this embodiment includes, but is not limited to, ROM, RAM, magnetic disk or optical disk, etc.
[0087] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A CIC filter compensator selection method, characterized in that: include: Determine the filter parameters of the filter compensator according to the downsampling multiple and the filter order of the downsampling filter; Performing CSD fixed-point processing on the filtering parameters to obtain the fixed-point filtering parameters and the number of adders corresponding to the fixed-point filtering parameters; The compensated passband ripple is calculated according to the fixed-point filtering parameters, and the filter type and implementation method are selected according to the number of adders and the compensated passband ripple.
2. The method according to claim 1, characterized in that Determining the filter parameters of the filter compensator according to the downsampling multiple and the filter order of the downsampling filter specifically includes: The filtering parameters A1, B1 and A2, B2 of the two filter compensators are determined according to the downsampling multiple and the filter order of the downsampling filter. Among them, the first filter compensator is implemented by multiplying sinusoidal terms, and the second filter compensator is implemented by adding sinusoidal terms. The coefficients of the first filter compensator and the second filter compensator are both expressed by CSD without multiplication, and shift and addition are used instead of multiplication and addition.
3. The method according to claim 2, characterized in that The first filter compensator is the multiplication of the fourth-order term and the second-order term of the sine wave, and the expression is shown in Formula 1: Among them, A1 and B1 are the fixed filter parameters of the first filter compensator, M is the downsampling multiple of the CIC filter, and ω is the angular frequency; The second filter compensator is the addition of the fourth-order and second-order terms of the sine wave, and the expression is shown in Formula 2: Wherein, A2 and B2 are fixed filter parameters of the second filter compensator, M is the downsampling multiple of the CIC filter, and ω is the angular frequency.
4. The method according to claim 1, characterized in that: The filter type and implementation method are specifically selected according to the number of adders and the compensated passband ripple: According to the number of adders and the compensated in-passband ripple, the selection is performed based on the principle of the minimum number of adders, that is, under the same in-passband ripple condition, a compensator with a smaller number of adders is selected.
5. A CIC filter compensator selection device, characterized in that: include: A filter parameter determination module, used to determine the filter parameters of the filter compensator according to the downsampling multiple and the filter order of the downsampling filter; A fixed-point module, used for performing CSD fixed-pointing on the filtering parameters to obtain the fixed-point filtering parameters and the number of adders corresponding to the fixed-point filtering parameters; A selection module is used to calculate the compensated passband ripple according to the fixed-point filtering parameters, and select the filter type and implementation method according to the number of adders and the compensated passband ripple.
6. The device according to claim 5, characterized in that The filtering parameter determination module is specifically used for: The filtering parameters A1, B1 and A2, B2 of the two filter compensators are determined according to the downsampling multiple and the filter order of the downsampling filter. Among them, the first filter compensator is implemented by multiplying sinusoidal terms, and the second filter compensator is implemented by adding sinusoidal terms. The coefficients of the first filter compensator and the second filter compensator are both expressed by CSD without multiplication, and shift and addition are used instead of multiplication and addition.
7. The device according to claim 6, characterized in that The first filter compensator is the multiplication of the fourth-order term and the second-order term of the sine wave, and the expression is shown in Formula 1: Among them, A1 and B1 are the fixed filter parameters of the first filter compensator, M is the downsampling multiple of the CIC filter, and ω is the angular frequency; The second filter compensator is the addition of the fourth-order and second-order terms of the sine wave, and the expression is shown in Formula 2: Wherein, A2 and B2 are fixed filter parameters of the second filter compensator, M is the downsampling multiple of the CIC filter, and ω is the angular frequency.
8. The device according to claim 5, characterized in that The selection module is specifically used for: According to the number of adders and the compensated in-passband ripple, the selection is performed based on the principle of the minimum number of adders, that is, under the same in-passband ripple condition, a compensator with a smaller number of adders is selected.
9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the steps of the CIC filter compensator selection method according to any one of claims 1 to 4 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores an information transmission implementation program, and when the program is executed by a processor, the steps of the CIC filter compensator selection method according to any one of claims 1 to 4 are implemented.
