Go Down

Topic: Least Squares Approximation (Read 3222 times) previous topic - next topic

Morris Dovey

I think that the most effective strategy might be to first use the Arduino as a data acquisition front-end for a more capable machine for the least squares analysis to discover the specifics of the relationships, then make use of that relationship in the production Arduino software.

When that strategy can be adopted, the need to maintain a statistically-significant collection of data can be much reduced.

I did a bit of that myself this past weekend to come up with a formula for the amount of power to be applied to the ignition heater of a small LENR reactor. I wanted a formula that my controller code could adjust as it "learned" about the quirks of each particular reactor so which it might be connected. I'll attach some plots so you can see what I'm talking about and, perhaps, find the technique useful in your own project.   :smiley-mr-green:
There's always a better way!

Constantin

Hi and thanks again for your help!

I agree that it is usually possible to find open-loop solutions to speed computations, improve responsiveness, and even performance. Time will tell if I can find a relationship that is temperature-driven and whihc would obviate the need for very accurate least squares approximation with 64 bit integers.

Morris Dovey

It should be effective for closed-loop control as well. I'm applying heat to bring a Ni/H reaction to the ignition point and, since there isn't any historical data to work from (and because significant overheating could be hazardous), I'd like the control program to be able to use the actual dT/dt as the basis for determining how aggressively energy is being pumped into the reactor as it is heated to a target (test) temperature.

I've shown 200?C as my target temperature for the plots, in which the vertical axis is the duty cycle of the heater and the horizontal axis is the current temperature. The degree of "aggression" is controlled by a one byte value that's adjusted dynamically to speed up or slow down the heating process.

I finally got around to plotting the "family" of curves for parameter values of 1, 2, 4, 8. and 16 (convenient doing division by shifting). I'll attach the plot.
There's always a better way!

Go Up