当前位置:网站首页>信号处理中的反傅里叶变换(IFFT)原理
信号处理中的反傅里叶变换(IFFT)原理
2022-07-29 04:08:00 【smartisong】
信号处理中,经常需要将信号转换到频域进行分析,有时候还会从频域转回时域,用到FFT和IFFT函数。
FFT变换是将信号从时域转换到频域,在时域看起来复杂的信号转换到频域看起来就方便容易了很多。但有时候也需要将频域信号转换到时域,所以这时需要用到IFFT变换。
其实IFFT的计算原理之一就是将频域(注意频域是复数)数据进行取共轭复数(虚部取反),然后再进行FFT变换,这样便将频域信号转换到时域。因为FFT变换的结果是复数,所以从频域进行FFT变换过来的结果也是复数,而此时只需取复数的实部,便是原时域信号(同时此复数的虚部已经比非常小了,就省略不要了)。
注意:FFT以后数列是共扼对称排列的顺序,当把某个范围频率的数据清另,必须将与它共扼对称的频率数据也清另,不可少清,也不可多清,这样就不会出来复数了。
在MATLAB中,通过计算MATLAB自带的IFFT函数和FFT结果进行虚部取反再计算FFT。两种方法表明:结果一致。
%% 将正弦波做FFT计算,50%的重叠。验证IFFT的计算——对比自带函数IFFT函数,和对FFT结果取共轭,再进行FFT计算的区别。
clear;clf;
Fs=24000;t = 0:1/Fs:0.07;y=sin(200*2*pi*t+50); % 24k采样率下,生成200Hz、0.07秒正弦波
i=(floor(length(y)/512)-1)*2; % 因为分帧计算,这里计算循环次数。因为要50%的重叠,所以需要乘以2
yfft=zeros(1,length(y)); % 初始化函数
yifft=zeros(1,length(y)); % 初始化函数
Windows=hamming(512); % 取窗函数
for a =0:i
StartPoint=1+256*a;
y0(1:512)=y(StartPoint:(StartPoint+512-1)); %取每次要处理的512个数据
y0=y0.*Windows'; % 加窗
TempData=fft(y0); % 做FFT计算
Yifft=ifft(TempData); % MATLAB自带IFFT函数
Yfft=conj(TempData); % 取共轭复数
Yfft=fft(Yfft); % 虚部取反做FFT计算
Yfft=(real(Yfft)/512)*0.98; % 取出实部,并对其除以N。乘以0.98为了做图进行对比
yfft(StartPoint:StartPoint+512-1)=yfft(StartPoint:StartPoint+512-1)+Yfft; %重组
yifft(StartPoint:StartPoint+512-1)=yifft(StartPoint:StartPoint+512-1)+Yifft; %重组
end
%% 作图
figure(1);
plot(y,'*'); hold on
plot(yfft,'r'); hold on ;
plot(yifft,'k'); grid on
legend('原信号时域','虚部取反做fft时域','Ifft时域');
xlabel('时域(t)');
ylabel('幅值');

边栏推荐
- After I get the winfrom specific control ID from the database, I need to find the corresponding control through this ID and assign a value to the text text of the control. What should I do
- 关于双指针的思想总结
- 店铺排名问题,如何解决?
- Use case of arrow function of new features in ES6
- Why do I delete the original record (OP d) and then add a new one in Kafka when I update MySQL data
- 关于ALV格式控制部分的写法
- Const read only variable constant
- Interview essential! TCP classic 15 consecutive questions!
- Data mining -- Introduction to the basis of association analysis (Part 1)
- BGP的基础配置---建立对等体、路由宣告
猜你喜欢

LDP -- label distribution protocol

Summary on the thought of double pointer

Configmap configuration and secret encryption

UCOS任务切换过程

Mmdetection preliminary use

Object array merges elements according to a field

Interview essential! TCP classic 15 consecutive questions!

STM32F103ZET6程序移植为C8T6+C8T6下载程序flash timeout的解决方案

Is the array name a pointer

Install the laser of ROS_ scan_ Problems encountered in match library (I)
随机推荐
Why do I delete the original record (OP d) and then add a new one in Kafka when I update MySQL data
nacos注册中心
mmdetection初步使用
请问为什么我进行mysql数据update时,kafka中采集到的是先删除原纪录(op d)再新增新
The output comparison function of Tim is introduced in detail through PWM breathing lamp and PWM controlled DC motor
UCOS任务切换过程
[untitled]
安装postgis时报找不到“POSTGIS_VERSION”这个函数
Do you have a boss to help me check whether the parameter configuration of the Flink SQL connection Kafka authentication Kerberos is wrong
“蔚来杯“2022牛客暑期多校训练营1 J Serval and Essay(启发式合并)
Wechat applet monitors sliding events on the screen
数据挖掘——关联分析基础介绍(上)
Codeforces round 810 (Div. 2) d. rain (segment tree difference)
STM32F103ZET6程序移植为C8T6+C8T6下载程序flash timeout的解决方案
UnicodeDecodeError: ‘ascii‘ codec can‘t decode byte 0x90 in position 614: ordinal not in range(128)
A little understanding of pointer, secondary pointer, wild pointer, pointer as function return value
MySQL Part 4 (end)
Blood cases caused by < meta charset=UTF-8> -- Analysis of common character codes
优炫数据库有办法查到主集群每天传给备集群的日志量吗?
LDP -- label distribution protocol