You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

Reply
 
Thread Tools Display Modes
Old November 16th, 2020, 03:24 PM   #16
Phrog30
Member
United States

Phrog30 is offline
 
Join Date: Dec 2006
Location: Montgomery, Alabama
Posts: 725
Quote:
Originally Posted by rupej View Post
I'm looking to test out some PID tuning...
Maybe not what you are after, but check out Pidbot. There is a module for Ignition. You can tune almost anything with it.

https://www.jlbcontrols.com/pidbot
  Reply With Quote
Old November 20th, 2020, 05:00 PM   #17
rupej
Member
United States

rupej is offline
 
Join Date: Sep 2014
Location: NC
Posts: 819
Thanks for the responses, guys. And sorry for the delay in responding.

drbitboy, I'm just looking for a halfway realistic simulation of a feedback process such as flow, pressure, level or temperature that I can use to compare tuning methods and also check out various auto-tune options to see what works best. I realize that those are very different processes but it's a starting point, and if it's in code I can tweak stuff like dead time and process gain to alter the simulation. Thanks for posting the AdvancedHMI and MicroLogix simulation code- I'll dig into that soon I saw you mentioned there was another simulator that you used to prove a deadband was beneficial. Was that written for a PLC also?

Also, thanks Peter for mentioning your old hot rod simulator. I'll check that out as well.

Phrog, I've heard good things about pidbot but have yet to try it. One of my reasons for wanting a good PID simulation is so I can learn to use pidbot and other autotune programa without being in a real environment where things can be damaged Thanks

Last edited by rupej; November 20th, 2020 at 05:03 PM.
  Reply With Quote
Old November 20th, 2020, 05:10 PM   #18
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 1,655
Quote:
Originally Posted by rupej View Post
I saw you mentioned there was another simulator that you used to prove a deadband was beneficial. Was that written for a PLC also?



Yes, the entire thing, simulation plus PID, runs on the PLC.
  Reply With Quote
Old November 20th, 2020, 05:21 PM   #19
Peter Nachtwey
Member
United States

Peter Nachtwey is offline
 
Peter Nachtwey's Avatar
 
Join Date: Apr 2002
Location: Vancouver, WA, US
Posts: 7,269
Quote:
Originally Posted by rupej View Post
drbitboy, I'm just looking for a halfway realistic simulation of a feedback process such as flow, pressure, level or temperature that I can use to compare tuning methods and also check out various auto-tune options to see what works best.

These are totally different processes. Flow and temperature are non integrating processes. Level and pressure are integrating processes. The auto tune for integrating process will not work in non-integrating processes.


Velocity is a non-integrating process. Position control is an integrating process.



Do you know the difference?
__________________
"Living is easy with eyes closed, misunderstanding all you see...." Strawberry Fields Forever, John Lennon
  Reply With Quote
Old November 20th, 2020, 05:24 PM   #20
destination unknown
Member
Ireland

destination unknown is offline
 
Join Date: Jun 2010
Location: Ireland
Posts: 23
FOPDT Simulator
Attached Images
File Type: jpg Sim.JPG (53.1 KB, 36 views)
  Reply With Quote
Old November 20th, 2020, 05:49 PM   #21
Peter Nachtwey
Member
United States

Peter Nachtwey is offline
 
Peter Nachtwey's Avatar
 
Join Date: Apr 2002
Location: Vancouver, WA, US
Posts: 7,269
Quote:
Originally Posted by destination unknown View Post
FOPDT Simulator
So when the output of the PID goes to 0 the output of the lead/lag filter goes to? This isn't a very good temperature simulator if the temperature goes to 0. It should go to ambient temperature. Also there needs to be an opoen loop gain. Usually the units are degrees/% control output.


Add the the bias to the out of the lead/lag block. Add a multiplier on the output of the PID to convert the % control output to temperature.


However, this is just a FOPDT. What about SOPDT? Then insert another lead/lag block in series with the first lead/lag block.


This does cover integrating processes.
__________________
"Living is easy with eyes closed, misunderstanding all you see...." Strawberry Fields Forever, John Lennon
  Reply With Quote
Old November 20th, 2020, 06:03 PM   #22
destination unknown
Member
Ireland

destination unknown is offline
 
Join Date: Jun 2010
Location: Ireland
Posts: 23
Quote:
Originally Posted by Peter Nachtwey View Post
So when the output of the PID goes to 0 the output of the lead/lag filter goes to? This isn't a very good temperature simulator if the temperature goes to 0. It should go to ambient temperature. Also there needs to be an opoen loop gain. Usually the units are degrees/% control output.


Add the the bias to the out of the lead/lag block. Add a multiplier on the output of the PID to convert the % control output to temperature.


However, this is just a FOPDT. What about SOPDT? Then insert another lead/lag block in series with the first lead/lag block.


This does cover integrating processes.

You can use a BIAS term in the Lead Lag to simulate ambient, there is also a GAIN term in the Lead Lag.
Attached Images
File Type: jpg Sim.JPG (54.2 KB, 32 views)
  Reply With Quote
Old November 20th, 2020, 09:46 PM   #23
rupej
Member
United States

rupej is offline
 
Join Date: Sep 2014
Location: NC
Posts: 819
Quote:
Originally Posted by Peter Nachtwey View Post
These are totally different processes. Flow and temperature are non integrating processes. Level and pressure are integrating processes. The auto tune for integrating process will not work in non-integrating processes.


Velocity is a non-integrating process. Position control is an integrating process.



Do you know the difference?
Peter- yes, I know the difference. I'm not a wizard at this, but I do it for a living and I'm trying to get better at it. I'm mostly looking for something *resembling* a real life process of any kind so that I can practice various tuning methods and also learn to navigate auto-tune software for situations where that may be useful. I don't have any physical process to practice with, so a software simulation seems like the next best thing. Thanks for the help.
  Reply With Quote
Old November 20th, 2020, 10:28 PM   #24
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 1,655
How about this old thread, which used a soldering iron as a testbed?





http://www.plctalk.net/qanda/showthread.php?t=4619




I agree a simulation is probably easier to implement if one has the programming and other modeling skills, unless one has the various pieces (temperature sensor, etc.) laying about and the skills to use them.



Also, aren't there three time constants (at least)? The mass of the material heated and the mass of the sensor are the two usually considered, but what about the heating/cooling system response? Granted, an electric heating element may move fast enough to ignore, and condensing steam temperature would follow the jacket pressure, which I would guess will also be quick. But the temperature profile of chilled water flowing in a large-volume jacket may take a few seconds, or tens of seconds, to re-equilibrate when the rate is changed, although of course the heat transfer coefficient would jump right away.
  Reply With Quote
Old November 20th, 2020, 10:54 PM   #25
Peter Nachtwey
Member
United States

Peter Nachtwey is offline
 
Peter Nachtwey's Avatar
 
Join Date: Apr 2002
Location: Vancouver, WA, US
Posts: 7,269
There are two time constants. There was no cooling system. There is the dead time it take for the thing being heated to get to the temperature sensor. This is a SOPDT system.
The hotrod system was a a soldering, wood or leather burning iron. It was nothing fancy because Ron used a few of these in his training classes.
__________________
"Living is easy with eyes closed, misunderstanding all you see...." Strawberry Fields Forever, John Lennon
  Reply With Quote
Old November 21st, 2020, 06:42 AM   #26
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 1,655
Quote:
Originally Posted by Peter Nachtwey View Post
There are two time constants. There was no cooling system. There is the dead time it take for the thing being heated to get to the temperature sensor. This is a SOPDT system.
The hotrod system was a a soldering, wood or leather burning iron. It was nothing fancy because Ron used a few of these in his training classes.

I read that thread last night and Ron had a fan blowing on the hotrod, but that was to vary the load, not for controlled cooling. But I was speaking more generally and referring to (conflating?) the other recent thread - [PID Nightmare] - that has cooling that will probably be put on a split-range control with the heating.


Anyway my point was that any system may have several time constants and/or dead times, even if some are so short with respect to others that they may be ignored. For example, with a jacketed tank the heating/cooling is occurring at a thin layer at the wall of the tank and so will require time* to reach the bulk of the fluid and the temperature sensor. If that time constant is large then the response time of the sensor itself might be negligible and not need to be part of the model, but that doesn't mean it isn't there.



So an N-order system (N>2) may be modeled as an (N-K)-order system (N-K<3) without too much loss of accuracy.


* how much time depends on the vigor of any mixing, convection vs. conduction, etc.
  Reply With Quote
Old November 21st, 2020, 10:56 AM   #27
Peter Nachtwey
Member
United States

Peter Nachtwey is offline
 
Peter Nachtwey's Avatar
 
Join Date: Apr 2002
Location: Vancouver, WA, US
Posts: 7,269
Quote:
Originally Posted by drbitboy View Post
I read that thread last night and Ron had a fan blowing on the hotrod, but that was to vary the load, not for controlled cooling.
I didn't see the part about the fan but you are correct about changing the load.



Quote:
Anyway my point was that any system may have several time constants and/or dead times, even if some are so short with respect to others that they may be ignored.
Yes, the can be many poles, but the dead times are additive when it comes to the final result.


If the poles are far to the left of the origin then they can be ignored.


Most of my work has been with hydraulic servo control. The cylinder and mass have two poles. There is an additional pole added for integrating the velocity to position. Finally, adding an integrator gain adds yet another pole so there are four poles IF you assume the valve's poles are much "faster" that the cylinders poles.


A controller must supply one gain for every open loop pole. The integrator does not count because it adds its own pole.

Therefore a good servo hydraulic controller will have a proportional gain, derivative gain and second derivative gain. Most controllers and NO PLC PIDs have a second derivative gain.


If the valve is slow it is not practical to add more derivative gains. Instead an valve PID or inner loop is required. A valve is a non-integrating system. If the control signal goes to zero the flow will go to zero. Most valves have two dominant poles so the P and D gains can place those two poles. Remember the integrator has its own pole so the closed loop valve control has 3 poles.





Quote:

For example, with a jacketed tank the heating/cooling is occurring at a thin layer at the wall of the tank and so will require time* to reach the bulk of the fluid and the temperature sensor. If that time constant is large then the response time of the sensor itself might be negligible and not need to be part of the model, but that doesn't mean it isn't there.
Yes, but there are practical limits. If I could model a system perfectly then I could simply use feed forwards and not worry about closed loop control but reality sucks so closed loop control is necessary. However, My models are usually very accurate and within 2%. This means the feed forwards are correct with 2% and the closed loop control only need to supply at most 2% of the control. This reduces errors significantly.



Quote:
So an N-order system (N>2) may be modeled as an (N-K)-order system (N-K<3) without too much loss of accuracy.
It depends where the poles are. The poles far to the left of the origin is the s-plane can be ignored. In the case of servo hydraulic control I usually ignore the the poles of the valve because they are relatively "fast". If the customer buys a cheap valve where the valve's open loop poles are close to the origin they must accept the poor performance or go through the hassle of setting up an inner loop.


In some cases the customers don't even buy valves with spool feed back and wonder why the system doesn't control well. This is similar to the situation in the PID Nightmare thread where there is no feedback for the steam valve.


BTW, this is one of my hydraulic servo simulations.
https://deltamotion.com/peter/Mathca...20Cylinder.pdf
I have used this file as a starting point for simulations for the US department of energy.
I am not modeling a very fast valve and still the control is pretty good.
__________________
"Living is easy with eyes closed, misunderstanding all you see...." Strawberry Fields Forever, John Lennon
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
PID Control Action Mode in RSLOGIX 5000 plcnovel LIVE PLC Questions And Answers 16 November 6th, 2020 01:22 AM
Quick comparison of PID, PIDE, and PI instructions in RSLogix5000 ... Ron Beaufort LIVE PLC Questions And Answers 14 June 7th, 2018 02:24 PM
Pid rslogix 5000 industrial 951 LIVE PLC Questions And Answers 6 July 10th, 2014 10:48 AM
Wierd Issue with PID on Compact Lgx 5000 vgiesbrecht LIVE PLC Questions And Answers 3 March 23rd, 2008 07:33 PM
RSLogix 5000 V15 Features Samneggs LIVE PLC Questions And Answers 18 April 20th, 2006 06:45 PM


All times are GMT -5. The time now is 03:14 PM.


.