<< atoms Choice of Particular Signals dopnoise >>

Time Frequency Toolbox >> Time Frequency Toolbox > Choice of Particular Signals > chirp

chirp

Evaluate a chirp signal at time t. A chirp signal is a frequency swept cosine wave.

Calling Sequence

y = chirp(t)
y = chirp(t,f0)
y = chirp(t,f0,t1)
y = chirp(t,f0,t1,f1)
y = chirp(t,f0,t1,f1,form)
y = chirp(t,f0,t1,f1,form,phase)

Parameters

t:

vector of times to evaluate the chirp signal

f0:

frequency at time t=0 [0 Hz]

t1:

time t1 [1 sec]

f1:

frequency at time t=t1 [100 Hz]

form:

shape of frequency sweep; 'linear' : f(t) = (f1-f0)*(t/t1) + f0, , 'quadratic': f(t) = (f1-f0)*(t/t1)^2 + f0, 'logarithmic': f(t) = (f1-f0)^(t/t1) + f0

phase:

phase shift at t=0

Description

If you want a different sweep shape f(t), use the following: y = cos(2*%pi*integral(f(t)) + 2*%pi*f0*t + phase);

Examples

tfrsp(chirp([0:0.001:5])',1:5001,128,'plot'); // linear, 0-100Hz in 1 sec
tfrsp(chirp([-2:0.001:15], 400, 10, 100, 'quadratic')',1:5001,128,'plot');
plot(chirp([0:1/8000:5], 200, 2, 500, "logarithmic"));

// Shows linear sweep of 100 Hz/sec starting at zero for 5 sec
// since the sample rate is 1000 Hz, this should be a diagonal
// from bottom left to top right.
tfrsp(chirp([0:0.001:5])',1:5001,128,'plot'); // linear, 0-100Hz in 1 sec

// Shows a quadratic chirp of 400 Hz at t=0 and 100 Hz at t=10
// Time goes from -2 to 15 seconds.
stacksize('max');
tfrsp(chirp([-2:0.001:15], 400, 10, 100, 'quadratic')',1:17001,128,'plot');

// Shows a logarithmic chirp of 200 Hz at t=0 and 500 Hz at t=2
// Time goes from 0 to 5 seconds at 8000 Hz.
stacksize('max');
tfrsp(chirp([0:1/8000:5], 200, 2, 500, "logarithmic")',1:40001,128,'plot');

Authors

<< atoms Choice of Particular Signals dopnoise >>