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:circuits-from-the-lab:cn0566:calibration [08 Apr 2022 00:16] – [Calibrating Element Gain and Phase] list formatting Mark Thorenresources:eval:user-guides:circuits-from-the-lab:cn0566:calibration [18 Jun 2022 23:33] (current) – Title change Jon Kraft
Line 1: Line 1:
-====== CN0566 Calibration ====== +====== Lab 1: Basics of SDR and Beamforming Control ====== 
-Now that the CN0566 hardware and software is set up according to [[resources:eval:user-guides:circuits-from-the-lab:cn0566|EVAL-CN0566-RPIZ Overview]], a few basic calibration steps need to be taken.+The purpose of this lab is to get acquainted with how the software controls and captures data from the Phaser hardware. You COULD skip forward to the calibration section in this lab, which is prerequisite for the subsequent labs, but eventually you may want to write your own custom software, or at least modify the provided example scripts. Rest assured, very little software knowledge is required to understand this lab; it is intended to be the Phaser equivalent of "Hello, World!" 
 +\\ 
 +Make sure that the Phaser hardware and software is set up according to [[resources:eval:user-guides:circuits-from-the-lab:cn0566:overview_setup|Phaser Overview and Setup]].
 ===== Finding the Source Frequency ===== ===== Finding the Source Frequency =====
 There are two distinct ways to use the Phaser setup: There are two distinct ways to use the Phaser setup:
Line 17: Line 19:
 Figure 2. Saving Frequency Calibration File Figure 2. Saving Frequency Calibration File
 </WRAP> </WRAP>
 +
 +===== Running the Minimal Example =====
 +Aim the HB100 at the Phaser.
 +\\
 +Open the cn0566_minimal_example.py script, either in Thonny, or run from the command line.
 +\\
 +Observe the output, which should look similar to the figure below:
 +{{ :resources:eval:user-guides:circuits-from-the-lab:cn0566:calibration:minimal_example_output.png?direct&400 |}}
 +Here’s what we’ve done:
 +  * Received the 10.525 GHz signal
 +  * Downconverted it to 2.2 GHz
 +  * Received the 2.2 GHz IF with the Pluto SDR
 +  * Set the Pluto’s internal PLLs to 2.2 GHz minus a small offset
 +  * Set the Pluto’s ADC sample rate to 30 Msps
 +  * Loaded a 20 MHz wide digital filter into the Pluto
 +  * Capture a buffer of 1024 samples
 +  * Plot the time domain samples
 +  * Take the FFT of the samples, then plot.
 +\\
 +So what does that Python script do??   The python script, “cn0566_minimal_example.py” first takes care of some housekeeping operations - set the antenna to zero phase, equal gain on all elements, and set a few parameters in the Pluto SDR.  Then we are simply plotting the buffers of data from Pluto. 
 +\\
 +Next, change the "offset" variable (line 176) to something between -10e6 and +10e6 (your choice!). Re-run the script and verify that the tone moves along the horizontal axis accordingly.
 +\\
 ===== Calibrating Element Gain and Phase ===== ===== Calibrating Element Gain and Phase =====
  
-The phaser board is initially uncalibrated; each element will have a slightly different gain and slight phase error due to numerous factors. the cn0566_examples.py script provides a calibration utility that will generate calibration files. Place an HB100 (or antenna connected to J1) facing straight at the antenna array from approximately 1.5m away. Then run:+The phaser board is initially uncalibrated; each element will have a slightly different gain and slight phase error due to numerous factors. This was fine for finding the HB100 frequency and the minimal example, but the performance of the subsequent labs requires that each element have a predictably controllable gain and phase, with respect to other elements in the array. Since there will always be both gain and phase mismatch due to manufacturing tolerances, we'll compensate for this in software.\\ 
 +\\ 
 +For the gain calibration, we'll illuminate the array with the HB100 held far away, and at mechanical boresight (zero degrees). One element at a time will be set to its maximum gain, which is done by setting the ADAR1000 gain for the associated channel. All other elements are set to zero. The resulting signal level for each element is measured, and the element with the minimum gain is chosen as a reference. A factor is then calculated for the other elements, which are used to equalize their gains to that of the lowest gain element.\\ 
 +\\ 
 +For the phase calibration, two adjacent elements are set to the maximum calibrated gain. The phase of one of the elements is then swept from 0 to 360 degrees. The phase that produces the minimum null is 180 degrees away from the phase that will match the two elements (nulls are much sharper than peaks, and can be measured more accurately.) Each adjacent pair is measured, and an array of phase compensation values is generated.\\ 
 +\\ 
 +The cn0566_examples.py script provides a calibration utility that will generate calibration files. Place an HB100 (or antenna connected to J1) facing straight at the antenna array from approximately 1.5m away. Then run:
 <code> <code>
 python3 cn0566_examples.py cal python3 cn0566_examples.py cal
resources/eval/user-guides/circuits-from-the-lab/cn0566/calibration.txt · Last modified: 18 Jun 2022 23:33 by Jon Kraft