How to Program a Basic PID Loop in ControlLogix

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in automation programming we are often required to program a control loop for a given process to control temperature pressure flow rate etc this requires a target setpoint with a controlled feedback process variable a PID process loop controller is designed to generate an output that causes some corrective effort to be applied to a process so as to drive a measurable process variable towards the desired setpoint value the controller uses an actuator to affect the process and a sensor to measure the results often automation technicians and programmers are required to become familiar with configuring and tuning a PID loop control instruction and it can be one of the most overwhelming when it comes to PLC programming topics lesson we will discuss how a rockwell automation control logics 5000 PLC using the enhanced PID controller function block instruction pide the pide is an allen bradley logics 5000 process automation controller or pac family control logics and compact logics function block that improves on the standard PID found in all their controllers [Music] before we get started on today's video if you love our videos be sure to click the like button below then make sure to click Subscribe and the little bow to receive notifications of new real Parrs videos this way you never miss another one function block programming uses diagrams with symbols to represent function and input and output connections between functions at first this function block can be quite intimidating it shares similarities of the standard PID instruction and you'll only need to turn on parameters required by your control program in this example we will basically get you off the ground using the pide instruction and the program options essential to get it working in case you may have forgotten what PID stands for the P stands for proportional gain I for integral time and D for derivative gain PID and PID II are used for process control which includes the automatic control of systems such as temperature flow rate pressure and speed the cruise control on a car is a good example of this type of control basically you tell the controller how fast you want to go the setpoint and the controller samples the actual speed the process variable and then the controller calculates an output value the control variable and sends that signal to the gas pedal and just as a PID functional refresher and using the car cruise control as an example the P or proportional is described as in the farther you are from the desired speed the more you press the gas pedal and on the other hand the closer you are the less you press on it this works well but when you get at the desired speed based on this rule you would let off the gas completely and the end result is your car slows down and stays a little below the desired speed proportional control is the main ingredient of any control but maybe a little inaccurate for I or intregal you wait for a little and if there's no improvement you push a little more on the pedal if you are stuck below the desired speed for a long time without progress you push the gas pedal a little further if you still do not make it to the desired speed for some time you again push the pedal a little further down once you get to the desired speed you leave the pedal where it is integral control gives you accuracy but you have to wait and 4d or derivative you react to sudden changes let's say a strong wind gust pushes your car suddenly your speed surges fast upward toward the desired speed you become startled so you release the gas pedal as the speed surge ends and the speed stabilizes you will then return the pedal to where it was derivative control manages sudden surges and may prevent overshooting your target speed if you enjoy function block programming as I do you will benefit from using this enhanced version instruction over the standard PID instruction for a few reasons the pide instruction offers a built-in auto-tune feature which works reasonably well the pide is programmed using a function block and not available for ladder logic programming it uses the velocity form of the PID algorithm this is especially useful for adaptive gains or multi loop and cascade process control the pide instruction can be switched between program and operator modes and provides full bump list transfer into and out of cascade mode and this instruction has more fault handling selections the following programming steps assume the reviewer has studio 5000 experience okay let's get started and create a new studio 5,000 project locate the desktop or taskbar icon for studio 5000 and launch the program create a new project select a new controller type such as the 1756 L 71 and give the program a name in this case pide example hit next and in the next window keep everything as it is and then click finish for the next step we need to create a new routine by making a new task and a new program so first I'll create a new scheduled task by right-clicking on the tasks and then clicking on the new task in the next window I will consider pide control as the name for the task the period of the task automatically becomes the sample rate of the PID loop it is best to set it up in its own periodic task so I'll leave these settings without any changes and continue to create a new program by right clicking on the PID control task in this menu I'll open the add menu and click on the new program I will name the program as same as the task which is PID control finally I'll click OK to close this window the next step in the process is to create a new routine to do that I'll right-click on PID control program then ad and then I'll select new routine in this window I will name the new routine as pide just make sure to select the type as function block diagram and then click OK as you can see the pide icon is added here and I can open it up by double clicking on it now that I've opened the pide program from the process tab in the library I will add the pide function and add it to the sheet now let's suppose we have a mixing tank where the temperature is to be maintained at a certain set point the control valve allows a catalyst to be added to the tank to increase the temperature and the temperature transmitter will send the feedback to the PID this will represent our process and control loop for programming purposes now to be able to configure this block I need to open up the properties to do that I'll simply double click on the block in the general configuration tab we will use the default configuration however we just need to make sure that for the timing it is using periodic mode the control action is set to e and for the calculate it is using the proportional parameter set to e and the derivative term is set to PV next in the e use limits tab I will set the engineering unit scaling for both CV and PV parameters from 0 to 2500 degrees Fahrenheit with a set point limit of 500 to 2,200 degrees Fahrenheit the control variable limits will be using the same temperature engineering units in the parameters tab there are several parameters which pide function utilizes them that you may or may not use them these parameters can be manually turned off or on here when selected the parameter will be exposed to allow program connections here there is also a description field for each parameter which gives you more information about them select the required parameters and deselect the rest next I'll hit OK to save the configuration you can see the required parameters I've selected in the pide block here the pide function block is configured we can begin to add program control input and output reference tags to adjust the pide block performance the main input references are the temperature PV or process variable which is a feedback from temperature transmitter the SP prog or program setpoint which is defined by the operator on the HMI and the cv EU or control value in engineering units output to control the heat in the tank by opening or closing the control valve other inputs added are inputs for controlling the setpoint high and low limits the maximum and minimum engineering units and auto manual control to allow for direct manual control of the catalyst control valve the CV manual input reference value will be used for the manual control when auto manual is turned off the pide will need to be tuned and we have to set the tuning parameters P game 2-1 I gain to 0.5 and D gain to 0-2 a recommended starting point PID tuning can be tricky so I recommend reviewing procedures for this technique the standard reference for PID tuning seems to be these Ziegler Nichols tuning rules this concludes the video programming basic control logic Spidy loop using the pide block instruction I hope you've enjoyed learning what will support you in your upcoming project if you would like to get additional training on a similar subject please let us know in the comment section if you enjoyed this video please press the like button please check back with us soon for more automation control topics want to learn see programming in an easy-to-understand format and take your career to the next level head on over to Rio parse calm [Music]
Info
Channel: RealPars
Views: 230,189
Rating: 4.9540443 out of 5
Keywords: PID Loop, PID Tuning, PID Loop Tuning, Tuning a PID Loop, PIDE Function Block, PID Function Block, Allen Bradley Logix 5000 Controller, Allen Bradley Logix 5000 Process Automation Controller, Allen Bradley PAC, ControlLogix, Proportional Gain, Integral Gain, Integral Time, Derivative Gain, PID Process Control, PID Programming, Studio 5000 PIDE Programming, Allen Bradley PIDE Programming, Ziegler-Nichols Tuning rules, ControlLogix PID loop
Id: XVYRT0Mbu7A
Channel Id: undefined
Length: 13min 11sec (791 seconds)
Published: Mon Feb 18 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.