2.2.4. Calibration

Note

The calibration application does not affect the SDRlab 122-16.

To open the Calibration application click on System Tools and then select Calibration.

../../_images/Main_menu_system.jpg ../../_images/Calibration_app_menu.jpg

When the Calibration application opens, you will see four options:

../../_images/Calibration_api.png

2.2.4.1. DC Calibration

With the DC calibration, you can fine-tune Red Pitaya’s ADCs and DACs.

Required materials:

  • two good-quality SMA or BNC cables (with appropriate adapters in case of BNC cables)

  • two SMA T adapters

  • Short termination

  • Accurate Volage reference source (the more accurate the voltage source, the better the calibration)

  • Accurate Multimeter (optional)

2.2.4.1.1. Auto DC calibration

Auto DC calibration will guide you step-by-step through the calibration process and is the option we recommend for beginners.

Step-by-step video guide:

The YouTube video is also available on this link.

2.2.4.1.2. Manual DC calibration

Manual DC calibration will let you do the calibration manually and fine-tune all the variables. Apart from calibration, this option will also allow you to identify any parasitics on your measurement lines.

../../_images/DC_manual.jpg
  • RESET: * DEFAULT - remove the calibration parameters * FACTORY - reset the board to the factory calibration parameters

  • APPLY the calibration - save the DC offset in the system settings

  • CLOSE the calibration

When closing the application without saving the values, the following prompt will appear:

../../_images/Calib_save.png

2.2.4.1.2.1. ADC calibration parameters

../../_images/DC_manual_ADC.jpg
  1. Voltage measurements (Mean, minimum, maximum, and peak-to-peak). Displayed in the graph with the corresponding colour.

  2. Sine wave detection. Detects wheter a sine wave is present on the channel. The “x” indicates how many sine periods were detected.

  3. ADC Offset. Change the offset by the number in the middle. The amount can be selected from the dropdown menu.

  4. ADC Gain. Change the gain by the number in the middle. The amount can be selected from the dropdown menu.

  5. LV/HV. Select the calibration voltage range. Should be the same as the input jumpers.

  6. LAST/AVG. Select either the last or average voltage measurements.

  7. Decimation. Select the decimation from the dropdown menu.

2.2.4.1.2.2. DAC calibration parameters

../../_images/DC_manual_DAC.jpg
  1. ON/OFF. Turn the specified output ON or OFF.

  2. DAC settings. Change the output waveform (type), frequency, amplitude, and offset. Currently, only the waveform (type) can be changed.

  3. DAC Offset. Change the offset by the number in the middle. The amount can be selected from the dropdown menu.

  4. DAC Gain. Change the gain by the number in the middle. The amount can be selected from the dropdown menu.

2.2.4.2. Frequency calibration

Required materials:

  • two good-quality SMA or BNC cables (with appropriate adapters in case of BNC cables)

  • one SMA T adapter

  • External reference function generator capable of generating at least +-10 V (Optional)

2.2.4.2.1. Auto Frequency calibration

Auto Frequency calibration will guide you step-by-step through the calibration process and is the option we recommend for beginners.

Step-by-step guide:

Once the auto frequency calibration is started, you will be presented with the following window:

../../_images/Calib_freq_auto_start.png

The header columns represent the following:

  • MODE - correlates to how the jumpers should be set.

  • Channel - indicates which channel the subsequential column settings apply to.

  • Before and After - values before and after the calibration.

  • AA, BB, PP, and KK - coefficients for the filter inside the FPGA that affects the inputs. For more details, please refer to the “Manual Frequency calibration” section.

  • STATE - displays the progression of the calibration process.

Please pay attention to the STATE column, as clickable buttons which progress the process will appear.

  1. LV calibration:

    ../../_images/Calib_freq_auto_LV.png
    • Clicking on the “START” button will provide further instructions and a choice between an internal and external reference generator:

    ../../_images/Calib_freq_auto_LV_int.png
    • Please select “INTERNAL” if you do not have an external reference generator. Red Pitaya will use OUT1 to generate a 0.9 Volt 1 kHz Square signal.

    • Set the jumpers to the LV position and connect OUT1 to IN1 and IN2 using the SMA cables and the T adapter.

    • Click on Calibrate button to start the calibration process.

    ../../_images/Calib_freq_auto_LV_ext.png
    • Please configure the external reference generator to produce a 1 kHz square signal and input the “reference voltage” (one-way amplitude) of the signal.

    • Set the jumpers to the LV position and connect the output of the external generator to IN1 and IN2 of the Red Pitaya using SMA or BNC cables and the T adapter.

    • Click on Calibrate button to start the calibration process.

  2. LV calibration in progress:

    ../../_images/Calib_freq_auto_LV_load.png

    Please wait until the LV calibration is finished.

  3. HV calibration:

    ../../_images/Calib_freq_auto_HV.png
    • Change the jumpers to the HV position and choose the generator source.

    ../../_images/Calib_freq_auto_HV_int.png ../../_images/Calib_freq_auto_HV_ext.png
    • The external reference generator amplitude should be changed by at least a factor of 10 to a maximum of 20 Volts.

  4. HV calibration in progress:

    ../../_images/Calib_freq_auto_HV_load.png
    • Please wait until the HV calibration is finished.

  5. Save calibration values:

    ../../_images/Calib_freq_auto_save.png
  6. Finish the calibration:

    ../../_images/Calib_freq_auto_complete.png
    • Clicking on the “DONE” button will return you to the starting screen of the Calibration application.

2.2.4.2.2. Manual Frequency calibration

Manual Frequency calibration will let you do the calibration manually and fine-tune all the variables. Apart from calibration, this option will also allow you to identify any parasitics on your measurement lines.

../../_images/Calib_freq_manual.jpg
  • SETTINGS MENU - APPLY the calibration parameters, restore the DEFAULT parameters, or CLOSE the manual frequency calibration.

  • CHANNEL & JUMPER SETTINGS - Choose a channel and voltage range (LV or HV depending on the jumper settings) to calibrate.

  • CALIBRATION PARAMETERS - Choose between DEC and HEX values, click on AUTO to perform an automatic frequency calibration, and input the FPGA filter coefficients.

  • GENERATOR SETTINGS - Turn the internal generator (OUT1) ON and OFF. The frequency, one-way amplitude, and offset cannot be changed.

  • DECIMATION & HYSTERESIS - Change the decimation and hysteresis.

  • EDGE ZOOM - Zoom in on the square waveform edge for better calibration.

  • CURSORS - Can be moved to observe the positive or negative edge, and the white area in-between represents the zoom-in area.

Here is a MATLAB code to simulate the filter inside the FPGA:

clc
close all
clear

aa_hex='7D93'
bb_hex='437C7'
pp_hex='2666'
kk_hex='D9999A'

aa=hex2dec(aa_hex)
bb=hex2dec(bb_hex)
pp=hex2dec(pp_hex)
kk=hex2dec(kk_hex)

% H[z]=K*(z-B) / (z^4*(z-P) * (z-A))
% where:
% K=KK/2^24
% B=1-(BB/2^28)
% P=PP/2^16
% A=1-(AA/2^25)

fs=125e6;
f=0:1e3:fs;

z=exp(j*2*pi*f/fs);

k=kk/(2^24);
b=1-(bb/2^28);
p=pp/2^16;
a=1-(aa/2^25);

h=k*(z-b)./(z.^4.*(z-p).*(z-a));

%figure
%plot(f,20*log10(abs(h)))
figure
semilogx(f,20*log10(abs(h)))
title(strcat('Frequency response for AA=',aa_hex,' BB=',bb_hex,' PP=',pp_hex,' KK=',kk_hex))
xlabel('frequency (Hz)')
ylabel('gain (dB)')