Main Content

dca1000

Connect to TI mmWave radar sensor and DCA1000EVM to capture raw ADC data for live processing or offline processing

Since R2024b

Description

The dca1000 System object™ connects to a Texas Instruments® (TI) DCA1000EVM capture card that allows you to receive ADC Data (IQ Data ) from TI mmWave radar. You can use the object to read ADC data for real-time processing or record the ADC data for processing at a later time.

The following image shows a simple connection diagram between host PC, DCA1000EVM and TI mmWave radar.

The Hardware Setup window in the support package guides you to make the hardware connection and complete the other required setup. To run Hardware Setup, execute mmWaveRadarSetup (this is a one time setup) . After the hardware setup, to receive ADC (IQ) data from the TI mmWave radar:

  1. Create the dca1000 object and set its properties.

  2. To read one radar data cube for real time processing, call the object as if it were a function.

  3. To record ADC data to a file in a host PC, call the startRecording function of the object.

Creation

Description

iqDataSource = dca1000(boardname) connects to a TI mmWave radar sensor specified by boardname and DCA1000EVM capture card. The TI mmWave radar sensor and DCA1000EVM capture card are connected to the host computer's serial port and Ethernet port, respectively. The iqDataSource 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.

iqDataSource = dca1000(boardname,Name=Value) sets Properties using one or more name-value arguments.

For example, iqDataSource = dca1000("IWR6843ISK",ConfigFile= "C:\Users\User1\PrototypeV3\configMaxRangResolution.cfg") connects to the DCA1000EVM that is connected to a IWR6843ISK radar board (with both boards connected to your host computer), and prepares for reading raw ADC data by using the configuration specified in the file configMaxRangResolution.cfg in the specified path.

Input Arguments

expand all

Name of the Texas Instruments mmWave radar sensor Evaluation Module (EVM) to which the DCA1000EVM is connected, specified as a string scalar.

BoardName is a mandatory input argument.

Example: iqDataSource = dca1000("IWR6843ISK")

Data Types: string

Name-Value Arguments

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 BoardName, but the order of the pairs does not matter.

Example: iqDataSource = dca1000("IWR6843ISK",ConfigPort="COM7",ConfigFile= "C:\Users\User1\configMaxRangResolution.cfg")

Properties

expand all

If a property is nontunable, you can only change its value before calling the object or after calling the release function.

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

If a property is immutable, the property value is set during construction; you cannot change the value of an immutable property after the object is created. For the dca1000 object, the ConfigPort property is immutable.

Note

You can specify any of the properties on this page, and which are not read-only, as name-value pairs.

The values of the read-only properties are internally set. For the dca1000 object, some of them are derived from the Configuration (.cfg) file (for example, Update Rate, Bandwidth, Resolution, and so on). Therefore, you can indirectly modify such properties by updating the Configuration file. To generate the configuration file, see Configure Radar Using a Configuration (.cfg) File for Reading Raw ADC (IQ) Data.

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

Hardware Connection

Name of the Texas Instruments mmWave radar sensor Evaluation Module (EVM) to which the DCA1000EVM is connected, specified as a string scalar.

BoardName is specified as an input argument during object construction.

Property type: Read-only

Data Types: string

Name of the serial port (COM#) used for passing configurations and binaries to the TI mmWave radar sensor to which the DCA1000EVM is connected, specified as a character vector or string scalar. Typically, the Config port is named in your Device Manager as either Silicon Labs Dual CP2105 USB to UART Bridge: Enhanced COM Port or XDS110 Class Application/User UART. For details, see Identifying Serial Ports for TI mmWave Radar Connection.

When you have only one TI mmWave radar sensor connected, MATLAB automatically detects the serial port at which the TI mmWave radar sensor is connected. In this case, you need not specify ConfigPort. If you have multiple TI mmWave radars connected, then specify the ConfigPort name-value pair argument.

Property type: Immutable

Example: iqDataSource = dca1000(“IWR6843ISK”, ConfigPort = “COM7”)

Data Types: string

Static IP address that is set on the host computer where raw ADC data (IQ data) packets are received.

The static IP address of the network connection in the host PC corresponding to the connected DCA1000EVM must be configured as 192.168.33.30. To view the steps to setup the static IP, execute mmWaveRadarSetup command.

Property type: Read-only

Data Types: string

Output Configuration

Ethernet packet delay in μs (from 5μs to 500μs) to achieve different throughputs while capturing raw ADC data, specified as a numeric scalar. A lower delay allows for higher bandwidth while increasing the probability of UDP packet being dropped before the packet reaches host computer. If you increase Ethernet packet delay, streaming throughput is decreased due to slower data capturing.

Property type: Nontunable

Data Types: double

Radar Configuration

File name with full path and the file extension to the Configuration (.cfg) file that stores information regarding configuration and settings of the device, specified as a string scalar.

For example, iqDataSource = dca1000("IWR6843ISK",ConfigFile= "C:\Users\User1\configMaxRangResolution.cfg").

For more details, see Configure Radar Using a Configuration (.cfg) File for Reading Detections.

Property type: Nontunable

Data Types: string

Recording Properties

Valid folder path on the host computer to save recorded IQ data read from TI Radar using DCA1000EVM. The data will be written to this location as binary files along with other meta data when you call startRecording() of the dca1000 object. You need to mention the absolute path of the folder.

If you do not specify RecordLocation, a folder name dca1000data will be created inside the current directory in MATLAB, where the recorded data will be stored when you call the startRecording function.

Property type: Tunable

Data Types: string

Prefix that gets added to the names of the binary files that holds the recorded ADC data read from TI Radar and the other files containing meta information, specified as a string scalar.

Each file generated will have a prefix specified by RecordFilePrefix property of dca1000 (default: iqData). The first binary file generate will have a suffix _Raw_0 appended to the prefix mentioned, and the subsequent files will have suffix Raw_n where n is number from 0 to value that is determined by maximum memory size allocated for a single file or the RecordDuration property.

For example, consider the case when RecordFilePrefix is specified as adc_data, and MaxFileSize is specified is 1GB. First set of data will be captured in a file named adc_data_Raw_0. After 1 GB of capture, the ADC data will be recorded into another file named adc_data_Raw_1. Each subsequent file which will be created after 1GB will have the “Raw_n” appended to the user given filename where n is a number starting from 0.

The filename that you specify for RecordFilePrefix must conform to host PC rules.

If you want to store multiple recordings in same RecordLocation, you can use different RecordFilePrefix.

Property type: Tunable

Data Types: string

Time duration (in seconds) to record data from DCA1000EVM, specified as a numeric scalar. This duration is considered for recording data after you call the startRecording function. If you intend to use the stopRecording function to stop the recording, specify RecordDuration as inf.

Property type: Tunable

Data Types: double

Maximum size (in MB) of a single binary file that holds recorded data from DCA1000EVM, specified as a numeric scalar. The value of MaxFileSize must be in the range [1 1024]. If the recorded data exceeds the MaxFileSize, this data will be written to a new file.

For example, if the MaxFileSize property is set to 100MB and RecordFilePrefix is iqData, then after 100MB of data is captured in iqData_Raw_0 file, the code starts saving the recorded data into iqData_Raw_1 file, and then into iqData_Raw_2 file, and so on.

The value of MaxFileSize determines the total number of binary files generated after recording.

Property type: Tunable

Data Types: double

Other Radar Configurations

Chirp start frequency in GHz, specified as a positive real scalar.

The StartFrequency is derived from the Configuration (.cfg) file that you specified using the property ConfigFile. To modify the value of this property, update the config file before object creation or after releasing the object.

Property type: Read-only

Data Types: double

Chirp stop frequency in GHz, specified as a positive real scalar.

The StopFrequency is derived from the Configuration (.cfg) file that you specified using the property ConfigFile. To modify the value of this property, update the config file before object creation or after releasing the object.

Property type: Read-only

Data Types: double

Center frequency of the radar band in GHz, specified as a positive scalar.

The CenterFrequency is derived from the Configuration (.cfg) file that you specified using the property ConfigFile. To modify the value of this property, update the config file before object creation or after releasing the object.

Property type: Read-only

Data Types: double

Radar waveform bandwidth in GHz, specified as a positive real scalar.

The Bandwidth is derived from the Configuration (.cfg) file that you specified using the property ConfigFile. To modify the value of this property, update the config file before object creation or after releasing the object.

Property type: Read-only

Data Types: double

Total duration of single chirp in micro seconds, specified as a positive real scalar.

The ChirpCycleTime is derived from the Configuration (.cfg) file that you specified using the property ConfigFile. To modify the value of this property, update the config file before object creation or after releasing the object.

Property type: Read-only

Data Types: double

Up chirp duration in micro seconds, specified as a positive real scalar. Units are in Hz.

The RampTime is derived from the Configuration (.cfg) file that you specified using the property ConfigFile. To modify the value of this property, update the config file before object creation or after releasing the object.

Property type: Read-only

Data Types: double

Slope of chirp as it ramps frequency, specified as a positive real scalar. Units are in MHz/μs.

The SweepSlope is derived from the Configuration (.cfg) file that you specified using the property ConfigFile. To modify the value of this property, update the config file before object creation or after releasing the object.

Property type: Read-only

Data Types: double

Number of chirps in a frame, specified as a positive real scalar.

The NumChirps is derived from the Configuration (.cfg) file that you specified using the property ConfigFile. To modify the value of this property, update the config file before object creation or after releasing the object.

Property type: Read-only

Data Types: double

Number of ADC samples for a chirp, specified as a positive real scalar.

The SamplesPerChirp is derived from the Configuration (.cfg) file that you specified using the property ConfigFile. To modify the value of this property, update the config file before object creation or after releasing the object.

Property type: Read-only

Data Types: double

ADC sampling frequency in kS/s, specified as a positive real scalar.

The ADCSampleRate is derived from the Configuration (.cfg) file that you specified using the property ConfigFile. To modify the value of this property, update the config file before object creation or after releasing the object.

Property type: Read-only

Data Types: double

Number of active receiver elements, specified as a positive real scalar.

The NumTransmitters is derived from the Configuration (.cfg) file that you specified using the property ConfigFile. To modify the value of this property, update the config file before object creation or after releasing the object.

Property type: Read-only

Data Types: double

Active receiving elements with logical values for each receiving antenna element, specified as a positive real scalar.

The TI mmWave radar has the capability to selectively turn on and off each receiver element. The property ActiveRecievers provides information about which Receive antenna elements are active (represented by 1) and which are not (represented by 0). For example, if ActiveRecievers is 1 0 1 , then RX1 and RX3 are active and RX2 is not active.

The ActiveReceivers is derived from the Configuration (.cfg) file that you specified using the property ConfigFile. To modify the value of this property, update the config file before object creation or after releasing the object.

Property type: Read-only

Data Types: double

Number of active transmitter elements, specified as a positive real scalar.

The NumTransmitters is derived from the Configuration (.cfg) file that you specified using the property ConfigFile. To modify the value of this property, update the config file before object creation or after releasing the object.

Property type: Read-only

Data Types: double

Active transmitting elements with logical values for each element, specified as a positive real scalar.

The TI mmWave radar has the capability to selectively turn on and off each transmitter elements. The property ActiveTransmitters provides information about which Transmit antenna elements are active (represented by 1) and which are not (represented by 0). For example, if ActiveTransmitters is 1 0 1 , then TX1 and TX3 are active and TX2 is not active.

The ActiveTransmitters is derived from the Configuration (.cfg) file that you specified using the property ConfigFile. To modify the value of this property, update the config file before object creation or after releasing the object.

Property type: Read-only

Data Types: double

Sensor update rate, in Hz (samples/sec), specified as a positive real scalar. The mmWave radar generates measurement data as frames at intervals defined by the reciprocal of the update rate.

The UpdateRate is derived from the Configuration (.cfg) file that you specified using the property ConfigFile. To modify the value of this property, update the config file before object creation or after releasing the object.

Property type: Read-only

Data Types: double

Azimuth resolution of the radar, in degrees, specified as a positive scalar. The azimuth resolution defines the minimum separation in azimuth angle at which the radar can distinguish between two targets.

The AzimuthResolution is derived from the Configuration (.cfg) file that you specified using the property ConfigFile. To modify the value of this property, update the config file before object creation or after releasing the object.

Property type: Read-only

Data Types: double

Elevation resolution of the radar, in degrees, specified as a positive scalar. The elevation resolution defines the minimum separation in elevation angle at which the radar can distinguish between two targets.

The ElevationResolution is derived from the Configuration (.cfg) file that you specified using the property ConfigFile. To modify the value of this property, update the config file before object creation or after releasing the object.

Property type: Read-only

Data Types: double

Range resolution of the radar, in meters, specified as a positive scalar. The range resolution defines the minimum separation in range at which the radar can distinguish between two targets.

The RangeResolution is derived from the Configuration (.cfg) file that you specified using the property ConfigFile. To modify the value of this property, update the config file before object creation or after releasing the object.

Property type: Read-only

Data Types: double

Range-rate resolution of the radar, in meters per second, specified as a positive real scalar. The range rate resolution defines the minimum separation in range rate at which the radar can distinguish between two targets.

The RangeRateResolution is derived from the Configuration (.cfg) file that you specified using the property ConfigFile. To modify the value of this property, update the config file before object creation or after releasing the object.

Property type: Read-only

Data Types: double

Usage

Description

iqData = iqDataSource() reads one radar data cube for live processing of raw ADC (IQ) data from the TI mmWave radar sensor using DCA1000EVM. 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.

Output Arguments

expand all

Raw ADC or IQ radar data cube captured from TI mmWave radar using DCA1000EVM capture card. The dimension of the radar data cube is Number of ADC Samples * Number of Active Receivers * Number of Chirps. The Number of ADC Samples, Number of Active Receivers and Number of Chirps are specified as the properties SamplesPerChirp, NumRecievers and NumChirps of the dca1000 object.

Data Types: double

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

releaseStop streaming raw ADC radar data and release the dca1000 object
startRecordingRead and record raw ADC data from TI mmWave radar using DCA1000EVM to files in host computer
stopRecordingStop recording of raw ADC data from TI mmWave radar using DCA1000EVM
isRecordingCheck status of recording of raw ADC data (IQ data)

Examples

Read ADC radar data cube from TI mmWave Radar using DCA1000EVM

Connect to a DCA1000EVM, which is connected to a TI IWR6843ISK mmWave radar. If you are using the function for the first time, make sure to run hardware setup process (execute mmWaveRadarSetup command and follow the steps displayed in the screens). Ensure that you have completed the required hardware connections and that the network connection associated with DCA1000EVM is configured with the static IP 192.168.33.30. The detailed steps for this are also explained in the Hardware Setup process.

Create a dca1000 object specifying the TI mmWave radar board name.

boardName = "IWR6843ISK";
iqDataSource = dca1000(boardName)
iqDataSource = 

  dca1000 with properties:

              BoardName: "IWR6843ISK"
             ConfigPort: "COM6"
          HostIPAddress: "192.168.33.30"
         UDPPacketDelay: 25 (us)
             ConfigFile: "C:\ProgramData\MATLAB\SupportPackages\R2024bPrerelease\toolbox\
target\supportpackages\timmwaveradar\configfiles\xwr68xx-IQDataStreaming.cfg"

Recording Properties
       RecordLocation: "C:\ProgramData\MATLAB\dca1000Data"
     RecordFilePrefix: "iqData"
       RecordDuration: 10 (s)
          MaxFileSize: 1024 (MB)

Show all properties all functions

Call iqDataSource object to read one sample of IQ radar data cube from the TI mmWave Radar using DCA1000EVM.

% Read one radar data cube from the TI Radar 
% connected with the capture card DCA1000 EVM
radarDataCube = iqDataSource(); 

radarDataCube is a complex double-precision three-dimensional array of size SamplesPerChirp * NumRecievers * NumChirps.

Version History

Introduced in R2024b