Should I use a PID Loop?

Cody Anderson

Member
Join Date
Nov 2020
Location
Brockway
Posts
36
Hello All,

I am trying to figure out the best way to control a system I am working on. I have 2 bags of peanuts being lifted up by hoist. I am keeping track of the weight of each bag using a hangable scale. The scale is between the bag and hoist. Each bag is hung over a vibrator station. The peanuts fall into a square box vibrator and then sent into a roaster/mixing bowl. I am controller the vibrators with a 4-20 Ma signal.

I have two types of peanuts. Bigs and Smalls. I want to be able to choose a percentage of each type to mix. So say 90 percent bigs and 10 percent smalls. Their old system ran at about 12,500 lbs/hr so I am trying to maintain that flow still. The bags weigh about 2100 lbs. I will definitely want to keep track of the weight loss and I know I would use that in the PID loop, but is this the best or only way to control this system accurately?

Thanks in Advance!

Cody Anderson


I have set up a temperature PID loop before, one that really didn't have to be super reactive. I don't have a ton of experience on PID loops.
 
I don't have a definite answer, but I've seen my fair share of threads on filling processes. I can't recall exactly who it is who often answers, but I know that it's a specific user on here who seems to have a lot of expertise on the topic. I think the general advice is to fill at full speed up to a certain percentage of full weight (90 or 95% for example), and then ramp the filling speed down to get to 100%. I don't recall if that ramp down is at a pre-programmed rate or if there's PID involved, but I do remember seeing this control scheme recommended several times and people often agreeing with it.
 
a system like this I usually would setup a point where the weight is close to the final expected weight. Before this point run the vibrator fast as possible after this point slow down to a speed that you can stop fast. So no PID just 2 feed speeds and a react point.
 
Would that still work though if they were to switch up the percentage say to 80 percent bigs and 20 percent smalls? And I am not following when you say the weight is close to the final expected weight. Do you mean the 12,500 lbs in an hour?
 
Would that still work though if they were to switch up the percentage say to 80 percent bigs and 20 percent smalls? And I am not following when you say the weight is close to the final expected weight. Do you mean the 12,500 lbs in an hour?

I think he means the expected weight of the bag that's being filled. For example, if the bags are 5lbs, fill them at rapid speed until they reach 4.5lbs and then ramp the speed down until it gets to 5lbs.

As for the proportion between the two types of peanuts, that would probably require a little bit of stickhandling, but probably nothing too difficult.
 
Have done something similar, no need for PID it becomes complicated as the ratio of the mix & weighing the best way is to calibrate the feeds so a selection of a given ratio i.e. 90/10 is achievable across the normal operating range, so for example as already stated, full speed (or what ever speed is required) then at a given percentage of required weight reduce the feed rate , this sometimes poses a problem given that most feed systems are not linear especially on vibrating systems, however, a lookup table will give good results, I once worked on mixing in-line a sauce & meat particles, as this was as such continuous i.e. no change in feed speed only start up & stop we did use two PID loops to control the flow & it worked very well, the problem you have is you probably will not know the actual feed rate of each component, as it is very difficult to measure dry ingredient feed in-line (unlike liquids) it appears the only reference you have is the load cells, however this a mix of the two components, it is possible to measure dry ingredients but not on vibrating conveyors.
So my answer is forget PID unless you can measure both ingredients seperately on the go.
 
Okay I see what you mean. I am not filling the bags, I am emptying them. The only variable I really have is the loss of weight in each bag. So I didn't want to over complicate the original post. But I really have 4 stations, 4 bags hung. But only two are running at a time. 2 stations have smalls, and two stations have bigs. When one bag empties it switches over to the other bag of the same peanut type. And this give the operator time to unload the empty bag and lift a new full bag. So this system is constantly running and needs to run at 12,500 lbs per hour consistently
 
https://www.plctalk.net/qanda/showthread.php?t=129740

run one bag's vibrator at a fixed speed, measure the resulting rate, use that and the relative percentages to calculate a target rate for the second bag, and use that as the setpoint of a control algorithm, probably a PID but it is going to be slow enough and the measurements are going to be noisy enough that other algorithms might work.

I don't know if it's worth trying to control the overall flow rate, because then the controller that is maintaining the mix rate has to deal with noise in both rate measurements. plus any noise in the overall flow control.
 
Last edited:
Oh wow I completely forgot I posted about this like a year ago almost lol. Nice find Drb! The project ended up getting delayed for a long time and now back on track. My Bad! But I will start taking in all this information and start coming up with a plan! Thanks so far guys!
 
Oh wow I completely forgot I posted about this like a year ago almost lol. Nice find Drb! The project ended up getting delayed for a long time and now back on track. My Bad! But I will start taking in all this information and start coming up with a plan! Thanks so far guys!

So how did you end up doing it?

Also, can you simulate what you expect to happen?
 
I thought this post sounded familiar, sorry I probably did mis-read this post, the way you explain it certainly PID will be a good option. in essence it would be the same as the sauce/meat blending system I did many years ago. it is pretty simple just calibrate the feed rate of the bags i.e. tonnes per hour/minute etc. then a simple calculation based on the tonnes per hour automatically calculate the speed of the small nuts versus the large ones.
Perhaps a bit fiddly but you need to think about a change of tonnes/hr versus the percentage of small to large.
 
Van,

The project got delayed so I never got the chance to implement the program into the system. I have the program I started from last year in June, but never finished it and looking to finish it now. I will let you know when it is complete, how it goes and what happened!!


Parky,

Thats pretty much what I decided would be my best route to take. Will probably run the large peanuts close to max speed. And then use those rates to calculate how fast I need to run the smalls and put it in a PID. One of them needs to be in a PID loop I feel like.
 
VOne of them needs to be in a PID loop I feel like.


I think the biggest issue will be noise in the measurements, i.e. both of them, which will cause the PID to bounce around.

The way to increase accuracy and reduce noise is to increase the time base (sample period) for the flow rate calculation, but that will mean the loop has to respond more slowly. At 12,500lb/h and 2,100lb/bag, a bag lasts about 10minutes, but since there are two bags being emptied at different rates it will be a bit longer. If how full the bag is affects the vibrator's speed relationship to flow rate, then too long a sample period puts the noise in the same time domain as the actual process change, and that could be a problem.

Instead of a simple two-sample [change in weight] ÷ [sample period] calculation over say 10s, it might be worth making measurements at 1Hz, and calculating the flow rate as the best-fit slope (weight vs. time) of the last 10 weights; that way you get a slope every second filtered over the past ten seconds. The calculation is more involved than the two-point method, but certainly not beyond what a PLC can do at 1Hz. Obviously a first-order filter would be easier to implement.

Either way, getting the best possible calculation of the flow is where I would spend my effort first; once that is done, calculating the rate and tuning the PID should be a doddle.


Btw, I am curious: what sets the rate percentages of of small and large peanuts? Is this a batch or continuous process? If batch, how big is a batch? Is there mixing of the peanuts other than downstream from where they flow out of the two bags together? I assume that initial mixing stops when either bag goes empty and is being changed, so I was wondering how that is handled, or if it is small enough to not matter. Hmmm, I guess the base question behind all that is this: what is the smallest sample (in weight or time) of the mixed peanuts where you want to see percentages somewhere near the target percentages?
 
Yeah the possible noise has me concerned. I am worried that my weight will shift enough to mess up my PID loop if I am looking over a short time. But I need to also be sure I am running the percentage that they want. Maybe use the PID loop over a longer period of time and do shorter percentage checks internally through the program to make sure I am actually in my range still, just as an alarm, not really any control.


I am using an HMI with the system. On the main page it shows all 4 stations and they can select a peanut type and percentage for each station. It is a continuous process. Only 2 of the 4 stations run at a time, and they set up two stations to match each peanut type. So my program looks for the matching stations and then when one of those stations goes empty it switches over to the other station and gives the operator time to change the bag using the hoist and forklift. Then the same thing happens, the other bag goes empty, I switch back over to the other station. There is a photo eye being used were the peanuts are getting dumbed into the mixer, if it fills up to a certain point, it shuts me off until it goes down past the eye.
 
There is a photo eye being used were the peanuts are getting dumbed into the mixer, if it fills up to a certain point, it shuts me off until it goes down past the eye.


How does the mixer work? Is it continuous? Does it actually mix the peanuts that are in it? Is it there to provide a steady stream of peanuts to the next stage in the process?
 

Similar Topics

Hi guys, I am using a PID to control my brewery. Right now I have it controlling my Hot Liquor Tank. I have my TUN circulate threw a 50' coil...
Replies
7
Views
2,708
Hello everyone. I'm currently working as an intern for a company that has assigned me a project to work on. In my last post I went more in detail...
Replies
9
Views
2,649
One of the most commonly asked questions when setting up PID control is: “How often do I need to update the loop?” The purpose of this post is to...
Replies
11
Views
60,910
Hi, I am working on automating an industrial fabric shrinkage tester to replace its outdated electronics with a PLC. To get the tank's water level...
Replies
14
Views
539
In a control System, I need to move 3 motors attached to roller in stages with speed of 1 to 2 RPM and the torque of motor should be 8-10 Nm...
Replies
0
Views
829
Back
Top Bottom