CN111277242A - FPGA digital filter and implementation method thereof - Google Patents
FPGA digital filter and implementation method thereof Download PDFInfo
- Publication number
- CN111277242A CN111277242A CN202010221510.7A CN202010221510A CN111277242A CN 111277242 A CN111277242 A CN 111277242A CN 202010221510 A CN202010221510 A CN 202010221510A CN 111277242 A CN111277242 A CN 111277242A
- Authority
- CN
- China
- Prior art keywords
- output
- input
- register group
- registers
- digital 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 14
- 238000010586 diagram Methods 0.000 description 3
- 238000013500 data storage Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 238000005070 sampling Methods 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 230000004069 differentiation Effects 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 230000002349 favourable effect Effects 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03H—IMPEDANCE NETWORKS, e.g. RESONANT CIRCUITS; RESONATORS
- H03H17/00—Networks using digital techniques
- H03H17/02—Frequency selective networks
- H03H17/0294—Variable filters; Programmable filters
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03H—IMPEDANCE NETWORKS, e.g. RESONANT CIRCUITS; RESONATORS
- H03H17/00—Networks using digital techniques
- H03H17/02—Frequency selective networks
- H03H17/0223—Computation saving measures; Accelerating measures
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Mathematical Physics (AREA)
- Computing Systems (AREA)
- Theoretical Computer Science (AREA)
- Complex Calculations (AREA)
Abstract
The invention discloses an FPGA digital filter and an implementation method thereof, wherein the FPGA digital filter comprises a triple integrator, a register group, an addition and subtraction combinational logic circuit, a timer and a data output circuit; the input end of the triple integrator is connected with an input signal, the output end of the triple integrator is connected with the input end of the register group, the output end of the register group is connected with the input end of the addition and subtraction combinational logic circuit, and the output end of the addition and subtraction combinational logic circuit is connected with the data output circuit; the register group comprises four registers connected in series, high-frequency clock signals are respectively connected with a timer, a data output circuit, the register group and a triple integrator, output signals of the timer are respectively connected with enabling ends of the four registers, and data are stored in the register group at the same time interval. The filter of the invention occupies less resources and the output does not have larger delay.
Description
Technical Field
The invention relates to the field of digital filters, in particular to an FPGA digital filter and an implementation method thereof.
Background
Sinc3 digital filters are widely used in servo control systems. Bandwidth is an important measure of servo system response speed and process capability. To improve the bandwidth, each delay element of the servo control period is reduced. The sinc3 digital filter, which is often used by servo, is also one of the sources of sample delay. There are two types of digital filters commonly used today.
The first is an IP core of FPGA provided by ADI company, which adopts a method of integration first and differentiation later.
The transfer function g (z) is decomposed as follows:
as can be seen, the digital filter can be divided into 1 pure proportion segment and 3 discrete accumulators 1/(1-z)-1) And a differentiator (1-z) with 3 intervals DR equal to 32 sampling periods-DR) Are connected in series to obtain.
The MCLKIN is adopted as an input clock of the FPGA circuit, and the input clock is generally 20 MHZ. WORD _ CLK is a decimated clock divided by MCLKIN software with a period of 32 times DR of MCLKIN. Assuming MCLKIN has a frequency of 20MHz and a period of 50ns, WORD _ CLK has a period of 1600ns, i.e., 1.6 us. Since registers are often used as sequential elements in FPGAs. There is a one beat lag (i.e., a one clock cycle delay in the transfer) in the inter-register transfer.
Implementation of such a digital filter would result in an additional increase of the pure delay time by a factor of 3 MCLKIN DR. If the ideal delay caused by the transfer function is added:
Then at a decimation rate of DR-32, its total propagation delay (ideal transfer function propagation delay + designed digital controller delay) is 7.15 us. From the multiple relation, when DR is 64, the delay is 14us or more. This delay has a significant impact on the performance of the servo real-time control system (typically with a control frequency of 10 k).
As shown in fig. 4, the second method is a conventional FIFO (first in first out) transfer function implementation method (abbreviated as FIFO filter), which also has a significant disadvantage that the number of registers used is too large, when DR is 32, 3 DR is 96 register groups are needed, each register group in the IP core is generally composed of 37 registers, so that 96, 37, 3552 registers are used. When the DR extraction rate is high, the FPGA resource is greatly occupied.
In summary, the first Sinc3 filter of the original ADI company has a simple structure, but causes an excessive pure delay, and in the servo system, the pure delay in the loop has a great influence on the servo bandwidth. Second, the FIFO sinc3 filter does not cause extra pure delay, but causes large resource occupation, which is not favorable for reducing production cost.
Disclosure of Invention
In order to overcome the defects and shortcomings of the prior art, the invention provides the FPGA digital filter and the implementation method thereof, and the FPGA digital filter has the advantages of low sampling delay and low resource occupancy rate.
The invention adopts the following technical scheme:
an FPGA digital filter comprises a triple integrator, a register group, an add-subtract combinational logic circuit, a timer and a data output circuit;
the concrete connection is as follows:
the input end of the triple integrator is connected with an input signal, the output end of the triple integrator is connected with the input end of the register group, the output end of the register group is connected with the input end of the addition and subtraction combinational logic circuit, and the output end of the addition and subtraction combinational logic circuit is connected with the data output circuit;
the register group comprises four registers connected in series;
the high-frequency clock signal is respectively connected with a timer, a data output circuit, a register group and a triple integrator, the output signal of the timer is respectively connected with the enabling ends of the four registers, and data are stored in the register group at the same time interval.
The triple integrator is formed by three accumulators connected in series.
The addition and subtraction combinational logic circuit comprises two adders with three inputs and a four-input addition and subtraction device.
The output ends of the two registers are connected with two three-input adders, and are amplified by three times and input into a four-input adder-subtractor together with output signals of the other two registers to obtain an output result.
The counter controls the time interval of data storage to be DR x T, and T is the period of the high-frequency clock signal.
A method for realizing FPGA digital filter includes using high frequency clock as driving clock by triple integrator to output accumulated signal value, connecting back-stage output of triple integrator to input end of series register set, using high frequency clock as driving clock by series register set, storing data in four registers of series register set in sequence by queue mode under control of enabling signal with equal time interval sent out by counter, inputting output signal of four registers of register set to addition-subtraction logic circuit and finally obtaining final filtered signal from addition-subtraction logic circuit.
The invention has the beneficial effects that:
the filter of the invention occupies less resources, and uses the high-frequency clock signal MCLKIN for output, rather than the clock after frequency division, and the output does not have larger delay.
Drawings
FIG. 1 is a block diagram of the present invention;
FIG. 2 is a structural connection diagram of an embodiment of the present invention;
FIG. 3 is a graph comparing the performance of the present invention with that of the prior art;
fig. 4 is a schematic diagram of a FIFO filter structure in the prior art.
Detailed Description
The present invention will be described in further detail with reference to examples and drawings, but the present invention is not limited to these examples.
Examples
As shown in fig. 1 and fig. 2, an FPGA digital filter includes a triple integrator, a register set, an add-subtract combinational logic circuit, a timer, and a data output circuit;
the concrete connection is as follows:
the input end of the triple integrator is connected with an input signal, the output end of the triple integrator is connected with the input end of the register group, the output end of the register group is connected with the input end of the addition and subtraction combinational logic circuit, and the output end of the addition and subtraction combinational logic circuit is connected with the data output circuit;
the register group comprises four registers connected in series;
the high-frequency clock signal is respectively connected with a timer, a data output circuit, a register group and a triple integrator, the output signal of the timer is respectively connected with the enabling ends of the four registers, and data are stored in the register group at the same time interval.
The triple integrator is formed by three accumulators connected in series.
The addition and subtraction combinational logic circuit comprises two adders with three inputs and a four-input addition and subtraction device.
The four registers are X0, X1, X2 and X3, wherein the outputs of the four registers are used as the inputs of the add-subtract logic circuit, wherein the outputs of X1 and X2 need to be increased by 3 times, so that the X1 and X2 signals are input to two 3-input adders respectively, and the obtained results are X1+ X1+ X1 ═ 3 × X1, and X2+ X2+ X2 ═ 3 × X2 respectively. And inputting the two results, X0 and X3 into a four-input adder-subtractor to obtain the final result, namely OUTPUT (OUTPUT), X0-3X 1+ 3X 2-X3.
The counter controls the time interval for data storage to be DR T, and the DR is generally 32.
The working process of the invention is as follows:
the triple integrator takes a high-frequency clock as a driving clock and outputs an accumulated signal value, the rear-stage output of the triple integrator is connected to the input end of a series register group, the series register group takes the high-frequency clock as the driving clock, data are successively stored in four registers of the series register group in a queue mode under the control of enabling signals with equal time intervals sent by a counter, output signals of the four registers of the register group are all input to an add-subtract logic circuit, and finally, a signal after final filtering is obtained through the output of the add-subtract logic circuit.
The filter of the invention occupies little resource, and the high-frequency clock signal MCLKIN is adopted for output, rather than the clock after frequency division, so that the output cannot be delayed greatly.
As shown in fig. 3, the filter of the present invention compares the performance of the two filters commonly used in the prior art, the hysteresis of the ADI IP core is most obvious, the output of the FIFO filter is closest to the ideal transfer function, and the filter herein is equivalent to the FIFO filter maintained at interval DR × T of zero order.
The output clock of the output register DATA of the method is driven by a high-frequency signal MCLKIN (instead of using the divided WORD _ CLK), which is equivalent to that the DATA is output in the next MCLKIN period every time the value in the X0-3 register group changes. The delay of 3 x T cycles relative to the original ADI company is greatly improved. The registers used are only 4 groups instead of 3 × DR groups, which occupies less resources compared with the conventional FIFO method.
The above embodiments are preferred embodiments of the present invention, but the present invention is not limited to the above embodiments, and any other changes, modifications, substitutions, combinations, and simplifications which do not depart from the spirit and principle of the present invention should be construed as equivalents thereof, and all such changes, modifications, substitutions, combinations, and simplifications are intended to be included in the scope of the present invention.
Claims (6)
1. An FPGA digital filter is characterized by comprising a triple integrator, a register group, an addition and subtraction combinational logic circuit, a timer and a data output circuit;
the concrete connection is as follows:
the input end of the triple integrator is connected with an input signal, the output end of the triple integrator is connected with the input end of the register group, the output end of the register group is connected with the input end of the addition and subtraction combinational logic circuit, and the output end of the addition and subtraction combinational logic circuit is connected with the data output circuit;
the register group comprises four registers connected in series;
the high-frequency clock signal is respectively connected with a timer, a data output circuit, a register group and a triple integrator, the output signal of the timer is respectively connected with the enabling ends of the four registers, and data are stored in the register group at the same time interval.
2. The FPGA digital filter of claim 1 wherein said triple integrator is comprised of three series accumulators.
3. The FPGA digital filter of claim 1 wherein said add-subtract combinational logic circuit comprises two three-input adders and a four-input add-subtract.
4. The FPGA digital filter of claim 3, wherein the output terminals of two registers are connected to two three-input adders, and the three-input adders are amplified by three times and input the amplified signals and output signals of the other two registers to a four-input adder-subtractor to obtain an output result.
5. The FPGA digital filter of claim 1 wherein the counter controls the storage of data for a time interval DR x T, T being the period of the high frequency clock signal.
6. An implementation method of the FPGA digital filter according to any one of claims 1 to 5, wherein a triple integrator uses a high-frequency clock as a driving clock and outputs an accumulated signal value, a post-stage output of the triple integrator is connected to an input end of a serial register set, the serial register set uses the high-frequency clock as the driving clock, data is sequentially stored in four registers of the serial register set in a queue manner under control of enable signals with equal time intervals sent by a counter, output signals of the four registers of the register set are all input to the add-subtract logic circuit, and finally, a final filtered signal is obtained from output of the add-subtract logic circuit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010221510.7A CN111277242A (en) | 2020-03-26 | 2020-03-26 | FPGA digital filter and implementation method thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010221510.7A CN111277242A (en) | 2020-03-26 | 2020-03-26 | FPGA digital filter and implementation method thereof |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111277242A true CN111277242A (en) | 2020-06-12 |
Family
ID=71003964
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010221510.7A Pending CN111277242A (en) | 2020-03-26 | 2020-03-26 | FPGA digital filter and implementation method thereof |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111277242A (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20010004731A1 (en) * | 1999-12-16 | 2001-06-21 | Michael Drexler | Input filter stage for a data stream, and method for filtering a data stream |
CN1329412A (en) * | 2001-03-21 | 2002-01-02 | 深圳市中兴集成电路设计有限责任公司 | Phase adjustable baseband filtering optimization implementing method and its equipment |
CN1344066A (en) * | 2000-09-21 | 2002-04-10 | 华为技术有限公司 | Digital shaping filter in WCDMA communication system |
CN101110591A (en) * | 2007-06-20 | 2008-01-23 | 深圳市海泰康微电子有限公司 | Number extracting filter used for sigma-triangle a/d converter |
CN101919706A (en) * | 2009-06-12 | 2010-12-22 | 深圳迈瑞生物医疗电子股份有限公司 | Decimating filtering method and decimating filter |
CN102983838A (en) * | 2012-12-05 | 2013-03-20 | 天津光电通信技术有限公司 | Method for realizing digital logic circuit of Guassian filter based on FPGA (Field Programmable Gate Array) |
CN211791464U (en) * | 2020-03-26 | 2020-10-27 | 华南理工大学 | FPGA digital filter |
-
2020
- 2020-03-26 CN CN202010221510.7A patent/CN111277242A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20010004731A1 (en) * | 1999-12-16 | 2001-06-21 | Michael Drexler | Input filter stage for a data stream, and method for filtering a data stream |
CN1344066A (en) * | 2000-09-21 | 2002-04-10 | 华为技术有限公司 | Digital shaping filter in WCDMA communication system |
CN1329412A (en) * | 2001-03-21 | 2002-01-02 | 深圳市中兴集成电路设计有限责任公司 | Phase adjustable baseband filtering optimization implementing method and its equipment |
CN101110591A (en) * | 2007-06-20 | 2008-01-23 | 深圳市海泰康微电子有限公司 | Number extracting filter used for sigma-triangle a/d converter |
CN101919706A (en) * | 2009-06-12 | 2010-12-22 | 深圳迈瑞生物医疗电子股份有限公司 | Decimating filtering method and decimating filter |
CN102983838A (en) * | 2012-12-05 | 2013-03-20 | 天津光电通信技术有限公司 | Method for realizing digital logic circuit of Guassian filter based on FPGA (Field Programmable Gate Array) |
CN211791464U (en) * | 2020-03-26 | 2020-10-27 | 华南理工大学 | FPGA digital filter |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN211791464U (en) | FPGA digital filter | |
US4020332A (en) | Interpolation-decimation circuit for increasing or decreasing digital sampling frequency | |
CA1298918C (en) | Sampled data subsampling apparatus | |
CN103269212B (en) | Low cost low-power consumption Multilevel FIR filter implementation method able to programme | |
CN1035215A (en) | Digital decimation filter | |
CN111147045B (en) | Zero clearing method and system for superconducting circuit | |
KR100893740B1 (en) | Decimation filter | |
CN104077492A (en) | Sample data interpolation method based on FPGA | |
CN102185587B (en) | Low-power-consumption multi-order interpolation half-band filter with two-phase structure | |
CN109271133A (en) | A kind of data processing method and system | |
CN105066990A (en) | High-precision digital filter applicable to strapdown inertial navigation | |
CN111277242A (en) | FPGA digital filter and implementation method thereof | |
CN106921367A (en) | A kind of decimation filter of digital of sigma delta ADC | |
CN109976660A (en) | Any resampling methods and sampled-data system based on linear interpolation | |
CN110677138A (en) | FIR filter based on error-free probability calculation | |
CN107966906B (en) | Fractional order delay implementation method based on sampling control separation principle | |
CN105425926A (en) | Controllable-bandwidth reset circuit capable of achieving asynchronous reset and synchronous release | |
WO2019210642A1 (en) | Novel time-to-digital converter | |
CN115882820A (en) | Filter circuit and analog-to-digital converter | |
CN1964188B (en) | A draw-off filter device of increment modulation type conversion | |
CN1342342A (en) | Method and device for reducing digital switching noise in mixed isgnal IC's | |
CN114257248A (en) | Shift register type serial-parallel conversion circuit with low turnover rate | |
JP2662694B2 (en) | Digital protection relay device | |
JP2800820B2 (en) | Filter device | |
CN112526205B (en) | DMA function control AD converter peak value sampling method based on MCU |
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 | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20211110 Address after: 510635 No. 315, 3 / F, building 8, compound 663, Tianhe North Road, Tianhe District, Guangzhou, Guangdong Applicant after: Guangzhou Hongwei Technology Co., Ltd Address before: 510640 No. 381, Wushan Road, Tianhe District, Guangzhou, Guangdong Applicant before: South China University of Technology |
|
TA01 | Transfer of patent application right |