STM32F1 CMSIS DSP Fast Math Functions

  • 11 Replies
  • 442 Views
*

Offline tha

  • *****
  • 4957
    • View Profile
Re: STM32F1 CMSIS DSP Fast Math Functions
« Reply #8 on: July 17, 2021, 08:26:23 am »
file:///D:/System%20Workbench/STM32CubeF1-master/Drivers/CMSIS/docs/DSP/html/group__sin.html



Description

คำนวณ the trigonometric cosine function โดยใช้การรวมของ table lookup และ linear interpolation. มี separate functions สำหรับ Q15, Q31, and floating-point data types. The input ไปยัง

the floating-point version อยู่ใน radians และใน the range [0 2*pi) ในขณะที่ the fixed-point Q15 and Q31 มี a scaled input ด้วย the range [0 +0.9999] แม็ปไปยัง [0 2*pi). The fixed-point

range ถูกเลือกดังนั้นค่าของ 2*pi พันรอบเป็น 0.

การจัดให้มีใช้ขึ้นอยู่กับ table lookup โดยใช้ 256 values พร้อมด้วย linear interpolation. ขั้นตอนนี้ถูกใช้ :

1.    การคำนวณของ the nearest integer table index
2.    คำนวณ the fractional portion (fract) of the table index.
3.    The final result เท่ากับ (1.0f-fract)*a + fract*b;

โดยที่

   b=Table[index+0];
   c=Table[index+1];

*

Offline tha

  • *****
  • 4957
    • View Profile
Re: STM32F1 CMSIS DSP Fast Math Functions
« Reply #9 on: July 17, 2021, 08:27:57 am »

*

Offline tha

  • *****
  • 4957
    • View Profile
Re: STM32F1 CMSIS DSP Fast Math Functions
« Reply #10 on: July 17, 2021, 08:29:18 am »

*

Offline tha

  • *****
  • 4957
    • View Profile
Re: STM32F1 CMSIS DSP Fast Math Functions
« Reply #11 on: July 17, 2021, 08:36:10 am »