Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PonM vs PonE coeffitients #117

Open
djObsidian opened this issue Jan 28, 2022 · 10 comments
Open

PonM vs PonE coeffitients #117

djObsidian opened this issue Jan 28, 2022 · 10 comments

Comments

@djObsidian
Copy link

Are PID coeffitients for PonM and PonE equal? Or they differ?
I'm sure that all pid tuning methods do work for both, but i'm trying to synthesize coeffs. instead of picking them up empirically.
Will this https://www.mathworks.com/help/control/ref/pidtuner-app.html produce valid PID coeffs. for PID with PonM?
If not, how should i calculate coeffs. from system step response?

@rtek1000
Copy link

#77

@rtek1000
Copy link

@rtek1000
Copy link

@rtek1000
Copy link

@djObsidian
Copy link
Author

Thanks, i read all of this. However, knowing how PonM works doesn't helps tuning it. The most common method, Ziegler–Nichols, simply doesn't works here, because no oscillations will occur with Kd=0, Ki=0 and Kp set to anything with PonM. PID autotune also doesn't works with systems with large time constant, like several minutes.

@rtek1000
Copy link

From what I understand, if the instructions for use don't talk about the input declaration of these coefficients, it's because it's enough to activate one mode and deactivate the other.

How to use it in the new PID Library

If you’re ready to try Proportional on Measurement, and you’ve installed the latest version of the PID library, setting it up is pretty easy. The primary way to use PonM is to specify it in the overloaded constructor:

Constructor

If you’d like to switch between PonM and PonE at runtime, the SetTunings function is also overloaded:

SetTunings

You only need to call the overloaded method when you want to switch. Otherwise you can use the regular SetTunings function and it will remember your choice.

Source: http://brettbeauregard.com/blog/2017/06/introducing-proportional-on-measurement/

  • If leaving ki = 0 and kd = 0, the system cannot oscillate:

    • Did you try to increase the kp value?
  • If Autotune can operate with PonE:

    • Would it be possible to tune with PonE on and PonM off, so save these parameters?
    • And use the same parameters with PonM instead of PonE?

I found this explanation:
(https://www.google.com/search?q=how+to+tune+pid+large+dead+time)

So hard and the simple way

In a dead time process, the controller makes a change, then waits, waits, waits until the dead time has passed. Finally the controller finds out how its change effected the process variable. It is like trying to drive a car blindfolded with the passenger telling you what to do. You will need to go very slowly. The first try at getting better control in a dead time process is to reduce the dead time. Simply moving a probe closer to the valve may do it. But sometimes there is nothing you can do to lower dead time. So what can you do?

The advanced controller that is proven to work very well on dead time processes is a Proportional Integral controller with the combination of special stealth tuning parameters. It is important to not use derivative unless there is some lag or first order response in the process. Using derivative on a dead time process would make the control loop unstable.

Stealth tuning

This stealth tuning applies to dead time processes. If the process has a lag, then this tuning still applies if the lag is 1/5 or less than the size of the dead time. The stealth tuning uses the process dead time and the process gain:

controller gain = 0.3/(process gain)
integral time = .42 * (process dead time)

The integral units are in time - either minutes or seconds. These equations give optimal tuning -- minimum error to load upsets. If you want slower response, with more robustness, simply lower the gain some. (Note that these equations apply for usual ideal and series PI algorithms. For the parallel algorithm you've got to divide or multiply the integral time by the controller gain.) Controller algorithms are the subject of another presentation "Differences in PID Algorithms and Units" available from the articles page on ExperTune.com.

Source: https://www.automation.com/en-us/articles/2003-1/how-to-control-a-process-with-long-dead-time

@rtek1000
Copy link

rtek1000 commented Apr 23, 2022

This other website seems to complement some details:

  • Measuring the Dead Time and Time Constant of a Process
  • Dead Time versus Time Constant
    td-versus-tau
  • Controller Modes
  • Applicability of Tuning Rules
  • Controllability
  • Loop Settling Time

Dead Time versus Time Constant

The dynamic response of self-regulating processes can be described reasonably accurately with a simple model consisting of process gain, dead time and lag (time constant). The process gain describes how much the process will respond to a change in controller output, while the dead time and time constant describes how quickly the process will respond.

Although the dead time and time constant both seem to describe the same thing, there are several fundamental differences between how dead time and time constant affects a control loop. The first difference is that dead time describes how long it takes before a process begins to respond to a change in controller output, and the time constant describes how fast the process responds once it has begun moving.

Source: https://blog.opticontrols.com/archives/499

@drf5n
Copy link

drf5n commented Mar 11, 2023

  • If leaving ki = 0 and kd = 0, the system cannot oscillate:
    • Did you try to increase the kp value?

Increasing kp in P_ON_M mode with ki=0 and kd=0 won't oscillate because 1) the proportional term acts on the integral in a retarding/negative sense and 2) Assuming that it reaches setpoint, the amount that P_ON_M Kp contributes to the integral/outputSum is the constant -kp*(Setpoint - InitialPV), and with ki=0, there's nothing to move the outputSum away from there.

With P-only P_ON_M, assuming your process ultimately needs an Output of 42 to maintain a PV at 100 and and you are starting from 25, With P_ON_M mode with Ki=Kd=0, you need to set kP = -.56 because your initial error you need to integrate away is -75, the ultimate output is 50, so kP = -42/75, which is negative, so REVERSE. If you tried DIRECT with any positive kP, it would push Output lower than initial. If you tried REVERSE with lower than 0.56, the process would stop changing (and integrating Kp) before it got to SP. With higher than Kp=0.56, it would keep moving until the measurement was whatever an Output of kP*75 would produce. P-only P_ON_M won't work for tuning. (Try it in this sim: https://wokwi.com/projects/358190033668210689 It takes an output of about 42 to hold Output at 100°C)

For more tuning more difficult systems, one would make a reasonable/smalll manual step adjustment of the output and see the response, rather than let an automatic control mechanism moderate the response.

@br3ttb
Copy link
Owner

br3ttb commented Mar 12, 2023 via email

@djObsidian
Copy link
Author

That's all understandable, the question was something else entirely. Can I tune a classical PID (PonE) using any of the existing methods and then put the same coefficients into a PID with PonM and it will work just as efficiently? Or will it not and the coefficients need to be changed? If the optimal coefficients for PonE and PonM are different, is there a dependency between them?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants