PID Tuning tool

There are rule based gains, and then I have a selector that allows for optimisation of the gains for PI or PID. Also it can optimise between Overshoot or Minimum ITAE, and whether you want PvT or not.
Some of those rules cannot be justified. I have shown the calculation many times before.
I have derived the FOPDT and SOPDT gains using pole placement and IMC method.
I don't see pole placement.
The IMC method does not generate a derivative time constant for FOPDT systems.

Whereas in reality the SOPDT will be a closer representation and will preform better, and does when tested.
 
Some of those rules cannot be justified. I have shown the calculation many times before.
I have derived the FOPDT and SOPDT gains using pole placement and IMC method.
I don't see pole placement.
The IMC method does not generate a derivative time constant for FOPDT systems.

I went with the most common, although there are more than a few different interpretations. One size fits all does not apply.
For the FOPDT IMC: td = tc*dt/(2tc+dt) and I used a scaled back version of derivative for the conservative tune (for noisey systems)
 
For the FOPDT IMC: td = tc*dt/(2tc+dt) and I used a scaled back version of derivative for the conservative tune (for noisey systems)
Where did you get that?
Where is the derivation?
Look at pages 1 and 2 of this
https://deltamotion.com/peter/Mathcad/FOPDT/Mathcad - FOPDT.pdf
I show how the gains are derived.
The pdf was first generated for my contribution to the controlguru.com website in 2005. There was an article about controlling an heat exchanger.
https://controlguru.com/validating-our-heat-exchanger-fopdt-model/
https://controlguru.com/a-discrete-time-linear-model-of-the-heat-exchanger/




If the feed back is noisy you don't change the gains because that changes the response ( the closed loop pole locations ).
You should
1. clean up the wiring.
2. Sample with a higher resolution analog input.
3. Sample at constant intervals.
 
Where did you get that?
Where is the derivation?
Look at pages 1 and 2 of this
https://deltamotion.com/peter/Mathcad/FOPDT/Mathcad - FOPDT.pdf
I show how the gains are derived.
The pdf was first generated for my contribution to the controlguru.com website in 2005. There was an article about controlling an heat exchanger.
https://controlguru.com/validating-our-heat-exchanger-fopdt-model/
https://controlguru.com/a-discrete-time-linear-model-of-the-heat-exchanger/

If the feed back is noisy you don't change the gains because that changes the response ( the closed loop pole locations ).
You should
1. clean up the wiring.
2. Sample with a higher resolution analog input.
3. Sample at constant intervals.

That's great stuff but it's just PI control.

Its' a fairly common tuning rule, for example:

https://www.semanticscholar.org/pap...65e8e84f1a12dde7bd8359687e5241bfc227/figure/2

https://controlguru.com/pid-with-co-filter-disturbance-rejection-in-the-jacketed-stirred-reactor/
 
Yes, but where is their mathematical proof that it is optimal?
Are they just guessing like Z-N until they find something that works?

There is NO NEED for a PID on a FOPDT system. A FOPDT system has only one open loop pole so only ONE closed loop gain is required to place it. That is the proportional tern. The integrator does not count because it has its own pole so a FOPDT closed loop system has two poles. One from the system itself and one from the integrator.

It is possible to add extra poles but these are usually low pass filters. Adding a Pade approximant to simulated dead time will also add a pole.

Basically, show me the math!

BTW, using the Pade approximation is better than using a Taylor series but it complicates the math and it does add the need for a derivative function.
 
Yes, but where is their mathematical proof that it is optimal?
Are they just guessing like Z-N until they find something that works?

There is NO NEED for a PID on a FOPDT system. A FOPDT system has only one open loop pole so only ONE closed loop gain is required to place it. That is the proportional tern. The integrator does not count because it has its own pole so a FOPDT closed loop system has two poles. One from the system itself and one from the integrator.

It is possible to add extra poles but these are usually low pass filters. Adding a Pade approximant to simulated dead time will also add a pole.

Basically, show me the math!

BTW, using the Pade approximation is better than using a Taylor series but it complicates the math and it does add the need for a derivative function.

Using a first order Pade approximation (-0.5DTs+1)/(0.5DTs+1) and a filter will get you the D term.

Again FOPDT is an approximation, so in reality the system is of a higher order hence the need for a D term.
 
Using a first order Pade approximation (-0.5DTs+1)/(0.5DTs+1) and a filter will get you the D term.

Again FOPDT is an approximation, so in reality the system is of a higher order hence the need for a D term.
Yes! I said that but have an example using a Pade approximation but the resulting formulas are much more complicated than those you have shown so I know none of tuning methods you have shown don't use the Pade approximation you have shown.

I have done the math long ago.
https://deltamotion.com/peter/Mathcad/FOPDT/Mathcad - FOPDT PIDx.pdf
Yes, there is a derivative gain but look how complicated the formulas for the gain are? My formulas are not the same as the ones you have shown. Notice that the derivative time constant is negative but it still works even though the dead time is 10 times the open loop time constant so that a Smith Predictor isn't required if the dead time isn't too much longer than the open loop time constant.

I have done it all before and I show the math whereas other people just copy bogus formulas.
 
The derivation for the IMC PID tuning cited by Destination Unknown can be found in Table 2 of the nearly 40 year old article, Ind. Eng. Chem. Process Des. Dev. 1986, 25, 252-265.
Its derivation is detailed within and can be viewed here:
https://folk.ntnu.no/skoge/publications/1986/Rivera86/Rivera86.pdf

The tuning rules developed back then have subsequently been amended as 'SIMC' rules. (Google Skogestad PID SIMC for more...)
 
The derivation for the IMC PID tuning cited by Destination Unknown can be found in Table 2 of the nearly 40 year old article, Ind. Eng. Chem. Process Des. Dev. 1986, 25, 252-265.
Its derivation is detailed within and can be viewed here:
https://folk.ntnu.no/skoge/publications/1986/Rivera86/Rivera86.pdf

The tuning rules developed back then have subsequently been amended as 'SIMC' rules. (Google Skogestad PID SIMC for more...)
It will take from time to go through this document. However, we agree on rows A and B.
Row C is an underdamped second order system like a hydraulic system which I am very familiar with. I will check that out.
It is taking a while to get familiar with the symbols used in the document because much of it was written long ago.
 
The formulas for the controller gains in #116 look reasonable. However, in step 4 they admittedly fudged things. I spent some time trying to do the math without fudging. The document is right. You don't end up with a PID. I failed to have a good/easy solution without fudging.

The authors made a decision to sacrifice purity for simplicity.
Also, the documents technique is a little different from the method used to generate the formulas for row A and B above. It looks like they inverted the plant transfer function and added a low pass filter. Inverting the plant transfer function results in generating the feed forward gains. The document then adds a low pass filter or the response will have a first order response.


I would like to have a copy of the data used to generate the plot in #116



Our motion controller supports using PIs and PIDs but we also go beyond to improve response. As long as the customer doesn't need to deal with the added complexity but only benefits then all is good.


The response shown in the last plot is not that good. There is way too much over shoot. In my last plot the dead time was 10 times longer than the plant time constant.


OT but somewhat related. I have been working on python code to use .json files in addition to .csv files.


Currently I can import a .csv file with the first line being text to describe the columns of time, output, and PV and then as many rows of numbers of time, output and PV.


I am also working on importing accelerometer data acquired from test systems and then using FFTs and IFFTs to filter the data.


For some reason our software group exports motion data in xml or gzipped xml format. Since I do most of my work in python now I need to covert this data to python dictionaries or .json files.
 
Have discovered the pandas module? Not that it is difficult write code to parse CSVs using Python, but pandas does that and so much more.
I haven't used pandas yet. I can already read .csv files no problem. I need to be able to convert a .xml file to a .csv file exporting only the data I want. There is a routine I use that makes it easy but it converts the whole file I need only the motion data.

What I am really trying to do is make some utilities for extracting the data I want out of our motion controller's .rmcplots ( xml ) and ,rmcplotx ( gzipped xml ) files. There is a bunch of 'junk' in them but I am usually only interested in the motion data for processing using python.
 

Similar Topics

http://www.pas.com/tunewizard I've been using this a lot lately, used to cost $10k but now it is free (hoping you will pay for support or buy...
Replies
15
Views
10,924
Hello, I am attempting to tune a PID loop on a process. The process involves a valve with electronic actuator that has quite a high deadband...
Replies
10
Views
2,069
so i have 4 25gpm wells feeding a 1000gal tank (T-1), with an additional 15gpm from a decant tank for 3hrs every 12hrs. P1 and P2 both controlled...
Replies
154
Views
35,517
Hi everyone, yet another PID problem. I'm hoping I understand enough of the process I'm controlling that my request for help is reasonable. If a...
Replies
113
Views
27,600
I haven't had to tune a PID loop in a very long time. It's actually a PI loop for a pulse width modulation s.v. What was the name of that tuning...
Replies
16
Views
4,072
Back
Top Bottom