线性调频信号(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;

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

  • 7
    点赞
  • 26
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值