mmWaveRadar
Connect to Texas Instruments mmWave radar sensors, and read object detections and other measurements
Since R2023b
Description
The
mmWaveRadar
System object™ connects to Texas Instruments® (TI) mmWave radar sensors and reads object detections and related
measurements. You can read position and velocity of objects (object detection reports) and
also other radar measurements of interest such as range profile, noise profile, and so on,
as read from the mmWave radar sensors.
To read radar data from mmWave sensor:
Create the
mmWaveRadar
object and set its properties.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
Syntax
Description
connects to a TI mmWave Radar Sensor specified by rdr
= mmWaveRadar(boardname
)boardname
and
connected to the serial port of the host computer. The rdr
connection object has default property values. When you use this syntax, MATLAB® automatically detects the serial port at which the TI mmWave radar
sensor is connected. Use this syntax when only one TI mmWave radar sensor is
connected to the host computer.
connects to a TI mmWave radar sensor specified by rdr
= mmWaveRadar(boardname
, ConfigPort
= cfgPort
, DataPort
= dataPort
)boardname
and
connected to the serial port of the host computer as specified using ConfigPort and
DataPort arguments. Use this syntax if multiple TI mmWave radar sensors are connected
to the host computer.
recreates the last
successful connection to the TI mmWave radar sensor. rdr
= mmWaveRadar()
Use this syntax to reconnect to the same board that you used with MATLAB previously, and then you cleared. The properties of the object created using this syntax are the same as the properties set for the previously created object before it was locked. mmWaveRadar System object gets locked after calling the mmWaveRadar System object for the first time after object creation, or after the first call to mmWaveRadar System object after calling the
release
function.After running Hardware Setup screens, use this syntax to reconnect to the same board that uses the serial ports that you had specified in Flash Binary or Test Connection screen (whichever action you performed last using the Hardware Setup screens).
If no successful previous connection exists, this syntax errors out.
sets Properties using one or more
name-value arguments. rdr
= mmWaveRadar(boardname
,Name=Value
)
For example, rdr = mmWaveRadar("TI 6843ISK",ConfigFile =
"configurations.cfg")
connects to the IWR6843ISK board connected to your
host computer and prepares for reading data by using the configuration specified in
the file configurations.cfg
in the MATLAB search path.
Input Arguments
Name-Value Arguments
Properties
Usage
Description
[
reads and convert the data acquired from TI mmWaveRadar. System objects may be
called directly like a function instead of using the step method. For example, y =
step(obj) and y = obj() are equivalent.dets
,timestamp
,measurements
,overruns
] = rdr()
Output Arguments
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)
Examples
Read Detections using TI IWR6843ISK Radar Sensor
Connect to a TI IWR6843ISK radar connected to the serial port.
rdr = mmWaveRadar("TI IWR6843ISK")
rdr = mmWaveRadar with properties: BoardName: "TI IWR6843ISK" ConfigPort: "COM4" DataPort: "COM5" ConfigFile: "C:\ProgramData\MATLAB\SupportPackages\R2023b\toolbox\target\supportpackages\timmwaveradar\configfiles\xwr68xx_2Tx_BestRangeResolution_UpdateRate_10.cfg" MMWave SDK Version: "03.06.00.00" SensorIndex: 1 MountingLocation: [0, 0, 0] (m) MountingAngles: [0, 0, 0] (degrees) UpdateRate: 10 (samples/s) RangeResolution: 4.517647e-02 (m) RangeRateResolution: 1.206534e-01 (m/s) AzimuthResolution: 1.447751e+01 (degrees) ElevationResolution: NaN (degrees) MaximumRange: 1.084235e+01 (m) MaximumRangeRate: 9.652273e-01 (m/s) Show all properties all functions
Read object detections and other measurements from the radar.
[dets,timestamp,meas,overun] = rdr()
dets = 1×4 cell array {1×1 objectDetection} {1×1 objectDetection} {1×1 objectDetection} {1×1 objectDetection} timestamp = 0 meas = struct with fields: RangeProfile: [88.8979 102.2561 109.1234 107.1479 96.6589 92.2140 85.1350 83.6534 82.6186 78.5735 … ] (1×256 double) NoiseProfile: [46.5656 48.3765 49.8111 45.7660 48.6116 47.8355 48.7763 48.4941 48.2589 46.2598 … ] (1×256 double) RangeDopplerResponse: [] RangeAngleResponse: [] RangeGrid: [0 0.0424 0.0847 0.1271 0.1694 0.2118 0.2541 0.2965 0.3388 0.3812 0.4235 0.4659 0.5082 … ] (1×256 double) DopplerGrid: [] AngleGrid: [] overun = 0
Version History
Introduced in R2023b