Help to generate radar chirp signal

Hi,
i am interesting in generating a linear chirp signal for simulating radar signal. I find out there is a function in matlab called: _Y = CHIRP(T,F0,T1,F1)_This function generates samples of a linear swept-frequency signal at the time instances defined in array T. The instantaneous frequency at time 0 is F0 Hertz. The instantaneous frequency F1 is achieved at time T1. By default, F0=0, T1=1, and F1=100.
But, i am confused as i do not know which will be a suitable sample rate. Can you help me? Could you write me a simple and brief example? Do i need other data, such as bandwidth or pulsewidth?

3 Comments

Any help?
The shape of the chirp is based on the amplitude of each successive sample. The sampling rate would be determined by the bandwidth of your radar signal.
Mike
Mike on 6 Feb 2013
Edited: Mike on 7 Feb 2013
Thank you.Can you help me more about sampling rate?

Sign in to comment.

Answers (2)

Honglei Chen
Honglei Chen on 5 Feb 2013
Edited: Honglei Chen on 5 Feb 2013
I suggest you to take look at Phased Array System Toolbox if you have access to it.
There are two issues with chirp:
  1. It only generates real chirp, if you want a complex band for your radar, you need to do it twice.
  2. It does not generate a pulse so if you are simulating a pulse radar, you need to pad zero yourself.
If you want to use chirp, the sample rate is defined in the first argument, T. The bandwidth is defined by the difference of F0 and F1 and the pulse width is defined in T1.

14 Comments

Thank you for your reply.
2. Can you provide me more information? If i can generate a pulse chirp signal to simulate a pulse radar, it would be the best.
I can find the bandwidth and the pulse width of the radar. To set the correct bandwidth, i will set F0=0, F1=1000, if the bandwidth is bw=1000Hz? Can i generate pulse chirp signal using the chirp function?
In addition, which will be a proper sample rate if the radar works on the X-band (10-12 GHz)?
hi Mike, the proper sample rate Fs must satisfy : Fs>= 2* F2
in this case : Fs >= 24 GHz
Let's say your pulse width is 1 second and your duty cycle is 50% so your signal has a PRF of 0.5 Hz. If you can simulate things in the baseband, then all you need is to sample at the Nyquist rate defined by the bandwidth. So in your case, you need the sample rate to be 2*bw=2000Hz. So as an example, using your numbers, you can generate the signal as
bw = 1000;
Fs = 2*bw;
pw = 1;
prf = 0.5;
t = 0:1/Fs:1/prf-1/Fs;
Nsamp = numel(t);
x = zeros(Nsamp,1);
x(1:Nsamp/2)=chirp(t(1:Nsamp/2),0,pw,bw);
plot(t,x)
As previously i used this signal to see its behaviour while using Compressed Sensing: f = (sin(2*pi*697*t) + sin(2*pi*1633*t))/2;, i would like to generate a chirp signal as similar as possible. I found the bandwidth by plotting the signal using this way: plot(20*log10(abs(fft(f)))) , and then i see the lower and upper value. I subtract the two values and i have calculated the bandwidth.
Is there any way to define or find a proper pulse width, if i want to use this function: Y = CHIRP(T,F0,T1,F1) to generate a chirp signal? Or can i ignore the T1 arg?
P.S.: T=sample rate, F0 & F1 express the lower and higher frequency, T1: pulse width
Thank you in advance.
T1 is where you want to reach the frequency F1, i.e., the end of your bandwidth. If you don't need the zero after that, then simply set prf as 1 in my previous example. Alternatively, if you really liked your previous t vector, just use that t and set T1 to t(end)
Mike
Mike on 7 Feb 2013
Edited: Mike on 7 Feb 2013
Thank you for your reply. On my example i use the data below:
Fs = 40000;
t = (1:Fs/8)'/Fs;
f = (sin(2*pi*697*t) + sin(2*pi*1633*t))/2;
But, i am sorry, i cannot understand. Which will be the T1 arg on the chirp() function?
use t(end), like
chirp(t,0,t(end),1000)
Mike
Mike on 7 Feb 2013
Edited: Mike on 7 Feb 2013
Thank you. Now it is clear. But instead of F1=1000 i think it is better to use the upper frequency of bandwidth. What do you think? For my signal i have these values:
F0=16;%lower frequency
F1=4987;%upper frequency
These frequencies are shown by this command:
plot(20*log10(abs(fft(f))))
So, instead of F1=1000 i think it is better to use F1=4987. Please, correct me if i am wrong.
Yes, this is up to you, I'm really just giving an example here since in one of your comment you used 1000 Hz for bandwidth.
Thank you so much for all your help!
I have generated chirp signal in matlab and i have to transmit it through an antenna in USRP 2920. But for that I will have to convert the chirp into a complex baseband signal for my radar. How shall i accomplish that?
You can try hilbert which will return the analytical signal.
Honglei Chen,
We were given a complex baseband signal, below. How can we create a pulsed waveform from this signal with 50% duty cycle? Also how can we output I(t) and Q(t) (as ascii files)?
% Waveform parameters
pulse_width = 100e-6;
bandwidth = 500e6;
center_frequency = 10e9;
% Receiver parameters
adc_sample_rate = 2e9;
lo_freq = 10e9; % For baseband, lo = center_freq of waveform
% FM Slope
lfm_slope = bandwidth / pulse_width;
% Number of ADC samples in a pulse
nsamp = pulse_width * adc_sample_rate;
% Sample time grid
t = ((0 : nsamp - 1) - 0.5 * (nsamp + 1)) / adc_sample_rate;
% Calculate transmit phase
phi_tx = pi * lfm_slope * t.^2 ...
+ 2*pi * (center_frequency) * t;
% Calculate receiver LO phase
phi_rcv = 2*pi * lo_freq * t;
% Calcuate phase of received signal
phi = phi_tx - phi_rcv;
% Calculate signal
s = exp(1i * phi); % Baseband signal is complex

Sign in to comment.

Youssef  Khmou
Youssef Khmou on 6 Feb 2013
Edited: Youssef Khmou on 6 Feb 2013
Hi Mike , i suggest to take a look at this topic :
Here is the code :
Fs=1000; % sample rate
tf=2; % 2 seconds
t=0:1/Fs:tf-1/Fs;
f1=100;
f2=400; % start @ 100 Hz, go up to 400Hz
semi_t=0:1/Fs:(tf/2-1/Fs);
sl=2*(f2-f1/2);
f1=f1*semi_t+(sl.*semi_t/2);
f2=f1(end)+f2*semi_t-sl.*semi_t/2;
f=[f1 f2];
y=1.33*cos(2*pi*f.*t);
plot(t,y)
You alter the code by changing f1,f2 and Fs>2*f2 .
Or you can tape "chirp" in the Help Mat, to see the 5 EXAMPLES provided there with a good way to visualize the frequency via spectrogram .

5 Comments

Thank you for your detailed answer. If i am right, f1 and f2 are the start and end of the bandwidth frequency. Could you please tell me why do you change the f1, f2 frequencies? Duo to example needs?
I have to choose a sample rate at least the double of the max frequency according to the Nyquist law??
1.because there must no discontinuity in the dynamic frequency,
2.yes Fs>2*Max([f1 f2])
Mike
Mike on 7 Feb 2013
Edited: Mike on 7 Feb 2013
Thank you.
2. But, i intend to use Compressed Sensing to reconstruct my signal. So, if i sample according to Nyquist rate, this will be too expensive. Any better idea?
Hi, im afraid i can not tell to much about that, you can try to work with snapshots like getting 500 snapshots (small duration) from the source and sample with 24e+9. but an advice is needed from real-time specialist .
Thank you.

Sign in to comment.

Categories

Find more on Waveform Design and Signal Synthesis in Help Center and File Exchange

Asked:

on 31 Jan 2013

Commented:

on 12 Jul 2019

Community Treasure Hunt

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

Start Hunting!