System object: phased.TimeVaryingGain
Apply time varying gains to input signal
Y = step(H,X)
Y = step(H,X) applies time varying gains
to the input signal
X. The process equalizes
power levels across all samples to match a given reference range.
The compensated signal is returned in
be a column vector, a matrix, or a cube. The gain is applied to each
X independently. The number of rows
X must match the length of the loss vector
specified in the
the same dimensionality as
The object performs an initialization the first time the
Apply time varying gain to a signal to compensate for signal power loss due to range.
rngloss = 10:22; refloss = 16; % in dB t = (1:length(rngloss))'; x = 1./db2mag(rngloss(:)); H = phased.TimeVaryingGain('RangeLoss',rngloss,... 'ReferenceLoss',refloss); y = step(H,x); % Plot signals tref = find(rngloss==refloss); stem([t t],[abs(x) abs(y)]); hold on; stem(tref,x(tref),'filled','r'); xlabel('Time (s)'); ylabel('Magnitude (V)'); grid on; legend('Before time varying gain',... 'After time varying gain',... 'Reference range');