Why damping amplitude the amplitude shifting position of y azis

1 回表示 (過去 30 日間)
nirwana
nirwana 2023 年 8 月 24 日
コメント済み: Star Strider 2023 年 8 月 24 日
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');

採用された回答

Star Strider
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 件のコメント
nirwana
nirwana 2023 年 8 月 24 日
but by write it mean that the damping amplitude is zero, what i want is damping amp stil perform but plot the signal with overlap (in the same start of y axis)
Star Strider
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 ExchangeFourier Analysis and Filtering についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by