MATLAB: ‘MeasurementNoise’ Matrix in radarDetec​tionGenera​tor/object​Detection class in Automated Driving Systems Toolbox

automateddrivingsystemstoolbox

Hi, I am working with the Automated Driving Systems Toolbox of MATLAB for signal processing of detections obtained by Automotive Radar Sensor. If I create an artificial detection using the built-in tools of radarDetectionGenerator class, it calculates a MeasurementNoise matrix for the detection which is a Covariance matrix. But the thing is that I already have the detections and now I need to only register these detections in MATLAB, using the objectDetection class, for further processing and for that purpose, I need to provide MeasurementNoise matrix as input. I want to set the non-diagonal elements as zero and provide the variances as the diagonal values. It's a 3×3 matrix in my case and we know that the diagonal elements of a Covariance matrix are the variance values. I have got three variance values i.e. Range Variance, Velocity Variance and Azimuth Angle Variance. But I don't know the correct order in which these variances should be inserted into the Covariance matrix i.e. which variance should be at element index 11 of Covariance matrix, which one should be at 22 and similarly at 33? Could you please provide my any information in this regard. That would be very helpful.

Best Answer

Hi Wajahat,
If you want to load your own recorded data into MATLAB as objectDetections using the same format as the objectDetections generated by radarDetectionGenerator, you can follow the format found here in the documentation .
The order for the reported measurements and noise follows: [azimuth, elevation, range, range-rate], where elevation and range-rate may be omitted by setting the corresponding 'HasElevation' and 'HasVelocity' field on the MeasurementParameters structure for the objectDetection.
In your case, for the noise covariance, the azimuth variance is (1,1), the range covariance is (2,2) and the range-rate covariance is (3,3).
Since your recorded detections are reported using 'Sensor spherical' coordinates, you will need to set the MeasurementParameters for each objectDetection to a structure with fields set to:
  • Frame: 'spherical'
  • OriginPosition: 3-by-1 vector defining the offset of the radar from the origin of the ego vehicle's coordinate frame
  • Orientation: 3-by-3 rotation matrix whose columns define the axes of the radar in the ego vehicle's coordinate frame (column 1 defines a unit vector pointing along the radar boresight, column 3 is a unit vector defining up for the radar, and column 3 is the cross-product of the up and boresight vectors - pointing to the left of the radar.
  • HasVelocity: true
  • HasElevation: false
This format will enable you to process the detections using the multiObjectTracker and the various filter initialization functions provided in the toolbox (e.g. initcvekf)
I hope this helps,
Trevor