필터 지우기
필터 지우기

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