A digital low-pass filter with adjustable cut-off frequency and adjustable gain

Through a digital low-pass filter with variable cutoff frequency and adjustable gain, the Kalman filter and gain of the digital low-pass filter are automatically adjusted by using the Kalman filter and gain adjustment module, which solves the problem of large out-of-band noise interference at a fixed cutoff frequency, and achieves better filtering effect and resource utilization.

CN115412058BActive Publication Date: 2025-07-25FUZHOU UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211072243.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-02
Publication Date
2025-07-25
Estimated Expiration
2042-09-02

AI Technical Summary

Technical Problem

Existing digital low-pass filters are filtered at a fixed cutoff frequency, which cannot adapt to signals of different sampling frequency, resulting in large interference to the signal and poor versatility.

Method used

The digital low-pass filter with variable cutoff frequency adjustable gain is automatically adjusted through the Kalman filter, sampling frequency calculation module, cutoff frequency calculation module, variable coefficient low-pass filter and gain adjustment module to reduce the interference of out-of-band signals to the bandpass signal.

Benefits of technology

It realizes automatic adjustment of the cutoff frequency of the digital low-pass filter according to different frequency signals, effectively reducing the interference of out-of-band signals to the bandpass signal, improving the filtering effect, and reducing resource and time waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115412058B_ABST
    Figure CN115412058B_ABST
Patent Text Reader

Abstract

The present invention relates to a digital low-pass filter with adjustable variable cut-off frequency and adjustable gain, comprising: a Kalman filter for obtaining a predicted value at the current moment according to the sampling signal at the previous moment and comprehensively obtaining an optimal signal estimation value with the observed value at the current moment; a sampling frequency calculation module for calculating the sampling frequency of the output signal of the Kalman filter through the interval time between sampling signals; a cut-off frequency calculation module for calculating the corresponding cut-off frequency according to the sampling frequency to obtain a variable cut-off frequency; a low-pass filter with variable coefficients and an enable terminal, which is composed of a transversal FIR filter, for calculating the coefficients of the FIR filter according to the cut-off frequency and controlling whether to adjust the coefficients of the low-pass filter according to the enable terminal signal; and a gain adjustment module for adjusting the gain of the signal filtered by the low-pass filter with variable coefficients and outputting the signal. This digital low-pass filter is beneficial to reducing the interference of out-of-band signals on the band-pass signal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of digital communication, and particularly relates to a digital low-pass filter with variable cut-off frequency and adjustable gain. Background Art

[0002] The received signal of the receiver is sampled by an ADC and then the out-of-band noise is filtered by a low-pass filter. At present, the digital low-pass filter filters with a fixed cut-off frequency and directly sends the filtered signal to the next stage. This method is not suitable for filtering signals with different sampling frequencies, has poor versatility, and the out-of-band noise interferes greatly with the signal. In actual applications, different cut-off frequencies are used to filter signals with different sampling frequencies, and it is desired to effectively suppress the interference of out-of-band noise. Therefore, the above filter with a fixed cut-off frequency has great limitations in actual applications. Summary of the Invention

[0003] The purpose of the present invention is to provide a digital low-pass filter with variable cut-off frequency and adjustable gain, which is beneficial to reducing the interference of out-of-band signals on the band-pass signal.

[0004] To achieve the above purpose, the technical solution adopted by the present invention is: a digital low-pass filter with variable cut-off frequency and adjustable gain, including:

[0005] A Kalman filter, which is used to obtain the predicted value of the current signal according to the sampling signal of the previous moment and synthesize an optimal signal estimation value with the observed value of the current signal; it is equivalent to filtering the sampling signal to reduce the interference of noise on the sampling signal;

[0006] A sampling frequency calculation module, which is used to calculate the sampling frequency of the output signal of the Kalman filter through the interval time between sampling signals;

[0007] A cut-off frequency calculation module, which is used to calculate the corresponding cut-off frequency according to the sampling frequency to obtain a variable cut-off frequency;

[0008] A low-pass filter with variable coefficients and an enable terminal, which is composed of a transversal FIR filter, and is used to calculate the coefficient value of the FIR filter according to the cut-off frequency output by the cut-off frequency calculation module, and control whether to adjust the low-pass filter coefficient according to the enable terminal signal; when the enable terminal signal is 0, the coefficient is not adjusted, and the original coefficient is used to filter the sampling signal; when the enable terminal signal is 1, the coefficient is adjusted according to the cut-off frequency and filtering is performed; and

[0009] The gain adjustment module is used to adjust the gain of the signal filtered by the low-pass filter with variable coefficients and output the signal; when the amplitude of the out-of-bandpass signal is less than the amplitude of the bandpass signal minus 6 dB, there is no need to adjust the gain of the signal; when the amplitude of the out-of-bandpass signal is greater than the amplitude of the bandpass signal minus 6 dB, increase the gain of the bandpass signal and decrease the gain of the out-of-band signal to suppress the interference of the out-of-bandpass signal.

[0010] Further, the low-pass filter with variable coefficients changes the cut-off frequency of the digital low-pass filter by changing the digital filter coefficients, and whether to update the cut-off frequency by changing the coefficients is controlled by the enable terminal;

[0011] The FIR filter is composed of a multiplier, an accumulator and a delay unit. The value of the tap coefficient of the FIR filter depends on the cut-off frequency. The tap coefficient is calculated according to the cut-off frequency output by the cut-off frequency calculation module, and the adjustment of the coefficients of the low-pass filter with variable coefficients is controlled according to the enable terminal signal, and finally the input signal is filtered; for the digital low-pass filter with a cut-off frequency of ω c The ideal frequency response function is:

[0012]

[0013] Then its impulse response is:

[0014]

[0015] The discrete signal h(m) is obtained by sampling the impulse response h(t) at the set sampling frequency, and the rectangular window signal is selected to window the discrete signal h(m) to obtain the finite-length impulse response h(n), that is, the tap coefficient; if the enable signal is 0, the sampled signal is multiplied by the original finite-length impulse response h(n - 1); if the enable signal is 1, the finite-length impulse response h(n) is multiplied by the sampled signal, and the output signal is:

[0016]

[0017] Further, a Kalman filter is used to filter the sampled signal before the low-pass filter with variable coefficients to reduce the interference of noise on the sampled signal;

[0018] The Kalman filter obtains the predicted value of the current signal according to the sampled signal of the previous moment, and synthesizes it with the observed value of the current signal to obtain an optimal signal estimation value; the prediction formula is:

[0019]

[0020] In the formula, F is the state transition matrix, B is the control matrix, U t-1is the control variable at time t-1, is the predicted value at the current time t inferred from the previous state value;

[0021] The formula for the observed value is:

[0022] Z t = Hx t + v

[0023] where H is the observation matrix, v is the observation noise, and Z t is the observed value at time t;

[0024] The formula for the best signal estimate is:

[0025]

[0026] where is the best signal estimate value at time t; K t is the Kalman coefficient at time t, and its calculation formula is:

[0027]

[0028] where is the predicted state covariance at time t, and R is the covariance of the observed quantity.

[0029] Further, a gain adjustment module is used after the low-pass filter of the variable coefficient to adjust the gain of the filtered signal to enhance the suppression effect on out-of-band signals;

[0030] The gain adjustment module mainly consists of three modules: spectrum analysis, amplitude analysis, and gain module; the spectrum analysis converts the time-domain signal after low-pass filtering into a frequency-domain signal through Fourier transform; the amplitude analysis obtains the magnitude of the amplitude of the frequency signal according to the amplitude-frequency diagram after spectrum analysis, and judges whether the amplitude of the out-of-band signal is less than the amplitude of the in-band signal -6dB. If the amplitude of the out-of-band signal is less than the amplitude of the in-band signal -6dB, the output is 0, otherwise the output is 1; the gain module controls the amplitude gain of the out-of-band signal according to the judgment result obtained by the amplitude analysis to achieve the suppression effect on the out-of-band frequency signal; when the result of the amplitude analysis is 0, there is no need to adjust the gain of the signal; when the result of the amplitude analysis is 1, the frequency signal less than the cut-off frequency is multiplied by a gain coefficient greater than 1: The frequency signal greater than the cut-off frequency is multiplied by a gain coefficient less than 1 / 2:

[0031] Further, the cut-off frequency calculation module obtains different cut-off frequencies according to different signals using different sampling frequencies, so that the digital low-pass filter has a variable cut-off frequency;

[0032] A continuous signal is sampled by a pulse signal with a sampling frequency to obtain a discrete signal, and the sampling frequency f is calculated according to the reciprocal of the time interval between discrete signals. s According to the Nyquist theorem, the sampling frequency needs to be greater than or equal to twice the highest frequency of the signal. The cut-off frequency calculation module takes 1 / 2 of the sampling frequency as the cut-off frequency, that is, the cut-off frequency is: f = 1 / 2f. s .

[0033] Furthermore, the enable terminal of the variable coefficient low-pass filter is used to control whether the coefficient of the variable coefficient low-pass filter needs to be adjusted according to the cut-off frequency.

[0034] The enable terminal includes two registers and a comparator. The first register is used to store the current cut-off frequency output by the cut-off frequency calculation module, and the second register is used to store the cut-off frequency at the previous moment. The comparator is used to compare the magnitudes of the cut-off frequency values in the two registers. If the two cut-off frequencies are the same, the output is 0. If the two cut-off frequencies are different, the output is 1. When the variable coefficient low-pass filter receives a signal of 0 from the enable terminal, the coefficient is not adjusted and the original coefficient is used for filtering. If the variable coefficient low-pass filter receives a signal of 1 from the enable terminal, the coefficient is adjusted according to the cut-off frequency output by the cut-off frequency calculation module and filtering is performed.

[0035] Compared with the prior art, the present invention has the following beneficial effects:

[0036] (1) The present invention can obtain the cut-off frequency of the digital low-pass filter by using different sampling frequencies for different frequency signals, and accurately update the cut-off frequency of the digital low-pass filter by automatically adjusting the coefficient of the digital low-pass filter, so as to better achieve the filtering effect.

[0037] (2) The gain attenuation of out-of-band signals, especially the frequency signals between the cut-off frequency and the stopband, is slow, which is likely to have a greater impact on the band-pass signal. The method of the present invention can effectively reduce the interference of out-of-band signals on the band-pass signal, providing an automatic and effective method for the digital low-pass filter to filter out-of-band noise.

[0038] (3) The present invention adds an enable terminal to the variable coefficient digital low-pass filter, and controls the transformation of the low-pass filter coefficient through the enable terminal. When the cut-off frequency remains unchanged, the coefficient of the variable coefficient low-pass filter does not change, and the original coefficient is used, which can reduce the waste of resources and time caused by repeated calculation of the same coefficient. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 is a schematic structural diagram of the digital low-pass filter according to an embodiment of the present invention;

[0040] Figure 2It is a schematic structural diagram of the gain adjustment module in the embodiment of the present invention. Detailed implementation manners

[0041] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0042] It should be noted that the following detailed description is exemplary and is intended to provide further description of the present application. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present application belongs.

[0043] It should be noted that the terms used herein are only for describing specific implementation manners and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0044] This embodiment provides a digital low-pass filter circuit with adjustable variable cut-off frequency and gain. According to different sampling frequencies of the sampling signal, it can automatically and accurately adjust the cut-off frequency of the low-pass filter; it can control the transformation of the low-pass filter coefficient through the enable terminal, effectively improving the speed of the low-pass filter; since the gain attenuation of out-of-band signals, especially the frequency signals between the cut-off frequency and the stop band, is slow, which causes great interference to the band-pass signal, the present invention can effectively reduce the interference of out-of-band signals on the band-pass signal. As Figure 1 shown, the digital low-pass filter circuit includes a Kalman filter, a sampling frequency calculation module, a cut-off frequency calculation module, a low-pass filter with variable coefficients having an enable terminal, and a gain adjustment module.

[0045] The Kalman filter is used to obtain the predicted value of the current moment signal based on the sampling signal of the previous moment, and comprehensively obtain an optimal signal estimation value with the observed value of the current moment signal; it is equivalent to filtering the sampling signal to reduce the interference of noise on the sampling signal.

[0046] The sampling frequency calculation module is used to calculate the sampling frequency of the output signal of the Kalman filter through the interval time between sampling signals.

[0047] The cut-off frequency calculation module is used to calculate the corresponding cut-off frequency according to the sampling frequency to obtain a variable cut-off frequency.

[0048] The variable coefficient low-pass filter with an enable terminal is composed of a transversal FIR filter, which is used to calculate the coefficient values of the FIR filter according to the cut-off frequency output by the cut-off frequency calculation module, and control whether to adjust the low-pass filter coefficient according to the enable terminal signal. When the enable terminal signal is 0, the coefficient is not adjusted, and the original coefficient is used to filter the sampled signal. When the enable terminal signal is 1, the coefficient is adjusted according to the cut-off frequency calculation and filtering is performed.

[0049] The gain adjustment module is used to adjust the gain of the signal filtered by the variable coefficient low-pass filter and output the signal. When the amplitude of the out-of-band signal is less than the amplitude of the band-pass signal - 6dB, there is no need to adjust the gain of the signal. When the amplitude of the out-of-band signal is greater than the amplitude of the band-pass signal - 6dB, the gain of the band-pass signal is increased and the gain of the out-of-band signal is decreased to suppress the interference of the out-of-band signal.

[0050] 1. Variable coefficient low-pass filter with an enable terminal

[0051] The variable coefficient low-pass filter changes the cut-off frequency of the digital low-pass filter by changing the digital filter coefficient, and the enable terminal controls whether to update the cut-off frequency by changing the coefficient.

[0052] The FIR filter is composed of a multiplier, an accumulator and a delay unit. The value of the tap coefficient of the FIR filter depends on the cut-off frequency. The tap coefficient is calculated according to the cut-off frequency output by the cut-off frequency calculation module, and the adjustment of the variable coefficient low-pass filter coefficient is controlled according to the enable terminal signal. Finally, the input signal is filtered. For a digital low-pass filter with a cut-off frequency of ω c its ideal frequency response function is:

[0053]

[0054] Then its impulse response is:

[0055]

[0056] The impulse response h(t) is sampled at a set sampling frequency to obtain a discrete signal h(m), and a rectangular window signal is selected to window the discrete signal h(m) to obtain a finite-length impulse response h(n), that is, the tap coefficient. If the enable signal is 0, the sampled signal is multiplied by the original finite-length impulse response h(n - 1). If the enable signal is 1, the finite-length impulse response h(n) is multiplied by the sampled signal, and the output signal is:

[0057]

[0058] The enable terminal of the variable coefficient low-pass filter is used to control whether the coefficients of the variable coefficient low-pass filter need to be adjusted according to the cut-off frequency. When the cut-off frequency remains unchanged, the coefficients of the variable coefficient low-pass filter do not change, and the original coefficients are used, which can reduce the waste of resources and time caused by repeatedly calculating the same coefficients.

[0059] As Figure 2 shown, the enable terminal includes register 1, register 2, and a comparator. Register 1 is used to store the current cut-off frequency output by the cut-off frequency calculation module, register 2 is used to store the cut-off frequency at the previous moment, and the comparator is used to compare the magnitudes of the cut-off frequency values in the two registers. If the two cut-off frequencies are the same, the output is 0; if the two cut-off frequencies are different, the output is 1. When the variable coefficient low-pass filter receives a signal of 0 from the enable terminal, the coefficients are not adjusted, and the original coefficients are used for filtering. If the variable coefficient low-pass filter receives a signal of 1 from the enable terminal, the coefficients are adjusted according to the cut-off frequency output by the cut-off frequency calculation module and filtering is performed. The working process of the enable terminal includes the following steps:

[0060] 1) Each register can only store one value. The Figure 1 obtained cut-off frequency value is stored in the first-in first-out stack register 1. The register can only store the current cut-off frequency value. When a new cut-off frequency value comes in, the first-in first-out stack register 1 outputs the previous moment value to the first-in first-out stack register 2. The first-in first-out stack register 2 receives the cut-off frequency value from the first-in first-out stack register 1 and discards the output of the previous moment value.

[0061] 2) Obtain the two cut-off frequency values of the first-in first-out stack register 1 and the first-in first-out stack register 2 as the two inputs of the comparator for comparison. If the two cut-off frequencies are the same, the output is 0; if the two cut-off frequencies are different, the output is 1. When the variable coefficient low-pass filter receives an enable terminal of 0, the coefficients are not adjusted, and the original coefficients are used for filtering. If the variable coefficient low-pass filter receives an enable terminal of 1, the coefficients of the variable coefficient low-pass filter are calculated according to the cut-off frequency output by the cut-off frequency calculation module and adjusted to filter out out-of-band noise.

[0062] 2. Kalman filter (KF)

[0063] Before the variable coefficient low-pass filter, a Kalman filter is used to filter the sampled signal first to reduce the interference of noise on the sampled signal.

[0064] The Kalman filter obtains the predicted value of the signal at the current moment based on the sampled signal at the previous moment, and combines it with the observed value of the signal at the current moment to obtain an optimal signal estimation value.

[0065] Among them, the signal prediction formula is:

[0066]

[0067] In the formula, F is the state transition matrix, B is the control matrix, U t-1 is the control variable at time t-1, is the predicted value at the current time t inferred from the previous state value.

[0068] The signal observation value calculation formula is:

[0069] Z t = Hx t + v

[0070] In the formula, H is the observation matrix, v is the observation noise, and Z t is the observation value at time t.

[0071] The optimal signal estimation formula is:

[0072]

[0073] In the formula, is the optimal signal estimation value at time t; K t is the Kalman coefficient at time t, and its calculation formula is:

[0074]

[0075] In the formula, is the predicted state covariance at time t, and R is the covariance of the observed quantity.

[0076] 3. Gain adjustment module

[0077] After the variable coefficient low-pass filter, a gain adjustment module is used to adjust the gain of the filtered signal to strengthen the suppression of out-of-band signals.

[0078] The gain adjustment module mainly consists of three modules: spectrum analysis, amplitude analysis, and gain module; the spectrum analysis converts the time-domain signal after low-pass filtering into a frequency-domain signal through Fourier transform; the amplitude analysis obtains the magnitude of the amplitude of the frequency signal according to the amplitude-frequency diagram after spectrum analysis, and judges whether the amplitude of the out-of-band signal is less than the amplitude of the in-band signal - 6dB. If the amplitude of the out-of-band signal is less than the amplitude of the in-band signal - 6dB, the output is 0, otherwise the output is 1; the gain module controls the amplitude gain of the out-of-band signal according to the judgment result obtained by the amplitude analysis to achieve the suppression of the out-of-band frequency signal; when the result of the amplitude analysis is 0, there is no need to adjust the gain of the signal; when the result of the amplitude analysis is 1, the frequency signal less than the cut-off frequency is multiplied by a gain coefficient greater than 1: The frequency signal greater than the cut-off frequency is multiplied by a gain coefficient less than 1 / 2:

[0079] The working process of the gain adjustment module includes the following steps:

[0080] 1) The filtered signal is used as the input for spectrum analysis, and the Fourier transform is used to convert the time-domain signal to the frequency-domain signal.

[0081] 2) The obtained frequency-domain signal is subjected to amplitude analysis to determine whether the amplitude of the out-of-band signal is less than the amplitude of the band-pass signal - 6 dB. If the amplitude of the out-of-band signal is less than the amplitude of the band-pass signal - 6 dB, the output is 0. If the amplitude of the out-of-band signal is greater than the amplitude of the band-pass signal - 6 dB, the output is 1.

[0082] 3) According to the output signal as the control signal of the gain module, if the control signal is 0, the signal is directly output without gain adjustment. If the control signal is 1, the frequency signal takes the cut-off frequency as the dividing line. The frequency signal less than the cut-off frequency is multiplied by a gain coefficient greater than 1. The frequency signal greater than the cut-off frequency is multiplied by a gain coefficient less than 1 / 2.

[0083] 4. Cut-off frequency calculation module

[0084] The cut-off frequency calculation module obtains different cut-off frequencies according to different signals using different sampling frequencies, so that the digital low-pass filter has a variable cut-off frequency.

[0085] The continuous signal is sampled by the pulse signal with the sampling frequency to obtain a discrete signal. The sampling frequency f is calculated according to the reciprocal of the interval time between discrete signals. s ; According to the Nyquist theorem, the sampling frequency needs to be greater than or equal to twice the highest frequency of the signal. The cut-off frequency calculation module takes 1 / 2 of the sampling frequency as the cut-off frequency, that is, the cut-off frequency is: f = 1 / 2f s .

[0086] In summary, the overall working process of the digital low-pass filter circuit with variable cut-off frequency and adjustable gain is as follows:

[0087] Step 1: When performing signal filtering, the signal sampled by the ADC first passes through the Kalman filter to filter out noise. The Kalman filter estimates the predicted value of the signal at the current moment according to the optimal estimated value of the signal at the previous moment, and combines it with the observed value of the signal at the current moment to obtain an optimal estimated signal.

[0088] Step 2: Use the signal after Kalman filtering as the input of the sampling frequency calculation module. Since a continuous signal is sampled by a pulsed signal with a sampling frequency to obtain a discrete signal, the sampling frequency is the reciprocal of the time T between two sampling points of the discrete signal, that is, the sampling frequency is f s = 1 / T.

[0089] Step 3: Use the sampling frequency in Step 2 as the input of the cut-off frequency calculation module, and take 1 / 2 of the sampling frequency as the cut-off frequency, that is, the cut-off frequency is f = 1 / 2f s Convert it to the angular frequency ω c = πf s .

[0090] Step 4: Use the cut-off frequency obtained in Step 3 and the signal after Kalman filtering obtained in Step 1 as the input of a low-pass filter with variable coefficients. The coefficients of the low-pass filter with variable coefficients change according to the cut-off frequency under the control of an enable signal. If the enable signal received by the low-pass filter with variable coefficients is 0, the low-pass filter coefficients are not adjusted and the original coefficients are used for filtering. If the enable signal received by the low-pass filter with variable coefficients is 1, the low-pass filter coefficients are calculated based on the cut-off frequency output by the cut-off frequency calculation module and adjusted to filter out signals greater than the cut-off frequency, reducing the interference of high-frequency signals on the band-pass signal. Digital filters are divided into FIR and IIR filters. The output of the FIR filter is only related to the input, and the output of the IIR filter is related not only to the input but also to the output at the previous moment. Compared with the IIR filter, the FIR filter has the advantage of linear phase. In the present invention, the low-pass filter with variable coefficients is constituted by a transversal FIR filter. The FIR filter consists of a multiplier, an accumulator, and a delay unit. Adjust the values of the FIR filter tap coefficients according to different cut-off frequencies. When a digital low-pass filter with a cut-off frequency of ω c its ideal frequency response function is:

[0091]

[0092] Then its impulse response is:

[0093]

[0094] Sample the impulse response h(t) through a certain sampling frequency to obtain a discrete signal h(m), and select a rectangular window signal to window the discrete signal h(m) to obtain a finite-length impulse response h(n), which is the tap coefficient. If the enable signal is 0, the sampled signal is multiplied with the original finite-length impulse response h(n - 1); if the enable signal is 1, the sampled signal is multiplied with the finite-length impulse response h(n), and the output signal is:

[0095]

[0096] Step Five: Use the signal filtered in Step Four as the input of the gain adjustment module. Since the variable coefficient low-pass filter cannot completely and ideally filter out all signals outside the cut-off frequency, especially the gain of the frequency signals between the cut-off frequency and the stopband decays slowly, which is likely to cause significant interference to the band-pass signal. Through the gain adjustment module, increase the gain of the frequency signals less than the cut-off frequency and decrease the gain of the frequency signals greater than the cut-off frequency to achieve a better out-of-band noise suppression effect. Multiply the frequency signals less than the cut-off frequency by a gain coefficient greater than 1: Multiply the frequency signals greater than the cut-off frequency by a gain coefficient less than 1 / 2:

[0097] The above are only the preferred embodiments of the present invention, and are not intended to limit the present invention in other forms. Any person skilled in the art may use the technical content disclosed above to make changes or modifications into equivalent embodiments with equivalent changes. However, any simple modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention without departing from the technical solution content of the present invention still fall within the protection scope of the technical solution of the present invention.

Claims

1. A digital low-pass filter with adjustable cut-off frequency and adjustable gain, characterized in that, Including: A Kalman filter, which is used to obtain a predicted value of the signal at the current moment based on the sampled signal at the previous moment, and synthesize it with the observed value of the signal at the current moment to obtain an optimal signal estimation value; it is equivalent to filtering the sampled signal to reduce the interference of noise on the sampled signal; A sampling frequency calculation module, which is used to calculate the sampling frequency of the output signal of the Kalman filter through the interval time between sampled signals; A cut-off frequency calculation module, which is used to calculate the corresponding cut-off frequency according to the sampling frequency to obtain a variable cut-off frequency; A variable coefficient low-pass filter with an enable terminal, which is composed of a transversal FIR filter, and is used to calculate the coefficient value of the FIR filter according to the cut-off frequency output by the cut-off frequency calculation module, and control whether to adjust the low-pass filter coefficient according to the enable terminal signal; when the enable terminal signal is 0, the coefficient is not adjusted, and the original coefficient is used to filter the sampled signal; when the enable terminal signal is 1, the coefficient is adjusted according to the cut-off frequency and filtering is performed; And A gain adjustment module, which is used to adjust the gain of the signal filtered by the variable coefficient low-pass filter and output the signal; when the amplitude of the out-of-band signal is less than the amplitude of the band-pass signal - 6dB, there is no need to adjust the gain of the signal; when the amplitude of the out-of-band signal is greater than the amplitude of the band-pass signal - 6dB, increase the gain of the band-pass signal and reduce the gain of the out-of-band signal to suppress the interference of the out-of-band signal; The variable coefficient low-pass filter changes the cut-off frequency of the digital low-pass filter by changing the digital filter coefficient, and is controlled by the enable terminal whether to update the cut-off frequency by changing the coefficient; The FIR filter consists of a multiplier, an accumulator, and a delay unit. The value of the tap coefficient of the FIR filter depends on the cut-off frequency. The tap coefficient is calculated based on the cut-off frequency output by the cut-off frequency calculation module, and the adjustment of the low-pass filter coefficient with variable coefficients is controlled according to the enable signal. Finally, the input signal is filtered; for a digital low-pass filter with a cut-off frequency of ω c , its ideal frequency response function is: Then its impulse response is: Sampling the impulse response h(t) at a set sampling frequency to obtain a discrete signal h(m), and selecting a rectangular window signal to window the discrete signal h(m) to obtain a finite-length impulse response h(n), that is, the tap coefficient; if the enable signal is 0, the sampled signal is multiplied by the original finite-length impulse response h(n - 1); if the enable signal is 1, the finite-length impulse response h(n) is multiplied by the sampled signal, and the output signal is:

2. A variable cut-off frequency and adjustable gain digital low-pass filter according to claim 1, characterized in that, Using a Kalman filter to filter the sampled signal first before the variable coefficient low-pass filter to reduce the interference of noise on the sampled signal; The Kalman filter obtains a predicted value of the signal at the current moment based on the sampled signal at the previous moment, and synthesizes it with the observed value of the signal at the current moment to obtain an optimal signal estimation value; among them, the prediction formula is: where F is the state transition matrix, B is the control matrix, U t-1 is the control variable at time t - 1, is the predicted value at the current time t inferred from the previous state value; The observed value calculation formula is: Z t = H x t + v where H is the observation matrix, v is the observation noise, and Z t is the observation value at time t; The optimal signal estimation formula is: In the formula, is the optimal signal estimation value at time t; K t is the Kalman coefficient at time t, and its calculation formula is: where, is the predicted state covariance at time t, and R is the measurement covariance.

3. A variable cut-off frequency and adjustable gain digital low-pass filter according to claim 1, characterized in that, Using a gain adjustment module to adjust the gain of the filtered signal after the variable coefficient low-pass filter to enhance the suppression effect on the out-of-band signal; The gain adjustment module mainly consists of three modules: spectrum analysis, amplitude analysis, and gain module; the spectrum analysis converts the time-domain signal after low-pass filtering into a frequency-domain signal through Fourier transform; the amplitude analysis obtains the magnitude of the amplitude of the frequency signal according to the amplitude-frequency diagram after spectrum analysis, and judges whether the amplitude of the out-of-bandpass signal is less than the amplitude of the bandpass signal -6dB. If the amplitude of the out-of-bandpass signal is less than the amplitude of the bandpass signal -6dB, the output is 0, otherwise the output is 1; the gain module controls the amplitude gain of the out-of-bandpass signal according to the judgment result obtained by the amplitude analysis to achieve the suppression effect on the out-of-bandpass frequency signal; when the result of the amplitude analysis is 0, there is no need to adjust the gain of the signal; when the result of the amplitude analysis is 1, the frequency signal less than the cut-off frequency is multiplied by a gain coefficient greater than 1: The frequency signal greater than the cut-off frequency is multiplied by a gain coefficient less than 1 / 2:

4. A variable cut-off frequency and adjustable gain digital low-pass filter according to claim 1, characterized in that, The cut-off frequency calculation module obtains different cut-off frequencies according to different signals using different sampling frequencies, so that the digital low-pass filter has a variable cut-off frequency; A continuous signal is sampled by a pulse signal with a sampling frequency to obtain a discrete signal, and the sampling frequency f is calculated according to the reciprocal of the time interval between discrete signals. s ; According to the Nyquist theorem, the sampling frequency needs to be greater than or equal to twice the highest frequency of the signal. The cut-off frequency calculation module takes 1 / 2 of the sampling frequency as the cut-off frequency, that is, the cut-off frequency is: f = 1 / 2f. s .

5. A variable cut-off frequency and adjustable gain digital low-pass filter according to claim 1, characterized in that, The enable terminal of the variable coefficient low-pass filter is used to control whether the coefficient of the variable coefficient low-pass filter needs to be adjusted according to the cut-off frequency; The enable terminal includes two registers and a comparator. The first register is used to store the current cut-off frequency output by the cut-off frequency calculation module, and the second register is used to store the cut-off frequency of the previous moment. The comparator is used to compare the magnitudes of the cut-off frequency values in the two registers. If the two cut-off frequencies are the same, the output is 0; if the two cut-off frequencies are different, the output is 1. When the variable coefficient low-pass filter receives an enable terminal signal of 0, the coefficient is not adjusted and the original coefficient is used for filtering. If the variable coefficient low-pass filter receives an enable terminal signal of 1, the coefficient is adjusted according to the cut-off frequency output by the cut-off frequency calculation module and filtering is performed.

Citation Information

Patent Citations

  • Digital filtering method based on HMM / KF (Hidden Markova Model / Kalman Filter) steady-state feedback

    CN103401533A

  • Frequency modulation method

    DE4321000A1