|
特别说明:完整45期数字信号处理教程,原创高性能示波器代码全开源地址:链接7 Z3 _+ T4 z5 s$ j 第18章 ComplexMathFunctions的使用(二) 本期教程主要讲解复数运算中的模平方,复数乘法和复数乘实数的求解。 18.1 复数模平方 ComplexMagSquared 18.2 复数乘法 ComplexMultComplex 18.3 复数乘实数 ComplexMultComplex 18.4 总结 " O& h3 S2 N) k5 b18.1 复数模平方 ComplexMagSquared18.1.1 arm_cmplx_mag_squared_f32 公式描述: for(n=0; n<numSamples; n++) { pDst[n] = pSrc[(2*n)+0]^2 + pSrc[(2*n)+1]^2; } 函数定义如下: void arm_cmplx_mag_squared_f32(float32_t * pSrc, float32_t * pDst, uint32_t numSamples) 参数定义: [in] *pSrc points to the complex input vector [out] *pDst points to the real output vector [in] numSamples number of complex samples in the input vector 注意事项: 1. 数组pSrc和pDst中存储的数据格式是(实部,虚部,实部,虚部……………) # [$ Y$ W- G, Q: u. @- v. n18.1.2 arm_cmplx_mag_squared_q31 公式描述: for(n=0; n<numSamples; n++) { pDst[n] = pSrc[(2*n)+0]^2 + pSrc[(2*n)+1]^2; } 函数定义如下: void arm_cmplx_mag_squared_q31(q31_t * pSrc, q31_t * pDst, uint32_t numSamples) 参数定义: [in] *pSrc points to the complex input vector [out] *pDst points to the real output vector [in] numSamples number of complex samples in the input vector 注意事项: 1. 数组pSrc和pDst中存储的数据格式是(实部,虚部,实部,虚部……………) ! K. [8 N& ^" U7 L9 `1 {18.1.3 arm_cmplx_mag_squared_q15 公式描述: for(n=0; n<numSamples; n++) { pDst[n] = pSrc[(2*n)+0]^2 + pSrc[(2*n)+1]^2; } 函数定义如下: void arm_cmplx_mag_squared_q15(q15_t * pSrc, q15_t * pDst, uint32_t numSamples) 参数定义: [in] *pSrc points to the complex input vector [out] *pDst points to the real output vector [in] numSamples number of complex samples in the input vector 注意事项: 1. 数组pSrc和pDst中存储的数据格式是(实部,虚部,实部,虚部……………) ( h$ I1 b/ ]* b9 X18.1.4 实例讲解 实验目的: 1. 学习ComplexMathFunctions中模平方的求解 实验内容: 1. 按下按键K1, 串口打印函数DSP_MagSquared的输出结果 实验现象: 通过窗口上位机软件SecureCRT(V5光盘里面有此软件)查看打印信息现象如下:
程序设计:
|
微信公众号
手机版
; K7 j* o7 w/ l5 I; n! C7 D
18.2.1 arm_cmplx_mult_cmplx_f32
18.2.2 arm_ cmplx_mult_cmplx_q31
18.2.3 arm_cmplx_mult_cmplx_q15
18.2.4 实例讲解
18.3.1 arm_cmplx_mult_cmplx_f32
18.3.2 arm_ cmplx_mult_cmplx_q31
18.3.3 arm_cmplx_mult_cmplx_q15
18.3.4 实例讲解
18.4 总结