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!