Main Content

phased.TimeVaryingGain

Time varying gain control

Description

The TimeVaryingGain object applies a time varying gain to input signals. Time varying gain (TVG) is sometimes called automatic gain control (AGC).

To apply the time varying gain to the signal:

  1. Create the phased.TimeVaryingGain object and set its properties.

  2. Call the object with arguments, as if it were a function.

To learn more about how System objects work, see What Are System Objects?

Creation

Description

H = phased.TimeVaryingGain creates a time varying gain control System object™. The object applies a time varying gain to the input signal to compensate for the signal power loss due to the range.

example

H = phased.TimeVaryingGain(Name=Value) creates a time varying gain control System object with each specified property Name set to the specified Value. Specify optional pairs of arguments as (Name1=Value1,...,NameN=ValueN) where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Properties

expand all

Unless otherwise indicated, properties are nontunable, which means you cannot change their values after calling the object. Objects lock when you call them, and the release function unlocks them.

If a property is tunable, you can change its value at any time.

For more information on changing property values, see System Design in MATLAB Using System Objects.

Source of range losses, specified as either of these options.

  • 'Property' — Range loss for each sample is set in the RangeLoss property.

  • 'Input port' — Range losses are specified using an input argument to the step object function.

Loss at each input sample range, specified as a vector. The elements of the vector correspond to the samples in the input signal. Units are in dB.

Data Types: single | double

Loss at reference range, specified as a scalar. Units are in dB.

Data Types: single | double

Usage

Description

Y = H(X) applies time varying gains to the input signal matrix X. The process equalizes power levels across all samples to match a given reference range. The compensated signal is returned in Y.

Y = H(X,L) also specifies the range loss L.

Use this argument only when you set the RangeLossSource property to 'Input port'.

Input Arguments

expand all

Input signal, specified as column vector, matrix, or cube.

The time varying gain is applied to each column in X independently. The number of rows in X cannot exceed the length of the loss vector specified in the RangeLoss property.

The size of the first dimension of the input matrix can vary to simulate a changing signal length. A size change can occur, for example, in the case of a pulse waveform with variable pulse repetition frequency.

Data Types: single | double

Range loss, specified as a column vector.

Use this argument only when you set the RangeLossSource property to 'Input port'. The length of L must be equal to or greater than the number of rows of X.

Data Types: single | double

Output Arguments

expand all

Compensated signal, returned as a phased.TimeVaryingGain object.Y has the same dimensionality as X.

Object Functions

To use an object function, specify the System object as the first input argument. For example, to release system resources of a System object named obj, use this syntax:

release(obj)

expand all

stepRun System object algorithm
releaseRelease resources and allow changes to System object property values and input characteristics

Examples

collapse all

Apply time varying gain to a signal to compensate for signal power loss due to range.

First, create a signal with range loss. Set the reference loss to 16 dB.

rngloss = 10:22;
refloss = 16;
t = (1:length(rngloss))';
x = 1./db2mag(rngloss(:));

Then add gain to compensate for range loss.

gain = phased.TimeVaryingGain('RangeLoss',rngloss,'ReferenceLoss',refloss);
y = gain(x);

Plot the signal with loss and the compensated signal.

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')

Figure contains an axes object. The axes object with xlabel Time (s), ylabel Magnitude (V) contains 3 objects of type stem. These objects represent Before time varying gain, After time varying gain, Reference range.

Algorithms

expand all

References

[1] Edde, B. Radar: Principles, Technology, Applications. Englewood Cliffs, NJ: Prentice Hall, 1993.

[2] Skolnik, M. Introduction to Radar Systems, 3rd Ed. New York: McGraw-Hill, 2001.

Extended Capabilities

expand all

Version History

Introduced in R2011a