Print Friendly, PDF & Email

Welcome to the second Learn Series article!

If this is your first time ever reading the learn series then you’re in for a treat. In these articles I discuss a technical topic and provide solid education for those in or thinking of joining the building automation field.

In today’s article I will be discussing

  • How to Tune a PID Loop
    • Tuning the P
    • Introducing the I
    • Summarize What we Covered

 

PID Loop tuning is a difficult topic for many my hope is that after reading this article you will have a fundamental understanding of how to tune your loops!

You ready? Let’s get your learn on!

How to Tune a PID Loop

When it comes to tuning PID loops there is a wealth of information out there. But let me be straight with you real quick, unless you are a engineer or a math major that information is going to be confusing as crap!

{\displaystyle u(t)=K_{p}e(t)+K_{i}\int _{0}^{t}e(t)dt+K_{d}{\frac {de(t)}{dt}}}

Sure thing! I’ll solve that equation right after I get done running into a wall repeatedly.

Seriously for all of our intelligence we can’t make this easier? Well, good news folks, it’s about to get a lot easier.

First let’s discuss the setup. You want to make sure that your PID loop controls but you don’t want to break your equipment what can you do?

Well, I would recommend either putting your equipment in hand or better yet setting the initial tuning values in your controller with nothing connected to it! Oh, but that breaks every rule of tuning with live equipment. Well, you can use live equipment later let’s just get the basics done!

So, for now, go into your controller and hook up the PID loop to an input, set-point and output. Ideally these are points that are logically linked!

So in our little experiment we will use Discharge Temperature Sensor, Discharge Temperature Set-point and Cooling Valve Control. P is set to 0, I is set to 0, and your start-up value is 0.

(Be aware that these values may be different and you may have more or less tuning factors depending on your BAS)

Tuning the P

The P in PID stands for…. Proportional! Come on you read the first article in the series right? If not go check it out, I’ll still be here when you get back.

So, the proportional part of the PID controller reacts in proportion to the amount of error introduced. So it would make sense that in order to make sure our P reacts right we need to introduce some error. Now go and adjust the set-point 2 degrees lower than it is right now.

You should see a spike in your output. See that spike good! Now here’s the deal. What is the likely throttle range of your set-point. With discharge air it usually is 20 degrees. So guess what your P value should start off at?

20! Cause what is our output? It’s P * Error right? Well 20 * 2 = 40! So we’ve got 40%.

Now if the error stays the same, which it will because we are faking it, then your output will stay 40%.

Why is this? Because the output is proportional to the error right?

Awesomeness. So we’ve got P down!

Now it’s time to add some integral effect to this bad boy!

Introducing the I

I stands for integral and its gives PID loops the ability to put some more oomph in your outputs when stuff isn’t changing. Now that may not be a very technical term but that’s really how I works. Over-time the I value will increase by a set amount. This value will increase by I+In (where n is the number of times the loop has run.

FYI, loops typically run once a second on BAS controllers.

So, now you need to figure out how fast your loop needs to react. I recommend setting I at something low, maybe .1 . Over time this I value will increase. Watch the I value and see if the time it takes to go from 40% to 100% is acceptable to you. For example on discharge air it should take 90 – 120 seconds to get to 100%. Anything more or less then this and you will realize hunting with your valve.

Now these values work for discharge air control but for other situations the values may be different.

Let’s Summarize What we Covered

So in summary we want to first put our system in hand or use a separate BAS controller.

Next we want to calculate our throttle range, this is total of the range that the input will usually go up and down from set-point. This number will become our P.

Next we want to introduce our I. We start at .1 and we increase our I by .05 based on how fast or slow we want our loop to react.

Once we’ve accomplished this then we will have our settings for our PID loop. Now the last part is to test the PID loop during occupied and unoccupied switch-over.

Simply release the unit from hand (manual) and switch between occupied and unoccupied mode. Watch how your system reacts to the different occupied and unoccupied set-points. Is the system working like you want it to?

If so your good, if not adjust and repeat.

Conclusion

Well, I hope by now that you are PID’d out! Yes, that was a corny joke!

Seriously though, you should have a solid understanding of how to approach PID loop tuning and how to work with a PID loop.

In next weeks article, I am going to discuss the 2nd form of control which is sequenced and floating control.

Let me know your thoughts in the comment section below.

Like this Content? There's much more...

Join the BAM nation and gain access to BAM Nation only videos, templates, and checklists. Also get notified when I post new content and take advantage of subscriber only pre-sales on my products!

Powered by ConvertKit