I am attempting to obtain an equation for battery discharge.
I have data from a battery that will supply 25 amps for 210 minutes. I want to fit this to an equation and then try to adjust the curve to match a battery that will supply 25 amps for 160 minutes.
Here is what I have:
restart; with(Statistics):
## Amps
A := Vector([444, 218, 74,312/10,209/10,119/10,625/100]):
## Time until battery discharges to 10.5 volts
T := Vector([5,15,60,3*60,5*60,10*60,20*60]):
f := x -> a*exp(1-x/b); f(x)
eqset := {seq(T[idx] - f(A[idx]), idx=1..7)}
sol := NonlinearFit(a*exp(1-x/b),A, T, x)
evalf(subs(x=A[6],sol))
P1 := plot(A,T): P2 := plot(sol,x=0..450): plots[display]({P1,P2})
I want the 'knee' of the fitted curve to more closely match the measured data.
How do I do this?