STM32F1 CMSIS DSP Statistics Functions(สถิติ)

  • 31 Replies
  • 1020 Views
*

Offline tha

  • *****
  • 4963
    • View Profile
Re: STM32F1 CMSIS DSP Statistics Functions(สถิติ)
« Reply #24 on: July 13, 2021, 07:27:55 am »
file:///D:/System%20Workbench/STM32CubeF1-master/Drivers/CMSIS/docs/DSP/html/group__STD.html



Description

คำนวณ the standard deviation ขององค์ประกอบใน the input vector. The underlying algorithm ถูกใช้ :

 Result = sqrt((sumOfSquares - sum^2 / blockSize) / (blockSize - 1))
 โดยที่, sumOfSquares = pSrc[0] * pSrc[0] + pSrc[1] * pSrc[1] + ... + pSrc[blockSize-1] * pSrc[blockSize-1]
                    sum = pSrc[0] + pSrc[1] + pSrc[2] + ... + pSrc[blockSize-1]
มีฟังชั่นที่แยกกันสำหรับ floating-point, Q31 and Q15 data types.

ปล. สถิติ เรื่อง standard deviation กับ variance ดูเอาที่นี่ก็ได้ครับ
      https://www.coraline.co.th/single-post/basic-statistic-1

*

Offline tha

  • *****
  • 4963
    • View Profile
Re: STM32F1 CMSIS DSP Statistics Functions(สถิติ)
« Reply #25 on: July 13, 2021, 07:34:50 am »

*

Offline tha

  • *****
  • 4963
    • View Profile
Re: STM32F1 CMSIS DSP Statistics Functions(สถิติ)
« Reply #26 on: July 13, 2021, 07:47:41 am »


Scaling and Overflow Behavior:

The function ถูกจัดให้มีใช้โดยใช้ a 64-bit internal accumulator. The input ถูกแสดงใน 1.15 format  การคูณกลางทางให้ a 2.30 format, และผลลัพธ์ถูกบวกโดยไม่มีการอิ่มตัวไปยัง a 64-bit accumulator  ใน 34.30 format. ด้วย 33 guard bits ใน the accumulator, ไม่มีความเสี่ยงของ overflow, และ the full precision ของ the intermediate multiplication ถูกรักษา. สุดท้าย, the 34.30 result ถูกตัดเป็น 34.15 format โดยการทิ้ง the lower 15 bits, และจากนั้นทำให้อิ่มตัวเพื่อให้ได้ผลลัพธ์ใน in 1.15 format.

References __SIMD32, __SMLALD(), arm_sqrt_q15(), and blockSize.

*

Offline tha

  • *****
  • 4963
    • View Profile
Re: STM32F1 CMSIS DSP Statistics Functions(สถิติ)
« Reply #27 on: July 13, 2021, 08:03:30 am »


Scaling and Overflow Behavior:

The function ถูกจัดให้มีใช้โดยใช้ a 64-bit internal accumulator. The input ถูกแสดงใน 1.31 format , ซึ่งจากนั้นถูกเลื่อนลงไป 8 bits ซึ่งให้ผล 1.23, และ intermediate multiplication ให้ผล a 2.46 format. The accumulator รักษา full precision ของ the intermediate multiplication results, แต่จัดให้มีเพียง a 16 guard bits เท่านั้น. ไม่มีการอิ่มตัวบน intermediate additions. ถ้า the accumulator overflows, มันจะพันรอบและบิดเบือน the result. เพื่อหลีกเลี่ยง overflows อย่างสมบูรณ์, the input signal ต้องถูกปรับขนาดลงโดย log2(blockSize)-8 bits, เนื่องจาก a total of blockSize additions ถูกดำเนินการภายใน. หลังจากการหาร, internal variables ควรเป็น Q18.46 สุดท้าย, the 18.46 accumulator ถูกเลื่อนไปทางขวา 15 bits เพื่อให้ได้ a 1.31 format value.

References arm_sqrt_q31(), and blockSize.

*

Offline tha

  • *****
  • 4963
    • View Profile
Re: STM32F1 CMSIS DSP Statistics Functions(สถิติ)
« Reply #28 on: July 13, 2021, 09:13:25 am »
file:///D:/System%20Workbench/STM32CubeF1-master/Drivers/CMSIS/docs/DSP/html/group__variance.html



Description

คำนวณ the variance ของ the elements ใน the input vector. The underlying algorithm ถูกใช้เป็น the direct method บางครั้งอ้างอิงถึงอย่าง the two-pass method:

  Result = sum(element - meanOfElements)^2) / numElement - 1
  โดยที่, meanOfElements = ( pSrc[0] * pSrc[0] + pSrc[1] * pSrc[1] + ... + pSrc[blockSize-1] ) / blockSize

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

*

Offline tha

  • *****
  • 4963
    • View Profile
Re: STM32F1 CMSIS DSP Statistics Functions(สถิติ)
« Reply #29 on: July 13, 2021, 09:15:39 am »

*

Offline tha

  • *****
  • 4963
    • View Profile
Re: STM32F1 CMSIS DSP Statistics Functions(สถิติ)
« Reply #30 on: July 13, 2021, 09:23:13 am »


Scaling and Overflow Behavior:

The function ถูกจัดให้มีใช้โดยใช้ a 64-bit internal accumulator. The input ถูกแสดงใน 1.15 format  การคูณกลางทางให้ a 2.30 format, และผลลัพธ์นี้ถูกบวกโดยไม่มีการอิ่มตัวไปยัง a 64-bit accumulator  ใน 34.30 format. ด้วย 33 guard bits ใน the accumulator, ไม่มีความเสี่ยงของ overflow, และ the full precision ของ the intermediate multiplication ถูกรักษา. สุดท้าย, the 34.30 result ถูกตัดเป็น 34.15 format โดยการทิ้ง the lower 15 bits, และจากนั้นถูกอิ่มตัวเพื่อให้ได้ผลลัพธ์ใน 1.15 format.

References __SIMD32, __SMLALD(), and blockSize.

*

Offline tha

  • *****
  • 4963
    • View Profile
Re: STM32F1 CMSIS DSP Statistics Functions(สถิติ)
« Reply #31 on: July 13, 2021, 09:28:47 am »


Scaling and Overflow Behavior:

The function ถูกจัดให้มีใช้โดยใช้ a 64-bit internal accumulator. The input ถูกแสดงใน 1.31 format , ซึ่งจากนั้นถูกเลื่อนลงไป 8 bits ซึ่งให้ผล 1.23, และ intermediate multiplication ให้ผล a 2.46 format. The accumulator รักษา full precision ของ the intermediate multiplication results, แต่จัดให้มีเพียง a 16 guard bits เท่านั้น. ไม่มีการอิ่มตัวบน intermediate additions. ถ้า the accumulator overflows, มันจะพันรอบและบิดเบือน the result. เพื่อหลีกเลี่ยง overflows อย่างสมบูรณ์, the input signal ต้องถูกปรับขนาดลงโดย log2(blockSize)-8 bits, เนื่องจาก a total of blockSize additions ถูกดำเนินการภายใน. หลังจากการหาร, internal variables ควรเป็น Q18.46 สุดท้าย, the 18.46 accumulator ถูกเลื่อนไปทางขวา 15 bits เพื่อให้ได้ a 1.31 format value.

References blockSize.