› PLCGurus.NET Live & Interactive Forum › PLC Questions and Answers › Rockwell, Allen-Bradley, Stratix › PID questions

- This topic has 4 replies, 2 voices, and was last updated 4 years, 2 months ago by PLCGuru.

- AuthorPosts
- July 25, 2018 at 1:47 pm #3058George BarnetteParticipantKarma: 171Rank: Jedi
Hey, folks. BTW, I wrote logic for my last post about the temperature sequencing and it seems to work real well here in the office on our lab. Using rs5K V.20.04. It looks a little clunky, but it does exactly what the customer wants it to as far as control, I’m going to try it out next week. They’re having massive design issues that aren’t my fault. Thanks, Fred for your input about the RMPS instruction.

Now, to this post. I had a couple of questions about PID’s in the above mentioned software. I am using a lot of them on this project and so far they work pretty well. First question would be, what exactly does .SWM do when activated? From what I can read about it, does it keep the Output % at whatever it is when it is activated? If so, then I don’t need to use it, because when the process I’m trying to control becomes “disabled” (I. E. Unit goes out of heat mode and into cool mode), then I write a zero into the output percent, setpoint and .SO and .OUT so the PID doesn’t come back at it’s last value. This is mostly because of customer specs not wanting fans to accelerate quickly or burners to come on at full capacity. This seems to be working OK I was just wondering if there was a better way. Control is Dependent, BTW.

Lastly, I am using no derivative function at all in any of my PID’s. I was taught not to use it if I didn’t have to. These controls are very, very slow; the fans ramp up to full speed in about 4 minutes, the burners take about 10 minutes to start creeping up on the setpoint, and the cooling and heating water valves are motor actuated and incredibly slow to respond to any action. My gains are decimals; I.E Kp is 0.000019 for instance on some of the burner valves and cooling valves, Ki is 0.016 Min/Repeat, update time is .5 seconds.

I’m getting a little oscillation in some of the processes, mostly the water valves, the fans overshoot and then come back and land on the setpoint and stay there real well. I was wondering if I ought to try some Kd. What are your thoughts, folks? Thanks for taking the time to read this.

July 26, 2018 at 10:35 am #3090PLCGuruKeymasterHi George, it seems there is something going on with the forum notification system…sorry for the late reply. Derivative may help tame the overshoot you are seeing but you are well advised to use it with caution. Introducing derivative into the process can quickly cause the system to tip into instability. As for the oscillating valves, I’d be interested in seeing the trends…is it a saw-tooth type oscillation which could imply some valve stiction.

You mention you are using Dependent form algorithm. Your Igain value may be too agressive which is why you are likely being forced into such a small Pgain. Remember in the dependent form Tau_subi is a 1 over relationship 1/ Tau_subi, meaning the smaller Igain value you put in the larger your Integral component. By having a Pgain smaller than 1 you are diminishing the Igain value which is counterintuitive. I would try making your Pgain some value slightly larger than 1 and then back off on the integral by making Tau_subi larger if needed.

Hope that makes sense and if you upload some trends that may be helpful.

July 26, 2018 at 3:11 pm #3120George BarnetteParticipantKarma: 171Rank: JediThank you, Fred. Yes, it is a sawtooth oscillation, I think it’s because of some of the scaling on their graphs. I don’t have any of those graphs right now or I’d send you one. The temp stays pretty steady, they’re worried about “wearing out” the valve. Go figure.

Anyway, I just don’t get that “min/repeat when in dependent mode for the integral. So, if I’m figuring this right, if I have an Ki value of 0.016, then does that mean I’m repeating the integral control function once every 16 thousandths of a minute? I would say that a tenth of a minute is 6 seconds, a hundredth is a little over a half a second, so a thousandth would be much faster than that.

I’ll try making Kp a value larger than 1 and increasing the value of Ki and see what happens. When I was tuning the PID’s for the fans, I had to have a very slow increase on output % from the PID because they don’t want them ramping up fast at all. And if you program in an accel time in the drive, then whenever the PID makes a positive change in the output %, then there’s a long delay before any drive response, which increases the output, on and on. So we took out all pre-programmed accel time and they work pretty good with those values I gave you. I’m just looking for those water valves to be a little more stable so I’ll try what you suggested. Thanks, Fred.

July 26, 2018 at 3:42 pm #3121PLCGuruKeymasterHi George,

If you look at the video series on PID I’m putting together on YouTube I go over the Dependent form equation. Have a look at it: ControlLogix PID Essentials

If you look at the Rockwell variant of the dependent PID equation:

It is clear that Kc = Pgain is a multiplier of the other terms and that Tau_i = Igain is in the denominator in the integral component. Meaning the smaller the Igain value you set the larger the Integral component. This is not the case in the Independent equation as Ki is in the numerator. That said, with the Pgain value you have of < 1 you are essential multiplying the Integral term by a fraction or diminishing the Integral component because Kc (which is the Pgain you are setting) becomes a scalar or multiplier of the error, I and D terms.

I hope that helps!

July 26, 2018 at 3:44 pm #3123PLCGuruKeymasterThe image looks like its getting cut off so I’m attaching it.

###### Attachments:

You must be logged in to view attached files. - AuthorPosts

- You must be logged in to reply to this topic.