¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: Filter measurement


 

On Wed, Sep 18, 2019 at 07:35 AM, <erik@...> wrote:


Are you referring to the "open_model" data in the firmware?
I could not find any reference to that model in the firmware so I guess it is
not used.
Erik, I'm not sure if the NanoVNA-H code at
is the firmware you are referring to, but there is a 50 femtofarad capacitor in
the eterm_calc_es() routine in main.c.

I've attempted to hightlight (sort of) the specific line, below:

- Jeff, k6jca

eterm_calc_es(void)
{
int i;
for (i = 0; i < sweep_points; i++) {
// z=1/(jwc*z0) = 1/(2*pi*f*c*z0) Note: normalized with Z0
// s11ao = (z-1)/(z+1) = (1-1/z)/(1+1/z) = (1-jwcz0)/(1+jwcz0)
// prepare 1/s11ao for effeiciency
float c = 50e-15; <<<<<< 50 femtoFarad capacitance
//float c = 1.707e-12;
float z0 = 50;
float z = 6.2832 * frequencies[i] * c * z0;
float sq = 1 + z*z;
float s11aor = (1 - z*z) / sq;
float s11aoi = 2*z / sq;

// S11mo�= S11mo - Ed
// S11ms�= S11ms - Ed
float s11or = cal_data[CAL_OPEN][i][0] - cal_data[ETERM_ED][i][0];
float s11oi = cal_data[CAL_OPEN][i][1] - cal_data[ETERM_ED][i][1];
float s11sr = cal_data[CAL_SHORT][i][0] - cal_data[ETERM_ED][i][0];
float s11si = cal_data[CAL_SHORT][i][1] - cal_data[ETERM_ED][i][1];
// Es = (S11mo'/s11ao + S11ms�)/(S11mo' - S11ms�)
float numr = s11sr + s11or * s11aor - s11oi * s11aoi;
float numi = s11si + s11oi * s11aor + s11or * s11aoi;
float denomr = s11or - s11sr;
float denomi = s11oi - s11si;
sq = denomr*denomr+denomi*denomi;
cal_data[ETERM_ES][i][0] = (numr*denomr + numi*denomi)/sq;
cal_data[ETERM_ES][i][1] = (numi*denomr - numr*denomi)/sq;
}
cal_status &= ~CALSTAT_OPEN;
cal_status |= CALSTAT_ES;
}

Join [email protected] to automatically receive all group messages.