PID Question

ToddM

Member
Join Date
Oct 2004
Location
Cascade Va.
Posts
106
Hi Folks
I started studying the PID block and kind of expierimenting with it on my test PLC at work. In the help files I found this.
Controller Gain Kc Type in a value. (With 5/02 controllers the valid range is 0.1 to 25.5. With the 5/03, 5/04, and 5/05 controllers the valid range = 0 to 3276.7) This is the proportional gain. Generally set this gain to one half the value needed to cause the output to oscillate when the reset and rate terms are set to zero. Note: RG bit must be set to accept values exceeding 25.5 when using 5/03, 5/04, and 5/05 processors.
I have a Senix ultra sonic sensor connected to I:1.1 of my analog input card.{I would have included a screenshot of the logic,but we had a busy day and it was close to shift change when I did this.}I left the reset and rate at 0 and double clicked the proportional gain and started adjusting it.I tried several times and I wasn't quite sure what I should be looking for or even if I was doing this correctly. I have the sensor in a vice so it won't move. If anyone could give me some insight I would be greatful.
Thanks and later...Todd
 
One note on ultrasonics - some brands of ultrasonic level sensors malfunction when tightened to tightly into an NPT threaded connection. The guts of an ultrasonic are a speaker (generates ultrasonic frequency) and a microphone (listens for ultrasonic echo) both of which have some form of diaphragm. If I were you, I'd be careful of how tightly I squeezed the sensor in a vise.

A ID loop consists of
1) an analog input (your ultrasonic sensor which is the process variable or PV),
2) a PID function in the PLC which calculates the output (0-100%) necessary to maintain the PV at the setpoint (SP) which you establish.
3) an output, typically a 4-20mA analog output
4) a final control element, something like a proportioning valve that modulates something which the sensor senses.

The idea is setting the PID factors is to get gain, rate, and reset factors that cause the Process Variable (PV) to be maintained at the setpoint (SP). Incorrect PID parameters will cause the PV to oscillate, or to be sluggish.

You have a sensor and a PID function. Do you have the remainder of the loop, an analog output and some final control element ? If you don't, 'testing' the PID can be problematic, because the output has no means of changing the PV.
 
If I am not mistaken , some of the AB Slick controllers must be bumped into manual for one cycle before the change to PID setting will be evident . You are right about setting the RG bit .
 
just getting started ...

Greetings Todd,



just as a quick “let’s see if things are hooked up right” benchtest you can try this ...



set the PID up like this for starters ...



toddpid.JPG




then move something in front of the sensor ... the PID should calculate SOME output and change the value of “Control Output CV (%)” ... don’t look for anything remotely resembling “control” with these “wide open” settings ... all you’re doing at this point is confirming that the PID sees the input signal changing and that it will respond by driving the output signal up and down ...



once you do that step, then cut the Kc setting back to about “1.00” and see if the PID tries to “track” the input signal by “controlling” the CV ...



we can go into much more detail once you give us some more information about your system ... posting your .RSS file would be a GREAT way to proceed ... hope this helps ...
 
Is it correct that the loop should be placed in manual for PID settings to take effect with these controllers ?
Thanks
 
Hi Folks... Thanks for the replys.1st note to Danw. You got to try one of these senix ultra sonics, It dosen't have a threaded connection. It has a handy clamp that fits snug around the sensor so I don't have the actual sensor in the vice.{but thanks for the info about the speaker/microphone deal} 2nd note to Ron. I saved my test file on the laptop at work but I got busy and forgot to bring a copy home to play with. I'll go back to work wed. so I'll try your setup a post my results and a screen shot then.
Thanks again and later...Todd
 
In case you were wondering...

Ron. In case you were wordering what I'm trying to do , check out my earlier thread "Analog trim with SLC500"

Thanks again Todd
 
to unregistered guest:



Is it correct that the loop should be placed in manual for PID settings to take effect with these controllers ?




no ... I think what you're referring to is this:



suppose that our Kc setting is at 1.00 ... suppose that the PV is simmering along at a certain value ... suppose that we want to try a new value of 1.50 to see if the PV will begin to oscillate ... we increase Kc to 1.50 and watch the PV ... nothing exciting happens ... we increase Kc to 2.50 and watch the PV ... nothing exciting happens ... we increase Kc to 5.00 and watch the PV ... nothing exciting happens ...



now suppose that we "bump" the system by placing it into manual mode just for a second ... then back to automatic ... WOW! ... all of a sudden the PV is oscillating like a striped ape ... so now we go back to our first "increased" setting of 1.50 ... and after a "bump" to get it started, sure enough this time we get some (unexpected) amount of oscillations ...



think of it this way ... for MOST systems (but not for all) the effect is something like winding a grandfather clock ... suppose that the clock has wound all the way down and so the pendulum has completely stopped ... we wind the spring tighter - and tighter - and tighter ... still no swing from the pendulum ... but ... if we reach out and manually start the pendulum to swinging, NOW we get a continuous swing ...



breaking this down ... in the PID controller, the change to the Kc setting DOES take effect as soon as you enter it ... but ... if the amount of error (deviation from target) that the PID sees is quite small, then the reaction of the PID will be so small that you won’t notice the effect ... “bumping” the system generates a significant error ... now the PID has something significant to work with ... and its response will (usually) be large enough to catch our attention ...

so could this be the PID "bump" that you're thinking about? ...


finally ... why don’t you register? ... the price is right ... the advantages are significant ... we’d love to have you join us ...
 
No , nothing to do with wind-up , It all comes back to Logix 500 about 1999 , when if I recall( and I will dig out an old version to check) there were conficting "help" files . If you used the instruction help tab , you got conflicting info with the help tab from the PID block setup tab . The RG bit was one of the things , and the necessity to place the loop into manual to accept new terms (strange I know) was another - somewhere I have a PDF screen shot of this info and will try to dig it out and send to you .
 
somewhere I have a PDF screen shot of this info and will try to dig it out and send to you .

I'd appreciate that ... or maybe the publication numbers and dates? ... I'm totally tied up for the next couple of weeks ... I'll try to dig into this subject as soon after that as possible ... thanks for bringing it up ...
 
Todd, if you're trying to control the loop height between two drives using PID, I have a suggestion that works very well for me here. Figure out the range of the ratio between the drives under all normal operating conditions. If it's a changing diameter application, figure out the minimum and maximum range of the ratio between the two drives. Add a small margin to the upper and lower limits of your calculations. Use the PID to "find" this ratio. Clamp it between your limits and multiply it by the speed of the first drive, then send that value as the speed reference to the second drive. This way, the two drives are somewhat "geared" together. When the loop is full, you probably inhibit the first drive, so you may need a rung of logic to allow the second one to run even though there's no speed reference going to the first one. Also, inhibit the PID and put it in manual when the line is stopped. That will prevent the PID from adjusting when it cannot affect the PV. This method requires that both drive speeds are PLC controlled. It is especially useful for lines that stop and start frequently. An example with changing diameter:
 
Another thing about this example, it was taken from a running machine, but I stripped away all but one of the ladder files for a single winder. Also, the method used will only work if your master drive is following a speed signal from (or feeding back a speed signal to) the plc. Basically, if you have a fairly accurate speed reference to/from the master drive, it will work pretty well. On my machine, the dancer (loop) position can go from 0 to 13 inches. With PID directly controlling the winder reference, the dancer would hunt a little, and would nearly top out and bottom out during starts and stops. With the logic as it is now, the loop height stays at 4-6 inches even during starts and stops. The example is from a PLC5. If you're using a SLC, note that the gain values will be very different.
 
Good stuff Okie!!!

Hey Okie... This is good stuff here.I haven't had time to digest it all yet, but I did see something I hadn't thought of. Lad 14 Rung 14 {the calibration of the dancer}. Thats what I love about this site, You can get great ideas and help and it don't cost nothing but time and an internet connection.

Later....Todd


P.S. I got to go to work tommorow so I should be providing a screen shot and some more info depending on the work load.
 
Thanks... I'm proud of that little bit of logic. We use a rotary transducer that's a pain in the butt to align to get a predictable voltage because of the mounting. Now, the techs just have to make sure the zero crossing point is within 90 degrees of where it should be, toggle a bit in the PLC, and physically move the lever through it's range of motion. The PLC then "learns" the range and rescales it to get the values that the PID is looking for. Someday, I'll add a screen to the PView550 to toggle the bits from so they won't even have to go online when a sensor is installed or re-adjusted.
 
OK folks heres my code....

Hi Folks... Heres my code I have done so far. Please remember right now I'm just experimenting, so this is in no way a "done deal"
Screenshot001.jpg

The next screenshot shows that my senix is indeed giving me a proper analog input.

Screenshot002.jpg


I am also including a zip file of the .rss file {or at least I think I am}
All right... Heres what I'm trying to do...We have 2 nappers {Thats the machine that puts the fuzzy side on a sweat shirt} that are side by side. We run these machines in tandem as 1 machine{in other words...You can start and stop both machines from either machine.} inbetween the 2 machines mounted from the ceiling we have the senix ultra sonic sensor,which is controling the loop between both machines. This is the part I'm working on. Right now we have 2 analog inputs going to the slave machine and we are letting the inverter handle the analog magic {Toshiba S9 inverter and we are using the VIA and VIB inputs, I would like to change them to Allen Bradley Power Flex and use an RIO module to control them 'cause it's way cooler}Anyway thats about it in a nut shell. Any help and all ideas would be much appreciated.
Thanks and later....Todd
 
Last edited:

Similar Topics

Been working with PLCs for a couple of decades, but almost 100% DirectLogic. Have a customer who wanted me to make a couple of simple changes to a...
Replies
3
Views
1,099
New to the EcoStruxure programming software (I'm an AutomationDirect guy) and I've been banging my head against the wall trying to figure out how...
Replies
2
Views
991
I haven't had to tune a PID loop in a very long time. It's actually a PI loop for a pulse width modulation s.v. What was the name of that tuning...
Replies
16
Views
4,072
So I have a PID loop on an 1756-L61 running V17 software just for background. Also the PID PV is a pressure transmitter and the CV is speed sent...
Replies
1
Views
863
Hi All I'm using Cohen-Coon method to calculate initial PID parameters. So, I have Model Gain that has been calculated from live data. Could...
Replies
55
Views
30,975
Back
Top Bottom