View Single Post
  #10   Report Post  
Posted to rec.crafts.metalworking
RogerN RogerN is offline
external usenet poster
 
Posts: 1,475
Default Weighing Control Algorithm

On my weighing control, it learns by calculating it's previous error and
using a percentage of correction in the next calculation.

So now I use InFly = (Final Weight) - (weight when dosing is stopped)

FlowMultiplier = InFly/Flow (for 50% correction I actually use
FlowMultiplier = (FlowMultiplier * 0.5) + (InFly/Flow * 0.5) )

Estimated Infly = Flow * FlowMultiplier

I noticed the actual results don't work so well with different flow rates,
the flow multiplier changes with different flow rates.

So, since flow is a rate, and there is a little infly at 0.5 lbs/sec but
much more at 1 lb/sec. I thought maybe this would better be calculated like
you calculate braking distance in a car. You travel a lot further braking
from 60-30 then you do from 30-0.

So messing around with the formula and using a learned multiplier instead of
coefficient of friction and gravity, I came up with

Estimated InFly = (Flow**2)/(2 * Constant)

and Constant = ((Flow**2) / (InFly)) /2

I went to test this out, just watching the calculations to see if the new or
old formula best predicted the actual infly weight from flow rate. They
didn't run the line I was testing on very much so I didn't get a good test.
I'm wanting to see if the "constant" stays close to the same value at
different flow rates. If so, I hope to keep it in tolerance at slower and
faster flow rates.

I also added in where it will record the last 20 final weights, I can then
try to do machine capability calculations (CM and CMK) on my data. And this
will be used to adjust dosing control algorithm to try to achieve better
results.

Next I'd like to try to ramp the speed down, as flow approaches zero, infly
should approach zero, all as error approaches zero.

RogerN