1 简介
2 完整代码
%% Principle of Srationary Phase
close all, clear all, clc
%% the parameters of radar
T = 10e-6;
Tsyn = T; %脉冲持续时间
K = 1e12;
B = K*T; %线性调频信号带宽
% K = B/Tsyn ; %调频斜率
a = 1.3;
Fs = a*B; %抽样频率
Ts = 1/Fs; %样本间隔
TBP = B*Tsyn;
N = T/Ts;
%% time domain
t = [ -N/2 : N/2-1 ]*T/N ;
sita = pi*K*t.^2;
St = exp( i*sita ).*( abs( t ) <= Tsyn/2 ); %LFM signal
%% frequency domain
fre = [ -N/2 : N/2-1 ]*Fs/N ;
% -----FFT-----
% Sf = fft(St);
Sf = (fft(fftshift(St)));
% -----PSP-----
Sf2 = sqrt(Tsyn*Fs*a)*exp(-j*pi*fre.^2/K+j*pi/4).*(abs(fre)<=(K*Tsyn/2));
%% figure
h1 = figure( 1 ); set( h1, 'name', 'Linear Frequency Modulation Signal', 'Numbertitle', 'off')
subplot(121),plot( fre*1e-6, fftshift(abs( Sf ) ), 'r'); hold on
plot(fre*1e-6, abs( Sf2 ))
legend('FFT', 'PSP');
xlabel( 'Frequency/MHz ' ); ylabel( 'Amplitude' );
title( 'Amplitude-Frequency Specttrum' ); grid on;
%generate the figure 1.4
subplot(122),
plot( fre*1e-6, unwrap( angle( fftshift(Sf) ) ) ,'r'), hold on
% plot( fre*1e-6, phase( Sf ), 'g'), hold on
plot( fre*1e-6, unwrap( angle( (Sf2) ) ));
% plot( fre*1e-6, phase(Sf2) ,'r');
legend('FFT', 'PSP');
xlabel( 'Frequency/MHz' ), ylabel( 'Radian' ),
title( 'Radian-Frequency Specttrum' ), grid on;
figure
Sf = fftshift(Sf);
sf = Sf(N/2*(1-1/a)+1 : N/2*(1+1/a));
sf2= Sf2(N/2*(1-1/a)+1 : N/2*(1+1/a));
fre2 = [N/2*(1-1/a)+1 : N/2*(1+1/a)]*Fs/N-Fs/2;
plot( fre2, unwrap( angle( (sf) ) ), 'r.' ), hold on
error = unwrap( angle( (sf) ) ) - unwrap( angle( (sf2) ) );
plotyy( fre2, unwrap( angle( (sf2) ) ), fre2, error, 'plot', 'plot'), hold on
legend('FFT', 'PSP', 'ERROR');
xlabel( 'Frequency/MHz' ), ylabel( 'Radian' ), title( 'Radian' ),
grid on;
%% display information
disp('Chirp rate:')
K
disp('Time-Bandwidth Product:' )
TBP
disp('the mean of error:')
mean(error)
disp('the variance of error:')
var(error)
3 仿真结果
4 参考文献
[1]唐亮. 频率步进SAR/ISAR成像算法研究[D]. 国防科学技术大学, 2014.
博主简介:擅长智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等多种领域的Matlab仿真,相关matlab代码问题可私信交流。
部分理论引用网络文献,若有侵权联系博主删除。