PID Programming/Configuration

ersanjit

Member
Join Date
Sep 2018
Location
Windsor, ON
Posts
14
Folks,

I would like to get some ideas/suggestions on how to use PIDE/P_PIDE in best way for my H&V system.

I have one feedback: Temperature transmitter from the room and
I have 3 outputs that I need to control. When the temperature drops below setpoint then I want the bypass damper for the economizer to open, lets say I use a PIDE instruction for this. Then how do I use more PIDE instructions for my other outputs. The next output is a economizer damper (2nd PID) which should open once bypass damper is 100% open and that first PID loop cant still match the setpoint at 100% Controller output.

If I am still below setpoint and both the PID loops are at 100% CO or both bypass and economizer dampers are open, I want to start opening the steam valve to allow the steam coils (3rd PID) to do the magic.

I am thinking to use PIDE cascade feature to help out here but I am not use how to use it or if you guys have any better mature solution to control this system?

Please advice. In a nutshell, the system has 3 different steps which needs to be activated in sequence once temp. starts dropping.
 
Cascade PID is usually used in very different type of application then the one you are describing. Put that aside for now, I would ask what is process control design? Is what you described, using 3 PID in series the intent of the system-designer?

Jumping ahead, if indeed that's the design you could just use one single PID loop and just scale different band (say, 0-20, 21-60, 61-100) of the PID output to 0-100 output of the 3 individual output.
 
Last edited:
Jumping ahead, if indeed that's the design you could just use one single PID loop and just scale different band (say, 0-20, 21-60, 61-100) of the PID output to 0-100 output of the 3 individual output.

Yes, split range PID control was my first through as well. You can skew the the range of each part (ex: 0-20 vs 0-30) to have unique gains for each section that way.
 
Thats how the original system was in place, using 6-30 psi signal lines to actuate these instruments (by calibrating them accordingly). I do like this approach using just one PID, making it pretty simple. thanks for the feedback. Any other tips are appreciated as well!
 
What are the transfer functions of the three output processes? Or do you have the process gain/lag time/deadtime of the three outputs?
If the lag and deadtimes are particularly different from output to output, consider using different tuning parameters for each section of the split range output described by others.
Keep noise down on your temperature signal. The filter built into the pide is useless if I recall.
Make sure the periodic task your PIDE runs in has an appropriate cycle time for the process speed. It may need a separate task so it can run slower and your digital logic can run faster.
And as always, make sure you are happy with the safety measures in place. Make it clear that your code isn't the safety but then still design and use it safely.
 
I do not have any data to compare process gain/lag time/deadtime yet. But lets assueme that they are different from output to output, how can I define different gains in PIDE with respect to different CV ranges? I don't have any experience with PIDE, therefore asking.
 
Not sure of your experience, but just in case you need some basic help on gains, admittedly it's not the 3 CV PID system you are trying to use, but it's the best vid l have seen to show how to tune a PID via the Ziegler-Nichols Method. You need to be able to get some running data, but it shows how to set it all up.
https://www.youtube.com/watch?v=0t3JL_zGEYY
 
But lets assueme that they are different from output to output,
Why? The system you are controlling is the same now matter how you are controlling it. The time constants and amount of heat change per degree change will be the same. What will be different is the dead time. If the two dampers are the same size and at the same place the gain and dead time should be the same. The steam valve will have a different gain and dead time.

how can I define different gains in PIDE with respect to different CV ranges? I don't have any experience with PIDE, therefore asking.
I wouldn't. I would use one gain inside the controller then scale the control output externally for the different gains. To keep things simple I would tune the PID for the dampers so only modifications need to be made for the steam valve.

This is where understanding control theory really helps. The integrator and derivative time constants are not affected by the gain and deadtime. The integrator and derivative time constants are determined by the plant time constant and that doesn't change. This means that only the gain needs to be changed on the output depending on the range and deadtime.


Not sure of your experience, but just in case you need some basic help on gains, admittedly it's not the 3 CV PID system you are trying to use, but it's the best vid l have seen to show how to tune a PID via the Ziegler-Nichols Method. You need to be able to get some running data, but it shows how to set it all up.
https://www.youtube.com/watch?v=0t3JL_zGEYY
Any idiot can make a YouTube video repeating the same old ***** as before. Anyone that proposes Ziegler-Nichols is a fool so their advice should be discarded. There are much better ways now such as the methods described on www.controlguru.com.

When I was contributing to the control guru site back in 2005, I was shown the proof of how and why IMC ( internal control works it shows why the integrator and derivative time constant are only dependent on the plant time constants.

I have posted auto tuners written is Scilab and Python here but they get lost in the forum.
 
Rockwell's PIDE autotune can be made to work.. sometimes. Your time getting it to work will be much better spent reading up on how to tune loops yourself using controlguru, Peter Ponders PID, etc.

It isn't easy, you should let yourself dedicate time to learning this important craft for your industry.
 
Advanced Control: SOPDT Auto Tuning
http://plctalk.com/qanda/showthread.php?p=791387

This is my Python auto tuner for SOPDT systems. It needs a .csv file of time, control output and PV.
The gains assume a standard ISA PID is used.

At least a few people look at my YouTube channel. Google Analytics says that most people leave after 3 minutes. I think that is because videos are too deep. There are a fewer yet that subscribe. This doesn't surprise me because I the videos are meant for the graduate level or at least senior in college. There are plenty of PID videos about this gain does that and that gain does that. This is only useful if you want to guess.

BTW, I have a plctalk.rtf file where I keep links to significant threads so they don't get lost. I sort them by thread number. What I should do is archive these threads.
 
^ Peter, I've seen a few of your videos and they are great and very detailed. I think you would get even more views and traffic if you did an example using a common PLC like an AB MicroLogix or CompactLogix. Some people, myself included, need something to help bridge the gap between theoretical and hands-on. Just a suggestion- your videos are appreciated regardless.
 
Peter l think you maybe being a bit harsh on Duckman (me), l put that vid as an an example and that method has been used regularly going by the number of people that use it as a bases for setting PID gains and is very easy to implement (at least you did say "now" there are better methods), it was only an example, and very easy example to follow it is, that the less experienced PLC programmer may not be aware of how to set gains manually.
Your vid/papers are great for mathematicians which 99.99999% of the population aren't, myself included.
l have looked at one of your PID vids/papers and with my level of mathematics, it just goes blah, blah, blah (unlike the vid example) and so l agree with rupej, if you were able to put your knowledge into something us non mathematicians could understand and using a device more people have some experience with (like the example vid) everyone would be singing your praises.
 
I have. This is over 10 years old

^ Peter, I've seen a few of your videos and they are great and very detailed. I think you would get even more views and traffic if you did an example using a common PLC like an AB MicroLogix or CompactLogix.
Go to downloads, misc, look for hotrod.zip
The file is called hotrod because I used data from Ron Beaufort's hotrod temperature trainers for the simulation and auto tuning. I had a ML1500 and a SLC500 at the time.

I did not have a real temperature system so I asked Ron Beaufort to supply temperature data. His hotrod trainers were soldering irons or wood burning irons with a temperature sensor on the tip. I think that was an excellent idea. I analyzed Ron's hotrod data with my Mathcad. I wrote the PLC code in hotrod.zip. I also used it test my Scilab FOPDT and SOPDT auto tuner.
https://deltamotion.com/peter/Scilab/AutoTune/
About 6 months ago I posted my Python version. No one really seems to care or pay much attention.
https://deltamotion.com/peter/py/SysID SOPDT.zip

You guys are going to need to study what is available. I always thought that Ron Beaufort and I made a good pair because he would explain how to configure the AB PID and I could explain how to tune it if necessary.

Peter l think you maybe being a bit harsh on Duckman (me), l put that vid as an an example and that method has been used regularly going by the number of people that use it as a bases for setting PID gains and is very easy to implement
There is a thread where Ibash ZN. I can find it if necessary. My big objection is passing this off as knowledge. There is a lord Kelvin quote that I like.
" If you can not measure it, you can not improve it. I often say that when you can measure what you are speaking about, and express it in numbers, you know something about it; but when you cannot measure it, when you cannot express it in numbers, your knowledge is of a meagre and unsatisfactory kind."
Z-N makes no effort to know the system that is going to be controlled.

Honestly, most people should not be tuning systems. Someone, not me, should start a company that tunes PIDs remotely. I bet that such a company could tune all the PIDs in the US and Canada and do a much better job and much faster than those that would guess or use ZN. The crucial part is system identification. This is where one determines the plant gains and time constants or in my case the gain, natural frequency and damping factor. These people would be expert on not only system identification but also on what type of PID to use and how to cascade closed loop control effectively. They would know how to apply control theory and not waste money guessing or providing poor performance.

I think the same thing could be done for AU, NZ, JP, and CN because they are in the same time zone give or take a few hours..

Why not me? Because I want to retire.
 
I made my own Hotrod like system 7+years ago following that example to have a PID test rig, but l must confess l haven't looked at that example since, so l apologise in the sense that you/Ron have supplied a PID example, based on common equipment, but l thought it was all Ron's doing, so there you go.

Peter, are you able to give your gains for the above vid example and/or explain what you would do with that data please, that would help us all, thanks.

P/S
Also just to make you feel that maybe retirement is getting closer, it was 15.5 years ago you put Hotrod in the downloads.
 
Last edited:

Similar Topics

I am using a 4-20mA signal from an RTD to an ABB ACH 550 drive. I want to know if anyone has ever set up a PID loop on one of these units before...
Replies
0
Views
1,098
Good Afternoon Everyone, I hope you can help me with a problem. I have been converting a program from a Micrologix 1400 over to a S7-1200 PLC and...
Replies
3
Views
5,296
I'm having trouble programming a PID loop in 505 workshop. Are there any examples out there of how to program this, or how it even works? I got a...
Replies
0
Views
1,476
Hi, I am looking for program examples for Mitsubishi L-Series PID programming. I especially am wondering how to assign variables/devices for use...
Replies
0
Views
2,540
If I have a program that requires 10 different PID loops should I 10 different period tasks (using RSLogix5000)?
Replies
4
Views
2,333
Back
Top Bottom