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.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


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

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old April 15th, 2019, 07:38 PM   #1
mitch11
Member
United States

mitch11 is offline
 
Join Date: Mar 2017
Location: Ohio
Posts: 17
Rockwell PID AOI

Does anyone have there own PID AOI that they would like to share?

I understand that there are a few PID instructions offered by Rockwell, but I've had varying levels of success implementing those in projects I've been involved with.

Thanks,
  Reply With Quote
Old April 16th, 2019, 02:56 AM   #2
rdrast
Lifetime Supporting Member
United States

rdrast is offline
 
rdrast's Avatar
 
Join Date: Apr 2003
Location: South Carolina Lowcountry
Posts: 5,355
What are you problems, and how do you think an AOI will help?
__________________
------------------------------------
How to ask questions the SMART Way!

Look First, Ask Second!

  Reply With Quote
Old April 16th, 2019, 03:14 AM   #3
dcam
Member
United States

dcam is offline
 
Join Date: Apr 2012
Location: livingston
Posts: 70
I've never had issues with provided PID. I use a live gragh when tuning, maybe im missing something?
  Reply With Quote
Old April 16th, 2019, 10:11 AM   #4
Peter Nachtwey
Member
United States

Peter Nachtwey is offline
 
Peter Nachtwey's Avatar
 
Join Date: Apr 2002
Location: Vancouver, WA, US
Posts: 6,847
There are many different forms of PID. Some are better than other depending on what you want to do. Sometimes a full PID is not required. A PI or PD will do but other times a PID with second derivative gain is required. Then there is the problem on how integrator windup is handled.

I haven't played around with the PIDs on a Control Logix but the PIDs on SLCs and Micrologix leave much to be desired.

What someone should write is a Smith Predictor AOI.
__________________
"Living is easy with eyes closed, misunderstanding all you see...." Strawberry Fields Forever, John Lennon
  Reply With Quote
Old April 16th, 2019, 05:58 PM   #5
kamenges
Member
United States

kamenges is offline
 
kamenges's Avatar
 
Join Date: Nov 2002
Location: Brillion, WI
Posts: 3,722
Quote:
Originally posted by Peter Nachtwey:

What someone should write is a Smith Predictor AOI.
If I ever get some time on my hands I will probably do this. But what i really want to do is get a Kalman filter implementation as an AOI. I just haven't done enough research to know what implications this will have on plc scan time.

I have also had my issues getting the AB PID to work for me. It isn't so much the heart of the control law. I think that works fine. It is more trying to get the instruction to perform as I want in the mode I want in the face of the 50 or so parameters there are to deal with. The biggest issue is if it isn't doing what you want you have very little to look at to figure out why it is or isn't doing what you want it to do. I think it is a case of trying to do everything for everyone in one instruction, which adds complexity to the implementation. Then again, I am not a patient man, which will tend to cloud my view in this case.

mitch11, PM me. I probably have something you can at least start with.

Keith

Last edited by kamenges; April 16th, 2019 at 06:03 PM.
  Reply With Quote
Old Yesterday, 05:34 PM   #6
Peter Nachtwey
Member
United States

Peter Nachtwey is offline
 
Peter Nachtwey's Avatar
 
Join Date: Apr 2002
Location: Vancouver, WA, US
Posts: 6,847
Quote:
Originally Posted by kamenges View Post
If I ever get some time on my hands I will probably do this. But what i really want to do is get a Kalman filter implementation as an AOI. I just haven't done enough research to know what implications this will have on plc scan time.
You should look into making a alpha-beta-gamma filter AOI. You would be a hero if you shared it.
https://en.wikipedia.org/wiki/Alpha_beta_filter
An alpha-beta-gamma filter is similar to a Kalman filter except the gains are chosen differently. Kalman filter gains can be updated dynamically. This requires a lot of CPU power. There is also the steady state Kalman filter where the heavy number crunching is done once. The goal of the Kalman filter is be optimal. However, to do this the user needs to know the system covariance and the measurement noise covariance. The Kalman filter use these two values or arrays to determine the proper weighting between the current estimate and the new inputs. There are two huge problems with this.
1 people do not know the system covariance or measurement covariance.
2. They do not have a model to estimate the next value.
In other engineering forums, I have yet to see someone find these values.
So
Use the easy to implement alpha-beta-gamma filter where you choose the gains until you get the desired frequency response.

Our new delta RMC200 uses an alpha-beta-gamma or alpha-beta-gamma-delta to filter out chain noise or other noise that the motion controller can be geared too. This allows us to generate a master position, velocity and acceleration that is use to compute feed forward gains for the slaves.
https://deltamotion.com/peter/Maxima/ABG.html
https://deltamotion.com/peter/Maxima/ABGD.html

Quote:
I have also had my issues getting the AB PID to work for me. It isn't so much the heart of the control law. I think that works fine.
Actually it draws a perfect vacuum for hydraulic servo control.

Quote:
It is more trying to get the instruction to perform as I want in the mode I want in the face of the 50 or so parameters there are to deal with.
You need some mathemagic

Quote:
The biggest issue is if it isn't doing what you want you have very little to look at to figure out why it is or isn't doing what you want it to do.
and a good data recorder so that you can do system identification.

Quote:
I think it is a case of trying to do everything for everyone in one instruction, which adds complexity to the implementation. Then again, I am not a patient man, which will tend to cloud my view in this case.
Being able to predict is huge.
__________________
"Living is easy with eyes closed, misunderstanding all you see...." Strawberry Fields Forever, John Lennon
  Reply With Quote
Old Yesterday, 05:51 PM   #7
kamenges
Member
United States

kamenges is offline
 
kamenges's Avatar
 
Join Date: Nov 2002
Location: Brillion, WI
Posts: 3,722
Peter, in many cases I couldn't even get the function to the point where I need any of the stuff you are referring to. Just getting it to react to ANYTHING is sometimes a challenge regardless of what you do with the gains or the software output value. This is where i get frustrated and just roll my own. Right or wrong I know EXACTLY what my own function is doing and EXACTLY why it is doing it.

Much of this is based on expectation. If I put the function into auto I expect it to act like it is in auto. Oscillation is one of the expected things that can happen in auto mode and I would be OK with that. But it should do SOMETHING. If I put it in manual I just want to to be able to put the output where i want it without anything interfering with that act. So this is less about performance and simply about action. There are just too many things that can seemingly get in the way of the function doing what one would think it should.

Thanks for the tip on Kalman filter processing requirements. That is likely not something I want to task a PLC with given the stuff i do. Interestingly I was thinking about alpha-beta filters as an alternative to Kalman filters this morning. I remember reading some of the stuff you posted about them and thought that might be an easier way to go. I might dive into that.

Keith

Last edited by kamenges; Yesterday at 06:04 PM. Reason: Clarification
  Reply With Quote
Old Yesterday, 06:42 PM   #8
duckman
Member
United States

duckman is offline
 
Join Date: Sep 2013
Location: home
Posts: 252
Is the type of filter alpha beta gamma, something along the lines we use in Arduino for IMU integrating i.s Madgwick/Mahoney filter, of course we also use a Kalman, but as you rightly say it is CPU heavy.
  Reply With Quote
Old Today, 03:24 PM   #9
Peter Nachtwey
Member
United States

Peter Nachtwey is offline
 
Peter Nachtwey's Avatar
 
Join Date: Apr 2002
Location: Vancouver, WA, US
Posts: 6,847
Quote:
Originally Posted by duckman View Post
Is the type of filter alpha beta gamma, something along the lines we use in Arduino for IMU integrating
Yes, however, the alpha-beta-gamma filter I used does not take into account gravity. It is one dimensional and meant to smooth out encoder data on feed chains and conveyors. There are a lot of question about this on this forum.

Quote:
i.s Madgwick/Mahoney filter, of course we also use a Kalman, but as you rightly say it is CPU heavy.
I don't know about Madgwick/Mahoney filters. It looks like they are somewhat related just like the alpha-beta-gamma filter is somewhat like a Luenberg Observer or Kalman filter.

The Madgwick/Mahoney filter look like they are specifically designed for computing the orientation of a IMU which is a little more complicated than a one dimensional alpha-beta-gamma filter.

The main advantage of a alpha-beta-gamma filter is that you get 95% of the performance with only 5% of the effort compared to a Kalman filter.
__________________
"Living is easy with eyes closed, misunderstanding all you see...." Strawberry Fields Forever, John Lennon
  Reply With Quote
Old Today, 04:13 PM   #10
PLCnovice61
Member
Australia

PLCnovice61 is offline
 
Join Date: Apr 2015
Location: home
Posts: 110
Thanks for the info Peter, re the CPU usage, until a few years ago their has been limited process power in Arduino hence madgwick/mahoney filters, but now with 32 bit processors that has now changed and kalman are common. I have found though that the kalman filtered IMU's tend to run away badly when quickly tilted (lots of over shoot i.e 15+ degrees) and returned to there previous position (probable not tuned for a rapid tilt?). Where as the Madg/mahoney don't display this issue. In testing 8+ different IMU's l haven't seen any advantage over the madg/mahoney from the kalman, if anything the opposite.
The Madgwick filter is a little more processor hungry than the Mahoney (say on a 8 bit Arduino), but in my testing gives a far better results and most Arduino now are 16 bit minimum, so running the Madgwick filter isn't a problem
  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
PowerFlex 400 PID Loop for DryCooler Fan / Temperature / Modbus alexhk LIVE PLC Questions And Answers 1 December 22nd, 2013 08:36 AM
PID control of motor drive considering the diameter and an external Potentiometer rajesh_gklm LIVE PLC Questions And Answers 2 January 15th, 2010 11:19 PM
Slow PID Loops J E LIVE PLC Questions And Answers 28 August 26th, 2009 10:20 AM
PID, which one is in your PLC? Peter Nachtwey LIVE PLC Questions And Answers 8 July 28th, 2004 11:33 PM
how often should I trigger the PID? Ron Beaufort LIVE PLC Questions And Answers 11 February 22nd, 2003 10:57 AM


All times are GMT -5. The time now is 05:28 PM.


.