Issue in finding Power Spectral Density of fitted curve
조회 수: 1 (최근 30일)
이전 댓글 표시
I have a respiration signal which is sinusoidal in shape. I have fitted the curve using Fourier series. Since the fitted curve is in cfit format, I am not able to find it's Power Spectral Density.
Can anyone help me out with this.
댓글 수: 0
채택된 답변
dpb
2017년 7월 4일
편집: dpb
2017년 7월 5일
Evaluate the fit at the desired frequency for however long you have data and pass that result to fft
ADDENDUM: See the comment below for specific, but just use
yhat=resp_f(t);
to get predicted y at times t
댓글 수: 2
dpb
2017년 7월 6일
편집: dpb
2017년 7월 7일
If you did a Fourier fit, there's no content in the fitted signal other than that in the specific terms in the fitted equation and they're all known identically.
ADDENDUM
If you subsequently do actually calculate a PSD by either method, you'll see the peaks at the terms in the fitted model.
The spectrum will, however, not be single spikes at only those frequencies but will be smeared into adjacent frequency bins. These are simply artifacts, however, not actual "real" energy and are due to the windowing and symmetry effects inherent in the computation of a sampled signal.
추가 답변 (1개)
Image Analyst
2017년 7월 4일
Did you pass the signal into pwelch()? (Requires Signal Processing Toolbox.)
댓글 수: 2
dpb
2017년 7월 5일
편집: dpb
2017년 7월 5일
But you now already know what the frequency content of the fitted signal is from the series fit anyway????
Still, pwelch isn't enabled to process a cfit object, evaluate the fit and pass that...
t = [1:1:1800]./300;
[resp_f,gof,output] = fit(t',resp_signal,'fourier8');
[pxx2,w2] = pwelch(resp_f(t),[],[],[],Fs);
...
참고 항목
카테고리
Help Center 및 File Exchange에서 Spectral Estimation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!