Evaluating a set of readings on the fly - techniques wanted.
stamptrol
Posts: 1,731
Hi folks,
I've got a controller project on the go where I measure the weight of a truck and trailer as it drives onto a weighscale.
As it comes on at low speed, I get about 200 readings as the weight builds up from zero to the full weight of the assembly.
I'm interested in picking out two particular weights: first, I want to grab the weight of the front axle of the vehicle. If you plot the weight build up (y) versus time (x) on a graph, this appears as a definite horizontal segment.
As the vehicle continues on, there is a small blip as the first drive axle gets on the weighscale and shortly after the second drive axle comes on there is another horizontal segment, which I want to grab.
Right now, I'm using a rolling average of 5 readings to predict when the horizontal segment has been reached. That works reasonably well.
Any thoughts on a better way to calculate a trigger point to see these transitions? Sort of like doing a dx/dy to generate a nice sharp spike when there's a sudden, significant change in weight. There is a lot of variability in the x-direction depending on how fast the truck comes on the weighscale.
I've attached a typical roll-on curve.
Tom Sisk
I've got a controller project on the go where I measure the weight of a truck and trailer as it drives onto a weighscale.
As it comes on at low speed, I get about 200 readings as the weight builds up from zero to the full weight of the assembly.
I'm interested in picking out two particular weights: first, I want to grab the weight of the front axle of the vehicle. If you plot the weight build up (y) versus time (x) on a graph, this appears as a definite horizontal segment.
As the vehicle continues on, there is a small blip as the first drive axle gets on the weighscale and shortly after the second drive axle comes on there is another horizontal segment, which I want to grab.
Right now, I'm using a rolling average of 5 readings to predict when the horizontal segment has been reached. That works reasonably well.
Any thoughts on a better way to calculate a trigger point to see these transitions? Sort of like doing a dx/dy to generate a nice sharp spike when there's a sudden, significant change in weight. There is a lot of variability in the x-direction depending on how fast the truck comes on the weighscale.
I've attached a typical roll-on curve.
Tom Sisk
Comments
Also, can you post a CSV with the x,y's of an example reading?
of these peaks and detect when a new one starts up (then the previous peak can be deemed
recognised and its value averaged?) The art will be choosing the right bucket-size for the
histogram and dealing with the case a peak falls on bucket-boundary. That data looks pretty
clean at least!
The challenge is to do it in a Stamp-type processor on the fly where it takes about 100 readings for an average vehicle to get fully on the deck. Time-wise, it means gathering the 100 readings first, then processing them.
Nonetheless, an interesting project.
Cheers,
-Phil
The critical issue is seeing the transition as soon as possible so the ringing subsides before taking the true weight measurement. This has to occur before the next transition.
Thanks again. Cheers.