Moving average low-pass filtering device and method
10361681 ยท 2019-07-23
Assignee
Inventors
Cpc classification
G06F17/12
PHYSICS
International classification
G06F17/12
PHYSICS
Abstract
Differing from the fact that the amount of register units and adder units arranged in conventional moving average filter must be increased for processing more number of reference input signals, the present invention particularly discloses a moving average low-pass filtering device. The moving average low-pass filtering device comprises a register unit and a filtering and processing unit, and is able to use identical circuit architecture to successfully treat reference input signals with a filtering process even if the number of the reference input signals is alternatively increased. Moreover, after finishing a verification experiment by a simulator, simulation results have proved that, this novel moving average low-pass filtering device still can use identical circuit architecture to complete the filtering process under nearly the same calculation efficiency even though the number of the reference input signals is alternatively increased.
Claims
1. A moving average low-pass filtering device, being electrically connected between a signal providing device and an electronic device, and used for receiving successive input signals from the signal providing device and subsequently apply a filtering process to the successive input signals, so as to correspondingly output successive signals to the electronic device; moreover, the moving average low-pass filtering device comprising: a register unit, comprising a first register for temporarily storing the successive input signals and a second register; and a filtering and processing unit, comprising: an adder, being coupled to the first register for applying an adding process to an N-th input signal of the successive input signals; a first shifter, being coupled to the adder and the second register of the register unit, and being configured for applying a first shift process to the N-th input signal that is been treated with the adding process, and the second register temporarily storing the N-th input signal as a (N1)-th input signal; a second shifter, being coupled to the second register of the register unit for applying a second shift process to the (N1)-th input signal; and a subtractor, being electrically connected to the second shifter and the second register of the register unit, and being configured to apply a subtracting process to the (N1)-th input signal and the (N1)-th input signal that is been treated with the second shift process; wherein the adder is also coupled to the subtractor, such that an output signal of the subtractor and the N-th input signal are applied with the adding process by the adder.
2. The moving average low-pass filtering device of claim 1, wherein the signal providing device is selected from the group consisting of A/D converter, sensor, receiver, voice recognition device, memory, storing device, and digital signal outputting device.
3. The moving average low-pass filtering device of claim 1, wherein the electronic device is selected from the group consisting of dynamic random access memory (DRAM), universal serial bus (USB), wired transmission device, wireless transmission device, and data storing device.
4. A moving average low-pass filtering method, being implemented in an execution device, wherein the execution device is electrically connected between a signal providing device and an electronic device, and used for receiving successive input signals from the signal providing device and subsequently apply a filtering process to the successive input signals, so as to correspondingly output successive signals to the electronic device; moreover, the moving average low-pass filtering method comprising following steps: (1) providing a register unit and a filtering and processing unit in the execution device; wherein the register unit comprises a first register and a second register, and the filtering and processing unit comprising a first shifter, a second shifter, and a subtractor; (2) letting the register unit receive successive input signals from a memory, a storing device or the signal providing device through the first register thereof; (31) letting the adder access the first register, so as to apply an adding process to an N-th input signal of the successive input signals; (32) using the first shifter to apply the a first shift process to the N-th input signal that is been treated with the adding process; (33) using the second register to temporarily store the N-th input signal that is been treated with the first shift process as an (N1)-th input signal; (34) using the second shifter to apply a second shift process to the (N1)-th input signal; and (35) using the subtractor to apply the subtracting process to the (N1)-th input signal that is been treated with the second shift process; wherein the adder is configured to apply the adding process to an output signal of the subtractor and the forgoing N-th input signal.
5. The moving average low-pass filtering method of claim 4, wherein the signal providing device is selected from the group consisting of A/D converter, sensor, receiver, voice recognition device, memory, storing device, and digital signal outputting device.
6. The moving average low-pass filtering method of claim 4, wherein the electronic device is selected from the group consisting of dynamic random access memory (DRAM), universal serial bus (USB), wired transmission device, wireless transmission device, and data storing device.
7. The moving average low-pass filtering method of claim 4, wherein the execution device is selected from the group consisting of computer, processor and controller.
8. The moving average low-pass filtering method of claim 4, wherein both the register unit and the filtering and processing unit are provided in the execution device by a form of application program, library, variables, or operands.
9. The moving average low-pass filtering method of claim 4, wherein the first shift process is carried out after rightward shifting decimal (binary) data of the N-th input signal that is been treated with the adding process by n bits based on a system clock signal, and the first shift process being completed after leftward shifting decimal (binary) data of the (N1)-th input signal by n bits based on the system clock signal.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1) The invention as well as a preferred mode of use and advantages thereof will be best understood by referring to the following detailed description of an illustrative embodiment in conjunction with the accompanying drawings, wherein:
(2)
(3)
(4)
(5)
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
(6) To more clearly describe a moving average low-pass filtering device and a moving average low-pass filtering method according to the present invention, embodiments of the present invention will be described in detail with reference to the attached drawings hereinafter.
(7) With reference to
(8) From
(9) In the present invention, the register unit 11 is constituted by a first register 111 and a second register 112. It is worth explaining that, after the filtering and processing unit 12 applies a moving average process to one specific input signal of the successive input signals stored in the first register 111, the second register 112 would subsequently store the specific input signal as another one input signal. Therefore, according to a system clock signal, the input signal stored in the second register 112 and the input signal stored in the first register 111 are respectively regarded as an (N1)-th input signal been treated with the moving average process and an N-th input signal.
(10) Please refer to
(11) After finishing the adding process, the second shifter continuously applies a second shift process to the (N1)-the input signal stored in the second register 112. Furthermore, since the subtractor 124 is electrically connected to the second shifter 123 and the second register 112, the subtractor 124 is configured to apply a subtracting process to the (N1)-the input signal been treated with the second shift process and the (N1)-the input signal. Consequently, the adder 121 applies the adding process to an output signal of the subtractor 124 and the N-th input signal.
(12) In is worthy particularly introducing that, the technology features of this moving average low-pass filtering device 1 for carrying out moving average filtering process include: (1) to amplify a previous input signal (i.e., the (N1)-th input signal) stored in the second register 112 by 2.sup.n times through using the second shifter 123 to leftward shifting decimal (binary) data of the (N1)-th input signal by n bits based on system clock signal; and (2) applying a subtracting process to the (N1)-th input signal been amplified by 2.sup.n times and the (N1)-th input signal by using the subtractor 124, so as to obtain one (N1)-th input signal been amplified by 2.sup.n-1 times. Thus, a digital signal can be produced by adding the (N1)-th input signal been amplified by 2.sup.n-1 times and the N-th input signal, wherein the said digital signal is approximately equal to the superposition of first input signal, second input signal, 3.sup.rd input signal, . . . , and (2.sup.n)-th input signal. Eventually, the N-th input signal been treated with the moving average process can be obtained through using the first shifter 122 to rightward shift decimal (binary) data of the digital signal outputted from the adder 122 (i.e., the N-th input signal) by n bits.
(13) Compared to the conventional moving average filter 1 shown in
(14) TABLE-US-00001 TABLE (1) Number of input signals 2 4 8 16 32 64 Amount of 1 3 7 15 31 63 adders and subtractors Amount of 1 1 1 1 1 1 shifters Amount of 3 5 9 17 33 65 registers Calculation 4.96 5 5 5.47 6.28 7.08 time (ns)
(15) TABLE-US-00002 TABLE (2) Number of input signals 2 4 8 16 32 64 Amount of 2 2 2 2 2 2 adders and subtractors Amount of 2 2 2 2 2 2 shifters Amount of 2 2 2 2 2 2 registers Calculation 4.99 5 5 5 5 5 time (ns)
(16) From Table (1) and
(17) It needs to emphasize that, although
(18) Please refer to
(19) Continuously referring to
(20) Therefore, through above descriptions, the moving average low-pass filtering device and method proposed by the present invention have been introduced completely and clearly; in summary, the present invention includes the advantages of:
(21) (1) In view of the fact that the number of register units 11 and adder units 12 arranged in conventional moving average filter 1 (shown as
(22) (2) In addition, this moving average low-pass filtering device 1 can also be established through using mathematical algorithms, so as to be provided in an execution device like computer, processor or controller by a form of application program, library, variables, or operands.
(23) The above description is made on embodiments of the present invention. However, the embodiments are not intended to limit scope of the present invention, and all equivalent implementations or alterations within the spirit of the present invention still fall within the scope of the present invention.