Why damping amplitude the amplitude shifting position of y azis
조회 수: 1 (최근 30일)
이전 댓글 표시
I damped the amplitude signal using by multiplied the freq with 0.5 after fft result, and returning the signal to time domain using ifft, but the returning signal that i get is shifting in Y axis as shown below. Should I multiplied y to some number to ifft result. Why it is happened? Is it effect of fft? But it does't happend if i use sinewave starting with 0 in y axis.
%DAMPLING AMPLITUDE USING REAL DATA
SMR=load ("sig_fft.txt");
SMR_data=SMR(:,2);
srateSMR=1/100;
SMR_Damp=real(ifft(fft(SMR_data)*0.5));
tSMR=(1:length(SMR_data));
figure(2)
plot(tSMR,SMR_data,'r',tSMR,SMR_Damp,'b');
댓글 수: 0
채택된 답변
Star Strider
2023년 8월 24일
It would help to have the file to demonstrate with it, however that may not be absolutely necessary.
The signal in the file (red curve) has an obvious constnt offset (D-C offset) value that looks to be about -1.2. Muttiplying the fft of that signal by 0.5 produces a result (blue curve) that is offset by about -0.6. The sine curve used to test it has a 0 offset, so there is no similar shift.
댓글 수: 4
Star Strider
2023년 8월 24일
I am not certain that I understand.
If you want to decrease the signal amplitude without affecting the D-C offset, do something like this —
Fs = 10000;
Tlen = 1000;
t = linspace(0, Tlen*Fs, Tlen*Fs+1).'/Fs;
SMR_data = sin(2*pi*0.015*t) .* sin(2*pi*0.001*t+pi)-1.2;
SMR_Damp = (real(ifft(fft(SMR_data)))-mean(SMR_data))*0.5 + mean(SMR_data);
figure
plot(t, SMR_data,'r', t, SMR_Damp,'b')
legend('SMR\_data','SMR\_Damp', 'Location','best')
The procedure is to subtract the mean (D-C offset), do the multiplication, then add the mean value back.
.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Fourier Analysis and Filtering에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!