PID Pressure control

Join Date
Jan 2006
Location
Perth
Posts
9
Hi

I'm using a PID loop to control gas pressure. I understand that the setpoint is the value that is required (1000Kpa in my case). The process variable is the value that is being measured by the pressure sensor that I have. However what I dont unederstand is how do I use the control output? I need to reduce or increse the pressure of the system using 2 PWMs (1 for increasing and 1 for decreasing pressure). How do i specifically use the control output to do this? Is it as simple as saying if output < 1000 then open PWM 1 and if its > 1000 then open PWM2??

Thanks so much in advance
SAMEER
 
Hi,
What kind of PLC U r using or PID Moudule
If PLC the A bit is assigned SP>PV and SP<PV using these two bits you can Trigger the PWM's
If its ia a PID Module the try out with Deadband
1. +ve side Deadband ====== > Decrasing PWM
2. -ve side DeadBand ====== > Increasing PWM

Regards,
Sandymax
 
I am using a DL06 so it has built in PID control.

what do you mean by 'If PLC the A bit is assigned SP>PV and SP<PV using these two bits you can Trigger the PWM's'??

Thanks
 
Pls check the PID output bit pattern if still it doesnot support The Use SUB Block and Calculate the Differance , Put Limit instruction
 
You are missing some critical informtion. What is the manipulated variable? In other words, are you manipulating a valve to control pressure, or changing the speed of a compressor, or what?

Is this simply cycling a compressor on and off to maintain 1,000 kPa (145 psig) in a reservoir? In that case you may not need PID control at all, but instead a simple deadband control (like a home thermostat) could suffice.

Most PID loops have an analog output. PWM (Pulse Width Modulated) is most often applied with something like heating, where you are turning a heater on and off at varying frequencies or durations depending on the energy required to maintain setpoint. It is uncommon to use PWM output for a pressure control system.
 
I agree with Tom, more system info is required. If two different outputs are indeed needed, it sounds like a Heating/ Cooling application where the controller must be smart enogh to switch between the two different modes depending on whether you are above or below the setpoint.
 
basic ideas of PWM ...

Greetings SAMEER,



you’ve already gotten some excellent advice about whether or not PWM (Pulse Width Modulation) is the best way to proceed ... and even whether PID is a desirable approach to your problem ...



but based on the way that you phrased your original post, I’m still wondering if maybe a very quick rundown of how PWM works might be a good idea ... even if it’s something that you already know, it might come in handy for someone else in the future ...



keep in mind that I have ZERO experience with using PID on the DL06 PLC ... so I’ll use a handy Allen-Bradley PLC-5 to demonstrate the basic concepts ...



here is a quick screen shot of a very simple program to get us started ...



pwma.JPG




the timer keeps resetting itself each time it gets done ... this action gives us a constantly changing number (located in the timer’s accumulator) which ranges in value from “0” to “100” ... in each of the next four rungs, we compare the value in the accumulator with a constant value ... for this first demonstration, I’ve used four separate outputs ... and this is what we’ll see if we use the Histogram feature to chart the on/off status of the four output bits ...



PWMB.JPG





so the idea is that we can easily “pulse” an output off or on by comparing the value in the timer’s accumulator to various percentages of the “period” or cycle time ...



that’s just the demo ... in actual practice we’d only need something like this:



pwmc.JPG





here we could be using a PID to send a number to the “compare” location N7:75 ... of course we’ll have to scale our PID’s output to accommodate the length of the timer’s period ... working with a period of “100” allows us to keep things in a nice neat “0-to-100%” range ... in many applications, the period would need to be much longer - or much shorter ... it all depends on what we’re trying to control ...



the basic idea is that now we can have our PID decide whether to take “baby steps” or “giant steps” as it turns the discrete/digital output on and off ... in most cases, the further away from the target/setpoint our input signal has drifted, the bigger the width of the “on” pulse will be ...



now whether this approach is appropriate for your particular application or not remains to be seen ... but that’s the basic idea behind using PWM to control a “discrete/digital” output with the “analog” output signal of a PID ...
 
Thanks Ron

What you explained above is exactly what I am trying to achieve. Pulsing the dicrete output on/off for a certain time using the exact timing mehtod that you have described.

However my company wants to use 2 different discrete outputs that I need to pulse. They want to use 1 to increase the pressure if its under 1000Kpa and 1 to decrease the pressure if it gets above 1000Kpa. I am already happily using the method you have described, but that only uses 1 discrete output.

What does the control output describe?? Does it describe a value of pressure or a value of time? If its a value of pressure can it be negative??

My thinking is that if its a value of pressure and its positive, then use what you have described and just puls the input valave. If its negative then use the same timing method, but pulse the output valve. Am I correct to think this??

I am only a work experience student and have no idea why they want to use 2 valves (input and output), but Im guessing its to get the pressure to 1000Kpa faster.

Thanks again
SAMEER
 
Sorry forgot to write this....

I am not actually using a PWM, but just 2 simple valves, 1 to increase the pressure and 1 to decrease the pressure of the air in a resevoir. The valves just need to be pulsed open and close. I used the term PWM without really thinking about what I really meant to say.

Sorry if it caused confusion.
 
Thanks so much for your help

Lancie, just 1 small question. In your less than (A< B) and greater than boxes (A>B), does the values of A represent the process variable?? Im assuming B represent 1000Kpa, but will I have to scale it as the analog input uses discrete values from 0-4095.

Thanks again everyone for your help.
 
Sameer,

You have your choice: scale the process input pressure from (0-4095) to 0-1100 Kpa?, or just find the number in the range of 0 to 4095 that equals 1000 Kpa, and put that in your LES and GRT boxes..
 
Greetings Sameer,

I'm in the middle of a programming project right now and have NO time to go through your problem ... from what I've noticed so far, it looks like Lancie1 is helping to nail things down ...

still it might not hurt (or help either, for that matter) to read this "bipolar" PID technote from the Allen-Bradley Knowledgebase ... I realize that you're not using AB for this project, but the information might give you some useful ideas ...

http://domino.automation.rockwell.com/applications/kb/RAKB.nsf/0/87A288753E8AC96785256BAA005A10E8?OpenDocument

I really wish that I had more time to work on this ... perhaps in a day or so ... but hopefully you will have it all straightened out by then ... please don't forget to come back and give us a final update on the results ...

PS Edit ... if you feel that Lancie1 has you on the right track, feel free to ignore this post ... it might just turn out to be a "wild goose chase" ... I'd do the research myself before posting if I had time ... sorry ...
 
Last edited:
I've never seen a pulsed proportional valve. Is it just two discrete (all on or all off) valves? If that's the case then I understand why you'd want to use PWM.

Using the PID to regulate the PWM instead of what you've got ... Should be easy enough, you could just let the PID control the ON interval of a fixed duration. Say one second. Have a timer that constantly runs from 0 to 1 second and resets. Scale the CV from 0 to 1 second in your PLCs native units, and then use the compare of the timer accumulator to that scaled CV like the examples above. The lower the CV, the less time each second the valve will be on.

Sounds like a cool method, and should be a lot cheaper than analog proportional valves and analog output cards...that is if the valves can handle the duty cycle.

Let us know how it works ... I may have an application for this!
 

Similar Topics

Hi I am a beginner and therefore have problems with M221 PLC programming. I want to program the PLC so that the pressure increases slowly (I...
Replies
7
Views
2,259
Second guessing myself here, need someone to either tell me I'm wrong or confirm that my thinking is correct please. I have an equal-percentage...
Replies
3
Views
2,753
I have a PID loop I would like to produce a mathematical model for. I may not have paid enough attention in the Control Systems lectures a few...
Replies
1
Views
2,125
Good Morning, This may be an easy question for some...but I'll need a little guidance. I have a project where under a particular condition I...
Replies
2
Views
1,610
Hello all, I'm looking for a bit of advice/help with the above problem. I'm looking at a fuel gas line with two valves (different flow ratings)...
Replies
4
Views
4,508
Back
Top Bottom