You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old April 22nd, 2005, 11:45 AM   #1
Ron Beaufort
Lifetime Supporting Member
United States

Ron Beaufort is offline
 
Ron Beaufort's Avatar
 
Join Date: Jul 2002
Location: Charleston, SC
Posts: 5,375
Proportional-only control – why won’t it work right?

Greetings to all,



several weeks ago I started another thread about the Proportional component of PID control and used a gas-fired oven as a example ... Ayman Metwally posted this reply and said that he fully understood how the oven would not be able to reach the desired setpoint using only Proportional action for its controller ... but then he asked a perfectly valid (and very common) question about why other types of systems (level, flow, pressure, etc.) might not be able to reach the desired setpoint when using Proportional-only control ...



paraphrasing slightly, he asked:



Quote:
I understand that the oven system achieves a steady state condition, but what would keep other PVs from just climbing until they reached the setpoint using Proportional only? Can you give me another example?


personally, I can remember having exactly the same questions when I first started learning about PID control ... I had already accepted the textbook’s “rule” which says that Proportional-only control cannot maintain a desired setpoint ... but still, in the back of my mind, was always the nagging question: “but WHY won’t it work?” ... it seemed quite simple ... the controller sees a small error ... it makes a small correction ... the process moves closer to the target and gives an even smaller error ... the controller gives a smaller correction ... and so on ... eventually we SHOULD be right on target and the Proportional-only controller SHOULD be able to maintain the setpoint ... but it doesn’t work that way ... or does it? ... as most experienced technicians know, there ARE some exceptions to the “rule” ...



the fact is that SOME systems CAN reach the setpoint using only Proportional action ... but only under certain conditions ... my own personal word for this type of situation is a “sealed system” ... the basic idea is that if there is NO LOSS from the system, then Proportional action alone might be enough to reach the setpoint ... let’s use an example ...








Figure 1 shows manual control (not automatic control) being used to control what I would call a “sealed system” ... a compressor keeps the pressure inside a reservoir (C) at a constant value of 100 psi ... we want to control the pressure in tank (T) ... suppose that we close the outlet valve completely so that there is NO WAY for any air to leave the tank ... then we crack the inlet valve open just a tiny amount ... in our example, we’re using a valve setting of 1% ... but ANY amount of opening would give the same final results ... specifically, the pressure in tank (T) will eventually rise to the full supplied pressure of 100 psi ... as I said, if we wait long enough the final resulting pressure will always be the same ... the only difference would be that smaller valve openings would take longer to reach the full pressure ... and larger valve openings would reach the full pressure quicker ... but the final pressure would ALWAYS eventually be the same ... notice that there is no time scale on the graph ... since we aren’t told how large the tank is, or how much air will transfer through our 1% open inlet valve, then there is no way for us to predict just how long it will take tank (T) to reach the full supplied pressure ... maybe minutes ... maybe hours ... maybe years ... but EVENTUALLY the pressure in tank (T) WILL reach the full pressure of the compressor reservoir (C) ...



now let’s look at the graph in Figure 1 ... notice that when the graph starts, the inlet valve is fully closed ... the pressure in tank (T) is zero psi ... shortly into the graphing period, the inlet valve is cracked open 1% as shown by the red trace ... the pressure in the tank starts to rise rapidly at first ... but then it begins to rise less rapidly as the test continues ... until finally it is rising VERY slowly as the pressure makes its final approach to the full supplied value ...



the basic shape of this curve should be familiar to everyone who has ever studied electronics ... it’s basically the same curve followed by a capacitor being charged through a resistor ... the main idea is that as the pressure in tank (T) rises, the higher pressure opposes a further rise in pressure ... said another way, when the pressure in tank (T) is very low (at the beginning), then it’s very easy for more air to flow into the tank and quickly raise the pressure ... but ... when the pressure in tank (T) is very high (at the end), then it’s much harder for more air to flow into the tank ... and so the pressure rises much more slowly ...



the most important thing to notice is that regardless of how small a setting we use for our inlet valve, if we leave it cracked open long enough (even if just a pinhole), then the pressure in tank (T) will EVENTUALLY rise all the way up to the full supplied pressure ... just as long as there is NO leakage from the tank ...
__________________

2-B ?
Best regards, ----+----] [----+------------( )----
Ron | |
PLC Training Boot Camp | 2-B |
+----]/[----+

I once was lost, but now am found, was blind, but now I see.

  Reply With Quote
Old April 22nd, 2005, 11:49 AM   #2
Ron Beaufort
Lifetime Supporting Member
United States

Ron Beaufort is offline
 
Ron Beaufort's Avatar
 
Join Date: Jul 2002
Location: Charleston, SC
Posts: 5,375
Figure 2 shows a Proportional-only controller (indicated by the diamond) being used to control a “sealed system” ... here the pressure reading from sensor (T) is being fed back to the controller ... in an Allen-Bradley system, this feedback signal is called the “Process Variable” and is abbreviated “PV” ...








in this example, the setting of the inlet valve could range anywhere from 0% to 100% of fully open ... we’ve given the controller a desired target value of 60% of full pressure ... in an Allen-Bradley system, we call the target value the “setpoint” and abbreviate it as “SP” ... as the test begins, we’ve got our controller turned completely off by setting our Proportional action for a gain of 0.00 ... this means that the inlet valve is now closed completely ... so the pressure in tank (T) is at 0 psi as we start the test ... then shortly into the test, we set our Proportional action for a gain of 1.00 ... the controller sees an error (abbreviated E) of 60% (E = SP – PV) ... it multiplies the error by the Proportional setting (1.00) and calculates an output of 60% ... in an Allen-Bradley system, the controller’s output is called the “Control Variable” and is abbreviated as “CV” ... this causes the red trace to instantly jump from 0 up to 60% ...



and just like in our first example, the curve shows that the pressure in the tank starts to rise rapidly at first ... but then it begins to rise less rapidly as the test continues ... until finally it is rising VERY slowly as the pressure makes its final approach to the setpoint ...



and notice that as the pressure gets closer and closer to the setpoint, the controller keeps steadily decreasing the amount of opening for the inlet valve ... this action was covered in my original “What is P?” thread so we won’t go into all of the details again here ... but be sure to notice that just as soon as the pressure reaches the target, then the controller finally closes the inlet valve completely ...



and now we’ve come to a major point of Ayman’s question ... and the point is that SOME systems WILL be able to reach the setpoint using only Proportional action ... this is one example which seems to defy the textbook’s “rule” that a Proportional-only controller cannot reach or maintain a setpoint ...



just be sure to keep in mind that as long as the inlet valve is opened even a tiny pinhole of a crack, then air will continue to flow from the higher pressure of the reservoir (C) into the lower pressure of tank (T) ... and eventually the pressure WILL reach the setpoint ... AS LONG AS (and here’s the tricky part) as long as THERE IS NO LEAKAGE FROM THE TANK ... and in this example, the outlet valve is being kept completely closed ...



the big question now becomes: “how realistic is this example?” ... and the sad answer is: “it’s not very realistic at all for processes in the real world” ... in other words, pressure controllers aren’t often used on simple “sealed” tanks ... specifically, there’s usually something flowing out of the tank whose pressure we’re trying to control ...
__________________

2-B ?
Best regards, ----+----] [----+------------( )----
Ron | |
PLC Training Boot Camp | 2-B |
+----]/[----+

I once was lost, but now am found, was blind, but now I see.

  Reply With Quote
Old April 22nd, 2005, 11:51 AM   #3
Ron Beaufort
Lifetime Supporting Member
United States

Ron Beaufort is offline
 
Ron Beaufort's Avatar
 
Join Date: Jul 2002
Location: Charleston, SC
Posts: 5,375
Figure 3 shows a more realistic application for a pressure controller ... here the outlet valve has been opened for a setting of 2% ... and now we see one of the major drawbacks to a controller which uses only Proportional action ...








notice that in this example, the pressure never gets quite all the way up to the setpoint ... instead it settles out at some slightly lower pressure and then continues along that path ... this is the same type of “steady state” situation that we had with the oven example in my earlier thread ...



we could go through the math involved here if we wanted to ... but some simple common sense should be enough to convince us of what’s going on at the end of this “steady state” test ... suppose that we could somehow (magically?) just nudge the pressure up a little bit more and have it reach the target value of 60 psi ... in that case, the error (the deviation from the target) would become zero ... and in that case, the controller’s output would also be zero ... and now ... what do you suppose would eventually happen to the pressure in tank (T) if the controller gave us a zero signal and closed the inlet valve completely? ... simple answer: “the pressure would eventually drop back BELOW the setpoint” ... the pressure would have to drop BECAUSE OF THE LOAD (the leakage) through the open outlet valve ...



and so to our friend Ayman, I would say this: the difference between the oven example in my earlier thread – and the pressure tank example in Figure 2 - is that the oven can NEVER become a “sealed system” ... specifically, there will always be SOME amount of heat leakage from the oven system ... heat will ALWAYS be able to leave the oven either through conduction, or through convection, or through radiation ... BUT! ... IF (big IF) we COULD somehow design a PERFECTLY insulated and “sealed” oven system, then (and only then) would a controller using Proportional-only action be able to achieve the desired setpoint ...



hopefully the examples of Figure 2 and Figure 3 will help answer most of your questions with regard to “pressure” as a Process Variable ...
__________________

2-B ?
Best regards, ----+----] [----+------------( )----
Ron | |
PLC Training Boot Camp | 2-B |
+----]/[----+

I once was lost, but now am found, was blind, but now I see.

  Reply With Quote
Old April 22nd, 2005, 11:53 AM   #4
Ron Beaufort
Lifetime Supporting Member
United States

Ron Beaufort is offline
 
Ron Beaufort's Avatar
 
Join Date: Jul 2002
Location: Charleston, SC
Posts: 5,375
now in Figure 4 we’ll begin looking at a “level” control application ... in this first example, we’ll simply take a full tank of water and allow it to drain by opening a valve at the bottom ...








as shown in the graph on the left, the tank begins draining rather rapidly at first ... but then the rate of drain becomes slower as the test proceeds ... so instead of getting a straight line (a constant rate) for our draining process, we get a curve with a characteristic shape ... now at first glance, a beginner might think that the shape of this “gravity draining” curve is exactly like the shape of a capacitor discharge curve ... or like a curve produced by a cooling application ... but the draining curve is not exactly the same shape ... notice the difference as shown in the detailed graph on the right ... the draining curve is not as “rounded” in appearance as the cooling curve ... the reason is that the effect of gravity plays a part in the shape of this curve ... specifically, the amount of water draining when the tank is full is much greater than the amount draining when the tank is nearly empty ... notice the stream of water (1) which results when the level is higher at point (H) ... this stream is much larger than the stream of water (2) when the tank level is lower at point (L) ... anyone who wants to do some research on this effect should start by looking up Torricelli’s Theorem in any decent physics textbook ... for our purposes today, we can simply agree on what basic common sense and life’s experiences tell us is true ... specifically, a tank which is nearly full will drain much faster than a tank which is almost empty ...
__________________

2-B ?
Best regards, ----+----] [----+------------( )----
Ron | |
PLC Training Boot Camp | 2-B |
+----]/[----+

I once was lost, but now am found, was blind, but now I see.

  Reply With Quote
Old April 22nd, 2005, 11:55 AM   #5
Ron Beaufort
Lifetime Supporting Member
United States

Ron Beaufort is offline
 
Ron Beaufort's Avatar
 
Join Date: Jul 2002
Location: Charleston, SC
Posts: 5,375
in Figure 5 we’ve closed the drain valve completely ... and we’ve manually opened the fill valve just 1% ... since we have SOME water coming in but NO water going out, naturally the level in the tank begins to rise ... and the resulting shape of the trace is different from anything that I’ve shown before ... this one is a straight line








... now keep in mind that the tank we’re using for our example is a straight-sided vessel and that we’re maintaining a constant rate of fill ... but under these conditions, basic common sense and life’s experiences are enough to convince us that, sooner or later, the tank will become full and then overflow ...



the main idea to come away with from this example is that the current level of the tank does NOT affect how fast the level continues to rise ... and so the characteristics of the “level control” system are different from those of our “pressure tank” example ... in the “pressure” example, the current amount of pressure in the tank DID indeed affect how fast the pressure could continue to rise ... and in our original “oven” example, the current temperature of the oven DID indeed affect how fast the temperature of the oven could continue to increase ... (remember that the DIFFERENCE between the oven and the surrounding air came into play in that example) ...



and so at this point we’ve looked at a few different types of processes and seen quite different responses from each one of them ... no wonder our friend Ayman admits to being a little bit confused ... I can assure you that he is not the only student that I’ve ever met who finds all of this somewhat perplexing ... the basic idea is that different types of processes have different characteristics ... and when it comes to automatically controlling them, “one-size-fits-all” does NOT apply ...
__________________

2-B ?
Best regards, ----+----] [----+------------( )----
Ron | |
PLC Training Boot Camp | 2-B |
+----]/[----+

I once was lost, but now am found, was blind, but now I see.

  Reply With Quote
Old April 22nd, 2005, 11:59 AM   #6
Ron Beaufort
Lifetime Supporting Member
United States

Ron Beaufort is offline
 
Ron Beaufort's Avatar
 
Join Date: Jul 2002
Location: Charleston, SC
Posts: 5,375
in Figure 6 we have another type of “sealed system” ... again our controller is using only Proportional action ... and our Proportional gain has once again been given a setting of 1.00 ... and for consistency, our setpoint is once again dialed in at 60% (or 150 gallons) ...








and once again, we seem to be violating the popular textbook “rule” that says that “Proportional-only control will not maintain a setpoint” ... but by now you should be getting used to the trick involved in violating that particular “rule” ... specifically, we’re “cheating” just a little bit by keeping the drain valve closed ... under these special “sealed system” conditions, ANY amount of water entering the tank will raise the level ... and since the Proportional-only controller will not completely close off the fill valve until the setpoint is finally reached, then SOME amount of water will continue to flow into the tank until we’ve finally reached the target ... it might take a VERY long time, but eventually the target will be reached ... and the error will become zero ... and then the controller will finally completely close the inlet valve ...



but once again, this “sealed system” isn’t going to prove very useful in the real world ... someday somebody is going to open that drain valve ... we’ll cover that situation in the next post ... but first ...



warning! ... trick question coming up ... this next part has little if anything to do with the topic at hand but I find it mildly entertaining ... and maybe we can learn something useful from it ... and so a side-trip just for fun ...



suppose that we temporarily turn off our automatic controller for awhile ... and suppose that we start out with an empty tank ... and suppose that we open the fill valve SOME amount and then leave it at that setting ... and suppose that we also open the drain valve SOME amount and then leave it at that setting ... suppose that we see the level in the tank start to rise ... now ...



since the level is definitely rising, we CAN say with assurance that “the water is coming IN faster than it is going OUT” ... but (and here’s the trick question) can we also say with absolute assurance that the tank will eventually fill all the way up and then overflow? ... at first glance we might think “yes, eventually that will surely happen” ... because (as we said before) “the water is coming IN faster than it is going OUT” ... and so an overflow must be inevitable ...



but the correct answer is “the tank MIGHT NOT overflow – we can’t be sure without more information” ... why? ...



remember that the amount of water draining from the tank under the force of gravity relies on the level (the height in feet and inches) of the water level in the tank ... and so the amount of water draining from the tank will constantly be increasing as the tank continues to fill ... and so, depending on exactly how much water is coming in, and depending on the setting of the drain valve, and depending on the depth of the tank, then there COULD be a point (a specific level) at which the rate of draining would exactly equal the rate of filling ... big idea: the “rate of fill” is a straight line as shown in Figure 5 ... but the “rate of drain” is a curving line as shown in Figure 4 ... and so without further information, we can NOT say with assurance that the tank will eventually overflow ... regardless of the fact that at the start of the test the water is indeed coming in faster than it is going out ...



as I said earlier, this doesn’t really have a lot to do with the subject at hand ... but I thought that I’d bring this discussion up just to show that you have to keep your wits about you when you’re trying to determine the characteristics of any particular system that you’re planning to control ... specifically, one size does NOT fit all ... and your mileage may vary ... and first impressions are not always correct ...
__________________

2-B ?
Best regards, ----+----] [----+------------( )----
Ron | |
PLC Training Boot Camp | 2-B |
+----]/[----+

I once was lost, but now am found, was blind, but now I see.

  Reply With Quote
Old April 22nd, 2005, 12:01 PM   #7
Ron Beaufort
Lifetime Supporting Member
United States

Ron Beaufort is offline
 
Ron Beaufort's Avatar
 
Join Date: Jul 2002
Location: Charleston, SC
Posts: 5,375
in Figure 7 we’ve finally opened the drain valve on our tank ...








so now we no longer have a “sealed system” ... the “load” represented by the water draining away from the tank produces the classic “droop” or position slightly below the setpoint that we normally associate with a Proportional-only controller ... and so instead of the 60% target which we desire, something more along the lines of about 58% is the best that our Proportional-only controller is able to give us ...
__________________

2-B ?
Best regards, ----+----] [----+------------( )----
Ron | |
PLC Training Boot Camp | 2-B |
+----]/[----+

I once was lost, but now am found, was blind, but now I see.

  Reply With Quote
Old April 22nd, 2005, 12:03 PM   #8
Ron Beaufort
Lifetime Supporting Member
United States

Ron Beaufort is offline
 
Ron Beaufort's Avatar
 
Join Date: Jul 2002
Location: Charleston, SC
Posts: 5,375
finally ... in Figure 8 we’ll take just one quick look at a typical flow system ...






and by now you should have the idea that a “sealed system” would allow a Proportional-only controller to actually achieve and then maintain a desired setpoint for our flow application ... but think ... how on earth would we go about designing a “sealed system” for a flow process? ... by definition, a “flow” cannot be “sealed” ... and so when you get right down to it, the more we try to increase the flow ... then the more we increase the turbulence in the system ... and the more we increase the turbulence, then the more we increase the resistance to an increase in flow ... hint: that’s why we need the pump in the first place ... SOMETHING has to overcome the inevitable resistance to the flow ...



I hope that this material helps ... as always, corrections and comments are gratefully appreciated ... I’m just sorry that it took me so long to pull this together ... lately my boss has been becoming a lot better at lining up students for my classes ... and while that’s a good thing financially, it does leave me with a lot less free time to hang around on Phil’s excellent forum ...
__________________

2-B ?
Best regards, ----+----] [----+------------( )----
Ron | |
PLC Training Boot Camp | 2-B |
+----]/[----+

I once was lost, but now am found, was blind, but now I see.

  Reply With Quote
Old April 22nd, 2005, 12:14 PM   #9
ndzied1
Lifetime Supporting Member
United States

ndzied1 is offline
 
ndzied1's Avatar
 
Join Date: Aug 2002
Location: Chicago, Illinois
Posts: 2,335
Thumbs up

Give that man a Pabst Blue Ribbon I wish I had that kind of time Ron. Your efforts are greately appreciated.!!
__________________
nOrM
======================
nOrM=Norman Dziedzic Jr.
"I decry the current tendency to seek patents on algorithms. There are better ways to earn a living than to prevent other people from making use of one's contributions to computer science." Donald Knuth
  Reply With Quote
Old April 22nd, 2005, 12:14 PM   #10
randylud
Member
United States

randylud is offline
 
randylud's Avatar
 
Join Date: Oct 2002
Location: Greensboro,NC
Posts: 933
Great job, Ron! I am impressed!
__________________
Thunder is good, thunder is impressive; but it is lightning that does the work!
Mark Twain-8/28/1908
  Reply With Quote
Old April 22nd, 2005, 01:51 PM   #11
504bloke
Lifetime Supporting Member
England

504bloke is offline
 
504bloke's Avatar
 
Join Date: Jan 2005
Location: West Ssx
Posts: 2,651
Ron

Great work
__________________
Regards

Dave



"When you are courting a nice girl an hour seems like a second. When you sit on a red-hot cinder a second seems like an hour. That's relativity."
Albert Einstein (1879-1955)
  Reply With Quote
Old April 22nd, 2005, 01:58 PM   #12
marksji
Member
United States

marksji is offline
 
Join Date: Jun 2004
Location: Lubbock, Texas
Posts: 642
Well done Ron!


I'd like to add one thing though. In the real world there are times when proportinal only control does work. Any time you have cascaded control loops it is possible that a proportional only loop can be the best fit for one of the loops, ie:

P Loop -> PID Loop

It doesn't tend to work as well if you try to invert it, but I won't say that it will never work, ie:

PID Loop -> P Loop
  Reply With Quote
Old April 22nd, 2005, 09:24 PM   #13
Peter Nachtwey
Member
United States

Peter Nachtwey is offline
 
Peter Nachtwey's Avatar
 
Join Date: Apr 2002
Location: Vancouver, WA, US
Posts: 6,618
That isn't proportional only.

Quote:
Originally Posted by marksji
Well done Ron!
I'd like to add one thing though. In the real world there are times when proportinal only control does work. Any time you have cascaded control loops it is possible that a proportional only loop can be the best fit for one of the loops, ie:

P Loop -> PID Loop
I see an integrator in your control system.

I would prefer to change the term 'sealed' to 'lossless' or 'integrating'. Integrating? WHAT IS THAT? Yes, Ron the text books are right. A system with just a proportional gain will not reach the set point. Those sealed systems are lossless and are therefore perfect integrators. Yes, the integrator can be part of the physical system.

I like to think in terms of position and velocity control. It should be obvious that a proportional term only will not allow one to control the actual velocity at the target velocity because losses will cause the system to slow down till the kenetic energy reaches zero.

A position system will the target position if there is no friction ( losses ). This is because the change in position is cause equal to the integration of velocity.

The control nerds call these systems type 0 and type 1 systems. A type 0 system has no integrator ( velocity control ). A type 1 system has one integrator (position control). An example of a type 2 system is an inertial guidance system. Here an accelerometer is integrated once to provide speed and integrated again to provide position. The fact that this system integrates twice makes it a type two system.

In short, the text book is correct because the integrator can be part of the process or system itself.
  Reply With Quote
Old April 25th, 2005, 04:18 AM   #14
ayman metwally
Lifetime Supporting Member
Egypt

ayman metwally is offline
 
Join Date: Dec 2003
Location: Cairo
Posts: 258
I didn't \log in to the forum during the last 4 days.

What can I say?

Thanks Mr Ron for giving the time and effort (and data) to help us understanding these concepts.

I saved the page and I am going to read it today.

Ayman Metwally
__________________
Ayman Metwally
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Dcs, Scada hasnoclue LIVE PLC Questions And Answers 15 April 11th, 2005 06:12 AM
PID - Simple Velocity Control Peter Nachtwey LIVE PLC Questions And Answers 15 July 9th, 2004 04:39 PM
Proportional valve driver control with PID lanman LIVE PLC Questions And Answers 6 February 25th, 2004 10:05 PM
how often should I trigger the PID? Ron Beaufort LIVE PLC Questions And Answers 11 February 22nd, 2003 10:57 AM
grounding power sources drewcrew6 LIVE PLC Questions And Answers 18 December 12th, 2002 05:16 PM


All times are GMT -5. The time now is 02:27 PM.


.