Jump to content

PID Output going opposite of expected as PV nears SP

Recommended Posts

I'm seeing some unexpected output from a PID (Auto-tune) FB on a V1040. The PV is below the Setpoint, control direction is set to "0" (heating) as shown in the Config screenshot yet the output is going negative. This PID in question is using the TC 1 & 2 Avg as the process value (216.0°F) with a setpoint of 220°F yet the PID output is -10.4 with a low/high range of -50 to +50.

The idea here is that an initial PID runs to derive an offset for the setpoint to use on the inlet air to help drive and stabilize the test fixture TCs that are in the oven. I was initially applying this offset directly to the setpoint and using that derived setpoint as the setpoint on the burner fuel PID but I quickly found out the PID FBs do not like constantly changing Setpoints. I'm now applying that as an offset to the inlet air PV for a similar effect but the output of the initial PID is causing this to drive in the wrong direction for some reason. When first starting the heat ramp the output starts off at +50 as expected but then runs down and eventually goes negative once the PV gets close to the SP.

In the tuning screen you'll notice the P band column is specified in °F instead of just the %, it performs some quick math to calculate the % band which can be seen in the operands screenshot. In this case 10°F equates to 0.8% proportional band (-200 to 1100 input range) which is the value used by the PID block. The PID is reporting status value 4 "PID Running" so it's not reporting any problems.

Anyone have any ideas why the output is going opposite the expected value?



Output Negative - Tuning.png

Output Negative - Process.png

Output Negative - Init Ladder.png

Output Negative - Config.png

Output Negative - Operands.png

Link to comment
Share on other sites

  • MVP 2023

You've named everything with a "Heating" prefix and assigned units, so actual functionality of each parameter has been blurred.

Here's the virgin PID config block table:



Notice  Output Range - Control limit - High and Low.  This is a unit-less parameter and is the output of the PID block.  You can use it as an offset or whatever else you wish, but you're fooling yourself assigning degrees F to it because it's not something that's been measured with a sensor.  You've configured a negative value as the low and the Integral portion is winding up trying to slow the loop down and jamming a negative value in because you allow it.

There's a function in the PID Auto-tune collection called "Read Control Components" - I would highly recommend you look at the Help on this block and drop one for each of your loops into your program.  It will give you a lot of insight as to what's going on while the loops are running.

Unitronics PID blocks work great in basic applications but aren't that powerful - they can't do heat/cool for example.  I usually configure my Control limit low to 0 and high to 1000 which represents a loop output of 0 - 100.0 %.

You're definitely doing some juggling with your loops here.  You may be able to come up with a scheme that works, but the question was why is the output going negative.

Joe T.

  • Like 1
Link to comment
Share on other sites

Ahh! So the PID is normalizing the P Band output across the whole output range, not relative to 0. That makes sense since the output is getting to 0 halfway through the configured P band. I was thinking it was a low output limit and a high output limit as I'm familiar with from other PID implementations.

That PID is called heating because it's the PID that derives the heating mode air offset which then helps derive the PV for the gas burner fuel valve; definitely confusing since the goal is also to cool the air inlet though the goal is still to maintain a stable heated temp on the fixture. I'm trying to replicate the same control scheme I've implemented on a LabVIEW/CompactRIO based system but I'm using my own PID implementation on that. I'm also using the read control components but none of the help is awfully specific about how inputs are used and what output units are.

Knowing that, I can easily enough do the math myself for what I'm trying to accomplish. Thanks for pointing out the info to get it to click for me!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...