Characterize and Analyze Drift

745 views
Skip to first unread message

VNA Tools

unread,
Oct 13, 2016, 9:10:39 AM10/13/16
to VNA Tools
Hi,

How do I characterize and analyze drift?

Regards
Michael

Michael Wollensack METAS

unread,
Oct 13, 2016, 10:16:45 AM10/13/16
to VNA Tools
Hi,

Characterize Drift:

Analyze Drift:
Let's assume you have measured a trough connection for 24h. And you've error corrected the data. Then you can use the attached script to generate the drift table which is used in the Database / VNA Device / Drift.

How to use this script:
  1. Copy the script to 'C:\Users\Public\Documents\Metas.Vna.Tools\Matlab'
  2. Start MATLAB
  3. Define a variable which specifies the data directory, e.g.: datadir = 'VNA123_Test\VNA123_Drift_01\SOLT_01_out\Drift'
  4. Run t = AnalyzeDrift(datadir)
  5. This script generates a text file which contains the wanted table, see resfile = [datadir '\' 'AnalyzeDriftResult.txt']
  6. Copy the content from the text file and paste in to the Drift table of your VNA device (VNA Tools / Database).
Hope this helps.

Regards
Michael
AnalyzeDrift.m

George Krikelas

unread,
Mar 5, 2018, 8:21:21 AM3/5/18
to VNA Tools
Hello Michael.
Sorry for opening the subject again but I have been struggling with this for days without result. The only thing I have managed so far is to get to the point where I get the following error: 
>> t=AnalyzeDrift(datadir)
24h_drift_0001.sdatb

Metas = 

    Vna: [1x1 struct]

Loading .NET Assembly: C:\Program Files (x86)\METAS\Metas.Vna.Tools\Metas.UncLib.Core.dll
Loading .NET Assembly: C:\Program Files (x86)\METAS\Metas.Vna.Tools\Metas.UncLib.LinProp.dll
Loading .NET Assembly: C:\Program Files (x86)\METAS\Metas.Vna.Tools\Metas.UncLib.Optimization.dll
Loading .NET Assembly: C:\Program Files (x86)\METAS\Metas.Vna.Tools\Metas.Vna.AgilentModel.dll
Loading .NET Assembly: C:\Program Files (x86)\METAS\Metas.Vna.Tools\Metas.Vna.AgilentUncCalc.dll
Loading .NET Assembly: C:\Program Files (x86)\METAS\Metas.Vna.Tools\Metas.Vna.Calibration.Config.dll
Loading .NET Assembly: C:\Program Files (x86)\METAS\Metas.Vna.Tools\Metas.Vna.Calibration.dll
Loading .NET Assembly: C:\Program Files (x86)\METAS\Metas.Vna.Tools\Metas.Vna.Data.dll
Loading .NET Assembly: C:\Program Files (x86)\METAS\Metas.Vna.Tools\Metas.Vna.Data.Explorer.exe
Loading .NET Assembly: C:\Program Files (x86)\METAS\Metas.Vna.Tools\Metas.Vna.Database.dll
Loading .NET Assembly: C:\Program Files (x86)\METAS\Metas.Vna.Tools\Metas.Vna.Journal.dll
Loading .NET Assembly: C:\Program Files (x86)\METAS\Metas.Vna.Tools\Metas.Vna.Misc.dll
Loading .NET Assembly: C:\Program Files (x86)\METAS\Metas.Vna.Tools\Metas.Vna.Optimization.dll
Loading .NET Assembly: C:\Program Files (x86)\METAS\Metas.Vna.Tools\Metas.Vna.Tools.exe
Loading .NET Assembly: C:\Program Files (x86)\METAS\Metas.Vna.Tools\Metas.Instr.VisaExtensions.dll
Loading .NET Assembly: C:\Program Files (x86)\METAS\Metas.Vna.Tools\Metas.Instr.Driver.dll
Reference to non-existent field 'Instr'.

Error in LoadVNATools (line 47)
    d2 = [char(Metas.Instr.Driver.Tools.DriverFolder) '\'];

Error in LoadSParamDataAsStruct (line 5)
LoadVNATools();

Error in AnalyzeDrift (line 17)
    data{i} = LoadSParamDataAsStruct([datadir '\' d(i).name]);

When I try to run "ExampleSParamData.m" (after restarting Matlab and not doing anything else), I get exactly the same error.
I use Matlab R2015b, VNA Tools 1.9, UncLib 1.9.

Do you have any idea what the problem might be?

Regards,
George

Michael Wollensack METAS

unread,
Mar 6, 2018, 4:59:32 AM3/6/18
to VNA Tools
Hi,

it looks like the Matlab wrapper for VNA Tools is not able to load the VNA drivers. In most cases they are not needed. So could please try to comment out the follwoing lines in the LoadVNATools.m file:

    %LoadAssembly([d 'Metas.Instr.VisaExtensions.dll']);
    %LoadAssembly([d 'Metas.Instr.Driver.dll']);
    %d2 = [char(Metas.Instr.Driver.Tools.DriverFolder) '\'];
    % Load all drivers
    %d3 = dir([d2 'Metas.Instr.Driver.*.dll']);
    %for i = 1:length(d3)
    %  LoadAssembly([d2 d3(i).name]);
    %end

George Krikelas

unread,
Mar 6, 2018, 6:20:13 AM3/6/18
to VNA Tools
Thanks for the reply.
I commented out the indicated lines, now I get: 

Reference to non-existent field 'Database'.

Error in LoadVNATools (line 57)
dbl = Metas.Vna.Database.DatabasePath.LookUpTable(Metas.Vna.Tools.Global.DatabaseRootPath);

Error in LoadSParamDataAsStruct (line 5)
LoadVNATools();

Error in ExampleSParamData (line 4)
d = LoadSParamDataAsStruct([pwd '\' 'Example_01.sdatb']);

Michael Wollensack METAS

unread,
Mar 6, 2018, 6:34:34 AM3/6/18
to VNA Tools
Ok,

try to uncomment again the frist two lines:


    LoadAssembly([d 'Metas.Instr.VisaExtensions.dll']);
    LoadAssembly([d 'Metas.Instr.Driver.dll']);
    %d2 = [char(Metas.Instr.Driver.Tools.DriverFolder) '\'];
    % Load all drivers
    %d3 = dir([d2 'Metas.Instr.Driver.*.dll']);
    %for i = 1:length(d3)
    %  LoadAssembly([d2 d3(i).name]);
    %end


Regards
Michael

George Krikelas

unread,
Mar 6, 2018, 7:10:32 AM3/6/18
to VNA Tools
Well, I get the same error again. I think the problem lies elsewhere. But I don't want to use up any more of your time, since this is not something you can answer easily. 

Thanks again,
George

Mr Skinner

unread,
Nov 29, 2023, 4:23:01 PM11/29/23
to VNA Tools
Hi, I am also experiencing these same Matlab errors, and am wondering if a solution has been found.
Cheers
James

Michael Wollensack METAS

unread,
Nov 30, 2023, 3:42:16 AM11/30/23
to VNA Tools
Make sure that your run LoadVNATools.m before creating the first uncertainty number with e.g.: LinProp.
Otherwise you've to restart MATLAB.

Luca Oberto

unread,
Apr 18, 2024, 12:38:37 PM4/18/24
to VNA Tools
Hi,
is there a version of the AnalyzeDrift script that can be run within the scripting environment of VNATools (or in python outside VNATools) for who does not have a matlab licence?

Thanks,
Luca

Gilberto Basso

unread,
Sep 26, 2025, 6:47:47 AMSep 26
to VNA Tools
Hi, Years ago I wrote a long script that handled drift analysis according to the AnalizerDrift.m code and also according to the EURAMET code. I'm happy to share this script and hope it helps!
Please find Annex any notes for drift acquisition and the script. I checked various measurements with MathLab and everything seemed fine, but if someone on the forum or Wollensack himself could check it out, that would be great. See if it helps.
and sorry for my bad English
Gilberto Basso

RF_Analyzer_Drift.py
Acquisizione_e_calcolo_Drift.pdf
Reply all
Reply to author
Forward
0 new messages