file:///D:/System%20Workbench/STM32CubeF1-master/Drivers/CMSIS/docs/DSP/html/group__groupCmplxMath.html
(https://i.imgur.com/5u9hIGZ.png)
Description
เซ็ตของ functions นี้ทำงานบน complex data vectors. The data ใน the complex arrays ถูกเก็บใน an interleaved fashion (real, imag, real, imag, ...). ใน the API functions, the number ของ samples ใน a complex array อ้างอิงถึงจำนวนของ complex values; the array บรรจุเป็นสองเท่าจำนวนของ real values นี้.
ปล. ยังจำกันได้อยู่ไหม complex number 1+j2 ที่มีค่าจริงกับค่าจินตนาการ ลองไปทบทวนกันดูนะครับ
file:///D:/System%20Workbench/STM32CubeF1-master/Drivers/CMSIS/docs/DSP/html/group__cmplx__conj.html
(https://i.imgur.com/yGpsZwQ.png)
Description
ผัน the elements of a complex data vector.
The pSrc ชี้ไปยัง the source data และ pDst ชี้ไปยังที่ๆผลลัพธ์ควรถูกเขียน. numSamples ระบุจำนวนของ complex samples และ the data ในแต่ละ array ถูกเก็บใน an interleaved fashion (real, imag, real, imag, ...). แต่ละ array มีทั้งหมด 2*numSamples values. The underlying algorithm ถูกใช้:
for(n=0; n<numSamples; n++) {
pDst[(2*n)+0)] = pSrc[(2*n)+0]; // real part
pDst[(2*n)+1)] = -pSrc[(2*n)+1]; // imag part
}
มีฟังชั่นที่แยกกันสำหรับ floating-point, Q15 and Q31 data types.
(https://i.imgur.com/XSQXJRr.png)
(https://i.imgur.com/npLbJ99.png)
Scaling and Overflow Behavior:
The function ใช้ saturating arithmetic. The Q15 ค่า -1 (0x8000) จะถูกทำให้อิ่มตัวไปยัง the maximum allowable positive value 0x7FFF.
References __QASX(), __QSAX(), and __SIMD32.
(https://i.imgur.com/OGE1K5Q.png)
Scaling and Overflow Behavior:
The function ใช้ saturating arithmetic. The Q31 ค่า -1 (0x80000000) จะถูกทำให้อิ่มตัวไปยัง the maximum allowable positive value 0x7FFFFFFF.
References __QSUB().
file:///D:/System%20Workbench/STM32CubeF1-master/Drivers/CMSIS/docs/DSP/html/group__cmplx__dot__prod.html
(https://i.imgur.com/DsKRDpe.png)
Description
คำนวณ the dot product ของ two complex vectors. The vectors ถูกคูณ element-by-element และจากนั้นรวม.
The pSrcA ชี้ไปยัง the first complex input vector และ pSrcB ชี้ไปยัง the second complex input vector. numSamples ระบุจำนวนของ complex samples และ the data ในแต่ละ array ถูกเก็บใน an interleaved fashion (real, imag, real, imag, ...). แต่ละ array มีทั้งหมด 2*numSamples values
The underlying algorithm ถูกใช้:
realResult=0;
imagResult=0;
for(n=0; n<numSamples; n++) {
realResult += pSrcA[(2*n)+0]*pSrcB[(2*n)+0] - pSrcA[(2*n)+1]*pSrcB[(2*n)+1];
imagResult += pSrcA[(2*n)+0]*pSrcB[(2*n)+1] + pSrcA[(2*n)+1]*pSrcB[(2*n)+0];
}
มีฟังชั่นที่แยกกันสำหรับ floating-point, Q15 and Q31 data types.
(https://i.imgur.com/5NFvMlQ.png)
(https://i.imgur.com/XJklcWw.png)
Scaling and Overflow Behavior:
The function ถูกจัดให้มีใช้โดยใช้ an internal 64-bit accumulator. The intermediate 1.15 by 1.15 multiplications ถูกดำเนินการด้วย full precision และให้ผล a 2.30 result. เหล่านี้ถูก accumulated ใน a 64-bit accumulator ด้วย 34.30 precision. ในขั้นตอนสุดท้าย, the accumulators ถูกแปลงไปเป็น 8.24 format. The return results realResult และ imagResult อยู่ใน 8.24 format.
(https://i.imgur.com/WLzy9KM.png)
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 ไม่ถูกต้องการ.
(https://i.imgur.com/Er7TmgZ.png)
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.
(https://i.imgur.com/0cb8VWq.png)
(https://i.imgur.com/4B6EzBM.png)
(https://i.imgur.com/x3wITMy.png)
(https://i.imgur.com/R5nhhNK.png)
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.
(https://i.imgur.com/B1Qe2Bl.png)
(https://i.imgur.com/KXW9rYP.png)
(https://i.imgur.com/VnPrsRe.png)
(https://i.imgur.com/PGD0FUa.png)
Description
คูณ a complex vector ด้วย complex vector อื่นและสร้าง a complex result. The data ใน the complex arrays ถูกเก็บใน an interleaved fashion (real, imag, real, imag, ...). The parameter numSamples แสดงจำนวนของ complex samples ที่ดำเนินการ. The complex arrays มีทั้งหมด 2*numSamples real values.
The underlying algorithm ถูกใช้:
for(n=0; n<numSamples; n++) {
pDst[(2*n)+0] = pSrcA[(2*n)+0] * pSrcB[(2*n)+0] - pSrcA[(2*n)+1] * pSrcB[(2*n)+1];
pDst[(2*n)+1] = pSrcA[(2*n)+0] * pSrcB[(2*n)+1] + pSrcA[(2*n)+1] * pSrcB[(2*n)+0];
}
มีฟังชั่นที่แยกกันสำหรับ floating-point, Q15 and Q31 data types.
(https://i.imgur.com/m64mfBh.png)
(https://i.imgur.com/a2ZkA8D.png)
(https://i.imgur.com/GM790MW.png)
(https://i.imgur.com/3lt9te6.png)
Description
คูณ a complex vector ด้วย a real vector และสร้าง a complex result. The data ใน the complex arrays ถูกเก็บใน an interleaved fashion (real, imag, real, imag, ...). The parameter numSamples แสดงจำนวนของ complex samples ที่ดำเนินการd. The complex arrays มีทั้งหมด 2*numSamples real values ในขณะที่ the real array มีทั้งหมด numSamples real values..
The underlying algorithm ถูกใช้:
for(n=0; n<numSamples; n++) {
pCmplxDst[(2*n)+0] = pSrcCmplx[(2*n)+0] * pSrcReal[n];
pCmplxDst[(2*n)+1] = pSrcCmplx[(2*n)+1] * pSrcReal[n];
}
มีฟังชั่นที่แยกกันสำหรับ floating-point, Q15 and Q31 data types.
(https://i.imgur.com/SSl4hTX.png)
(https://i.imgur.com/GlCJFne.png)
(https://i.imgur.com/S2qzMvw.png)