Clear Filters
Clear Filters

I want to generate a Complex LFM Chirp waveform using a created chirp function known as git_chirp

30 views (last 30 days)
function x = git_chirp( T, W, p ) %CHIRP generate a sampled chirp signal % X = git_chirp( T, W,
) % X: N=pTW samples of a "chirp" signal % exp(j(W/T)pi*t^2) -T/2 <= t < +T/2 % T: time duration from -T/2 to +T/2 % W: swept bandwidth from -W/2 to +W/2 % optional: % P: samples at P times the Nyquist rate (W) % i.e., sampling interval is 1/(PW) % default is P = 1 % if nargin < 3 p = 1; end J = sqrt(-1); %-------------- delta_t = 1/(p*W); N = round( p*T*W ); %--same as T/delta_t, but rounded nn = [0:N-1]'; % x = exp( J*pi*W/T * (delta_t*nn - T/2).^2 ); % old version x = exp( J*pi*W/T * (delta_t*nn - (N-1)/2/p/W).^2 ); % symmetric version
Above is the code for the chirp function I want to model it with tau = 100 microseconds, swept bandwidth of 100kHz and oversample factor k =1.2.

Answers (1)

Moksh
Moksh on 15 Sep 2023
Hi Ardise,
You can try using the chirp function in MATLAB, for implementing a general linear complex chirp signal.
This function takes an array input specifying the time instances and the frequencies specified as ‘f0’ and ‘f1’ represents the frequencies at time 0 and ‘t1’.
Here is an example code for implementing this function:
%% General linear complex chirp signal
% Sampled for 10s at 1Khz
t = 0:1/1e3:10;
f0 = -200; % Initial frequency
f1 = 300; % End frequency
initial_phase = 0; % Initial Phase
% Plotting the chirp signal
y = chirp(t, f0, t(end), f1, "linear", initial_phase, "complex");
Please refer to the below documentation to know more about the “chirp” function:
Hope this helps!

Community Treasure Hunt

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

Start Hunting!