Why the FFT of the conjugate doesn't coincide exactly at the negative frequency of interest?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
I am trying to understand why the conjugate of a signal in the time domain doesn't produce an exact flip of the frequency domain spectrum. There is always a one-pixel shift in the result.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/601195/image.png)
The MATLAB code is shown below. I use a flip for the conjugate spectrum to show that it doesn't match the original spectrum and there is a delay of one resolution cell. I want to understand why this happens. It shouldn't as it is the perfect conjugate.
v_max = 7.5;
v = 5;
N = 128;
PRT = 1e-3;
lambda = 0.03;
vel_axis = linspace(-v_max, v_max, N);
x = exp(1j .* 4 .* pi .* v ./ lambda .* (1:N) .* PRT);
x_conj = conj(exp(1j .* 4 .* pi .* v ./ lambda .* (1:N) .* PRT));
x_fft = 1/sqrt(N) .* fftshift(fft(x, N));
x_conj_fft = 1/sqrt(N) .* fftshift(fft(x_conj, N));
figure; plot(vel_axis, db(abs(x_fft)), 'LineWidth', 2); hold on; plot(vel_axis, flip(db(abs(x_conj_fft))), 'LineWidth', 2);grid on;
0 Commenti
Risposta accettata
Matt J
il 29 Apr 2021
Modificato: Matt J
il 29 Apr 2021
Because the frequency origin shouldn't change positions when you do a frequency reversal. But with an even length array N, the flip() command will always relocate all elements in the array.
12 Commenti
Matt J
il 30 Apr 2021
Modificato: Matt J
il 30 Apr 2021
Here is an alternative way you could set up the sampling so that time is at the fftshift center, but still give you the same spectra. Since your code only involves the amplitude spectrum, it doesn't ultimately matter in this case where your time origin starts - the amplitude spectrum is invariant to time shifts.
N=128;
v_max = 7.5;
PRT = 1e-3;
v=5;
lambda=0.03;
dt=2*PRT/lambda; %time sampling interval
dv=1/N/dt; %fourier sampling interval
Axis=(0:N-1)-ceil((N-1)/2);
t_axis=Axis*dt;
vel_axis =Axis*dv;
x = exp(1j .* 2 .* pi .* v .* t_axis) ;
Fourier=@(z) 1/sqrt(N).* fftshift(fft(ifftshift(z)));
x_fft = Fourier(x);
x_conj_fft = Fourier(conj(x));
figure; plot(vel_axis, db(abs(x_fft)), 'LineWidth', 2);
hold on;
plot(vel_axis, db(abs(x_conj_fft)), 'LineWidth', 2);
hold off
grid on;
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Bartlett in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!