Regarding logarithmic chirp signal

30 次查看(过去 30 天)
$
$ 2020-10-23
评论: Mathieu NOE 2020-10-26
how to generate logarithmic chirp signal without inbuilt function in matlab
In matlab there is an inbuilt command to generate logarithmic chirp signal using
chirp(t,f0,t1,f1,'method') by simply replacing the method with 'lo', we will get the logarithmic chirp signal. i would like to know the basic mathermatical equation to generate the logarithmic chirp signal.
Thanks in advance.

回答(1 个)

Mathieu NOE
Mathieu NOE 2020-10-23
hi
simple demo below :
% log sweep demo
f1 = 50; % start freq
f2 = 200; % stop freq
Fs = 1e3; % sampling frequency
duration = 30; % s
%%%%%%%%%%%
dt = 1/Fs;
samples = floor(duration*Fs)+1;
t = (0:dt:(samples-1)*dt);
log10_freq = linspace(log10(f1),log10(f2),samples);
freq = 10.^log10_freq;
omega = 2*pi*freq;
angle_increment = omega.*dt;
angle = cumtrapz(angle_increment); % angle is the time integral of omega.
signal = sin(angle);
figure(1);
plot(t,signal)
%%%%%%%%%%%
% spectrogram demo
NFFT = 512; % to have highest frequency resolution , NFFT should be greater than typical max length of files ( 1 second duration at Fs = 16 kHz = 1600 samples);
overlap = 0.75;
w = hamming(NFFT);
fmin = 1;
fmax = Fs/2.56;
[sg,fsg,tsg] = specgram(signal,NFFT,Fs,hamming(NFFT),overlap*NFFT);
% plots sg
figure(2);
imagesc(tsg,fsg,20*log10(abs(sg)));axis('xy');colorbar('vert');
title(['Spectrogram / Fs = ' num2str(Fs) ' Hz / Delta f = ' num2str(fsg(2)-fsg(1)) ' Hz ']);
xlabel('Time (s)');ylabel('Frequency (Hz)');
  6 个评论
$
$ 2020-10-24
The formula shown there doesn't replicate the chirp signal obtained by default inbuilt function. That's why I am asking about exact mathematical formula to generate the chirp same as like inbuilt function
Mathieu NOE
Mathieu NOE 2020-10-26
hello
there are many publications on chirp signal formulato be found on the internet
I admit I didn't even look at it before I generate my demo code , as it was quite obvious for me.
Now I also don't understand what you are exactly looking for ? The formula are quite simple to code even if the built in function do it in it own way. As usual, there can be multiple ways to code one function;

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Spectral Measurements 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by