* To measure these small scale vibrations/displacements, we measure the change in phase of the FMCW signal with time at the target range bin
* Code Composer Studio (CCS) project along with source code is provided for this lab
* Pre-built binary files are also provided that can be loaded on to the IWR6843 EVM
Theory
===========
### FMCW Basics
* Periodic linearly-increasing frequency chirps (known as Frequency-Modulated Continuous Wave (FMCW))
are transmitted by radar towards the object
* Transmitted FMCW signal is given by
* Signal at the receiver is a delayed version of the transmitted signal
* The received signal from an object at range R after mixing and filtering is given by
### FMCW Radar - Vital Signs Measurements
* Note that for a single object, the beat signal *b(t)* is a sinusoidal and has both frequency fb and phase
* To measure small scale vibrations, we measure the change in phase of the FMCW signal with time at the object range bin. If an object moves a distance ΔR then the change in phase between consecutive measurements is given by
* Phase can be measured by taking the FFT of the beat signal b(t) and computing the phase at the object range-bin.
* Suppose we take the FFT and the object is at range-bin m, then the vibration signal x(t) can be extracted by measuring the phase at range-bin m at time indices nTs , where n is the chirp index and Ts is the time between consecutive measurements
### Chirp Configuration for Demo
* 100 ADC Samples per chirp. Chirp duration is 50 ms based on the IF sampling rate of 2 MHz
* Each frame is configured to have 2 chirps. However only the 1st Chirp in the frame is used for processing
* A single TX-RX antenna pair is currently used for processing (Although all the RX antennas are enabled)
* Vital signs waveform is sampled along the “slow time axis” hence the vital signs sampling rate is equal to the Frame-rate of system
Requirements
===========
Hardware and Software Requirements
-----------
### Hardware
Item | Details
--------------------------|-----------------
Device | [Industrial mmWave Carrier Board](http://www.ti.com/tool/MMWAVEICBOOST) and either one of the following antenna modules
| [IWR6843ISK Antenna Module](http://www.ti.com/tool/IWR6843ISK) OR [IWR6843ISK_ODS Antenna Module](http://www.ti.com/tool/IWR6843ISK-ODS) OR [IWR6843AOPEVM](http://www.ti.com/tool/IWR6843AOPEVM).
| Note: The rest of this document will refer to the above board combination as EVM
Computer | PC with Windows 7 or 10. If a laptop is used, please use the 'High Performance' power plan in Windows.
Micro USB Cable | Provided with the [Industrial Radar Carrier Board](http://www.ti.com/tool/MMWAVEICBOOST)
Power Supply | 5V, 3A with 2.1-mm barrel jack (center positive). The power supply can be wall adapter style or a battery pack with a USB to barrel jack cable.
[[r! IWR6843 ES2.0 Only
This lab is only compatible with ES2.0 version of IWR6843. Check the device version on your IWR6843ISK using the on-chip device markings as shown below:
1. If line 4 reads `678A`, you have an ES2 device. In this case, this lab is compatible with your EVM.
2. If line 4 reads `60 GHZi`, you have an older ES1 device. In this case, the lab is NOT compatible with your EVM. ES2 IWR6843ISK boards are orderable from the EVM link above.
]]
### Software
Tool | Version |Download Link
----------------------------|---------------|-------------
mmWave Industrial Toolbox | Latest | [mmWave Industrial Toolbox](http://dev.ti.com/tirex/explore/node?node=AJoMGA2ID9pCPWEKPi16wg__VLyFKFf__LATEST)
TI mmWave SDK | 3.5.x.x | [TI mmWave SDK 3.5](http://software-dl.ti.com/ra-processors/esd/MMWAVE-SDK/03_04_00_03/index_FDS.html) and all the related tools are required to be installed as specified in the [mmWave SDK release notes](http://software-dl.ti.com/ra-processors/esd/MMWAVE-SDK/latest/exports/mmwave_sdk_release_notes.pdf)
Uniflash | Latest | Uniflash tool is used for flashing TI mmWave Radar devices. [Download offline tool](http://www.ti.com/tool/UNIFLASH) or use the [Cloud version](https://dev.ti.com/uniflash/#!/)
[[+d Expand for mmWave Industrial Toolbox installation without Code Composer Studio
1. Navigate to the [TI Resource Explorer](http://dev.ti.com/tirex/explore/node?node=AJoMGA2ID9pCPWEKPi16wg__VLyFKFf__LATEST)
2. Click the download button. A .zip file will be downloaded.
3. Navigate to the .zip file. Right click and then select **Extract All...**. Do NOT use the default path. The path must be `C:\ti`.
+]]
[[+d Expand for mmWave Industrial Toolbox installation using Code Composer Studio
1. Open CCS
2. In the top toolbar, navigate to **View → Resource Explorer**
3. In the **Resource Explorer** side panel (not the main panel with "Welcome to.."), navigate to Industrial Toolbox at **Software → mmWave Sensors → Industrial Toolbox - <ver>**
4. With Industrial Toolbox selected, the main panel should show the Industrial toolbox landing page. Click on the **Download icon** in the right corner of panel.
+]]
Quickstart
===========
The quickstart guide will cover setting up the EVM, flashing firmware, and running the demo.
## 1. Setup the EVM for Flashing Mode
* For MMWAVEICBOOST + IWR6843ISK/ODS/AOP setup: Follow the instructions for [Hardware Setup for Flashing in MMWAVEICBOOST Mode](../../../common/docs/hardware_setup/hw_setup_mmwaveicboost_mode_flashing.html)
## 2. Flash the EVM using Uniflash
Flash the binary listed below using UniFlash. Follow the instructions for [using UniFlash](../../../common/docs/software_setup/using_uniflash_with_mmwave.html)
BIN Name | Board | Location
------------------------------|---------------------|-----------
vital_signs_demo_68xx.bin | IWR6843ISK
OR
IWR6843ISK-ODS
OR
IWR6843AOPEVM
The visualizer can only run with the following:
[Industrial mmWave Carrier Board](http://www.ti.com/tool/MMWAVEICBOOST) +
[IWR6843ISK Antenna Module](http://www.ti.com/tool/IWR6843ISK)
OR
+
[IWR6843ISK-ODS Antenna Module](http://www.ti.com/tool/IWR6843ISK-ODS)
OR
+
[IWR6843AOPEVM](http://www.ti.com/tool/IWR6843AOPEVM).]]
* Press the **Start** Push button in the GUI. In the Display Prompt window you should see the configuration settings being read from the configuration text file and sent through the UART to the EVM
* As soon as the **sensorStart** command is sent, the GUI should start displaying the data
### Sensor Placement:
* For **Sensor in Front** the EVM shuld be mounted upright while subject should sit facing in a chair about .3-.8m in front.
* For initial measurement subject should stay still for 10-15 seconds to allow the application to calibrate. For subsequent measurements the subject must stay still for 5-10 seconds.
* For **Sensor in Back**, the EVM can be placed in the back of a car seat or in a seat cushion. This can be done by placing the EVM in an enclosure as shown below.
Developer's Guide
===========
Build the Firmware from Source Code
-----------
### 1. Software Requirements
Tool | Version |Download Link
----------------------------|---------------|--------
mmWave Industrial Toolbox | Latest | [mmWave Industrial Toolbox](http://dev.ti.com/tirex/explore/node?node=AJoMGA2ID9pCPWEKPi16wg__VLyFKFf__LATEST)
TI mmWave SDK | 3.5.x.x | [TI mmWave SDK 3.5](http://software-dl.ti.com/ra-processors/esd/MMWAVE-SDK/03_04_00_03/index_FDS.html) and all the related tools are required to be installed as specified in the [mmWave SDK release notes](http://software-dl.ti.com/ra-processors/esd/MMWAVE-SDK/latest/exports/mmwave_sdk_release_notes.pdf)
Code Composer Studio | 8.3.1 | [Code Composer Studio v8.3.1](http://processors.wiki.ti.com/index.php/Download_CCS#Code_Composer_Studio_Version_8_Downloads)
### 2. Import Lab Project
For the Vital Signs 68xx Lab, there are two projects, the DSS for the C674x DSP core and the MSS project for the R4F core, that need to be imported to CCS and compiled to generate firmware for the xWR6843.
* Start CCS and setup workspace as desired.
* Import the projects below to CCS using either TI Resource Explorer in CCS or CCS Import Projectspecs method:
* **vital_signs_68xx_dss.projectspec**
* **vital_signs_68xx_mss.projectspec**
[[+d Expand for details on importing via TI Resource Explorer in CCS
* In the top toolbar, navigate to **View → Resource Explorer**
* In the **Resource Explorer** side panel (not the main panel with "Welcome to.."), navigate to **Software → mmWave Sensors → Industrial Toolbox → Labs → Vital Signs - 68xx**
* Under the expanded **Vital Signs - 68xx** folder, there should be two CCS projects, **CCS Project - DSS** and **CCS Project - MSS**.
* For each of the two projects: Click on the project, which should open the project in the right main panel, and then click on the Import to IDE button
]]
[[b! Project Workspace
When importing projects to a workspace, a copy is created in the workspace. All modifications will only be implemented for the workspace copy. The original project downloaded in mmWave Industrial Toolbox is not touched.
]]
### 3. Build the Lab
#### **Build DSS Project**
The DSS project must be built before the MSS project.
With the **vital_signs_68xx_dss** project selected in **Project Explorer**, right click on the project and select **Rebuild Project**. Selecting **Rebuild** instead of **Build** ensures that the project is always re-compiled. This is especially important in case the previous build failed with errors.
[[g! Successful DSS Project Build
In the **Project Explorer** panel, navigate to and expand **vital_signs_68xx_dss → Debug** directory. The project has been successfully built if the following files appear in the **Debug** folder:
* vital_signs_68xx_dss.bin
* vital_signs_68xx_dss.xe674
]]
#### **Build MSS Project**
After the DSS project is successfully built, select **vital_signs_68xx_mss** in **Project Explorer**, right click on the project and select **Rebuild Project**.
[[g! Successful MSS Project Build
In the **Project Explorer** panel, navigate to and expand **vital_signs_68xx_mss → Debug** directory. The project has been successfully built if the following files appear in the **Debug** folder:
* vital_signs_68xx_mss.xer4f
* vital_signs_demo_68xx.bin
]]
[[r! Build Fails with Errors
If the build fails with errors, please ensure that all the prerequisites are installed as mentioned in [Software Requirements](#software_requirements).
]]
### 4. Execute the Lab
There are two ways to execute the compiled code on the EVM:
* Deployment mode: the EVM boots autonomously from flash and starts running the bin image
* Using Uniflash, flash the **vital_signs_demo_68xx_mss.bin** found at `
* Group cores and connect
* Select both the **Texas Instruments XDS110 USB Debug probe/C674X_0** and **Texas Instruments XDS110 USB Debug probe/Cortex_R4_0** and then right click and select **Group core(s)**
* Select **Group 1** and then right click and select **Connect Target**
* Load the binary
* Once both targets are connected, click on the C674X_0 target and then click **Load** button in the toolbar.
* In the **Load Program** dialog, press the **Browse Project** button .
* Select **vital_signs_demo_68xx_dss.xe674** found at `
* Run the binary
* Select **Group 1**, press the **Run/Resume** button The visualizer can only run with the following:
[Industrial mmWave Carrier Board](http://www.ti.com/tool/MMWAVEICBOOST) +
[IWR6843ISK Antenna Module](http://www.ti.com/tool/IWR6843ISK)
OR
+
[IWR6843ISK-ODS Antenna Module](http://www.ti.com/tool/IWR6843ISK-ODS)
OR
+
[IWR6843AOPEVM](http://www.ti.com/tool/IWR6843AOPEVM).]]
* Press the **Start** Push button in the GUI. In the Display Prompt window you should see the configuration settings being read from the configuration text file and sent through the UART to the EVM
* As soon as the **sensorStart** command is sent, the GUI should start displaying the data
#### **Configuring the GUI**
* The mmWave sensor device and algorithm configurations are set through the configuration text file. These files are located
in `
* **motionDetection** The purpose of this block is to discard the data segments that might be corrupted by large amplitude movements. The heart waveform is divided into segment of L samples. If the energy within this data segment exceeds a user-defined threshold ETh then all the samples are discarded from the time-domain heart waveform.
#### **Output Packet**
The format of the UART Data Stream is below:
#### **Sensor Placement**
* For **Sensor in Front** the EVM shuld be mounted upright while subject should sit facing in a chair about .3-.8m in front.
* For initial measurement subject should stay still for 10-15 seconds to allow the application to calibrate. For subsequent measurements the subject must stay still for 5-10 seconds.
* For **Sensor in Back**, the EVM can be placed in the back of a car seat or in a seat cushion. This can be done by placing the EVM in an enclosure as shown below.
#### **Visualizer Source Code**
Source files are located at `