What does X and Y really represent. This is the toughest question and possibly the most annoying to you. Sorry - I am still a noob in terms of VNA.
These X and Y are real and imaginary parts of S11 value (for CH1 S21). It is represented in
complex form.
For exampel:
1.000334382 -0.012819038
means:
re (real part) = 1.000334382
im (imaginary part) = -0.012819038
So, it means that S11 = 1.000334382 - j0.012819038.
If you want, you can translate it to
polar coordinate system in the following way:
magnitude = sqrt(re * re + im * im);
angle = 180 * atan2(im, re) / pi;
atan2(im, re) calculates angle, but the result represented in radians, so you're needs to convert it to degree by multiplying it with 180 / pi
S11 is very useful value, for exampel you can calculate VSWR value:
rr = re * re + im * im;
if (rr >= 1) then VSWR = infinite;
else VSWR = (1 + sqrt(rr)) / (1 - sqrt(rr));
Regarding the low sample rate of just 101 samples per sweep, I have not tested if the SWEEP command accepts the sample number different than 101 as the third parameter.
you can pass any number in sweep command. NanoVNA just ignore it. It always works with 101 points and there is no way to change it. I think this is memory limit of this microcontroller.
It is not yet clear to me how to software-wise configure the NanoVNA to do S21 measurement so that I just hook the DUT on Port 0 and get a spectrum reading.
Do you mean console commands? Just use data command:
data <channel>
for exampel, this command will get data for CH0:
data 0
and this command will get data for CH1:
data 1
it's pretty easy
![Smiley :)](https://www.eevblog.com/forum/Smileys/default/smiley.gif)
In order to setup frequencies, you can use sweep command:
sweep <start> <stop>
for exampel, this command will setup sweep range from 1 MHz to 150 MHz:
sweep 1000000 150000000
You can download
PUTTY (this is terminal, it allows to connect to Serial port) and play with it. It's pretty easy. You're needs to specify Serial port for connection and com port name. Here is putty session for exampel:
help
Commands: help exit info echo systime threads reset freq offset time dac saveconfig clearconfig data dump frequencies port stat sweep test touchcal touchtest pause resume cal save recall trace marker edelay
ch> info
Kernel: 4.0.0
Compiler: GCC 5.4.1 20160919
Architecture: ARMv6-M
Core Variant: Cortex-M0
Port Info: Preemption through NMI
Platform: STM32F072xB Entry Level Medium Density devices
Board: NanoVNA
Build time: Jul 22 2019 - 16:26:51
ch> sweep 1000000 30000000
ch> sweep
1000000 30000000 101
ch> data 0
1.000334382 -0.012819038
1.000619411 -0.014043334
1.000123381 -0.015157566
1.000514984 -0.016093827
1.000436782 -0.017410092
1.000501394 -0.018344996
1.000151395 -0.019588120
1.000253081 -0.020322881
0.999891698 -0.021273871
0.999914824 -0.022288246
0.999868750 -0.023332940
0.999770462 -0.024202115
0.999884128 -0.025404103
0.999833703 -0.026232335
0.999632596 -0.027013938
0.999499559 -0.028223698
0.999637365 -0.028801376
0.999387919 -0.029435977
0.999631226 -0.029972538
1.002218246 -0.029391391
1.004171252 -0.032068528
1.001608490 -0.034094724
1.000858068 -0.035458635
1.000560522 -0.036200754
1.000125050 -0.037087496
1.000095486 -0.038230843
1.000262737 -0.039139334
0.999750494 -0.039976678
0.999891042 -0.041104275
0.999784827 -0.042336892
0.999971687 -0.043484516
0.999799907 -0.045150741
0.999982059 -0.046216718
0.999493658 -0.047426808
0.999777674 -0.048748057
0.999688148 -0.049898017
0.999597012 -0.051182426
0.999525427 -0.052349578
0.999216139 -0.053816296
0.999178647 -0.054883997
0.999005794 -0.056154955
0.998820781 -0.057684507
0.999015092 -0.058685358
0.998871505 -0.059900578
0.998757004 -0.061241392
0.998712182 -0.062616705
0.998695135 -0.063646942
0.998613953 -0.064931072
0.998556375 -0.066254936
0.998585581 -0.067580714
0.998366594 -0.068778082
0.998310446 -0.070160925
0.998090565 -0.071184404
0.998218178 -0.072452932
0.998082041 -0.073820449
0.997873008 -0.075051650
0.997672736 -0.076362192
0.997864961 -0.077377557
0.997722983 -0.078763738
0.997510135 -0.080164059
0.997572302 -0.081403687
0.997310221 -0.082679249
0.997066974 -0.083944469
0.997346639 -0.085386037
0.997254550 -0.086459428
0.997277498 -0.087772250
0.997081696 -0.088958740
0.997002899 -0.090456649
0.996815264 -0.091620504
0.996773242 -0.092930428
0.996567785 -0.094331786
0.996562242 -0.095199465
0.996507167 -0.097060345
0.996266543 -0.097908206
0.996095418 -0.099269963
0.996342182 -0.100541479
0.995806276 -0.101831674
0.995640277 -0.103128492
0.995647966 -0.104465112
0.995308578 -0.105523049
0.995393931 -0.106829814
0.995034158 -0.108262822
0.995196044 -0.109290048
0.994729876 -0.110772430
0.995051443 -0.112008184
0.994862079 -0.113100029
0.994484126 -0.114403992
0.994411051 -0.116048157
0.994243025 -0.117027558
0.994225263 -0.118228457
0.994016349 -0.119506403
0.993956506 -0.120835222
0.993702173 -0.122295558
0.993651926 -0.123540185
0.993369281 -0.124662227
0.993133306 -0.125806242
0.992927193 -0.127351313
0.992799878 -0.128284811
0.992875814 -0.129809200
0.992461144 -0.130973890
0.992346584 -0.132136657
ch> data 1
0.000022881 -0.000034072
-0.000044930 -0.000003006
0.000001353 -0.000019715
-0.000053841 -0.000043194
-0.000004344 -0.000006963
0.000001772 -0.000007370
-0.000000086 -0.000014207
-0.000005251 0.000030388
0.000011967 -0.000017351
-0.000020198 0.000030180
-0.000004857 -0.000045057
-0.000020909 0.000002008
0.000010476 -0.000008191
0.000004981 -0.000037762
-0.000053258 0.000006323
-0.000023624 0.000023545
-0.000021935 -0.000011593
-0.000025896 -0.000000449
-0.000039536 -0.000018117
0.000018417 0.000040691
-0.000015518 -0.000064735
-0.000022360 -0.000048622
-0.000014705 0.000005838
0.000012554 -0.000030298
-0.000035040 -0.000004715
0.000017032 -0.000023722
-0.000012310 -0.000016603
0.000024222 -0.000042020
-0.000050025 -0.000037519
-0.000024725 -0.000024864
0.000012915 -0.000024808
0.000015194 -0.000008572
0.000012409 -0.000028297
0.000032538 0.000017843
0.000026463 -0.000013021
-0.000001025 -0.000037424
-0.000019795 -0.000044200
-0.000013177 -0.000036966
-0.000016448 -0.000019061
0.000003270 0.000000127
0.000045834 -0.000063594
-0.000008657 -0.000003194
0.000010901 0.000005717
0.000023127 -0.000009332
-0.000012275 0.000016109
0.000015946 -0.000023457
0.000012786 0.000031161
0.000002111 0.000011889
0.000023851 0.000024347
-0.000001895 0.000019804
0.000021308 0.000006177
0.000027474 -0.000015023
-0.000020845 -0.000027184
-0.000019241 -0.000042736
0.000046159 -0.000022540
-0.000023773 -0.000018934
0.000017447 0.000030827
0.000032983 -0.000004683
0.000000493 -0.000022111
-0.000006937 0.000028902
0.000043825 -0.000022563
0.000062209 0.000005554
0.000046276 -0.000050153
-0.000017177 -0.000012213
0.000033449 -0.000046718
-0.000002024 0.000019626
0.000041615 -0.000019849
0.000026992 -0.000000219
0.000014502 -0.000004934
0.000015049 0.000002597
-0.000033414 0.000004811
-0.000033238 -0.000052053
0.000026538 0.000015010
0.000009085 -0.000022117
-0.000025025 -0.000017477
-0.000002855 -0.000049975
-0.000008924 -0.000026126
-0.000000627 -0.000041066
0.000014821 0.000012632
0.000008421 0.000025136
0.000020770 -0.000022932
0.000021408 0.000012013
-0.000002280 -0.000019163
-0.000031954 0.000019613
-0.000012588 0.000018006
0.000011647 0.000022847
0.000030014 0.000008953
-0.000044193 0.000000472
0.000014898 -0.000047376
0.000015692 -0.000035619
-0.000000117 -0.000035395
0.000010286 -0.000003112
-0.000038924 -0.000028851
-0.000023267 -0.000004298
-0.000060468 -0.000020690
-0.000024815 0.000003858
-0.000012520 -0.000020648
-0.000003775 -0.000013356
-0.000001176 -0.000004715
-0.000015004 -0.000030841
-0.000015286 -0.000069948
ch>