Scott 2021/05/08 15:55
Below you will find a script I have used in the past. I make no
representation that this code is free of bugs, I used it solely to
compare rfid tags attached to various materials.
Save the data in your VNA software as an sNp file and import via the
sparameters command (first paragraph)
The data can be graphed directly via YourHandle.rfplot (second paragraph)
You can use matlab commands to find the resonant frequency (third paragraph)
There's more magic you can work, but I don't have that stuff to hand.
FreeAir=sparameters('RFID-atop-FreeAir.s2p');
ClearPlastic=sparameters('RFID-atop-Plastic.s2p');
Fibreglass=sparameters('RFID-atop-Fibreglass.s2p');
f0=915e6;
freq = linspace( f0-(150e6), f0+(150e6), 1001 );
figure(2)
Fibreglass.rfplot
title( 'RFID tag centred in Fibreglass' );
print -djpeg RFID-cut-Fibreglass.jpg
figure(3)
FreeAir.rfplot
title( 'RFID tag in FreeAir' );
print -djpeg RFID-atop-FreeAir.jpg
figure(4)
ClearPlastic.rfplot
title( 'RFID tag centred on Clear Plastic' );
print -djpeg RFID-atop-ClearPlastic.jpg
s11_ClearPlastic = rfparam(ClearPlastic,1,1);s11_mag =
abs(s11_ClearPlastic);s11_db = 20*log10(s11_mag);ffreqs =
ClearPlastic.Frequencies; [dBReached_Clear,I]=min(s11_db);
ResonantFreq_Clear=ffreqs(I);
s11_FreeAir = rfparam(FreeAir,1,1);s11_mag = abs(s11_FreeAir);s11_db =
20*log10(s11_mag);ffreqs = FreeAir.Frequencies;
[dBReached_Free,I]=min(s11_db); ResonantFreq_Free=ffreqs(I);
s11_Fibreglass = rfparam(Fibreglass,1,1);s11_mag =
abs(s11_Fibreglass);s11_db = 20*log10(s11_mag);ffreqs =
Fibreglass.Frequencies; [dBReached_Fibre,I]=min(s11_db);
ResonantFreq_Fibre=ffreqs(I);
fprintf("RFID tag in free air resonance at %d with %d
dB;\n",ResonantFreq_Free,dBReached_Free);
fprintf("RFID tag atop clear plastic resonance at %d with %d
dB;\n",ResonantFreq_Clear,dBReached_Clear);
fprintf("RFID tag in fibreglass resonance at %d with %d
dB;\n",ResonantFreq_Fibre,dBReached_Fibre);
On Sat, 8 May 2021 at 00:43, Glenn Elmore <n6gn@sonic.net> wrote:
>
> This perhaps doesn't directly answer your question but there is a path to Octave (Open Source Matlab) by way of QUCS. Files saved as Sx1 format can be directly brought into QUCS for analysis and modeling. In turn, QUCS has hooks to Octave.
>
> Presumably you want to go directly into Matlab for which I don't have a direct solution.
>