STM32F1 CMSIS DSP Complex Math Functions

Started by tha, July 18, 2021, 07:30:46 AM

Previous topic - Next topic

tha



Scaling and Overflow Behavior:

The function ถูกจัดให้มีใช้โดยใช้ an internal 64-bit accumulator. The intermediate 1.31 by 1.31 multiplications ถูกดำเนินการด้วย 64-bit precision และจากนั้นถูกเลื่อนไปเป็น 16.48 format. The internal real และ imaginary accumulators อยู่ใน 16.48 format และจัดให้มี 15 guard bits. การบวกเป็นแบบ nonsaturating และไม่มี overflow จะเกิดขึ้นตราบเท่าที่ numSamples น้อยกว่า 32768. The return results realResult และ imagResult อยู่ใน 16.48 format. Input down scaling ไม่ถูกต้องการ.

tha



Description

คำนวณหาขนาดของ the elements of a complex data vector.

The pSrc ชี้ไปยัง the source data และ pDst ชี้ไปยังที่ๆผลลัพธ์ควรถูกเขียน. numSamples ระบุจำนวนของ complex samples ใน the input array และ the data ถูกเก็บใน an interleaved fashion (real, imag, real, imag, ...). The input array มีทั้งหมด 2*numSamples values; the output array มีทั้งหมด numSamples values The underlying algorithm ถูกใช้:

for(n=0; n<numSamples; n++) {
    pDst[n] = sqrt(pSrc[(2*n)+0]^2 + pSrc[(2*n)+1]^2);
}

มีฟังชั่นที่แยกกันสำหรับ floating-point, Q15 and Q31 data types.

tha



tha


tha


tha



Description

คำนวณหาขนาดยกกำลังของ the elements of a complex data vector.

The pSrc ชี้ไปยัง the source data และ pDst ชี้ไปยังที่ๆผลลัพธ์ควรถูกเขียน. numSamples ระบุจำนวนของ complex samples ใน the input array และ the data ถูกเก็บใน an interleaved fashion (real, imag, real, imag, ...). The input array มีทั้งหมด 2*numSamples values; the output array มีทั้งหมด numSamples values The underlying algorithm ถูกใช้:

for(n=0; n<numSamples; n++) {
    pDst[n] = pSrc[(2*n)+0]^2 + pSrc[(2*n)+1]^2;
}

มีฟังชั่นที่แยกกันสำหรับ floating-point, Q15 and Q31 data types.

tha


tha