完善资料让更多小伙伴认识你,还能领取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. |
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
嵌入式学习-飞凌嵌入式ElfBoard ELF 1板卡-开发板适配之电阻屏触摸
769 浏览 0 评论
1276 浏览 0 评论
嵌入式学习-飞凌嵌入式ElfBoard ELF 1板卡-开发板适配之I2C-RTC
552 浏览 0 评论
ATK-DLRK3588开发板deepseek-r1-1.5b/7b部署指南
2890 浏览 0 评论
《DNESP32S3使用指南-IDF版_V1.6》第五十章 WiFi热点实验
876 浏览 0 评论
【youyeetoo X1 windows 开发板体验】少儿AI智能STEAM积木平台
12394 浏览 31 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-2-24 04:05 , Processed in 0.559944 second(s), Total 74, Slave 57 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191