Python Scipy Module Demo: Using curve_fit's nonlinear least squares to fit Charging Capacitor data

Опубликовано: 08 Октябрь 2024
на канале: Thomas Blum
52
1

In this video we look at a Python program that fits some data for a charging capacitor to the form V(t) = V_sat [ 1 - exp( - t /T ) ]. The T (time constant) fitting parameter makes this a nonlinear regression. The program uses pandas and openpyxl to read the data from an Excel file (on the web). It uses matplotlib to plot the data points (and the fit function). It uses scipy.optimize's curve_fit to handle the non-linear least squares fit.