特别说明:完整45期数字信号处理教程,原创高性能示波器代码全开源地址:链接, [* l. t. F2 Y1 x3 L2 D8 D% K' p 第18章 ComplexMathFunctions的使用(二) ! _ h' a+ [( W( p 本期教程主要讲解复数运算中的模平方,复数乘法和复数乘实数的求解。 18.1 复数模平方 ComplexMagSquared 18.2 复数乘法 ComplexMultComplex 18.3 复数乘实数 ComplexMultComplex 18.4 总结 18.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中存储的数据格式是(实部,虚部,实部,虚部……………) 18.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中存储的数据格式是(实部,虚部,实部,虚部……………) - j* q0 s) [% I3 i18.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中存储的数据格式是(实部,虚部,实部,虚部……………) + T3 G! ^. N, ~- R9 h/ f: Z U18.1.4 实例讲解 实验目的: 1. 学习ComplexMathFunctions中模平方的求解 实验内容: 1. 按下按键K1, 串口打印函数DSP_MagSquared的输出结果 实验现象: 通过窗口上位机软件SecureCRT(V5光盘里面有此软件)查看打印信息现象如下: 程序设计:
|
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 实例讲解
9 j9 t2 h5 _. N8 c! I' ?
6 g+ v6 y3 y+ d& C8 H
1 }" P Y" Z5 O% y" O$ V
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 总结
/ q+ Q* g9 n3 z+ L7 M2 [