cp0901_sm2_ppm.m
来自「这个是超宽带2ppm的经典程序」· M 代码 · 共 53 行
M
53 行
%
% Function 9.1: "cp0901_sm2_PPM"
%
% Evaluates the term SIGMAm^2 ('sm2') for an input 'pulse'
% sampled ad 'fc'.'PPMshift' is the value in seconds
% of the PPM shift.
%
% Programmed by Guerino Giancola
%
function [sm2] = cp0901_sm2_PPM(pulse,PPMshift,fc)
% ---------------------------------
% Step One - Evaluation of SIGMAm^2
% ---------------------------------
dt = 1 / fc;
PPM_samples = floor(PPMshift/dt);
pulse_samples = length(pulse);
% energy normalization
Ep = sum((pulse.^2).*dt);
pulse = pulse./sqrt(Ep);
p0 = zeros(1,PPM_samples+pulse_samples);
p0(1:length(pulse)) = pulse;
p1 = cp0804_signalshift(p0,fc,PPMshift);
% single pulse correlator mask for PPM
v = p0-p1;
LM = length(v);
LS = LM + 2*pulse_samples;
pa = zeros(1,LS);
pb = zeros(1,LS);
pa(1:pulse_samples) = pulse;
pb(1:LM) = v;
for tau = 0 : (LS-1)
pc = cp0804_signalshift(pa,fc,tau*dt);
% result of the internal integration
I(tau+1) = (sum((pc.*pb).*dt))^2;
end % for tau = 0 : (LS-1)
sm2 = sum(I.*dt);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?