Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Transforms

All the transforms functions currently supported by the DSP library.

Complex Fast Fourier Transform

This function computes a complex FFT from an input signal. It uses the Radix-4 "Decimate In Time" algorithm and does not perform a calculation "in place" which means that the input buffer has to be different from the output buffer.
Here is the formula of the FFT:

transforms_fft_equation.gif

Relative functions:


Complex inverse Fast Fourier Transform

This function computes a complex inverse FFT from an input signal. It uses the Radix-4 "Decimate In Time" algorithm and does not perform a calculation "in place" which means that the input buffer has to be different from the output buffer.
Here is the formula of the iFFT:

transforms_ifft_equation.gif

Relative functions:


Real to complex Fast Fourier Transform

This function computes a complex FFT from a real input signal. It uses the Radix-4 "Decimate In Time" algorithm and does not perform a calculation "in place" which means that the input buffer has to be different from the output buffer.
Here is the formula of the FFT:

transforms_fft_equation.gif

Relative functions:


Functions

void dsp16_trans_complexfft (dsp16_complex_t *vect1, dsp16_complex_t *vect2, int nlog)
 16-bit fixed point version of the complex FFT algorithm. More...
 
void dsp16_trans_complexifft (dsp16_complex_t *vect1, dsp16_complex_t *vect2, int nlog)
 16-bit fixed point version of the complex iFFT algorithm. More...
 
void dsp16_trans_realcomplexfft (dsp16_complex_t *vect1, dsp16_t *vect2, int nlog)
 16-bit fixed point version of the real to complex FFT algorithm. More...
 
void dsp32_trans_realcomplexfft (dsp32_complex_t *vect1, dsp32_t *vect2, int nlog)
 32-bit fixed point version of the real to complex FFT algorithm. More...
 

void dsp16_trans_complexfft ( dsp16_complex_t vect1,
dsp16_complex_t vect2,
int  nlog 
)

16-bit fixed point version of the complex FFT algorithm.

Parameters
vect1A pointer on a 16-bit complex vector which is the output buffer of this function.
vect2A pointer on a 16-bit complex vector which is the input buffer of this function.
nlogIt is the base-2-logarithm of the size of the input/output vector.
Due to its implementation, this function computes only 4^n-point complex FFT. Therefore, the nlog argument has to be even.
Note
The following requirements have to be matched:
  • The size of the output buffer has to be the same as the size of the input buffer.
  • This function uses a static twiddle factors table which determines the maximal FFT size which can be performed. By default it is 1024. Please check the value of DSP16_N_TWIDDLE_FACTORS.
  • vect1 and vect2 MUST be 4-byte aligned. Please use A_ALIGNED to do so.
  • To avoid overflowing values, the resulting vector amplitude is scaled by 2^nlog.
void dsp16_trans_complexifft ( dsp16_complex_t vect1,
dsp16_complex_t vect2,
int  nlog 
)

16-bit fixed point version of the complex iFFT algorithm.

Parameters
vect1A pointer on a 16-bit complex vector which is the output buffer of this function.
vect2A pointer on a 16-bit complex vector which is the input buffer of this function.
nlogIt is the base-2-logarithm of the size of the input/output vector.
Due to its implementation, this function computes only 4^n-point complex iFFT. Therefore, the nlog argument has to be even.
Note
The following requirements have to be matched:
  • The size of the output buffer has to be the same as the size of the input buffer.
  • This function uses a static twiddle factors table which determines the maximal FFT size which can be performed. By default it is 1024. Please check the value of DSP16_N_TWIDDLE_FACTORS.
  • vect1 and vect2 MUST be 4-byte aligned. Please use A_ALIGNED to do so.
  • To avoid overflowing values, the resulting vector amplitude is scaled by 2^nlog.
void dsp16_trans_realcomplexfft ( dsp16_complex_t vect1,
dsp16_t vect2,
int  nlog 
)

16-bit fixed point version of the real to complex FFT algorithm.

Parameters
vect1A pointer on a 16-bit complex vector which is the output buffer of this function.
vect2A pointer on a 16-bit real vector which is the input buffer of this function.
nlogIt is the base-2-logarithm of the size of the input/output vector.
Due to its implementation, this function computes only 4^n-point complex FFT. Therefore, the nlog argument has to be even.
Note
The following requirements have to be matched:
  • The size of the output buffer has to be the same as the size of the input buffer.
  • This function uses a static twiddle factors table which determines the maximal FFT size which can be performed. By default it is 1024. Please check the value of DSP16_N_TWIDDLE_FACTORS.
  • vect1 and vect2 MUST be 4-byte aligned. Please use A_ALIGNED to do so.
  • To avoid overflowing values, the resulting vector amplitude is scaled by 2^nlog.
void dsp32_trans_realcomplexfft ( dsp32_complex_t vect1,
dsp32_t vect2,
int  nlog 
)

32-bit fixed point version of the real to complex FFT algorithm.

Parameters
vect1A pointer on a 32-bit complex vector which is the output buffer of this function.
vect2A pointer on a 32-bit real vector which is the input buffer of this function.
nlogIt is the base-2-logarithm of the size of the input/output vector.
Due to its implementation, this function computes only 4^n-point complex FFT. Therefore, the nlog argument has to be even.
Note
The following requirements have to be matched:
  • The size of the output buffer has to be the same as the size of the input buffer.
  • This function uses a static twiddle factors table which determines the maximal FFT size which can be performed. By default it is 1024. Please check the value of DSP32_N_TWIDDLE_FACTORS.
  • vect1 and vect2 MUST be 4-byte aligned. Please use A_ALIGNED to do so.
  • To avoid overflowing values, the resulting vector amplitude is scaled by 2^nlog.