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 CenterFile Exchange에서 Fourier Analysis and Filtering에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by