Why damping amplitude the amplitude shifting position of y azis
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
nirwana
am 24 Aug. 2023
Kommentiert: Star Strider
am 24 Aug. 2023
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 Kommentare
Akzeptierte Antwort
Star Strider
am 24 Aug. 2023
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 Kommentare
Star Strider
am 24 Aug. 2023
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.
.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Fourier Analysis and Filtering finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!