Digital decimation filter, signal processing method and electronic equipment

By combining upsampling and downsampling modules with the design of filters and compensators, the problems of large circuit area and high cost in digital decimation filters are solved, achieving simpler and more economical signal conversion.

CN119010839APending Publication Date: 2024-11-22SMARTER SILICON (SHANGHAI) TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411189076.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-27
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

Existing digital decimation filters require multiple paths to support PDM and PCM signal conversion at various frequencies in multiple digital microphone applications, resulting in large circuit area and high cost.

Method used

An upsampling module is used to upsample the initial signal to the same target frequency, and a downsampling module is used to convert it into the target signal. Combined with a target filter to filter out the image signal and a compensator to compensate for the passband attenuation, the number of digital decimation paths is reduced.

Benefits of technology

This reduces the implementation complexity and cost of digital decimation filters, while also reducing circuit area.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119010839A_ABST
    Figure CN119010839A_ABST
Patent Text Reader

Abstract

The invention discloses a digital decimation filter, a signal processing method and electronic equipment, and the digital decimation filter comprises an up-sampling module which is used for carrying out the up-sampling processing of an initial signal according to a target frequency, so as to obtain a first signal, and the initial signal is a pulse density modulation signal; the signal frequency of the initial signal is any one of a plurality of input frequencies; and the down-sampling module is used for at least performing down-sampling processing on the first signal to obtain a target signal, the target signal is a pulse code modulation signal, and the signal frequency of the target signal is smaller than the signal frequency of the initial signal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a digital extraction filter, a signal processing method and an electronic device. Background Art

[0002] At present, analog to digital converters (ADCs) have been widely used in high-precision analog-to-digital conversion fields such as digital audio and data acquisition.

[0003] The digital decimation filter in the ADC is used to convert the pulse density modulation (PDM) signal into a pulse code modulation (PCM) signal.

[0004] However, in practical applications, for example, when there are multiple digital microphones, the filter is usually required to support the conversion between PDM signals and PCM signals of multiple frequencies. Therefore, multiple digital extraction paths are usually required to be deployed in the digital extraction filter. These digital extraction paths are used to convert PDM signals of specific frequencies into PCM signals of specific frequencies. This results in more circuit paths in the digital extraction filter, a large circuit area, and a higher cost. Summary of the invention

[0005] In view of this, the present application provides a digital extraction filter, a signal processing method and an electronic device, as follows:

[0006] A digital decimation filter, comprising:

[0007] An upsampling module, configured to perform upsampling processing on an initial signal according to a target frequency to obtain a first signal, wherein the initial signal is a pulse density modulation signal; and the signal frequency of the initial signal is any frequency among a plurality of input frequencies;

[0008] The downsampling module is used to perform downsampling processing on at least the first signal to obtain a target signal, wherein the target signal is a pulse code modulation signal, and the signal frequency of the target signal is lower than the signal frequency of the initial signal.

[0009] The digital decimation filter preferably further comprises:

[0010] The target filter is used to filter the first signal so that the image signal is filtered out of the filtered first signal, and output the filtered first signal to the downsampling module.

[0011] The above-mentioned digital decimation filter, preferably, the delay value of the target filter is greater than the interpolation rate;

[0012] The delay value represents the number of delayed sampling points in the target filter; the interpolation rate is: the interpolation rate at which the upsampling module interpolates the initial signal according to the target frequency.

[0013] The above-mentioned digital extraction filter preferably further includes: a target compensator; the target compensator is used to compensate for the passband attenuation of the filtered first signal.

[0014] The digital decimation filter, preferably, the downsampling module comprises:

[0015] a first filter, configured to extract at least the first signal to obtain a second signal, wherein the second signal is a pulse code modulation signal;

[0016] a second filter, configured to downsample the second signal to obtain a target signal;

[0017] wherein the target compensator is arranged between the target filter and the first filter,

[0018] Alternatively, the target compensator is disposed between the first filter and the second filter.

[0019] For the above-mentioned digital decimation filter, preferably, when the target compensator is arranged between the first filter and the second filter, the delay value of the target filter is related to the decimation rate of the first filter.

[0020] For the above-mentioned digital decimation filter, preferably, the delay value of the target filter is related to the decimation rate of the first filter, including: the delay value of the third filter is: the product of the decimation rate of the first filter and the differential delay.

[0021] The digital decimation filter, preferably, the downsampling module further includes:

[0022] A first compensator, wherein the first compensator is arranged between the first filter and the second filter, and the first compensator is used to perform attenuation compensation on the second signal to obtain a new second signal, and transmit the new second signal to the second filter so that the second filter downsamples the new second signal to obtain a target signal.

[0023] A signal processing method, comprising:

[0024] Using an upsampling module in a digital decimation filter, upsampling an initial signal according to a target frequency to obtain a first signal, wherein the initial signal is a pulse density modulated signal; and the signal frequency of the initial signal is any one of a plurality of input frequencies;

[0025] The downsampling module in the digital decimation filter is used to downsample at least the first signal to obtain a target signal, wherein the target signal is a pulse code modulation signal, and the signal frequency of the target signal is less than the signal frequency of the initial signal.

[0026] The above method, preferably, before downsampling the first signal at least, the method further comprises:

[0027] The first signal is filtered using a target filter in the digital decimation filter so that the image signal is filtered out of the filtered first signal, and the filtered first signal is output to the downsampling module.

[0028] An electronic device, comprising: a processor and a digital decimation filter, wherein the digital decimation filter comprises:

[0029] an upsampling module, configured to perform upsampling processing on an initial signal provided by the processor according to a target frequency to obtain a first signal, wherein the initial signal is a pulse density modulated signal; and the signal frequency of the initial signal is any frequency among a plurality of input frequencies;

[0030] The downsampling module is used to perform downsampling processing on at least the first signal to obtain a target signal, wherein the target signal is a pulse code modulation signal, and the signal frequency of the target signal is lower than the signal frequency of the initial signal. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0032] Figure 1 A schematic diagram of the structure of a digital decimation filter provided in an embodiment of the present application;

[0033] Figure 2 Another structural schematic diagram of a digital decimation filter provided in an embodiment of the present application;

[0034] Figure 3 This is an example diagram of a digital extraction path in an embodiment of the present application;

[0035] Figure 4 Another structural schematic diagram of a digital decimation filter provided in an embodiment of the present application;

[0036] Figure 5 Another structural schematic diagram of a digital decimation filter provided in an embodiment of the present application;

[0037] Figure 6 This is an example diagram of filtering out image signals in an embodiment of the present application;

[0038] Figure 7 This is a signal processing schematic diagram of the upsampling module in an embodiment of the present application;

[0039] Figure 8 Another structural schematic diagram of a digital decimation filter provided in an embodiment of the present application;

[0040] Fig. 9 Another structural schematic diagram of a digital decimation filter provided in an embodiment of the present application;

[0041] Fig.10 Another structural schematic diagram of a digital decimation filter provided in an embodiment of the present application;

[0042] Fig.11 Another structural schematic diagram of a digital decimation filter provided in an embodiment of the present application;

[0043] Fig.12 A flowchart of a signal processing method provided in an embodiment of the present application;

[0044] Fig.13 This is a schematic diagram of downsampling different DMICs to Fout at 24.576Mhz in an embodiment of the present application;

[0045] Fig.14 This is a schematic diagram of the structure of the digital decimation filter in the embodiment of the present application;

[0046] Fig.15 This is a schematic diagram of the structure of CIC applied to the interpolation filter in an embodiment of the present application;

[0047] Fig.16 Schematic diagram of mirroring caused by interpolation;

[0048] Fig.17 It is a schematic diagram of the amplitude-frequency response of the signal after passing through the CIC filter;

[0049] Fig.18 Schematic diagram for removing the mirror image;

[0050] Fig.19This is a schematic diagram of different DMIC upsampling to 6144khz and downsampling to Fout at 24.576Mhz in the embodiment of the present application;

[0051] Fig. 20 A schematic diagram of the reduction comparison of the downsampling path in the embodiment of the present application;

[0052] Fig.21 Schematic diagram of a CIC filter with a delay of P in an embodiment of the present application;

[0053] Fig. 22 A schematic diagram showing a comparison of different delays P of a CIC filter in an embodiment of the present application;

[0054] Fig.23 Schematic diagram of the compensation implementation of the CIC interpolation filter in the embodiment of the present application. DETAILED DESCRIPTION

[0055] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0056] refer to Figure 1 As shown, it is a structural schematic diagram of a digital extraction filter provided by an embodiment of the present application. The digital extraction filter can be deployed in an analog-to-digital converter ADC, and is mainly used to convert a pulse density modulation signal into a pulse code modulation signal. The analog-to-digital converter can be deployed in an electronic device that needs to perform signal processing, such as a mobile phone, a tablet computer or a computer. The technical solution of this embodiment is mainly used to reduce the implementation complexity of the digital extraction filter.

[0057] Specifically, the digital decimation filter in this embodiment may include an upsampling module 1 and a downsampling module 2, wherein:

[0058] The upsampling module 1 is used to perform upsampling processing on the initial signal according to the target frequency to obtain a first signal.

[0059] The initial signal is a pulse density modulation signal PDM, and the signal frequency of the initial signal is any frequency of a plurality of input frequencies. For example, the signal frequency of the initial signal may be: 768KHz, 1024KHz, 1536KHz, 2048KHz, 3072KHz or 6144KHz.

[0060] Specifically, the upsampling module 1 may perform interpolation processing on the initial signal according to the target frequency to obtain an upsampled first signal, wherein the signal frequency of the first signal is the target frequency, and the target frequency is greater than the signal frequency of the initial signal.

[0061] In other implementations, the upsampling module 1 may also process the initial signal according to the target frequency in other ways to obtain the first signal.

[0062] In one implementation, the target frequency may be the least common multiple of the multiple input frequencies, or the target frequency may be an integer multiple of the least common multiple of the multiple input frequencies.

[0063] The input frequency here is the signal frequency supported by the digital decimation filter.

[0064] The downsampling module 2 is used to perform downsampling processing on at least the first signal to obtain a target signal.

[0065] The target signal is a pulse code modulation signal PCM, and the signal frequency of the target signal is lower than the signal frequency of the initial signal.

[0066] It should be noted that the signal frequency of the target signal may be multiple, such as 16KHz, 24KHz, 32KHz, 48KHz, 96KHz, 192KHz, etc. Correspondingly, the number of digital extraction paths deployed in the downsampling module 2 is related to the type of signal frequency of the target signal. In a specific implementation, the downsampling module 2 can implement downsampling processing of the first signal through at least one filter to obtain the target signal. Alternatively, the downsampling module 2 can also implement downsampling processing of the first signal through other structures to obtain the target signal.

[0067] In one implementation, the downsampling module 2 may include the following structure: Figure 2 As shown in:

[0068] The first filter 21 is used to extract the first signal at least to obtain the second signal. The second signal is a pulse code modulation signal. For example, the first filter 21 extracts the first signal according to the corresponding extraction rate so that the first signal is downsampled and the audio coding format is converted, thereby obtaining the second signal of the pulse code modulation signal.

[0069] The second filter 22 is used to downsample the second signal to obtain a target signal. The second filter 22 performs signal extraction on the second signal again according to a corresponding extraction rate to achieve downsampling to obtain a target signal.

[0070] Specifically, the first filter 21 and the second filter 22 can be combined with the register and the operation unit in the digital extraction filter to form a plurality of digital extraction paths, and the number of the digital extraction paths is consistent with the type of the signal frequency of the target signal. Figure 3 As shown in , according to the type of signal frequency of the target signal, the first filter 21, the second filter 22, the register and the operation unit in the digital extraction filter are deployed into 6 digital extraction paths, and one or more registers and operation units can be reused between each digital extraction path. For different digital extraction paths, the filtering parameters of the first filter 21 and the second filter 22, such as the extraction rate, etc., can be different or the same. Based on this, after the upsampling module 1 outputs the first signal, according to the signal frequency of the target signal, the digital extraction path of the corresponding signal frequency is selected, and the first signal is graded (twice) through the first filter 21, the second filter 22, the register and the operation unit on the digital extraction path to extract the signal to obtain the target signal.

[0071] In addition, the downsampling module 2 may also include the following structure: Figure 4 As shown in:

[0072] The first compensator 23 is arranged between the first filter 21 and the second filter 22. The first compensator 23 is used to perform attenuation compensation on the second signal obtained by the first filter 21 to obtain a new second signal, and transmit the new second signal to the second filter 22 so that the second filter 22 downsamples the new second signal to obtain the target signal.

[0073] After the first filter 21 extracts the signal, in order to avoid excessive passband attenuation, the first compensator 23 first compensates the passband attenuation of the second signal, and then the second filter 22 downsamples it, thereby obtaining the required target signal.

[0074] It can be seen from the above technical solution that in a digital decimation filter provided by an embodiment of the present application, an upsampling module is deployed in the digital decimation filter, so that the upsampling module is first used to upsample a pulse density modulated signal of any frequency to the same higher target frequency, and then the downsampling module is used to perform downsampling processing to convert the signal into a pulse code modulated signal with a lower frequency. Therefore, in the downsampling module, it is only necessary to deploy a corresponding number of digital extraction paths according to the relationship between a target frequency and each frequency of the pulse code modulated signal. Regardless of the frequency of the pulse density modulated signal, it is not necessary to deploy too many digital extraction paths to realize the conversion of the pulse density modulated signal to the pulse code modulated signal. In this way, there are fewer circuit paths and a smaller circuit area, thereby reducing the implementation complexity of the digital decimation filter and reducing the implementation cost.

[0075] In one implementation, the digital decimation filter in this embodiment may also include the following structure: Figure 5 As shown in:

[0076] The target filter 3 is used to filter the first signal so that the image signal is filtered out of the filtered first signal, and output the filtered first signal to the downsampling module 2.

[0077] When the upsampling module 1 performs upsampling processing on the initial signal, image noise, i.e., image signal, will be generated due to interpolation. Figure 6 In order to filter out this part of the image signal, a target filter 3 can be deployed between the up-sampling module 1 and the down-sampling module 2, and the target filter 3 can filter out these image signals.

[0078] Specifically, the target filter 3 may be an interpolation filter to filter out the image signal.

[0079] Based on the above implementation, the delay value of the target filter 3 is greater than the interpolation rate, which can increase the stopband attenuation of the target filter 3 in the process of realizing low-pass filtering. The delay value here represents the number of delayed sampling points in the target filter 3, which can be represented by P. The interpolation rate refers to the interpolation rate at which the upsampling module 1 interpolates the initial signal according to the target frequency, which can be represented by D.

[0080] For example, Figure 7 As shown in , after the initial signal enters the upsampling module 1, the upsampling module 1 interpolates the initial signal according to the target frequency based on the interpolation rate D to obtain a first signal, which can be represented by x(n). The subsequent target filter 3 delays based on P, integrates the delayed signal with the original first signal, and performs integration processing to obtain a filtered first signal, which can be represented by y(n).

[0081] Based on the above implementation, the digital decimation filter in this embodiment may also include the following structure, such as Figure 8 As shown in:

[0082] The target compensator 4 is disposed after the target filter 3 , and is used to compensate for the passband attenuation of the filtered first signal output by the target filter 3 .

[0083] In order to filter out the image signal, the target filter 3 may cause a higher passband attenuation, especially when the delay value of the target filter 3 is greater than the interpolation rate, which will introduce a larger passband attenuation. In view of this, in this embodiment, a target compensator 4 is deployed in the digital extraction filter to compensate for this part of the passband attenuation.

[0084] In one implementation, Figure 2 The target compensator 4 is deployed in the structure shown, and the corresponding digital decimation filter can be as follows Fig. 9 As shown, the target compensator 4 can be arranged between the target filter 3 and the first filter 21 . After the target compensator 4 compensates for the passband attenuation of the filtered first signal obtained by the target filter 3 , the filtered first signal is output to the first filter 21 .

[0085] In another implementation, based on Figure 2 The target compensator 4 is deployed in the structure shown, and the corresponding digital decimation filter can be as follows Fig.10 As shown, the target compensator 4 can be arranged between the first filter 21 and the second filter 22. After the target compensator 4 compensates for the passband attenuation of the second signal obtained by the first filter 21, the second signal is output to the second filter 22. This can also reduce the signal processing amount in the passband attenuation compensation.

[0086] In another implementation, based on Figure 4 In the structure shown in FIG. 1 , the target compensator 4 can be arranged between the first filter 21 and the second filter 22 and after the first compensator 23, as shown in FIG. Fig.11 As shown in, after the first compensator 23 compensates for the passband attenuation of the second signal, the target compensator 4 again compensates for the passband attenuation of the new second signal obtained by the first compensator 23 to compensate for the passband attenuation caused by the target filter 3. After that, the target compensator 4 outputs the new second signal to the second filter 22, which can also reduce the signal processing amount in the passband attenuation compensation.

[0087] Based on the above implementation, based on Fig.10 or Fig.11 In the structure shown, when the target compensator is set between the first filter 21 and the second filter 22, the delay value of the target filter 3 is related to the sampling rate of the first filter 21.

[0088] The decimation rate of the first filter 21 can be represented by R.

[0089] Specifically, the delay value of the target filter 3 is: the product of the decimation rate R of the first filter 21 and the differential delay M. The differential delay can be represented by M, and M can be a positive integer, for example, M can be a value such as 1 or 2. The target filter 3 takes an integer multiple of the decimation rate of the first filter 21 as the delay value to filter out the image signal in the first signal, thereby increasing the stopband attenuation of the target filter 3 in the process of realizing low-pass filtering.

[0090] refer to Fig.12 , is a flow chart of a signal processing method provided in an embodiment of the present application, which can be Figures 1 to 11 The implementation method of the digital decimation filter shown in is to perform signal conversion. Specifically, the method in this embodiment may include the following processing flow:

[0091] Step 1201: Utilize the upsampling module in the digital decimation filter to upsample the initial signal according to the target frequency to obtain a first signal.

[0092] The initial signal is a pulse density modulation signal; the signal frequency of the initial signal is any frequency among multiple input frequencies.

[0093] Step 1202: Use a downsampling module in a digital decimation filter to downsample at least the first signal to obtain a target signal.

[0094] The target signal is a pulse code modulation signal, and the signal frequency of the target signal is less than the signal frequency of the initial signal.

[0095] It can be seen from the above technical solution that in a signal processing method provided by an embodiment of the present application, an upsampling module is deployed in a digital decimation filter, so that the pulse density modulation signal of any frequency is first upsampled to the same higher target frequency by using the upsampling module, and then the downsampling module performs downsampling processing to convert the signal into a pulse code modulation signal with a lower frequency. Therefore, in the downsampling module, it is only necessary to deploy a corresponding number of digital extraction paths according to the relationship between a target frequency and each frequency of the pulse code modulation signal. Regardless of the frequency of the pulse density modulation signal, it is not necessary to deploy too many digital extraction paths to realize the conversion of the pulse density modulation signal to the pulse code modulation signal. In this way, there are fewer circuit paths and a smaller circuit area, thereby reducing the implementation complexity of the digital decimation filter and reducing the implementation cost.

[0096] In one implementation, in step 1202, before using the downsampling module to downsample at least the first signal, the first signal can also be filtered using the target filter in the digital extraction filter so that the image signal is filtered out of the filtered first signal, and the filtered first signal is output to the downsampling module.

[0097] Among them, the delay value of the target filter is greater than the interpolation rate; the delay value represents the number of delayed sampling points in the target filter; the interpolation rate is: the interpolation rate at which the upsampling module interpolates the initial signal according to the target frequency.

[0098] In one implementation, in the method of this embodiment, the target compensator in the digital decimation filter may be used to compensate for the passband attenuation of the filtered first signal.

[0099] In one implementation, the downsampling module in the digital extraction filter first uses a first filter to extract at least the first signal to obtain a second signal, where the second signal is a pulse code modulation signal; then, the second signal is downsampled using a second filter to obtain a target signal; wherein the target compensator is arranged between the target filter and the first filter, or the target compensator is arranged between the first filter and the second filter.

[0100] Wherein, in the case where the target compensator is arranged between the first filter and the second filter, the delay value of the target filter is related to the decimation rate of the first filter. For example, the delay value of the target filter is related to the decimation rate of the first filter, including: the delay value of the third filter is: the product of the decimation rate of the first filter and the differential delay.

[0101] Furthermore, there may be a first compensator in the downsampling module in the digital extraction filter, and the first compensator is arranged between the first filter and the second filter. Based on this, in this embodiment, the first compensator can be used to perform attenuation compensation on the second signal to obtain a new second signal, and the new second signal is transmitted to the second filter so that the second filter downsamples the new second signal to obtain the target signal.

[0102] The embodiment of the present application also provides an electronic device, such as a mobile phone, a tablet computer or a computer. The electronic device may include: a processor and a digital decimation filter, and the digital decimation filter may be a component in an analog-to-digital converter. The digital decimation filter may be as follows: Figures 1 to 11 As shown in , it specifically includes the following structures:

[0103] an upsampling module, configured to perform upsampling processing on an initial signal provided by the processor according to a target frequency to obtain a first signal, wherein the initial signal is a pulse density modulated signal; and the signal frequency of the initial signal is any frequency among a plurality of input frequencies;

[0104] The downsampling module is used to perform downsampling processing on at least the first signal to obtain a target signal, wherein the target signal is a pulse code modulation signal, and the signal frequency of the target signal is lower than the signal frequency of the initial signal.

[0105] Taking the digital extraction filter in the ADC as an example, the technical solution of the present application is described in detail below:

[0106] First of all, the rapid development of the field of digital signal processing has made people's demand for high-performance ADCs as analog and digital interfaces more urgent, and Sigma-Delta ADCs have been widely used in high-precision analog-to-digital conversion fields such as digital audio and data acquisition due to their unique sampling mechanism and noise shaping method. At present, a fully functional Sigma-Delta ADC mainly includes modules such as anti-aliasing filters, pre-programmable amplifiers, Sigma-Delta modulators, and digital decimation filters. This application mainly proposes a solution for the implementation of digital decimation filters. The output signal of a micro-electromechanical system (MEMS) microphone is converted from a high-sampling rate PDM to a low-sampling rate PCM signal. In the process of downsampling, aliasing noise will inevitably be generated, and a reasonable digital decimation filter needs to be designed to obtain a PCM signal with a higher signal-to-noise ratio.

[0107] The key points of this application are as follows:

[0108] 1. For the PDM signals of different digital microphone clocks DMIC (Digital Microphone), an upsampling module is added before the digital extraction filter module to uniformly upsample the PDM signals of different digital microphone clocks DMIC to the same high sampling rate. The same digital extraction filter is subsequently used to convert the high sampling rate PDM signal into a low sampling rate PCM signal.

[0109] 2. Considering the system as a whole, flexibly select the delay value of the CIC interpolation filter (i.e., the target filter 3 in the above text) of the upsampling module, i.e., the P value (not equivalent to the interpolation rate D of the CIC). On the premise that the passband ripple meets the performance requirements, select a larger P value to increase the stopband attenuation and improve the system performance. In addition, in the present application, the compensation filter of the CIC interpolation filter (i.e., the target compensator 4 in the above text) is placed after the downsampling module, and the delay P value of the CIC interpolation filter is selected as an integer multiple of the decimation rate R of the downsampling CIC filter (i.e., the first filter 21 in the above text), P = R*M, M is the differential delay, and M is a positive integer.

[0110] The technical solution of this application is described in detail below:

[0111] First, MCLK (Master Clock) is the main clock frequency, which is used to synchronize the clock signals of various modules inside the audio decoding chip. Through the frequency division operation, DMIC (Digital MIC) clocks of different frequencies can be obtained. Under the DMIC clock, the digital microphone outputs a high sampling rate PDM signal. Under different DMIC frequencies, the digital extraction filter outputs different low-frequency Nyquist (Nyquist, represented by Fout in this application) frequencies according to the application scenario.

[0112] For example, the main clock frequency is 24.576MHz, and there are 6 types of digital microphones DMIC, namely 768KHz, 1024KHz, 1536KHz, 2048KHz, 3072KHz, and 6144KHz. Different Nyquist frequencies Fout are output at different DMIC frequencies, as shown in Table 1:

[0113] Table 1 Different DMIC downsampling to Fout at 24.576Mhz

[0114]

[0115]

[0116] If different DMIC frequency combinations with different Fout require an independent digital extraction path, there are 20 digital extraction paths in total. Fig.13 as shown in . Fig.13 In the example, downsampling is the part of the digital decimation filter. The general block diagram is as follows: Fig.14 As shown in , the downsampling part includes: CIC filter, CIC compensator, and FIR filter.

[0117] Among them, CIC filter is the abbreviation of Cascaded Integrator-Comb filter, which is a linear phase FIR filter. CIC digital filter is an efficient implementation method of narrowband low-pass filter, which saves area and power consumption and is used in the fields of extraction and interpolation.

[0118] The working diagram of CIC for interpolation (i.e. upsampling) is as follows: Fig.15 As shown, the interpolation rate is D, which passes through a CIC interpolation filter to eliminate the image caused by the interpolation.

[0119] Where x(n) is the signal after being processed by the CIC interpolation filter, D is the interpolation rate, comb represents the comb filter, and z -D represents a delay of D sampling points, x(n) delayed by D sampling points is x(nD), integrator represents an integrator, z -1It means delaying by 1 sampling point, y(n) delayed by 1 sampling point is y(n-1).

[0120] In summary, the output of the CIC interpolation filter is shown in formula (1):

[0121] y(n)=x(n)-x(nD)+y(n-1) (1)

[0122] Fig.16 The figure shows the spectrum of a signal after multiple interpolation. The red part is the image noise generated by the interpolation. After the rate is increased, a CIC filter is needed to filter out the image. Fig.17 As shown in the figure, it is a schematic diagram of the amplitude-frequency response of the signal after passing through the CIC difference filter. Fig.18 Schematic diagram of the signal after the CIC interpolation filter removes the image.

[0123] The technical solution of the present application proposes to upsample all DMIC frequencies to the same high sampling rate, i.e., 6144KHz, and the subsequent digital extraction paths are the same, so different Fout frequencies are obtained, such as Fig.19 As shown in the figure, 20 digital extraction paths can be reduced to 6 digital extraction paths, which is nearly 3.3 times more optimized. Fig. 20 As shown, it is a comparison diagram of the reduction of the downsampling path.

[0124] The specific implementation steps are as follows:

[0125] The first step is to determine the upsampling frequency, find the lowest common multiple of all DMICs, and get the minimum upsampling frequency.

[0126] The digital microphone DMIC has 6 frequencies, namely 768KHz, 1024KHz, 1536KHz, 2048KHz, 3072KHz, and 6144KHz. The lowest common multiple is 6144KHz, and the upsampling frequency is determined to be 6144KHz.

[0127] In the second step, a faster clock (6144KHz clock) is used for sampling, and the interpolation is a repetition number scheme, and a CIC difference filter is used to eliminate the image.

[0128] This application proposes that, considering the overall system, the CIC filter of the upsampling module modifies the delay value of the CIC difference filter to P, where P is greater than the interpolation rate D. Specifically, the principle of P value selection is: under the premise of satisfying the passband ripple performance of the system extraction filter, select a P value with a larger stopband attenuation. Fig.21 , which is a schematic diagram of a CIC interpolation filter with a delay of P.

[0129] Among them, the delay value P of the CIC interpolation filter is different, resulting in different stopband attenuation. For example, when the interpolation rate D is 8, the stopband attenuation is different when the CIC interpolation delay value P is 8, 32, and 96 respectively. Fig. 22 As shown, it is a schematic diagram for comparing different delay values ​​P of the CIC filter.

[0130] Fig. 22 In the figure, the delay value P of the CIC interpolation filter is 96, which results in more stopband attenuation (blue curve), and a larger stopband attenuation is obtained at the expense of a larger passband attenuation. For example, the passband attenuation of the curve with P of 96 is larger (partially enlarged figure). The passband attenuation problem can be solved by weighing the passband attenuation and the stopband attenuation, that is, selecting a suitable delay P, or using a compensation filter to compensate for the passband attenuation, thereby obtaining a smaller passband attenuation and a larger stopband attenuation.

[0131] The system function H(z) of the N-stage cascaded digital decimation filter is shown in formula (2):

[0132] H(z)=H1(z)*H1(z)*H2(z)...H N (z) (2)

[0133] For example, the total stopband ripple of the digital decimation filter is δ s , the stopband ripples of the first, second, and Nth stages are δ s1 , δ s2 , δ sN , due to the series structure, the relationship between the total stopband attenuation of the digital decimation filter and each level is shown in formula (3):

[0134] δ s =δ s1 *δ s2 *…δ sN (3)

[0135] The stopband attenuation As is shown in formula (4):

[0136] A s =20*log 10 δ s (4)

[0137] When the stopband attenuation of a certain filter level is A s Increase (i.e. stop band ripple δ sn becomes smaller), the total stopband attenuation A s Increase.

[0138] In summary, the delay P value of the CIC interpolation filter corresponding to the upsampling module is flexibly selected. Under the premise that the passband ripple meets the performance requirements, the stopband attenuation A of the Nth stage is increased. sn , the total stopband attenuation A of the multi-stage cascade filters Increase, or total stopband attenuation A s Keep unchanged and increase the stopband attenuation A of the CIC interpolation filter sn , the stopband attenuation of the subsequent cascade filter can be appropriately relaxed, and the cascade filter coefficients can be reduced, thereby reducing the delay and calculation amount.

[0139] The technical solution of this application proposes that in order to obtain a larger stopband attenuation, a larger delay P value of the CIC interpolation filter is selected, which introduces the problem that the passband attenuation becomes larger, and a compensation filter is added to compensate for the passband attenuation of the CIC interpolation filter. In order to reduce the computational complexity, the compensation filter of the CIC interpolation is placed after downsampling, such as Fig.23 As shown, the selection of the delay P value of the CIC interpolation filter needs to take into account the post-CIC compensation. Specifically, the compensation filter (i.e., CIC compensation 1) uses an interpolated second order polynomial (ISOP) filter, and its system function P(z) is shown in formula (5):

[0140]

[0141] Where c is the coefficient. Fig.23 The first downsampling in is the first filter 21, Fig.23 The CIC compensation 2 in the downsampling module is the first compensator 23 corresponding to the first downsampling (ie, the first filter 21), Fig.23 The second downsampling in is the second filter 22.

[0142] Generally, the interpolation factor I is equal to the downsampled CIC filter decimation rate R, and M is 1. The system function P'(z) of the compensation filter can be simplified as shown in formula (6):

[0143]

[0144] In the technical solution of the present application, the compensation filter of the CIC interpolation filter is placed after the downsampling, and the delay P value of the CIC interpolation filter is selected as a multiple of the decimation rate R of the downsampled CIC filter, where P is R*M.

[0145] The compensation filter G(z) of the post-CIC interpolation filter is shown in formula (7):

[0146]

[0147] In summary, the third step is to sample the universal digital decimation filter (i.e. Fig.23 The up-sampling frequency PDM signal is converted into a low-frequency PCM signal by downsampling and compensation in the above method. This can be achieved in the following ways:

[0148] 1. The data enable signal DE (data enable) is used to selectively process or ignore certain sampling points, thereby directly downsampling the PDM signal;

[0149] 2. Using the decimation rate R of the CIC filter, the PDM signal is extracted using the CIC filter to achieve downsampling, and then the passband attenuation is compensated by the CIC compensator;

[0150] 3. Downsample through an FIR filter such as a half-band filter to obtain a low-frequency PCM signal.

[0151] In summary, this application proposes a new PDM to PCM solution. The advantages are as follows:

[0152] 1. Compared with the traditional method (i.e. different microphone clocks use different extraction schemes), the technical solution of this application can simplify the number of extraction schemes, thereby reducing circuit paths and parameter storage. The hardware implementation is simple, saving chip area and power consumption;

[0153] 2. Avoid frequent clock switching in hardware circuits;

[0154] 3. Flexibly select the delay P value of the CIC interpolation filter of the upsampling module. On the premise that the passband ripple meets the performance requirements, increase the stopband attenuation, increase the total stopband attenuation of the multi-stage cascaded filter, or keep the total stopband attenuation unchanged, increase the stopband attenuation of the CIC interpolation filter, and appropriately relax the stopband attenuation of the subsequent cascade filter. Reduce the cascade filter coefficient, thereby reducing the delay and calculation amount.

[0155] 4. The technical solution of the present application can be extended to a digital extraction path for converting a PDM audio signal into a PCM audio signal of multiple digital microphone clocks DMIC of other MCLK.

[0156] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0157] As for the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method part.

[0158] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0159] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0160] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A digital decimation filter, comprising: An upsampling module, configured to perform upsampling processing on an initial signal according to a target frequency to obtain a first signal, wherein the initial signal is a pulse density modulation signal; The signal frequency of the initial signal is any frequency among a plurality of input frequencies; The downsampling module is used to perform downsampling processing on at least the first signal to obtain a target signal, wherein the target signal is a pulse code modulation signal, and the signal frequency of the target signal is lower than the signal frequency of the initial signal.

2. The digital decimation filter according to claim 1, further comprising: The target filter is used to filter the first signal so that the image signal is filtered out of the filtered first signal, and output the filtered first signal to the downsampling module.

3. The digital decimation filter according to claim 2, wherein the delay value of the target filter is greater than the interpolation rate; in, The delay value represents the number of delayed sampling points in the target filter; the interpolation rate is: the interpolation rate at which the upsampling module interpolates the initial signal according to the target frequency.

4. The digital decimation filter according to claim 2, further comprising: Target compensator; the target compensator is used to compensate for the passband attenuation of the filtered first signal.

5. The digital decimation filter according to claim 4, wherein the downsampling module comprises: a first filter, configured to extract at least the first signal to obtain a second signal, wherein the second signal is a pulse code modulation signal; a second filter, configured to downsample the second signal to obtain a target signal; The target compensator is arranged between the target filter and the first filter, or the target compensator is arranged between the first filter and the second filter. 6 . The digital decimation filter according to claim 5 , wherein when the target compensator is arranged between the first filter and the second filter, the delay value of the target filter is related to the decimation rate of the first filter.

7. The digital decimation filter according to claim 6, wherein the delay value of the target filter is related to the decimation rate of the first filter, comprising: The delay value of the third filter is: the product of the sampling rate of the first filter and the differential delay.

8. The digital decimation filter according to claim 5, wherein the downsampling module further comprises: A first compensator, wherein the first compensator is arranged between the first filter and the second filter, and the first compensator is used to perform attenuation compensation on the second signal to obtain a new second signal, and transmit the new second signal to the second filter so that the second filter downsamples the new second signal to obtain a target signal.

9. A signal processing method, comprising: Using an upsampling module in a digital decimation filter, upsampling an initial signal according to a target frequency to obtain a first signal, wherein the initial signal is a pulse density modulated signal; and the signal frequency of the initial signal is any one of a plurality of input frequencies; The downsampling module in the digital decimation filter is used to downsample at least the first signal to obtain a target signal, wherein the target signal is a pulse code modulation signal, and the signal frequency of the target signal is less than the signal frequency of the initial signal.

10. An electronic device comprising: A processor and a digital decimation filter, wherein the digital decimation filter comprises: an upsampling module, configured to perform upsampling processing on an initial signal provided by the processor according to a target frequency to obtain a first signal, wherein the initial signal is a pulse density modulated signal; and the signal frequency of the initial signal is any frequency among a plurality of input frequencies; The downsampling module is used to perform downsampling processing on at least the first signal to obtain a target signal, wherein the target signal is a pulse code modulation signal, and the signal frequency of the target signal is lower than the signal frequency of the initial signal.

Citation Information

Cited By

  • Sigma-delta ADC downsampling digital filter floating point coefficient fixed-point unit design method

    CN119727665A