arm_cmplx_mag_q31() equivalent in PowerQuad?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

arm_cmplx_mag_q31() equivalent in PowerQuad?

Jump to solution
709 Views
gertvb
Contributor III

Goeiedag Almal!

 

Is there a PowerQuad instruction equivalent to the CMSIS-DSP arm_cmplx_mag_q31() function?

 

Like  PQ_TransformRFFT() is equivalent to the CMSIS-DSP function arm_rfft_q15()

 

Kind regards

 

Gert

A TechExplorer working with Embedded Software and Electronics in Agriculture and Alternative Energy
Labels (1)
0 Kudos
1 Solution
685 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Gert Van Biljon,

As you know that the arm_cmplx_mag_q31() function provided by CMSIS platform can compute the power spectrum after FFT.

But I do not think the powerquad library provides the similar function to compute the power spectrum, the powerquad library provides FFT.

After FFT, you can get the real[i]/image[i] array, you can call the matrix product function and addition to compute power spectrum. for example,  after FFT, you get the FFT result FFTResutArrayA, which is 1*512 array for 128 points FFT, clone the FFTResutArrayA to another array FFTResutArrayB, then you can call the matric product function and add the real[i]**2+image[i]**2 yourself.

FFT based on powerquad module

https://www.nxp.com.cn/docs/en/application-note/AN12282.pdf

Hope it can help you

BR

XiangJun Rong

 

 

 

 

View solution in original post

1 Reply
686 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Gert Van Biljon,

As you know that the arm_cmplx_mag_q31() function provided by CMSIS platform can compute the power spectrum after FFT.

But I do not think the powerquad library provides the similar function to compute the power spectrum, the powerquad library provides FFT.

After FFT, you can get the real[i]/image[i] array, you can call the matrix product function and addition to compute power spectrum. for example,  after FFT, you get the FFT result FFTResutArrayA, which is 1*512 array for 128 points FFT, clone the FFTResutArrayA to another array FFTResutArrayB, then you can call the matric product function and add the real[i]**2+image[i]**2 yourself.

FFT based on powerquad module

https://www.nxp.com.cn/docs/en/application-note/AN12282.pdf

Hope it can help you

BR

XiangJun Rong