Filter circuit
By designing a filter circuit including a continuity conversion module, a multiplier-accumulation module and an overflow protection module, the limitations of the existing low-pass filter in terms of signal-to-noise ratio and noise suppression are solved, and a more efficient filtering effect and reduction of noise are achieved. Cost design goals.
Patent Information
- Application Number
- CN202411414170.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2025-01-24
AI Technical Summary
Existing low-pass filters have limitations in improving signal-to-noise ratio and suppressing noise, especially when noise is concentrated in the low-frequency part, and the high requirements for ADC sampling speed are not conducive to low-cost designs.
Design a filter circuit that includes continuous conversion modules, multiplication modules, and overflowing protection modules. The circuit is processed by receiving the current sensor signal and processed by the number of self -phase relationships and the speed of change to achieve the product of the product of the signal.
The filter circuit reduces the cost design, and at the same time improves the filtering effect, which can more effectively suppress noise and improve the signal -to -noise ratio, especially when noise concentration is better.
Smart Images

Figure CN119363107A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of filters, and in particular to a filter circuit. Background Art
[0002] In an inductive absolute angle position encoder, the performance of the filter determines the upper limit of the signal-to-noise ratio of the sensor signal, and the performance of the filter is positively correlated with the physical resolution of the encoder. According to the nature of the filtering method, the filters in the angle position encoder can be divided into two categories: classical filters and adaptive filters. The classical filter sets constant filter parameters based on prior information such as the useful signal bandwidth and noise distribution, and is implemented through linear operations such as multiplication and addition. The adaptive filter dynamically updates the filter parameters based on optimal criteria such as the minimum mean square error (MSE) criterion, the least squares (LS) criterion, and the maximum signal-to-noise ratio criterion, and then completes the calculation of the output signal.
[0003] In the prior art, a commonly used classic filter is a low-pass filter, which is widely used in absolute angle position encoders. The typical design process requires setting a fixed cutoff frequency according to the maximum rotor speed. Its advantages are simple design, and the filter design based on the finite impulse response FIR and infinite impulse response IIR structure is very mature, which is conducive to rapid design.
[0004] However, low-pass filters have inherent defects. On the one hand, the improvement of the signal-to-noise ratio of low-pass filters is mainly related to the oversampling rate, which directly increases the requirements for ADC sampling speed, which is not conducive to low-cost design. In addition, low-pass filters cannot suppress noise within the passband, which limits the maximum physical resolution of the encoder. On the other hand, when the noise of the sensor signal is concentrated in the low-frequency part, the effect of the low-pass filter will be greatly reduced. Summary of the invention
[0005] The object of the present invention is to provide a filter circuit which can reduce the cost of design and improve the filtering effect.
[0006] In order to achieve the above object, the present invention provides a filter circuit, comprising:
[0007] A continuity conversion module, used for receiving a current position sensor signal, and if the current position sensor signal exceeds a set range, converting the current position sensor signal into a corresponding position sensor signal within the set range, and outputting the current position sensor signal;
[0008] a multiplier accumulation module, for receiving the current position sensor signal and the previous position sensor signal output by the continuity conversion module, and performing product calculations on the autocorrelation coefficients of the current position sensor signal and the current position sensor signal, the autocorrelation coefficients of the previous position sensor signal and the previous position sensor signal, the change speed of the previous position sensor signal and the autocorrelation coefficient of the change speed of the previous position sensor signal, and the change acceleration of the previous position sensor signal and the autocorrelation coefficient of the change acceleration of the previous position sensor signal, respectively, and then accumulating the product results to output the current position sensor signal;
[0009] The overflow protection module is used to perform overflow protection on the current position sensor signal output by the multiplier accumulation module. The current position sensor signal after overflow protection is fed back to the input end of the multiplier accumulation module and used as the previous position sensor signal in the calculation of the next position sensor signal.
[0010] Optionally, in the filtering circuit, the position sensor signal includes an angle signal and a position signal, and the angle signal and the position signal are respectively input into the continuity conversion module for processing.
[0011] Optionally, in the filtering circuit, the multiplier accumulation module includes a first group of multiplier accumulators, and the first group of multiplier accumulators includes a first multiplier accumulator, a first selector, a second selector, a third selector and a selection outputter;
[0012] An input terminal of the first selector is connected to an output of the continuity conversion module;
[0013] The four input terminals of the second selector respectively input the correlation coefficient between the current angle and the last output angle, the correlation coefficient between the current angular velocity and the last angular velocity, the correlation coefficient between the current angular acceleration and the last angular acceleration, and the autocorrelation coefficient of the current input angle;
[0014] One input terminal of the third selector inputs 0, one input terminal is connected to an input terminal of the selection output device, and the output terminal is connected to the input terminal of the first multiplier accumulator.
[0015] Optionally, in the filtering circuit, the multiplier accumulation module includes a second group of multiplier accumulators, the second group of multiplier accumulators includes a second multiplier accumulator, a fourth selector, a fifth selector, a sixth selector and a selection output, and the third group of multiplier accumulators includes a third multiplier accumulator, a seventh selector, an eighth selector, a ninth selector and a selection output;
[0016] The fourth input terminal is connected to the output of the continuity conversion module;
[0017] The four input terminals of the fifth selector respectively input the correlation coefficient between the current angle and the last output angle, the correlation coefficient between the current angular velocity and the last angular velocity, the correlation coefficient between the current angular acceleration and the last angular acceleration, and the autocorrelation coefficient of the current angular velocity;
[0018] One input terminal of the sixth selector inputs 0, one input terminal is connected to an input terminal of the selection output device, and the output terminal is connected to the input terminal of the second multiplier accumulator.
[0019] Optionally, in the filtering circuit, the multiplier accumulation module includes a third group of multiplier accumulators, and the third group of multiplier accumulators includes a third multiplier accumulator, a seventh selector, an eighth selector, a ninth selector and a selection outputter;
[0020] The three input terminals of the seventh selector are also connected to the fourth input terminal of the seventh selector and the output of the continuity conversion module respectively;
[0021] The four input terminals of the eighth selector respectively input the correlation coefficient between the current angle and the last output angle, the correlation coefficient between the current angular velocity and the last angular velocity, the correlation coefficient between the current angular acceleration and the last angular acceleration, and the autocorrelation coefficient of the current angular acceleration;
[0022] One input terminal of the ninth selector inputs 0, one input terminal is connected to an input terminal of the selection output device, and the output terminal is connected to the input terminal of the third multiplier accumulator; wherein the outputs of the first group of multiplier accumulators, the second group of multiplier accumulators and the third group of multiplier accumulators are respectively fed back to the three input terminals of the first selector, the three input terminals of the fourth selector and the three input terminals of the seventh selector.
[0023] Optionally, in the filtering circuit, the continuity conversion module includes: a continuity converter and a selection output device, the continuity converter is used to convert the current position sensor signal into a corresponding position sensor signal within a set range, and the selection output device is used to select and output the current position sensor signal or the previous position sensor signal as the current position sensor signal.
[0024] Optionally, in the filtering circuit, the selection output device includes: a selector and a register, one input end of the selector is connected to the output end of the continuity converter, the other input end is connected to an output end of the register, and the output end of the selector is connected to the input end of the register.
[0025] Optionally, in the filtering circuit, the register is a D flip-flop with a reset terminal.
[0026] Optionally, in the filtering circuit, the overflow protection module includes: an overflow protector and a selection output device, and the output end of the overflow protector is connected to the input end of the selection output device.
[0027] Optionally, the filtering circuit also includes a shift register, which is used to control the opening and closing of the first selector, the second selector, the third selector, the fourth selector, the fifth selector, the sixth selector, the seventh selector, the eighth selector or the ninth selector.
[0028] The filter circuit provided by the present invention includes: a continuity conversion module for converting the current position sensor signal into a position sensor signal corresponding to a set range; a multiplier accumulation module for receiving the current position sensor signal and the last position sensor signal output by the continuity conversion module, and performing product calculations on the autocorrelation coefficients of the current position sensor signal and the current position sensor signal, the autocorrelation coefficients of the last position sensor signal and the last position sensor signal, the change speed of the last position sensor signal and the autocorrelation coefficient of the change speed of the last position sensor signal, and the change acceleration of the last position sensor signal and the autocorrelation coefficient of the change acceleration of the last position sensor signal, respectively, and then accumulating the product results to output the current position sensor signal; an overflow protection module for performing overflow protection on the current position sensor signal output by the multiplier accumulation module, and the current position sensor signal after the overflow protection is fed back to the input end of the multiplier accumulation module, and is used as the last position sensor signal in the calculation of the next position sensor signal. The present invention reduces the cost design and improves the filtering effect at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 is a schematic diagram of a filter circuit according to an embodiment of the present invention;
[0030] Figure 2 is a schematic diagram of a continuous converter according to an embodiment of the present invention;
[0031] Figure 3 is a schematic diagram of an overflow protector according to an embodiment of the present invention;
[0032] In the figure: 111-first multiplier accumulator, 112-second multiplier accumulator, 113-third multiplier accumulator, 121-first selector, 122-second selector, 123-third selector, 124-fourth selector, 125-fifth selector, 126-sixth selector, 127-seventh selector, 128-eighth selector, 129-ninth selector, 210-continuity converter, 211-first adder, 212-first subtractor, 213-first comparator, 214-tenth selector, 220-selector output, 221-selector, 222-register, 300-overflow protector, 311-second adder, 312-second subtractor, 313-second comparator, 314-eleventh selector, 400-shift register. DETAILED DESCRIPTION
[0033] The specific implementation of the present invention will be described in more detail below in conjunction with the schematic diagram. The advantages and features of the present invention will become clearer based on the following description. It should be noted that the drawings are all in a very simplified form and are not in exact proportions, and are only used to facilitate and clearly assist in explaining the purpose of the embodiments of the present invention.
[0034] Hereinafter, the terms "first", "second", etc. are used to distinguish between similar elements and are not necessarily used to describe a particular order or chronological sequence. It is to be understood that these terms used in this manner are interchangeable where appropriate. Similarly, if the method described herein includes a series of steps, the order of these steps presented herein is not necessarily the only order in which these steps can be performed, and some of the steps described may be omitted and / or some other steps not described herein may be added to the method.
[0035] Furthermore, it should be understood that when a layer (or film), region, pattern or structure is referred to as being "on" a substrate, layer (or film), region and / or pattern, it can be directly on another layer or substrate, and / or there can be intervening layers. In addition, it should be understood that when a layer is referred to as being "under" another layer, it can be directly under another layer, and / or there can be one or more intervening layers. In addition, references to being "on" and "under" each layer can be made based on the accompanying drawings.
[0036] The present invention provides a filter circuit, comprising:
[0037] A continuity conversion module, used for receiving a current position sensor signal, and if the current position sensor signal exceeds a set range, converting the current position sensor signal into a corresponding position sensor signal within the set range, and outputting the current position sensor signal;
[0038] a multiplier accumulation module, for receiving the current position sensor signal and the previous position sensor signal output by the continuity conversion module, and performing product calculations on the autocorrelation coefficients of the current position sensor signal and the current position sensor signal, the autocorrelation coefficients of the previous position sensor signal and the previous position sensor signal, the change speed of the previous position sensor signal and the autocorrelation coefficient of the change speed of the previous position sensor signal, and the change acceleration of the previous position sensor signal and the autocorrelation coefficient of the change acceleration of the previous position sensor signal, respectively, and then accumulating the product results to output the current position sensor signal;
[0039] The overflow protection module is used to perform overflow protection on the current position sensor signal output by the multiplier accumulation module. The current position sensor signal after overflow protection is fed back to the input end of the multiplier accumulation module and used as the previous position sensor signal in the calculation of the next position sensor signal.
[0040] The position sensor signal of the embodiment of the present invention includes an angle signal and a position signal, and the angle signal and the position signal are respectively input into the continuity conversion module for processing.
[0041] Please refer to Figure 1The multiplier accumulation module of the present invention includes a first group of multiplier accumulators, and the first group of multiplier accumulators includes a first multiplier accumulator 111, a first selector 121, a second selector 122, a third selector 123 and a selection output 220; an input end of the first selector 121 is connected to the output of the continuity conversion module; the four input ends of the second selector 122 respectively input the correlation coefficient between the current angle and the last output angle, the correlation coefficient between the current angular velocity and the last angular velocity, the correlation coefficient between the current angular acceleration and the last angular acceleration, and the autocorrelation coefficient of the current input angle; the third selector 123 includes two input ends, one input end inputs 0, and the other input end is connected to an input end of the selection output 220, and the output end is connected to the input end of the first multiplier accumulator 111. The multiplier accumulation module also includes a second group of multiplier accumulators, which include a second multiplier accumulator 112, a fourth selector 124, a fifth selector 125, a sixth selector 126 and a selection output 220, and a third group of multiplier accumulators include a third multiplier accumulator 113, a seventh selector 127, an eighth selector 128, a ninth selector 129 and a selection output 220; the three input ends of the first selector 121 are respectively connected to the three input ends of the fourth selector 124 one by one, and the fourth input end is connected to the output of the continuity conversion module; the four input ends of the fifth selector 125 respectively input the correlation coefficient between the current angle and the last output angle, the correlation coefficient between the current angular velocity and the last angular velocity, the correlation coefficient between the current angular acceleration and the last angular acceleration, and the autocorrelation coefficient of the current angular velocity; the sixth selector 126 includes two input ends, one input end inputs 0, the other input end is connected to an input end of the selection output 220, and the output end is connected to the input end of the second multiplier accumulator 112. The multiplier accumulation module also includes a third group of multiplier accumulators, which include a third multiplier accumulator 113, a seventh selector 127, an eighth selector 128, a ninth selector 129 and a selection output 220; the three input ends of the fourth selector 124 are also connected one by one with the three input ends of the seventh selector 127, and the three input ends of the seventh selector 127 are also connected to the fourth input end of the seventh selector 127 and the output of the continuity conversion module; the four input ends of the eighth selector 128 respectively input the correlation coefficient between the current angle and the last output angle, the correlation coefficient between the current angular velocity and the last angular velocity, the correlation coefficient between the current angular acceleration and the last angular acceleration, and the autocorrelation coefficient of the current angular acceleration; the ninth selector 129 includes two input ends, one input end inputs 0, one input end is connected to an input end of the selection output 220, and the output end is connected to the input end of the third multiplier accumulator 113. The outputs of the first multiplier accumulator 111 , the second multiplier accumulator 112 and the third multiplier accumulator 113 are fed back to three input terminals of the first selector 121 , three input terminals of the fourth selector 124 and three input terminals of the seventh selector 127 , respectively.
[0042] In the embodiment of the present invention, the continuity conversion module includes: a continuity converter 210 and a selection output 220. The continuity converter 210 is used to convert the current position sensor signal into a corresponding position sensor signal within a set range. The selection output 220 is used to select and output the current position sensor signal or the last position sensor signal as the current position sensor signal. If the position sensor signal is an angle signal, please refer to the specific structure of the continuity converter 210. Figure 2 , including a first adder 211, a first subtractor 212, a first comparator 213 and a tenth selector 214. If the current angle and the previous angle are not formed continuously from small to large, for example, the previous angle is 359° and the current angle is 1°, the current angle is converted to 361° through the continuity converter 210.
[0043] In the embodiment of the present invention, the selection output device 220 includes: a selector 221 and a register 222, one input end of the selector 221 is connected to the output end of the continuity converter 210, the other input end is connected to an output end of the register 222, and the output end of the selector 221 is connected to the input end of the register 222. All registers 222 use D flip-flops with reset ends, and the reset values are respectively set to the full-scale mean of 180 degrees, 0 degrees per second, and 0 degrees per second squared.
[0044] In the embodiment of the present invention, the overflow protection module includes: an overflow protector 310 and a selection output 220, and the output end of the overflow protector 310 is connected to the input end of the selection output 220. The specific structure of the overflow protector is as follows: Figure 3 , including a second adder 311, a second subtractor 312, a second comparator 313 and an eleventh selector 314.
[0045] Preferably, the filter circuit also includes a shift register 400, which is used to control the opening and closing of the first selector 121, the second selector 122, the third selector 123, the fourth selector 124, the fifth selector 125, the sixth selector 126, the seventh selector 127, the eighth selector 128 or the ninth selector 129. The filter circuit of the present invention is a second-order steady-state Kalman filter circuit. In order to balance the data throughput and area overhead, the second-order steady-state Kalman filter circuit uses a multiplier accumulator (MAC), a continuity conversion module circuit and an overflow protection circuit as the core data path; the synchronous pulse shift register is used as the control path, which greatly simplifies the handshake protocol of the front and back stages, so as to be suitable for working scenarios with high real-time performance. It is worth noting that, for example, to reduce the dynamic power consumption of the data path register (D flip-flop), each level of the flip-flop is only flipped when the synchronous pulse arrives, which reduces the working flip rate, thereby improving energy efficiency.
[0046] In summary, the filtering circuit provided in the embodiment of the present invention includes: a continuity conversion module, which is used to convert the current position sensor signal into a position sensor signal corresponding to the set range; a multiplier accumulation module, which is used to receive the current position sensor signal and the last position sensor signal output by the continuity conversion module, and the autocorrelation coefficient of the current position sensor signal and the current position sensor signal, the autocorrelation coefficient of the last position sensor signal and the last position sensor signal, the change speed of the last position sensor signal and the autocorrelation coefficient of the change speed of the last position sensor signal, and the change acceleration of the last position sensor signal and the autocorrelation coefficient of the change acceleration of the last position sensor signal, respectively, and then the product results are accumulated to output the current position sensor signal; an overflow protection module, which is used to perform overflow protection on the current position sensor signal output by the multiplier accumulation module, and the current position sensor signal after the overflow protection is fed back to the input end of the multiplier accumulation module, and is used as the last position sensor signal in the calculation of the next position sensor signal. The present invention reduces the cost design and improves the filtering effect.
[0047] The above is only a preferred embodiment of the present invention and does not limit the present invention in any way. Any technician in the relevant technical field, without departing from the scope of the technical solution of the present invention, makes any form of equivalent replacement or modification to the technical solution and technical content disclosed in the present invention, which does not depart from the content of the technical solution of the present invention and still falls within the protection scope of the present invention.
Claims
1. A filter circuit, characterized in that: include: A continuity conversion module, used for receiving a current position sensor signal, and if the current position sensor signal exceeds a set range, converting the current position sensor signal into a corresponding position sensor signal within the set range, and outputting the current position sensor signal; a multiplier accumulation module, for receiving the current position sensor signal and the previous position sensor signal output by the continuity conversion module, and performing product calculations on the autocorrelation coefficients of the current position sensor signal and the current position sensor signal, the autocorrelation coefficients of the previous position sensor signal and the previous position sensor signal, the change speed of the previous position sensor signal and the autocorrelation coefficient of the change speed of the previous position sensor signal, and the change acceleration of the previous position sensor signal and the autocorrelation coefficient of the change acceleration of the previous position sensor signal, respectively, and then accumulating the product results to output the current position sensor signal; The overflow protection module is used to perform overflow protection on the current position sensor signal output by the multiplier accumulation module. The current position sensor signal after overflow protection is fed back to the input end of the multiplier accumulation module and used as the previous position sensor signal in the calculation of the next position sensor signal.
2. The filter circuit according to claim 1, characterized in that: The position sensor signal includes an angle signal and a position signal, and the angle signal and the position signal are respectively input into the continuity conversion module for processing.
3. The filter circuit according to claim 2, characterized in that: The multiplier accumulation module includes a first group of multiplier accumulators, wherein the first group of multiplier accumulators includes a first multiplier accumulator, a first selector, a second selector, a third selector and a selection output; An input terminal of the first selector is connected to the output of the continuity conversion module; The four input terminals of the second selector respectively input the correlation coefficient between the current angle and the last output angle, the correlation coefficient between the current angular velocity and the last angular velocity, the correlation coefficient between the current angular acceleration and the last angular acceleration, and the autocorrelation coefficient of the current input angle; One input terminal of the third selector inputs 0, one input terminal is connected to an input terminal of the selection outputter, and the output terminal is connected to the input terminal of the first multiplier accumulator.
4. The filter circuit according to claim 3, characterized in that: The multiplier accumulation module includes a second group of multiplier accumulators, the second group of multiplier accumulators includes a second multiplier accumulator, a fourth selector, a fifth selector, a sixth selector and a selection output, and the third group of multiplier accumulators includes a third multiplier accumulator, a seventh selector, an eighth selector, a ninth selector and a selection output; The three input terminals of the first selector are connected one by one to the three input terminals of the fourth selector respectively, and the fourth input terminal is connected to the output of the continuity conversion module; The four input terminals of the fifth selector respectively input the correlation coefficient between the current angle and the last output angle, the correlation coefficient between the current angular velocity and the last angular velocity, the correlation coefficient between the current angular acceleration and the last angular acceleration, and the autocorrelation coefficient of the current angular velocity; One input terminal of the sixth selector inputs 0, one input terminal is connected to an input terminal of the selection output device, and the output terminal is connected to the input terminal of the second multiplier accumulator.
5. The filter circuit according to claim 4, characterized in that: The multiplier accumulation module includes a third group of multiplier accumulators, and the third group of multiplier accumulators includes a third multiplier accumulator, a seventh selector, an eighth selector, a ninth selector and a selection output; The three input terminals of the seventh selector are also connected to the fourth input terminal of the seventh selector and the output of the continuity conversion module respectively; The four input terminals of the eighth selector respectively input the correlation coefficient between the current angle and the last output angle, the correlation coefficient between the current angular velocity and the last angular velocity, the correlation coefficient between the current angular acceleration and the last angular acceleration, and the autocorrelation coefficient of the current angular acceleration; One input terminal of the ninth selector inputs 0, one input terminal is connected to an input terminal of the selection output device, and the output terminal is connected to the input terminal of the third multiplier accumulator; wherein the outputs of the first group of multiplier accumulators, the second group of multiplier accumulators and the third group of multiplier accumulators are respectively fed back to the three input terminals of the first selector, the three input terminals of the fourth selector and the three input terminals of the seventh selector.
6. The filter circuit according to claim 1, characterized in that: The continuity conversion module includes: a continuity converter and a selection output device, wherein the continuity converter is used to convert the current position sensor signal into a corresponding position sensor signal within a set range, and the selection output device is used to select and output the current position sensor signal or the previous position sensor signal as the current position sensor signal.
7. The filter circuit according to claim 6, characterized in that: The selection output device comprises: a selector and a register, wherein one input end of the selector is connected to the output end of the continuity converter, the other input end is connected to an output end of the register, and the output end of the selector is connected to the input end of the register.
8. The filter circuit according to claim 7, characterized in that: The register is a D flip-flop with a reset terminal.
9. The filter circuit according to claim 7, characterized in that: The overflow protection module comprises: an overflow protector and a selection output device, and the output end of the overflow protector is connected to the input end of the selection output device.
10. The filter circuit according to claim 4, characterized in that: A shift register is also included, and the shift register is used to control the opening and closing of the first selector, the second selector, the third selector, the fourth selector, the fifth selector, the sixth selector, the seventh selector, the eighth selector or the ninth selector.
