Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
resources:eval:user-guides:ad9081_fmca_ebz:radar [21 Sep 2021 12:41] – [GNU Radio Integration] David Winterresources:eval:user-guides:ad9081_fmca_ebz:radar [30 Jan 2023 01:51] (current) Joyce Velasco
Line 1: Line 1:
-===== gr-ofdmradar - OFDM Radar on MxFE Platforms using IIO =====+====== gr-ofdmradar - OFDM Radar on MxFE Platforms using IIO ======
  
 This page is dedicated to the details of building an OFDM radar on a ZCU102 + AD9081 with GNURadio and IIO. This page is dedicated to the details of building an OFDM radar on a ZCU102 + AD9081 with GNURadio and IIO.
 +
 +This was based on a paper pressented at:
 +  *  {{youtube>hXLwt3q2evs}}
 +  * [[https://events.gnuradio.org/event/8/contributions/130/attachments/54/103/GRCON%202021%20Winter.pdf|slides]]
  
 If you just want to get the software and hardware running, the following section covers the setup instructions: If you just want to get the software and hardware running, the following section covers the setup instructions:
Line 17: Line 21:
  
   * A development device running x86_64 Linux   * A development device running x86_64 Linux
-  * Vivado 2020.2 (Or whatever the current hdl master branch requires) including the Vitis SDK, including a License for MPSoC parts (Included with evaluation kit)+  * Vivado 2020.2 (Or whatever the current hdl master branch requires)the Vitis SDK and a License for MPSoC parts (Included with evaluation kit)
   * A recent software build toolchain. (Usually provided by your Linux distribution. build-essential on debian stable+, base-devel on ArchLinux, etc.)   * A recent software build toolchain. (Usually provided by your Linux distribution. build-essential on debian stable+, base-devel on ArchLinux, etc.)
  
 ==== Preparing the ZCU102 boot files ==== ==== Preparing the ZCU102 boot files ====
  
-It is usually a good idea to start out by installing a recent image of [[resources:tools-software:linux-software:adi-kuiper_images|Kuiper Linux]] onto the ZCU102's SD card, so you don't have to rebuild the rootfs.+It is usually a good idea to start out by installing a recent image of [[:resources:tools-software:linux-software:kuiper-linux |Kuiper Linux]] onto the ZCU102's SD card, so you don't have to rebuild the rootfs.
  
 === Linux Kernel === === Linux Kernel ===
Line 126: Line 130:
 <code> <code>
 # Checkout code # Checkout code
-git clone https://github.com/Yamakaja/gr-ofdmradar.git+git clone https://github.com/analogdevicesinc/gr-ofdmradar.git
 cd gr-ofdmradar cd gr-ofdmradar
  
Line 172: Line 176:
 {{:resources:eval:user-guides:ad9081_fmca_ebz:radar:ofdmradar-ad9081-flowgraph.png|}} {{:resources:eval:user-guides:ad9081_fmca_ebz:radar:ofdmradar-ad9081-flowgraph.png|}}
  
-The following video shows a test where we covered a distance of 30-40m:+The following video shows a test where we covered a distance of ~35m:
 {{youtube>gtTILs929aU?large}} {{youtube>gtTILs929aU?large}}
  
Line 179: Line 183:
 For more details in general about the theoretical underpinnings of OFDM radar, please check out Martin Brauns dissertation: [[https://publikationen.bibliothek.kit.edu/1000038892]] For more details in general about the theoretical underpinnings of OFDM radar, please check out Martin Brauns dissertation: [[https://publikationen.bibliothek.kit.edu/1000038892]]
  
-For more information about gr-ofdmradar system parameters check out the [[https://github.com/Yamakaja/gr-ofdmradar/blob/master/README.md|gr-ofdmradar/README.md]]+For more information about gr-ofdmradar system parameters check out the [[https://github.com/analogdevicesinc/gr-ofdmradar/blob/master/README.md|gr-ofdmradar/README.md]]
  
  
-  * [[https://github.com/Yamakaja/gr-ofdmradar|gr-ofdmradar]]+  * [[https://github.com/analogdevicesinc/gr-ofdmradar|gr-ofdmradar]]
   * [[https://github.com/Yamakaja/gnuradio/tree/feature/gr-iio-tdd|GNU Radio branch with AD9081 blocks]]   * [[https://github.com/Yamakaja/gnuradio/tree/feature/gr-iio-tdd|GNU Radio branch with AD9081 blocks]]
 +
 +----
 +===== Using the OFDM Radar =====
 +
 +This section will describe how you can use the OFDM radar to get some actual returns, how you can tune the system and choose your parameters.
 +
 +Before going on, please make yourself familiar with the basic operating principles of an OFDM radar, and the meaning of the system parameters: https://github.com/analogdevicesinc/gr-ofdmradar#operating-principle
 +
 +To reinforce your understanding, lets take a look at this example set of parameters.
 +
 +{{:resources:eval:user-guides:ad9081_fmca_ebz:radar:gr_ofdmradar_sysparams.png|}}
 +
 +  * The complex system sample rate is ''f_s = 250 MS/s'',
 +  * the FFT Size ''N = 4096'',
 +  * a frame has ''M = 16'' symbols
 +  * and the cyclic prefix length '' N_CP = 256'',
 +  * and ''N_NG = 64'' nyquist guard carriers
 +
 +thus
 +
 +  * the total TX frame length is ''L = (N+N_CP)*M = 69632 samples'',
 +  * the frame duration is ''T = L / f_s = 279µs'',
 +  * the (non-oversampled), "theoretical" time domain resolution is ''~c/(2*f_s) = 60 cm'',
 +  * the (non-oversampled) doppler resolution is ''f_s / ((N+N_CP)*M) = 3590 Hz'' (Pretty bad when you want to estimate speeds, not distance),
 +  * the true system bandwidth is ''B = (N - 2*N_NG)/N * f_s = 242.2 MHz'',
 +  * the final processing gain ''G = 10 * log10(N * M) ~= 48 dB'',
 +  * and finally the covered distance spread: ''d = N_CP*c / (4*f_s) = ~77 m''. Other distances may be rendered, but the delay spread should stay below this value to keep the ofdm convolution cyclic.
 +
 +This leaves us with a couple flowgraph parameters that should be discussed:
 +
 +{{:resources:eval:user-guides:ad9081_fmca_ebz:radar:gr_ofdmradar_sysparams_annotated.png|}}
 +
 +  * The ''buffer_size'' is used to control how many samples the OFDM radar receiver should accept per frame, instead of the frame size itself - the frame length ''L'' may not always be a nice value. Note due to obvious reasons this value should never be smaller than the actual frame size!
 +  * The ''amplitude'' parameter controls the transmit power by pre-multiplying the TX signal. Note that because of the exhibited processing gain, the required transmit power may be rather small.
 +  * ''t_0'' is used in the TDD engine and allows you to adjust the offset between the start of the transmission and the start of the recording. This value should be calibrated according to your system to allow the determination of true ranges from the resulting returns.
 +  * The ''display_mult'' parameter is used in the receive path to scale the intensity of the return signal for the optimal viewing experience™, but **does not** change the receiver **sensitivity**. This is simply a post-processing / visual operation!
 +
 +Now lets take a look at the OFDM radar screen as you may see it when opening the simulation example in gr-ofdmradar:
 +
 +{{:resources:eval:user-guides:ad9081_fmca_ebz:radar:gr_ofdmradar_screen.png|}}
 +
 +There are still four parameters left to be explained, that control visualization parameters (But don't change anything about the signals themselves):
 +
 +  * The range slider controls range which is shown, and can be thought of as an inverted zoom slider: If you want to zoom in the range dimension, move the slider to the left.
 +  * The doppler range slider works similarly, but reduces the doppler ranges which are shown. This isn't usually too much of an issue.
 +
 +To explain the min and max value sliders, we need to take a look at how the visualization code works:
 +
 +  * The input values to the gui widget have already been fully processed and can be thought of as a complex 2D matrix over range and doppler. To visualize this matrix we first take the energy of each value, then use a mapping function like the following to map those energy values to something between 0 and 1, where ''minV'' and ''maxV'' are controlled by the sliders:
 +
 +<code>
 +def mapv(x):
 +    x = (x-minV)/(maxV-minV)
 +    return max(min(x, 1.0), 0.0)
 +</code>
 +
 +This value is then fed though the turbo color map and shown on screen. For more information see the fragment shader in which all of this is happening: https://github.com/analogdevicesinc/gr-ofdmradar/blob/master/lib/resources/screen.frag
 +
 +To really get an understanding of the max and min sliders you may need to play around with them in a simulation, but at least now you should have an idea of what they're doing.
  
 ---- ----
Line 193: Line 256:
  
   * The Transceiver / RF ADC/DAC (AD9081)   * The Transceiver / RF ADC/DAC (AD9081)
-  * Hardware,  HDL+  * Hardware, HDL
   * Linux drivers   * Linux drivers
   * gr-ofdmradar and its blocks   * gr-ofdmradar and its blocks
Line 408: Line 471:
 gr-ofdmradar is where all the interesting signal processing is happening. gr-ofdmradar ships with two categories of blocks: Those implementing OFDM Radar, and those implementing direction of arrival (DoA) for a linear array. gr-ofdmradar is where all the interesting signal processing is happening. gr-ofdmradar ships with two categories of blocks: Those implementing OFDM Radar, and those implementing direction of arrival (DoA) for a linear array.
  
-== OFDM Radar ==+== OFDM Radar Blocks ==
  
-Many of the system parameters are shared between the TX, RX and Gui blocks, thus these are stored in a separate "OFDM Radar System Parameters" block:+Many of the system parameters are shared between the TX, RX and GUI blocks, thus these are stored in a separate "OFDM Radar System Parameters" block:
  
 {{:resources:eval:user-guides:ad9081_fmca_ebz:radar:gr_ofdmradar_params.png|}} {{:resources:eval:user-guides:ad9081_fmca_ebz:radar:gr_ofdmradar_params.png|}}
  
 +The ''OFDM Radar Transmitter'' block takes just the system parameters and a length tag key, and outputs a full OFDM radar frame. This frame is length-tagged using the provided key to allow interoperability with the AD9081 sink:
 +
 +{{:resources:eval:user-guides:ad9081_fmca_ebz:radar:gr_ofdmradar_tx.png|}}
 +
 +The ''OFDM Radar Receiver'' is very similar in terms of parameters, but takes an additional buffer size:
 +
 +{{:resources:eval:user-guides:ad9081_fmca_ebz:radar:gr_ofdmradar_rx.png|}}
 +
 +<note tip>The `Buffer Size` parameter determines how many samples will be expected / ofdm frame. While the amount of samples which is actually processed is determined by the ofdm system parameters, the block can consume (and discard) additional samples to align frame boundaries to the iio buffers for example. The amount of discarded samples after each received ofdm frame can be determined as ''buffer_size - radar_params.frame_length''.</note>
 +
 +Finally the ''OFDM Radar GUI'' block takes ofdm radar params and a GUI hint:
 + 
 +{{:resources:eval:user-guides:ad9081_fmca_ebz:radar:gr_ofdmradar_gui.png|}}
 +
 +**For more information on the parameters and OFDM radar algorithm, take a look at the [[https://github.com/analogdevicesinc/gr-ofdmradar#operating-principle|gr-ofdmradar/README.md]].**
 +
 +== DoA Blocks ==
 +
 +The Doa blocks are less integrated, but also don't come with many parameters. The implicit assumption is that we're working with a linear array and ''lambda/2'' spacing - the main parameter is pretty much how many targets we are expecting, and how many receiver channels we have.
 +
 +** DoA Autocorrelator **
 +
 +{{:resources:eval:user-guides:ad9081_fmca_ebz:radar:gr_ofdmradar_doa_corr.png|}}
 +
 +** DoA Calibration Block **
 +
 +{{:resources:eval:user-guides:ad9081_fmca_ebz:radar:gr_ofdmradar_doa_cal.png|}}
 +
 +** DoA MUSIC Estimator **
 +
 +{{:resources:eval:user-guides:ad9081_fmca_ebz:radar:gr_ofdmradar_doa_music.png|}}
 +
 +** DoA ESPRIT Estimator **
 +
 +{{:resources:eval:user-guides:ad9081_fmca_ebz:radar:gr_ofdmradar_doa_esprit.png|}}
  
resources/eval/user-guides/ad9081_fmca_ebz/radar.1632220894.txt.gz · Last modified: 21 Sep 2021 12:41 by David Winter