CN111277242A - FPGA digital filter and implementation method thereof - Google Patents

FPGA digital filter and implementation method thereof Download PDF

Info

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
Application number
CN202010221510.7A
Other languages
Chinese (zh)
Inventor
王孝洪
周鑫东
江树人
黄淇松
张波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Hongwei Technology Co., Ltd
Original Assignee
South China University of Technology SCUT
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by South China University of Technology SCUT filed Critical South China University of Technology SCUT
Priority to CN202010221510.7A priority Critical patent/CN111277242A/en
Publication of CN111277242A publication Critical patent/CN111277242A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03HIMPEDANCE NETWORKS, e.g. RESONANT CIRCUITS; RESONATORS
    • H03H17/00Networks using digital techniques
    • H03H17/02Frequency selective networks
    • H03H17/0294Variable filters; Programmable filters
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03HIMPEDANCE NETWORKS, e.g. RESONANT CIRCUITS; RESONATORS
    • H03H17/00Networks using digital techniques
    • H03H17/02Frequency selective networks
    • H03H17/0223Computation saving measures; Accelerating measures

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

FPGA digital filter and implementation method thereof
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:
Figure BDA0002426250960000011
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:
Figure BDA0002426250960000012
τMfor MCLKIN cycle
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.
CN202010221510.7A 2020-03-26 2020-03-26 FPGA digital filter and implementation method thereof Pending CN111277242A (en)

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)

Similar Documents

Publication Publication Date Title
US4819252A (en) Sampled data subsampling apparatus
CN111147045B (en) Zero clearing method and system for superconducting circuit
KR100893740B1 (en) Decimation filter
CN103269212A (en) Method for implementing low-cost low-power-consumption programmable multistage FIR filter
CN109271133B (en) Data processing method and system
CN104077492A (en) Sample data interpolation method based on FPGA
CN211791464U (en) FPGA digital filter
CN102353891A (en) Digital integrated circuit fundamental tester
CN102185587B (en) Low-power-consumption multi-order interpolation half-band filter with two-phase structure
CN106059530B (en) A kind of frequency response and the weak relevant half-band filter of coefficient quantization digit
CN104393854A (en) FPGA-based time division multiplexing cascaded integrator-comb decimation filter and realization method thereof
CN101222213A (en) Interpolation CIC wave filter based on programmable logic device and its implementing method
CN117040486B (en) Multi-gear digital filter and broadband digital receiver
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
CN106338908B (en) Edge detection circuit and time-to-digit converter
CN110677138B (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
CN115882820A (en) Filter circuit and analog-to-digital converter
CN1964188B (en) A draw-off filter device of increment modulation type conversion
CN205263743U (en) Controllable reset circuit of bandwidth is released in step to asynchronous reseing
CN1342342A (en) Method and device for reducing digital switching noise in mixed isgnal IC's
JP2800820B2 (en) Filter device

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
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