<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>MBDT for RADARのトピックRADAR Systems Design and Programming Made Simple with NXP’s Model-Based Design Toolbox</title>
    <link>https://community.nxp.com/t5/MBDT-for-RADAR/RADAR-Systems-Design-and-Programming-Made-Simple-with-NXP-s/m-p/726907#M5</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;H1 style="text-align: center;"&gt;&lt;SPAN style="color: #000080;"&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/27216iCD9A304872EB2A3E/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/H1&gt;&lt;H1&gt;&lt;/H1&gt;&lt;H1&gt;&lt;SPAN style="color: #000080;"&gt;INTRODUCTION&lt;/SPAN&gt;&lt;/H1&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Even though the purpose of this article is to familiarize you with SPT simulator for MATLAB, this being the first release&amp;nbsp;we want to start it off by putting some things into context.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;In this article,&amp;nbsp;we'll begin by giving you an &lt;/SPAN&gt;overview&lt;SPAN style="font-size: 12.0pt;"&gt; of what &lt;STRONG&gt;RADAR&lt;/STRONG&gt; is, where it is used and how it is different than other technologies like vision or LIDAR.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;In the second part&amp;nbsp;we'll be talking about a solution for RADAR developed by NXP and how it uses specialized hardware accelerators for signal processing.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;The&lt;/SPAN&gt; final part &lt;SPAN style="font-size: 12pt;"&gt;will cover the newly released&amp;nbsp;SIMULATOR&amp;nbsp;for &lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;Signal Processing Toolbox&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt; (the hardware accelerator that resides on NXP’s RADAR products) and why it is easier to develop your algorithms on it, rather than on the real hardware (how it helps with visualizing data, rapidly changing parameters/steps used, saving time – thus decreasing time-to-market) – all &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;with &lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;the help of an &lt;/SPAN&gt;example&lt;SPAN style="font-size: 12pt;"&gt;, using a simulation of a radar signal to show one method you could use to find the objects in the proximity of the car, the distance to them and their relative velocity.&lt;/SPAN&gt;&lt;/P&gt;&lt;H1&gt;&amp;nbsp;&lt;/H1&gt;&lt;P&gt;&lt;/P&gt;&lt;H1&gt;&lt;SPAN style="color: #000080;"&gt;WHAT IS&amp;nbsp;RADAR?&lt;/SPAN&gt;&lt;/H1&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;RADAR is a key component of ADAS (Advanced Driver Assistance Systems) that constantly senses the objects in the proximity of the car – it can determine the distance to them, their relative velocity and the angle.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;RADAR improves driving efficiency and safety, being used for collision detection, warning and avoidance, blind spot monitoring, lane change assistance, rear cross-traffic alerts, vulnerable road user detection, adaptive cruise control, etc.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/27070i7B9715C57DD674B2/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_12.png" alt="pastedImage_12.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;Figure &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt; General RADAR use&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Currently there are 4 major technologies which provide external and immediate information to autonomous and semi-autonomous vehicles:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&lt;STRONG&gt;RADAR:&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;a system that uses radio waves to determine the range, angle and velocity of objects&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Vision:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;a system that uses sophisticated object detection algorithms to understand what is visible from the cameras&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;LIDAR&amp;nbsp;(Light Detection and Ranging):&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;technology that uses light in the form of a pulsed laser to measure ranges (distances)&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Ultrasonic:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;a system that uses ultrasonic sound waves to detect the distance to objects&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Each one of them has advantages and disadvantages, this being the reason why we usually see them used in tandem. Let’s talk more about the &lt;STRONG&gt;ups&lt;/STRONG&gt; and &lt;STRONG&gt;downs&lt;/STRONG&gt; of using Radar technology:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;First of all, RADAR is computationally lighter than vision and uses far less data than a LIDAR. Even though it is less angularly accurate than LIDAR, it can work &lt;STRONG&gt;regardless of the weather condition &lt;/STRONG&gt;and even use reflection to see behind obstacles. This means that while LIDAR and vision struggle with bright light, night, snow, fog, dust and rain, RADAR maintains the same performances. Because of this, companies like Tesla believe it can be used not just as a supplementary sensor to the image processing system, but as a primary control sensor, maybe not even requiring confirmation from the camera:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&lt;EM&gt;“The radar was added to all Tesla vehicles in October 2014 as part of the Autopilot hardware suite, but was only meant to be a supplementary sensor to the primary camera and image processing system. After careful consideration, we now believe it can be used as a primary control sensor without requiring the camera to confirm visual image recognition.”&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt;"&gt; (Tesla team)&lt;/SPAN&gt;&lt;/P&gt;&lt;H1&gt;&amp;nbsp;&lt;/H1&gt;&lt;P&gt;&lt;/P&gt;&lt;H1&gt;&lt;SPAN style="color: #000080;"&gt;RADAR COMPONENTS&lt;/SPAN&gt;&lt;/H1&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;A typical RADAR module consists of a transmit solution (Tx), a voltage-controlled oscillator (VCO) and a multiple-channel receiver IC (Rx), along with a MCU. The main controller and modulation master is a single MCU with integrated high-speed analog-to-digital converters (ADCs) and appropriate signal processing capability, such as Fast Fourier Transforms (FFTs).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/27071i0CA2EA7A6E398F48/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_25.png" alt="pastedImage_25.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;Figure &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt; Typical Radar components&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Let us look at a concrete example: NXP’s &lt;STRONG&gt;S32R274&lt;/STRONG&gt; EVB (Evaluation board):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/27073iF378B88B56530397/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_27.png" alt="pastedImage_27.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;Figure &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;3&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt; S32R274&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;This is a 32-bit Power Architecture based Microcontroller Unit (MCU) that supports surround radar and mid-range front radar applications. It is designed to address advanced radar signal processing capabilities combined with automotive MCU capabilities for generic software tasks and car bus interfacing.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&amp;nbsp;&lt;BR /&gt;S32R274 supports radar signal processing acceleration via the &lt;STRONG&gt;Signal Processing Toolbox (SPT). &lt;/STRONG&gt;This is a powerful engine containing high-performance signal processing operations (like FFT, peak search, etc.). The &lt;STRONG&gt;SPT&lt;/STRONG&gt; is connected to the device by an Advanced High-Performance master bus and a peripheral bus (system bus master interface is used for fast data transfers between external memory and local RAM, while the purpose of the peripheral interface is to set configuration, get status information, basic control of SPT and trigger interrupts).&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/26418i73DC3711F3247DF8/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_30.png" alt="pastedImage_30.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;Figure &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;4&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt; SPT Block Diagram&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;The SPT Programmable Direct Memory Access (PDMA) is one of the key elements supporting the transfer of data streams into and out of the SPT core. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Some other features of the SPT are:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;ADC sampling within programmed window&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Hardware acceleration for FFT, Histogram calculation, peak search, mathematical operations on vector data&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Compression/decompression (@data transfers)&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;High-level commands for signal processing operations&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;CPU interrupt notification&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Watchdog&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H1&gt;&lt;SPAN style="color: #000080;"&gt;SPT (Signal Processing Toolbox) SIMULATOR&amp;nbsp;for MATLAB&lt;/SPAN&gt;&lt;/H1&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;To simplify the development process of radar applications, we decided to expose SPT Simulator functionality into MATLAB environment. This way, if you want to check out functionalities of SPT or even test out your algorithm by plotting step by step some intermediary data so you can fine-tune it, it will be as &lt;STRONG&gt;easy&lt;/STRONG&gt; as running a regular MATLAB m-script.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Another thing worth mentioning is that this is a &lt;STRONG&gt;bit-exact&lt;/STRONG&gt; simulator – so you can use native MATLAB functions to build your algorithm (resulting a Golden Model, due to the precision provided by having floating point) and use the simulator to build a Reference Model. This way you can use the toolbox for running different performance tests for your Radar application even without having to get the hardware out of the box.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Now let’s see how a Radar application looks like in our SPT Toolbox:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;/P&gt;&lt;H1&gt;&lt;SPAN style="color: #000080;"&gt;SPT Radar Application Example&lt;/SPAN&gt;&lt;/H1&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&lt;STRONG&gt;Note:&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;To successfully run the following example you need some Radar SDK functions. These can be found into&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;[..]\ {RADAR SDK INSTALL PATH}\ Tools\ SPT_bitexact_model\ src&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;To use them, simply download the RSDK package and add that folder to the MATLAB path.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;The Radar SDK is available for download in your &lt;A href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Femea01.safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253A%252F%252Fnxp.flexnetoperations.com%252Fcontrol%252Ffrse%252Fdownload%253Felement%253D9430347%26data%3D01%257C01%257Cdaniel.silion%2540nxp.com%257C5330de8d099d4498ec7608d5075037dd%257C686ea1d3bc2b4c6fa92cd99c5c301635%257C0%26sdata%3DSHGrVe6yNKdlrteaVpipU0rf7YN%252F1UgkHJUWTytGGPQ%253D%26reserved%3D0"&gt;Software Account&lt;/A&gt;&amp;nbsp;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;This example shows a possible way to detect the objects in front of the radar, the &lt;STRONG&gt;distance&lt;/STRONG&gt; to them and their relative &lt;STRONG&gt;velocity&lt;/STRONG&gt;. This method involves the following steps:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/27074i99AA89D69D9B757D/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_73.png" alt="pastedImage_73.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;Figure &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;5&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt; Radar application example – steps&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;/P&gt;&lt;H2&gt;&amp;nbsp;&lt;/H2&gt;&lt;H2&gt;&lt;SPAN style="color: #ff9900;"&gt;Step 1: Input data&lt;/SPAN&gt;&lt;/H2&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Input data is a 3-dimensional array made up of a demodulated signal. There is a &lt;EM&gt;page&lt;/EM&gt; for each antenna, containing a matrix where each column contains the samples of a &lt;EM&gt;chirp&lt;/EM&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&lt;STRONG&gt;NOTE&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;: In MATLAB, we refer to the third dimension as pages. For example v(:,:,1) is the first page of v.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&lt;STRONG&gt;NOTE2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;: A &lt;EM&gt;chirp&lt;/EM&gt; is a signal in which the frequency increases or decreases with time.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/26484iB470383DADBAEF89/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_80.png" alt="pastedImage_80.png" /&gt;&lt;/span&gt;&lt;BR /&gt; &lt;SPAN style="font-size: 10.0pt;"&gt;Figure &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;6&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt; Input data structure&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;The MATLAB code for generating the input data and initializing some other variables:&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Round and saturate function&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;function&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;out = round_and_saturate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;in, nbits&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp; &amp;nbsp; out =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;max&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;min&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;round&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;in *&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;^&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;nbits-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;))&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;^&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;nbits-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, -&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;^&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;nbits-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;))&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;/&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;^&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;nbits-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;End&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Number of bits used to retain the operands&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;NBITS =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;16&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Maximum range that can be detected&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;max_range =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;150&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% The radar can also detect the negative velocities and its range is in&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% fact [-max_velocity, max_velocity].&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;max_velocity =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;100&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Number of samples per chirp&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;M =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;512&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Number of chirps&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;N =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;256&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Number of antennas&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;P =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;4&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% We take as input a 3D sine wave. This is the case when there is only one&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% object in front of the radar.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% The frequency in the first dimension or the frequency of each chirp&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;fs =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;150.5&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;/ M;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% The frequency in the second dimension&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;fc =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;-99.5&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;/ N;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% The frequency in the third dimension&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;fa =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1.5&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;/ P;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;ts =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;:M-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;tc =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;:N-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;ta&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, :&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;:P-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;ts =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;repmat&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;ts,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;[&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, N, P&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;])&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;tc =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;repmat&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;tc,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;[&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;M,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, P&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;])&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;ta =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;repmat&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;ta,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;[&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;M, N,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;])&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Input data&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;input_data =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;sin&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;*&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;pi&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;*&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;fs*ts + fc*tc + fa*ta&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;))&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Input data as 16 bits fixed-point data&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;input_data_rs = round_and_saturate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;input_data, NBITS&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Once we have the input data ready, we can take the next step:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;H2&gt;&lt;SPAN style="font-size: 14pt; color: #ff9900;"&gt;Step 2: Range FFT (Fast Fourier Transform)&lt;/SPAN&gt;&lt;/H2&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;The FFT is an algorithm that samples a signal over a period of time and divides it into its fundamental frequency components.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;The output array of the range FFT is obtained by replacing each column of the input array with its Fourier transform. From each such Fourier transform one could deduce the ranges of all objects found in front of the radar.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/26706i950A1098FF0D77CE/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_89.png" alt="pastedImage_89.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;Figure &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;7&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt; Range FFT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Here is the MATLAB code for range FFT:&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Generate window coefficients for range FFT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% In the radar application, the signals of interest are narrowband&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% sinusoids of widely differing strengths (primarily as a consequence of&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% the inverse fourth power variation in radar signal strength with radar&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% range) and the usage of a window function with low sidelobes is&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% crucial for preventing one or more powerful signals from drowning out&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% weaker reflectors.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;window_rangeFFT =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;reshape&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;window&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #a020f0;"&gt;'chebwin'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, M&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;[]&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;window_rangeFFT_rs = round_and_saturate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;window_rangeFFT, NBITS&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Generate twiddle coefficients for range FFT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% The user needs only to define twiddles for one octant (- Imaginary, + Real)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% and the SPT logic determines other needed twiddles by real / imaginary&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% swaps and sign inversions.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;t =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;:M/&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;8&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;/M;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;twiddle_real = round_and_saturate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;cos&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;*&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;pi&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;*t&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, NBITS&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;twiddle_imag = round_and_saturate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;sin&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;*&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;pi&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;*t&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, NBITS&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;twiddle_rangeFFT = twiddle_real +&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1i&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;* twiddle_imag;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Perform Range FFT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% For each line a FFT is performed. The negative frequencies are discarded.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% The frequencies with significant magnitudes indicates the presents of an&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% object at a specific distance. The distance is proportional with the&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% frequency.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Non bit-exact model&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;exwindow_rangeFFT =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;repmat&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;window_rangeFFT,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;[&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, N, P&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;])&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;output_rangeFFT =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;fft&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;input_data .* exwindow_rangeFFT,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;[]&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;output_rangeFFT = output_rangeFFT&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;/&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, :, :&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;/ M;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Bit-exact model&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;output_rangeFFT_bitexact = rangeFFT&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;input_data_rs *&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;^&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;NBITS-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, window_rangeFFT_rs *&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;^&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;NBITS-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, twiddle_rangeFFT *&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;^&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;NBITS-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, M, N, P&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;output_rangeFFT_bitexact = output_rangeFFT_bitexact /&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;^&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;NBITS-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/27099iE22CB37C18616418/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_115.png" alt="pastedImage_115.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;Figure &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;8&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt; Range FFT Results&lt;/SPAN&gt;&lt;/P&gt;&lt;H2&gt;&amp;nbsp;&lt;/H2&gt;&lt;P&gt;&lt;/P&gt;&lt;H2&gt;&lt;SPAN style="color: #ff9900;"&gt;Step 3: Doppler FFT&lt;/SPAN&gt;&lt;/H2&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Doppler FFT has as input the output array of the range FFT. Similar with the range FFT case, the Doppler FFT output array is obtained by replacing each line of the input array with its Fourier transform. From each such Fourier transform one could deduce the velocities of all objects found in front of the radar. Moreover, from the matrix of each page one could deduce the distinct pairs of (range, velocity) of all objects found in front of the radar.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/26843iCBFAA5E8C2F212E9/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_122.png" alt="pastedImage_122.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;Figure &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;9&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt; Doppler FFT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Here is the MATLAB code for Doppler FFT :&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Generate window coefficients for Doppler FFT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;window_dopplerFFT =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;reshape&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;window&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #a020f0;"&gt;'chebwin'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, N&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;[]&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;window_dopplerFFT_rs = round_and_saturate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;window_dopplerFFT, NBITS&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Generate twiddle coefficients for Doppler FFT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;t =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;:N/&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;8&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;/N;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;twiddle_real = round_and_saturate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;cos&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;*&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;pi&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;*t&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, NBITS&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;twiddle_imag = round_and_saturate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;sin&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;*&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;pi&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;*t&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, NBITS&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;twiddle_dopplerFFT = twiddle_real +&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1i&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;* twiddle_imag;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Perform Doppler FFT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% For each column a FFT is performed. The frequencies with significant&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% magnitudes indicates the presents of an object with a specific velocity.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% The velocity is proportional with the frequency.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Non bit-exact model&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;exwindow_dopplerFFT =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;repmat&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;reshape&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;window_dopplerFFT,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;[])&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;[&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;M/&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, P&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;])&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;output_dopplerFFT =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;fft&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;output_rangeFFT .* exwindow_dopplerFFT,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;[]&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;/ N;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;output_dopplerFFT =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;[&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;output_dopplerFFT&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;:,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;/&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;+&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;,:&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;output_dopplerFFT&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;:,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;/&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, :&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)]&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Bit-exact model&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;output_dopplerFFT_bitexact = dopplerFFT&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;output_rangeFFT_bitexact *&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;^&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;NBITS-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, window_dopplerFFT_rs *&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;^&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;NBITS-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, twiddle_dopplerFFT *&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;^&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;NBITS-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, M, N, P&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;output_dopplerFFT_bitexact = output_dopplerFFT_bitexact /&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;^&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;NBITS-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/26874i3B531D74AEB840C3/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_127.png" alt="pastedImage_127.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;Figure &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;10&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt; Doppler FFT Results&lt;/SPAN&gt;&lt;/P&gt;&lt;H2&gt;&amp;nbsp;&lt;/H2&gt;&lt;H2&gt;&lt;SPAN style="color: #ff9900;"&gt;Step 4: Peak search&lt;/SPAN&gt;&lt;/H2&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Peak search detects the magnitude peaks of the matrix obtained from &lt;EM&gt;beam forming&lt;/EM&gt;. The beam forming cancels the time delay between the signals of any group of two adjacent antennas and adds the resulted signals. This is accomplished by performing a FFT on all vectors obtained in the following manner: for a pair [line index; column index] get the samples from all pages.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/26956i127D6A794460FD00/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_134.png" alt="pastedImage_134.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;Figure &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;11&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt; Peak search&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Here is the MATLAB code for peak search :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Generate twiddle coefficients for peak search&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;t =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;16&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;/&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;8&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;/&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;16&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;twiddle_real = round_and_saturate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;cos&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;*&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;pi&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;*t&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, NBITS&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;twiddle_imag = round_and_saturate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;sin&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;*&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;pi&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;*t&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, NBITS&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;twiddle_peakSearch = twiddle_real +&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1i&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;* twiddle_imag;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Perform Peak Search&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Non bit-exact model&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;fftOut =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;fft&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;output_dopplerFFT,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;16&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;3&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;fftOut =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;abs&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;fftOut /&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;16&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;.^&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;fftMag =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;squeeze&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;max&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;fftOut,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;[]&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;3&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;))&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Compute a histogram for each range&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% B - number of bins for histogram&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;B =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;46&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;rangeHistogram =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;zeros&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;M/&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, B&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;edges =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;[&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;.^&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;-B+&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)]&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;for&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;m =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;:M/&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;[&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;tmpHist, ~&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;]&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;= histcounts&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;fftMag&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;m, :&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, edges&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp; &amp;nbsp; rangeHistogram&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;m, :&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;= tmpHist;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;end&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Determine a threshold for each range&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;threshold =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;ones&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, M/&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;for&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;m =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;:M/&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp; &amp;nbsp; tmpHist = rangeHistogram&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;m, :&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;[&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;~, ind&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;]&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;max&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;tmpHist&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;while&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;tmpHist&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;ind&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;~=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ind = ind +&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;end&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp; &amp;nbsp; threshold&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;m&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;^&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;ind - B&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;end&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;peakTag =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;zeros&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;M/&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, N&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Tag peaks over each range gate&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;for&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;m =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;:M/&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp; &amp;nbsp; cGate = fftMag&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;m, :&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp; &amp;nbsp; peakTag&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;m,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;cGate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&amp;lt; cGate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;))&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&amp;amp;&amp;amp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;cGate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&amp;gt;= cGate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;))&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;for&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;n =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;:N-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; peakTag&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;m, n&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;cGate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;n-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&amp;lt; cGate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;n&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;))&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&amp;amp;&amp;amp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;cGate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;n&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&amp;gt;= cGate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;n+&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;))&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;end&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp; &amp;nbsp; peakTag&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;m, n+&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;cGate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;n&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&amp;lt; cGate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;))&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&amp;amp;&amp;amp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;cGate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&amp;gt;= cGate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;))&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;end&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Tag peaks over each Doppler gate&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;for&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;n =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;:N&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp; &amp;nbsp; cGate = fftMag&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;:, n&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp; &amp;nbsp; peakTag&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, n&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;= peakTag&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, n&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&amp;amp;&amp;amp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;cGate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;gt;=cGate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;))&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;for&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;m =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;:M/&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; peakTag&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;m, n&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;= peakTag&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;m, n&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&amp;amp;&amp;amp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;cGate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;m-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;lt;cGate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;m&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;) )&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&amp;amp;&amp;amp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;cGate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;m&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;gt;=cGate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;m+&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;))&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;end&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp; &amp;nbsp; peakTag&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;m+&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, n&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;= peakTag&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;m+&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, n&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&amp;amp;&amp;amp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;cGate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;m&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;lt;cGate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;m+&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;))&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;end&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Detect peaks above threshold&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;thresholdTag =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;zeros&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;size&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;peakTag&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;))&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;for&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;m =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;:M/&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp; &amp;nbsp; thresholdTag&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;m, :&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;= fftMag&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;m, :&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&amp;gt; threshold&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;m&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;end&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;output_peakSearch = peakTag .* thresholdTag;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Bit-exact model&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;[&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;output_peakSearch_bitexact, OutScratch&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;]&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;= peakSearch3D&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;output_dopplerFFT_bitexact *&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;^&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;NBITS-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, twiddle_peakSearch *&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;^&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;NBITS-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, threshold *&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;^&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;B-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, M/&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, N, P&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;H2&gt;&lt;/H2&gt;&lt;H2&gt;&lt;SPAN style="font-size: 14pt; color: #ff9900;"&gt;Step5: Range and Velocity&lt;/SPAN&gt;&lt;/H2&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;The result matrix contains all detectable ranges(line-indexed), and all detectable velocities (column- indexed). The matrix contains only 1s and 0s. Each element that has the value 1 corresponds to at least one detected object and its velocity and range are given by its coordinates.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;So, if we use this plot we will get the following image:&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;figure&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;mesh&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;max_velocity *&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;-N:&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;:N-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;/N, max_range *&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;:M-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;/M, output_peakSearch_bitexact&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;title&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #a020f0;"&gt;'Peak Search result'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;xlabel&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #a020f0;"&gt;'Velocity'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;ylabel&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #a020f0;"&gt;'Range'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;zlabel&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #a020f0;"&gt;'Tag'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/26743i29EE0254B9240D9B/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_142.png" alt="pastedImage_142.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;Figure &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;12&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt; Peak search result&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;This shows an object coming towards the radar with 78.13 m/s velocity, being at that moment at 87.89m away.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;So, this example shows a simple method for simulating the implementation of a Radar application (starting with a demodulated input, performing range and Doppler FFT and a peak search to get object’s velocity and range, relative to the Radar).&lt;/SPAN&gt;&lt;/P&gt;&lt;H1&gt;&amp;nbsp;&lt;/H1&gt;&lt;H1&gt;&lt;SPAN style="color: #000080;"&gt;Ending note&lt;/SPAN&gt;&lt;/H1&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Why use this toolbox? Because you can &lt;STRONG&gt;easily&lt;/STRONG&gt; change &lt;STRONG&gt;any&lt;/STRONG&gt; variable, at &lt;STRONG&gt;any&lt;/STRONG&gt; step and &lt;STRONG&gt;instantly&lt;/STRONG&gt; see how it impacts your algorithm, all of this without having to worry about nothing (hardware-related).&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;In this current context, where time-to-market is a big deal, the &lt;STRONG&gt;opportunity&lt;/STRONG&gt; of a &lt;STRONG&gt;speed-up&lt;/STRONG&gt; for the development of various applications should be worth taking.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;/P&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #000000; background-color: #000000; border-color: #000000;" width="100%"&gt;&lt;THEAD style="border: inherit solid inherit;"&gt;&lt;TR style="background-color: #efefef;"&gt;&lt;TH colspan="3" style="width: 93%; background-color: #000000; text-align: center;"&gt;&lt;SPAN style="color: #ffffff;"&gt;How to Detect Objects With RADAR Using NXP's Model-Based Design Toolbox&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;/THEAD&gt;&lt;TBODY style="border: inherit solid inherit;"&gt;&lt;TR style="background-color: #000000;"&gt;&lt;TD style="width: 19%; text-align: center;"&gt;&lt;/TD&gt;&lt;TD style="width: 61.4981%; text-align: center;"&gt;&lt;div class="lia-vid-container video-embed-center"&gt;&lt;div id="lia-vid-6185792769001w320h240r746" class="lia-video-brightcove-player-container"&gt;&lt;video-js data-video-id="6185792769001" data-account="6153537070001" data-player="default" data-embed="default" class="vjs-fluid" controls="" data-application-id="" style="width: 100%; height: 100%;"&gt;&lt;/video-js&gt;&lt;/div&gt;&lt;script src="https://players.brightcove.net/6153537070001/default_default/index.min.js"&gt;&lt;/script&gt;&lt;script&gt;(function() {  var wrapper = document.getElementById('lia-vid-6185792769001w320h240r746');  var videoEl = wrapper ? wrapper.querySelector('video-js') : null;  if (videoEl) {     if (window.videojs) {       window.videojs(videoEl).ready(function() {         this.on('loadedmetadata', function() {           this.el().querySelectorAll('.vjs-load-progress div[data-start]').forEach(function(bar) {             bar.setAttribute('role', 'presentation');             bar.setAttribute('aria-hidden', 'true');           });         });       });     }  }})();&lt;/script&gt;&lt;a class="video-embed-link" href="https://community.nxp.com/t5/video/gallerypage/video-id/6185792769001"&gt;（マイビデオを表示）&lt;/a&gt;&lt;/div&gt;&lt;/TD&gt;&lt;TD style="width: 12.5019%; text-align: center;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: inherit solid inherit;"&gt;&lt;TD colspan="3" style="width: 19%;"&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;NOTE: Chinese viewers can watch the video on YOUKU using this&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A data-content-finding="Community" href="http://v.youku.com/v_show/id_XMzMwMzg2ODkzNg==.html?spm=a2h3j.8428770.3416059.1" style="color: #5e89c1; border: 0px; font-weight: inherit; text-decoration: none; padding: 0px calc(12px + 0.35ex) 0px 0px;"&gt;link&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #212121; border: 0px; font-weight: inherit; font-size: 16px;"&gt;注意：中国观众可以使用此链接观看&lt;A data-content-finding="Community" href="http://v.youku.com/v_show/id_XMzMwMzg2ODkzNg==.html?spm=a2h3j.8428770.3416059.1" style="color: #5e89c1; border: 0px; font-weight: inherit; text-decoration: none; font-size: 16px; padding: 0px calc(12px + 0.35ex) 0px 0px;"&gt;YOUKU上的视频&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPDATE May 11th, 2018: for latest Radar SDK version 0.9.0 the new MATLAB script attached bellow as demo_4antennas_video_RSDKv090.m shall be used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;UPDATE October 11th, 2018: for latest Radar SDK version&amp;nbsp;1.1.1 the new MATLAB script attached bellow as demo_4antennas_video_RSDKv1_1_1.m shall be used.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Dec 2017 15:33:35 GMT</pubDate>
    <dc:creator>constantinrazva</dc:creator>
    <dc:date>2017-12-15T15:33:35Z</dc:date>
    <item>
      <title>RADAR Systems Design and Programming Made Simple with NXP’s Model-Based Design Toolbox</title>
      <link>https://community.nxp.com/t5/MBDT-for-RADAR/RADAR-Systems-Design-and-Programming-Made-Simple-with-NXP-s/m-p/726907#M5</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;H1 style="text-align: center;"&gt;&lt;SPAN style="color: #000080;"&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/27216iCD9A304872EB2A3E/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/H1&gt;&lt;H1&gt;&lt;/H1&gt;&lt;H1&gt;&lt;SPAN style="color: #000080;"&gt;INTRODUCTION&lt;/SPAN&gt;&lt;/H1&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Even though the purpose of this article is to familiarize you with SPT simulator for MATLAB, this being the first release&amp;nbsp;we want to start it off by putting some things into context.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;In this article,&amp;nbsp;we'll begin by giving you an &lt;/SPAN&gt;overview&lt;SPAN style="font-size: 12.0pt;"&gt; of what &lt;STRONG&gt;RADAR&lt;/STRONG&gt; is, where it is used and how it is different than other technologies like vision or LIDAR.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;In the second part&amp;nbsp;we'll be talking about a solution for RADAR developed by NXP and how it uses specialized hardware accelerators for signal processing.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;The&lt;/SPAN&gt; final part &lt;SPAN style="font-size: 12pt;"&gt;will cover the newly released&amp;nbsp;SIMULATOR&amp;nbsp;for &lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;Signal Processing Toolbox&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt; (the hardware accelerator that resides on NXP’s RADAR products) and why it is easier to develop your algorithms on it, rather than on the real hardware (how it helps with visualizing data, rapidly changing parameters/steps used, saving time – thus decreasing time-to-market) – all &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;with &lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;the help of an &lt;/SPAN&gt;example&lt;SPAN style="font-size: 12pt;"&gt;, using a simulation of a radar signal to show one method you could use to find the objects in the proximity of the car, the distance to them and their relative velocity.&lt;/SPAN&gt;&lt;/P&gt;&lt;H1&gt;&amp;nbsp;&lt;/H1&gt;&lt;P&gt;&lt;/P&gt;&lt;H1&gt;&lt;SPAN style="color: #000080;"&gt;WHAT IS&amp;nbsp;RADAR?&lt;/SPAN&gt;&lt;/H1&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;RADAR is a key component of ADAS (Advanced Driver Assistance Systems) that constantly senses the objects in the proximity of the car – it can determine the distance to them, their relative velocity and the angle.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;RADAR improves driving efficiency and safety, being used for collision detection, warning and avoidance, blind spot monitoring, lane change assistance, rear cross-traffic alerts, vulnerable road user detection, adaptive cruise control, etc.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/27070i7B9715C57DD674B2/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_12.png" alt="pastedImage_12.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;Figure &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt; General RADAR use&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Currently there are 4 major technologies which provide external and immediate information to autonomous and semi-autonomous vehicles:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&lt;STRONG&gt;RADAR:&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;a system that uses radio waves to determine the range, angle and velocity of objects&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Vision:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;a system that uses sophisticated object detection algorithms to understand what is visible from the cameras&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;LIDAR&amp;nbsp;(Light Detection and Ranging):&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;technology that uses light in the form of a pulsed laser to measure ranges (distances)&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Ultrasonic:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;a system that uses ultrasonic sound waves to detect the distance to objects&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Each one of them has advantages and disadvantages, this being the reason why we usually see them used in tandem. Let’s talk more about the &lt;STRONG&gt;ups&lt;/STRONG&gt; and &lt;STRONG&gt;downs&lt;/STRONG&gt; of using Radar technology:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;First of all, RADAR is computationally lighter than vision and uses far less data than a LIDAR. Even though it is less angularly accurate than LIDAR, it can work &lt;STRONG&gt;regardless of the weather condition &lt;/STRONG&gt;and even use reflection to see behind obstacles. This means that while LIDAR and vision struggle with bright light, night, snow, fog, dust and rain, RADAR maintains the same performances. Because of this, companies like Tesla believe it can be used not just as a supplementary sensor to the image processing system, but as a primary control sensor, maybe not even requiring confirmation from the camera:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&lt;EM&gt;“The radar was added to all Tesla vehicles in October 2014 as part of the Autopilot hardware suite, but was only meant to be a supplementary sensor to the primary camera and image processing system. After careful consideration, we now believe it can be used as a primary control sensor without requiring the camera to confirm visual image recognition.”&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt;"&gt; (Tesla team)&lt;/SPAN&gt;&lt;/P&gt;&lt;H1&gt;&amp;nbsp;&lt;/H1&gt;&lt;P&gt;&lt;/P&gt;&lt;H1&gt;&lt;SPAN style="color: #000080;"&gt;RADAR COMPONENTS&lt;/SPAN&gt;&lt;/H1&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;A typical RADAR module consists of a transmit solution (Tx), a voltage-controlled oscillator (VCO) and a multiple-channel receiver IC (Rx), along with a MCU. The main controller and modulation master is a single MCU with integrated high-speed analog-to-digital converters (ADCs) and appropriate signal processing capability, such as Fast Fourier Transforms (FFTs).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/27071i0CA2EA7A6E398F48/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_25.png" alt="pastedImage_25.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;Figure &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt; Typical Radar components&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Let us look at a concrete example: NXP’s &lt;STRONG&gt;S32R274&lt;/STRONG&gt; EVB (Evaluation board):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/27073iF378B88B56530397/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_27.png" alt="pastedImage_27.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;Figure &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;3&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt; S32R274&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;This is a 32-bit Power Architecture based Microcontroller Unit (MCU) that supports surround radar and mid-range front radar applications. It is designed to address advanced radar signal processing capabilities combined with automotive MCU capabilities for generic software tasks and car bus interfacing.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&amp;nbsp;&lt;BR /&gt;S32R274 supports radar signal processing acceleration via the &lt;STRONG&gt;Signal Processing Toolbox (SPT). &lt;/STRONG&gt;This is a powerful engine containing high-performance signal processing operations (like FFT, peak search, etc.). The &lt;STRONG&gt;SPT&lt;/STRONG&gt; is connected to the device by an Advanced High-Performance master bus and a peripheral bus (system bus master interface is used for fast data transfers between external memory and local RAM, while the purpose of the peripheral interface is to set configuration, get status information, basic control of SPT and trigger interrupts).&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/26418i73DC3711F3247DF8/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_30.png" alt="pastedImage_30.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;Figure &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;4&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt; SPT Block Diagram&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;The SPT Programmable Direct Memory Access (PDMA) is one of the key elements supporting the transfer of data streams into and out of the SPT core. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Some other features of the SPT are:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;ADC sampling within programmed window&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Hardware acceleration for FFT, Histogram calculation, peak search, mathematical operations on vector data&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Compression/decompression (@data transfers)&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;High-level commands for signal processing operations&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;CPU interrupt notification&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Watchdog&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H1&gt;&lt;SPAN style="color: #000080;"&gt;SPT (Signal Processing Toolbox) SIMULATOR&amp;nbsp;for MATLAB&lt;/SPAN&gt;&lt;/H1&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;To simplify the development process of radar applications, we decided to expose SPT Simulator functionality into MATLAB environment. This way, if you want to check out functionalities of SPT or even test out your algorithm by plotting step by step some intermediary data so you can fine-tune it, it will be as &lt;STRONG&gt;easy&lt;/STRONG&gt; as running a regular MATLAB m-script.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Another thing worth mentioning is that this is a &lt;STRONG&gt;bit-exact&lt;/STRONG&gt; simulator – so you can use native MATLAB functions to build your algorithm (resulting a Golden Model, due to the precision provided by having floating point) and use the simulator to build a Reference Model. This way you can use the toolbox for running different performance tests for your Radar application even without having to get the hardware out of the box.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Now let’s see how a Radar application looks like in our SPT Toolbox:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;/P&gt;&lt;H1&gt;&lt;SPAN style="color: #000080;"&gt;SPT Radar Application Example&lt;/SPAN&gt;&lt;/H1&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&lt;STRONG&gt;Note:&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;To successfully run the following example you need some Radar SDK functions. These can be found into&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;[..]\ {RADAR SDK INSTALL PATH}\ Tools\ SPT_bitexact_model\ src&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;To use them, simply download the RSDK package and add that folder to the MATLAB path.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;The Radar SDK is available for download in your &lt;A href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Femea01.safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253A%252F%252Fnxp.flexnetoperations.com%252Fcontrol%252Ffrse%252Fdownload%253Felement%253D9430347%26data%3D01%257C01%257Cdaniel.silion%2540nxp.com%257C5330de8d099d4498ec7608d5075037dd%257C686ea1d3bc2b4c6fa92cd99c5c301635%257C0%26sdata%3DSHGrVe6yNKdlrteaVpipU0rf7YN%252F1UgkHJUWTytGGPQ%253D%26reserved%3D0"&gt;Software Account&lt;/A&gt;&amp;nbsp;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;This example shows a possible way to detect the objects in front of the radar, the &lt;STRONG&gt;distance&lt;/STRONG&gt; to them and their relative &lt;STRONG&gt;velocity&lt;/STRONG&gt;. This method involves the following steps:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/27074i99AA89D69D9B757D/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_73.png" alt="pastedImage_73.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;Figure &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;5&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt; Radar application example – steps&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;/P&gt;&lt;H2&gt;&amp;nbsp;&lt;/H2&gt;&lt;H2&gt;&lt;SPAN style="color: #ff9900;"&gt;Step 1: Input data&lt;/SPAN&gt;&lt;/H2&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Input data is a 3-dimensional array made up of a demodulated signal. There is a &lt;EM&gt;page&lt;/EM&gt; for each antenna, containing a matrix where each column contains the samples of a &lt;EM&gt;chirp&lt;/EM&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&lt;STRONG&gt;NOTE&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;: In MATLAB, we refer to the third dimension as pages. For example v(:,:,1) is the first page of v.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&lt;STRONG&gt;NOTE2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;: A &lt;EM&gt;chirp&lt;/EM&gt; is a signal in which the frequency increases or decreases with time.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/26484iB470383DADBAEF89/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_80.png" alt="pastedImage_80.png" /&gt;&lt;/span&gt;&lt;BR /&gt; &lt;SPAN style="font-size: 10.0pt;"&gt;Figure &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;6&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt; Input data structure&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;The MATLAB code for generating the input data and initializing some other variables:&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Round and saturate function&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;function&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;out = round_and_saturate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;in, nbits&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp; &amp;nbsp; out =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;max&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;min&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;round&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;in *&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;^&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;nbits-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;))&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;^&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;nbits-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, -&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;^&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;nbits-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;))&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;/&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;^&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;nbits-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;End&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Number of bits used to retain the operands&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;NBITS =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;16&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Maximum range that can be detected&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;max_range =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;150&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% The radar can also detect the negative velocities and its range is in&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% fact [-max_velocity, max_velocity].&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;max_velocity =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;100&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Number of samples per chirp&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;M =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;512&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Number of chirps&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;N =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;256&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Number of antennas&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;P =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;4&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% We take as input a 3D sine wave. This is the case when there is only one&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% object in front of the radar.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% The frequency in the first dimension or the frequency of each chirp&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;fs =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;150.5&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;/ M;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% The frequency in the second dimension&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;fc =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;-99.5&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;/ N;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% The frequency in the third dimension&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;fa =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1.5&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;/ P;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;ts =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;:M-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;tc =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;:N-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;ta&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, :&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;:P-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;ts =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;repmat&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;ts,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;[&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, N, P&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;])&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;tc =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;repmat&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;tc,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;[&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;M,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, P&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;])&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;ta =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;repmat&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;ta,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;[&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;M, N,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;])&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Input data&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;input_data =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;sin&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;*&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;pi&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;*&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;fs*ts + fc*tc + fa*ta&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;))&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Input data as 16 bits fixed-point data&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;input_data_rs = round_and_saturate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;input_data, NBITS&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Once we have the input data ready, we can take the next step:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;H2&gt;&lt;SPAN style="font-size: 14pt; color: #ff9900;"&gt;Step 2: Range FFT (Fast Fourier Transform)&lt;/SPAN&gt;&lt;/H2&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;The FFT is an algorithm that samples a signal over a period of time and divides it into its fundamental frequency components.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;The output array of the range FFT is obtained by replacing each column of the input array with its Fourier transform. From each such Fourier transform one could deduce the ranges of all objects found in front of the radar.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/26706i950A1098FF0D77CE/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_89.png" alt="pastedImage_89.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;Figure &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;7&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt; Range FFT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Here is the MATLAB code for range FFT:&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Generate window coefficients for range FFT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% In the radar application, the signals of interest are narrowband&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% sinusoids of widely differing strengths (primarily as a consequence of&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% the inverse fourth power variation in radar signal strength with radar&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% range) and the usage of a window function with low sidelobes is&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% crucial for preventing one or more powerful signals from drowning out&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% weaker reflectors.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;window_rangeFFT =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;reshape&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;window&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #a020f0;"&gt;'chebwin'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, M&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;[]&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;window_rangeFFT_rs = round_and_saturate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;window_rangeFFT, NBITS&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Generate twiddle coefficients for range FFT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% The user needs only to define twiddles for one octant (- Imaginary, + Real)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% and the SPT logic determines other needed twiddles by real / imaginary&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% swaps and sign inversions.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;t =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;:M/&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;8&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;/M;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;twiddle_real = round_and_saturate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;cos&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;*&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;pi&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;*t&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, NBITS&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;twiddle_imag = round_and_saturate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;sin&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;*&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;pi&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;*t&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, NBITS&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;twiddle_rangeFFT = twiddle_real +&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1i&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;* twiddle_imag;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Perform Range FFT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% For each line a FFT is performed. The negative frequencies are discarded.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% The frequencies with significant magnitudes indicates the presents of an&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% object at a specific distance. The distance is proportional with the&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% frequency.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Non bit-exact model&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;exwindow_rangeFFT =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;repmat&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;window_rangeFFT,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;[&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, N, P&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;])&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;output_rangeFFT =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;fft&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;input_data .* exwindow_rangeFFT,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;[]&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;output_rangeFFT = output_rangeFFT&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;/&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, :, :&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;/ M;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Bit-exact model&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;output_rangeFFT_bitexact = rangeFFT&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;input_data_rs *&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;^&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;NBITS-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, window_rangeFFT_rs *&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;^&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;NBITS-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, twiddle_rangeFFT *&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;^&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;NBITS-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, M, N, P&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;output_rangeFFT_bitexact = output_rangeFFT_bitexact /&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;^&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;NBITS-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/27099iE22CB37C18616418/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_115.png" alt="pastedImage_115.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;Figure &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;8&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt; Range FFT Results&lt;/SPAN&gt;&lt;/P&gt;&lt;H2&gt;&amp;nbsp;&lt;/H2&gt;&lt;P&gt;&lt;/P&gt;&lt;H2&gt;&lt;SPAN style="color: #ff9900;"&gt;Step 3: Doppler FFT&lt;/SPAN&gt;&lt;/H2&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Doppler FFT has as input the output array of the range FFT. Similar with the range FFT case, the Doppler FFT output array is obtained by replacing each line of the input array with its Fourier transform. From each such Fourier transform one could deduce the velocities of all objects found in front of the radar. Moreover, from the matrix of each page one could deduce the distinct pairs of (range, velocity) of all objects found in front of the radar.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/26843iCBFAA5E8C2F212E9/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_122.png" alt="pastedImage_122.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;Figure &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;9&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt; Doppler FFT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Here is the MATLAB code for Doppler FFT :&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Generate window coefficients for Doppler FFT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;window_dopplerFFT =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;reshape&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;window&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #a020f0;"&gt;'chebwin'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, N&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;[]&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;window_dopplerFFT_rs = round_and_saturate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;window_dopplerFFT, NBITS&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Generate twiddle coefficients for Doppler FFT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;t =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;:N/&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;8&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;/N;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;twiddle_real = round_and_saturate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;cos&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;*&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;pi&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;*t&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, NBITS&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;twiddle_imag = round_and_saturate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;sin&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;*&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;pi&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;*t&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, NBITS&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;twiddle_dopplerFFT = twiddle_real +&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1i&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;* twiddle_imag;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Perform Doppler FFT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% For each column a FFT is performed. The frequencies with significant&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% magnitudes indicates the presents of an object with a specific velocity.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% The velocity is proportional with the frequency.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Non bit-exact model&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;exwindow_dopplerFFT =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;repmat&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;reshape&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;window_dopplerFFT,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;[])&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;[&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;M/&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, P&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;])&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;output_dopplerFFT =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;fft&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;output_rangeFFT .* exwindow_dopplerFFT,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;[]&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;/ N;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;output_dopplerFFT =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;[&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;output_dopplerFFT&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;:,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;/&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;+&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;,:&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;output_dopplerFFT&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;:,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;/&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, :&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)]&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Bit-exact model&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;output_dopplerFFT_bitexact = dopplerFFT&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;output_rangeFFT_bitexact *&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;^&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;NBITS-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, window_dopplerFFT_rs *&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;^&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;NBITS-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, twiddle_dopplerFFT *&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;^&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;NBITS-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, M, N, P&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;output_dopplerFFT_bitexact = output_dopplerFFT_bitexact /&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;^&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;NBITS-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/26874i3B531D74AEB840C3/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_127.png" alt="pastedImage_127.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;Figure &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;10&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt; Doppler FFT Results&lt;/SPAN&gt;&lt;/P&gt;&lt;H2&gt;&amp;nbsp;&lt;/H2&gt;&lt;H2&gt;&lt;SPAN style="color: #ff9900;"&gt;Step 4: Peak search&lt;/SPAN&gt;&lt;/H2&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Peak search detects the magnitude peaks of the matrix obtained from &lt;EM&gt;beam forming&lt;/EM&gt;. The beam forming cancels the time delay between the signals of any group of two adjacent antennas and adds the resulted signals. This is accomplished by performing a FFT on all vectors obtained in the following manner: for a pair [line index; column index] get the samples from all pages.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/26956i127D6A794460FD00/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_134.png" alt="pastedImage_134.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;Figure &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;11&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt; Peak search&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Here is the MATLAB code for peak search :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Generate twiddle coefficients for peak search&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;t =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;16&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;/&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;8&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;/&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;16&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;twiddle_real = round_and_saturate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;cos&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;*&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;pi&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;*t&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, NBITS&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;twiddle_imag = round_and_saturate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;sin&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;*&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;pi&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;*t&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, NBITS&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;twiddle_peakSearch = twiddle_real +&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1i&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;* twiddle_imag;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Perform Peak Search&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Non bit-exact model&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;fftOut =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;fft&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;output_dopplerFFT,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;16&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;3&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;fftOut =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;abs&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;fftOut /&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;16&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;.^&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;fftMag =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;squeeze&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;max&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;fftOut,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;[]&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;3&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;))&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Compute a histogram for each range&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% B - number of bins for histogram&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;B =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;46&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;rangeHistogram =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;zeros&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;M/&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, B&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;edges =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;[&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;.^&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;-B+&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)]&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;for&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;m =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;:M/&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;[&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;tmpHist, ~&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;]&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;= histcounts&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;fftMag&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;m, :&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, edges&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp; &amp;nbsp; rangeHistogram&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;m, :&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;= tmpHist;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;end&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Determine a threshold for each range&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;threshold =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;ones&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, M/&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;for&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;m =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;:M/&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp; &amp;nbsp; tmpHist = rangeHistogram&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;m, :&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;[&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;~, ind&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;]&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;max&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;tmpHist&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;while&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;tmpHist&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;ind&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;~=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ind = ind +&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;end&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp; &amp;nbsp; threshold&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;m&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;^&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;ind - B&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;end&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;peakTag =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;zeros&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;M/&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, N&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Tag peaks over each range gate&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;for&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;m =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;:M/&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp; &amp;nbsp; cGate = fftMag&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;m, :&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp; &amp;nbsp; peakTag&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;m,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;cGate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&amp;lt; cGate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;))&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&amp;amp;&amp;amp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;cGate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&amp;gt;= cGate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;))&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;for&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;n =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;:N-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; peakTag&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;m, n&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;cGate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;n-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&amp;lt; cGate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;n&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;))&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&amp;amp;&amp;amp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;cGate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;n&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&amp;gt;= cGate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;n+&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;))&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;end&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp; &amp;nbsp; peakTag&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;m, n+&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;cGate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;n&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&amp;lt; cGate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;))&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&amp;amp;&amp;amp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;cGate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&amp;gt;= cGate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;))&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;end&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Tag peaks over each Doppler gate&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;for&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;n =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;:N&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp; &amp;nbsp; cGate = fftMag&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;:, n&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp; &amp;nbsp; peakTag&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, n&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;= peakTag&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, n&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&amp;amp;&amp;amp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;cGate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;gt;=cGate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;))&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;for&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;m =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;:M/&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; peakTag&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;m, n&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;= peakTag&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;m, n&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&amp;amp;&amp;amp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;cGate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;m-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;lt;cGate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;m&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;) )&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&amp;amp;&amp;amp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;cGate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;m&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;gt;=cGate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;m+&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;))&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;end&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp; &amp;nbsp; peakTag&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;m+&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, n&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;= peakTag&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;m+&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, n&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&amp;amp;&amp;amp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;cGate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;m&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;lt;cGate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;m+&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;))&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;end&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Detect peaks above threshold&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;thresholdTag =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;zeros&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;size&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;peakTag&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;))&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;for&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;m =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;:M/&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp; &amp;nbsp; thresholdTag&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;m, :&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;= fftMag&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;m, :&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&amp;gt; threshold&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;m&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;end&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;output_peakSearch = peakTag .* thresholdTag;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: forestgreen;"&gt;% Bit-exact model&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;[&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;output_peakSearch_bitexact, OutScratch&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;]&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;&amp;nbsp;= peakSearch3D&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;output_dopplerFFT_bitexact *&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;^&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;NBITS-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, twiddle_peakSearch *&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;^&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;NBITS-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, threshold *&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;^&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;B-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, M/&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;, N, P&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;H2&gt;&lt;/H2&gt;&lt;H2&gt;&lt;SPAN style="font-size: 14pt; color: #ff9900;"&gt;Step5: Range and Velocity&lt;/SPAN&gt;&lt;/H2&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;The result matrix contains all detectable ranges(line-indexed), and all detectable velocities (column- indexed). The matrix contains only 1s and 0s. Each element that has the value 1 corresponds to at least one detected object and its velocity and range are given by its coordinates.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;So, if we use this plot we will get the following image:&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;figure&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;mesh&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;max_velocity *&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;-N:&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;:N-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;/N, max_range *&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;:M-&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #3333ff;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;/M, output_peakSearch_bitexact&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;title&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #a020f0;"&gt;'Peak Search result'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;xlabel&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #a020f0;"&gt;'Velocity'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;ylabel&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #a020f0;"&gt;'Range'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: blue;"&gt;zlabel&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #a020f0;"&gt;'Tag'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #008800;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: #333333;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/26743i29EE0254B9240D9B/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_142.png" alt="pastedImage_142.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;Figure &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;12&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt; Peak search result&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;This shows an object coming towards the radar with 78.13 m/s velocity, being at that moment at 87.89m away.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;So, this example shows a simple method for simulating the implementation of a Radar application (starting with a demodulated input, performing range and Doppler FFT and a peak search to get object’s velocity and range, relative to the Radar).&lt;/SPAN&gt;&lt;/P&gt;&lt;H1&gt;&amp;nbsp;&lt;/H1&gt;&lt;H1&gt;&lt;SPAN style="color: #000080;"&gt;Ending note&lt;/SPAN&gt;&lt;/H1&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Why use this toolbox? Because you can &lt;STRONG&gt;easily&lt;/STRONG&gt; change &lt;STRONG&gt;any&lt;/STRONG&gt; variable, at &lt;STRONG&gt;any&lt;/STRONG&gt; step and &lt;STRONG&gt;instantly&lt;/STRONG&gt; see how it impacts your algorithm, all of this without having to worry about nothing (hardware-related).&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;In this current context, where time-to-market is a big deal, the &lt;STRONG&gt;opportunity&lt;/STRONG&gt; of a &lt;STRONG&gt;speed-up&lt;/STRONG&gt; for the development of various applications should be worth taking.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;/P&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #000000; background-color: #000000; border-color: #000000;" width="100%"&gt;&lt;THEAD style="border: inherit solid inherit;"&gt;&lt;TR style="background-color: #efefef;"&gt;&lt;TH colspan="3" style="width: 93%; background-color: #000000; text-align: center;"&gt;&lt;SPAN style="color: #ffffff;"&gt;How to Detect Objects With RADAR Using NXP's Model-Based Design Toolbox&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;/THEAD&gt;&lt;TBODY style="border: inherit solid inherit;"&gt;&lt;TR style="background-color: #000000;"&gt;&lt;TD style="width: 19%; text-align: center;"&gt;&lt;/TD&gt;&lt;TD style="width: 61.4981%; text-align: center;"&gt;&lt;div class="lia-vid-container video-embed-center"&gt;&lt;div id="lia-vid-6185792769001w320h240r367" class="lia-video-brightcove-player-container"&gt;&lt;video-js data-video-id="6185792769001" data-account="6153537070001" data-player="default" data-embed="default" class="vjs-fluid" controls="" data-application-id="" style="width: 100%; height: 100%;"&gt;&lt;/video-js&gt;&lt;/div&gt;&lt;script src="https://players.brightcove.net/6153537070001/default_default/index.min.js"&gt;&lt;/script&gt;&lt;script&gt;(function() {  var wrapper = document.getElementById('lia-vid-6185792769001w320h240r367');  var videoEl = wrapper ? wrapper.querySelector('video-js') : null;  if (videoEl) {     if (window.videojs) {       window.videojs(videoEl).ready(function() {         this.on('loadedmetadata', function() {           this.el().querySelectorAll('.vjs-load-progress div[data-start]').forEach(function(bar) {             bar.setAttribute('role', 'presentation');             bar.setAttribute('aria-hidden', 'true');           });         });       });     }  }})();&lt;/script&gt;&lt;a class="video-embed-link" href="https://community.nxp.com/t5/video/gallerypage/video-id/6185792769001"&gt;（マイビデオを表示）&lt;/a&gt;&lt;/div&gt;&lt;/TD&gt;&lt;TD style="width: 12.5019%; text-align: center;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: inherit solid inherit;"&gt;&lt;TD colspan="3" style="width: 19%;"&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;NOTE: Chinese viewers can watch the video on YOUKU using this&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A data-content-finding="Community" href="http://v.youku.com/v_show/id_XMzMwMzg2ODkzNg==.html?spm=a2h3j.8428770.3416059.1" style="color: #5e89c1; border: 0px; font-weight: inherit; text-decoration: none; padding: 0px calc(12px + 0.35ex) 0px 0px;"&gt;link&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #212121; border: 0px; font-weight: inherit; font-size: 16px;"&gt;注意：中国观众可以使用此链接观看&lt;A data-content-finding="Community" href="http://v.youku.com/v_show/id_XMzMwMzg2ODkzNg==.html?spm=a2h3j.8428770.3416059.1" style="color: #5e89c1; border: 0px; font-weight: inherit; text-decoration: none; font-size: 16px; padding: 0px calc(12px + 0.35ex) 0px 0px;"&gt;YOUKU上的视频&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPDATE May 11th, 2018: for latest Radar SDK version 0.9.0 the new MATLAB script attached bellow as demo_4antennas_video_RSDKv090.m shall be used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;UPDATE October 11th, 2018: for latest Radar SDK version&amp;nbsp;1.1.1 the new MATLAB script attached bellow as demo_4antennas_video_RSDKv1_1_1.m shall be used.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Dec 2017 15:33:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MBDT-for-RADAR/RADAR-Systems-Design-and-Programming-Made-Simple-with-NXP-s/m-p/726907#M5</guid>
      <dc:creator>constantinrazva</dc:creator>
      <dc:date>2017-12-15T15:33:35Z</dc:date>
    </item>
  </channel>
</rss>

