Utmax apparent inconsistency in source code to calculate Va

72 views
Skip to first unread message

Never Mind

unread,
Sep 6, 2024, 9:03:03 AM9/6/24
to uTracer
I have been investigating calibration errors on the uTracer6.
These calibration errors show most strongly at high currents and low voltages.
This is due to circuit losses that must be carefully taken into account to calculate the correct values for Va and Vs actually across the device under test during the test pulse.

I have found that both Ronald's GUI and utracerJS do not correctly take into account all circuit losses in the calculation of Va and Vs during test with a uTracer6.

The result is that when a utracer6 is used to test impedances below about 100 ohms at test voltages below 100V measurement errors become far larger than necessary.
Currently a uTracer6 returns errors exceeding 10% to 30% at high currents and voltage below 100V.

My research shows these errors are mainly driven by the failure of current GUIs to fully and correctly calculate the value for Va and VS at high currents and low voltages.
There are caused not primarily by hardware limitations in the uTracer6.
Unfortunately both Ronald's and uTracerJS are closed source programs and so I can not confirm the exact errors or if correct math is being used.

However uTmax is open source.
Looking at the code published online there seems to be a many errors in the calculation of Va Vs for a uTracer6

1)
The source code seems to have commented out the math to calculate the correct value of Va
The correct math is still present for the calculation of Vs.

See below.
//    adc_real.Va = (float) adc_data.Va*5.0/1023.0 * adc_scale.Va * calData.VaVal -adc_real.Vsu + Vdi - Vdar + adc_real.Ia*Iares/1000.0;
    adc_real.Va = VaNow;
    adc_real.Vs = (float) adc_data.Vs*5.0/1023.0 * adc_scale.Vs * calData.VsVal -adc_real.Vsu + Vdi - Vdar + adc_real.Is*Isres/1000.0;

Note that the math for adc_real.Va has been replaced simply by the value for VaNow

It is hard to see the above as correct. I wonder what is in compiled code being downloaded.

2) Part of the correction factors for Va and Vs is
#define Vdar 0.75  //drop across darlington

There is no darlintion used in a uTracer6. 
The switch used in a Utracer6 is a MOSFET with a nominal 6.1 ohm on resistance.

3) D11 is included as a voltage gain by Vdi .
This works well on a utracer3+ as the cathode voltage is fairly stable during the pulse on a uTracer3.

Not so on a uTracer6.
D11 (D40 on a Utracer6) is bypassed by a 1000uF C44 capacitor.
This capacitor is charged during the test pulse by the test current.
The voltage rise on C44 due to capacitor ESR (Cesr) and charging (Vcloss) is about 1.3 volts at a 1 amp test current.
On a utracer6 the storage capacitors droop by about 22V at a 1 amp test current.
C60, 61 and C44 form a capacitive voltage divider that lowers the test pulse voltage across the tube during test by raising the cathode voltage.

This is calculated by...
Initial Va before test pulse - Remaining Va after test pulse = V droop, the droop voltage in the storage capacitors during the test pulse.
((C60 * C61)/C60 + C61 ) / C44 * Vdroop = loss due to C44 charging during test pulse current and raising the cathode voltage.
Or simplified to (50/1000) * Vdroop  = Vcloss
So Va correction due to the cathode voltage during the pulse I believe becomes 
 Vsupp +(Vdi- (Vcloss+(Cesr * adc_real.Ia))  )

4) R73's resistance does not seem to be taken into account.
R73 = 0.56 ohm

5) The resistance of the fuse does not seem to be taken into account.
Fuse = 0.335 ohm

6)  The ESR of C60 and C61 in series does not seem to be taken into account.
This represents about 6 ohms of loss.

7) Wiring loss are not taken into account
external wiring losses = 0.2 (estimated)

8) Va and Vs ADC offset errors at low voltages.
These can be seen by going to the debug page and pinging.
The voltages for Va and Vs on a uTracer returned for are -2 to -3 volts showing that simply subtracting Vsupp from the VA adc voltage is not sufficient at low voltages due to a ADC voltage offset errors in VA and Vs ADC hardware of about 2.5V.

To confirm the above in testing
I found testing using uTracerJS - Utracer6 with precision resistors of 50 ohms and below errors of between 13% and 30% with Va and Vs below 100V at high currents.
When I take the resulting data and add a fixed voltage correction of factor of 2.5V for the ADC offset and about -7 ohms for the un-captured losses the errors at low resistances errors drop to between 1% to 10% in level in the measured data.
This is a meaningful improvement important in measuring sweep tubes or rectifier tubes.

To summarize.
I think it is a great pity that the uTracer6 accuracy is limited a low voltages and high currents mainly due to software.  Errors are not are primary a hardware issue in my testing but GUI software limitations.

Is there anyone supporting the uTmax that would be willing to work to improve uTracer6 support?

Finally I would like to hear a response of the issue #1 of the commented out calculations in Va and if this is in fact a error in production downloads.
This issue will affect all uTracer users of uTMax.

Bob



Ihor

unread,
Sep 6, 2024, 9:30:08 AM9/6/24
to uTracer
Just a quick comment:

the calculation of all the parameters was posted by Ronald already long time ago on his website and many people copied it to their repositories, for example:
so one can easily explore how things work but there is no compensation that was described above and nothing of that is taken into account (not even darlington). 

uTracerJS uses exactly the same formulae just to be 1-to-1 replacement in terms of the calibration values, so those can be just placed in uTracerJS and used without extra thinking.

uTmax uses it is own calibration values (not compatible with other two software) and formulae (for example "5/1023" while Ronald uses "5/1024" for ADC conversion, which does not matter because the calibration values there correct those as well).

But in the end, if there are some other correct formulas to convert the HEX value from the uTracer's ADC into desired voltage, it is a matter of 10 minutes to implement it and add an option for the user to chose which one to use :) It can be even the whole lookup table for all possible voltages and current that have to be processed differently. The problem is that no one had before such need or experience I believe. Even better, one can think of a totally independent calibration procedure for that new formula, to figure out all the new calibration parameters, we just need the formula :) 

 

Never Mind

unread,
Sep 6, 2024, 10:35:51 AM9/6/24
to uTracer
Ihor

Nice of you to reply.

It seems that no one including Ronald has gotten calibration 100% right for Va and Vs on a uTracer6.
UtMax seems the closest for a uTracer3+ apart from a apparent huge bug in the open source code for Va.
uTmax is however wrong for a utracer6 as was Ronald's code and everyone that followed Ronald's code.

Needed are two added parameters for the uTracer6, 
1) Vadc offset correction (current independent voltage correction)
and 
2) Rloss (current dependent voltage correction)  
These  two parameters should be exposed in the calibration file with approx default values for those that do not care as they will vary a bit from unit to unit.
This will allow loss correction on any board and would allow a better MOSFETs to be used without having to resort to adding extra resistors to "make it look like the old MOSFET"

If you are willing to work with me I can work up the correction maths that should allow for meaningful improvements in accuracy of a utracer6 and to a lessor degree the uTracer3+.
It does not need to be overly complex math and can be condensed into a few more parameters.
They would be different for uTracer3+ and uTracer6. As I have both systems I can test both out.

Right now I am looking at repairing my utracer6 as the anode MOSFET switch and driver transistors FAILED while testing a sweep tube up to 1 amp current.
Looking the the design and the data sheets I feel that Ronald's circuit violates a few data sheet limits and in my opinion a few basic design rules required for high voltage, high speed switching.
In a uTracer6 there is little to nothing controlling Dv/Dt in the MOSFET switch and drivers over component tolerance and with a 1000V, 1 amp swing  Dv/Dt is best to be under tighter control.
From my 20 years experience in designing high voltage, high power, high frequency switching systems I am not not at all surprised it failed as currently designed.

There is also very little to control ground bounce in this system and this is a two layer board! 
I consider that Ronald has done very well to get it to work as well at it does with so few precautions on a two layer board.

So I will take some time to see how to make Ronald's design more robust as I really do not want a system prone to failure at high current.

Then I will work up correction factors for a utracer3 and 6 and we can discuss.
I will test out the correction factors in excel as a post process to make sure what I propose in correction works to generate accurate results for Va and Vs.

Take care
Bob

Never Mind

unread,
Sep 6, 2024, 10:52:42 AM9/6/24
to uTracer
Ihor

From Ronalds code you linked to I found only this for correction on a utracer3+ for Va and Vs.
Where is the correction for switch, diode and current limiter losses? 
Perhaps I misunderstand the code and am missing something. Bit hard to believe this is what is being used.

"
If frmCom.chkcorrection.Value = 1 
Then 
dblMeasMX(I, intVa) = dblVa - (dblMeasMX(I, intIa) / 1000#) * dblAnodeRs 
dblMeasMX(I, intVs) = dblVs - (dblMeasMX(I, intIs) / 1000#) * dblScreenRs

Ihor

unread,
Sep 6, 2024, 1:14:03 PM9/6/24
to uTracer
If frmCom.chkcorrection.Value = 1 
Then 
dblMeasMX(I, intVa) = dblVa - (dblMeasMX(I, intIa) / 1000#) * dblAnodeRs 
dblMeasMX(I, intVs) = dblVs - (dblMeasMX(I, intIs) / 1000#) * dblScreenRs
"

Indeed these are the formulae, but they also miss the actual Va values which are computed before that piece as:
dblVa = CDbl(lngWord) * (5# / 1024#) * ((dblAnodeDivR1 + dblAnodeDivR2) / (dblAnodeDivR1 * dblCalVar1)) - dblVsupSystem

In any case, as I mentioned, there is no explicit compensation for any other losses. Even the calibration values are not compensating for the loses but just correct the Rsense values, which one puts in the software as 18 or 4.7Ohm, but of course in the circuit they are just some random values around those nominal values, so the cabiration constant compensate basically that (and probably a bit more if it can be accommodated with such scaling).   
 
"1) Vadc offset correction (current independent voltage correction)
and 
2) Rloss (current dependent voltage correction)  "
It is easy to add those in the user interface so we can try. If it is a matter of 2 parameters, then probably just using one of the curves that you already acquired with 100 Ohm load can be enough to map the desired measurements to the actual one. So using the data-driven approach one does not even have to think which kind of losses are there, we can just map what we measure to what we want, it is a matter of measuring according to some "calibration" procedure, and it is either enough to have one resistive load (or for sure with a couple of them) so one can find the correspondence and represent it with two parameters which might be just phenomenological and not necessary physical.

Josh

unread,
Sep 6, 2024, 8:22:15 PM9/6/24
to uTracer
You're looking at outdated code in the source code you downloaded. The available utMax is newer than the published source code.

Never Mind

unread,
Sep 7, 2024, 6:19:50 AM9/7/24
to uTracer
Josh

Ok, useful to know.
Where can one access the current open source version?
The best part of open source code is a long standing shortcoming like utracer6 calibration issues can be improved by the community providing oversight and input.

Bob J.

Big Josh

unread,
Sep 7, 2024, 4:09:52 PM9/7/24
to utr...@googlegroups.com
Nick will eventually update the open source package on his website. He recently moved, and he's delayed on that kind of stuff.

Have you tried whatever issue you're having with the latest utMax version that's posted on his site? I think it's 3.07a. 

--
You received this message because you are subscribed to the Google Groups "uTracer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to utracer+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/utracer/539768a0-5305-427e-bdb2-1fca1afbce94n%40googlegroups.com.

Never Mind

unread,
Sep 7, 2024, 6:42:25 PM9/7/24
to uTracer
Josh

I too have moved in the last 18 months. You never find everything again.
Thanks for letting me know the source will be updated at some point.
I will have a look when it is available.

Take care
Bob
Reply all
Reply to author
Forward
0 new messages