ACCESS PACK EXPO XPRESS ONLINE TODAY. Content is available on-demand through November 30th.

Using Split Range Time Proportional with PID Loops

Though pretty complex in nature and difficult to program, there are way more benefits to tuning and using PID loops that can ultimately be incredibly useful when it comes to your development process.

Nick Bozzelli, staff engineer, Avanceon
Nick Bozzelli, staff engineer, Avanceon

It goes without saying, tuning proportional-integral-derivative (PID) loops is a dreaded task for the majority of controls engineers. Once you hit the sweet spot and fine tune your loop, knowing how to utilize certain abilities of a PID loop (the Rockwell standard PID function block, more specifically) can be extremely helpful throughout your development process.

On a recent project, I was tasked with tuning 10 PID loops for 10-barrel zones on an extrusion line. Luckily, I was able to pull my values from another extrusion line on site, plug them into the system, and go from there. However, the system didn’t just simply heat up based off of a single heating element and then stabilize its temperature.

Since the mass of each zone was fairly significant, the system also utilized 10 cooling solenoids to control the temperature and cool off the zones much faster. Therefore, it was crucial to understand when and how long you should activate cooling versus heating. The simplest way to do this was to integrate the Rockwell standard PID function block with the Rockwell standard Split Range Time Proportional (SRTP) function block.

SRTP is fairly complex in theory, and the math behind it can be pretty involved, but understanding how the block works is simple and can be a powerful tool. As mentioned before, I utilized it to control when a cooling solenoid turns on, and when a heating contactor turns on. Starting at the PID function block, the value of your Control Value in Engineering Units (CVEU) populates a percentage, which in turn, can be used to control your SRTP function block by mapping the CVEU to your “In” parameter. Your ‘MinHeatIn’, ‘MaxHeatIn’, ‘MinCoolIn’ and ‘MaxCoolIn’ parameters are configurable in order to control heating and cooling based off of that “In” parameter. For my application, I set the ‘MinCoolIn’ to 0, ‘MaxCoolIn’ to 50, ‘MinHeatIn’ to 50, and ‘MaxHeatIn’ to 100.

These parameters align with your CVEU in that if your CVEU is 0%, then cooling is at 100% and heating is at 0%. When the CVEU then goes to 25%, cooling is now at 50% and heating is still at 0%. In contrast, when your CVEU is 100%, cooling is at 0% and heating is at 100%. When the CVEU goes to 75%, cooling is still at 0% and heating is now at 50%.

Therefore, whenever a value of 0-50 CVEU is processed, the ‘CoolOut’ parameter is set to a one for the allotted CycleTime. Whenever a value of 50-100 CVEU is processed, the ‘HeatOut’ parameter is set to a one for the allotted Cycle Time—if our Cycle Time is five seconds, and we are pulsing at 50% full output, then the Cycle Time is now at 2.5 seconds. 100% full output would denote a full five second Cycle Time.

Map the ‘HeatOut’ and ‘CoolOut’ tags to the conditions that must be met for your actual heating and cooling outputs, and now you have successfully integrated SRTP into your PID Loop.

Before I discovered that the SRTP function block existed, I was attempting to do all of this coding in flat ladder logic (which is probably what a lot of engineers do.) The problem is that there are a number of moving parts in this logic that made this process very difficult. For example, I simply couldn’t add two different laboratory information management (LIM) blocks in front of my outputs—one that is 0% to 50% of the CV, and another that is 50% to 100% of the CV—and expect the loop to work properly since the output would be at its full capacity without any pulsing involved.

The pulsing is where the split range calculation comes into play. Remember that 50% of your full output with a five second Cycle Time would allot a 2.5 second pulse. This value is consistently updating and must be precise—especially in this extrusion application. Any deviation in temperature can cause issues with the extrusion mixture and cause a hold on production. Creating a calculation that could handle this operation quickly became a very precise and tiresome task. On top of those requirements, the loop for this calculation had to happen at a quicker rate than the PID loop to rapidly adjust for heating and cooling swings, which was accomplished by putting all of the SRTP blocks in a separate periodic task. The incorporation of these two Rockwell function blocks streamlined the development process- bundling everything up into a nice, easy to understand flow.


Nick Bozzelli is a staff engineer at Avanceon, a certified member of the Control System Integrators Association (CSIA). For more information about Avanceon, visit its profile on the CSIA Industrial Automation Exchange.

Test Your Machine Learning Smarts
Take Automation World's machine learning quiz to prove your knowledge!
Take Quiz
Test Your Machine Learning Smarts
Discover New Content
Access Automation World's free educational content library!
Unlock Learning Here
Discover New Content