Calculation of DUT with correction:
We know Z_TOT will consist of Z_DUT + Z_ERR
In rectangular coordinates we can express this as
Z_TOT = Zmag_err*cosα_err + Zmag_DUT*cosα_DUT + j* (Zmag_err*sinα_err + Zmag_DUT *sinα_DUT)
Z_TOT = Zmag*cosα + j*Zmag*sinα
=>
Zmag*cosα = Zmag_err*cosα_err + Zmag_DUT*cosα_DUT
Zmag*sinα = Zmag_err*sinα_err + Zmag_DUT *sinα_DUT
=>
------------------------------------------------------------------------
| Zmag_DUT = (Zmag*sinα - Zmag_err*sinα_err) / sinα_DUT |
------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------
| α_DUT = tan-1 ((Zmag*sinα - Zmag_err*sinα_err)/ (Zmag*cosα - Zmag_err*cosα_err)) |
------------------------------------------------------------------------------------------------------
The capacitance and inductance formulae above can now be changed with Zmag_DUT and α_DUT.
I am not a Matlab guy, so did not check this, just tried to make my written calculations in digital format.
Basic principle would be as follows:
- run a calibration with an Rcal reference resistor once. This file will be saved with values for Zmag_err and α_err for each frequency (interpollation will be used for in between frequencies)
- measure a DUT.
* first calucalate Zmag + α
* lookup Zmag_err + α_err from the calibration file for each frequency
* based on the above, calculate Zmag_dut and α_DUT
* caculate capacitance and inductance using these last 2
Am I missing something? Although I am currently not sick, my head also goes to 39°C when doing this stuff, so could be full with mistakes. So to all the math guru's, please check
All of this is off course only true if Z_ERR can be thought of as an impedance in series with Z_DUT...
edit: some spelling mistakes, copy paste error and clarifications