PID Help Please !!! Posting Again

ammarmansoor

Member
Join Date
Oct 2008
Location
Houston
Posts
14
Guys,

Last week i started working with PID loop in RSLogix 5000. I am using Compact Logix PLC and trying to figure out a problem since last week. You can imagine how frustrated I am at this point. Here is what i am working on :

I have a PVC pipe 2 inches wide and atleast 15 feet tall. On top of the pipe I have a Pepper + Fuchs Ultra sonic sensor that outputs a value betweem 4-20mA. In the pipe I have a 2 inches tall and 2 inches wide woodblock. Below the pipe I have a valve that is connected to a positioner which accepts a signal 4-20mA. Valve is basically connected to an airtank. Now the task is to open and close the valve using PID so that it can allow enough air to flow in the pipe and my target can float in the pipe at my setpoint. My sensor is connected to Analog I/O card and is scaled i think from 6270 - 32760 ( May be little off since I am at home and dont remember it on top of my head). I have created a PID and configured it under Periodic task. I have set The time for both Periodic and Loop Update to 250msec. The positioner is also connected to the same Analog I/O card.

Here is the problem. I turn my plc into Run mode and try tuning it. I start with very low proportional and add Integral as I go. The wood block would oscillate and when it reaches the setpoint (within my deadband) , my control variable still keeps on changing. Theoratically , once my target reaches it setpoint, the valve should stay at one place and should not open or close more. I have no idea what am i doing wrong ? One thing that I might mention, i don't know if it makes any difference or not but in my PID setting, I have scaled the input from sensor as (min 6270 - 32760) and used the same for Engineering Units. Do you think that can be an issue. My output is also scaled from (6270 -3276) because it is using the same Analog I/O card as the sensor and the size is 32bits. adjusting the valve manually , i can stabalize the woodblock any where i want in the PVC pipe but with PID it is just not working out. I started with no output BIAS and added little to see what happens. It didn't help me because the higher the number I entered the more unstable the loop became. Any idea what am i doing wrong ? I increased the deadband but still my output keeps on changing even my I am within the deadband.

I checked my sensor and there is no problem in its output. I am also posting my project file and screenshots.

Any help will be appreciated.

1.JPG 2.JPG 3.JPG code.JPG
 

Attachments

  • Rslogix_ACD_File_PID.zip
    94.8 KB · Views: 12
The scaling shouldn't be an issue as long as you have correctly scaled the Analog Channels the same.

You said you were adding integral, but the screen shots show derivative. You likely don't need any derivative for this application. And likely, you don't need any output bias either.

Also, Set your Equation to Independent, not Dependent...Easier to tune. And lastly, why are you using ERROR instead of PV for the Derivative?
 
Last edited:
I just changed the derivative while I was doing screenshots. I tried independent, dependent as well as used Derivative of SP and Error. The problem is not getting resolved. The loop gets tuned fine with either but when the wood block reaches its setpoint, CV keeps on changing. Sometimes it remains stable for 10 seconds or so and then all of a sudden CV starts changing. Any idea why is the CV changing even when the block is within the deadband. I tried a dead band upto 1000 but still no improvement.
 
Are you sure your input PV is stable, even at setpoint?

If you have the ability, you might trend PV, CV, and Error.
 

Similar Topics

Hello, Please see attached pictures and tell me why does the output change can you please pin point my mistake i have been searching the net for...
Replies
2
Views
1,937
So were commissioning all the PID loops I had programmed to work with the new wonderware HMI system that was installed. Got all but 1 tuned pretty...
Replies
3
Views
2,356
I have a few questions about a PID control I have to make changes too. Here's the low down; The PID control is used to control temperature of our...
Replies
33
Views
13,679
Hi there, I am trying to get a PID function to work. I have made an excact copy of the example program in the manual, but i doent get eny output...
Replies
12
Views
5,379
Hello, I have a problem with tuning my PID loop in my RS5000 project. In my program I am using a PID loop to control the KW output of an engine...
Replies
11
Views
4,309
Back
Top Bottom