Slowing a motor relative to weight increase speed

thewalkerist

Member
Join Date
May 2021
Location
Izmir
Posts
178
Hello everyone,

I have a question in my mind. I am working on bag-filling process. Now i have a motor that brings goods and a loadcell. My loadcell is checking the weight of my bag and my motor keeps bringing goods. Now after a certain point(preferably at the near end of filling when its like 95-98%) i want my motor to slow down. And i worked around that with a simple way(posted the pics)

My required_weight_sp(my desired weight value) - Actual product weight gives me the required weight for a slow fill. Lets say my SP is 2500 and my actual weight is 1000. That means my slow fill required weight is 1500. Then i constantly check that 1500 until it becomes lower than my Slow_fill_limit which is 500(which is a still value btw). So when my weight becomes 2000 my slow fill required weight becomes 500, after my actual weight becomes 2001 it will start pouring it slower(In my pic it doesnt show but when step6 becomes activated i drop the motor speed to %30).

Now this is working just fine. But lets say my motor is carrying a low amount of material and my loadcell is counting up slowly(even though the motor is in full speed). I dont want it slow down because its already filling the bag slowly so my Slow_fill_Limit needs to be lower for that particular instance.

Cant we Slow down the motor relative to the speed of weight increase? So if my motor is giving me 100grams/second instead of 200grams/second slow_fill_limit should be 250grams instead of the usual 500 grams. Can you please help me?

Screenshot (752).png
 
in my simple mind, I would attempt to take the load cell (analog input?) as a value, then use that value and scale it between empty and full, or whichever two points indicate a full value and an empty or low value for your purpose.

then just set the motor speed based on progressively increasing values of the scale weight with greater-than statements to slow the motor down, decreasing the fill speed until you get to the slowest one at the heaviest point.

as for not wanting to go below a certain point. you probably just want to set the min frequency (assuming it's on a vfd?) after you get to a certain point, and then add in some kind of override if needed so it can go slower in some cases.
 
Last edited:
I think you are describing the differential equation:
d(measured_weight)/dt = K (weight_sp - measured_weight)
where K is a constant and t is time.

The solution is
measured_weight = weight_sp - exp(-Kt) (weight_sp - weight_t0)
Where exp is the exponential function (cf. here and here), and weight_t0 is the weight at time t=0.

One possible problem is that if weight_t0 is not equal to weight_sp, then the term in blue above never reaches 0, so the measured weight never reaches the target weight setpoint (weight_sp).

Search the forum for the phrase "in flight" or in-flight or inflight.

Which reminds me of an old joke: a mathematician and an engineer are put in a room, with their wife in one corner and themselves in the opposite corner, and told they can only move half of the remaining distance to their wife with each step; the mathematician sits down and starts weeping; the engineer starts stepping.
 
I think you are describing the differential equation:
d(measured_weight)/dt = K (weight_sp - measured_weight)
where K is a constant and t is time.

The solution is
measured_weight = weight_sp - exp(-Kt) (weight_sp - weight_t0)
Where exp is the exponential function (cf. here and here), and weight_t0 is the weight at time t=0.

,.

hmm. Welp i didnt quite get that. :D Actually, i did. But i have no idea how to do that in tia portal :D
 
For delivered weight less than 90% of desired weight, set the conveyor speed at maximum. For the last 10% of the delivery decrease the conveyor speed in proportion to the remaining weight to be delivered. You will probably need to apply a minimum speed to this calculation.
If you decide you really need to take the fill rate into consideration, use it to adjust the percentage at which you start to decrease the conveyor speed.
 
For delivered weight less than 90% of desired weight, set the conveyor speed at maximum. For the last 10% of the delivery decrease the conveyor speed in proportion to the remaining weight to be delivered. You will probably need to apply a minimum speed to this calculation.
If you decide you really need to take the fill rate into consideration, use it to adjust the percentage at which you start to decrease the conveyor speed.

First proposition is already really close to my current build.

I want to take the fill rate to consideration but i dont know how. How can i calculate the fill rate?
 
yeah but lets say after a few seconds weight increases faster/slower? what will we do then?


1) Take another sample and recalculate the rate based on the previous sample and time.
2) Why would the rate change, beyond measurement noise, if the motor speed is constant?

I get the impression your question is not being answered; that could be because we do not understand the question.

What is the ultimate goal you are trying to achieve? Is it filling the bag as quickly as possible, while ensuring the final fill weight is within a tolerance of e.g. ±10g? Or is the question about dealing with a feed system where the fill rate changes even though the motor speed is constant, because of factors outside your control?

What is the timeframe for the fill? How long does it take to get to 95% of target weight at 100% motor speed? What sort of measurement noise (accuracy and repeatability of weigh scale) do you see in the system?

From the OP:
...lets say my motor is carrying a low amount of material and my loadcell is counting up slowly(even though the motor is in full speed). I dont want it slow down because its already filling the bag slowly so my Slow_fill_Limit needs to be lower for that particular instance.

Cant we Slow down the motor relative to the speed of weight increase? So if my motor is giving me 100grams/second instead of 200grams/second slow_fill_limit should be 250grams instead of the usual 500 grams. Can you please help me?

I think what you are talking about could be solved with a cascade control.

Stage 1: you have a profile of remaining fill weight, kg, vs. desired fill rate, g/s.

Stage 2: you want either

  • if possible, for the motor to deliver that fill rate determined by Stage 1,
OR, if that is not possible with the current state of the feed system,
  • run at 100%
So

  • Stage 1 generates a target fill rate based on filling profile,
    • and cascades a setpoint (SP) of that target fill rate to Stage 2,
  • Stage 2 adjusts the motor speed control value (CV) until either
    • the present value (PV) of the most recently measured fill rate matches the target fill rate from Stage 1,
    • OR
    • the motor is running at one of its limits, 100% or 0%
Is that what you are looking for?

drbitboy, DMD
 
Last edited:
Another approach would be to characterize the in-flight vs. fill rate, which might look like this:
xxx.png



And from which you would develop a model that could be coded into the PLC e.g. a piecewise linear model might be good enough. It might be worth doing this at several motor speeds.

Then, at regular intervals e.g. in a 1000ms interrupt task:

  • measure the weight
  • calculate the fill rate = (current weight - previous weight) / interval
  • use the model to predict the in-flight weight from the model using the calculated fill rate and motor speed
  • When (measured weight + modeled in-flight weight) >= (final fill target weight + noise estimate), stop the motor.
If the model noise and measurement noise are low enough, then this might allow you to run the motor at 100% until the end.

The noise estimate depends on the specifications for filling the bag. E.g.

  • if the fill specification is the target weight ±100g, then the noise estimate to use might be 0
  • if the fill specification is that the target weight is a minimum acceptable value, then the noise estimate might be 3σ, where σ is the combined standard deviation of the in-flight model noise and measurement noise, to ensure 99.85%+ of the fills will meet the spec on the first try, and for the other one-in-six-hundred that are low you can turn the motor on briefly to ensure it makes weight.
 
I do weighing applications similar to your bag-filling.
Weighing tasks are very application specific.
Some material flows freely and loosely almost like water, such as dry sand and homogenous and dry fine powders.
Other materials only begin to slide or fall when a certain amount of material has moved forward over an edge to break the friction of the material itself. Think wet sand or clays.
In the first case you might get away with a dynamic adaptation to the flow of material.
In the latter case, the only viable solution is to keep everything constant, and react on the resultant weighing error on the next weighing sequence.

edit: Reading your 1st post, it seems to me that you describe that the material flow can change even of the conditions are the same.
But lets say my motor is carrying a low amount of material and my loadcell is counting up slowly
That should be avoided if possible.
Usually you have a hopper or silo in front of the feeding conveyor. The hopper or silo should be kept topped up so that the feeding conveyor drags a constant (or as constant as possible) flow of material from the silo/hopper.
If you do not have such an intermediary silo or hopper, then I think the correct solution is not to make an adaptable program but instead add this silo or hopper.
If you do have such a hopper, but the material flow still varies, then there is something else wrong.
 
Last edited:
If you do not have such an intermediary silo or hopper, then I think the correct solution is not to make an adaptable program but instead add this silo or hopper.
If you do have such a hopper, but the material flow still varies, then there is something else wrong.


Ignore what I said; +1 for Jesper.

I.e. fix the process.
 
What is the ultimate goal you are trying to achieve?

My ultimate goal is to have a pinpoint accurate system that will adapt to the factors outside of my motor speed.

Or is the question about dealing with a feed system where the fill rate changes even though the motor speed is constant, because of factors outside your control?
Yes, this is my problem.

What is the timeframe for the fill? How long does it take to get to 95% of target weight at 100% motor speed?
it will probably take around 20-30 seconds to completely fill one bag that is 10kgs.

What sort of measurement noise (accuracy and repeatability of weigh scale) do you see in the system?
well, not accurate as to say%100. Maybe around 80-85% accuracy is achieved with my current system.

Is that what you are looking for? cascade control
yes that would achieve my goal. If i understand you correctly, Stage 1 would act as a profile that consists of fill rate. Lets say it is 200g/s. So everytime a new cycle begins my stage to tries to achieve that goal. If it cant achieve it would run at full speed. And maybe i can throw a warning down there or smthng saying that "there are very low amount of products coming in, increase it please"
 
Reading your 1st post, it seems to me that you describe that the material flow can change even of the conditions are the same.

That should be avoided if possible.
Usually you have a hopper or silo in front of the feeding conveyor. The hopper or silo should be kept topped up so that the feeding conveyor drags a constant (or as constant as possible) flow of material from the silo/hopper.
If you do not have such an intermediary silo or hopper, then I think the correct solution is not to make an adaptable program but instead add this silo or hopper.
If you do have such a hopper, but the material flow still varies, then there is something else wrong.

Now, as you can see, i can only afford the weigher and the motors and the conveyor. Currently i dont have any money left to buy the hopper. I have small elevator that brings the strawberries to the washer, after that comes my bag filler. Now conveyor that connects washer to my bag filler is much smaller than my bag filler conveyor that has my motor i use for feeding product to the loadcell. So the strawberries are not coming at a fixed rate.

Plus Hoppers and strawberries are a bad couple. They would get squished underneath their weight. They are pretty weak :(
 

Similar Topics

I have a powerflex 753 22 amp drive running a 15 hp motor, powering a short conveyor. At a commanded speed of 60 hz the conveyor is running 1200...
Replies
2
Views
1,327
Usually we want to do the opposite, but I'm actually looking for opposite, I need to slowdown my Siemens S7-1518 OB1 execution time, to say, 20...
Replies
6
Views
1,849
Set-up. Main plant PLC (GE 90-30) talks to 5 remote PLC(GE 90-30) over DSL line. at remote plants, each have cellular modems to connect to the...
Replies
10
Views
3,398
I am currently converting a Maple Systems OIT program over to a Red Lion G308A210 OIT and using Crimson 3.0. The first thing that I did was add...
Replies
5
Views
6,247
Back
Top Bottom