![]() ![]() ![]() ![]() ![]() ![]() |
||
![]() |
||
![]() ![]() ![]() ![]() This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc. |
||
![]() |
![]() |
#46 | |||
Member
|
Quote:
In most cases the dead time is so small it can be ignored. Quote:
Quote:
SSE is the sum of squared errors is more appropriate than other evaluation methods when testing for goodness of fit between a model and actual data. My SOPDT program returns this for hotrod.txt sse = 250.31414761879358 RMS error = 0.436 The open loop gain = 3.757 PV/%CO Time constant 0 = 0.685 minutes Time constant 1 = 2.849 minutes Ambient PV = 77.840 in PV units Dead time = 0.354 Time units are the same as provided in input file The closed loop time constant = 0.285 The controller gain = 1.472 %CO/unit of error The integrator time constant = 3.534 minutes The derivative time constant = 0.552 minutes
__________________
"Living is easy with eyes closed, misunderstanding all you see...." Strawberry Fields Forever, John Lennon |
|||
![]() |
![]() |
#47 | |
Member
|
Quote:
https://deltamotion.com/peter/py/SysID%20SOPDT.zip BTW, it doesn't take much longer to find the parameter for a SOPDT system than a FOPDT system but the difference in the quality of the model can be significant. This is my old Mathcad Hotrod SOPDT work sheet as a pdf http://www.plctalk.net/qanda/attachm...1&d=1660019198 Notice that I use differential equations to express the SOPDT model. Differential equations are THE way to go because they are so flexible. State space and Laplace transforms don't work for non-linear systems. None of you guys account for the ambient temperature nor do you express the dead time correctly.
__________________
"Living is easy with eyes closed, misunderstanding all you see...." Strawberry Fields Forever, John Lennon Last edited by Peter Nachtwey; August 9th, 2022 at 01:37 AM. |
|
![]() |
![]() |
#48 | ||
Member
![]() ![]() Join Date: Jun 2010
Location: Ireland
Posts: 95
|
Quote:
HR.png Model: Model Gain= 3.78 Damping Factor= 1.27 2nd Order Time Constant= 83.23 seconds DeadTime= 20.73 seconds The PID Tune: Kp=1.496 Ki=0.0071 Kd=49.39 HrTuned.PNG Quote:
__________________
same same, but different... Github: https://github.com/Destination2Unknown YouTube: https://www.youtube.com/channel/UCjw...hVY32I2q2JZnBQ |
||
![]() |
![]() |
#49 |
Member
|
The response looks good but still not sum of squared errors. Also, when the damping factors is greater or equal to one then you have two real poles and the transfer function should be expressed that way. Normally a damping factor is used when the open loop system is under damped.
The math still works but now we can't compare your two time constants to my two time constants.
__________________
"Living is easy with eyes closed, misunderstanding all you see...." Strawberry Fields Forever, John Lennon |
![]() |
![]() |
#50 |
Member
![]() ![]() Join Date: Jun 2020
Location: Somewhere
Posts: 23
|
A PIDNN (PID Neural Network) is a dream of mine. This method of control shows a lot of potential. Unfortunately, I am not able to create this code myself.
|
![]() |
![]() |
#51 |
Member
|
What do you think the NN adds?
__________________
"Living is easy with eyes closed, misunderstanding all you see...." Strawberry Fields Forever, John Lennon |
![]() |
![]() |
#52 |
Member
![]() ![]() Join Date: Jun 2020
Location: Somewhere
Posts: 23
|
I hope the PIDNN automatically adapts to the situation. As the model in our machines sometimes changes depending on the type of product and weather conditions.
By adapt, I mean adjusting the Kp, Ti & Td. I see in literature that a PID controller is still active in the background. I have seen people running a PIDNN functionally on a PLC. However, I would like to look into the code. |
![]() |
![]() |
#53 |
Member
|
NNs need be trained with hundreds or even thousands of examples. When you provide the different inputs, how do you grade the output if you don't really know what you want or what is optimal? Who would do that? How would you do that? You can't just say I am using a NN or FL and that will solve the problem. If you don't know the best answer to a set of inputs, then training the NN is not going to yield the results you want.
I am a big believer in staying with the basics and understanding them thoroughly. Understanding how to write the differential equations is a must. I know most of you would not call differential equations, basic.
__________________
"Living is easy with eyes closed, misunderstanding all you see...." Strawberry Fields Forever, John Lennon |
![]() |
![]() |
#54 |
Member
![]() ![]() Join Date: Jun 2020
Location: Melbourne
Posts: 38
|
I gave it a crack with some pumps the other day.
Unfortunately the downstream pipework is not complete so I couldn't ramp to 50Hz. (set to 30Hz) Bit of a noob here, but can you tell me what is happening around the 50s mark where the model starts tracking the PV ? What is happening prior to that point ? Ill have some more time on site soon, so ill be keen to run some more tests. Thanks for creating this tool. |
![]() |
![]() |
#55 | |
Member
![]() ![]() Join Date: Jun 2010
Location: Ireland
Posts: 95
|
Quote:
The tuner in pytunelogix is a very specific/limited tuner which is based on a single step Process Reaction Curve. It looks for the step in the CV (point where CV is at its max) and uses that as its starting point. I didn't really document this very well but as you can see it doesn't quite work when there are multiple steps. You have to pay extra for the one that does $$$$$ ![]() Try clean up the CV data in the csv file, instead of the CV going from 0->20->30 change it to 0->30 and see what that looks like.
__________________
same same, but different... Github: https://github.com/Destination2Unknown YouTube: https://www.youtube.com/channel/UCjw...hVY32I2q2JZnBQ Last edited by destination unknown; August 24th, 2022 at 08:38 AM. |
|
![]() |
![]() |
#56 | |
Member
![]() ![]() Join Date: Jun 2010
Location: Ireland
Posts: 95
|
Quote:
In your case 0-20hz or 0-30Hz is fine, not the best idea to go 0-50Hz just for a step test.
__________________
same same, but different... Github: https://github.com/Destination2Unknown YouTube: https://www.youtube.com/channel/UCjw...hVY32I2q2JZnBQ |
|
![]() |
![]() |
#57 | |
Member
![]() ![]() Join Date: Jun 2010
Location: Ireland
Posts: 95
|
Quote:
Feedforward and/or pre-calculated adaptive gains should work in that scenario.
__________________
same same, but different... Github: https://github.com/Destination2Unknown YouTube: https://www.youtube.com/channel/UCjw...hVY32I2q2JZnBQ |
|
![]() |
![]() |
#58 |
Member
![]() ![]() Join Date: Jun 2020
Location: Melbourne
Posts: 38
|
Very interesting. Thanks for letting me know.
I have cleaned up the data but still seem to get a similar outcome: It will be interesting to see the difference in model, say from a step from 0->20Hz, vs 20->30Hz (latter is more within the pumps operational curve). Would probably be best to ramp up manually to minimum flow speed, and then let the PID take over once we are within the vicinity of the pump curve. |
![]() |
![]() |
#59 |
Member
|
50 HZ is mentioned. What does 50 Hz have to do with anything. I don't see 50 Hz in any of the graphs or pictures nor do I see 30 Hz.
__________________
"Living is easy with eyes closed, misunderstanding all you see...." Strawberry Fields Forever, John Lennon |
![]() |
![]() |
#60 | |
Member
![]() ![]() Join Date: Jun 2020
Location: Melbourne
Posts: 38
|
Quote:
50Hz is mentioned in the context of me not being able to run the VSD @ 50Hz. The pipework downstream from the pump is incomplete, and can only handle about 50L/s flow (achieved at about 40Hz). If you look at the top left graph, you will see the CV (VSD Hz) ramps to 30Hz. Being new to this, I assumed that the best model would be obtained by ramping over the whole range of the output CV ramps 0Hz >> 50Hz. But further reading indicates it may be better to measure step response over "expected" process values, eg: 20-50Hz. Last edited by moistcat; August 25th, 2022 at 01:28 AM. |
|
![]() |
![]() |
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 |