Help on PID control

I almost always work with analog signals that are 4 to 20mA. I haven't worked with voltage references since the tire factory I left in 2006 and there they were almost always 0 to 10vdc.

I have never seen a valve positioner that wanted a 0 to -10vdc reference. Are we sure that is all right?

Wherever possible, I want my logic to work with the same units of measure I can see on my instruments and maybe they do in your case too. If there is requirement to scale something to or from raw channel digital values, or some other odd scaling I do it in one place per channel and only deal with engineering units elsewhere.

When the PID output is 100% are you seeing -10.0 going into your analog card channel data?

Is the card capable and set up for -10.0vdc?

How does what goes to the data going to the card compare with your multimeter? Does it jump if you disconnect the load?

I have a feeling that your issue has to do with something out of calibration or functioning incorrectly at or above a voltage level.

I notice in your screenshot of the PID that the PV is -2.539 so is the feedback signal also in need of calibration?


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

Capture1.JPG
 
If the PID is able to output a CV that gets the PV stably to the desired value of 71 by using 74 as the SP, then I don't see how it's a scaling or limits issue, at least not scaling or limits of the CV.

Why would changing the SP change how the PID works through the CV scaling or limit configuration?
 
If the PID is able to output a CV that gets the PV stably to the desired value of 71 by using 74 as the SP, then I don't see how it's a scaling or limits issue, at least not scaling or limits of the CV.

Why would changing the SP change how the PID works through the CV scaling or limit configuration?




Yeah it gets my head spinning, I've pour through the code and I do not see any logic that is limiting the CV,


I will check to see the if the valve is functioning as expected (i.e is it opening a 1/4 of the way when it is -2 Volts)


But will test higher Set points than 71 ,



One one test I did, just raising the P parameter from 3.0 to 3.25 , it did hit 71. But just one time! every test process after that it hovers at 68-69. I am beginning to think maybe after 16 years the pump that is responsible for increasing the pressure is just straight failing?


I'll report back with findings.
 
Based on all we have learned so far, it does appear that something is limiting the PID output.

The scaling is weird as hell, but correct. I am curious about the analog input to the positioner. Why are we using a negative voltage reference? Did someone wire it backwards and decided keyboard magic was easier than swapping the wires? Or does the valve really call for that range of signal?

If it were mine, I might consider changing the PID output and card scaling to work with 0 to 100% (described as percent opened) just to take that distraction away, but functionally, it should be no different.
 
I'm perplexed , as the output card is configured to go from 0 V to 10V, but it max at 2 V on the output.
PID CV: 0% to 100%
PID CV engineering: -10 Min. (at 0% CV) to 0 Max. (at 100% CV)
Card engineering: -10 to 0
Card signal: -10V to 0V
So, assuming the PID's output CV engineering value goes directly to the Cards engineering input, and unless I am reading something wrong, the CV engineering value output from the PID should be the output voltage you see on the wires.

But instead you are seeing -2v when the CV is at 100%, which should be 0V :confused:?
 
I would check the scaling on the output card itself. Sometimes it gets limited to a certain percentage of range.

This is another place it can be clamped at the card that would not show up necessarily in any logic or cross reference.

The screenshot of the card configuration shows the scaling and the tree on the left shows that there is a limits page, so look there and see if the High Clamp Limit is set to 2.0

Based on your symptoms, I think what is happening is that you are able to achieve the setpoint once after the system is idle for a period of time because the suction pressure at the pump or some other physical characteristic of the system is less restrictive until it has been running for a time. Later on, exactly the same clamped 2vdc reference to the valve is resulting in a lower pressure because of some slight mechanical difference, not due to anything in the electronics.
 
The screenshot of the card configuration shows the scaling and the tree on the left shows that there is a limits page, so look there and see if the High Clamp Limit is set to 2.0


Wouldn't the CV output of the PID continue to move, i.e. because of Integral action, if the CV is the engineering value input to the output card, but the voltage signal was clamped, which clamping kept the PID PV from reaching the PID SP?

Or can the clamping on the output card somehow transfer "upstream" to the PID?
 
thinking aloud

Wouldn't the CV output of the PID continue to move, i.e. because of Integral action, if the CV is the engineering value input to the output card, but the voltage signal was clamped, which clamping kept the PID PV from reaching the PID SP?

Or can the clamping on the output card somehow transfer "upstream" to the PID?

You're right. The CV should continue to its limit. I don't think the clamp is even applied to the channel data value, only to the output voltage. The wording in the manual is:

Clamping limits the data from an output so that it remains in a range configured by the controller, even when the controller commands an output outside that range. This safety feature sets a high clamp and a low clamp. Clamping alarms can be disabled or latched on a per channel basis.

Once clamps are determined for a module, any data received from the controller that exceeds those clamps sets an appropriate limit alarm and transitions the
output to that limit but not beyond the requested value.

For example, an application may set the high clamp on a module for 8V and the low clamp for -8V. If a controller sends a value corresponding to 9V to the module, the module only applies 8V to its screw terminals.

So the first line implies the clamping is applied to the channel data tag. The last line implies it only affects the voltage at the terminals. You'd think it would be both that are clamped. But still, I don't think that you could pass that upstream to the PID output tag member except perhaps if it were set up as an alias? I'm not even sure if that is possible, I rarely use aliasing either.

I always program these things with separate tags, and have never tied a PID directly to the analog channel data for PV or CV, so I am even more doubtful of my own understanding of this system than I was at the beginning.

When I am greeted with the statement "What do you know, Paul?" My response is always "A little bit less than I did yesterday..."
 
Last edited:
I think this is why I am seeing 2 Volts

This line of code here says to use 80% of the output to PV2(the device the CV from the PID is controlling) then use 100% of the output. Would this explain why I am seeing -2 Volts on the output then the PID slow ramps down to 0 Volts.


As the backward scaling that this thing is doing 0 Volt = 100% , -2 Volts = 80% , -4 Volts = 60 % ...... -10 Volts = 0% ?

Capture2.JPG
 
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?
 
Hello all,

I have an issue with a PID block in RsLogix 5000.

The parameters are

P: 3.25

I: 0.11

D: 0.01

The Set Point is 71 psi

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've tried to increase the P, and it still hovers at 68-69. Lower I and D to 0 and it never goes pass 5 psi.

I am starting to think the valve ( the device the CV is trying to control) is starting to go bad after 16 years in operation.

The Output always maxes at 2 Volts ( 0 - 10 Volts).

Anyone have any suggestion on what I can do?

If this has been running for that long without issue then the loop is unlikely to be the problem. I would check the mechanics of the system and the reliability of the prop valve relative to the signal it is receiving.
 
This line of code here says to use 80% of the output to PV2(the device the CV from the PID is controlling) then use 100% of the output. Would this explain why I am seeing -2 Volts on the output then the PID slow ramps down to 0 Volts.

Only if the leftmost condition (XIC Ram_Tonnage_PID_EN), and at least one of the next two ORed conditions (XIO RAM_Stationary OR XIO Press_Auto_Step.5), at the beginning of that rung evaluate to True. But with that caveat, this looks like a possible cause of the PID output CV having a value of 80%, which fixing the output signal at -2V. You would have to observe this rung using the RSLogix program in Online Mode to see if this is causing the problem.

Whenever those input conditions rung evaluate to True, then the PID instruction is not in Auto mode i.e. the PID algorithm is not controlling the process.

Note that the PID bottom branch on the right puts the PID into Software Manual mode, by assigning a 1 to the Process_Controll_Press_PID structure's boolean attribute .SWM; that is what makes the .SO attribute effect the desired CV of 80% or 100% of range (-2 or 0 "engineering"); cf. here.
 
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.

Not exactly.

That is only the Proportional action, one of the three pieces of PID: P and I and D; Proportional and Integral and Derivative.

If the PID was configured with only Proportional action (P=3.25; I=0.0; D=0.0), then what you suggest would happen.

However, in the first post in this thread we see that I=0.11. So* every time the PID updates (0.01s; 100Hz), if the SP is not equal to PV (i.e. if the Error is not 0), then the Integral action would (should) move the valve a bit and eventually drive the PV to the SP and the Error to 0.

* unless the PID is in SoftWare Manual mode (.SWM is 1); see recent posts.

Am I heading in the right direction ol great ones?

Probably not. If

  • the PID is in Auto mode,
    • so .SWM is 0 and not 1, and
  • the PID output CV is at -2.0 (80% of range), and
  • the output signal is -2V, and
  • the SP is at 71, and
  • the PV is stable at 68,
then summat is amiss. A simple way to test this would be to change the SP from 71 to 70 (or to 72). If the CV does not change immediately by about 3% (0.3V)**, then it is likely that the PID is not in Auto mode.

** I think I have that math right: PV engineering range is 0-105 for 0-100%, so a change of 1 in PV is about 1% in PV reange. 3.25 * 1% would yield about 3% change in CV from Proportional action, which is 0.3V change in the output signal.
 
Last edited:

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,496
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,235
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,588
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,167
Back
Top Bottom