完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我使用CE018YFFTJDSPLIB示例代码,并使用默认设置值。1。当我设置断点在“VcTrimeBuffelSimult/ 2,and SigCMPX(0).Realand,PeaQueNeCyByBin);“(像PIC1),然后我复制SIGCMPX [0 ] ~SigCMPX [64 ](128分数数据到Excel)时,我得到PIC2,它似乎不像正弦(x)+1 /3Sin(3x)+1 /5Sin(5x)+……构造的方波。你能告诉我出什么事了吗?因为我想使用分析谐波。我已经确保频率和平方BitReverseComplex函数没有问题,但是我不知道FFTComplexIP有什么,……
以上来自于百度翻译 以下为原文 I'm using CE018_FFT_DSPlib sample code, and using default setting value. 1. when I set breakpoint in "VectorMax(FFT_BLOCK_LENGTH/2, &sigCmpx[0].real, &peakFrequencyBin);" (like pic1) then I copy sigCmpx[0]~sigCmpx[64] (128 fractional data to excel) I got pic2 It seem not like square wave constructed by sin(x) + 1/3sin(3x) + 1/5sin(5x) +..... could you tell me what's wrong ? because I want to use that analysishARMonic. PS1. I had make sure that frequency & SquareMagnitudeCplx function is no problem, but I don't know what's worng in FFTComplexIP, BitReverseComplex...... Attached Image(s) |
|
相关推荐
1个回答
|
|
你知道在SuffRealEdgCpxx()函数之后,你观察到这个阶段的复傅立叶变换结果的平方模吗?为了使图表变得更像Apple谱密度图,需要从复制的值中提取平方根。此外,你应该只考虑图的一半,因为平方和SuffDuffCxx()将复数的值替换为两倍短的相同的实数值。您应该检查傅立叶变换数据的对齐方式和内存类型,包括信号和旋转系数。当我把一个例子转移到MPLABX和XC16时,这是我的第一个问题。检查旋转因子和信号被放置在相应的ROM/RAM段(X存储器、Y存储器或程序存储器)中,并保证它们是最接近两个功率的。它的起始地址的所有数据都是零位。例如,如果向量具有64个复数值的长度,则它占据128个分数值,这是256个字节。由于字节寻址,地址长度将是Log2(256)=8比特。这就是为什么正确对齐向量的第一个元素应该具有最后一个地址字节零。如果矢量较大,对准也应该更大。
以上来自于百度翻译 以下为原文 Do you understanding that after the SquareMagnitudeCplx() function you're observing squared modulus of the complex Fourier transform result at this stage? To make the diagram become more usual like a power spectral density diagram you need take a square root from the values you're copied. Also you should take in account only the half of a diagram because the SquareMagnitudeCplx() replaces complex values by same number real values which are twice shorter. Indeed the diagram is not representing clear square wave spectrum. You should check the alignment and the memory type of the Fourier transforms data, both signal and twiddle coefficients. It was my first problems when I've transferred an example into MPLABX and XC16. Check the twiddle factors and signal are placed in corresponding ROM/RAM segments (X-memory, Y-memory or program memory) and ensure they are aligned for closest power of two. It is mandatory for the start address to have all zero bits. For example, if the vector have length of 64 complex values, it occupies 128 fractional values which are 256 bytes. Due to byte addressing the address length will be log2(256)=8 bits. That is why the first element of correctly aligned vector should have last address byte zero. If the vector is bigger the alignment should be bigger too. |
|
|
|
只有小组成员才能发言,加入小组>>
5248 浏览 9 评论
2037 浏览 8 评论
1957 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3218 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2265 浏览 5 评论
788浏览 1评论
679浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
608浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
685浏览 0评论
582浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-28 02:46 , Processed in 1.191604 second(s), Total 76, Slave 60 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号