Obtain Time Domain Signal From Frequency Domain Signal

3 次查看(过去 30 天)
I have a respiration signal which was curve fitted using fourier8. Then the psd of the curve fitted signal was calculated using welch method.
I have changed the frequency of the signal in frequency domain. Now, I am trying to plot the signal with new frequency, but can't figure out how to proceed.
Here is my code,
clc clear all
load 'resp.mat';
t = [1:1:18000]./300;
Fs = 300;
resp_signal = resp(1:18000,:); % Respiration Signal for 60 sec
[resp_f,gof,output] = fit(t',resp_signal,'fourier8'); % Curve fitted respiration signal
y_resp = resp_f(t);
psig1 = y_resp - mean(y_resp);
[pxx1,w1] = pwelch(psig1,[],[],[],Fs);
figure
plot(w1,pxx1);
axis([0 10, 0 100]);
[~,loc1] = max(pxx1);
freq1 = w1(loc1);
resp_rate1 = freq1 * 60;
bp = input('Enter Respiration Rate: ');
bps = bp * 17.068;
Fss = bps;
psig2 = y_resp - mean(y_resp);
[pxx2,w2] = pwelch(psig2,[],[],[],Fss);
figure
plot(w2,pxx2);
axis([0 10, 0 200]);
[~,loc2] = max(pxx2);
freq2 = w2(loc2);
resp_rate2 = freq2 * 60;
I am trying to convert 'pxx2' variable into time domain signal. I would be really grateful, if anyone could help me out with this.
  1 个评论
Adam
Adam 2017-7-17
doc ifft
would normally be used for this, though I have never used pwelch so I'm not really familiar with what it gives you.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Spectral Estimation 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by