Help on PID control

1. When the output is 100% I see -2 Volts on monitoring the output channel, the multimeter on the line also sees -2 Volts. As it ramps down to 80% I see -1.8 on monitor as well as the multimeter, eventually close to 0 as the dwell timer ends and cuts the output


2. The card is capable of going from -10 Volts to 10 Volts


I've attached a screenshot of the card's output configuration page

Pardon my dumbness, but in the Scaling section shouldn't the Low Signal -10V have a -100% instead of a -10%?
 
Pardon my dumbness, but in the Scaling section shouldn't the Low Signal -10V have a -100% instead of a -10%?


The original programmer set the PID's CV scaling to be Max 100% at 0.0 and Min 0% at -10 Volts.


I have no idea why and there is no documentation why they did it that way 16 years ago.
 
...
I have no idea why and there is no documentation why they did it that way 16 years ago.

The scaling is a side issue, distracting but not causing any real problem. We could change

  • the PID output CV range from its current [-10:0] to [0:100], and
  • the [Module Properties: Local:2 (1756-IF4FXOF2F 1.004)] engineering range from its current [-10:0] to [0:100],
and keep the current tuning parameters (3.25,0.11,0.01), and the system would behave in exactly the same way.
This loop has been used for over a decade. The problem is the PV never reaches the Set Point of 71, it hovers at 68-69 and cuts off.
I think the answer is yes, but I don't want to assume: during those 16y, has this PID loop ever been able to drive its PV to a SP of 71?

Or is the current problem behavior the same as it has been for the past 16y?
 
I just watched a YouTube video on how proportional valve works and now its starting to make sense!

The PLC wants the valve to open slightly with a maximum of -2 Volts (80% CV), the pump then starts to run and this increases the pressure until the desire tonnage (71 tons) SP is achieved. Then the PID control will slowly close the proportional valve.

But as it stands, with 16 years in service, it seems like the amount that the proportional valve opens at - 2 Volts is inadequate to achieve the desired pressure .

So my feeble rookie brain is telling me to increase the Voltage to the proportional valve and make it open a little bigger (e.g -2.5 Volts or 85% of CV)

Am I heading in the right direction ol great ones?

(1) No.

The PID output CV is the sum of three contributions calculated by the PID algorithm: Proportional contribution (action); Integral contribution; Derivative contribution.

At a controlled (PV = SP) condition, the Proportional contribution is zero, because the Error (PV-SP or SP-PV) is zero, and the Proportional contribution is the Error times the P tuning parameter, i.e. [Proportional contribution] = Error * Pparam = 0.0 * Pparam = 0.0.


(2) Perhaps.

If the Proportional contribution to the PID output CV is 0 when PV reaches SP, then how does the PID drive PV to that SP?

The answer is the Integral contribution to the PID output CV, which contribution is the result of integrating (accumulating) the error over time i.e. over multiple 100Hz updates. Since the I tuning parameter is non-zero, there is no reason for the PID output CV to stop at 80% (-2.0V) if the PID is what is actually controlling the value that is sent to the output card (1756-IF4FXOF2F), because the Integral action will continue to accumulate as long as PV is not equal to SP.

So my conclusion is that, since the PID output CV is stopping at 80%, that the PID is not controlling the value sent to the output card.

That being the case, changing the scaling from the non-PID-driven CV value of 80% to some other signal than 2.0V may get the PV to SP. But it will not be the PID that is doing it.
 
Last edited:
The scaling is a side issue, distracting but not causing any real problem. We could change

  • the PID output CV range from its current [-10:0] to [0:100], and
  • the [Module Properties: Local:2 (1756-IF4FXOF2F 1.004)] engineering range from its current [-10:0] to [0:100],
and keep the current tuning parameters (3.25,0.11,0.01), and the system would behave in exactly the same way.
I think the answer is yes, but I don't want to assume: during those 16y, has this PID loop ever been able to drive its PV to a SP of 71?

Or is the current problem behavior the same as it has been for the past 16y?




Yes! My initial interface with the live code running. I adjusted the P value from 3.00 (original since installed) to 3.25 and the SP of 71 tons was achieved!


I tried to replicate it since and no luck!
 
Yes! ... I tried to replicate it since and no luck!


Okay, that means the answer may actually be no (the PID has never been able to drive PV to SP i.e. drive error to 0. I don't know why that P value change gave that result, but as noted earlier the P contribution is always 0 when PV = SP, so that is not going to solve the problem.

Is the PID configured to use independent gains or dependent gains?
 
The original programmer set the PID's CV scaling to be Max 100% at 0.0 and Min 0% at -10 Volts.


I have no idea why and there is no documentation why they did it that way 16 years ago.

I believe @tdoa was referring to the analog output scaling. One of many red flags in this setup.
 
Pardon my dumbness, but in the Scaling section shouldn't the Low Signal -10V have a -100% instead of a -10%?


Maybe that's how the original developer got the PID to work, because they didn't know about direct vs. reverse control action (.CA) on the PID.
 
One question: Why does the PID loop with the same PID values as above, tell the CV to go to 0 Volts , even though the PV is still trying to get to the SP ( i.e PV is at 68ish and SP is at 71)

Shouldn't the PID keep telling the output card to output a voltage to keep the proportional valve open until the SP is achieve? The PID loop always cut the output to 0 Volts as soon as the PV hits 68. I'm looking through the whole code and the reference to the analog out channel is only by the PID loop.


P.S I've tried setting the SP to 74 and it still hovers at 68 and cut out. I've tried creating a new PID loop, same PID parameter and forcing a 74 SP and the PV still gets to 68 and the PID loop closes the proportional valve by outputing 0 volts.

Is there a way to force the PID loop to keep an output voltage until the SP is achieve?

P.S I actually found the engineer that wrote this code 16 years ago, and will take some time to get up to speed.


Oh and yes, writing 75% to the PID.SO tag does nothing.
 
Last edited:
One question: Why does the PID loop with the same PID values as above, tell the CV to go to 0 Volts , even though the PV is still trying to get to the SP ( i.e PV is at 68ish and SP is at 71)

Shouldn't the PID keep telling the output card to output a voltage to keep the proportional valve open until the SP is achieve? The PID loop always cut the output to 0 Volts as soon as the PV hits 68. I'm looking through the whole code and the reference to the analog out channel is only by the PID loop.


P.S I've tried setting the SP to 74 and it still hovers at 68 and cut out. I've tried creating a new PID loop, same PID parameter and forcing a 74 SP and the PV still gets to 68 and the PID loop closes the proportional valve by outputing 0 volts.

Is there a way to force the PID loop to keep an output voltage until the SP is achieve?

P.S I actually found the engineer that wrote this code 16 years ago, and will take some time to get up to speed.


Oh and yes, writing 75% to the PID.SO tag does nothing.

I'm passively keeping up with this issue, but did the results just change?

Now you are saying the system can't get higher than 68 no matter what?

Also... you can force the output to whatever you want to see if the system can go over your setpoint.

Off the top of my head I don't recall if the P can be too high, so when you are pretty close to the setpoint it stays there. I might spin up a simulation and test it.
 
Shouldn't the PID ...

Here is the thing about programming: the PLC cares not a whit what you want it to do or what you think it should do; it will only and always do exactly what you tell it to do.

The most common, but still fairly rare, exceptions are if it something is broken (e.g. bad memory, faulty compiler, etc.).

In forty years I have had countless experiences where I have asked "Why is it doing that?," but have never seen any behavior outside those two cases above, and occurrences of the latter I can probably count on one hand.
 
Last edited:
One question: Why does the PID loop with the same PID values as above, tell the CV to go to 0 Volts , even though the PV is still trying to get to the SP ( i.e PV is at 68ish and SP is at 71)

Shouldn't the PID keep telling the output card to output a voltage to keep the proportional valve open until the SP is achieve? The PID loop always cut the output to 0 Volts as soon as the PV hits 68. I'm looking through the whole code and the reference to the analog out channel is only by the PID loop.

P.S I've tried setting the SP to 74 and it still hovers at 68 and cut out. I've tried creating a new PID loop, same PID parameter and forcing a 74 SP and the PV still gets to 68 and the PID loop closes the proportional valve by outputing 0 volts.

Is there a way to force the PID loop to keep an output voltage until the SP is achieve?

P.S I actually found the engineer that wrote this code 16 years ago, and will take some time to get up to speed.

Oh and yes, writing 75% to the PID.SO tag does nothing.


Without seeing the program itself and having more data, we really don't know enough to do more than throw WAGs at those queries.

I suggest you post a PDF of the entire program including data declarations/definitions.

Also, it would be helpful to understand more about the process e.g.:

  • the 71 is a pressure (PSI) and that applies to the SP and PV, and
  • the output signal seems to be going to a physical control valve.
But what is the actual process? E.g.

  • Describe the process - what is happening, what do you want to happen?
  • Is the valve opened or closed at 0V (= 100% PID CV)?
  • Is the valve closed or opened at -10V (=1 10% PID CV)?
  • From a steady-state, to increase the PV, should the voltage signal move toward -10V or toward 0V?
  • Is the pump adding to or removing from the fluid in the volume where the pressure is being measured?
  • Is it a liquid or a gas or a vapor?
    • The word "Press" has shown up so perhaps it is air or hydraulic fluid?
  • Is the pump running at a constant speed?
  • Can you provide printouts or screenshots of the Process_Control_Press_PID structure at various conditions, especially the dozen-plus .DATA attributes of that structure?
  • When the valve signal goes to 0V, what are the values of all the Tags in the image in post #25 of this thread?
 
Last edited:
Without seeing the program itself and having more data, we really don't know enough to do more than throw WAGs at those queries.

I suggest you post a PDF of the entire program including data declarations/definitions.

Also, it would be helpful to understand more about the process e.g.:

  • the 71 is a pressure (PSI) and that applies to the SP and PV, and
  • the output signal seems to be going to a physical control valve.
But what is the actual process? E.g.

  • Describe the process - what is happening, what do you want to happen?
  • Is the valve opened or closed at 0V (= 100% PID CV)?
  • Is the valve closed or opened at -10V (=1 10% PID CV)?
  • From a steady-state, to increase the PV, should the voltage signal move toward -10V or toward 0V?
  • Is the pump adding to or removing from the fluid in the volume where the pressure is being measured?
  • Is it a liquid or a gas or a vapor?
    • The word "Press" has shown up so perhaps it is air or hydraulic fluid?
  • Is the pump running at a constant speed?
  • Can you provide printouts or screenshots of the Process_Control_Press_PID structure at various conditions, especially the dozen-plus .DATA attributes of that structure?
  • When the valve signal goes to 0V, what are the values of all the Tags in the image in post #25 of this thread?

Hello! Thank you for the awesome attention, this young buck is certainly learning

1. The process is as follow:

User selects the required tonnage as SP (71), PLC commands the hydraulic fluid pump to turn on, at the same time , the PLC commands the proportional valve to open, the hydraulic fluid will travel to the press increasing the pressure requires to press down on the material. The PLC will detect that the SP (in tonnage) has been achieved and will start a dwell timer , when the timer ends the PLC will stop the process and raise the press so the user can remove the product. As it sits, for the highest SP (71 tons), the PID loops never gets the PV there.


2. The proportional valve is close at 0V (100% CV)


3. The proportional valve is open at -10 Volts (0% CV), although the maximum voltage that I've seen is -2.0 volts (80% CV) when the valve open and the PID slowly closes the valve as PV approaches SP.

4. From a steady-state, to increase the PV, the voltage signal starts at 80% CV ( -2 Volts) and steadily moves toward 0 Volts (100% CV).


5. The pump is adding hot hydraulic fluids into the top of the press, driving it down.

6. It is using hydraulic fluid


7. Hmmm I am not certain what speed the pump run at, the code does not take into account the pump's speed, but I could be wrong, thanx for the tip, will check.

8. I will grab all screen shot!


My test today : created a new PID loop and tune from scratch, I and D at 0 and work with P until is osciilates, then halve P and move onto I.

My end result was a P: 2.5 , I : .05, D :.01

This got my PV to hit 70.5 ton! three times, but on subsequent tries with same parameters it went back to hovering at 68...
 

Similar Topics

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
Allen Bradley PLC 5 What operations wants to do is as the Oil Flow rate (0-3000 m3/d) increases more chemical is injected into the flow line...
Replies
8
Views
2,493
Hi All, I have been asked to modify our contact tank pumping station controls. Currently pump speeds are manually entered (as %) by operators...
Replies
2
Views
2,231
Good Day, I have been programming for a while and a complete newbie in using a PID Control block. Now i am studying 📚 it using PC...
Replies
12
Views
4,582
I'm working on a PID ladder logic program to control a small process trainer as a college project. 2 valves in a split range setup control hot...
Replies
20
Views
5,162
Back
Top Bottom