Method for filtering periodic noise and filter using the method

By detecting and filtering the fundamental frequency, harmonic frequency and aliasing frequency in the image spectrum, the problem of difficulty in effectively filtering out periodic noise in the prior art is solved, and the protection of high-frequency information of the image and the reduction of ringing effect are achieved.

CN115131217BActive Publication Date: 2025-06-27CORETRONIC CORPORATION
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110319606.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-25
Publication Date
2025-06-27
Estimated Expiration
2041-03-25

AI Technical Summary

Technical Problem

The prior art is difficult to effectively filter out periodic noise in the image, especially when the high-frequency part and the low-frequency part are aliased, which can easily lead to information loss or ringing effects.

Method used

By detecting the fundamental frequency and its harmonic frequency in the spectrum of the input signal, it is determined whether there is an aliasing frequency, and filtering these frequencies to reduce noise energy. The specific method includes selecting the average energy of the corresponding frequency band as the threshold value and filtering out noise greater than the threshold value.

Benefits of technology

Effectively filter out periodic noise, reduce the loss of high-frequency information on the image, reduce the impact of ringing effect on sharp edges, and preserve the details of the image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115131217B_ABST
    Figure CN115131217B_ABST
Patent Text Reader

Abstract

A method for filtering periodic noise and a filter using the method are proposed. The method includes: obtaining an input signal; detecting a fundamental frequency corresponding to the maximum peak in the spectrum of the input signal, detecting harmonic frequencies based on the fundamental frequency, and detecting an aliasing frequency corresponding to the harmonic frequency in response to the harmonic frequency corresponding to the fundamental frequency being greater than the Nyquist frequency of the input signal; filtering at least one of the harmonic frequency and the aliasing frequency of the spectrum and the fundamental frequency to generate a first filtered spectrum, and restoring the input signal according to the first filtered spectrum to generate an output signal; and outputting the output signal. The method for filtering periodic noise and the filter using the method of the present invention can filter periodic noise in an input signal affected by the aliasing effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method for filtering periodic noise and a filter using the method.

Background Art

[0002] In the field of image processing, one of the goals that people in this field are committed to researching is how to filter periodic noise in an image while retaining the information in the image. Periodic noise includes, for example, stripe patterns or grid patterns. In addition, affected by the sampling resolution, high-frequency signals in the image may generate Moiré patterns. In the Fourier spectrum, periodic noise often appears in the form of impulses. When the intensity of the periodic noise is sufficient, in addition to the component of the periodic noise at the fundamental frequency, the components of the periodic noise at the harmonic frequencies will also have a significant impact on the signal. Figure 1A The spectrum diagram of the fundamental frequency and harmonic frequencies of the illustrated periodic noise, where f1 is the fundamental frequency of the periodic noise, 2f1 is the second harmonic frequency of the periodic noise, and 3f1 is the third harmonic frequency of the periodic noise.

[0003] During the process of performing the Fourier transform, the effective bandwidth of the spectrum is half of the sampling frequency, and half of the sampling frequency can be referred to as the Nyquist frequency. When the sampling frequency satisfies the Nyquist sampling theorem, that is, as long as the Nyquist frequency is higher than the highest frequency of the signal to be sampled, the aliasing effect can be avoided. Therefore, to sample a signal at a specific frequency, a sampling frequency equal to twice (or more) that specific frequency is required to obtain the complete information of the signal. If the sampling frequency is too low, the sampled waveforms may overlap with each other. For example, the high-frequency portion (HFP) of the signal may alias into the low-frequency portion (LFP) of the signal, generating an aliasing effect. Figure 1B The spectrum diagram affected by the aliasing effect is illustrated. Since the third harmonic frequency of the periodic noise exceeds the Nyquist frequency f N (half of the sampling frequency), the third harmonic is aliased into the frequency band of the second harmonic.

[0004] To filter out periodic noise in an image, a known method can filter out periodic noise through a low-pass filter or a band-pass filter. However, although a low-pass filter can filter out specific high-frequency noise, it may also remove the high-frequency part of the image at the same time. Although a band-pass filter can remove noise in a narrow bandwidth, it may cause a ringing effect and affect sharp edges in the image. On the other hand, another known method can suppress the interference of periodic noise on a specific frequency band of the image through a median filter or a two-dimensional Gaussian band-stop filter, but this method may cause information that is not noise in the specific frequency band to be filtered out. SUMMARY OF THE INVENTION

[0005] The present invention provides a method for filtering out periodic noise and a filter using the method, which can filter out periodic noise in an input signal affected by an aliasing effect.

[0006] A filter for filtering out periodic noise according to the present invention includes a transceiver, a storage medium, and a processor. Among them, the storage medium stores a plurality of modules; and the processor is coupled to the storage medium and the transceiver, and accesses and executes the plurality of modules. The plurality of modules include a data collection module, a detection module, a filtering module, and an output module. Among them, the data collection module obtains an input signal through the transceiver; the detection module detects the fundamental frequency corresponding to the maximum peak in the spectrum of the input signal, the detection module detects the harmonic frequency according to the fundamental frequency, and detects the aliasing frequency corresponding to the harmonic frequency in response to the harmonic frequency corresponding to the fundamental frequency being greater than the Nyquist frequency of the input signal; the filtering module filters at least one of the harmonic frequency and the aliasing frequency of the spectrum and the fundamental frequency to generate a first filtered spectrum. Among them, the filtering module filters the fundamental frequency by selecting a first frequency band corresponding to the fundamental frequency from the spectrum, calculating the first average energy of the first frequency band, setting the first average energy as a first threshold, and filtering out the noise greater than the first threshold in the first frequency band. The center frequency of the first frequency band is the fundamental frequency, and the first frequency band includes one or more frequency bands adjacent to the fundamental frequency; the filtering module restores the input signal according to the first filtered spectrum to generate an output signal; and the output module outputs the output signal through the transceiver.

[0007] A filter for filtering periodic noise according to the present invention includes a transceiver, a storage medium, and a processor. The storage medium stores a plurality of modules. The processor is coupled to the storage medium and the transceiver, and accesses and executes the plurality of modules. The plurality of modules include a data collection module, a detection module, a filtering module, and an output module. The data collection module obtains an input signal through the transceiver. The detection module detects a fundamental frequency corresponding to a maximum peak in the spectrum of the input signal, detects harmonic frequencies according to the fundamental frequency, and detects an aliasing frequency corresponding to the harmonic frequency in response to the harmonic frequency corresponding to the fundamental frequency being greater than the Nyquist frequency of the input signal. The filtering module filters at least one of the harmonic frequencies and the aliasing frequency of the spectrum and the fundamental frequency to generate a first filtered spectrum. The detection module further detects a secondary fundamental frequency corresponding to a secondary maximum peak in the first filtered spectrum, and detects a secondary aliasing frequency corresponding to the secondary harmonic frequency in response to the secondary harmonic frequency corresponding to the secondary fundamental frequency being greater than the Nyquist frequency. The filtering module filters at least one of the secondary harmonic frequency and the secondary aliasing frequency of the first filtered spectrum and the secondary fundamental frequency to generate a second filtered spectrum, and restores the input signal according to the second filtered spectrum to generate an output signal. The output module outputs the output signal through the transceiver.

[0008] A method for filtering periodic noise according to the present invention includes: obtaining an input signal; detecting a fundamental frequency corresponding to a maximum peak in the spectrum of the input signal, detecting harmonic frequencies according to the fundamental frequency, and detecting an aliasing frequency corresponding to the harmonic frequency in response to the harmonic frequency corresponding to the fundamental frequency being greater than the Nyquist frequency of the input signal; filtering at least one of the harmonic frequencies and the aliasing frequency of the spectrum and the fundamental frequency to generate a first filtered spectrum. The step of filtering the fundamental frequency to generate the first filtered spectrum includes: selecting a first frequency band corresponding to the fundamental frequency from the spectrum, where the center frequency of the first frequency band is the fundamental frequency, and the first frequency band includes one or more frequency bands adjacent to the fundamental frequency; calculating a first average energy of the first frequency band; setting the first average energy as a first threshold; and filtering out the noise greater than the first threshold in the first frequency band to generate the first filtered spectrum; restoring the input signal according to the first filtered spectrum to generate an output signal; and outputting the output signal.

[0009] A method for filtering periodic noise according to the present invention includes: obtaining an input signal; detecting a fundamental frequency corresponding to a maximum peak in the spectrum of the input signal, detecting harmonic frequencies based on the fundamental frequency, and detecting an aliasing frequency corresponding to the harmonic frequency in response to the harmonic frequency corresponding to the fundamental frequency being greater than the Nyquist frequency of the input signal; filtering at least one of the harmonic frequency and the aliasing frequency of the spectrum and the fundamental frequency to generate a first filtered spectrum; detecting a secondary fundamental frequency corresponding to a secondary maximum peak in the first filtered spectrum, and detecting a secondary aliasing frequency corresponding to the secondary harmonic frequency in response to the secondary harmonic frequency of the secondary fundamental frequency being greater than the Nyquist frequency; filtering at least one of the secondary harmonic frequency and the secondary aliasing frequency of the first filtered spectrum and the secondary fundamental frequency to generate a second filtered spectrum, and restoring the input signal according to the second filtered spectrum to generate an output signal; and outputting the output signal.

Description of the Drawings

[0010] Figure 1A A spectrogram showing the fundamental frequency and harmonic frequencies of periodic noise.

[0011] Figure 1B A spectrogram showing the effect of aliasing.

[0012] Figure 2 A schematic diagram showing a filter for filtering periodic noise according to an embodiment of the present invention.

[0013] Figure 3 A flowchart showing a method for filtering periodic noise for an input signal according to an embodiment of the present invention.

[0014] Figure 4A A schematic diagram showing an image containing periodic noise according to an embodiment of the present invention.

[0015] Figure 4B A schematic diagram showing an image with periodic noise filtered according to an embodiment of the present invention.

[0016] Figure 5 A schematic diagram showing a spectrum corresponding to a partial image according to an embodiment of the present invention.

[0017] Figure 6 A flowchart showing a method for filtering periodic noise according to an embodiment of the present invention.

[0018]

Symbol Description

[0019] 100: Filter

[0020] 110: Processor

[0021] 120: Storage medium

[0022] 121: Data collection module

[0023] 122: Detection module

[0024] 123: Filtering module

[0025] 124: Output module

[0026] 130: Transceiver

[0027] 40, 45: Images

[0028] 50: Object

[0029] 60: Grid

[0030] 70: Spectrum

[0031] f1: Fundamental frequency

[0032] f2, f3: Harmonic frequencies

[0033] f′1, f′2, f′3: Aliasing frequencies

[0034] f max : Maximum frequency

[0035] f N : Nyquist frequency

[0036] F1, F2, F3′: Frequency bands.

Detailed implementation manners

[0037] In order to make the content of the present invention clearer, the following specific embodiments are given as examples that the present invention can actually be implemented. Additionally, wherever possible, components / elements / steps with the same reference numerals in the drawings and the detailed implementation manners represent the same or similar parts.

[0038] Figure 2 According to an embodiment of the present invention, a schematic diagram of a filter 100 for filtering periodic noise is illustrated. The filter 100 can filter out periodic noise from an input signal affected by the aliasing effect. The filter 100 may include a processor 110, a storage medium 120, and a transceiver 130.

[0039] The processor 110 is, for example, a central processing unit (CPU), or other programmable general-purpose or special-purpose micro control unit (MCU), microprocessor, digital signal processor (DSP), programmable controller, application specific integrated circuit (ASIC), graphics processing unit (GPU), image signal processor (ISP), image processing unit (IPU), arithmetic logic unit (ALU), complex programmable logic device (CPLD), field programmable gate array (FPGA), or other similar components or a combination of the above components. The processor 110 can be coupled to the storage medium 120 and the transceiver 130, and access and execute multiple modules and various application programs stored in the storage medium 120.

[0040] The storage medium 120 is, for example, any type of fixed or removable random access memory (RAM), read-only memory (ROM), flash memory, hard disk drive (HDD), solid state drive (SSD), or similar components or a combination of the above components, and is used to store multiple modules or various application programs executable by the processor 110. In this embodiment, the storage medium 120 can store multiple modules including a data collection module 121, a detection module 122, a filtering module 123, and an output module 124, etc., and their functions will be described later.

[0041] The transceiver 130 transmits and receives signals in a wireless or wired manner. The transceiver 130 can also perform operations such as low noise amplification, impedance matching, mixing, up or down frequency conversion, filtering, amplification, and similar operations. The transceiver 130 is, for example, a device including a circuit capable of executing the above functions.

[0042] Figure 3The flowchart of a method for filtering periodic noise of an input signal according to an embodiment of the present invention, wherein the method can be implemented by a filter 100 as shown in Figure 2 If the input signal is an image, the filter 100 can implement the method as shown in Figure 3 to filter out the grid generated by periodic noise in the image and retain the details in the image. Figure 4A Schematic diagram of an image 40 containing periodic noise according to an embodiment of the present invention. Figure 4B Schematic diagram of an image 45 with periodic noise filtered out according to an embodiment of the present invention. Assume that the input signal is an image 40 as shown in Figure 4A where the image 40 includes an object 50 that is not noise and a grid 60 generated by periodic noise. The filter 100 can filter out the grid 60 in the image 40 while retaining the details of the image 40, thereby generating the image 45. Therefore, the object 50 in the image 45 is not distorted.

[0043] Referring to Figure 3 , in step S301, the data collection module 121 can obtain the input signal through the transceiver 130, and the detection module 122 can generate the spectrum of the input signal, where the input signal is, for example, an image. Specifically, after the data collection module 121 obtains the input signal in the time domain through the transceiver 130, the detection module 122 can perform a one-dimensional fast Fourier transform on the input signal to generate the spectrum.

[0044] Taking Figure 4A as an example, if the image 40 (i.e., the input signal) is not a grayscale image, the detection module 122 can convert the image 40 into a grayscale image. Then, the detection module 122 can obtain a partial image from the image 40 and perform a one-dimensional fast Fourier transform (FFT) on the partial image to generate the spectrum corresponding to the partial image. The definition of the partial image can be adjusted according to the usage requirements, and the present invention is not limited thereto. Since the detection module 122 needs to perform a one-dimensional fast Fourier transform on the partial image, the length and width of the partial image need to be powers of 2, where n is a positive integer. If the length or width of the partial image is not a power of 2, the detection module 122 can perform zero fill on the length or width of the partial image to make the length or width a power of 2. The spectrum of a small-sized partial image can include a smaller frequency range. When the periodic noise is significant, a small-sized partial image is sufficient for the detection module 122 to detect the fundamental frequency of the periodic signal. Defining the partial image as a small-sized image can reduce the amount of computation required for performing the one-dimensional fast Fourier transform. Relatively speaking, defining the partial image as a large-sized image may increase the amount of computation required for performing the one-dimensional fast Fourier transform, but the spectrum of the large-sized partial image can include a larger frequency range.

[0045] In an embodiment, assuming that the image 40 is composed of N*M pixels (N and M are positive integers and N*M is a power of 2), the detection module 122 can extract the component of the image 40 in the X direction to obtain a partial image. For example, the detection module 122 can extract N pixels arranged along the X direction in the image 40 as the partial image, where the coordinates of the N pixels on the image 40 can be (1, m), (2, m),..., (N - 1, m), and (N, m) respectively, where m is a positive integer less than or equal to M. As another example, the detection module 122 can extract M pixels arranged along the Y direction in the image 40 as the partial image, where the coordinates of the M pixels on the image 40 can be (n, 1), (n, 2),..., (n, M - 1), and (n, M) respectively, where n is a positive integer less than or equal to N.

[0046] In step S302, the detection module 122 can detect the fundamental frequency, harmonic frequency, and aliasing frequency of the periodic noise in the spectrum. The detection module 122 can detect the fundamental frequency in the [f min , f N interval of the spectrum, where f min is the lowest frequency at which periodic noise may appear in the spectrum, and f N is the Nyquist frequency of the spectrum. The detection module 122 can detect the harmonic frequency in the [2f1, f max interval of the spectrum, where 2f1 is the frequency of the first harmonic of the periodic noise, and f max is the maximum frequency at which the harmonics of the periodic noise still exist. Based on the possible occurrence of aliasing effects, the frequency f max can be greater than the Nyquist frequency f N and less than the sampling frequency f S of the spectrum.

[0047] Figure 5 A schematic diagram showing the spectrum 70 corresponding to the partial image according to an embodiment of the present invention, where f S is the sampling frequency of the input signal, and f Nis the Nyquist frequency of the input signal. First, the detection module 122 can detect the fundamental frequency f1 of the periodic noise in the spectrum 70. In one embodiment, the detection module 122 can find the maximum peak in the spectrum 70 and define the frequency corresponding to the maximum peak as the fundamental frequency f1 of the periodic noise. Then, the detection module 122 can detect the harmonic frequencies f2 and f3 of the periodic noise based on the fundamental frequency f1, where the harmonic frequencies f2 and f3 can be integer multiples of the fundamental frequency f1. For example, if the harmonic frequency f2 corresponds to the second harmonic of the periodic noise, the harmonic frequency f2 can be twice the fundamental frequency f1. If the harmonic frequency f3 corresponds to the third harmonic of the periodic noise, the harmonic frequency f3 can be three times the fundamental frequency f1.

[0048] The detection module 122 can also detect the aliasing frequency of the periodic noise in the spectrum 70. If the harmonic frequency of the periodic noise is greater than the Nyquist frequency f of the input signal (i.e., the image 40) N , then the harmonic will generate an aliasing frequency f3' within the Nyquist frequency f N , where the harmonic frequency f3 and the aliasing frequency f3' are symmetric about the Nyquist frequency f N . For Figure 5 example, the detection module 122 can detect the aliasing frequency f3' symmetric to the harmonic frequency f3 about the Nyquist frequency f N based on the harmonic frequency f3 greater than the Nyquist frequency f N .

[0049] It should be noted specifically that Figure 5 is the state presented by the solid line parts f1, f2, f3' of the image 40 affected by the aliasing effect when the Nyquist frequency is f N , which can be called the positive frequency, while the dotted line parts f1', f2', f3 are the mirror frequencies, which can be called the negative frequency, where the positive frequency and the negative frequency are symmetric about the Nyquist frequency f N . In other words, the positive frequency is the part that the detection module 122 can detect, while the negative frequency is the part unknown to the detection module 122.

[0050] In step S303, the filtering module 123 can filter at least one of the harmonic frequency and the aliasing frequency and the fundamental frequency.

[0051] For Figure 5For example, the filtering module 123 can select the frequency band F1 corresponding to the fundamental frequency f1 from the spectrum 70, and calculate the average energy of the frequency band F1. The filtering module 123 can set the average energy as the threshold T1, and filter out the noise in the frequency band F1 that is greater than the threshold T1, thereby reducing the energy of the fundamental frequency f1. The frequency band F1 can include one or more frequency bands adjacent to the fundamental frequency f1. For example, the fundamental frequency f1 can be the center frequency of the frequency band F1. The starting point of the frequency band F1 can be the fundamental frequency f1 minus the first preset frequency band. The ending point of the frequency band F1 can be the fundamental frequency f1 plus the second preset frequency band.

[0052] The filtering module 123 can select the frequency band F2 corresponding to the harmonic frequency f2 from the spectrum 70, and calculate the average energy of the frequency band F2. The filtering module 123 can set the average energy as the threshold T2, and filter out the noise in the frequency band F2 that is greater than the threshold T2, thereby reducing the energy of the harmonic frequency f2. The frequency band F2 can include one or more frequency bands adjacent to the harmonic frequency f2. For example, the harmonic frequency f2 can be the center frequency of the frequency band F2. The starting point of the frequency band F2 can be the harmonic frequency f2 minus the third preset frequency band. The ending point of the frequency band F2 can be the harmonic frequency f2 plus the fourth preset frequency band.

[0053] The filtering module 123 can select the frequency band F3' corresponding to the aliasing frequency f'3 from the spectrum 70, and calculate the average energy of the frequency band F3'. The filtering module 123 can set the average energy as the threshold T3', and filter out the noise in the frequency band F3' that is greater than the threshold T3', thereby reducing the energy of the aliasing frequency f'3. The frequency band F3' can include one or more frequency bands adjacent to the aliasing frequency f'3. For example, the aliasing frequency f'3 can be the center frequency of the frequency band F3'. The starting point of the frequency band F3' can be the aliasing frequency f'3 minus the fifth preset frequency band. The ending point of the frequency band F3' can be the aliasing frequency f'3 plus the sixth preset frequency band. In other cases, if there are harmonic frequencies f3 or aliasing frequencies f'1 and f'2 for positive frequencies, the filtering module 123 can reduce their energies based on a similar method as described above.

[0054] In step S304, the detection module 122 can determine whether there is a frequency in the filtered spectrum 70 (or referred to as the "first filtered spectrum") whose energy is greater than a preset threshold. If there is a frequency in the filtered spectrum 70 that is greater than the preset threshold, step S302 is re-executed. If there is no frequency in the filtered spectrum 70 that is greater than the preset threshold, step S305 is entered.

[0055] If there is a frequency greater than a preset threshold in the filtered spectrum 70, it represents that there are other periodic signals in the image 40 that have not been filtered out. Therefore, the filter 100 needs to re - execute steps S302 to S303 to filter out the other periodic signals. Specifically, in step S302, the detection module 122 can detect the secondary fundamental frequency, secondary harmonic frequency, and secondary aliasing frequency of the periodic noise in the filtered spectrum 70, where the secondary fundamental frequency can correspond to the secondary maximum peak in the spectrum 70, and the secondary maximum peak can be less than the aforementioned maximum peak. In step S303, the filtering module 123 can filter at least one of the secondary harmonic frequency and the secondary aliasing frequency and the secondary fundamental frequency to generate a new filtered spectrum 70 (or referred to as the "second filtered spectrum").

[0056] If there is no frequency greater than the preset threshold in the filtered spectrum 70, then in step S305, the filtering module 123 can perform a one - dimensional inverse fast Fourier transform (IFFT) on the filtered spectrum 70 to restore the input signal and generate an output signal.

[0057] In step S306, the output module 124 can output the output signal through the transceiver 130, where the output signal is, for example, the image 45 as Figure 4B shown.

[0058] The filter 100 can repeatedly implement the method as Figure 3 shown to filter out the periodic noise of each partial image of the image 40 until there is no periodic noise in each of the N*M pixels of the image 40.

[0059] Figure 6 A flowchart of a method for filtering periodic noise according to an embodiment of the present invention is illustrated, where the method can be implemented by a filter 100 as Figure 2 shown. In step S601, an input signal is obtained. In step S602, the fundamental frequency corresponding to the maximum peak in the spectrum of the input signal is detected, the harmonic frequency is detected according to the fundamental frequency, and the aliasing frequency corresponding to the harmonic frequency is detected in response to the harmonic frequency corresponding to the fundamental frequency being greater than the Nyquist frequency of the input signal. In other words, the detection of the harmonic frequency is based on the fundamental frequency, and the detection of the aliasing frequency is based on the harmonic frequency and the Nyquist frequency of the input signal. In step S603, at least one of the harmonic frequency and the aliasing frequency of the spectrum and the fundamental frequency are filtered to generate a first filtered spectrum, and the input signal is restored according to the first filtered spectrum to generate an output signal. In step S604, the output signal is output.

[0060] In summary, the present invention can detect the fundamental frequency, harmonic frequency or aliasing frequency of the periodic noise in the input signal, and can weaken the energy of the periodic noise at these frequencies according to the average energy of the frequency bands close to these frequencies. In addition to filtering out the periodic noise with relatively large energy, the present invention can also filter out the periodic noise with relatively small energy. Therefore, the present invention can effectively and smoothly suppress the interference of the periodic noise. The present invention can filter out the periodic noise while retaining the high-frequency information of the input signal and reducing the influence of the ringing effect on the sharp edges in the image. Taking the processing of the image signal as an example, the present invention can effectively filter out the grid caused by the periodic noise in the image and retain the details in the image.

[0061] The above content is only the preferred embodiment of the present invention, and the scope of implementation of the present invention cannot be limited thereby. That is, all simple equivalent changes and modifications made according to the content of the claims and the specification of the present invention still fall within the scope covered by the patent of the present invention. In addition, any embodiment or claim of the present invention does not have to achieve all the purposes, advantages or features disclosed by the present invention. In addition, the abstract part and the title are only used to assist in searching for patent documents and are not used to limit the scope of rights of the present invention. In addition, the terms "first", "second", etc. mentioned in the specification or claims of the present invention are only used to name the elements or distinguish different embodiments or scopes, and are not used to limit the upper or lower limits of the number of elements.

Claims

1. A filter for filtering periodic noise, comprising a transceiver, a storage medium, and a processor, wherein, the storage medium stores a plurality of modules; and the processor is coupled to the storage medium and the transceiver, and accesses and executes the plurality of modules, wherein the plurality of modules include a data collection module, a detection module, a filtering module, and an output module, wherein, the data collection module obtains an input signal through the transceiver; the detection module detects a fundamental frequency corresponding to a maximum peak in the spectrum of the input signal, the detection module detects harmonic frequencies based on the fundamental frequency, and detects an aliasing frequency corresponding to the harmonic frequency in response to the harmonic frequency corresponding to the fundamental frequency being greater than the Nyquist frequency of the input signal; the filtering module filters at least one of the harmonic frequency and the aliasing frequency of the spectrum and the fundamental frequency to generate a first filtered spectrum, wherein the filtering module filters the fundamental frequency by selecting a first frequency band corresponding to the fundamental frequency from the spectrum, calculating a first average energy of the first frequency band, setting the first average energy as a first threshold, and filtering out noise in the first frequency band that is greater than the first threshold, wherein a center frequency of the first frequency band is the fundamental frequency, and the first frequency band includes one or more frequency bands adjacent to the fundamental frequency; the filtering module restores the input signal based on the first filtered spectrum to generate an output signal; and the output module outputs the output signal through the transceiver.

2. The filter according to claim 1, wherein the filtering module selects a second frequency band corresponding to the harmonic frequency from the spectrum, calculates a second average energy of the second frequency band, and filters the harmonic frequency based on the second average energy to generate the first filtered spectrum, Among them, a center frequency of the second frequency band is the harmonic frequency, and the second frequency band includes one or more frequency bands adjacent to the harmonic frequency.

3. The filter according to claim 2, wherein the filtering module sets the second average energy as a second threshold, and filters out noise in the second frequency band that is greater than the second threshold to generate the first filtered spectrum.

4. The filter according to claim 1, wherein the filtering module selects a third frequency band corresponding to the aliasing frequency from the spectrum, calculates a third average energy of the third frequency band, and filters the aliasing frequency based on the third average energy to generate the first filtered spectrum, Among them, a center frequency of the third frequency band is the aliasing frequency, and the third frequency band includes one or more frequency bands adjacent to the aliasing frequency.

5. The filter according to claim 4, wherein the filtering module sets the third average energy as a third threshold, and filters out noise in the third frequency band that is greater than the third threshold to generate the first filtered spectrum.

6. The filter according to claim 1, wherein The detection module performs a one-dimensional fast Fourier transform on the input signal to generate a frequency spectrum.

7. A filter for filtering periodic noise, comprising a transceiver, a storage medium, and a processor, wherein, the storage medium stores a plurality of modules; and the processor is coupled to the storage medium and the transceiver, and accesses and executes the plurality of modules, wherein the plurality of modules includes a data collection module, a detection module, a filtering module, and an output module, wherein, the data collection module obtains an input signal through the transceiver; the detection module detects a fundamental frequency corresponding to a maximum peak in the frequency spectrum of the input signal, the detection module detects harmonic frequencies based on the fundamental frequency, and detects an aliasing frequency corresponding to the harmonic frequency in response to the harmonic frequency corresponding to the fundamental frequency being greater than the Nyquist frequency of the input signal; the filtering module filters at least one of the harmonic frequency and the aliasing frequency of the frequency spectrum and the fundamental frequency to generate a first filtered frequency spectrum; the detection module further detects a secondary fundamental frequency corresponding to a secondary maximum peak in the first filtered frequency spectrum, and detects a secondary aliasing frequency corresponding to the secondary harmonic frequency in response to the secondary harmonic frequency corresponding to the secondary fundamental frequency being greater than the Nyquist frequency; the filtering module filters at least one of the secondary harmonic frequency and the secondary aliasing frequency of the first filtered frequency spectrum and the secondary fundamental frequency to generate a second filtered frequency spectrum, and restores the input signal according to the second filtered frequency spectrum to generate an output signal; and the output module outputs the output signal through the transceiver.

8. A method for filtering periodic noise, comprising: obtaining an input signal; detecting a fundamental frequency corresponding to a maximum peak in the frequency spectrum of the input signal, detecting harmonic frequencies based on the fundamental frequency, and detecting an aliasing frequency corresponding to the harmonic frequency in response to the harmonic frequency corresponding to the fundamental frequency being greater than the Nyquist frequency of the input signal; filtering at least one of the harmonic frequency and the aliasing frequency of the frequency spectrum and the fundamental frequency to generate a first filtered frequency spectrum, wherein the step of filtering the fundamental frequency to generate the first filtered frequency spectrum includes: selecting a first frequency band corresponding to the fundamental frequency from the frequency spectrum, wherein a center frequency of the first frequency band is the fundamental frequency, and the first frequency band includes one or more frequency bands adjacent to the fundamental frequency; calculating a first average energy of the first frequency band; setting the first average energy as a first threshold; and filtering out noise in the first frequency band that is greater than the first threshold to generate the first filtered frequency spectrum; restoring the input signal according to the first filtered frequency spectrum to generate an output signal; and outputting the output signal.

9. The method according to claim 8, wherein the step of filtering at least one of the harmonic frequency and the aliasing frequency of the frequency spectrum and the fundamental frequency to generate the first filtered frequency spectrum includes: Select a second frequency band corresponding to the harmonic frequency from the spectrum, the center frequency of the second frequency band being the harmonic frequency, and the second frequency band including one or more frequency bands adjacent to the harmonic frequency; Calculate a second average energy of the second frequency band; and Filter the harmonic frequency according to the second average energy to generate the first filtered spectrum.

10. The method according to claim 9, wherein the step of filtering the harmonic frequency according to the second average energy to generate the first filtered spectrum comprises: Setting the second average energy as a second threshold; and Filtering out the noise in the second frequency band that is greater than the second threshold to generate the first filtered spectrum.

11. The method according to claim 8, wherein the step of filtering at least one of the harmonic frequency and the aliasing frequency of the spectrum and the fundamental frequency to generate the first filtered spectrum comprises: Select a third frequency band corresponding to the aliasing frequency from the spectrum, the center frequency of the third frequency band being the aliasing frequency, and the third frequency band including one or more frequency bands adjacent to the aliasing frequency; Calculate a third average energy of the third frequency band; and Filter the aliasing frequency according to the third average energy to generate the first filtered spectrum.

12. The method according to claim 11, wherein the step of filtering the aliasing frequency according to the third average energy to generate the first filtered spectrum comprises: Setting the third average energy as a third threshold; and Filtering out the noise in the third frequency band that is greater than the third threshold to generate the first filtered spectrum.

13. The method according to claim 8, further comprising performing a one-dimensional fast Fourier transform on the input signal to generate a spectrum.

14. A method for filtering periodic noise, comprising: Obtaining an input signal; Detecting a fundamental frequency corresponding to a maximum peak in the spectrum of the input signal, detecting a harmonic frequency according to the fundamental frequency, and detecting an aliasing frequency corresponding to the harmonic frequency in response to the harmonic frequency corresponding to the fundamental frequency being greater than the Nyquist frequency of the input signal; Filtering at least one of the harmonic frequency and the aliasing frequency of the spectrum and the fundamental frequency to generate a first filtered spectrum; Detecting a secondary fundamental frequency corresponding to a secondary maximum peak in the first filtered spectrum, and detecting a secondary aliasing frequency corresponding to the secondary harmonic frequency in response to the secondary harmonic frequency of the secondary fundamental frequency being greater than the Nyquist frequency; Filtering at least one of the secondary harmonic frequency and the secondary aliasing frequency of the first filtered spectrum and the secondary fundamental frequency to generate a second filtered spectrum, and restoring the input signal according to the second filtered spectrum to generate an output signal; and Outputting the output signal.

Citation Information

Patent Citations

  • Frequency interference detection and correction

    US20060239389A1

  • Signal analysis using dual converters and cross spectrum

    US20080079623A1