www.gusucode.com > phased 案例源码 matlab代码程序 > phased/PropagateWidebandSignalLOSChannelExample.m

    %% Propagate Wideband Signal in LOS Channel
% Propagate a wideband signal in a line-of-sight (LOS) channel from a radar
% at _(0,0,0)_ meters to a target at _(60,0,0)_ meters in medium fog. Set
% the fog liquid water density to 0.05 $g/m^3$. Assume rain is falling
% at 5 mm/hr. The signal carrier frequency is 20 GHz. The signal is a sum
% of four cw tones at 19.75, 19.875, 20.125, and 20.25 GHz. Set the
% signal duration to 0.5 microsecond and the sample rate to 2.0 GHz. Assume
% the radar is stationary and the target approaches the radar at 40 m/s.
% The atmospheric temperature is 12°C and the dry air pressure is
% 101.300 kPa.
%%
% Set the signal parameters and create the transmitted signal.
c = physconst('LightSpeed');
fs = 2e9;
freq = [-0.25,-.125,0.0,0.125,0.25]*1e9;
fc = 20.0e9;
dt = 1/fs;
t = [0:dt:.5e-6];
sig = sum(exp(1i*2*pi*t.'*freq),2);

%%
% Specify the atmosphere parameters and create the |phased.WidebandChannel|
% System object(TM).
lwd = 0.05;
rainrate = 5.0;
dap = 101300.0;
temp = 12.0;
sWBLOS = phased.WidebandLOSChannel('SampleRate',fs,'PropagationSpeed',c,...
    'SpecifyAtmosphere',true,'OperatingFrequency',fc,'RainRate',rainrate,...
    'LiquidWaterDensity',lwd,'Temperature',temp,'DryAirPressure',dap);

%%
% Specify the radar and target positions and velocities.
xradar = [0,0,0].';
vradar = [0,0,0].';
xtgt = [60,0,0].';
vtgt = [-40,0,0].';

%%
% Propagated the signal using the |step| method.
prop_sig = step(sWBLOS,sig,xradar,xtgt,vradar,vtgt);
%%
% Plot the propagated signal. For a target range of 60 m, the propagation
% delay is 0.20 μs as shown in the plot.
plot(t*1e6,real(prop_sig))
grid
xlabel('Time (\mu sec)')
ylabel('Amplitude')