Signal processing method, signal processor, device and storage medium
By performing maximum signal-to-noise ratio processing on the initial sampling signal and performing overflow processing during the FFT process, the overflow problem caused by the increase in data bit width with each level of calculation is solved, and the FFT implementation cost is reduced.
Patent Information
- Application Number
- CN202011231127.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-06
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2040-11-06
AI Technical Summary
In the fast Fourier transform (FFT) process, the data bit width increases with each level of calculation, causing overflow problems and increasing the resource occupation and implementation cost of the signal processor.
By processing the initial sampling signal to the maximum signal-to-noise ratio and performing overflow processing during the FFT process, fixed-point loss is reduced and the data bit width is avoided from continuously increasing.
It reduces the occupation of signal processor resources by data bit width during FFT implementation and reduces implementation costs.
Smart Images

Figure CN112347413B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of signal processing, and in particular to a signal processing method, a signal processor, a device and a storage medium. Background Art
[0002] Fast Fourier Transformation (FFT) is a fast algorithm for discrete Fourier transform. Applying FFT to the field of signal processing can simplify the calculation process in the signal processing process, such as reducing multiplication operations.
[0003] In the related technology, during the FFT implementation process, a fixed bit width is used for processing at each intermediate level, and a fixed scaling factor is preset at each level. Since no processing is performed in the calculation process at each intermediate level, the data bit width will increase accordingly. In order to avoid overflow, a larger data bit width needs to be set to accommodate the processed data, which will obviously increase the implementation cost of FFT. Summary of the invention
[0004] The embodiment of the present application provides a signal processing method, a signal processor, a device and a storage medium. The technical solution is as follows:
[0005] On the one hand, an embodiment of the present application provides a signal processing method, the method comprising:
[0006] Obtaining an initial sampling signal;
[0007] Performing maximum signal-to-noise ratio processing on the initial sampling signal to obtain an input signal, wherein a data bit width corresponding to the input signal after the maximum signal-to-noise ratio processing is lower than a data bit width threshold;
[0008] A fast Fourier transform operation is performed on the input signal, and overflow processing is performed during the fast Fourier transform operation to obtain an output signal, wherein the data bit width of the output signal after the overflow processing is less than the data bit width threshold.
[0009] On the other hand, an embodiment of the present application provides a signal processor, the signal processor comprising a sampling unit, a fast Fourier transform operation unit, a maximum signal-to-noise ratio processing unit, and an overflow processing unit;
[0010] The sampling unit is used to obtain an initial sampling signal;
[0011] The maximum signal-to-noise ratio processing unit is used to perform maximum signal-to-noise ratio processing on the initial sampling signal to obtain an input signal;
[0012] The fast Fourier transform operation unit and the overflow processing unit are used to process the input signal to obtain an output signal.
[0013] On the other hand, an embodiment of the present application provides a computer device, which includes a signal processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set are loaded and executed by the signal processor to implement the signal processing method described in the above aspects.
[0014] On the other hand, an embodiment of the present application provides a computer-readable storage medium, which stores at least one instruction, at least one program, a code set or an instruction set. The at least one instruction, the at least one program, the code set or the instruction set are loaded and executed by a signal processor to implement the signal processing method described in the above aspects.
[0015] On the other hand, according to one aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A signal processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the signal processing method provided in various optional implementations of the above aspects.
[0016] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:
[0017] In the FFT implementation process, by performing maximum signal-to-noise ratio processing on the initial sampling signal, reducing the fixed-point loss in the FFT process, and performing overflow processing in the FFT process, it is possible to avoid overflow of the data bit width caused by the continuous increase in data bit width with each level of calculation, thereby avoiding the continuous increase in data bit width in the FFT implementation process and occupying the processing resources of the signal processor, thereby reducing the implementation cost of FFT. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 An expanded view of a 16-point IFFT transform is shown;
[0019] Figure 2 A structural block diagram of a signal processor shown in an exemplary embodiment of the present application is shown;
[0020] Figure 3 A flowchart of a signal processing method provided by an exemplary embodiment of the present application is shown;
[0021] Figure 4 A flowchart of a signal processing method shown in another exemplary embodiment of the present application is shown;
[0022] Figure 5A flowchart of a signal processing method shown in another exemplary embodiment of the present application is shown;
[0023] Figure 6 A flow chart showing a method for overflow processing in a butterfly operation process shown in an exemplary embodiment of the present application is shown;
[0024] Figure 7 A schematic diagram of a radix operation shown in an exemplary embodiment of the present application is shown;
[0025] Figure 8 A schematic diagram of a phase rotation operation shown in an exemplary embodiment of the present application is shown;
[0026] Fig. 9 A structural block diagram of a signal processor provided by an exemplary embodiment of the present application is shown;
[0027] Fig.10 A schematic diagram of the structure of a computer device provided by an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION
[0028] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0029] The term "multiple" as used herein refers to two or more than two. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the related objects are in an "or" relationship.
[0030] FFT is a fast algorithm for discrete Fourier transform. It is obtained by improving the discrete Fourier transform algorithm based on the odd, even, imaginary, and real characteristics of discrete Fourier transform. Compared with discrete Fourier transform, FFT can save the number of operations of complex sequences and save the amount of calculation. In the field of signal processing, when using FFT to process signals, the signal can be transformed from the time domain to the frequency domain for further analysis of the characteristics of the signal in the frequency domain. Optionally, the FFT algorithm includes an FFT algorithm based on time extraction and an FFT algorithm based on frequency domain extraction. Figure 1 As shown, it shows the expansion diagram of 16-point IFFT transformation, where, taking time extraction, radix-2 as an example, X(0)~X(15) are 16 sampling signals, Represents the rotation factor. The 16 sampling signals undergo four-stage butterfly operations to obtain the output signal. Each stage of butterfly operation consists of a radix-2 operation and a phase rotation operation.
[0031] Since each level of butterfly operation requires two complex additions and one complex multiplication, if the operation data is not processed, the data bit width will increase step by step.
[0032] In view of the problem that the data bit width in the related art will increase step by step, the embodiment of the present application provides a new signal processing method, which is applied to Figure 2 In the signal processor shown in FIG. Figure 2 As shown, it shows a structural block diagram of a signal processor shown in an exemplary embodiment of the present application. The signal processor 200 includes: a sampling unit 201, a maximum signal-to-noise ratio processing unit 202, an FFT operation unit 203 and an overflow processing unit 204.
[0033] The sampling unit 201 is used to perform analog-to-digital conversion on the analog signal and sample to obtain multiple discrete digital signals. In the embodiment of the present application, the sampling unit 201 is used to obtain an initial sampling signal. Optionally, the sampling unit 201 can be an analog-to-digital converter (ADC).
[0034] The maximum signal-to-noise ratio processing unit 202 is used to perform maximum signal-to-noise ratio processing on the input signal. In this embodiment, the maximum signal-to-noise ratio processing unit 202 can receive the initial sampling signal transmitted by the sampling unit 201, and perform maximum signal-to-noise ratio processing on the initial sampling signal to obtain an input signal for performing the FFT process.
[0035] The FFT operation unit 203 is used to perform fast Fourier transform operation on multiple discrete input signals. The FFT operation unit 203 may include multiple radix operators (base operators) and phase rotation units.
[0036] The overflow processing unit 204 is used to perform overflow processing on the data. In the embodiment of the present application, during the FFT operation, when the signal is processed, if the data width corresponding to the signal value exceeds the data width threshold, the signal value is overflow processed, for example, the scaling factor is increased, the signal value is reduced, etc.
[0037] Optionally, the signal processor 200 further includes a buffer for storing the scaling factor of each level.
[0038] Compared with the related art, in which only FFT operation is performed on the input signal, the embodiment of the present application adds a maximum signal-to-noise ratio processing unit 202 and an overflow processing unit 204 in the signal processor 200, which can avoid the overflow of the data bit width caused by the continuous increase of the data bit width with each level of calculation, thereby avoiding the occupation of the processing resources of the signal processor by the continuous increase of the data bit width during the FFT implementation process, thereby reducing the implementation cost of the FFT.
[0039] It should be noted that the signal processing method shown in the embodiment of the present application can be applied to a signal processor (in a processor chip), and the signal processor can be a digital signal processor (DSP) or an application specific integrated circuit (ASIC), and the embodiment of the present application does not constitute a limitation to this.
[0040] Please refer to Figure 3 , which shows a flow chart of a signal processing method provided by an exemplary embodiment of the present application. The present application embodiment takes the method applied to a signal processor as an example for explanation, and the method includes:
[0041] Step 301: Acquire an initial sampling signal.
[0042] In the field of signal processing, when processing an analog signal, it is necessary to first convert the analog signal into a digital signal and then perform signal processing on it. Therefore, in one possible implementation, the signal processor performs ADC sampling on the received analog signal to obtain a digital signal, that is, an initial sampling signal.
[0043] The analog signal may be a radio frequency signal or an electromagnetic wave signal, and the embodiment of the present application does not limit the type of the analog signal.
[0044] In order to facilitate FFT calculations during FFT processing, when ADC sampling is performed on analog signals, the number of sampling points is generally an integer power of 2. For example, the number of sampling points is 16, which is 2^4, that is, 16 initial sampling signals can be obtained.
[0045] Step 302: Perform maximum signal-to-noise ratio processing on the initial sampling signal to obtain an input signal. The data bit width corresponding to the input signal after the maximum signal-to-noise ratio processing is lower than a data bit width threshold.
[0046] Among them, the initial data bit width is defined as W, and the initial data bit width is the sampling bit width corresponding to the initial sampling signal. For example, the initial data bit width (sampling bit width) is 16 bits, which means that 2 bytes of data are collected at each sampling point; the data bit width threshold is determined by the initial data bit width, and the data bit width threshold is used to determine whether the data bit width is greater than the data bit width threshold during the FFT implementation process, that is, whether an overflow occurs.
[0047] In an illustrative example, the data bit width threshold may be expressed as:
[0048] max_W=2 W-1 -1
[0049] Wherein, max_W represents the data bit width threshold, and W represents the initial data bit width.
[0050] Since the FFT fixed-point method is used to process data during the FFT implementation process, in order to avoid the loss of the FFT fixed-point method, in a possible implementation, the initial sampling signal is first processed for maximum signal-to-noise ratio to obtain an input signal for FFT.
[0051] Of course, due to the limitation of the data bit width threshold, the data bit width corresponding to the input signal after the initial sampling signal is processed with the maximum signal-to-noise ratio also needs to be ensured to be lower than the data bit width threshold to avoid overflow.
[0052] Step 303, performing a fast Fourier transform operation on the input signal, and performing overflow processing during the fast Fourier transform operation to obtain an output signal, wherein the data bit width of the output signal after the overflow processing is less than the data bit width threshold.
[0053] The overflow processing is used to process a signal whose data bit width is greater than a data bit width threshold during the fast Fourier transform operation.
[0054] During the FFT implementation process, each level of processing will lead to an increase in the data bit width. For example, complex multiplication of two signal values will obviously lead to an increase in the data bit width. Therefore, in order to avoid unlimited increase in the data bit width, during the FFT implementation process, when it is determined that the data bit width of the signal is greater than the data bit width threshold, overflow processing is performed on the signal value. This can avoid data overflow and save the implementation cost of FFT.
[0055] In the embodiment of the present application, by performing maximum signal-to-noise ratio processing on the initial sampling signal, reducing the fixed-point loss in the FFT process, and performing overflow processing in the FFT process, it is possible to avoid overflow of the data bit width caused by the continuous increase in data bit width with each level of calculation, thereby avoiding the continuous increase in data bit width during the FFT implementation process and occupying the processing resources of the signal processor, thereby reducing the implementation cost of the FFT.
[0056] Since there are multiple stages of butterfly operations in the FFT implementation process, in order to further ensure that no overflow occurs in each intermediate stage of operation, in a possible implementation, overflow processing is performed in each stage of butterfly operations to further avoid overflow.
[0057] Please refer to Figure 4 , which shows a flowchart of a signal processing method shown in another exemplary embodiment of the present application. The present application embodiment takes the method applied to a signal processor as an example for explanation, and the method includes:
[0058] Step 401: Acquire an initial sampling signal.
[0059] The implementation of this step may refer to step 301, and this embodiment will not be described in detail here.
[0060] Step 402, calculating an initial scaling factor corresponding to the input signal according to the initial real signal value, the initial imaginary signal value and the initial data bit width, where the initial data bit width is the sampling bit width corresponding to the initial sampling signal.
[0061] When representing the initial sampling signal, the initial sampling signal is represented as a complex number to participate in the signal processing operation. For example, the initial signal can be represented as: R si (n) = X si (n)+j·Y si (n), where R si (n) is the initial sampling signal, X si (n) is the real signal value corresponding to the initial sampling signal, Y si (n) is the imaginary signal value corresponding to the initial sampling signal, and j is the imaginary unit.
[0062] Optionally, the initial sampling signals (I / Q) may share the same index. For example, if the shared index is e, the initial sampling signal may be expressed as: R si (n) = I*2 e +Q*2 e .
[0063] In a possible implementation, for each data R si (n) When performing maximum signal-to-noise ratio processing, the principle is: each data R si (n) is shifted left to ensure that one of the highest bits of the input data (signal) I / Q is not 0. Correspondingly, during the processing, the initial scaling factor corresponding to the input signal is first calculated according to the initial real signal value, the initial imaginary signal value and the initial data bit width corresponding to the initial sampling signal, and then the input signal after the maximum signal-to-noise ratio processing is calculated according to the initial scaling factor and the initial sampling signal value.
[0064] In an illustrative example, the relationship between the scaling factor and the initial sampling signal can be expressed as:
[0065] S(n)=W-2-floor(log2(max(|X si (n)|,|Y si (n)|))) (1)
[0066] Among them, S(n) is the initial sampling signal R si (n) corresponds to the initial scaling factor, W is the initial data width, X si (n) is the initial real signal value, Ysi (n) is the initial imaginary signal value, floor(x) represents the floor function, that is, taking the largest integer not greater than x, max(x) represents taking the maximum value, and |x| represents taking the absolute value.
[0067] In a possible implementation manner, the initial sampling signal represented in complex form is calculated in the manner shown in formula (1), so that the initial scaling factor corresponding to the input signal can be obtained.
[0068] Since a fixed scaling factor is not used in the embodiment of the present application, a buffer for storing the scaling factor is provided, and the size of the buffer is the maximum number of FFT points supported by the signal processor.
[0069] The number of FFT points is the number corresponding to the initial sampling signal. To facilitate FFT calculation, the initial sampling signal is usually taken to be an integer power of 2, for example, 16 points.
[0070] Step 403: Calculate and obtain an input signal according to the initial sampling signal and the initial scaling factor.
[0071] In a possible implementation, after the initial scaling factor is determined, the input signal after maximum signal-to-noise ratio processing may be calculated according to the initial sampling signal and the initial scaling factor.
[0072] In an exemplary example, the relationship between the input signal, the initial scaling factor and the initial sampled signal can be expressed as:
[0073] R si ′(n)=R si (n) 2 -s(n)
[0074] Among them, R si ′(n) represents the input signal (i.e. the signal after maximum signal-to-noise ratio processing), R si (n) represents the initial sampling signal, and s(n) represents the initial scaling factor.
[0075] Step 404, perform k-level butterfly operations on the input signal, and perform overflow processing in each level of butterfly operations to obtain an output signal, where k is a positive integer and is related to the number of initial sampled signals.
[0076] The FFT operation is the superposition of various levels of butterfly operations. According to the characteristics of the FFT operation, the number of butterfly operations included in the FFT is related to the number of initial sampled signals, and is also related to the algorithm used by the FFT. Taking the time-decimated radix-2 algorithm as an example, if the number of initial sampled signals is 16 (2^4), the FFT includes 4 levels of butterfly operations. If the time-decimated radix-4 is taken as an example, the FFT includes two levels of butterfly operations (4^2).
[0077] In order to avoid overflow in each level of butterfly operation, in a possible implementation, overflow processing is performed in each level of butterfly operation to avoid continuous increase of data bit width in each level of butterfly operation.
[0078] In this embodiment, the loss of FFT fixed-point can be avoided by performing maximum signal-to-noise ratio processing on the initial sampling signal. In addition, by performing overflow processing in each level of butterfly operation in the FFT, data overflow can be avoided in the butterfly operation process, thereby reducing the continuous increase in data bit width and avoiding the need to set up a corresponding hardware structure due to the increase in data bit width, thereby reducing the implementation cost of FFT.
[0079] Depend on Figure 1 It can be seen that in each level of butterfly operation, two operation steps, radix operation and phase rotation operation, are required. Therefore, when performing overflow processing in the butterfly operation process, the overflow processing process in the two operation cases needs to be considered separately, that is, overflow processing is required after each operation.
[0080] exist Figure 4 On the basis of Figure 5 As shown, step 404 may include steps 404A to 404D.
[0081] Step 404A, performing a radix operation on the n-th stage input signal to obtain an n-th stage radix operation result, where n is a positive integer and the n-th stage input signal is an input signal of the n-th stage butterfly operation.
[0082] In the process of overflow processing of butterfly operation, it is considered that butterfly operation includes radix operation and phase rotation operation, and each operation may increase the data bit width. Therefore, after performing radix operation on the input signal, it is necessary to perform overflow processing on the radix operation result, and then perform phase rotation operation on the output signal after overflow processing; similarly, after performing phase rotation operation on the output signal, it may be necessary to perform overflow processing on the phase rotation operation result before it can be used as the input signal of the next level butterfly operation.
[0083] Since the FFT process includes k-level butterfly operations, that is, an iterative process of k butterfly operations, in a possible implementation, after obtaining the n-th level input signal, the signal processor performs a radix operation on the n-th level input signal, first obtains the n-th level radix operation result, and then performs overflow processing on the n-th level radix operation result, wherein the n-th level input signal is the input signal of the n-th level butterfly operation.
[0084] In an illustrative example, taking radix-2, 16-point FFT as an example, FFT includes 4 levels of butterfly operations. When n is 1, the first-level input signal (the first-level input signal is the input signal after the initial sampling signal is subjected to maximum signal-to-noise ratio processing or the input signal of the first-level butterfly operation) is subjected to radix operation to obtain the first-level radix operation result, and then the first-level radix operation result is subjected to overflow processing. When n is 2, the second-level input signal is the signal obtained after the first-level input signal is subjected to radix operation, overflow processing, phase rotation operation and overflow processing, and so on.
[0085] Step 404B, performing overflow processing on the n-th level radix operation result to obtain the n-th level output signal.
[0086] Unlike the related art in which the radix operation result is directly subjected to phase rotation operation, in order to avoid overflow caused by increase in data bit width during radix operation on the signal value, the embodiment of the present application first needs to perform overflow processing on the radix operation result after obtaining the radix operation result to avoid the data bit width exceeding the maximum data bit width, and then perform subsequent phase rotation operation on the radix operation result after overflow processing.
[0087] Corresponding to step 404A, during the implementation process, after the signal processor obtains the nth level radix operation result, it first performs overflow processing on the nth level radix operation result to obtain an output signal for phase rotation operation, that is, the nth level output signal.
[0088] In an illustrative example, when n is 1, a radix operation is performed on the first-level input signal, and after the first-level radix operation result is obtained, overflow processing is first performed on the first-level radix operation result, and the output signal obtained after the overflow processing is used as the first-level output signal.
[0089] Step 404C, performing a phase rotation operation on the n-th level output signal to obtain an n-th level phase rotation operation result.
[0090] During each level of butterfly operation, radix operation is performed first, and then phase rotation operation is performed. Therefore, in one possible implementation, the signal processor inputs the nth level output signal after butterfly operation and overflow processing into the phase rotation operation unit to perform phase rotation operation, first obtain the nth level phase rotation operation result, and then perform overflow processing.
[0091] Step 404D, performing overflow processing on the result of the n-th level phase rotation operation to obtain an n+1-th level input signal, wherein the input signal obtained after the overflow processing on the result of the k-th level phase rotation operation is determined as the output signal.
[0092] Similar to the radix operation processing process mentioned above, after the input signal is subjected to radix operation and overflow processing, the obtained output signal is input into the phase rotation operation. Since the phase rotation operation involves complex multiplication, it may also cause the signal data bit width to increase. Therefore, in a possible implementation manner, the phase rotation operation result needs to be overflow processed before the next stage of butterfly operation can be performed.
[0093] In the FFT process, when the signal processor obtains the result of the n-th level phase rotation operation, it first needs to perform overflow processing on it to prevent its data bit width from being greater than the data bit width threshold, and then perform subsequent butterfly operations on the overflow-processed data.
[0094] In an illustrative example, the operation process of the nth level butterfly operation includes: performing a radix operation on the nth level input signal to obtain a radix operation result, overflow processing on the radix operation result to obtain an nth level output signal, performing a phase rotation operation on the nth level output signal to obtain an nth level phase rotation operation result, overflow processing on the nth level phase rotation operation result to obtain an n+1th level input signal, and the n+1th level input signal is used to perform the n+1th level butterfly operation. The n+1th butterfly operation process is similar to the nth level butterfly operation process, and this embodiment will not be repeated here.
[0095] It should be noted that when n is equal to k, that is, when FFT performs the last (k-level) butterfly operation, the input signal obtained after radix operation-overflow processing-phase rotation operation-overflow processing is determined as the output signal of FFT.
[0096] In the present embodiment, since each stage of butterfly operation includes radix operation and phase rotation operation, and both operations may cause the data bit width to increase, that is, the data bit width may exceed the data bit width threshold, therefore, in each stage of butterfly operation, an overflow processing step is added after the radix operation and the phase rotation operation to more accurately prevent the overflow of the data bit width.
[0097] The above embodiments describe the role of overflow processing in the FFT implementation process, that is, overflow processing is required at each level of butterfly operation, and overflow processing is also required for the radix operation and phase rotation operation included in each level of butterfly operation. The following embodiments focus on describing the detailed process of overflow processing in each operation process.
[0098] Please refer to Figure 6, which shows a flowchart of a method for overflow processing in a butterfly operation process shown in an exemplary embodiment of the present application. The present application embodiment takes the method applied to a signal processor as an example for explanation. The method includes:
[0099] Step 601: Perform a radix operation on a first input signal and a second input signal to obtain a first radix operation result and a second radix operation result.
[0100] Depend on Figure 1 It can be seen that in each butterfly operation process, the input of the butterfly operation includes two signals, a first input signal and a second input signal, and the output is also two signals, namely, a first output signal and a second output signal. Therefore, in a possible implementation, when a radix operation is performed on the n-th level input signal, a radix operation is performed on the first input signal and the second input signal corresponding to the n-th level input signal. Correspondingly, after the radix operation, two radix operation results are also obtained, namely, a first radix operation result and a second radix operation result.
[0101] The process of performing radix operation on the first output signal and the second output signal may include the following steps:
[0102] 1. Obtain a first scaling factor corresponding to the first input signal and a second scaling factor corresponding to the second input signal.
[0103] In a possible implementation, during the radix operation, it is necessary to consider the scaling factor corresponding to each level of the input signal. Since the scaling factor changes dynamically and is stored in a buffer, when the radix operation is performed on the n-th level input signal, it is necessary to obtain the first scaling factor and the second scaling factor corresponding to the first input signal and the second input signal (n-th level input signal) from the buffer, respectively, for performing the radix operation.
[0104] 2. Determine the maximum value of the first scaling factor and the second scaling factor as the nth level scaling factor corresponding to the radix operation.
[0105] During the radix operation, the maximum value of the first scaling factor and the second scaling factor is used as the nth level scaling factor corresponding to the radix operation, and the radix operation is performed on the first input signal and the second input signal. That is, the maximum value of the scaling factor max_s=max(s(m), s(n)), where s(m) represents the first scaling factor, s(n) represents the second scaling factor, and max(x) represents taking the maximum value.
[0106] 3. According to the first input signal, the second input signal and the nth level scaling factor, a first radix operation result and a second radix operation result are calculated.
[0107] In a possible implementation, after the maximum scaling factor is calculated, the first radix operation result and the second radix operation result can be calculated based on the first output signal, the second output signal and the nth level scaling factor (the maximum value of the first scaling factor and the second scaling factor corresponding to the nth level input signal).
[0108] In an exemplary example, taking the first radix operation result as an example, the radix calculation formula can be expressed as:
[0109] r′ sj+1 (m) = r sj (m) 2 s(m)-max_s +r sj (n) 2 s(n)-max_s
[0110] Among them, r′ sj+1 (m) represents the result of the first radix operation, r sj (m) represents the first input signal, r sj (n) represents the second input signal, s(m) represents the first scaling factor corresponding to the first input signal, s(n) represents the second scaling factor corresponding to the second input signal, and max_s represents the maximum value of the first scaling factor and the second scaling factor.
[0111] Due to the characteristics of butterfly operation, the result of the second radix operation can be expressed as:
[0112] r′ sj+1 (n) = r sj (m) 2 s(m)-max_s -r sj (n) 2 s(n)-max_s
[0113] Among them, r′ sj+1 (n) represents the result of the second radix operation.
[0114] Step 602: perform overflow processing on the first radix operation result to obtain a first output signal.
[0115] Since two operation results, namely the first radix operation result and the second radix operation result, can be obtained after the radix operation, therefore, in the process of overflow processing of the radix operation result, it is also necessary to perform overflow processing on these two radix operation results respectively. In a possible implementation manner, the signal processor performs overflow processing on the first radix operation result to obtain a first output signal corresponding to the n-th level output signal, which is used for subsequent phase rotation operation.
[0116] The process of performing overflow processing on the first radix operation result may include the following steps:
[0117] 1. Obtain a first real signal value and a first imaginary signal value corresponding to a first radix operation result.
[0118] During the overflow processing, it is necessary to determine whether the data bit width corresponding to the radix operation result exceeds the data bit width threshold, and since the signal is represented by a complex number during the signal processing, in a possible implementation, the real signal value and the imaginary signal value in the radix operation result are obtained to subsequently determine whether the data bit width overflows, that is, the first real signal value and the first imaginary signal value corresponding to the first radix operation result are obtained.
[0119] 2. In response to the absolute value of the first real signal value being greater than or equal to the data bit width threshold, or the absolute value of the first imaginary signal value being greater than or equal to the data bit width threshold, a first output signal is calculated based on the nth level scaling factor and the first radix operation result, wherein the scaling factor corresponding to the first output signal is greater than the nth level scaling factor, and the first output signal is half of the first radix operation result.
[0120] In a possible implementation, after obtaining the first real signal value and the first imaginary signal value corresponding to the first radix operation result, the relationship between the data bit width and the data bit width threshold of the first real signal value and the first imaginary signal value is determined respectively to determine the processing method for the first radix operation result.
[0121] In an illustrative example, the formula for determining whether to perform overflow processing can be expressed as:
[0122] abs(real(r′ sj+1 (m)))≥max_Worabs(imag(r′ sj+1 (m)))≥max_W
[0123] Among them, r′ sj+1(m) represents the result of the first radix operation, max_W represents the data bit width threshold, real(x) represents taking the real part of the complex number, imag(x) represents taking the imaginary part of the complex number, and abs(x) represents taking the absolute value.
[0124] Among them, when the absolute value of the first real signal value is greater than or equal to the data bit width threshold, or the absolute value of the first imaginary signal value is greater than or equal to the data bit width threshold, in order to avoid data overflow or the situation that subsequent calculations will cause data overflow, data overflow is avoided by increasing the scaling factor and reducing the signal value.
[0125] In one possible implementation, if there is data overflow in the radix operation result, the nth level scaling factor (i.e., the maximum value of the first scaling factor and the second scaling factor) is added by 1 to obtain the scaling factor corresponding to the first output signal (i.e., the scaling factor is increased), and the first radix operation result is reduced to half of the original value (i.e., the signal value is reduced) as the first output signal.
[0126] In an exemplary example, when there is a data overflow, the processing method of the first radix operation result and the nth level scaling factor can be expressed as:
[0127] s′(m)=max_s+1,r sj+1 (m) = r′ sj+1 (m) / 2
[0128] Where s′(m) represents the scaling factor corresponding to the first output signal, max_s represents the scaling factor of the nth level, and r sj+1 (m) is the first output signal (i.e. the signal after overflow processing), r′ sj+1 (m) represents the result of the first radix operation.
[0129] 3. In response to the absolute value of the first real signal value being less than the maximum data bit width threshold, and the absolute value of the first imaginary signal value being less than the maximum data bit width threshold, the nth level scaling factor is determined as the scaling factor corresponding to the first output signal, and the first radix operation result is determined as the first output signal.
[0130] In the case where there is no overflow in the result of the first radix operation, that is, the data bit widths of the real signal value and the imaginary signal value are both smaller than the data bit width threshold, there is no need to increase the scaling factor and reduce the radix operation result. Therefore, in a possible implementation, if the absolute value of the first real signal value is smaller than the data bit width threshold, and the absolute value of the first imaginary signal value is smaller than the data bit width threshold, the nth level scaling factor can be directly determined as the scaling factor corresponding to the first output signal, and the first radix operation result can be determined as the first output signal.
[0131] In an exemplary example, when there is no overflow phenomenon in the first radix operation result, the relationship between the first output signal and the first radix operation result can be expressed as:
[0132] s′(m)=max_s,r sj+1 (m) = r′ sj+1 (m)
[0133] Wherein, s′(m) represents the scaling factor corresponding to the first output signal, max_s represents the nth level scaling factor (i.e., the maximum value of the first scaling factor and the second scaling factor), r sj+1 (m) represents the first output signal, r′ sj+1 (m) represents the result of the first radix operation.
[0134] Step 603: perform overflow processing on the second radix operation result to obtain a second output signal.
[0135] Similar to the processing of the first radix operation result in the above embodiment, after obtaining the second radix operation result, it is also necessary to perform overflow processing on the second radix operation result, and then perform phase rotation operation on the second radix operation result after the overflow processing.
[0136] The method of performing overflow processing on the second radix operation result may include the following steps:
[0137] 1. Obtain a second real signal value and a second imaginary signal value corresponding to the second radix operation result.
[0138] Similar to the overflow processing process of the first radix operation result in the above embodiment, after the overflow processing of the second radix operation result, it is also necessary to judge the relationship between the real signal value and the imaginary signal value corresponding to the second radix operation result and the data bit width threshold respectively, and the corresponding signal processor obtains the second real signal value and the second imaginary signal value corresponding to the second radix operation result.
[0139] 2. In response to the absolute value of the second real signal value being greater than or equal to the data bit width threshold, or the absolute value of the second imaginary signal value being greater than or equal to the data bit width threshold, a second output signal is calculated based on the nth level scaling factor and the second radix operation result, wherein the scaling factor corresponding to the second output signal is greater than the nth level scaling factor, and the second output signal is half of the second radix operation result.
[0140] In one possible implementation, the overflow processing method for the operation result is determined by comparing the relationship between the operation result and the data bit width threshold after each operation, that is, the overflow processing method for the second radix operation result is determined by comparing the relationship between the second real signal value and the second imaginary signal value corresponding to the second radix operation result and the data bit width threshold.
[0141] In an illustrative example, the formula for determining whether the second radix operation result is overflowed can be expressed as:
[0142] abs(real(r′ sj+1 (n)))≥max_Worabs(imag(r′ sj+1 (n)))≥max_W
[0143] Among them, r′ sj+1 (n) represents the result of the second radix operation, max_W represents the data width threshold, real(x) represents the real part of the complex number, real(r′ sj+1 (n)) represents the second real signal value corresponding to the second radix operation result, imag(x) represents the imaginary value of the complex number, imag(r′ sj+1 (n)) represents the second imaginary signal value corresponding to the second radix operation result, abs(x) represents the absolute value, abs(real(r′ sj+1 (n))) represents the absolute value of the second real signal value, abs(imag(r′ sj+1 (n))) represents the absolute value of the second imaginary part signal value.
[0144] If it is determined that the absolute value of the second real signal value corresponding to the second radix operation result is greater than or equal to the data bit width threshold, or the absolute value of the second imaginary signal value is greater than or equal to the data bit width threshold, it means that the second radix operation result has a data bit width overflow or subsequent operations will cause the data bit width overflow. Therefore, the overflow can be avoided by increasing the scaling factor and reducing the signal value.
[0145] In one possible implementation, if there is data overflow in the result of the second radix operation, the nth level scaling factor (i.e., the maximum value of the first scaling factor and the second scaling factor) is added by one to obtain the scaling factor corresponding to the second output signal (i.e., the scaling factor is increased), and the second radix operation result is reduced to half of the original value (i.e., the signal value is reduced) as the second output signal.
[0146] In an exemplary example, when the data bit width overflows, the processing method of the second radix operation result and the nth level scaling factor can be expressed as follows:
[0147] s′(n)=max_s+1,r sj+1 (m) = r′ sj+1 (n) / 2
[0148] Wherein, s′(n) represents the scaling factor corresponding to the second output signal, max_s represents the scaling factor of the nth level, and r sj+1 (m) is the second output signal (i.e., the signal obtained after overflow processing of the second radix operation result), r′ sj+1 (n) represents the result of the second radix operation.
[0149] 3. In response to the absolute value of the second real signal value being less than the data bit width threshold, and the absolute value of the second imaginary signal value being less than the data bit width threshold, the nth level scaling factor is determined as the scaling factor corresponding to the second output signal, and the second radix operation result is determined as the second output signal.
[0150] In another possible implementation, if the absolute value of the second real signal value corresponding to the second radix operation result is less than the data bit width threshold, and the absolute value of the corresponding second imaginary signal value is also less than the data bit width threshold, it indicates that there is no data bit width overflow in the second radix operation result. Therefore, the overflow processing of the second radix operation result may be omitted, that is, the second radix operation result may be directly determined as the second output signal, and the nth level scaling factor may be determined as the scaling factor of the second output signal.
[0151] In an exemplary example, when there is no data bit width overflow in the second radix operation result, the relationship between the second output signal and the second radix operation result can be expressed as:
[0152] s′(n)=max_s,r sj+1 (n) = r′ sj+1 (n)
[0153] Wherein, s′(n) represents the scaling factor corresponding to the second output signal, max_s represents the scaling factor of the nth level, and r sj+1 (n) represents the second output signal, r′ sj+1 (n) represents the result of the second radix operation.
[0154] In an illustrative example, Figure 7 As shown, it shows a schematic diagram of a radix operation shown in an exemplary embodiment of the present application. j represents the j-th level butterfly operation, where r sj (m) represents the first input signal corresponding to the j-th level input signal, r sj(n) represents the second input signal corresponding to the j-th level input signal, s(m) represents the first scaling factor corresponding to the first input signal, s(n) represents the second scaling factor corresponding to the second input signal, r sj+1 (m) represents the first output signal corresponding to the j-th level output signal, r sj+1 (n) represents the second output signal corresponding to the j-th level output signal, s′(m) represents the scaling factor corresponding to the first output signal, and s′(n) represents the scaling factor corresponding to the second output signal. sj (m), r sj (n) to r sj+1 (m), r sj+1 The process of (n) can refer to the above embodiment.
[0155] Step 604: perform a phase rotation operation on the first output signal to obtain a first phase rotation operation result.
[0156] The first output signal is a signal after the overflow processing of the first radix operation result.
[0157] There are two situations in the phase rotation operation process, one is that no complex multiplication operation is required, and the other is that complex multiplication operation is required. Among them, the multiplication operation may increase the data bit width. Therefore, overflow processing is required after the phase rotation operation unit. In addition, for the case where complex multiplication operation is not required, overflow processing may not be required or may be performed. However, the input signal after the overflow processing is the same as that before the overflow processing.
[0158] In an illustrative example, for a phase rotation unit that needs to perform a complex multiplication operation, the calculation formula of the phase rotation operation result can be expressed as:
[0159]
[0160] Among them, r′ sj+1 (m) represents the first phase rotation calculation result, r sj (m) is the first output signal (i.e., the first radix operation result after overflow processing), is the rotation factor in FFT,
[0161] Step 605: perform a phase rotation operation on the second output signal to obtain a second phase rotation operation result.
[0162] The second output signal is a signal obtained by performing overflow processing on the second radix operation result.
[0163] The calculation method for the second phase rotation operation result may refer to the first phase rotation operation result, which will not be described in detail in this embodiment.
[0164] Step 606: perform overflow processing on the first phase rotation operation result to obtain a first input signal corresponding to the (n+1)th level input signal.
[0165] Similar to the radix operation, different from the related art, in which the phase rotation operation result is directly used as the input signal of the next stage butterfly operation, in order to avoid the overflow of the data bit width, the embodiment of the present application needs to perform overflow processing on the phase rotation operation result.
[0166] In a possible implementation, after the signal processor obtains the first phase rotation operation result, it performs overflow processing on the first phase rotation operation result to obtain the first input signal of the next stage butterfly operation, that is, the first input signal in the n+1th stage input signal.
[0167] In a possible implementation manner, the process of performing overflow processing on the first phase rotation operation result may include the following steps:
[0168] 1. Obtain a third real signal value and a third imaginary signal value corresponding to the first phase rotation operation result.
[0169] Similar to the overflow processing of the radix operation result, when the phase rotation operation result is overflow processed, it is also necessary to compare the relationship between the data bit width corresponding to the real signal value and the imaginary signal value in the phase rotation operation result and the data bit width threshold. Therefore, in one possible implementation, after the signal processor obtains the first phase rotation operation result, it obtains the third real signal value and the third imaginary signal value corresponding to the first phase rotation operation result to determine whether overflow processing is performed subsequently.
[0170] 2. In response to the absolute value of the third real signal value being greater than or equal to the data bit width threshold, or the absolute value of the third imaginary signal value being greater than or equal to the data bit width threshold, the first input signal corresponding to the (n+1)th level input signal and the first scaling factor corresponding to the first input signal are determined according to the scaling factor corresponding to the first output signal and the first phase rotation operation result, the first input signal is half of the first phase rotation operation result, and the first scaling factor is greater than the scaling factor corresponding to the first output signal.
[0171] The formula for determining whether there is overflow can refer to the above embodiment, and this embodiment will not be described in detail here.
[0172] In the case of data bit width overflow, that is, the absolute value of the third real signal value is greater than or equal to the data bit width threshold, or the absolute value of the third imaginary signal value is greater than or equal to the data bit width threshold, it is necessary to increase the scaling factor and reduce the signal value (that is, perform overflow processing on the phase rotation operation result).
[0173] In an exemplary example, the processing method of the first phase rotation operation result and the scaling factor can be expressed as follows:
[0174] s′(m)=s(m)+1,r sj+1 (m) = r′ sj+1 (m) / 2
[0175] Wherein, s′(m) represents the scaling factor after overflow processing (scaling factor of the first input signal), s(m) represents the scaling factor corresponding to the first output signal, and r sj+1 (m) represents the first phase rotation operation result after overflow processing (i.e., the first input signal), r′ sj+1 (m) represents the first phase rotation calculation result.
[0176] 3. In response to the absolute value of the third real signal value being less than the data bit width threshold, and the absolute value of the third imaginary signal value being less than the data bit width threshold, the first phase rotation operation result is determined as the first input signal corresponding to the n+1th level input signal, and the scaling factor corresponding to the first output signal is determined as the first scaling factor corresponding to the first input signal.
[0177] For the case where the data bit width of the first phase rotation operation result does not overflow, that is, the data bit widths of the third real signal value and the third imaginary signal value corresponding to the first phase rotation operation result are both smaller than the data bit width threshold, there is no need to increase the scaling factor and reduce the signal value. In a possible implementation, the scaling factor corresponding to the first output signal can be directly determined as the scaling factor of the first input signal, and the first phase rotation operation result can be determined as the first input signal corresponding to the n+1th level input signal.
[0178] In an exemplary example, when there is no data overflow in the first phase rotation operation result, the first input signal and its corresponding scaling factor can be expressed as:
[0179] s′(m)=s(m),r sj+1 (m) = r′ sj+1 (m)
[0180] Wherein, s′(m) represents the scaling factor corresponding to the first input signal (i.e., the scaling factor after overflow processing), s(m) represents the scaling factor corresponding to the first output signal (i.e., the scaling factor before phase rotation operation), r sj+1(m) represents the first input signal (i.e., the input signal after overflow processing), r′ sj+1 (m) represents the first output signal (ie, the signal before the phase rotation operation).
[0181] Step 607: perform overflow processing on the result of the second phase rotation operation to obtain a second input signal corresponding to the n+1th level input signal.
[0182] The method of performing overflow processing on the second phase rotation operation result may include the following steps:
[0183] 1. Obtain a fourth real signal value and a fourth imaginary signal value corresponding to the second phase rotation operation result.
[0184] Similar to the overflow processing of the first phase rotation operation result mentioned above, after obtaining the second phase rotation operation result, it is necessary to obtain the fourth real signal value and the fourth imaginary signal value corresponding to the second phase rotation operation result, and judge the fourth real signal value and the fourth imaginary signal value to determine whether overflow processing is required for the second phase rotation operation result.
[0185] 2. In response to the absolute value of the fourth real signal value being greater than or equal to the data bit width threshold, or the absolute value of the fourth imaginary signal value being greater than or equal to the data bit width threshold, the second input signal corresponding to the n+1th level input signal and the second scaling factor corresponding to the second input signal are determined according to the scaling factor corresponding to the second output signal and the second phase rotation operation result, the second input signal is one half of the second phase rotation operation result, and the second scaling factor is greater than the scaling factor corresponding to the second output signal.
[0186] In a possible implementation, if the absolute value of the fourth real signal value corresponding to the second phase rotation operation result is greater than or equal to the data bit width threshold, or the absolute value of the fourth imaginary signal value corresponding to the second phase rotation operation result is greater than or equal to the data bit width threshold, it is determined that the second phase rotation operation result may have a data bit width overflow, and the overflow processing is performed on the second phase rotation operation result to obtain a second input signal for inputting the next stage of butterfly operation.
[0187] Among them, the overflow processing method for the second phase rotation operation result includes: halving the signal value of the second phase rotation operation result, that is, the second input signal corresponding to the n+1th level input signal is half of the second phase rotation operation result, and increasing the scaling factor, that is, the scaling factor of the second input signal is greater than the scaling factor of the second output signal. For example, the scaling factor of the second output signal (nth level output signal) is added by one to obtain the scaling factor of the second input signal (n+1th level input signal).
[0188] 3. In response to the absolute value of the fourth real signal value being less than the data bit width threshold, and the absolute value of the fourth imaginary signal value being less than the data bit width threshold, the second phase rotation operation result is determined as the second input signal corresponding to the n+1th level input signal, and the scaling factor corresponding to the second output signal is determined as the second scaling factor corresponding to the second input signal.
[0189] In another possible implementation, if it is determined that the absolute value of the fourth real signal value corresponding to the second phase rotation operation result is less than the data bit width threshold, and the absolute value of the fourth imaginary signal value is also less than the data bit width threshold, it indicates that there is no data bit width overflow in the second phase rotation operation result, and there is no need to perform overflow processing on it. Correspondingly, the second phase rotation operation result is determined as the second input signal corresponding to the n+1th level input signal (that is, the signal value remains unchanged), and the scaling factor corresponding to the second output signal (nth level output signal) is determined as the second scaling factor corresponding to the second input signal (n+1th level input signal) (the scaling factor remains unchanged).
[0190] In an illustrative example, Figure 8 As shown, it shows a schematic diagram of a phase rotation operation shown in an exemplary embodiment of the present application. sj (m) represents the first output signal in the j-th butterfly operation (i.e., the signal input to the phase rotation operation unit), s(m) represents the scaling factor corresponding to the first output signal, r sj+1 (m) represents r sj (m) is the first output signal after phase rotation operation and overflow processing, s′(m) represents the scaling factor corresponding to the first output signal, represents the rotation factor.
[0191] In this embodiment, the process of performing overflow processing during radix operation and phase rotation operation is described. Compared with the related art, by performing overflow processing on the radix operation result, the increase of data bit width during the radix operation can be avoided. At the same time, by performing overflow processing on the phase rotation operation result, the increase of data bit width during the phase rotation operation can be avoided. This avoids the occupation of signal processor processing resources due to the increase of data bit width during FFT implementation, thereby reducing the implementation cost of FFT.
[0192] It should be noted that the embodiments of the present application are only illustrated by taking FFT as an example. In other possible implementations, in the IFFT process, the various signal processing methods provided in the embodiments of the present application are also applicable.
[0193] Please refer to Fig. 9, which shows a structural block diagram of a signal processor provided by an exemplary embodiment of the present application. The signal processor includes a sampling unit 901, a maximum signal-to-noise ratio processing unit 902, a fast Fourier transform operation unit 903 and an overflow processing unit 904.
[0194] The sampling unit 901 is used to obtain an initial sampling signal;
[0195] The maximum signal-to-noise ratio processing unit 902 is used to perform maximum signal-to-noise ratio processing on the initial sampling signal to obtain an input signal;
[0196] The fast Fourier transform operation unit 903 and the overflow processing unit 904 are used to process the input signal to obtain an output signal.
[0197] Optionally, the fast Fourier transform operation includes a k-level butterfly operation, where k is a positive integer and is related to the number of the initial sampling signals;
[0198] The fast Fourier transform operation unit 903 and the overflow processing unit 904 are also used for:
[0199] Perform k-level butterfly operations on the input signal, and perform overflow processing in each level of butterfly operation to obtain the output signal.
[0200] Optionally, the butterfly operation includes a radix operation and a phase rotation operation;
[0201] The fast Fourier transform operation unit 903 and the overflow processing unit 904 are also used for:
[0202] Performing a radix operation on an n-th level input signal to obtain an n-th level radix operation result, where n is a positive integer, and the n-th level input signal is an input signal of an n-th level butterfly operation;
[0203] Performing overflow processing on the n-th level radix operation result to obtain an n-th level output signal;
[0204] Performing a phase rotation operation on the n-th level output signal to obtain an n-th level phase rotation operation result;
[0205] Overflow processing is performed on the nth level phase rotation operation result to obtain an n+1th level input signal, wherein the input signal obtained after overflow processing is performed on the kth level phase rotation operation result is determined as the output signal.
[0206] The fast Fourier transform operation unit 903 and the overflow processing unit 904 are also used for:
[0207] Performing a radix operation on the first input signal and the second input signal to obtain a first radix operation result and a second radix operation result;
[0208] Performing overflow processing on the first radix operation result to obtain the first output signal;
[0209] Performing overflow processing on the second radix operation result to obtain the second output signal;
[0210] Performing a phase rotation operation on the first output signal to obtain a first phase rotation operation result;
[0211] performing a phase rotation operation on the second output signal to obtain a second phase rotation operation result;
[0212] Performing overflow processing on the first phase rotation operation result to obtain a first input signal corresponding to the n+1th level input signal;
[0213] Overflow processing is performed on the second phase rotation operation result to obtain a second input signal corresponding to the n+1th level input signal.
[0214] Optionally, the fast Fourier transform operation unit 903 is further used for:
[0215] Acquire a first scaling factor corresponding to the first input signal and a second scaling factor corresponding to the second input signal;
[0216] Determine the maximum value of the first scaling factor and the second scaling factor as the nth level scaling factor corresponding to the radix operation;
[0217] The first radix operation result and the second radix operation result are calculated according to the first input signal, the second input signal and the nth level scaling factor.
[0218] Optionally, the overflow processing unit 904 is further configured to:
[0219] Obtaining a first real signal value and a first imaginary signal value corresponding to the first radix operation result;
[0220] In response to the absolute value of the first real signal value being greater than or equal to the data bit width threshold, or the absolute value of the first imaginary signal value being greater than or equal to the data bit width threshold, calculating the first output signal according to the n-th level scaling factor and the first radix operation result, wherein the scaling factor corresponding to the first output signal is greater than the n-th level scaling factor, and the first output signal is one half of the first radix operation result;
[0221] In response to an absolute value of the first real signal value being less than the data bit width threshold, and an absolute value of the first imaginary signal value being less than the data bit width threshold, determining the nth level scaling factor as the scaling factor corresponding to the first output signal, and determining the first radix operation result as the first output signal;
[0222] The overflow processing unit 904 is further configured to:
[0223] Obtain a second real signal value and a second imaginary signal value corresponding to the second radix operation result;
[0224] In response to the absolute value of the second real signal value being greater than or equal to the data bit width threshold, or the absolute value of the second imaginary signal value being greater than or equal to the data bit width threshold, calculating the second output signal according to the n-th level scaling factor and the second radix operation result, wherein the scaling factor corresponding to the second output signal is greater than the n-th level scaling factor, and the second output signal is one half of the second radix operation result;
[0225] In response to the absolute value of the second real signal value being less than the data bit width threshold, and the absolute value of the second imaginary signal value being less than the data bit width threshold, the nth level scaling factor is determined as the scaling factor corresponding to the second output signal, and the second radix operation result is determined as the second output signal.
[0226] Optionally, the overflow processing unit 904 is further configured to:
[0227] Obtaining a third real signal value and a third imaginary signal value corresponding to the first phase rotation operation result;
[0228] In response to the absolute value of the third real signal value being greater than or equal to the data bit width threshold, or the absolute value of the third imaginary signal value being greater than or equal to the data bit width threshold, determining, according to the scaling factor corresponding to the first output signal and the first phase rotation operation result, a first input signal corresponding to the (n+1)th level input signal and a first scaling factor corresponding to the first input signal, the first input signal being one half of the first phase rotation operation result, and the first scaling factor being greater than the scaling factor corresponding to the first output signal;
[0229] In response to the absolute value of the third real signal value being less than the data bit width threshold, and the absolute value of the third imaginary signal value being less than the data bit width threshold, determining the first phase rotation operation result as the first input signal corresponding to the (n+1)th level input signal, and determining the scaling factor corresponding to the first output signal as the first scaling factor corresponding to the first input signal;
[0230] The overflow processing unit 904 is further configured to:
[0231] Obtaining a fourth real signal value and a fourth imaginary signal value corresponding to the second phase rotation operation result;
[0232] In response to the absolute value of the fourth real signal value being greater than or equal to the data bit width threshold, or the absolute value of the fourth imaginary signal value being greater than or equal to the data bit width threshold, determining, according to the scaling factor corresponding to the second output signal and the second phase rotation operation result, the second input signal corresponding to the (n+1)th level input signal and the second scaling factor corresponding to the second input signal, the second input signal being one half of the second phase rotation operation result, and the second scaling factor being greater than the scaling factor corresponding to the second output signal;
[0233] In response to the absolute value of the fourth real signal value being less than the data bit width threshold, and the absolute value of the fourth imaginary signal value being less than the data bit width threshold, the second phase rotation operation result is determined as the second input signal corresponding to the n+1th level input signal, and the scaling factor corresponding to the second output signal is determined as the second scaling factor corresponding to the second input signal.
[0234] Optionally, the maximum signal-to-noise ratio processing unit 902 is further configured to:
[0235] Calculating an initial scaling factor corresponding to the input signal according to the initial real signal value, the initial imaginary signal value and an initial data bit width, wherein the initial data bit width is a sampling bit width corresponding to the initial sampling signal;
[0236] The input signal is obtained by calculation according to the initial sampling signal and the initial scaling factor.
[0237] In the embodiment of the present application, by performing maximum signal-to-noise ratio processing on the initial sampling signal, reducing the fixed-point loss in the FFT process, and performing overflow processing in the FFT process, it is possible to avoid overflow of the data bit width caused by the continuous increase in data bit width with each level of calculation, thereby avoiding the continuous increase in data bit width during the FFT implementation process and occupying the processing resources of the signal processor, thereby reducing the implementation cost of the FFT.
[0238] Please refer to Fig.10 , which shows a schematic diagram of the structure of a computer device provided by an exemplary embodiment of the present application.
[0239] The computer device 1000 includes a signal processor 1001 and a memory 1002. The signal processor 1001 may be a DSP or an ASIC, which is not limited in the present embodiment. When the signal processor 1001 is running, it can be used to implement the signal processing methods shown in the above embodiments.
[0240] An embodiment of the present application further provides a computer-readable storage medium, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the signal processing method described in the above embodiments.
[0241] The embodiment of the present application also provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. The signal processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device performs the signal processing method provided in various optional implementations of the above aspects.
[0242] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented with hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable storage medium or transmitted as one or more instructions or codes on a computer-readable storage medium. Computer-readable storage media include computer storage media and communication media, wherein the communication media include any media that facilitates the transmission of a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access.
[0243] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A signal processing method, characterized in that: The method comprises: Obtaining an initial sampling signal; Performing maximum signal-to-noise ratio processing on the initial sampling signal to obtain an input signal, wherein a data bit width corresponding to the input signal after the maximum signal-to-noise ratio processing is lower than a data bit width threshold; Performing a radix operation on an n-th level input signal to obtain an n-th level radix operation result, where n is a positive integer, and the n-th level input signal is an input signal of an n-th level butterfly operation; performing overflow processing on the n-th level radix operation result to obtain an n-th level output signal; wherein the n-th level input signal includes a first input signal and a second input signal, and the n-th level output signal includes a first output signal and a second output signal; Performing a phase rotation operation on the first output signal to obtain a first phase rotation operation result; performing a phase rotation operation on the second output signal to obtain a second phase rotation operation result; Acquire a third real signal value and a third imaginary signal value corresponding to the first phase rotation operation result; in response to the absolute value of the third real signal value being greater than or equal to the data bit width threshold, or the absolute value of the third imaginary signal value being greater than or equal to the data bit width threshold, determine, according to the scaling factor corresponding to the first output signal and the first phase rotation operation result, a first input signal corresponding to the n+1th level input signal and a first scaling factor corresponding to the first input signal, the first input signal being one-half of the first phase rotation operation result, and the first scaling factor being greater than the scaling factor corresponding to the first output signal; in response to the absolute value of the third real signal value being less than the data bit width threshold, and the absolute value of the third imaginary signal value being less than the data bit width threshold, determine the first phase rotation operation result as the first input signal corresponding to the n+1th level input signal, and determine the scaling factor corresponding to the first output signal as the first scaling factor corresponding to the first input signal; Acquire a fourth real signal value and a fourth imaginary signal value corresponding to the second phase rotation operation result; in response to the absolute value of the fourth real signal value being greater than or equal to the data bit width threshold, or the absolute value of the fourth imaginary signal value being greater than or equal to the data bit width threshold, determine, according to the scaling factor corresponding to the second output signal and the second phase rotation operation result, a second input signal corresponding to the n+1th level input signal and a second scaling factor corresponding to the second input signal, the second input signal being one half of the second phase rotation operation result, and the second scaling factor being greater than the scaling factor corresponding to the second output signal; in response to the scaling factor corresponding to the second output signal and the second phase rotation operation result, determine the second input signal corresponding to the n+1th level input signal and the second scaling factor corresponding to the second input signal, the second input signal being one half of the second phase rotation operation result, and the second scaling factor being greater than the scaling factor corresponding to the second output signal; The absolute value of the fourth real part signal value is less than the data bit width threshold, and the absolute value of the fourth imaginary part signal value is less than the data bit width threshold, the second phase rotation operation result is determined as the second input signal corresponding to the n+1th level input signal, and the scaling factor corresponding to the second output signal is determined as the second scaling factor corresponding to the second input signal, wherein the input signal obtained after overflow processing of the kth level phase rotation operation result is determined as the output signal, 0<n≤k, k is a positive integer and is related to the number of the initial sampling signals, and the data bit width of the output signal after overflow processing is less than the data bit width threshold.
2. The method according to claim 1, characterized in that: The performing a radix operation on the n-th level input signal to obtain an n-th level radix operation result includes: Performing a radix operation on the first input signal and the second input signal to obtain a first radix operation result and a second radix operation result; The overflow processing is performed on the n-th level radix operation result to obtain the n-th level output signal, including: Performing overflow processing on the first radix operation result to obtain the first output signal; Overflow processing is performed on the second radix operation result to obtain the second output signal.
3. The method according to claim 2, characterized in that The performing a radix operation on the first input signal and the second input signal to obtain a first radix operation result and a second radix operation result includes: Acquire a first scaling factor corresponding to the first input signal and a second scaling factor corresponding to the second input signal; Determine the maximum value of the first scaling factor and the second scaling factor as the nth level scaling factor corresponding to the radix operation; The first radix operation result and the second radix operation result are calculated according to the first input signal, the second input signal and the nth level scaling factor.
4. The method according to claim 3, characterized in that The performing overflow processing on the first radix operation result to obtain the first output signal includes: Obtaining a first real signal value and a first imaginary signal value corresponding to the first radix operation result; In response to the absolute value of the first real signal value being greater than or equal to the data bit width threshold, or the absolute value of the first imaginary signal value being greater than or equal to the data bit width threshold, calculating the first output signal according to the n-th level scaling factor and the first radix operation result, wherein the scaling factor corresponding to the first output signal is greater than the n-th level scaling factor, and the first output signal is one half of the first radix operation result; In response to an absolute value of the first real signal value being less than the data bit width threshold, and an absolute value of the first imaginary signal value being less than the data bit width threshold, determining the nth level scaling factor as the scaling factor corresponding to the first output signal, and determining the first radix operation result as the first output signal; The performing overflow processing on the second radix operation result to obtain the second output signal includes: Obtain a second real signal value and a second imaginary signal value corresponding to the second radix operation result; In response to the absolute value of the second real signal value being greater than or equal to the data bit width threshold, or the absolute value of the second imaginary signal value being greater than or equal to the data bit width threshold, calculating the second output signal according to the n-th level scaling factor and the second radix operation result, wherein the scaling factor corresponding to the second output signal is greater than the n-th level scaling factor, and the second output signal is one half of the second radix operation result; In response to the absolute value of the second real signal value being less than the data bit width threshold, and the absolute value of the second imaginary signal value being less than the data bit width threshold, the nth level scaling factor is determined as the scaling factor corresponding to the second output signal, and the second radix operation result is determined as the second output signal.
5. The method according to any one of claims 1 to 4, characterized in that: The initial sampling signal is composed of an initial real signal value and an initial imaginary signal value; The performing maximum signal-to-noise ratio processing on the initial sampling signal to obtain an input signal comprises: Calculating an initial scaling factor corresponding to the input signal according to the initial real signal value, the initial imaginary signal value and an initial data bit width, wherein the initial data bit width is a sampling bit width corresponding to the initial sampling signal; The input signal is obtained by calculation according to the initial sampling signal and the initial scaling factor.
6. A signal processor, characterized in that: The signal processor comprises a sampling unit, a fast Fourier transform operation unit, a maximum signal-to-noise ratio processing unit and an overflow processing unit; The sampling unit is used to obtain an initial sampling signal; The maximum signal-to-noise ratio processing unit is used to perform maximum signal-to-noise ratio processing on the initial sampling signal to obtain an input signal; The fast Fourier transform operation unit and the overflow processing unit are used to perform a radix operation on the n-th level input signal to obtain the n-th level radix operation result, where n is a positive integer, and the n-th level input signal is the input signal of the n-th level butterfly operation; perform overflow processing on the n-th level radix operation result to obtain the n-th level output signal; wherein the n-th level input signal includes a first input signal and a second input signal, and the n-th level output signal includes a first output signal and a second output signal; perform a phase rotation operation on the first output signal to obtain a first phase rotation operation result; perform a phase rotation operation on the second output signal to obtain a second phase rotation operation result; obtain a third real signal value and a third imaginary signal value corresponding to the first phase rotation operation result; in response to the absolute value of the third real signal value being greater than or equal to the data bit width threshold, or the absolute value of the third imaginary signal value being greater than or equal to the data bit width threshold, determine the first input signal corresponding to the n+1-th level input signal and the first scaling factor corresponding to the first input signal according to the scaling factor corresponding to the first output signal and the first phase rotation operation result, The first input signal is one half of the first phase rotation operation result, and the first scaling factor is greater than the scaling factor corresponding to the first output signal; in response to the absolute value of the third real signal value being less than the data bit width threshold, and the absolute value of the third imaginary signal value being less than the data bit width threshold, the first phase rotation operation result is determined as the first input signal corresponding to the n+1th level input signal, and the scaling factor corresponding to the first output signal is determined as the first scaling factor corresponding to the first input signal; a fourth real signal value and a fourth imaginary signal value corresponding to the second phase rotation operation result are obtained; in response to the absolute value of the fourth real signal value being greater than or equal to the data bit width threshold, or the absolute value of the fourth imaginary signal value being greater than or equal to the data bit width threshold, a second input signal corresponding to the n+1th level input signal and a second scaling factor corresponding to the second input signal are determined according to the scaling factor corresponding to the second output signal and the second phase rotation operation result, the second input signal is one half of the second phase rotation operation result, and the second scaling factor is greater than the scaling factor corresponding to the second output signal;In response to the absolute value of the fourth real signal value being less than the data bit width threshold, and the absolute value of the fourth imaginary signal value being less than the data bit width threshold, the second phase rotation operation result is determined as the second input signal corresponding to the n+1th level input signal, and the scaling factor corresponding to the second output signal is determined as the second scaling factor corresponding to the second input signal, wherein the input signal obtained after overflow processing of the kth level phase rotation operation result is determined as the output signal, 0<n≤k, k is a positive integer and is related to the number of the initial sampling signals, and the data bit width of the output signal after overflow processing is less than the data bit width threshold. ; 7. A computer device, characterized in that: The computer device includes a signal processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the signal processor to implement the signal processing method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a signal processor to implement the signal processing method as described in any one of claims 1 to 5.
