![]() ![]() ![]() ![]() ![]() ![]() |
||
![]() |
||
![]() ![]() ![]() ![]() This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc. |
||
![]() |
![]() |
#31 | |
Member
![]() ![]() Join Date: Jun 2010
Location: Ireland
Posts: 110
|
Adaptive Auto Tuner
Quote:
https://youtu.be/YBUi6PCI06U ...
__________________
same same, but different... Website: https://pidtuningireland.netlify.app Github: https://github.com/Destination2Unknown YouTube: https://www.youtube.com/channel/UCjw...hVY32I2q2JZnBQ |
|
![]() |
![]() |
#32 | |
Member
|
Quote:
I looks like the program is continually updating the model while it is trying to reach the set point and for a while after. Eventually this will not help unless the set point changes again. I can see the code was written in python using tkinter as the interface. I have thought about doing something similar for hydraulic motion controllers but it hasn't been a priority.
__________________
"Living is easy with eyes closed, misunderstanding all you see...." Strawberry Fields Forever, John Lennon |
|
![]() |
![]() |
#33 |
Member
![]() ![]() Join Date: Jun 2020
Location: Somewhere
Posts: 23
|
This looks like a dream. Is there any way to share this application? And is there a possibility to link this application with an OPC-UA server?
|
![]() |
![]() |
#34 |
Member
|
I could but the video is old and I have improved the algorithm since then. The algorithm I am using is Levenberg-Marquardt. This is an excellent algorithm to use if you are using C. However, the program I showed is written in Python and the python implementation is very slow. If you are using python, I would look at the Nelder-Mead algorithm. Everyone discounts the Nelder-Melder algorithm because it is crude but it works well. You can find the Nelder-Mead algorithm in Numerical Recipes in C and other places on the internet. I haven't done any test yet but the Levenberg-Marquard algorithm takes ove 20 minutes on my I7-4770s CPU.
Way back in 2005 when I was contributing to the www.controlguru.com site. I was told to use Levenberg-Marquardt. I think it is a good algorirthm. We use it for tuning our motion controllers now. The Levenberg-Marguardt algorithm in C is so fast that the operator isn't aware of the delay. I think only the python implementation is too slow but it works. If 20 minutes waiting for a solution doesn't bother you then try the Levenberg-Marquardt minimization function in python. When it comes to linear or non-linear systems, nothing bothers me as long as I am told what kind of system I am tuning so I can compensate for any of the odd-ball features of the system. You should know that the valve identification worked best with 10 linear gain segments but I tried many other ways of compensating for the non-linear gain before I settle on the 10 linear segments approach. 20 segments might be better yet.
__________________
"Living is easy with eyes closed, misunderstanding all you see...." Strawberry Fields Forever, John Lennon |
![]() |
![]() |
#35 |
Member
![]() ![]() Join Date: Jun 2020
Location: Somewhere
Posts: 23
|
It is not a matter of time. I just want to pull a good model out of my process without a step response. Are there applications for this?
|
![]() |
![]() |
#36 | |
Member
![]() ![]() Join Date: Jun 2010
Location: Ireland
Posts: 110
|
Quote:
It allows you to tune while the process is under some closed loop control. Here’s an example of an open loop tune from a ramp response. https://youtu.be/v1EZgpl2QF8 ... OpenLoopRamp.png It’s still in development but I’ve posted it on https://github.com/Destination2Unknown Current setup is for Logix PLC’s using pylogix. ...
__________________
same same, but different... Website: https://pidtuningireland.netlify.app Github: https://github.com/Destination2Unknown YouTube: https://www.youtube.com/channel/UCjw...hVY32I2q2JZnBQ |
|
![]() |
![]() |
#37 | ||
Lifetime Supporting Member
|
Quote:
Quote:
__________________
nOrM ====================== nOrM=Norman Dziedzic Jr. I've never been to China but my phone has. |
||
![]() |
![]() |
#38 |
Member
|
I have an older version of my autotuner here
https://deltamotion.com/peter/py/SysID%20SOPDT.zip It has Ron Beaufort's "HotRod" data for an example problem. The code can use 3 methods to minimize the error between the actual and estimated response. Nelder-Mead is the one I use. Powell's method works OK too. BFGS should be the best, but it has problems. It keeps quitting too early due to resolution problems. BFGS seems to work great if given a perfect mathematical model but not with real data. I have spent a lot of time comparing these problems. Nelder-Mead always works. Destination Unknown and I could put those making auto tuners out of business. I think if I trained 10 people, we could tune all the systems in North America remotely. Destination Unknown could find 9 more missing persons, train them, and tune all of the EU. Something similar could be done for Asia. The Nelder-Mead/Downhill Simplex/Amoeba method is not only simple, N-M works when other methods fail. The reason is that the Nelder-Mead method doesn't rely on finding derivatives or slopes. Before the CCP-virus I was working on a method of computing the x, y, x and yaw, pitch and roll of a Six Degree of Freedom platform (6DOF). Each of the 6 cylinders had an analog/resistive feedback but they were noisy. The x, y, z and yaw, pitch and roll would never converge because of the noisy feedback, so I had to use a method that didn't use derivatives or slopes. Now that computing power and algorithms are plentiful, there are no more excuses for running systems in manual or poorly tuned systems. Here is an example where a simple PID will not work Controllers like the HYD02, M02AS and RMC100 will fail on this system. https://deltamotion.com/peter/Videos/NF-FOA.mp4 Some on this forum have had a chance to tune this system as part pf an advanced training class. It was designed to be purposely difficult to tune. The auto tuners presented so far would all fail on this system. PID does not work all the time. Think about how you would control the position of the end of a slinky with dead time.
__________________
"Living is easy with eyes closed, misunderstanding all you see...." Strawberry Fields Forever, John Lennon |
![]() |
![]() |
#39 |
Member
![]() ![]() Join Date: Jun 2020
Location: Somewhere
Posts: 23
|
I have also made an auto FOPDT tuner. I am really happy with it. I tuned 25+ loops with good results.
The challenge is to get the right model. I hope that with destination unknown's tool this will be easier. I first have to collect data from an installation to test this tool. |
![]() |
![]() |
#40 | |
Member
|
yes, but you can only generate a FOPDT model. What if the system really requires a SOPDT model. FOPDT works but SOPDT often works much better.
Quote:
__________________
"Living is easy with eyes closed, misunderstanding all you see...." Strawberry Fields Forever, John Lennon |
|
![]() |
![]() |
#41 |
Member
![]() ![]() Join Date: Jun 2020
Location: Somewhere
Posts: 23
|
I am still looking for a tool that can detect a model on the fly.
What I have found so far is the tool from Control station. The tool is called Loop pro tuner. It seems to be able to do what I want. However, the results are not good enough. Do you have better tools? |
![]() |
![]() |
#42 | |
Member
|
Quote:
https://en.wikipedia.org/wiki/Recurs...squares_filter This works sort of. It will not work if the temperature stays constant. Like all system identification/modeling programs, there needs to be some variation or rate of change in the feed back as a function of a change in the control output to accurately determine the time constants or open loop pole locations. If you run this algorithm while sitting at a constant temperature with a constant output, the model will degrade so it should be disabled when at a steady state. There is no magic. There needs to be an excitation by changing the control output and recording the response. I did not like this algorithm as it works in the z or discrete domain. Since my sample times are relatively fast relative to the system, the open loop poles would be to close to 1 so any noise could move the poles out side of the unity circle which is like moving the poles to the right hand side of the s-plane. NOT GOOD. I can go on but there is no point unless you are familiar with working in the z domain. In motion control I can use the data from the last move and update the model before the next move is made. This will work well if the moves are relatively short. The ratio of accelerating and decelerating time to constant velocity time must be high enough.
__________________
"Living is easy with eyes closed, misunderstanding all you see...." Strawberry Fields Forever, John Lennon |
|
![]() |
![]() |
#43 |
Member
![]() ![]() Join Date: Jul 2022
Location: FrozenHell
Posts: 238
|
Matjuhnl what is your final goal?
Peter shows you the way. But I can’t even imagine how to prevent disturbance influence during identification process |
![]() |
![]() |
#44 |
Member
![]() ![]() Join Date: Jul 2022
Location: FrozenHell
Posts: 238
|
I please to excuse me, I have one stupid question:
Why do all your models include dead time? Do all your systems have transport delay (conveyors, pipelines, etc.)? What is the reason? Peter Nachtwey's "Hotrod.zip" example is approximated pretty well by the following function W(s) = 3,77142857142857/ ((170,2864769*s+1)* (36,0195267*s+1)* (14,57362541*s+1)* (11,51468826*s+1)) destination unknown example (post 36): W(s) = 2,22 / ((91,225*s+1)* (21,3625*s+1)) (If I get data (not image) maybe I can improve the model.) |
![]() |
![]() |
#45 | ||
Member
![]() ![]() Join Date: Jun 2010
Location: Ireland
Posts: 110
|
Quote:
A SOPDT AutoTuner: https://www.youtube.com/watch?v=AegXD9AdtEA Quote:
The FOPDT and SOPDT models are used as an approximation, and in general fit a lot of systems. Also there are a lot of tuning rules that are based on FOPDT and SOPDT models, less so for higher order systems.
__________________
same same, but different... Website: https://pidtuningireland.netlify.app Github: https://github.com/Destination2Unknown YouTube: https://www.youtube.com/channel/UCjw...hVY32I2q2JZnBQ Last edited by destination unknown; August 8th, 2022 at 12:07 PM. |
||
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Slow Acting Long Time Interval PID Tuning | GrizzlyC | LIVE PLC Questions And Answers | 141 | March 30th, 2021 07:04 AM |
PID tuning methods | OysterMan | LIVE PLC Questions And Answers | 4 | March 21st, 2021 11:59 AM |
Micrologix 1400 Timed Proportioned Output PID Tuning | Paul Begley | LIVE PLC Questions And Answers | 3 | January 13th, 2014 05:26 PM |
PID Tuning and Process Modeling | kdcui | LIVE PLC Questions And Answers | 14 | October 15th, 2009 02:27 PM |
PLC PID Auto Tuning Problem | monet | LIVE PLC Questions And Answers | 6 | May 26th, 2009 10:50 AM |