# phased.gpu.ConstantGammaClutter

Simulate constant-gamma clutter using GPU

## Description

The phased.gpu.ConstantGammaClutter object simulates clutter, performing the computations on a GPU.

### Note

To use this object, you must install a Parallel Computing Toolbox™ license and have access to an appropriate GPU. For more about GPUs, see GPU Computing (Parallel Computing Toolbox).

To compute the clutter return:

1. Define and set up your clutter simulator. See Construction.

2. Call step to simulate the clutter return for your system according to the properties of phased.gpu.ConstantGammaClutter. The behavior of step is specific to each object in the toolbox.

The clutter simulation that ConstantGammaClutter provides is based on these assumptions:

• The radar system is monostatic.

• The propagation is in free space.

• The terrain is homogeneous.

• The clutter patch is stationary during the coherence time. Coherence time indicates how frequently the software changes the set of random numbers in the clutter simulation.

• Because the signal is narrowband, the spatial response and Doppler shift can be approximated by phase shifts.

• The radar system maintains a constant height during simulation.

• The radar system maintains a constant speed during simulation.

### Note

Starting in R2016b, instead of using the step method to perform the operation defined by the System object™, you can call the object with arguments, as if it were a function. For example, y = step(obj,x) and y = obj(x) perform equivalent operations.

## Construction

H = phased.gpu.ConstantGammaClutter creates a constant-gamma clutter simulation System object, H. This object simulates the clutter return of a monostatic radar system using the constant gamma model.

H = phased.gpu.ConstantGammaClutter(Name,Value) creates a constant gamma clutter simulation object, H, with additional options specified by one or more Name,Value pair arguments. Name is a property name, and Value is the corresponding value. Name must appear inside single quotes (''). You can specify several name-value pair arguments in any order as Name1,Value1,…,NameN,ValueN.

## Properties

Sensor

Handle of sensor

Specify the sensor as an antenna element object or as an array object whose Element property value is an antenna element object. If the sensor is an array, it can contain subarrays.

Default: phased.ULA with default property values

PropagationSpeed

Signal propagation speed

Specify the propagation speed of the signal, in meters per second, as a positive scalar.

Default: Speed of light

OperatingFrequency

System operating frequency

Specify the operating frequency of the system in hertz as a positive scalar. The default value corresponds to 300 MHz.

Default: 3e8

SampleRate

Sample rate

Specify the sample rate, in hertz, as a positive scalar. The default value corresponds to 1 MHz.

Default: 1e6

PRF

Pulse repetition frequency

Pulse repetition frequency, PRF, specified as a scalar or a row vector. Units are in Hz. The pulse repetition interval, PRI, is the inverse of the pulse repetition frequency, PRF. ThePRF must satisfy these restrictions:

• The product of PRF and PulseWidth must be less than or equal to one. This condition expresses the requirement that the pulse width is less than one pulse repetition interval. For the phase-coded waveform, the pulse width is the product of the chip width and number of chips.

• The ratio of sample rate to any element of PRF must be an integer. This condition expresses the requirement that the number of samples in one pulse repetition interval is an integer.

You can select the value of PRF using property settings alone or using property settings in conjunction with the prfidx input argument of the step method.

• When PRFSelectionInputPort is false, you set the PRF using properties only. You can

• implement a constant PRF by specifying PRF as a positive real-valued scalar.

• implement a staggered PRF by specifying PRF as a row vector with positive real-valued entries. Then, each call to the step method uses successive elements of this vector for the PRF. If the last element of the vector is reached, the process continues cyclically with the first element of the vector.

• When PRFSelectionInputPort is true, you can implement a selectable PRF by specifying PRF as a row vector with positive real-valued entries. But this time, when you execute the step method, select a PRF by passing an argument specifying an index into the PRF vector.

In all cases, the number of output samples is fixed when you set the OutputFormat property to 'Samples'. When you use a varying PRF and set the OutputFormat property to 'Pulses', the number of samples can vary.

Default: 10e3

PRFSelectionInputPort

Enable PRF selection input

Enable the PRF selection input, specified as true or false. When you set this property to false, the step method uses the values set in the PRF property. When you set this property to true, you pass an index argument into the step method to select a value from the PRF vector.

Default: false

Gamma

Terrain gamma value

Specify the $\gamma$ value used in the constant $\gamma$ clutter model, as a scalar in decibels. The $\gamma$ value depends on both terrain type and the operating frequency.

Default: 0

EarthModel

Earth model

Specify the earth model used in clutter simulation as one of | 'Flat' | 'Curved' |. When you set this property to 'Flat', the earth is assumed to be a flat plane. When you set this property to 'Curved', the earth is assumed to be a sphere.

Default: 'Flat'

PlatformHeight

Specify the radar platform height (in meters) measured upward from the surface as a nonnegative scalar.

Default: 300

PlatformSpeed

Specify the radar platform’s speed as a nonnegative scalar in meters per second.

Default: 300

PlatformDirection

Specify the direction of radar platform motion as a 2-by-1 vector in the form [AzimuthAngle; ElevationAngle] in degrees. The default value of this property indicates that the platform moves perpendicular to the radar antenna array’s broadside.

Both azimuth and elevation angle are measured in the local coordinate system of the radar antenna or antenna array. Azimuth angle must be between –180 and 180 degrees. Elevation angle must be between –90 and 90 degrees.

Default: [90;0]

Specify the depression angle in degrees of the broadside of the radar antenna array. This value is a scalar. The broadside is defined as zero degrees azimuth and zero degrees elevation. The depression angle is measured downward from horizontal.

Default: 0

MaximumRange

Maximum range for clutter simulation

Specify the maximum range in meters for the clutter simulation as a positive scalar. The maximum range must be greater than the value specified in the PlatformHeight property.

Default: 5000

AzimuthCoverage

Azimuth coverage for clutter simulation

Specify the azimuth coverage in degrees as a positive scalar. The clutter simulation covers a region having the specified azimuth span, symmetric to 0 degrees azimuth. Typically, all clutter patches have their azimuth centers within the region, but the PatchAzimuthWidth value can cause some patches to extend beyond the region.

Default: 60

PatchAzimuthWidth

Azimuth span of each clutter patch

Specify the azimuth span of each clutter patch in degrees as a positive scalar.

Default: 1

TransmitSignalInputPort

Add input to specify transmit signal

Set this property to true to add input to specify the transmit signal in the step syntax. Set this property to false omit the transmit signal in the step syntax. The false option is less computationally expensive; to use this option, you must also specify the TransmitERP property.

Default: false

TransmitERP

Effective transmitted power

Specify the transmitted effective radiated power (ERP) of the radar system in watts as a positive scalar. This property applies only when you set the TransmitSignalInputPort property to false.

Default: 5000

CoherenceTime

Clutter coherence time

Specify the coherence time in seconds for the clutter simulation as a positive scalar. After the coherence time elapses, the step method updates the random numbers it uses for the clutter simulation at the next pulse. A value of inf means the random numbers are never updated.

Default: inf

OutputFormat

Output signal format

Specify the format of the output signal as one of | 'Pulses' | 'Samples' |. When you set the OutputFormat property to 'Pulses', the output of the step method is in the form of multiple pulses. In this case, the number of pulses is the value of the NumPulses property.

When you set the OutputFormat property to 'Samples', the output of the step method is in the form of multiple samples. In this case, the number of samples is the value of the NumSamples property. In staggered PRF applications, you might find the 'Samples' option more convenient because the step output always has the same matrix size.

Default: 'Pulses'

NumPulses

Number of pulses in output

Specify the number of pulses in the output of the step method as a positive integer. This property applies only when you set the OutputFormat property to 'Pulses'.

Default: 1

NumSamples

Number of output samples

Specify the number of output samples of the step method as a positive integer. Typically, you use the number of samples in one pulse. This property applies only when you set the OutputFormat property to 'Samples'.

Default: 100

SeedSource

Source of seed for random number generator

Specify how the object generates random numbers. Values of this property are:

 'Auto' Random numbers come from the global GPU random number stream.'Auto' is appropriate in a variety of situations. In particular, if you want to use a generator algorithm other than mrg32k3a, set SeedSource to 'Auto'. Then, configure the global GPU random number stream to use the generator of your choice. You can configure the global GPU random number stream using parallel.gpu.RandStream and parallel.gpu.RandStream.setGlobalStream. 'Property' Random numbers come from a private stream of random numbers. The stream uses the mrg32k3a generator algorithm, with a seed specified in the Seed property of this object.If you do not want clutter computations to affect the global GPU random number stream, set SeedSource to 'Property'.

Default: 'Auto'

Seed

Seed for random number generator

Specify the seed for the random number generator as a scalar integer between 0 and 232–1. This property applies when you set the SeedSource property to 'Property'.

Default: 0

## Methods

 reset Reset random numbers and time count for clutter simulation step Simulate clutter using constant gamma model
Common to All System Objects
release

Allow System object property value changes

## Examples

collapse all

Simulate the clutter return from terrain with a gamma value of 0 dB. The effective transmitted power of the radar system is 5 kW.

Set up the characteristics of the radar system. This system uses a 4-element uniform linear array (ULA). The sample rate is 1 MHz, and the PRF is 10 kHz. The propagation speed is the speed of light, and the operating frequency is 300 MHz. The radar platform is flying 1 km above the ground with a path parallel to the ground along the array axis. The platform speed is 2000 m/s. The mainlobe has a depression angle of 30°.

Nele = 4;
c = physconst('Lightspeed');
fc = 300e6;
lambda = c/fc;
array = phased.ULA('NumElements',Nele,'ElementSpacing',lambda/2);
fs = 1e6;
prf = 10e3;
height = 1000.0;
direction = [90;0];
speed = 2.0e3;
depang = 30.0;

Create the GPU clutter simulation object. The configuration assumes the earth is flat. The maximum clutter range of interest is 5 km, and the maximum azimuth coverage is ±60°.

Rmax = 5000;
Azcov = 120;
tergamma = 0;
tpower = 5000;
clutter = phased.gpu.ConstantGammaClutter('Sensor',array, ...
'PropagationSpeed',c,'OperatingFrequency',fc,'PRF',prf, ...
'SampleRate',fs,'Gamma',tergamma,'EarthModel','Flat' ,...
'TransmitERP',tpower,'PlatformHeight',height,...
'PlatformSpeed',speed,'PlatformDirection',direction, ...
'AzimuthCoverage',Azcov,'SeedSource','Property', ...
'Seed',40547);

Simulate the clutter return for 10 pulses.

Nsamp = fs/prf;
Npulse = 10;
clsig = zeros(Nsamp,Nele,Npulse);
for m = 1:Npulse
clsig(:,:,m) = clutter();
end

Plot the angle-Doppler response of the clutter at the 20th range bin.

response = phased.AngleDopplerResponse('SensorArray',array, ...
'OperatingFrequency',fc,'PropagationSpeed',c,'PRF',prf);
plotResponse(response,shiftdim(clsig(20,:,:)),'NormalizeDoppler',true);

The results are not identical to the results obtained by using phased.ConstantGammaClutter because of differences between CPU and GPU computations.

Simulate the clutter return from terrain with a gamma value of 0 dB. You input the transmit signal of the radar system when creating clutter. In this case, you do not specify the effective transmitted power of the signal in a property.

Set up the characteristics of the radar system. This system has a 4-element uniform linear array (ULA). The sample rate is 1 MHz, and the PRF is 10 kHz. The propagation speed is the speed of light, and the operating frequency is 300 MHz. The radar platform is flying 1 km above the ground with a path parallel to the ground along the array axis. The platform speed is 2000 m/s. The mainlobe has a depression angle of 30°.

Nele = 4;
c = physconst('LightSpeed');
fc = 300e6;
lambda = c/fc;
ha = phased.ULA('NumElements',Nele,'ElementSpacing',lambda/2);
fs = 1e6;
prf = 10e3;
height = 1000;
direction = [90;0];
speed = 2000;
depang = 30;

Create the GPU clutter simulation object and configure it to take a transmitted signal as an input argument. The configuration assumes the earth is flat. The maximum clutter range of interest is 5 km, and the maximum azimuth coverage is ±60°.

Rmax = 5000;
Azcov = 120;
tergamma = 0;
clutter = phased.gpu.ConstantGammaClutter('Sensor',ha,...
'PropagationSpeed',c,'OperatingFrequency',fc,'PRF',prf,...
'SampleRate',fs,'Gamma',tergamma,'EarthModel','Flat',...
'TransmitSignalInputPort',true,'PlatformHeight',height,...
'PlatformSpeed',speed,'PlatformDirection',direction,...
'AzimuthCoverage',Azcov,'SeedSource','Property','Seed',40547);

Simulate the clutter return for 10 pulses. At each object call, pass the transmit signal as an input argument. The software automatically computes the effective transmitted power of the signal. The transmit signal is a rectangular waveform with a pulse width of 2 μs.

tpower = 5000;
pw = 2e-6;
X = tpower*ones(floor(pw*fs),1);
Nsamp = fs/prf;
Npulse = 10;
clsig = zeros(Nsamp,Nele,Npulse);
for m = 1:Npulse
clsig(:,:,m) = clutter(X);
end

Plot the angle-Doppler response of the clutter at the 20th range bin.

response = phased.AngleDopplerResponse('SensorArray',ha,...
'OperatingFrequency',fc,'PropagationSpeed',c,'PRF',prf);
plotResponse(response,shiftdim(clsig(20,:,:)),...
'NormalizeDoppler',true);

The results are not identical to the results obtained by using phased.ConstantGammaClutter because of differences between CPU and GPU computations.

In most cases, it does not matter that the GPU and CPU use different random numbers. Sometimes, you may need to reproduce the same stream on both GPU and CPU. In such cases, you can set up the two global streams so they produce identical random numbers. Both GPU and CPU support the combined multiple recursive generator (mrg32k3a) with the NormalTransform parameter set to 'Inversion'.

Define a seed value to use for both the GPU stream and the CPU stream.

seed = 7151;

Create a CPU random number stream that uses the combined multiple recursive generator and the chosen seed value. Then, use this stream as the global stream for random number generation on the CPU.

stream_cpu = RandStream('CombRecursive','Seed',seed, ...
'NormalTransform','Inversion');
RandStream.setGlobalStream(stream_cpu);

Create a GPU random number stream that uses the combined multiple recursive generator and the same seed value. Then, use this stream as the global stream for random number generation on the GPU.

stream_gpu = parallel.gpu.RandStream('CombRecursive','Seed',seed, ...
'NormalTransform','Inversion');
parallel.gpu.RandStream.setGlobalStream(stream_gpu);

Generate clutter on both the CPU and the GPU, using the global stream on each platform.

clutter_cpu = phased.ConstantGammaClutter('SeedSource','Auto');
clutter_gpu = phased.gpu.ConstantGammaClutter('SeedSource','Auto');
cl_cpu = clutter_cpu();
cl_gpu = clutter_gpu();

Check that the element-wise differences between the CPU and GPU results are negligible.

maxdiff = max(max(abs(cl_cpu - cl_gpu)))
eps
maxdiff =

4.6709e-18

ans =

2.2204e-16

## References

[1] Barton, David. “Land Clutter Models for Radar Design and Analysis,” Proceedings of the IEEE. Vol. 73, Number 2, February, 1985, pp. 198–204.

[2] Long, Maurice W. Radar Reflectivity of Land and Sea, 3rd Ed. Boston: Artech House, 2001.

[3] Nathanson, Fred E., J. Patrick Reilly, and Marvin N. Cohen. Radar Design Principles, 2nd Ed. Mendham, NJ: SciTech Publishing, 1999.

[4] Ward, J. “Space-Time Adaptive Processing for Airborne Radar Data Systems,” Technical Report 1015, MIT Lincoln Laboratory, December, 1994.