# Ask Doctor Bob: What is level control? (PART 3)

### Video Transcript:

Hi, I’m Bob Rice. And today, we’re going to be covering part three of a three-part installment on level control. Today’s topic is focused on how to calculate the tuning values for level control applications.

So let’s start by looking at our level control process. So we have our tank, and we’re trying to control the liquid level in the tank by adjusting the flow out of a pump. And we’ve got disturbances that are coming into the tank. And we’re trying to control the liquid level in this process, to within some sort of constraints, what we’re looking for in the arrest time is the time it takes to recover from a disturbance change into the system, it effectively sets the response time of the controller. Okay. So if we take a look at our process variable, and set point for a tank, and we’ve got a constant setpoint, and our levels, bouncing around, we get hit with a disturbance, and it comes back again, we have a controller output, that you know the level is too high. So the tank the pump is going to increase, and it’s going to come back out again, something along those lines, the arrest time is the time it takes from when the disturbance hits until the process variable starts to recover arrest that disturbance. This value right here is known as the arrest time of the process.

We also call it closed loop systems on level controllers, the closed loop time constant, okay, tau c or tau CL depending on how you want to write it. All right, this is the time it takes to arrest a disturbance. How do we calculate that we remember back to the first part of our three-part series, we took a look at the flow rates of the disturbance, and we looked at the constraints in which we are trying to hold that target setpoint at that process variable at that setpoint. And we calculated how much time it would take for us to hit a constraint when we’re under the worst disturbance. Okay. And let’s say we ended up with some closed loop time constant of five minutes.

All right, so we’re looking at an arrest time, or closed loop time constant of five minutes. That’s the objective that we’re trying to reach. The second part of our three-part installment on level control is focused on how to calculate the model of the system. The model of the system

is the integrator gain and the dead time of the system. These tell you how far and how fast the level changes to speeds to move off the balancing point of our output. The dead time is how much delay. And so we are able to calculate those terms with these terms in the control objective that you’re trying to achieve. We can tune level controllers. Okay.

So there are these things called PID Tuning correlations, that relate to this model. And this closed loop time is constant to the P and I, and D settings. Now, for most level controllers, we actually don’t want any D, so we’re going to get rid of the derivative. Alright, so how do we calculate the proportional term for a level controller? Well, it’s one over K p star. This is an IMC-style tuning correlation for level controllers. And it’s going to be two times tau c plus the dead time divided by tau c plus the dead time, that whole bottom part squared. And so you’re left with that. And your I term is two times the closed loop time constant, plus the dead time.

Now, you’re looking at these saying, Bob, that’s pretty complicated. How can we make this easier, right? And if you have large dead times, these are the equations you want to use, right? But remember how I told you earlier, dead times for level controllers really aren’t that big. Oftentimes, if your closed loop time is constant, this arrested time here is larger than the dead time. So if your closed loop time constant, is much larger than your dead time, you can assume that the dead time is not that relevant in the process dynamics. If that’s true, you can set these to zero in the tuning correlation, and you can end up with a very simple set of first pass tuning correlations for a level controller. That’s essentially tau c over k p star for your P term. And your I term is two times to tau c. Now, this is where things get really interesting. Notice your eye turn.

Now, these tuning correlations, by the way, are for the dependent form of the PID equation that uses the reset time. So if you’re using a dependent form of the PID equation, that’s using the reset time, and you’re tuning a level controller, the integral, the reset time that you have here is purely a function of the objective you’re trying to achieve. It’s two times the arrest time, and two times the closed loop time constant. So if I know I need to get a five-minute arrest time in the system, my reset time is two times that done, right, two times five minutes, 10 minutes, my reset time for my process, in this case would be 10 minutes, right, I didn’t even have to do a bump test, I didn’t even have to generate a model. It’s purely based on the control objective that you’re trying to achieve. Now, the P term does include the tank size, right, the dynamics of the system, that KP star, so you take whatever you generate it for your Kp star, whatever you want, for your objective function, divide tau c divided by that, that’s going to get you your P term. And you’re generally going to get, you know, gains that are above one.

Oftentimes, for level control, your gains are going to be somewhere between, you know, maybe two and four, maybe two and six, something like that, with an average around three or four, right, you tend to have larger gains, right, and you’re going to have very slow reset times, 10 minutes, five minutes, 20 minutes, 30 minutes, because they’re based off the objective function, and how quickly you want the tank to move. Tanks, you generally want to move pretty slow. So your reset time is pretty slow. If you’re dealing with reset rate, which is going to be in the numerator, or independent forms of the PID equation, where it’s not the dependent form, your integral terms tend to be very, very small. So if you’re using an independent form, and Rockwell, for instance, your KPI could be point 0001 in some cases.

So level controllers tend to be a little bit finicky when tuning, they also tend to be the most often requested loop from customers that we help them tune. Most level controllers tend to be cycling and oscillating. Oftentimes, because their reset time is much too fast. It’ll be one minute, it’ll be a half a minute, when it should be like 10 or 12 minutes. Once we increase that reset time, slow down that integration, we’re able to bump up the gain a little bit, get that level to balance out to smooth out. And because oftentimes, these tanks tend to connect pieces of equipment. By tuning your level controllers, balancing them out, get them to be stable, you can start to decouple your processes and really start to improve the efficiency of your plants. Right.

Level control is a challenging process because it is key and integral to a lot of your applications. In this particular web installment, what we did was we covered the tuning aspect, we understood what the arrest time of the system was, we understood the tuning parameters, we looked at the equations, and we on the back of an envelope kind of simplified them down to just how to calculate the p in the I term. Knowing just a little bit about the dynamics of the system, and a little bit about the objective. We’re able to get to our tuning parameters without trial and error. Thank you for joining us in this level control three-part installment. Hopefully, you learned a little bit more about level control.

If you have a particular topic or an idea that you would like us to cover, please email us at askus@controlstation.com. Thank you, and I hope you enjoy this video series.