Square wave Chirp

7 views (last 30 days)
Bogie
Bogie on 9 Jan 2012
How can we generate a chirp sequence using square wave as oposed to sine?

Answers (2)

Dr. Seis
Dr. Seis on 9 Jan 2012
Here is an example:
signal_length = 20; % length of signal in seconds
wave_length = 2*pi; % wavelength of rectangle pulse in seconds
amplitude = 0.75; % amplitude of wave
dt = 1/(2*pi); % time increment in seconds
time = 0:dt:signal_length; % time samples in seconds
% Define the sine and rectangle signal timeseries
sinesignal = sin(2*pi*time/wave_length)*amplitude;
rectsignal = sign(sin(2*pi*time/wave_length)).*amplitude;
% Plot the timeseries
plot(time,rectsignal,'r-',time,sinesignal,'b-');
If you can generate a sinusoidal chip, then you can turn it into a square wave using the above. It basically takes a sinusoidal wave and throws everything away but the sign of the number (+/- 1) or 0. Then you would just multiply the square wave with you desired amplitude. Just make sure you have a large enough sample rate that your high frequency waves are not under-sampled.
EDIT
I didn't realize Matlab had something to generate a chirp signal, example modified above:
signal_length = 100; % length of signal in seconds
dt = 1/10; % time increment in seconds
time = 0:dt:signal_length; % time samples in seconds
amplitude = 0.75; % amplitude of wave
f0 = 0.01; % Frequency of wave at t0
f1 = 0.1; % Frequency of wave at time(end)
% Define the rectangle signal timeseries
chirpsignal = chirp(time,f0,time(end),f1)*amplitude;
squarechirpsignal = sign(chirpsignal)*amplitude;
% Plot the timeseries
plot(time,squarechirpsignal,'r-',time,chirpsignal,'b-');
  2 Comments
Walter Roberson
Walter Roberson on 9 Jan 2012
The sites I glanced at were pretty dismissive of that approach, and said things like "You could _call_ it a chirp signal but it will not have any of the desirable properties of a real chirp signal".
Dr. Seis
Dr. Seis on 9 Jan 2012
Is this because it losses its shape in the frequency domain, or...?

Sign in to comment.


Walter Roberson
Walter Roberson on 9 Jan 2012
The closest I can find to that topic is this paper, http://ieeexplore.ieee.org/xpl/freeabs_all.jsp?arnumber=308500

Categories

Find more on Measurements and Feature Extraction in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!