CN115577221A - Signal processing method and device, twiddle factor optimization method and terminal equipment - Google Patents

Signal processing method and device, twiddle factor optimization method and terminal equipment Download PDF

Info

Publication number
CN115577221A
CN115577221A CN202211442533.6A CN202211442533A CN115577221A CN 115577221 A CN115577221 A CN 115577221A CN 202211442533 A CN202211442533 A CN 202211442533A CN 115577221 A CN115577221 A CN 115577221A
Authority
CN
China
Prior art keywords
factor
twiddle
index value
twiddle factor
equal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN202211442533.6A
Other languages
Chinese (zh)
Inventor
张明明
卿鹏
李东晓
颜荣勤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Hongshan Microelectronics Technology Co ltd
Original Assignee
Beijing Hongshan Microelectronics Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Hongshan Microelectronics Technology Co ltd filed Critical Beijing Hongshan Microelectronics Technology Co ltd
Priority to CN202211442533.6A priority Critical patent/CN115577221A/en
Publication of CN115577221A publication Critical patent/CN115577221A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/14Fourier, Walsh or analogous domain transformations, e.g. Laplace, Hilbert, Karhunen-Loeve, transforms
    • G06F17/141Discrete Fourier transforms
    • G06F17/142Fast Fourier transforms, e.g. using a Cooley-Tukey type algorithm
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/15Correlation function computation including computation of convolution operations

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Mathematics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Algebra (AREA)
  • Discrete Mathematics (AREA)
  • Computing Systems (AREA)
  • Complex Calculations (AREA)

Abstract

The application relates to the technical field of signal processing, and discloses a signal processing method, a signal processing device, a twiddle factor optimization method and terminal equipment, wherein the method is applied to fast Fourier transform and comprises the following steps: determining a unit factor according to the length value of the sequence of the target signal, wherein the unit factor is a twiddle factor with an index value equal to 1; calculating a required twiddle factor with an index value more than or equal to 2 according to the unit factor and a twiddle factor recurrence formula; and carrying out fast Fourier transform on the target signal sequence based on the calculated twiddle factors to obtain a transform result. The method and the device can greatly reduce the calculation overhead or effectively avoid the access and storage overhead during the frequent table lookup, can also ensure the calculation precision and improve the processing efficiency of the fast Fourier transform of the signals.

Description

Signal processing method and device, twiddle factor optimization method and terminal equipment
Technical Field
The present application relates to the field of signal processing technologies, and in particular, to a signal processing method and apparatus, a twiddle factor optimization method, and a terminal device.
Background
Discrete Fourier Transform (DFT) is widely used in various technical fields related to signal processing, such as communication, signal processing, image processing, and scientific computing, wherein Fast Fourier Transform (FFT) is a fast calculation method of Discrete Fourier Transform (DFT), and fast calculation of fourier transform is implemented by using the characteristics of periodicity, conjugacy, and the like of a twiddle factor in fourier transform.
In the fourier transform calculation, a series of twiddle factors, i.e. unit complex numbers of any given angle θ at a given period N, whose real part is the cosine (cos) and imaginary part is the sine (sin) of the angle θ, need to be calculated. For twiddle factors, there are two general calculation methods, one is to calculate directly in the transformation process, and the other is to calculate a series of twiddle factors in advance, and then read the twiddle factors by a table look-up method in the transformation process.
However, for the two existing schemes, on one hand, the sine value and the cosine value need to be calculated for calculating each twiddle factor, which is a computationally expensive operation; on the other hand, table lookup results in frequent memory access, and thus, calculation of the twiddle factor takes a large percentage of the calculation time in the fast fourier transform, whether directly or by pre-calculation and then table lookup.
Disclosure of Invention
In view of this, embodiments of the present application provide a signal processing method and apparatus, a twiddle factor optimization method, and a terminal device, which can effectively reduce computation overhead in a fast fourier transform process and ensure computation accuracy, etc.
In a first aspect, an embodiment of the present application provides a signal processing method, including:
determining a unit factor according to the sequence length of the target signal, wherein the unit factor is a rotation factor with an index value equal to 1;
sequentially calculating each twiddle factor with an index value larger than or equal to 2 according to the unit factor and a twiddle factor recurrence formula;
and performing fast Fourier transform on the sequence of the target signal based on the calculated twiddle factors to obtain a transform result.
In some embodiments, the determining a unit factor according to the sequence length of the target signal includes:
when the sequence length of the target signal is smaller than a preset threshold value, respectively calculating a cosine value and a sine value of a rotation factor with an index value equal to 1 by utilizing a cosine term and a sine term in an Euler formula;
and when the sequence length of the target signal is greater than or equal to the preset threshold value, calculating the cosine value by using a half-angle conversion formula of the cosine term, and calculating the sine value by using the sine term.
In some embodiments, the value range of the preset threshold is 7 to 12.
In some embodiments, the computational expression for the twiddle factor with index value equal to 1 is as follows:
Figure M_221109135532173_173927001
in the formula (I), the compound is shown in the specification,
Figure M_221109135532254_254467001
which represents the length of the sequence of the target signal,
Figure M_221109135532285_285721002
indicating a twiddle factor with an index value equal to 1.
In some embodiments, when the index value is greater than or equal to 2, the recurrence formula is constructed by performing complex multiplication on the basis of a previous twiddle factor and the unit factor; the recurrence formula is expressed as:
Figure M_221109135532316_316964001
in the formula (I), the compound is shown in the specification,
Figure M_221109135532379_379480001
and
Figure M_221109135532416_416542002
respectively indicate index values equal to
Figure M_221109135532448_448317003
And
Figure M_221109135532479_479562004
by the rotation factor of (a) of (b),
Figure M_221109135532510_510819005
denotes the unit factor, K being the maximum index value.
In some embodiments, fast fourier transforming the sequence of target signals based on the calculated twiddle factor further comprises:
and assigning the twiddle factor with the index value equal to 0 as a preset constant.
In a second aspect, an embodiment of the present application provides a method for optimizing a twiddle factor, which is applied to a fast fourier transform for signal processing, where the method includes:
assigning a twiddle factor with an index value equal to 0 as a preset constant;
taking a twiddle factor with an index value equal to 1 as a unit factor, and constructing a calculation formula of the unit factor according to different sequence lengths of target signals;
for twiddle factors with index values greater than or equal to 2, a recursion formula for calculating a subsequent twiddle factor is constructed based on the unit factor and a previous twiddle factor.
In a third aspect, an embodiment of the present application provides a signal processing apparatus, including:
the determining module is used for determining a unit factor according to the sequence length of the target signal, wherein the unit factor is a twiddle factor with an index value equal to 1;
the calculation module is used for sequentially calculating each twiddle factor with an index value more than or equal to 2 according to the unit factor and a twiddle factor recurrence formula;
and the transformation module is used for carrying out fast Fourier transformation on the sequence of the target signal based on the calculated twiddle factor to obtain a transformation result.
In a fourth aspect, an embodiment of the present application provides a terminal device, where the terminal device includes a processor and a memory, where the memory stores a computer program, and the processor is configured to execute the computer program to implement the method.
In a fifth aspect, embodiments of the present application provide a readable storage medium, which stores a computer program that, when executed on a processor, implements the method.
The embodiment of the application has the following beneficial effects:
the signal processing method of the embodiment of the application determines the twiddle factor with the index value equal to 1 according to the sequence length of the target signal, and takes the twiddle factor as a unit factor to ensure the calculation precision; meanwhile, other twiddle factors are calculated by combining a twiddle factor recurrence formula, and finally, fast Fourier transform is carried out on the basis of the twiddle factors to finally obtain a transform result of the sequence of the target signal. Compared with the scheme of completely adopting a trigonometric function to calculate each twiddle factor in the prior art, the scheme can greatly reduce the calculation cost, and compared with the scheme of reading the prestored twiddle factors by the existing table look-up method, the scheme can save the storage space on one hand, and can effectively reduce the access cost and the like on the other hand.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 shows a schematic structural diagram of a terminal device according to an embodiment of the present application;
FIG. 2 is a flow chart of a signal processing method according to an embodiment of the present application;
FIG. 3 is a flow chart of a method for calculating a unit factor according to an embodiment of the present application;
FIG. 4 is a flow chart illustrating a method for optimizing twiddle factors according to an embodiment of the present application;
fig. 5 shows a schematic structural diagram of a signal processing apparatus according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments.
The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, as presented in the figures, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
Hereinafter, the terms "including", "having", and their derivatives, which may be used in various embodiments of the present application, are intended to indicate only specific features, numbers, steps, operations, elements, components, or combinations of the foregoing, and should not be construed as first excluding the existence of, or adding to, one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing. Furthermore, the terms "first," "second," "third," and the like are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.
Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the various embodiments of the present application belong. The terms (such as those defined in commonly used dictionaries) should be interpreted as having a meaning that is consistent with their contextual meaning in the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein in various embodiments.
Some embodiments of the present application will be described in detail below with reference to the accompanying drawings. The embodiments described below and the features of the embodiments can be combined with each other without conflict.
In the existing twiddle factor calculation scheme, if the twiddle factor is directly calculated through trigonometric functions (sin and cos), the calculation cost is increased; if the fast fourier transform is performed by pre-calculation and storing in the memory, and reading by the table lookup method, the memory is frequently accessed because the twiddle factors are required to be used every cycle. Particularly, in some high-performance parallel computing environments such as a GPU and the like, if table lookup is frequently performed, a large amount of concurrent access to a global memory is caused, and the performance of the GPU in computing is greatly limited; if direct calculation is performed, in a GPU hardware architecture, operations such as trigonometric functions are performed through Special Function Units (SFUs), and usually several tens of clock cycles are required to complete the operations, but the hardware complexity of the SFUs is limited.
Therefore, the method is combined with the characteristic that the angle of the rotation factor in the fast Fourier transform meets continuous change, the method for processing the signal is provided, the calculation of the rotation factor is optimized mainly, the method can be applied to various scenes needing the fast Fourier transform such as image processing, signal processing, communication and the like, the calculation of the rotation factor which can be completed only by dozens of clock cycles (SFU calculation or access and storage operation) can be normally realized, and the calculation can be completed through a plurality of single-cycle instructions of addition and multiplication.
The signal processing method is described below with reference to some specific embodiments.
Fig. 1 is a schematic structural diagram of a terminal device according to an embodiment of the present application. For example, the terminal device may be, but is not limited to, a desktop computer, a notebook, a smart phone, a tablet, etc., and its existing form is not limited. Exemplarily, the terminal device includes a processor 11 and a memory 12, where the memory 12 stores a computer program, and the processor 11 runs the computer program to enable the terminal device to execute the signal processing method of the present application, so as to implement fast fourier transform operations in various signal processing scenarios, and can effectively reduce computation overhead and memory access overhead in the fast fourier transform process under the condition of ensuring computation accuracy, thereby improving signal processing efficiency.
The processor 11 may be an integrated circuit chip having signal processing capability. Processor 11 may be a general purpose Processor including at least one of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), and a Network Processor (NP), a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like that implements or executes the methods, steps and logic blocks disclosed in the embodiments of the present application.
The Memory 12 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like. The memory is used for storing a computer program, and the processor can execute the computer program correspondingly after receiving the execution instruction.
Based on the above terminal device, the signal processing method of the present application is described in detail below.
Fig. 2 shows a flowchart of a signal processing method according to an embodiment of the present application. Exemplarily, the signal processing method is applied to fast fourier transform, and comprises the following steps:
step S110, according to the sequence length of the target signal, a unit factor is determined, wherein the unit factor is a rotation factor with an index value equal to 1.
The target signal may include, but is not limited to, a voice signal, an image signal, etc. in different scenes such as communication, etc., and a corresponding signal sequence is obtained by using a discretization means for these signals. The sequence length refers to the number of points included in the sequence, and is generally denoted as N.
Wherein each twiddle factor is used
Figure M_221109135532526_526436001
Where the subscript number N on the right represents the number of butterfly points, equal to the sequence length; the superscript number K represents the index value of the twiddle factor, wherein the value of K is 0,1,2, \ 8230, and K are the maximum index values. In the present embodiment, by defining a unit factor, specifically, a twiddle factor with an index value equal to 1
Figure M_221109135532557_557689002
As the unit factor, other twiddle factors except that the index value is equal to 0 and 1 are calculated using a preset recursion algorithm. It should be noted that the unit factor is determined according to the sequence length in the present embodiment
Figure M_221109135532588_588936003
When the sequence lengths are different, the calculation formulas of the calculation formulas are also different, so that the calculation accuracy is ensured.
This is due to the twiddle factor
Figure M_221109135532621_621644001
By using Euler's bulbIs expressed in formula (I) as
Figure M_221109135532652_652901002
Wherein, in the step (A),
Figure M_221109135532699_699775003
the cosine term is represented by the number of bits,
Figure M_221109135532715_715393004
and expressing a sine item, and under the condition that the sequence length N and the index value k are known, respectively calculating a cosine value and a sine value of the corresponding rotation factor by using the Euler formula. Thus, for a unity factor
Figure M_221109135532762_762276005
In the actual FFT operation, it can be found that, when N is large enough,
Figure M_221109135532793_793529006
in (1)
Figure M_221109135532824_824785007
Close to 1, e.g. 0.999999999 \8230, the significands of which are occupied by 9, if the recursive algorithm of the present application is used for the calculation of other twiddle factors, then,
Figure M_221109135532856_856037008
the calculation error in the FFT calculation process is gradually amplified through a recurrence formula, so that the final FFT calculation result has large deviation. In this regard, the present application proposes the idea of complementing the 1 format, i.e., to
Figure M_221109135532887_887272009
In (1)
Figure M_221109135532902_902913010
Expressed as a difference from 1, in particular for
Figure M_221109135532934_934169011
In (1)
Figure M_221109135532965_965429012
And partially, converting the image into sin expression by adopting a half angle, wherein sin is close to 0, so that the precision can be better maintained.
In one embodiment, as shown in fig. 3, step S110 includes the following sub-steps:
and a substep S111 of determining whether the sequence length of the target signal is smaller than a preset threshold.
If the ratio is less than the predetermined value, substep S112 is executed, and if the ratio is greater than or equal to the predetermined value, substep S113 is executed.
And a substep S112, when the sequence length of the target signal is smaller than a preset threshold value, respectively calculating a cosine value and a sine value of a twiddle factor with an index value equal to 1 by using a cosine term and a sine term in an Euler formula.
The preset threshold is mainly a length value used for determining whether the sequence length causes a large deviation. For example, when N is smaller than the preset threshold, it indicates that N is smaller, and will not cause a larger calculation error or the calculation result is within the allowable error range, so the original euler formula can be used to calculate the unit factor
Figure M_221109135532996_996656001
Cosine value and sine value.
And a substep S113 of calculating a cosine value of the rotation factor having an index value equal to 1 by using a half-angle conversion formula of a cosine term in an euler formula and calculating a sine value of the rotation factor having an index value equal to 1 by using a sine term in the euler formula when the sequence length of the target signal is greater than or equal to a preset threshold.
On the contrary, when N is larger than or equal to the preset threshold, it indicates that N is larger at the moment, and in order to avoid larger deviation of the calculation result caused by adopting a recursion formula, the unit factor is subjected to
Figure M_221109135533032_032792001
The cosine term in Euler's formula is converted, namely according to a half-angle conversion formula
Figure M_221109135533173_173417002
Then, the converted formula is used to calculate the unity factor
Figure M_221109135533291_291089003
Cosine value of (d). In one embodiment, the unit factor is for both of the above cases
Figure M_221109135533306_306699004
The calculation formula of (c) can be expressed as:
Figure M_221109135533337_337977001
as can be seen from the above analysis of errors, the present embodiment performs a distinguishing process on the sequence length N, wherein the distinguishing process satisfies the requirement
Figure M_221109135533446_446840001
>An N of 0.9 should be in complement 1 format. Certainly, in actual application, for convenience of calculation, the value range of the preset threshold may be set to be between 7 and 12, and may be specifically selected according to actual requirements. It is understood that when N is>6 hour, unit factor
Figure M_221109135533478_478090002
The cos value of (a) is greater than 0.5, and the cos value of (b) is less than 0.5 by adopting a 1-complement format, so that a large error cannot be introduced. For example, in an alternative aspect, the predetermined threshold may be selected to be 8 when N is>8 hour, unit factor
Figure M_221109135533493_493726003
The cos value of (c) is initially greater than the sin value, and the error is smaller.
And step S120, calculating a required twiddle factor with an index value more than or equal to 2 according to the unit factor and a twiddle factor recurrence formula.
In the fast fourier transform, since the angles of the twiddle factors are all continuously changed, for this reason, the present embodiment calculates other twiddle factors by recursion using the continuity of the twiddle factors, specifically, calculates the subsequent twiddle factor by complex multiplication using the previous twiddle factor.
In one embodiment, when the index value is greater than or equal to 2, the twiddle factor recurrence formula can be constructed by performing complex multiplication on the previous twiddle factor and the unit factor. If expressed by an expression, there are:
Figure M_221109135533525_525018001
in the formula (I), the compound is shown in the specification,
Figure M_221109135533571_571844001
and
Figure M_221109135533604_604998002
respectively indicate index values equal to
Figure M_221109135533641_641633003
And
Figure M_221109135533657_657785004
the rotation factor of (a) is determined,
Figure M_221109135533689_689019005
denotes the unit factor, K being the maximum index value.
Further optionally, for a twiddle factor when the index value k =0
Figure M_221109135533720_720299001
According to the corresponding Euler formula, the method can be known,
Figure M_221109135533751_751532002
is 0, so that the rotation factor can be directly adjusted
Figure M_221109135533798_798423003
Assigned a predetermined constant, i.e. (1)0) to further reduce computational overhead.
It will be appreciated that the above pairs
Figure M_221109135533817_817423001
Direct assignment, calculation formula of unit factor and recursion formula can respectively obtain all twiddle factors of index values K =0,1,2, \ 8230, K.
And step S130, performing fast Fourier transform on the sequence of the target signal based on the calculated twiddle factors to obtain a transform result.
In this embodiment, when performing fast fourier transform, only the calculation formula and the recurrence formula of the unit factor need to be stored, and when a twiddle factor with an index value other than 0 is required, the twiddle factor can be obtained through real-time complex operation, and then butterfly operation is performed, so as to finally obtain a fast fourier transform result of the sequence of the target signal. For how to perform fast fourier transform by using twiddle factors, reference may be made to the published relevant documents, and since it is not the focus of the present application, the description is not made here.
Based on the signal processing method, combined with the Euler formula description of the twiddle factor and the characteristic that the angle of the twiddle factor is continuous in the fast Fourier transform, the optimization method of the twiddle factor is provided by the application, and can be applied to the scenes of carrying out the fast Fourier transform processing on various signals. The steps of the optimization method twiddle factor are briefly described below.
As shown in fig. 4, the method for optimizing the twiddle factor includes:
s210, assigning a twiddle factor with an index value equal to 0
Figure M_221109135533849_849181001
Is a preset constant, i.e., (1, 0);
s220, rotating factor with index value equal to 1
Figure M_221109135533880_880452001
As a unit factor and according to the sequence length of the target signalAnd (4) constructing a calculation formula of the unit factor.
In one embodiment, the unit factor
Figure M_221109135533911_911677001
The calculation expression of (a) is as follows:
Figure M_221109135533942_942931001
and S230, constructing a recursion formula for calculating the subsequent twiddle factor based on the unit factor and the previous twiddle factor for twiddle factors with index values larger than or equal to 2.
For twiddle factors with index values greater than or equal to 2, the unit factor can be used
Figure M_221109135534009_009308001
And previous twiddle factor
Figure M_221109135534041_041068002
Complex multiplication is carried out to calculate the subsequent rotation factor
Figure M_221109135534072_072338003
The recurrence formula at this time satisfies:
Figure M_221109135534103_103592001
the signal processing method determines the twiddle factor with the index value equal to 1 according to the sequence length of the target signal, and takes the twiddle factor as a unit factor, so that the unit factor is calculated by only adopting a one-time trigonometric function; in addition, the unit factor is calculated by combining the length of the sequence, and the calculation precision can be ensured; meanwhile, other twiddle factors are calculated by combining a twiddle factor recurrence formula, and finally, fast Fourier transform is carried out on the basis of the twiddle factors to finally obtain a transform result of the sequence of the target signal. Compared with the scheme of completely adopting a trigonometric function to calculate each twiddle factor in the prior art, the scheme can greatly reduce the calculation cost, and compared with the scheme of reading the prestored twiddle factors by the existing table look-up method, the scheme can save the storage space on one hand, and can effectively reduce the access cost and the like on the other hand.
Fig. 5 shows a schematic structural diagram of a signal processing apparatus according to an embodiment of the present application. Exemplarily, the signal processing apparatus includes:
a determining module 110, configured to determine a unit factor according to a sequence length of a target signal, where the unit factor is a twiddle factor with an index value equal to 1;
a calculating module 120, configured to sequentially calculate, according to the unit factor and according to a twiddle factor recurrence formula, twiddle factors with index values greater than or equal to 2;
a transform module 130, configured to perform fast fourier transform on the sequence of the target signal based on the calculated twiddle factor to obtain a transform result.
It is to be understood that the apparatus of the present embodiment corresponds to the signal processing method of the above embodiment, and the alternatives of the above embodiment are also applicable to the present embodiment, so the description is not repeated here.
The application also provides a readable storage medium for storing the computer program used in the terminal device.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative and, for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, each functional module or unit in each embodiment of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a smart phone, a personal computer, a server, or a network device) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk, and various media capable of storing program codes.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application.

Claims (10)

1. A method of signal processing, the method comprising:
determining a unit factor according to the sequence length of the target signal, wherein the unit factor is a rotation factor with an index value equal to 1;
sequentially calculating each twiddle factor with an index value more than or equal to 2 according to the unit factor and a twiddle factor recurrence formula;
and performing fast Fourier transform on the sequence of the target signal based on the calculated twiddle factors to obtain a transform result.
2. The signal processing method of claim 1, wherein determining the unit factor according to the sequence length of the target signal comprises:
when the sequence length of the target signal is smaller than a preset threshold value, respectively calculating a cosine value and a sine value of a twiddle factor with an index value equal to 1 by using a cosine term and a sine term in an Euler formula;
and when the sequence length of the target signal is greater than or equal to the preset threshold value, calculating the cosine value by using a half-angle conversion formula of the cosine term, and calculating the sine value by using the sine term.
3. The signal processing method according to claim 2, wherein the preset threshold has a value range of 7 to 12.
4. The signal processing method according to claim 2, wherein the calculation expression of the twiddle factor with the index value equal to 1 is as follows:
Figure M_221109135528336_336974001
in the formula (I), the compound is shown in the specification,
Figure M_221109135528448_448314001
which represents the length of the sequence of the target signal,
Figure M_221109135528463_463935002
indicating a twiddle factor with an index value equal to 1.
5. The signal processing method according to any one of claims 1 to 4, wherein when the index value is greater than or equal to 2, the recurrence formula is constructed by performing complex multiplication based on a previous twiddle factor and the unit factor; the recurrence formula is:
Figure M_221109135528495_495182001
in the formula (I), the compound is shown in the specification,
Figure M_221109135528542_542063001
and
Figure M_221109135528573_573320002
respectively indicate index values equal to
Figure M_221109135528606_606480003
And
Figure M_221109135528639_639681004
the rotation factor of (a) is determined,
Figure M_221109135528655_655830005
denotes the unit factor, K being the maximum index value.
6. The signal processing method according to any one of claims 1 to 4, wherein the fast Fourier transform is performed on the sequence of the target signal based on the calculated twiddle factor, and further comprising:
and assigning the twiddle factor with the index value equal to 0 as a preset constant.
7. A method for optimizing twiddle factors, applied to fast Fourier transform of signal processing, the method comprising:
assigning a twiddle factor with an index value equal to 0 as a preset constant;
taking a twiddle factor with an index value equal to 1 as a unit factor, and constructing a calculation formula of the unit factor according to different sequence lengths of target signals;
for twiddle factors with index values greater than or equal to 2, a recursion formula for calculating the next twiddle factor is constructed based on the unit factor and the previous twiddle factor.
8. A signal processing apparatus, characterized by comprising:
the determining module is used for determining a unit factor according to the sequence length of the target signal, wherein the unit factor is a twiddle factor with an index value equal to 1;
the calculation module is used for sequentially calculating each twiddle factor with an index value more than or equal to 2 according to the unit factor and a twiddle factor recurrence formula;
and the transformation module is used for carrying out fast Fourier transformation on the sequence of the target signal based on the calculated twiddle factor to obtain a transformation result.
9. A terminal device, characterized in that the terminal device comprises a processor and a memory, the memory storing a computer program for execution by the processor to perform the method of any of claims 1-7.
10. A readable storage medium, characterized in that it stores a computer program which, when executed on a processor, implements the method according to any one of claims 1-7.
CN202211442533.6A 2022-11-18 2022-11-18 Signal processing method and device, twiddle factor optimization method and terminal equipment Withdrawn CN115577221A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211442533.6A CN115577221A (en) 2022-11-18 2022-11-18 Signal processing method and device, twiddle factor optimization method and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211442533.6A CN115577221A (en) 2022-11-18 2022-11-18 Signal processing method and device, twiddle factor optimization method and terminal equipment

Publications (1)

Publication Number Publication Date
CN115577221A true CN115577221A (en) 2023-01-06

Family

ID=84588251

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211442533.6A Withdrawn CN115577221A (en) 2022-11-18 2022-11-18 Signal processing method and device, twiddle factor optimization method and terminal equipment

Country Status (1)

Country Link
CN (1) CN115577221A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117591784A (en) * 2024-01-19 2024-02-23 武汉格蓝若智能技术股份有限公司 FPGA-based twiddle factor calculation method and FPGA chip

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103838703A (en) * 2012-11-26 2014-06-04 上海贝尔股份有限公司 Method and device for achieving signal processing based on large count Fourier transforming
CN113779499A (en) * 2021-08-06 2021-12-10 中山大学 Fast Fourier algorithm optimization method and system based on high-level comprehensive tool
CN114090948A (en) * 2021-10-12 2022-02-25 哲库科技(北京)有限公司 Twiddle factor determination method and device, electronic equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103838703A (en) * 2012-11-26 2014-06-04 上海贝尔股份有限公司 Method and device for achieving signal processing based on large count Fourier transforming
CN113779499A (en) * 2021-08-06 2021-12-10 中山大学 Fast Fourier algorithm optimization method and system based on high-level comprehensive tool
CN114090948A (en) * 2021-10-12 2022-02-25 哲库科技(北京)有限公司 Twiddle factor determination method and device, electronic equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
姜恩华等: "基于CCS软件的数字信号处理课程实验设计", 《淮北师范大学学报(自然科学版)》 *
姜恩华等: "数字信号处理课程中的傅里叶变换教学探索", 《廊坊师范学院学报(自然科学版)》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117591784A (en) * 2024-01-19 2024-02-23 武汉格蓝若智能技术股份有限公司 FPGA-based twiddle factor calculation method and FPGA chip
CN117591784B (en) * 2024-01-19 2024-05-03 武汉格蓝若智能技术股份有限公司 FPGA-based twiddle factor calculation method and FPGA chip

Similar Documents

Publication Publication Date Title
CN109959892B (en) Uniform circular array dual-channel interferometer direction finding method, device and system
KR102458095B1 (en) Phase correction method and device
CN115577221A (en) Signal processing method and device, twiddle factor optimization method and terminal equipment
CN109634558A (en) Programmable mixed-precision arithmetic element
CN116466910A (en) Floating point number-based table lookup method and device, electronic equipment and storage medium
CN113902089A (en) Device, method and storage medium for accelerating operation of activation function
CN112200299B (en) Neural network computing device, data processing method and device
CN115544438B (en) Twiddle factor generation method and device in digital communication system and computer equipment
CN105989154B (en) Similarity measurement method and equipment
US20190171419A1 (en) Arithmetic processing device and control method of arithmetic processing device
CN113870090B (en) Method, graphics processing apparatus, system, and medium for implementing functions
CN116166217A (en) System and method for performing floating point operations
CN115221466A (en) Business data processing method, device, equipment, storage medium and program product
US20180032311A1 (en) System and method for piecewise linear approximation
US20140164460A1 (en) Digital signal processing apparatus and processing method thereof
CN117591784B (en) FPGA-based twiddle factor calculation method and FPGA chip
TWI754970B (en) Device, method and storage medium for accelerating operation of an activation function
US20150363170A1 (en) Calculation of a number of iterations
US20130304782A1 (en) Method for searching a lookup table
Altamimi et al. Novel seed generation and quadrature-based square rooting algorithms
CN114995765B (en) Data processing method and device, storage medium and electronic equipment
WO2017177758A1 (en) Data signal processing method and apparatus
US20170269902A1 (en) Check procedure for floating point operations
CN115659380B (en) Ciphertext data fitting calculation method and device and electronic equipment
CN109992892B (en) Reference model verification method and device, electronic equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication

Application publication date: 20230106

WW01 Invention patent application withdrawn after publication