Clear Filters
Clear Filters

How to fix conjugated chirp signal frequency shift in spectrogram

5 views (last 30 days)
When a complex-valued linear chirp signal is converted to its conjugate, the frequency shifts to the maximum sampling rate beyond the Nyqust rate. This does not happen in real-valued linear chirp. Is there an option to limit the frequency shift?
Fs=2E3;
f0=0;
f1=0.5E3;
t1=0.5;
t=0:1/Fs:t1;
yc=chirp(t,f0,t1,f1,'complex');
figure
spectrogram(yc,[],256,512,Fs,'yaxis');
title('UP Chirp-Complex in Time-Freq ')
%Plot Conjugate chirp
conj_yc=conj(yc);
figure
spectrogram(conj_yc,[],256,512,Fs,'yaxis');
title('Conjugate-UP Chirp-Complex in Time-Freq ')
  2 Comments
Paul
Paul on 2 May 2024
Edited: Paul on 2 May 2024
Are you asking if there's a way to control how the plot from spectrogram looks? Or is this a question about why the frequency shifts?
Taehwan Kim
Taehwan Kim on 2 May 2024
It is the latter, why the frequency shifts when either conjugated or reversed that does not introduce any higher frequency component.

Sign in to comment.

Answers (1)

Paul
Paul on 2 May 2024
Edited: Paul on 3 May 2024
Conjugation in the time domain corresponds to reversal and conjugation in the frequency domain.
To get a basic idea of what's going on, suppose x[n] is represented by its discrete Fourier series.
x[n] = sum(a_n * exp(1j*w*n) )
Hopefully it's clear that the the DFT of x[n] is given by the coefficients
X[n] = a_n
Now, we take the conjugate
xc[n] = conj(x[n] = sum(conj(a_n) * exp(-1j*w*n)
Consequenlty, when taking the DFT of xc[n] we get a conjugate of the a_n and the negative sign in the exponential causes a reversal in the frequency domain.
We can illustrate this here:
Fs=2E3;
Use a 400 Hz complex sinusoid instead of a chirp
f0 = 400;
N = 10*Fs/f0;
t = (0:(N-1))/Fs;
y = (1+1i)*exp(1j*2*pi*f0*t);
Take the DFT (instead of the spectrogram) and center it in the frequency domain
Y = fftshift(fft(y));
fvec = ceil((0:N-1) - N/2)/N*Fs;
figure
stem(subplot(211),fvec,real(Y));
stem(subplot(212),fvec,imag(Y));
As expected, the spectral peaks of the real and imaginary parts are at 400 Hz.
Now do the same for the conjugate
Yc = fftshift(fft(conj(y)));
figure
stem(subplot(211),fvec,real(Yc));
stem(subplot(212),fvec,imag(Yc));
Now, the spectral peaks have shifted to -400 Hz, and the imaginary part is also negated, i.e., the DFT of the conjugate is the shfited, conjugate of the DFT. We see that the peak of the conjugate is still inside the Nyquist range, just on the negative side. These plots are synonymous to the 'centered' option in spectrogram.
We could plot them without centering, such as
Yc = fft(conj(y));
fvec = (0:N-1)/N*Fs;
figure
stem(subplot(211),fvec,real(Yc));
stem(subplot(212),fvec,imag(Yc));
Now, the peak that was at -400 Hz looks as if it's at -400 + Fs = 1600 Hz because of the inherent periodicity of the Fourier transform of a discrete-time signal. In fact, a 1600 Hz sinusoid is the same as -400 Hz sinusoid after sampling at 2000 Hz. These plots are synonymous with the 'twosided' option in spectrogram, which is the default for a complex input signal.

Products


Release

R2023b

Community Treasure Hunt

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

Start Hunting!