CN115955217B - Low-complexity digital filter coefficient self-adaptive combined coding method and system - Google Patents

Low-complexity digital filter coefficient self-adaptive combined coding method and system Download PDF

Info

Publication number
CN115955217B
CN115955217B CN202310245827.8A CN202310245827A CN115955217B CN 115955217 B CN115955217 B CN 115955217B CN 202310245827 A CN202310245827 A CN 202310245827A CN 115955217 B CN115955217 B CN 115955217B
Authority
CN
China
Prior art keywords
matrix
sub
coefficient
block
filter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310245827.8A
Other languages
Chinese (zh)
Other versions
CN115955217A (en
Inventor
华磊
欧阳翔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Qinheng Microelectronics Co ltd
Original Assignee
Nanjing Qinheng Microelectronics Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing Qinheng Microelectronics Co ltd filed Critical Nanjing Qinheng Microelectronics Co ltd
Priority to CN202310245827.8A priority Critical patent/CN115955217B/en
Publication of CN115955217A publication Critical patent/CN115955217A/en
Application granted granted Critical
Publication of CN115955217B publication Critical patent/CN115955217B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The invention discloses a low-complexity digital filter coefficient self-adaptive combined coding method and a system, wherein the method comprises the following steps: carrying out normalization quantization processing on the filter coefficients, recording the number of the filter coefficients as N, recording the number of quantized bit numbers as B, and carrying out CSD coding on the processed filter coefficients to obtain a coefficient matrix; defining sub-matrix blocks for simplifying the coefficient matrix, wherein different sub-matrix blocks are represented by different characters; setting a set of thresholds; by comparing N, B with the threshold value, different sub-matrix blocks are selected in a self-adaptive manner, and characters corresponding to the sub-matrix blocks are used for replacing the parts where the sub-matrix blocks appear, so that the coefficient matrix is simplified. The method has the advantages of low calculated amount, less occupied hardware resources, strong self-adaption, high accuracy and strong portability.

Description

Low-complexity digital filter coefficient self-adaptive combined coding method and system
Technical Field
The invention relates to the technical field of digital signal processing, in particular to a low-complexity digital filter coefficient self-adaptive combined coding method and system.
Background
In recent years, the rapid development of technologies such as industrial internet, internet of things and internet of vehicles has also promoted the rapid development of digital signal processing technologies. The digital filter is an important signal processing device, can effectively eliminate noise interference, and is widely applied to digital signal processing, so that the digital filter is important for improving the performance and the efficacy of the filter. Because the realization of the filter requires a large number of multipliers, multiplication operation of a large amount of data can bring about a complex logic relationship and occupy FPGA resources, and also bring about a large loss for hardware chip area and power consumption, an effective method is needed to reduce the calculation complexity and improve the system operation efficiency.
The traditional filter coefficient optimization method comprises the following steps:
1) Quantizing filter coefficients of infinite precision to a form of a power sum of two can convert the multiplication operation of the filter to addition and shift operations between the power sum of two coefficients, referred to as C2, which can result in more addition and shift operations due to the use of a two's complement to generate the power sum coefficients.
2) The distributed operation based on the lookup table converts the multiplication operation of the coefficients into the lookup table operation, and the operation of the lookup table occupies a larger resource space although the multiplication operation of the filter coefficients can be avoided, so that the working speed of the filter is reduced.
3) The parallel multiplication mode can enable the system to operate faster, but the number of bits of the multiplier is increased along with the increase of the order of the filter, so that larger resource occupation is caused, and the hardware scale is increased sharply.
4) When the coefficient matrix is changed, the coding mode may not be suitable for the changed matrix, so that a better simplifying effect cannot be realized.
Disclosure of Invention
The invention aims to: in order to solve the problems that the prior coding method is easy to occupy larger resources and the original coding mode is not applicable when the filter coefficient matrix is changed in the prior art, the invention provides a low-complexity digital filter coefficient self-adaptive combined coding method.
It is another object of the present invention to provide a low complexity digital filter coefficient adaptive combined coding system.
The technical scheme is as follows: a low complexity digital filter coefficient adaptive combined coding method, comprising the steps of:
providing filter coefficients, carrying out normalization quantization processing, recording the number of the filter coefficients as N, recording the number of quantized bit numbers as B, and carrying out CSD coding on the processed filter coefficients to obtain a coefficient matrix;
defining sub-matrix blocks for simplifying the coefficient matrix, wherein different sub-matrix blocks are represented by different characters;
setting a set of thresholds;
performing a reduced encoding step comprising: by comparing N, B with the threshold value, different sub-matrix blocks are selected in a self-adaptive manner, and characters corresponding to the sub-matrix blocks are used for replacing the parts where the sub-matrix blocks appear, so that the coefficient matrix is simplified.
Further, the sub-matrix block includes a row sub-matrix block, a column sub-matrix block, and a 2×3 sub-matrix block, and the adaptive selection method of the sub-matrix block includes:
(1) If N, B is not less than the threshold value, selecting different coding modes according to the occurrence times of the conversion submatrices of the 2X 3 submatrices and the 2X 3 submatrices in the coefficient matrix, and if the occurrence times are less than a preset value, simplifying the coefficient matrix by adopting the row submatrices and the column submatrices; if the times are more than or equal to a preset value, simplifying the coefficient matrix by using a 2 multiplied by 3 submatrix block, and further simplifying by using a row submatrix block;
(2) If N, B is less than the threshold, selecting a row sub-matrix block or a column sub-matrix block to simplify the coefficient matrix;
(3) If none and only one of N, B is less than the threshold, then the row sub-matrix block reduction coefficient matrix is selected and then the column sub-matrix block is selected for further reduction.
Further, in the step (2), a proportional coefficient a is set, a is larger than 1, and if N is larger than or equal to a.B, a column submatrix block is selected to simplify a coefficient matrix; if N < a.B, the row sub-matrix block is selected to simplify the coefficient matrix.
Further, in (1), if the number of times is less than a preset value, the coefficient matrix is simplified by using the row sub-matrix block first, and then further simplified by using the column sub-matrix block, or the coefficient matrix is simplified by using the column sub-matrix block first, and then further simplified by using the row sub-matrix block.
Further, the row sub-matrix block includes [ 10 1]]、[1 0 -1]、[1 0 0 -1]、[1 0 0 1]One or more of (a) and (b); the column submatrix block includes [ 11 ]] T 、[1 -1] T One or more of (a) and (b); the 2 x 3 sub-matrix block comprises
Figure SMS_1
Further, in (1), if the number of times is not less than a preset value, the following steps are executed:
(a) The coefficient matrix is simplified by using a 2 multiplied by 3 submatrix block;
(b) Again, the coefficient matrix is simplified by [ 10 1], [1 0-1 ];
(c) Scanning the coefficient matrix after the simplification in the step (b), respectively marking the numbers of [1 0-1 ] [ 10 0 1] as U1 and U2, and if only one of U1 and U2 is greater than a preset number threshold, further simplifying the coefficient matrix by using a corresponding row of submatrix blocks; if both U1 and U2 are larger than the preset number threshold, the coefficient matrix is further simplified by using the row sub-matrix blocks with more occurrence numbers.
Further, the method further comprises a dimension reduction process, wherein the dimension reduction process is located after the quantization step and before the CSD encoding, and the dimension reduction process comprises:
determining the parity of N, if N is even, taking the first N/2 rows to enter CSD coding; if N is odd, the first (N-1)/2 and the (N+1)/2 rows are taken to enter CSD coding.
Further, the method also comprises a dimension reduction process, wherein the dimension reduction process is positioned after CSD coding and before simplified coding, and comprises the following steps:
determining the parity of N, if N is even, taking the previous N/2 to go into a simplified coding step; if N is odd, the first (N-1)/2 and the (N+1)/2 are taken to proceed to the simplified encoding step.
Further, the filter is one of a low-pass filter, a high-pass filter, a band-pass filter and a band-stop filter.
A low-complexity digital filter coefficient self-adaptive combined coding system comprises a processor, a memory and a software program stored on the processor, wherein the processor can realize the low-complexity digital filter coefficient self-adaptive combined coding method when executing the software program.
Compared with the prior art, the low-complexity digital filter coefficient self-adaptive combined coding method and system provided by the invention have the following beneficial effects:
(1) The operation amount is low. Compared with the traditional filter, the multiplication operation of the filter coefficient is avoided; compared with the existing power of two and coefficient addition operation and the existing CSD coding method, the method can reduce the adder and shift operation in the system, reduce the operation complexity of the system and save the chip area and cost;
(2) The self-adaption is strong. The method is further deepened on the basis of the existing CSD coding mode, the most suitable combined coding mode can be selected in a self-adaptive mode according to a specific coefficient matrix, the method is suitable for filtering requirements under multiple scenes, the hardware cost of a system is reduced, and the operation efficiency of the system is improved;
(3) The accuracy is higher. The filter with the optimized coefficients by adopting the low-complexity digital filter coefficient self-adaptive combined coding method has the same filtering effect on noise signals as the original floating point filter, and the amplitude frequency and phase frequency characteristics of the filter are not changed;
(4) The portability is stronger. The digital filter designed by adopting the low-complexity digital filter coefficient self-adaptive combined coding method can be transplanted into another chip from the chip and is not influenced by the process environment and the like.
Drawings
FIG. 1 is a schematic flow chart of an implementation of a low-complexity digital filter coefficient adaptive combined coding method;
FIG. 2 is a system block diagram of a filter after optimizing coefficients using a combined encoding method according to an embodiment;
FIG. 3 is a graph comparing the number of adders required in the first FIR low-pass filter for different optimization methods; in the figure, (a) is the number of adders required for taking 10 by N, (b) is the number of adders required for taking 30 by N, (c) is the number of adders required for taking 50 by N, and (d) is the number of adders required for taking 80 by N;
FIG. 4 is a graph showing the number of adders required in the second FIR low-pass filter for different optimization methods; in the figure, (a) is the number of adders required for taking 11 by N, (b) is the number of adders required for taking 31 by N, (c) is the number of adders required for taking 51 by N, and (d) is the number of adders required for taking 81 by N;
FIG. 5 is a graph comparing the number of adders required in the FIR high-pass filter for different optimization methods; in the figure, (a) is the number of adders required for taking 11 by N, (b) is the number of adders required for taking 31 by N, (c) is the number of adders required for taking 51 by N, and (d) is the number of adders required for taking 81 by N;
FIG. 6 is a graph of the number of adders required in the first FIR band-pass filter for different optimization methods; in the figure, (a) is the number of adders required for taking 10 by N, (b) is the number of adders required for taking 30 by N, (c) is the number of adders required for taking 50 by N, and (d) is the number of adders required for taking 80 by N;
FIG. 7 is a graph of the number of adders required in the second FIR bandpass filter for different optimization methods; in the figure, (a) is the number of adders required for taking 11 by N, (b) is the number of adders required for taking 31 by N, (c) is the number of adders required for taking 51 by N, and (d) is the number of adders required for taking 81 by N;
FIG. 8 is a graph comparing the number of adders required in the FIR band reject filter for different optimization methods; in the figure, (a) is the number of adders required for taking 11 by N, (b) is the number of adders required for taking 31 by N, (c) is the number of adders required for taking 51 by N, and (d) is the number of adders required for taking 81 by N;
FIG. 9 is a graph showing the amplitude-frequency response of the filter after optimizing the coefficients using the combined code;
FIG. 10 is a graph showing the phase-frequency response of a filter after optimizing coefficients using a combined code;
FIG. 11 is a graph showing the filtering performance of the filter on noise signals after combining coding optimization coefficients;
fig. 12 shows the amplitude-frequency characteristics of the noise-containing signal after the combined coding and coefficient optimizing filter.
Description of the embodiments
The invention is further illustrated by the following description in conjunction with the accompanying drawings and specific embodiments.
Embodiment one:
a low complexity digital filter coefficient adaptive combined coding method, comprising the steps of:
and providing a filter coefficient, wherein the filter coefficient can be used for designing a filter meeting the requirements by a professional simulation tool according to parameters such as passband cut-off frequency, stopband minimum attenuation and the like. Normalized quantization processing is carried out on the filter coefficients, the number of the filter coefficients is recorded as N, the number of quantized bit numbers is recorded as B, CSD coding is carried out on the processed filter coefficients to obtain coefficient matrixes, and the coefficient matrixes are recorded as
Figure SMS_2
The number of rows of the coefficient matrix is N, and the number of columns is B. The method comprises the following steps:
to ensure system stability, the filter coefficients are normalized to obtain a vector
Figure SMS_3
Figure SMS_4
Wherein the method comprises the steps of
Figure SMS_5
Is a fixed-point 16bit filter coefficient vector,
Figure SMS_6
is operated by taking absolute value, max%
Figure SMS_7
) The maximum value operation is adopted, and the normalized coefficient vector is quantized and rounded according to the B bit to obtain the vector
Figure SMS_8
Figure SMS_9
Wherein B is the number of bits quantized, round
Figure SMS_10
) The method comprises the steps of rounding operation, and then carrying out CSD coding operation on the normalized and quantized vector:
Figure SMS_11
wherein csdigit is%
Figure SMS_12
) Representing CSD encoding operation, and further converting the tuple data obtained by CSD quantization encoding into matrix data:
Figure SMS_13
wherein, cell is [ ]
Figure SMS_14
) Representing tuple type data, char
Figure SMS_15
) Representing integer data, matrix #
Figure SMS_16
) The method is to solve the filter coefficient matrix operation, wherein rows and columns in the matrix are the number N of the filter coefficients and the quantization bit number B respectively.
Sub-matrix blocks for simplifying the coefficient matrix are defined, different sub-matrix blocks being represented by different characters. In the present embodiment, the sub-matrix blocks include a row sub-matrix block, a column sub-matrix block, and a 2×3 sub-matrix block, the row sub-matrix block including m2= [ 10 1]、m3= [1 0 -1]、m4= [1 0 0 -1]、m5= [1 0 0 1]The method comprises the steps of carrying out a first treatment on the surface of the The column submatrix block includes m6= [ 11 ]] T 、m7=[1 -1] T The method comprises the steps of carrying out a first treatment on the surface of the The 2×3 sub-matrix block includes m8=
Figure SMS_17
. The negative form of the above matrix may be preceded by a negative sign,
Figure SMS_18
T representing a transpose operation on the matrix.
Let m1= [ 1]]The row submatrix blocks m 2-m 5 may be obtained from the submatrix m1 by shifting and summing, i.e., m2=m1+2 - 2 m1、m3=m1-2 -2 m1、m4=m1-2 -3 m1、m5=m1+2 -3 m1, 2 therein -k m1 represents shifting the submatrix m1 by k units to the right, and because the shift operation in the system is simpler, the system space is not occupied and the hardware resources are not consumed, and therefore, the generated calculated amount is negligible.
The column sub-matrix blocks m6 and m7 can be obtained by delay-adding the sub-matrix m1, i.e. m6=m1+m1-1, m7=m1-m1-1, where m1-k represents the delay of the sub-matrix m1 by k units.
A 2×3 sub-matrix block may be written as m8=m1+2 -2 m1+2 -1 m1[-1]=m2+2 -1 m1[-1]And its negative form
Figure SMS_19
Also convertible into a shifted addition form of submatrix m 1-m8= - (m1+2) -2 m1+2 -1 m1[-1])=-(m2+2 -1 m1[-1]) The method comprises the steps of carrying out a first treatment on the surface of the Further in the symmetrical form of the submatrix m8>
Figure SMS_20
Can be represented by m1 as well, and the symmetrical form of the negative submatrix-m 8 +.>
Figure SMS_21
Only two gears need to be set in the system to enable the submatrix m8 to be mutually switched with the positive symmetric form m8 'and the negative symmetric form-m 8'.
All the above sub-matrix blocks m 2-m 8 are represented by the sub-matrix m1, which consumes one adder, and since there are various sub-matrix blocks in the filter coefficient matrix, if all possible sub-matrix blocks are represented by different elements, the consumption of hardware resources will be necessarily caused, so improvement is needed on this basis, so that it can make as much simplification as possible for the coefficient matrix by using as few hardware resources as possible. The above listed sub-matrix blocks are sub-matrix blocks with higher occurrence probability in the coefficient matrix, and in addition, the sub-matrix blocks for simplification can be deleted or added according to actual requirements.
In addition to defining the sub-matrix blocks for simplifying the coefficient matrix, a set of thresholds needs to be set, for example, the threshold value of the number of coefficients and the threshold value of the quantization bit number selected in this embodiment are respectively 10 and 12; by comparing N, B with the threshold value, different sub-matrix blocks are selected in a self-adaptive manner, characters corresponding to the sub-matrix blocks are used for searching and replacing the part where the sub-matrix blocks appear, so that coefficient matrixes are simplified, the least adder and shifter are ensured to be used in a system, and the self-adaptive combined coding (CO-CSD) is completed, thereby completing the design of the digital filter. The method can adaptively select the most suitable combined coding method according to different coefficient matrixes, and acquire the coefficient matrix which is simplified as much as possible with fewer resources and calculated amount.
Specifically, the adaptive selection method of the sub-matrix block includes:
(1) If N, B is not less than the corresponding threshold, according to the number of occurrences of m8 and m8 transform sub-matrix blocks in the coefficient matrix and the preset valueThe values are compared in size, different coding modes are selected, if the preset value is 5 in the embodiment, if the number of times is less than 5, a line sub-matrix block and a column sub-matrix block are adopted to simplify the coefficient matrix, the line sub-matrix block can be adopted to simplify the coefficient matrix to obtain a new coefficient matrix, the new coefficient matrix is called a ROW-CSD type representation method, the column sub-matrix block is used for further simplifying the new coefficient matrix, the new coefficient matrix is called a COLU-CSD type representation method, and finally the coefficient matrix after combined coding is obtained; or the coefficient matrix is simplified by a column sub-matrix block (COLU-CSD type representation) and then further simplified by a ROW sub-matrix block (ROW-CSD type representation). Preferably, the order of selection is determined according to the size of the ROWs and columns of the matrix, if N is greater than or equal to 3B, COLU-CSD should be performed first and then ROW-CSD should be performed, otherwise ROW-CSD should be performed first and then COLU-CSD should be performed, so that the calculated amount is as small as possible. If the number of times is more than or equal to 5, the coefficient matrix is simplified by using m8 and a transformant matrix thereof, which is called a 2X 3Coding-CSD type representation method, namely
Figure SMS_22
Figure SMS_23
, />
Figure SMS_24
, />
Figure SMS_25
Further simplified by ROW-CSD type representation;
(2) If N, B are both less than the corresponding threshold, then either the row or column sub-matrix blocks are selected to simplify the coefficient matrix.
To further achieve a greater degree of simplification, one can choose whether to simplify the rows or columns according to the gap of N, B, specifically: setting a proportionality coefficient a, a is more than 1, if N is more than or equal to a.B, selecting a column submatrix block to simplify a coefficient matrix, and obtaining the coefficient matrix as a COLU-CSD type representation method; if N < a.B, the ROW sub-matrix block is selected to simplify the coefficient matrix, which is called ROW-CSD type representation.
If a=2 is selected in the embodiment, when N is more than or equal to 2B, adopting COLU-CSD type expression method, selecting + -m 6 and + -m 7, and checkingThe found sub-matrix blocks are replaced in the corresponding positions respectively [ 11 ]] T
Figure SMS_27
[m6 0] T 、[-1 -1] T
Figure SMS_29
[-m6 0] T And [ 1-1] T
Figure SMS_30
[m7 0] T 、[-1 1] T
Figure SMS_28
[-m7 0] T To more intuitively view the coefficient matrix, abbreviated as [ 11 ]] T
Figure SMS_31
[6 0] T 、[-1 -1] T
Figure SMS_32
[-6 0] T And [ 1-1] T
Figure SMS_33
[7 0] T 、[-1 1] T
Figure SMS_26
[-7 0] T
When N is less than 2B, adopting ROW-CSD expression method to select + -m 2 and + -m 3, respectively making substitution [ 10 1] on corresponding position of searched submatrix block]
Figure SMS_36
[m2 0 0]、[-1 0 -1]
Figure SMS_38
[-m2 0 0],[1 0 -1]
Figure SMS_40
[m3 0 0]、[-1 0 1]
Figure SMS_35
[-m3 0 0]Can be abbreviated as [ [1 0 1]
Figure SMS_37
[2 0 0]、[-1 0 -1]
Figure SMS_39
[-2 0 0]And [1 0-1]
Figure SMS_41
[3 0 0]、[-1 0 1]
Figure SMS_34
[-3 0 0]。
(3) If one or only one of N, B is smaller than the threshold, the COLU-CSD and ROW-CSD are selected for common simplification, and the ROW sub-matrix block simplification coefficient matrix is selected sequentially first, and then the column sub-matrix block is selected for further simplification.
Embodiment two:
in order to further achieve the greatest simplification, in the second embodiment, based on the first embodiment, in the step (1), if the number of occurrences of m8 and m8 conversion sub-matrix blocks in the coefficient matrix is greater than or equal to a preset value, simplifying the coefficient matrix by using m8 and its conversion sub-matrix blocks, and further simplifying the coefficient matrix by using a ROW-CSD type representation method, the following steps are adopted in selecting a specific ROW sub-matrix block:
(a) The coefficient matrix is simplified by using a 2 multiplied by 3 submatrix block;
(b) Simplifying the coefficient matrix again by m2 and m 3;
(c) Scanning the coefficient matrix after the simplification in the step (b), searching the number of m4 and m5, respectively marking the number of m4 and m5 as U1 and U2, if only one of U1 and U2 is larger than a preset number threshold (3 is set in the embodiment), further simplifying the matrix by using the submatrix blocks with the number of occurrence larger than 3, for example, U1 is larger than 3, and replacing [1 0-1 ] as follows]
Figure SMS_42
[4 0 0 0]、[-1 0 0 1]
Figure SMS_43
[-4 0 0 0]The method comprises the steps of carrying out a first treatment on the surface of the U2 > 3, then the following substitutions are made [ 10 0 1]]
Figure SMS_44
[5 0 0 0]And [ -1, 0-1]
Figure SMS_45
[-5 0 0 0]The method comprises the steps of carrying out a first treatment on the surface of the If both U1 and U2 are larger than 3, the coefficient matrix is further simplified by using the row sub-matrix blocks with more occurrence numbers. If both U1 and U2 are not greater than 3, no further simplification of the process is necessary.
This embodiment further constrains its simplified process in one of the links relative to embodiment one, making the effect more advantageous than embodiment one.
Embodiment III:
the most widely used in engineering design is a first type of FIR linear phase filter, which can be used only as a design of low-pass and band-pass filters when the number of filter coefficients is even, and as a design of low-pass, high-pass, band-pass and band-stop filters when the number of filter coefficients is odd. In order to utilize the symmetry of the filter coefficients, the proposed method is limited to the design of the low-pass filter, namely, the design of the FIR low-pass filter only when the number of the filter coefficients is even is considered. The present embodiment is improved based on the first embodiment or the second embodiment by using the symmetry of the filter coefficients, so that the present embodiment is applicable to any type of filter, and has no requirement on the parity of the number of the filter coefficients, and the symmetry of the filter coefficients is fully utilized, so that the process of combining and encoding is further simplified, and the calculation amount is reduced, and the method flowchart is shown in fig. 1.
The dimension reduction process may be performed after the quantization step before CSD encoding or before CSD encoding and then reduced encoding. The dimension reduction processing is better before the CSD coding, which can reduce the computation amount of the CSD coding by half, and the dimension reduction processing includes:
determining the parity of N, 1) if N is even, taking the previous N/2 lines to enter CSD coding, and recording as
Figure SMS_46
The method comprises the steps of carrying out a first treatment on the surface of the 2) If N is odd, the front (N-1)/2 and (N+1)/2 rows are taken to enter CSD codes, respectively recorded as />
Figure SMS_47
And->
Figure SMS_48
The central line is taken out independently, wherein the central line of the filter coefficient has the least non-zero elements after normalization quantization, the effect of the combined coding method on the central line processing is not obvious, the processing on the rest of the matrix is consistent with 1), and the number of the accumulated adders required by combined coding is added with the number of the accumulated adders required by the central line. Symmetrical parts of the system can be realized only by using a system structure adder.
The embodiment can be still suitable for all types of filters based on the symmetric simplified coding, including low-pass, high-pass, band-stop and the like.
To illustrate the beneficial effects of the combined encoding method, the verification was performed by the following experiment.
1. Number of adders experiment:
the 13-order low-pass filter is subjected to 16bits normalized quantized CSD coding to obtain a CSD coding coefficient matrix shown in Table 1, and the filter coefficients are symmetrical due to the design of the linear FIR filter, so that only the first half of the filter coefficients are needed to be taken, and the other half of the filter can be realized only through shifting and a structural adder without an additional accumulation adder. In the embodiment, the thresholds of N, B are respectively 10 and 12, the threshold of T is 5, the threshold of U1 is 3, and as the filter satisfies N is more than or equal to 10, B is more than 12, T is more than or equal to 5, U1 is more than 3, the Coding mode of combining 2X 3Coding-CSD and ROW-CSD in the combined Coding mode is selected, 2X 3 type submatrix blocks in the coefficient matrix are searched and replaced
Figure SMS_51
Figure SMS_52
Figure SMS_55
Figure SMS_50
Obtaining a new coefficient matrix shown in Table 2, then searching the new coefficient matrix in Table 2 according to the ROW-CSD type, and using the submatrices m2[ 10 ] 1]
Figure SMS_54
[2 0 0]And m3[1 0-1]
Figure SMS_56
[3 0 0]And its negative form is replaced to obtain the coefficient matrix shown in table 3. For the coefficient matrix in Table 3, the number of sub-matrices m4 and m5 are scanned respectively, and the number of sub-matrix blocks obtained by scanning is
Figure SMS_58
A kind of electronic device with high-pressure air-conditioning system
Figure SMS_49
Satisfy U1>3 is [1 0-1 ]]
Figure SMS_53
[4 0 0 0]And [ -1 0 0 1]
Figure SMS_57
[-4 0 0 0]The search replacement is performed to obtain a matrix of filter coefficients after the combination coding shown in table 4. The black double-line boxes in table 1, table 2 and table 3 are the same parts as the selected submatrix blocks.
Further analysis shows that the power of two and coefficient coding method requires 51 accumulation adders, only 38 accumulation adders are needed by the CSD coding mode, and the combined coding optimization method of the embodiment requires 21 accumulation adders, the number of accumulation adders needed by the filtering system is reduced by 44.74% compared with the CSD coding method, and is reduced by 58.82% compared with the power of two and coefficient coding method.
Wherein the system block diagram of the filter is shown in FIG. 2, and the numbers in FIG. 2 represent power exponents of 2, such as m2=m1+2 (-2) m1, so that a 2 is labeled by the adder from m1 to m2, and m3=m1-2 (-2) m1, so that a 2 is labeled by the adder from m1 to m 3. It can be seen that 21 accumulation adders and 6 structure adders are used in the filtering system, wherein the number of the structure adders is fixed and one less than the filter coefficient, so that the accumulation adders in the system can be optimized only. Further the output of the filter can be expressed as:
Figure SMS_59
TABLE 1 CSD coding coefficient matrix
Figure SMS_60
Table 2 2 ×3Coding-CSD Coding
Figure SMS_61
TABLE 3 ROW-CSD coding
Figure SMS_62
Table 4 simplified coefficient matrix
Figure SMS_63
In order to verify the effectiveness of the combination coding in this embodiment, multiple sets of filters are designed under the low-pass, high-pass, band-pass and band-stop filters, and the number of accumulated adders required by the system when different optimization methods are used for each filter under different orders and different quantized bit numbers is analyzed.
(1) A low pass filter: normalized passband cut-off frequency and stopband cut-off frequency are wp=0.25, ws=0.35, respectively, wherein the filter coefficient takes an even number;
(2) A low pass filter: normalized passband cutoff frequency wp=0.15, stopband cutoff frequency ws=0.2, wherein the number of filter coefficients is an odd number;
(3) High pass filter: ws=0.55, wp=0.6, wherein the filter coefficients take an odd number;
(4) Band-pass filter: ws1=0.14, wp1=0.18, wp2=0.53, ws2=0.59, where the filter coefficients take an even number;
(5) Band-pass filter: ws1=0.45, wp1=0.5, wp2=0.72, ws2=0.75, wherein the number of filter coefficients is an odd number;
(6) Band reject filter: wp1=0.3, ws1=0.35, ws2=0.6, wp2=0.65, where the filter coefficients take an odd number.
The quantized bit numbers of the filters are respectively 11-24, the quantized coefficient matrixes are encoded by using different optimization methods, the number of accumulation adders required by each method is counted, and the counted results are respectively shown in fig. 3-8. Fig. 3 is a diagram showing the number of adders required for the first FIR low-pass filter according to the different optimization methods, and in fig. 3, (a) is a diagram showing the number of adders required for taking N to 10, (b) is a diagram showing the number of adders required for taking N to 30, (c) is a diagram showing the number of adders required for taking N to 50, and (d) is a diagram showing the number of adders required for taking N to 80. Fig. 4 is a diagram showing the number of adders required for the second FIR low-pass filter according to the different optimization methods, and in fig. 4, (a) is a diagram showing the number of adders required for taking N to 11, (b) is a diagram showing the number of adders required for taking N to 31, (c) is a diagram showing the number of adders required for taking N to 51, and (d) is a diagram showing the number of adders required for taking N to 81. Fig. 5 is a comparison diagram of the number of adders required in the FIR high-pass filter according to the different optimization methods, in fig. 5, (a) is a diagram of the number of adders required when N is taken to 11, (b) is a diagram of the number of adders required when N is taken to 31, (c) is a diagram of the number of adders required when N is taken to 51, and (d) is a diagram of the number of adders required when N is taken to 81. Fig. 6 is a diagram showing the number of adders required for the first FIR band-pass filter according to the different optimization methods, and in fig. 6, (a) is a diagram showing the number of adders required for taking N to 10, (b) is a diagram showing the number of adders required for taking N to 30, (c) is a diagram showing the number of adders required for taking N to 50, and (d) is a diagram showing the number of adders required for taking N to 80. Fig. 7 is a diagram showing the number of adders required for the second FIR band-pass filter according to the different optimization methods, in fig. 7, (a) is a diagram showing the number of adders required for taking N to 11, (b) is a diagram showing the number of adders required for taking N to 31, (c) is a diagram showing the number of adders required for taking N to 51, and (d) is a diagram showing the number of adders required for taking N to 81. Fig. 8 is a comparison diagram of the number of adders required in the FIR band-stop filter according to the different optimization methods, in fig. 8, (a) is a diagram of the number of adders required when N is taken to 11, (b) is a diagram of the number of adders required when N is taken to 31, (c) is a diagram of the number of adders required when N is taken to 51, and (d) is a diagram of the number of adders required when N is taken to 81.
As is clear from the analysis of the above results, the number of adders required for the two's complement method (C2) is the largest, and the number of adders to be added is the smallest in the CSD encoding method (CO-CSD) as compared with other methods, although the number of adders to be used can be reduced. And as the filter order and the quantization bit number are increased, the effect of the designed combined coding method is more obvious.
2. Frequency characteristic experiment:
in order to verify the filtering effect of the designed combined coding method on noise signals, a low-pass filter is designed, the passband cut-off frequency fp=0.75 MHz, the stopband cut-off frequency fs=1.5 MHz, the sampling frequency fs=4 MHz, and the stopband minimum attenuation as= -80dB. And determining the filter length as N=13 and 3dB cut-off frequency according to the design index, respectively using a kaiser window design method and an optimal design method, and finally selecting the optimal design method by comparison analysis. Comparing the designed floating-point coefficient filter with the designed combined coding coefficient filter, and respectively drawing amplitude-frequency characteristic and phase-frequency characteristic curves of the floating-point coefficient filter and the combined coding coefficient filter, as shown in fig. 9 and 10.
The combination coding uses 12bit quantization and 14bit quantization modes respectively, and as can be seen from fig. 9, the 12bit quantization coding generates larger stop band ripple, and the 14bit quantization coding almost coincides with the amplitude-frequency characteristic of the floating point coefficient filter, which indicates that the method can not generate spectrum distortion. Fig. 10 shows that at the same frequency value, the phase value of the 12bit quantized coded filter is greatly shifted compared with the floating-point filter coefficient, while the 14bit combined coded filter almost coincides with the floating-point filter phase, indicating that the method does not generate phase shift.
3. And (3) filtering effect experiment:
the method is characterized in that in order to verify the filtering effect of the designed combined coding optimization method on noise signals, sinusoidal signals of 0.5MHz, sinusoidal noise signals of 1.6MHz and sinusoidal noise signals of 1.8MHz are generated respectively, the sinusoidal signals and the noise signals are overlapped, and the filtering effect of the noise signals is observed through a floating point type coefficient filter and the designed combined coding optimization coefficient filter respectively. As shown in fig. 11, from top to bottom: the method has the advantages that the frequency is 0.5MHz of sine signal waveform, the waveform obtained by mutually superposing two noise signals, the waveform obtained by superposing the sine signals and the noise signals, the signal waveform amplitude graph obtained by filtering the noise signals through a floating point type coefficient filter (the noise signals can be completely filtered), and the signal amplitude graph obtained by combining the coding optimization coefficient filters can be completely filtered, so that the noise signals can be well filtered.
As shown in fig. 12, from top to bottom: the frequency response curve of the sine signal and the noise signal after superposition, the frequency response curve of the signal after filtering by the floating point type coefficient filter, and the frequency response curve of the signal after filtering by the combined coding optimization coefficient filter. Two noise signals at the frequency point can be clearly seen from the amplitude-frequency response curve after the sine signals and the noise signals are overlapped; from the frequency response curve of the signal filtered by the floating point coefficient filter, it can be seen that the noise signals at the frequency of 1.6MHz and the frequency of 1.8MHz are filtered; from the frequency response curve of the signal filtered by the combined code optimization coefficient filter, it can be seen that the noise signal at the corresponding frequency is completely filtered out.
Embodiment four:
a low-complexity digital filter coefficient self-adaptive combined coding system comprises a processor, a memory and a software program stored on the processor, wherein the processor can realize the low-complexity digital filter coefficient self-adaptive combined coding method when executing the software program.

Claims (8)

1. A low complexity digital filter coefficient adaptive combination coding method, comprising the steps of:
providing filter coefficients, carrying out normalization quantization processing, recording the number of the filter coefficients as N, recording the number of quantized bit numbers as B, and carrying out CSD coding on the processed filter coefficients to obtain a coefficient matrix;
defining a sub-matrix block for simplifying the coefficient matrix, wherein the sub-matrix block comprises a row sub-matrix block, a column sub-matrix block and a 2×3 sub-matrix block, and different sub-matrix blocks are represented by different characters;
setting a set of thresholds;
performing a reduced encoding step comprising: by comparing N, B with the threshold value, different sub-matrix blocks are selected in a self-adaptive mode, characters corresponding to the sub-matrix blocks are used for replacing the parts where the sub-matrix blocks appear, and coefficient matrixes are simplified;
the adaptive selection method of the sub-matrix block comprises the following steps:
(1) If N, B is not less than the threshold value, selecting different coding modes according to the occurrence times of the conversion submatrices of the 2X 3 submatrices and the 2X 3 submatrices in the coefficient matrix, and if the occurrence times are less than a preset value, simplifying the coefficient matrix by adopting the row submatrices and the column submatrices; if the times are more than or equal to a preset value, simplifying the coefficient matrix by using a 2 multiplied by 3 submatrix block, and further simplifying by using a row submatrix block;
(2) If N, B is smaller than the threshold, selecting a row sub-matrix block or a column sub-matrix block to simplify the coefficient matrix, setting a proportionality coefficient a, a & gt 1, and if N is larger than or equal to a.B, selecting a column sub-matrix block to simplify the coefficient matrix; if N is less than a.B, selecting a row sub-matrix block to simplify the coefficient matrix;
(3) If none and only one of N, B is less than the threshold, then the row sub-matrix block reduction coefficient matrix is selected and then the column sub-matrix block is selected for further reduction.
2. The adaptive combined coding method of low-complexity digital filter coefficients of claim 1, wherein in (1), if the number of times is less than a predetermined value, the coefficient matrix is simplified by a row sub-matrix block and then further simplified by a column sub-matrix block, or the coefficient matrix is simplified by a column sub-matrix block and then further simplified by a row sub-matrix block.
3. The method of claim 1, wherein the row sub-matrix block comprises [ 10 1]、[1 0 -1]、[1 0 0 -1]、[1 0 0 1]One or more of (a) and (b); the column submatrix block includes [ 11 ]] T 、[1 -1] T One or more of (a) and (b); the 2 x 3 sub-matrix block comprises
Figure QLYQS_1
4. The adaptive combined coding method of low-complexity digital filter coefficients according to claim 3, wherein (1) if the number of times is equal to or larger than a preset value, the following steps are performed:
(a) The coefficient matrix is simplified by using a 2 multiplied by 3 submatrix block;
(b) Again, the coefficient matrix is simplified by [ 10 1], [1 0-1 ];
(c) Scanning the coefficient matrix after the simplification in the step (b), respectively marking the numbers of [1 0-1 ] [ 10 0 1] as U1 and U2, and if only one of U1 and U2 is greater than a preset number threshold, further simplifying the coefficient matrix by using a corresponding row of submatrix blocks; if both U1 and U2 are larger than the preset number threshold, the coefficient matrix is further simplified by using the row sub-matrix blocks with more occurrence numbers.
5. The method of claim 1, further comprising a dimension reduction process, the dimension reduction process being located after the quantizing step and before the CSD encoding, the dimension reduction process comprising:
determining the parity of N, if N is even, taking the first N/2 rows to enter CSD coding; if N is odd, the first (N-1)/2 and the (N+1)/2 rows are taken to enter CSD coding.
6. The method of claim 1, further comprising a dimension reduction process, the dimension reduction process being located after CSD encoding and before reduced encoding, the dimension reduction process comprising:
determining the parity of N, if N is even, taking the previous N/2 to go into a simplified coding step; if N is odd, the first (N-1)/2 and the (N+1)/2 are taken to proceed to the simplified encoding step.
7. The method of claim 1, wherein the filter is one of a low pass, high pass, band pass, and band reject filter.
8. A low complexity digital filter coefficient adaptive combination coding system comprising a processor, a memory and a software program stored on the processor, the processor implementing the low complexity digital filter coefficient adaptive combination coding method of any one of claims 1-7 when executing the software program.
CN202310245827.8A 2023-03-15 2023-03-15 Low-complexity digital filter coefficient self-adaptive combined coding method and system Active CN115955217B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310245827.8A CN115955217B (en) 2023-03-15 2023-03-15 Low-complexity digital filter coefficient self-adaptive combined coding method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310245827.8A CN115955217B (en) 2023-03-15 2023-03-15 Low-complexity digital filter coefficient self-adaptive combined coding method and system

Publications (2)

Publication Number Publication Date
CN115955217A CN115955217A (en) 2023-04-11
CN115955217B true CN115955217B (en) 2023-05-16

Family

ID=85903397

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310245827.8A Active CN115955217B (en) 2023-03-15 2023-03-15 Low-complexity digital filter coefficient self-adaptive combined coding method and system

Country Status (1)

Country Link
CN (1) CN115955217B (en)

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009088340A1 (en) * 2008-01-08 2009-07-16 Telefonaktiebolaget Lm Ericsson (Publ) Adaptive filtering
KR102098202B1 (en) * 2014-05-15 2020-04-07 삼성전자주식회사 Encoding apparatus and encoding method thereof
EP3267646B1 (en) * 2016-07-06 2021-06-02 Nxp B.V. Iq mismatch correction module
CN108574849B (en) * 2017-11-21 2020-11-20 北京金山云网络技术有限公司 DCT inverse transformation method, inverse transformation device, electronic apparatus, and storage medium
TWI812658B (en) * 2017-12-19 2023-08-21 瑞典商都比國際公司 Methods, apparatus and systems for unified speech and audio decoding and encoding decorrelation filter improvements
CN109217879B (en) * 2018-08-06 2020-07-31 中国科学院计算技术研究所 Construction method and device of multi-rate low-density check code
CN108918929B (en) * 2018-09-11 2020-12-04 广东石油化工学院 Power signal self-adaptive filtering method in load decomposition
CN110113272B (en) * 2019-05-09 2021-08-03 广州海格通信集团股份有限公司 Method and device for suppressing strong narrowband interference, communication equipment and storage medium
CN110830005B (en) * 2019-11-13 2023-01-24 中国科学院微电子研究所 Method and system for implementing digital filter circuit
CN110957996B (en) * 2019-12-13 2023-08-01 哈尔滨工程大学 Multiplier-free FRM filter bank optimal design method based on ABC algorithm
CN110933445B (en) * 2019-12-16 2021-06-08 电子科技大学 DCT operation method based on coefficient matrix transformation and transformation device thereof
CN111367196B (en) * 2020-03-05 2023-08-18 上海机电工程研究所 W-band broadband variable fraction time delay method and system
CN111711431B (en) * 2020-04-07 2021-01-19 深圳市觅拓物联信息技术有限公司 Method for reducing non-zero bits in digital filter CSD coefficients

Also Published As

Publication number Publication date
CN115955217A (en) 2023-04-11

Similar Documents

Publication Publication Date Title
Mahesh et al. A new common subexpression elimination algorithm for realizing low-complexity higher order digital filters
KR100498457B1 (en) The improved method of compressing look up table for reducing memory and non-linear function generating apparatus having look up table compressed using the method and the non-linear function generating method
CN111711431B (en) Method for reducing non-zero bits in digital filter CSD coefficients
CN115955217B (en) Low-complexity digital filter coefficient self-adaptive combined coding method and system
CN110830005B (en) Method and system for implementing digital filter circuit
CN110957996B (en) Multiplier-free FRM filter bank optimal design method based on ABC algorithm
CN103955585B (en) FIR (finite impulse response) filter structure for low-power fault-tolerant circuit
CN108616265B (en) Circuit structure of RNS DWT filter bank based on five-modulus residue number basis
CN110086452B (en) Design method of low-complexity sparse FIR notch filter
CN113193854B (en) Multiplication-free filter design method based on high gain of filter coefficient
CN110677138A (en) FIR filter based on error-free probability calculation
US6151613A (en) Digital filter and method for a MASH delta-sigma modulator
CN115526131A (en) Method and device for approximately calculating Tanh function by multi-level coding
CN110737869B (en) DCT/IDCT multiplier circuit optimization method and application
US7054896B2 (en) Method for implementing a multiplier-less FIR filter
Mehendale et al. DA-based circuits for inner-product computation
KR101700537B1 (en) Binary data compression and decompression method
Williams et al. Design of 2D FIR and IIR digital filters with canonical signed digit coefficients using singular value decomposition and genetic algorithms
Misra et al. Quadrature mirror filter bank with canonical signed digit representation using linear optimization algorithm
Devarani et al. Design and implementation of truncated multipliers for precision improvement and its application to a filter structure
CN112564672A (en) Reconfigurable architecture of low-complexity FIR filter based on secret bit information embedding system
CN115940960B (en) Lossless compression method, system and medium for waveform data
CN116827308B (en) Resource optimization type FIR filter and implementation method thereof
Veeramani et al. Review on FIR filter based booth multiplier using ESSA and VL-CSKA
Maiti et al. Approximate comparator based on Code Conversion technique for Image Processing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant