View Single Post
  #43   Report Post  
Posted to uk.d-i-y
John Rumm John Rumm is offline
external usenet poster
 
Posts: 25,191
Default Predicting a graph from 3 (6?) values?

On 14/09/2017 21:28, NY wrote:
"newshound" wrote in message
o.uk...
On 14/09/2017 20:14, T i m wrote:
Now, it's obviously not a straight line (Peukert's law), but can you
extrapolate a graph (or create a formula that would be more useful for
my project) from just 3 points please?


p.s. The nearest *I* could get to an answer would be some graph paper
and a Flexicurve. ;-)


Probably no simple answer because it all depends on the shape of the
curve.

I'm not familiar with that particular "law" (I use the term advisedly)
but exponentials are buggers to deal with (especially when, as in this
case, it is obviously only an approximation: exponentials are fine for
radioactive decay, but it will certainly have limits in this case).

I think my approach would be to try to collect some data for your
specific battery, and try to work with that. Quite possibly with a
flexicurve, or with some sort of polynomial fit if there was more data
available.


I'd say the best approach would be to find a transformation (eg y=log(x)
or y=sqrt(x)) which gives a good, well-correlated straight line. Then
extrapolate that and do an inverse transformation (eg antilog or
x-squared) on the predicted value. Obviously the more data points you
have, the better prediction you can make and the better you can
construct a least-squares regression line for extrapolation and then
back-transformation.


I can see that working where your source data are following some kind of
exponential change being driven by a single (or predominate) physical
variable, but it can get rather complicated where you have multiple non
linearities competing in the same data set that have different
weightings at different times in the process. You may find you just end
up setting yourself a task that is of equal or greater difficulty to the
original question.

If you are starting with an empirically collected data set, then you may
find that after manually fitting a line (flexi curve etc) you can
identify sections that behave differently from others, and then attempt
to model them separately. I remember having to do that once years back
with digitised data from a RF power coupler, that was supposed to have a
linear response. Yet clearly the accuracy of the readings varied quite
noticeably over the range of powers it could sense (10s of Watts, to
10+kW). In the end someone had to sit there for a few hours manually
stepping up in 100W increments and recording the readings. Once plotted
it was clear that while there were some nice straight linear sections,
there was also a pronounced curve in the middle. Taking three points on
the curve and treating as a quadratic was accurate enough to get a good
model of the actual transformation for that bit. One then just needed a
little bit pre-scaling decision making in the software before deciding
what conversion to apply based on what range the raw reading was in.




--
Cheers,

John.

/================================================== ===============\
| Internode Ltd - http://www.internode.co.uk |
|-----------------------------------------------------------------|
| John Rumm - john(at)internode(dot)co(dot)uk |
\================================================= ================/