线性调频信号(LFM chirp)产生-复数式&余弦式

%线性调频信号的产生的matlab仿真代码
 
%...................................................................................%
 
clear all;
clc;
 
%%信号的参数设置
T=10e-6;             %pulse duration10us
B=30e6;              %chirp frequency modulation bandwidth 30MHz
K=B/T;               %chirp slope
Fs=2*B;Ts=1/Fs;      %sampling frequency and sample spacing
N=T/Ts;
f0 = 5e6;            %发射信号时的瞬时频率,也就是信号有效区间发射信号的中心频率
t=linspace(-T/2,T/2,N);
 
%...................................................................................%
A0 = 1;                         %发射信号的振幅
Phi0 = 0;                       %发射信号的随机初相
 
%...................................................................................%
 
 
%%产生线性调频信号
St1=exp(j*pi*K*t.^2);              %generate chirp signal
%St1=exp(j*(2*pi*f0*t-pi*K*t.^2))  %线性调频信号复数表达式
St2=cos(pi*K*t.^2);
%St2=cos(2*pi*f0*t+pi*K*t.^2)      %线性调频信号的余弦表达式
                             %用St1的实部St2=cos(2*pi*f0*t+pi*K*t.^2)来表示的线性调频信号
 
figure
subplot(311)
plot(t*1e6,real(St1));
xlabel('Time(us)');
ylabel('Amplitude(Watts)')
title('线性调频信号的实部');
grid on;
axis tight;
 
subplot(312)
plot(t*1e6,imag(St1));
xlabel('Time(us)');
ylabel('Amplitude(Watts)')
title('线性调频信号的虚部');
grid on;
axis tight;
 
subplot(313)
freq=linspace(-Fs/2,Fs/2,N);
plot(freq*1e-6,fftshift(abs(fft(St1))));  %先对St做傅里叶变换得到频谱,在取幅度值,然后将其移动到频谱中心
xlabel('Frequency(MHz)');
ylabel('Amplitude(Watts)')
title('线性调频信号的频谱');
grid on;
axis tight;
 
figure
subplot(211)
plot(t*1e6,real(St2));
xlabel('Time(us)');
ylabel('Amplitude(Watts)')
title('线性调频信号的实部');
grid on;
axis tight;
 
subplot(212)
freq=linspace(-Fs/2,Fs/2,N);
plot(freq*1e-6,fftshift(abs(fft(St2))));  %先对St做傅里叶变换得到频谱,在取幅度值,然后将其移动到频谱中心
xlabel('Frequency(MHz)');
ylabel('Amplitude(Watts)')
title('线性调频信号的频谱');
grid on;
axis tight;

在这里插入图片描述在这里插入图片描述

发布了83 篇原创文章 · 获赞 127 · 访问量 5万+

猜你喜欢

转载自blog.csdn.net/qq_40788950/article/details/89815210