Two loops or not two loops, that is the question!

BillRobinson

Member
Join Date
Oct 2006
Location
Sydney, Nova Scotia
Posts
185
Ok i might be crazy trying implement this control, but i want to throw it out there for discussion.

I have a sewage wetwell with level sensor and VFD pump with a flow meter. Now the client doesn't want a constant level because the flow out will be too erratic, and doesn't want a constant flow out because the wetwell will either drain or flood if the setpoint is too high or too low. So we are kinda looking at a semi-constant flow with a semi-constant level. We want the flow to be somewhat constantly low when the wetwell is low and somewhat constantly high when the wetwell is high. We dont really care what the flow is or the level is just that both don't give us wild swings.

My initial thought is to divide the wetwell into multiple sub-level bands. Each level band would have an associated flow setpoint which the VFD matches with a PID loop. If the wet well level goes into a higher band the PID will get a higher setpoint. Opposite would happen if we drop to a lower band.

Problem here is how many bands and what flow to set in each band.

My second thought is to use two cascaded PID loops. Have the first loop control flow with the VFD and have first PID loop's flow setpoint coming from the second loop. The second loop (much slower than the first) outputs a flow setpoint based on the derivative value of the level (that is the change in level over time). The setpoint of the second PID loop would be zero.

So if the derivative value is greater than zero, then we are filling the tank so we increase the flow to compensate.

If the derivative value is less than zero, then we are draining the tank, so we decrease the flow to compensate.

This looks all good on paper but will it work in the real world?
 
What you need is linear quadratic control!!!

The idea is to define a 'cost' function that must be minimized. An example in your case would be

cost=Q*LevelError^2+R*FlowError^2

You can see that one can change the weighting by changing Q and R.
The there is a function that calculates the gains that will minimize the cost function. Chances are you can get by with just proportional control.

You can try fuzzy logic too. This is one of the few places were fuzzy logic makes sense. The problem with Fuzzy Logic is that it is usually tough to implement on a PLC. The LQC can be implemented in a couple of compute blocks once the optimal gains are found and that can be done off line.
 

Similar Topics

Alright so this is a brain-bender of sorts so bear with me as I describe my current challenge which I am trying to overcome. Couple notes right...
Replies
21
Views
9,764
Hello this is my first post. Looking forward to being more involved in this community to learn and hopefully help others. Any help or guidance...
Replies
7
Views
790
Hello Everyone, I have about 135 controller PIDE loops that I need to add to my Studio 5000 and that means I will probably have to create about...
Replies
8
Views
1,916
Good morning, I am currently having a struggle of getting cascaded pide loops to work within studio 5000. I have read and followed all the...
Replies
5
Views
1,920
Hi all, I hope everyone is well, I am in need of something so simple, I have made a small program in SCL and want to monitor some loops in...
Replies
5
Views
4,428
Back
Top Bottom