JochiSt / OpenFlowMeter

Measuring Flow
GNU General Public License v3.0
6 stars 0 forks source link

Optimisation of the switchable gain amplifier gain #18

Closed JochiSt closed 1 year ago

JochiSt commented 1 year ago

Instead of just testing various configurations, this problem can be optimised in a better way.

gain_optimisation

I did this using `scipy.minimize of a function, which calculates the integral (sum of all) temperature uncertainties. Some penalty terms are included to enhance the lower current sector.

    sT = np.where(a_Istim < 3.0e-3, sT_raw * 10 , sT_raw)
    sT = np.where(a_Istim < 1.2e-3, sT_raw * 50 , sT)    # no self warming

    if np.max(sT_raw) >= 1:
        return np.sum(sT) * 100

    return np.sum(sT)
JochiSt commented 1 year ago

From this study, the best resistor values for the switchable gain amplfiier are:

U channel:

I channel:

Note: only R1 was optimised during this study. R2 has been fixed at 56k.