Radars¶

class
stonesoup.sensor.radar.radar.
RadarBearingRange
(position_mapping: Tuple[int, int], noise_covar: CovarianceMatrix, ndim_state: int = 2)[source]¶ Bases:
stonesoup.sensor.sensor.Sensor
A simple radar sensor that generates measurements of targets, using a
CartesianToBearingRange
model, relative to its position.Note
The current implementation of this class assumes a 3D Cartesian plane.
 Parameters
position_mapping (
Tuple[int, int]
) – Mapping between the targets state space and the sensors measurement capabilitynoise_covar (
CovarianceMatrix
) – The sensor noise covariance matrix. This is utilised by (and follow in format) the underlyingCartesianToBearingRange
modelndim_state (
int
, optional) – Number of state dimensions. This is utilised by (and follows in format) the underlyingCartesianToBearingRange
model

ndim_state
: int¶ Number of state dimensions. This is utilised by (and follows in format) the underlying
CartesianToBearingRange
model

position_mapping
: Tuple[int, int]¶ Mapping between the targets state space and the sensors measurement capability

noise_covar
: stonesoup.types.array.CovarianceMatrix¶ The sensor noise covariance matrix. This is utilised by (and follow in format) the underlying
CartesianToBearingRange
model

measure
(ground_truths: Set[GroundTruthState], noise: Union[numpy.ndarray, bool] = True, **kwargs) → Set[stonesoup.types.detection.TrueDetection][source]¶ Generate a measurement for a given state
 Parameters
ground_truths (Set[
GroundTruthState
]) – A set ofGroundTruthState
noise (
numpy.ndarray
or bool) – An externally generated random process noise sample (the default is True, in which caservs()
is used; if False, no noise will be added)
 Returns
A set of measurements generated from the given states. The timestamps of the measurements are set equal to that of the corresponding states that they were calculated from. Each measurement stores the ground truth path that it was produced from.
 Return type
Set[
TrueDetection
]

class
stonesoup.sensor.radar.radar.
RadarRotatingBearingRange
(position_mapping: Tuple[int, int], noise_covar: CovarianceMatrix, dwell_center: State, rpm: float, max_range: float, fov_angle: float, ndim_state: int = 2)[source]¶ Bases:
stonesoup.sensor.radar.radar.RadarBearingRange
A simple rotating radar, with set fieldofview (FOV) angle, range and rotations per minute (RPM), that generates measurements of targets, using a
CartesianToBearingRange
model, relative to its position.Note
The current implementation of this class assumes a 3D Cartesian plane.
 Parameters
position_mapping (
Tuple[int, int]
) – Mapping between the targets state space and the sensors measurement capabilitynoise_covar (
CovarianceMatrix
) – The sensor noise covariance matrix. This is utilised by (and follow in format) the underlyingCartesianToBearingRange
modeldwell_center (
State
) – A state object, whose state_vector property describes the rotation angle of the center of the sensor’s current FOV (i.e. the dwell center) relative to the positive xaxis of the sensor frame/orientation. The angle is positive if the rotation is in the counterclockwise direction when viewed by an observer looking down the zaxis of the sensor frame, towards the origin. Angle units are in radiansrpm (
float
) – The number of antenna rotations per minute (RPM)max_range (
float
) – The maximum detection range of the radar (in meters)fov_angle (
float
) – The radar field of view (FOV) angle (in radians).ndim_state (
int
, optional) – Number of state dimensions. This is utilised by (and follows in format) the underlyingCartesianToBearingRange
model

dwell_center
: stonesoup.types.state.State¶ A state object, whose state_vector property describes the rotation angle of the center of the sensor’s current FOV (i.e. the dwell center) relative to the positive xaxis of the sensor frame/orientation. The angle is positive if the rotation is in the counterclockwise direction when viewed by an observer looking down the zaxis of the sensor frame, towards the origin. Angle units are in radians

measure
(ground_truths: Set[GroundTruthState], noise: Union[numpy.ndarray, bool] = True, **kwargs) → Set[stonesoup.types.detection.TrueDetection][source]¶ Generate a measurement for a given state
 Parameters
ground_truths (Set[
GroundTruthState
]) – A set ofGroundTruthState
noise (
numpy.ndarray
or bool) – An externally generated random process noise sample (the default is True, in which caservs()
is used; if False, no noise will be added)
 Returns
A set of measurements generated from the given states. The timestamps of the measurements are set equal to that of the corresponding states that they were calculated from. Each measurement stores the ground truth path that it was produced from.
 Return type
Set[
TrueDetection
]

rotate
(timestamp)[source]¶ Rotate the sensor’s antenna
This method computes and updates the sensor’s dwell_center property.
 Parameters
timestamp (
datetime.datetime
) – A timestamp signifying when the rotation completes

class
stonesoup.sensor.radar.radar.
RadarElevationBearingRange
(position_mapping: Tuple[int, int], noise_covar: CovarianceMatrix, ndim_state: int = 3)[source]¶ Bases:
stonesoup.sensor.radar.radar.RadarBearingRange
A radar sensor that generates measurements of targets, using a
CartesianToElevationBearingRange
model, relative to its position.Note
This implementation of this class assumes a 3D Cartesian space.
 Parameters
position_mapping (
Tuple[int, int]
) – Mapping between the targets state space and the sensors measurement capabilitynoise_covar (
CovarianceMatrix
) – The sensor noise covariance matrix. This is utilised by (and follow in format) the underlyingCartesianToElevationBearingRange
modelndim_state (
int
, optional) – Number of state dimensions. This is utilised by (and follows in format) the underlyingCartesianToBearingRange
model

ndim_state
: int¶ Number of state dimensions. This is utilised by (and follows in format) the underlying
CartesianToBearingRange
model

noise_covar
: stonesoup.types.array.CovarianceMatrix¶ The sensor noise covariance matrix. This is utilised by (and follow in format) the underlying
CartesianToElevationBearingRange
model

measure
(ground_truths: Set[GroundTruthState], noise: Union[numpy.ndarray, bool] = True, **kwargs) → Set[stonesoup.types.detection.TrueDetection][source]¶ Generate a measurement for a given state
 Parameters
ground_truths (Set[
GroundTruthState
]) – A set ofGroundTruthState
noise (
numpy.ndarray
or bool) – An externally generated random process noise sample (the default is True, in which caservs()
is used; if False, no noise will be added)
 Returns
A set of measurements generated from the given states. The timestamps of the measurements are set equal to that of the corresponding states that they were calculated from. Each measurement stores the ground truth path that it was produced from.
 Return type
Set[
TrueDetection
]

class
stonesoup.sensor.radar.radar.
RadarBearingRangeRate
(position_mapping: Tuple[int, int], noise_covar: CovarianceMatrix, ndim_state: int = 3, velocity_mapping: Tuple[int, int, int] = (1, 3, 5))[source]¶ Bases:
stonesoup.sensor.radar.radar.RadarBearingRange
A radar sensor that generates measurements of targets, using a
CartesianToBearingRangeRate
model, relative to its position and velocity.Note
This class implementation assuming at 3D cartesian space, it therefore expects a 6D state space.
 Parameters
position_mapping (
Tuple[int, int]
) – Mapping between the targets state space and the sensors measurement capabilitynoise_covar (
CovarianceMatrix
) – The sensor noise covariance matrix. This is utilised by (and follow in format) the underlyingCartesianToBearingRangeRate
modelndim_state (
int
, optional) – Number of state dimensions. This is utilised by (and follows in format) the underlyingCartesianToBearingRangeRate
modelvelocity_mapping (
Tuple[int, int, int]
, optional) – Mapping to the target’s velocity information within its state space

velocity_mapping
: Tuple[int, int, int]¶ Mapping to the target’s velocity information within its state space

ndim_state
: int¶ Number of state dimensions. This is utilised by (and follows in format) the underlying
CartesianToBearingRangeRate
model

noise_covar
: stonesoup.types.array.CovarianceMatrix¶ The sensor noise covariance matrix. This is utilised by (and follow in format) the underlying
CartesianToBearingRangeRate
model

measure
(ground_truths: Set[GroundTruthState], noise: Union[numpy.ndarray, bool] = True, **kwargs) → Set[stonesoup.types.detection.TrueDetection][source]¶ Generate a measurement for a given state
 Parameters
ground_truths (Set[
GroundTruthState
]) – A set ofGroundTruthState
noise (
numpy.ndarray
or bool) – An externally generated random process noise sample (the default is True, in which caservs()
is used; if False, no noise will be added)
 Returns
A set of measurements generated from the given states. The timestamps of the measurements are set equal to that of the corresponding states that they were calculated from. Each measurement stores the ground truth path that it was produced from.
 Return type
Set[
TrueDetection
]

class
stonesoup.sensor.radar.radar.
RadarElevationBearingRangeRate
(position_mapping: Tuple[int, int], noise_covar: CovarianceMatrix, ndim_state: int = 6, velocity_mapping: Tuple[int, int, int] = (1, 3, 5))[source]¶ Bases:
stonesoup.sensor.radar.radar.RadarBearingRangeRate
A radar sensor that generates measurements of targets, using a
CartesianToElevationBearingRangeRate
model, relative to its position and velocity.Note
The current implementation of this class assumes a 3D Cartesian plane.
 Parameters
position_mapping (
Tuple[int, int]
) – Mapping between the targets state space and the sensors measurement capabilitynoise_covar (
CovarianceMatrix
) – The sensor noise covariance matrix. This is utilised by (and follow in format) the underlyingCartesianToElevationBearingRangeRate
modelndim_state (
int
, optional) – Number of state dimensions. This is utilised by (and follows in format) the underlyingCartesianToElevationBearingRangeRate
modelvelocity_mapping (
Tuple[int, int, int]
, optional) – Mapping to the target’s velocity information within its state space

velocity_mapping
: Tuple[int, int, int]¶ Mapping to the target’s velocity information within its state space

ndim_state
: int¶ Number of state dimensions. This is utilised by (and follows in format) the underlying
CartesianToElevationBearingRangeRate
model

noise_covar
: stonesoup.types.array.CovarianceMatrix¶ The sensor noise covariance matrix. This is utilised by (and follow in format) the underlying
CartesianToElevationBearingRangeRate
model

measure
(ground_truths: Set[GroundTruthState], noise: Union[numpy.ndarray, bool] = True, **kwargs) → Set[stonesoup.types.detection.TrueDetection][source]¶ Generate a measurement for a given state
 Parameters
ground_truths (Set[
GroundTruthState
]) – A set ofGroundTruthState
noise (
numpy.ndarray
or bool) – An externally generated random process noise sample (the default is True, in which caservs()
is used; if False, no noise will be added)
 Returns
A set of measurements generated from the given states. The timestamps of the measurements are set equal to that of the corresponding states that they were calculated from. Each measurement stores the ground truth path that it was produced from.
 Return type
Set[
TrueDetection
]

class
stonesoup.sensor.radar.radar.
RadarRasterScanBearingRange
(position_mapping: Tuple[int, int], noise_covar: CovarianceMatrix, dwell_center: State, rpm: float, max_range: float, fov_angle: float, for_angle: float, ndim_state: int = 2)[source]¶ Bases:
stonesoup.sensor.radar.radar.RadarRotatingBearingRange
A simple raster scan radar, with set fieldofregard (FoR) angle, fieldofview (FoV) angle, range and rotations per minute (RPM), that generates measurements of targets, using a
CartesianToBearingRange
model, relative to its positionThis is a simple extension of the RadarRotatingBearingRange class with the rotate function changed to restrict the dwellcenter to within the field of regard. It’s important to note that this only works (has been tested) in an 2D environment
Note
This class implementation assuming at 3D cartesian space, it therefore expects a 6D state space.
 Parameters
position_mapping (
Tuple[int, int]
) – Mapping between the targets state space and the sensors measurement capabilitynoise_covar (
CovarianceMatrix
) – The sensor noise covariance matrix. This is utilised by (and follow in format) the underlyingCartesianToBearingRange
modeldwell_center (
State
) – A state object, whose state_vector property describes the rotation angle of the center of the sensor’s current FOV (i.e. the dwell center) relative to the positive xaxis of the sensor frame/orientation. The angle is positive if the rotation is in the counterclockwise direction when viewed by an observer looking down the zaxis of the sensor frame, towards the origin. Angle units are in radiansrpm (
float
) – The number of antenna rotations per minute (RPM)max_range (
float
) – The maximum detection range of the radar (in meters)fov_angle (
float
) – The radar field of view (FOV) angle (in radians).for_angle (
float
) – The radar field of regard (FoR) angle (in radians).ndim_state (
int
, optional) – Number of state dimensions. This is utilised by (and follows in format) the underlyingCartesianToBearingRange
model

rotate
(timestamp)[source]¶ Rotate the sensor’s antenna
This method computes and updates the sensor’s dwell_center property.
 Parameters
timestamp (
datetime.datetime
) – A timestamp signifying when the rotation completes

class
stonesoup.sensor.radar.radar.
AESARadar
(measurement_model: MeasurementModel, beam_shape: BeamShape, beam_transition_model: BeamTransitionModel, duty_cycle: float, band_width: float, receiver_noise: float, frequency: float, antenna_gain: float, beam_width: float, rotation_offset: StateVector = None, position_mapping: Tuple[int, int, int] = (0, 1, 2), number_pulses: int = 1, loss: float = 0, swerling_on: bool = False, rcs: float = None, probability_false_alarm: Probability = 1e06)[source]¶ Bases:
stonesoup.sensor.sensor.Sensor
An AESA (Active electronically scanned array) radar model that calculates the signal to noise ratio (SNR) of a target and the subsequent probability of detection (PD). The SNR is calculated using:
\[\mathit{SNR} = \dfrac{c^2\, n_p \,\beta}{64\,\pi^3 \,kT_0 \,B \,F \,f^2 \,L} \times\dfrac{\sigma\, G_a^2\, P_t}{R^4}\]where \(c\) is the speed of light \(n_p\) is the number of pulses in a burst \(\beta\) is the duty cycle which is unitless \(k\) is the boltzmann constant \(T_0\) is system temperature in kelvin \(B\) is the bandwidth in hertz \(F\) is the noise figure unitless \(f\) is the frequency in hertz \(L\) is the loss which is unitless The probability of detection (\(P_{d}\)) is calculated using the North’s approximation,
\[P_{d} = 0.5\, erfc\left(\sqrt{\ln{P_{fa}}}\sqrt{ \mathit{SNR} +0.5} \right)\]where \(P_{fa}\) is the probability of false alarm. In this model the AESA scan angle effects the gain by:
\[G_a = G_a \cos{\left(\theta\right)} \cos{\left(\phi\right)}\]where \(\theta\) and \(\phi\) are respectively the azimuth and elevation angles in respects to the boresight of the antenna. The effect of beam spoiling on the beam width is :
\[\Delta\theta = \dfrac{\Delta\theta}{\cos{\left(\theta\right)} \cos{\left(\phi\right)}}\]Note
The current implementation of this class assumes a 3D Cartesian plane. This model does not generate false alarms.
 Parameters
measurement_model (
MeasurementModel
) – The Measurement model used to generate measurements.beam_shape (
BeamShape
) – Object describing the shape of the beam.beam_transition_model (
BeamTransitionModel
) – Object describing the movement of the beam in azimuth and elevation from the perspective of the radar.duty_cycle (
float
) – Duty cycle is the fraction of the time the radar it transmitting.band_width (
float
) – Bandwidth of the receiver in hertz.receiver_noise (
float
) – Noise figure of the radar in decibels.frequency (
float
) – Transmitted frequency in hertz.antenna_gain (
float
) – Total Antenna gain in decibels.beam_width (
float
) – Radar beam width in radians.rotation_offset (
StateVector
, optional) – A 3x1 array of angles (rad), specifying the radar orientation in terms of the counterclockwise rotation around the \(x,y,z\) axis. i.e Roll, Pitch and Yaw. Default isStateVector([0, 0, 0])
position_mapping (
Tuple[int, int, int]
, optional) – Mapping between or positions and state dimensions. [x,y,z]number_pulses (
int
, optional) – The number of pulses in the radar burst.loss (
float
, optional) – Loss in decibels.swerling_on (
bool
, optional) – Is the Swerling 1 case used. If True the RCS of the target will change for each timestep. The random RCS follows the probability distribution of the Swerling 1 case.rcs (
float
, optional) – The radar cross section of targets in meters squared. Used if rcs not present on truth. Default None, where ‘rcs’ must be present on truth.probability_false_alarm (
Probability
, optional) – Probability of false alarm used in the North’s approximation

measurement_model
: stonesoup.models.measurement.base.MeasurementModel¶ The Measurement model used to generate measurements.

beam_shape
: stonesoup.sensor.radar.beam_shape.BeamShape¶ Object describing the shape of the beam.

beam_transition_model
: stonesoup.sensor.radar.beam_pattern.BeamTransitionModel¶ Object describing the movement of the beam in azimuth and elevation from the perspective of the radar.

swerling_on
: bool¶ Is the Swerling 1 case used. If True the RCS of the target will change for each timestep. The random RCS follows the probability distribution of the Swerling 1 case.

rcs
: float¶ The radar cross section of targets in meters squared. Used if rcs not present on truth. Default None, where ‘rcs’ must be present on truth.

probability_false_alarm
: stonesoup.types.numeric.Probability¶ Probability of false alarm used in the North’s approximation

rotation_offset
: stonesoup.types.array.StateVector¶ A 3x1 array of angles (rad), specifying the radar orientation in terms of the counterclockwise rotation around the \(x,y,z\) axis. i.e Roll, Pitch and Yaw. Default is
StateVector([0, 0, 0])

gen_probability
(truth)[source]¶ Generates probability of detection of a given State.
 Parameters
truth (The target state.) –
 Returns
det_prob (float) – Probability of detection.
snr (float) – Signal to noise ratio.
rcs (float) – RCS after the Swerling 1 case is applied.
directed_power (float) – Power in the direction of the target.
spoiled_gain (float) – Gain in decibels with beam spoiling applied.
spoiled_width (float) – Beam width with beam spoiling applied.

measure
(ground_truths: Set[GroundTruthState], noise: Union[numpy.ndarray, bool] = True, **kwargs) → Set[stonesoup.types.detection.TrueDetection][source]¶ Generate a measurement for a given state
 Parameters
ground_truths (Set[
GroundTruthState
]) – A set ofGroundTruthState
noise (
numpy.ndarray
or bool) – An externally generated random process noise sample (the default is True, in which caservs()
is used; if False, no noise will be added)
 Returns
A set of measurements generated from the given states. The timestamps of the measurements are set equal to that of the corresponding states that they were calculated from. Each measurement stores the ground truth path that it was produced from.
 Return type
Set[
TrueDetection
]
Beam Patterns¶

class
stonesoup.sensor.radar.beam_pattern.
BeamTransitionModel
(centre: Sequence)[source]¶ Bases:
stonesoup.base.Base
Base class for Beam Transition Model
 Parameters
centre (
Sequence
) – Centre of the beam pattern

centre
: Sequence¶ Centre of the beam pattern

class
stonesoup.sensor.radar.beam_pattern.
StationaryBeam
(centre: Sequence)[source]¶ Bases:
stonesoup.sensor.radar.beam_pattern.BeamTransitionModel
Stationary beam that points in the direction of centre
 Parameters
centre (
Sequence
) – Centre of the beam pattern

class
stonesoup.sensor.radar.beam_pattern.
BeamSweep
(angle_per_s: float, frame: Tuple[float, float], separation: float, centre: Tuple[float, float] = (0, 0), init_time: datetime.datetime = None)[source]¶ Bases:
stonesoup.sensor.radar.beam_pattern.BeamTransitionModel
This describes a beam moving in a raster pattern
 Parameters
angle_per_s (
float
) – The speed that the beam scans atframe (
Tuple[float, float]
) – Dimensions of search frame as [azimuth,elevation]separation (
float
) – Separation of lines in elevationcentre (
Tuple[float, float]
, optional) – Centre of the search frame in [azimuth,elevation]. Defaults to (0, 0)init_time (
datetime.datetime
, optional) – The time the frame is started

init_time
: datetime.datetime¶ The time the frame is started

move_beam
(timestamp, **kwargs)[source]¶ Returns the position of the beam at given timestamp
 Parameters
timestamp (datetime.datetime) – current timestep
 Returns
azimuth (float) – azimuth from the perspective of the radar at given timestamp
elevation (float) – elevation from the perspective of the radar at given timestamp
Beam Shapes¶

class
stonesoup.sensor.radar.beam_shape.
BeamShape
(peak_power: float)[source]¶ Bases:
stonesoup.base.Base
Base class for beam shape
 Parameters
peak_power (
float
) – peak power of the main lobe in Watts

class
stonesoup.sensor.radar.beam_shape.
Beam2DGaussian
(peak_power: float)[source]¶ Bases:
stonesoup.sensor.radar.beam_shape.BeamShape
The beam is in the shape of a 2D gaussian in the azimuth and elevation. The width at half the maxima is the beam width. It is described by:
\[P = P_p\exp \left( 0.5 \times \left(\left(\frac{2.35\,az}{B_w}\right) ^2 +\left(\frac{2.35\,el}{B_w}\right)^2 \right) \right)\]where \(az\) and \(el\) are the azimuth and elevation angles away from the centre. \(B_w\) is the beam width and \(P_p\) is the peak power.
 Parameters
peak_power (
float
) – peak power of the main lobe in Watts

beam_power
(azimuth, elevation, beam_width, **kwargs)[source]¶  Parameters
azimuth (float) – The angle of the target away from the boresight of the radar in azimuth
elevation (float) – The angle of the target away from the boresight of the radar in elevation
beam_width (float) – The width of the radar beam
 Returns
the power directed towards the target
 Return type
float