完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
/* Compute IFFT( CFFT( X ) ) = X */
#include #define N_FFT 64 complex_fract16 in[N_FFT]; complex_fract16 out_cfft[N_FFT]; complex_fract16 out_ifft[N_FFT]; complex_fract16 twiddle[N_FFT/2]; int blk_exp; void ifft_fr16_example(void) { int i; /* Generate DC signal */ for( i = 0; i < N_FFT; i++ ) { in[i].re = 0x100; in[i].im = 0x0; } /* Populate twiddle table */ twidfftrad2_fr16(twiddle, N_FFT); /* Compute Fast Fourier Transform */ cfft_fr16(in, out_cfft, twiddle, 1, N_FFT, blk_exp, 0); /* Reverse static scaling applied by cfft_fr16() function Apply the shift operation before the call to the ifft_fr16() function only if all the values in out_cfft = 0x100. Otherwise, perform the shift operation after the ifft_fr16() function has been computed. */ for( i = 0; i < N_FFT; i++ ) { out_cfft[i].re = out_cfft[i].re << 6; /* log2(N_FFT) = 6 */ out_cfft[i].im = out_cfft[i].im << 6; } /* Compute Inverse Fast Fourier Transform The output signal from the ifft function will be the same as the DC signal of magnitude 0x100 which was passed into the cfft function. */ ifft_fr16(out_cfft, out_ifft, twiddle, 1, N_FFT, blk_exp, 0); } 为什么fft函数在 bf592中运行 out_ifft 数据和in数据有区别??? 傅里叶变换和逆变换的 结果有差距呢 |
|
相关推荐
1个回答
|
|
It is difficult to determine the exact reason why there might be a difference between the input and output data when using the FFT function in the BF592 processor without further information or code details. However, here are a few possible reasons:
1. Input Data Scaling: Depending on the implementation and configuration of the FFT function, there might be a scaling factor applied to the input data. This scaling could result in a difference between the input and output data. 2. Precision Differences: The FFT function might use a different precision or rounding technique compared to the IFFT function, leading to small differences in the output data. 3. Twiddle Factors: The twiddle factors used in the FFT and IFFT calculations might differ slightly, resulting in a discrepancy between the input and output data. To accurately determine the cause of the difference, it is necessary to analyze the code or provide more details about the specific implementation and parameters used. |
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
205 浏览 0 评论
求助一下关于51系列单片机的Timer0的计时问题,TH0、TL0+1的时间是怎么算的?
1253 浏览 1 评论
【RA-Eco-RA4E2-64PIN-V1.0开发板试用】开箱+Keil环境搭建+点灯+点亮OLED
848 浏览 0 评论
【敏矽微ME32G070开发板免费体验】使用coremark测试敏矽微ME32G070 跑分
853 浏览 0 评论
【敏矽微ME32G070开发板免费体验】开箱+点灯+点亮OLED
1073 浏览 2 评论
【youyeetoo X1 windows 开发板体验】少儿AI智能STEAM积木平台
12013 浏览 31 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-23 05:23 , Processed in 0.654609 second(s), Total 73, Slave 56 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号