Issue with Chirp function in Matlab

3 次查看(过去 30 天)
Hello,
I am currently facing an issue with the chirp function in Matlab. It works correctly for certain parameters, however I am not getting the expected chirp for another set of parameters. I have compared the result with exponential function as well, but getting the same problem.
fc = 77e9;
BW = 1500e6;
Sp_T = 204.8e-6;
fs = 2.*BW;
ts = real(1./fs);
t = 0:ts:Sp_T-ts;
Swp_S = BW./Sp_T;
Sig1 = chirp(t,fc,t(end),fc+BW,'complex'); % Using chirp function
Sig2 = 1.*exp(1i.*(2.*pi.*(fc.*t+0.5.*Swp_S.*t.^2))); % using exponential
figure;subplot(211);plot(t,real(Sig_C));
[S,F,~,~] = spectrogram(Sig1,64,32,128,fs,'yaxis');subplot(212);imagesc(t*1e6,F*1e-9,abs(S));set(gca,'YDir','normal')
Both the signals Sig1 and Sig2 gave the similar result attached below:
The shift in frequency is also visible in the time domain plot.
However, as soon as the bandwidth is changed to 1000e6 or 2000e6 (keeping all the other parameters same), the chirp becomes linear.
Furthermore, how is it identified where to start the spectrogram plot? In both the cases, the start frequency is same, I just changed the bandwidth. But on the spectrogram plot, both the signals start with a different frequency.
Regards
Anum

采纳的回答

Mathieu NOE
Mathieu NOE 2021-3-3
hello
there are a few points that I don't understand :
  • why 'complex' chirp signal ? we can only plot real signal
  • the sampling frequency is inconsistent with how you define the frequency range of the chirp. You specifiy the min freq = fc and the max freq = fc + BW. the sampling rate must be at least 2 x the max freq (= fc + BW) and not 2 x BW.
also I noticed , the frequency variation is very low , only +2% of increase - really ? this is to be seen in the spectrogram plot, the line is almost horizontal and located at the fc = 77e9 Hz
see code below :
fc = 77e9;
BW = 1500e6;
Sp_T = 204.8e-6;
fs = 3.*(fc+BW);
ts = real(1./fs);
t = 0:ts:Sp_T-ts;
Swp_S = BW./Sp_T;
Sig1 = chirp(t,fc,t(end),fc+BW,'real'); % Using chirp function
% Sig2 = 1.*exp(1i.*(2.*pi.*(fc.*t+0.5.*Swp_S.*t.^2))); % using exponential
figure;subplot(211);plot(t,real(Sig1));
[S,F,~,~] = spectrogram(Sig1,64,32,128,fs,'yaxis');
subplot(212);imagesc(t*1e6,F*1e-9,abs(S));set(gca,'YDir','normal')
  2 个评论
Anum Ahmed Pirkani
Anum Ahmed Pirkani 2021-3-11
Many thanks for this Mathieu...
1) I neede dI/Q signal for the downconversion later on, so used complex.
2) As I later had to perform downconversion, so though of using sampling frequency twice of bandwidth, which was the maximum expected frequency after downconversion. A higher sampling frequency was actually taking too much time to process.
But not I have defined the time vector according to fs = 3*(fc+B) and am later decimating the time vector. So everything is working fine without too much load on the system.
Many thanks...!!!

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Time-Frequency Analysis 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by