STM32F1 CMSIS DSP

Started by tha, July 04, 2021, 07:28:44 AM

Previous topic - Next topic

tha



เลิกใช้:
อย่าใช้ฟังก์ชันนี้ มันถูกแทนที่โดย arm_cfft_f32 และจะถูกลบออกในอนาคต

Parameters
     [in,out]    *S        ชี้ไปยัง an instance ของ the floating-point CFFT/CIFFT structure.
     [in]          fftLen         ความยาวของ the FFT.       
     [in]        ifftFlag        flag ที่เลือก forward (ifftFlag=0) หรือ inverse (ifftFlag=1) transform.
     [in]        bitReverseFlag   flag ที่เปิดการใช้งาน (bitReverseFlag=1) หรือปิดการใช้งาน (bitReverseFlag=0)
                                               bit reversal of output

Returns
The function คืนค่า ARM_MATH_SUCCESS ถ้าการเริ่มต้นทำสำเร็จหรือ ARM_MATH_ARGUMENT_ERROR ถ้า fftLen ไม่ใช่ค่าที่รองรับ.

Description:

The parameter ifftFlag ควบคุมว่า a forward หรือ inverse transform ถูกคำนวณ. Set(=1) ifftFlag สำหรับการคำนวณของ CIFFT มิฉะนั้น CFFT ถูกคำนวณ

The parameter bitReverseFlag ควบคุมว่า output อยู่ใน normal order หรือ bit reversed order. Set(=1) bitReverseFlag สำหรับ output ถูกอยู่ใน normal order มิฉะนั้น output อยู่ใน bit reversed order.

The parameter fftLen ระบุความยาวของ CFFT/CIFFT process. Supported FFT Lengths คือ 16, 64, 256, 1024.

Function นี้ยังเริ่มต้น Twiddle factor table pointer และ Bit reversal table pointer อีกด้วย.


tha



เลิกใช้:
อย่าใช้ฟังก์ชันนี้ มันถูกแทนที่โดย arm_cfft_q15 และจะถูกลบออกในอนาคต

Parameters
     [in,out]    *S        ชี้ไปยัง an instance ของ the Q15 CFFT/CIFFT structure.
     [in]          fftLen         ความยาวของ the FFT.       
     [in]        ifftFlag        flag ที่เลือก forward (ifftFlag=0) หรือ inverse (ifftFlag=1) transform.
     [in]        bitReverseFlag   flag ที่เปิดการใช้งาน (bitReverseFlag=1) หรือปิดการใช้งาน (bitReverseFlag=0)
                                               bit reversal of output

Returns
The function คืนค่า ARM_MATH_SUCCESS ถ้าการเริ่มต้นทำสำเร็จหรือ ARM_MATH_ARGUMENT_ERROR ถ้า fftLen ไม่ใช่ค่าที่รองรับ.

Description:

The parameter ifftFlag ควบคุมว่า a forward หรือ inverse transform ถูกคำนวณ. Set(=1) ifftFlag สำหรับการคำนวณของ CIFFT มิฉะนั้น CFFT ถูกคำนวณ

The parameter bitReverseFlag ควบคุมว่า output อยู่ใน normal order หรือ bit reversed order. Set(=1) bitReverseFlag สำหรับ output ถูกอยู่ใน normal order มิฉะนั้น output อยู่ใน bit reversed order.

The parameter fftLen ระบุความยาวของ CFFT/CIFFT process. Supported FFT Lengths คือ 16, 64, 256, 1024.

Function นี้ยังเริ่มต้น Twiddle factor table pointer และ Bit reversal table pointer อีกด้วย.


tha



เลิกใช้:
อย่าใช้ฟังก์ชันนี้ มันถูกแทนที่โดย arm_cfft_q31 และจะถูกลบออกในอนาคต

Parameters
     [in,out]    *S        ชี้ไปยัง an instance ของ the Q31 CFFT/CIFFT structure.
     [in]          fftLen         ความยาวของ the FFT.       
     [in]        ifftFlag        flag ที่เลือก forward (ifftFlag=0) หรือ inverse (ifftFlag=1) transform.
     [in]        bitReverseFlag   flag ที่เปิดการใช้งาน (bitReverseFlag=1) หรือปิดการใช้งาน (bitReverseFlag=0)
                                               bit reversal of output

Returns
The function คืนค่า ARM_MATH_SUCCESS ถ้าการเริ่มต้นทำสำเร็จหรือ ARM_MATH_ARGUMENT_ERROR ถ้า fftLen ไม่ใช่ค่าที่รองรับ.

Description:

The parameter ifftFlag ควบคุมว่า a forward หรือ inverse transform ถูกคำนวณ. Set(=1) ifftFlag สำหรับการคำนวณของ CIFFT มิฉะนั้น CFFT ถูกคำนวณ

The parameter bitReverseFlag ควบคุมว่า output อยู่ใน normal order หรือ bit reversed order. Set(=1) bitReverseFlag สำหรับ output ถูกอยู่ใน normal order มิฉะนั้น output อยู่ใน bit reversed order.

The parameter fftLen ระบุความยาวของ CFFT/CIFFT process. Supported FFT Lengths คือ 16, 64, 256, 1024.

Function นี้ยังเริ่มต้น Twiddle factor table pointer และ Bit reversal table pointer อีกด้วย.



tha



เลิกใช้:
อย่าใช้ฟังก์ชันนี้ มันถูกแทนที่โดย arm_cfft_q15 และจะถูกลบออกในอนาคต

Parameters
     [in]        *S        ชี้ไปยัง an instance ของ the Q15 CFFT/CIFFT structure.
     [in,out]        *pSrc        ชี้ไปยัง the complex data buffer. การประมวลผลเกิดขึ้นแบบแทนที่.

Returns
      none.

Input and output formats:

อินพุตภายในจะถูกลดขนาดลง 2 สำหรับทุก stage เพื่อหลีกเลี่ยง saturations ภายใน CFFT/CIFFT process. ดังนั้น the output format จะแตกต่างกันสำหรับ different FFT sizes. The input and output formats สำหรับ different FFT sizes และจำนวนของบิตที่จะเพิ่มสเกลถูกกล่าวถึงในตารางข้างล่างสำหรับ CFFT and CIFFT:



tha



เลิกใช้:
อย่าใช้ฟังก์ชันนี้ มันถูกแทนที่โดย arm_cfft_q31 และจะถูกลบออกในอนาคต

Parameters
     [in]        *S        ชี้ไปยัง an instance ของ the Q31 CFFT/CIFFT structure.
     [in,out]        *pSrc        ชี้ไปยัง the complex data buffer ของขนาด 2*fftLen. การประมวลผลเกิดขึ้นแบบแทนที่.

Returns
      none.

Input and output formats:

อินพุตภายในจะถูกลดขนาดลง 2 สำหรับทุก stage เพื่อหลีกเลี่ยง saturations ภายใน CFFT/CIFFT process. ดังนั้น the output format จะแตกต่างกันสำหรับ different FFT sizes. The input and output formats สำหรับ different FFT sizes และจำนวนของบิตที่จะเพิ่มสเกลถูกกล่าวถึงในตารางข้างล่างสำหรับ CFFT and CIFFT:



tha

Description

The CMSIS DSP library มี algorithms เฉพาะสำหรับคำนวณ the FFT ของ real data sequences. The FFT ถูกกำหนดครอบคุม complex data แต่ใน applications มากมาย the input เป็น real. Real FFT algorithms ใช้ประโยชน์จากคุณสมบัติสมมาตรของ the FFT และมีข้อได้เปรียบด้านความเร็วเหนือ complex algorithms ที่ความยาวเดียวกัน.

The Fast RFFT algorith ถ่ายทอดบน the mixed radix CFFT ที่ประหยัดการใช้ processor .

The real length N ส่งต่อไป FFT of a sequence ถูกคำนวณโดยใช้ขั้นตอนที่แสดงข้างล่าง.

                               

The real sequence ถูกปฏิบัติเริ่มแรกเป็นถ้ามันเคยเป็น complex ที่กระทำ a CFFT. ต่อมา, a processing stage ปรับ the data ใหม่เพื่อให้ได้ครึ่งหนึ่งของ the frequency spectrum ใน complex format. ยกเว้น the first complex number ที่บรรจุ the two real numbers X[0] and X[N/2] the data ทั้งหมดเป็น complex. กล่าวอีกนัยหนึ่ง, the first complex sample บรรจุ two real values packed.

The input สำหรับ the inverse RFFT ควรคง the same format อย่าง the output of the forward RFFT. A first processing stage จะประมวลผล the data ก่อนเพื่อดำเนินการ an inverse CFFT ภายหลัง.

                               

The algorithms สำหรับ floating-point, Q15, and Q31 data แตกต่างกันเล็กน้อยและเราจะอธิบายแต่ละ algorithm ในทางกลับกัน.

tha

Floating-point

The main functions คือ arm_rfft_fast_f32() and arm_rfft_fast_init_f32(). ฟังชั่นที่เก่ากว่า arm_rfft_f32() and arm_rfft_init_f32() ถูกเลิกใช้แล้วแต่ยังคงถูกบันทึกไว้.

The FFT ของ a real N-point sequence มีความสมมาตรแม้กระทั่งใน the frequency domain. ครึ่งที่สองของ the data เท่ากับ the conjugate ของ the first half ที่พลิกใน frequency. ดูที่ the data, เราจะเห็นว่าเราสามารถแสดง the FFT ได้โดยไม่ซ้ำกันโดยใช้เฉพาะ N/2 complex numbers เท่านั้น. สิ่งเหล่านี้ถูกบรรจุลงใน the output array ใน real and imaginary components สลับกัน :

X = { real[0], imag[0], real[1], imag[1], real[2], imag[2] ... real[(N/2)-1], imag[(N/2)-1 }

มันเกิดขึ้นที่ the first complex number (real[0], imag[0]) เป็นจำนวนจริงทั้งหมดจริงๆ. real[0] หมายถึง the DC offset, และ imag[0] ควรเป็น 0. (real[1], imag[1]) เป็น the fundamental frequency, (real[2], imag[2]) เป็น the first harmonic และต่อไป.

The real FFT functions จะบรรจุ the frequency domain data ในลักษณะนี้in this fashion. The forward transform ส่งออก the data ในรูปแบบนี้และ the inverse transform คาดว่า input data ในรูปแบบนี้. The function จะดำเนินการ the needed bitreversal เสมอเพื่อให้ the input and output data อยู่ใน normal order เสมอ. The functions รองรับ lengths of [32, 64, 128, ..., 4096] samples.