正弦捷变频信号
(1)时域信号
(2)频域图
频率步进捷变频信号
(1)时域图
(2)频域图
伪随机捷变频
(1)时域图
(2)频域图
代码
clear
clc
del = 10e6;%频率步进量
Fm = 1000;%调制频率
flag = '正弦捷变频';
Fs = 2e8; %采样率
Tr = 9e-6;
Br = 50e6;
PRF = 50e3;
Fc = 4e6;
Time = 0.0001;
N = 1;
delnum = fix(Br/del);
PRT= 1/PRF;
Nf = round(Fs*Tr);
Nr = round(Fs*PRT);
plusenum = ceil(Time/PRT);
Fi0 = zeros(1,plusenum);
for idm = 1:plusenum
switch flag
case'正弦捷变频'
Fi0(idm) = Fc+Br/2*sin(2*pi*Fm*(idm - 1)*PRT);
case'频率步进捷变频'
case'伪随机捷变频'
end
end
Nnum = round(Fs*Time);
Ttr = (-Nnum/2 + 1: Nnum/2)/Fs;
Signal = zeros(1,Nnum);
for idm = 1:plusenum
Fidm = Fi0(ceil(idm/N));
Tfast = Ttr((idm - 1)*Nr + 1:(idm - 1)*Nr+Nf);
Signal((idm - 1)*Nr + 1:(idm - 1)*Nr + Nf) = exp(1i*2*pi*Fidm*Tfast);
end
Signal = Signal(1:Nnum);
figure(1),
plot(real(Signal))
figure(2),
f = linspace(-Fs/2,Fs/2,Nnum);
plot(f,10*log10(fftshift(abs(fft(Signal)))/max(fftshift(abs(fft(Signal))))))