Need Help! PID Servo Tuning with SnapAmp Chicken and Egg Variables - Page 3


Page 3 of 4 FirstFirst 1234 LastLast
Results 25 to 36 of 41

Thread: PID Servo Tuning with SnapAmp Chicken and Egg Variables

  1. #25
    Member
    Join Date
    May 2012
    Location
    canada
    Posts
    443
    Downloads
    0
    Uploads
    0

    Default Re: PID Servo Tuning with SnapAmp Chicken and Egg Variables

    Quote Originally Posted by MadTooler View Post
    Well, I did a lot of tuning at various speeds and was able to make some improvement. I also was able to map the range of velocity on my X that was nastiest. However, I couldn't find a tune that entirely made the oscillation go away.

    A new project came in the door that really needs to be cut without the extra chatter. I thought I would do some inspection of the angular contact bearings and maybe get lucky with a simple replacement if they were running rough and the source of the noise injection into the control loop. Well, they were fine, but I found the ballnuts were a bit crunchy. Possibly just dirt in there, but it seemed like the right time to replace the 25 year old screws with better and try to remove some of the poorly designed components with as close to decently designed as possible without a full gantry rebuild. I am optimistic this will at least greatly reduce the problem, if not fully remove it.

    Part of what I am thinking of improving is the pulleys and belt from my DC servos to the ball screw. They were type L with 0.375" pitch at a 1:1 ratio. Since I am only running my servos at about 1,200 rpm, due to critical speed on the ball screws, I was thinking it would be good to reduce backlash and introduce a gear reduction with GT2 pulleys and a GT3 belt at either 1.4:1 or 1.5:1 to gain resolution and torque which may better smooth out mechanical issues that have tendency to inject noise into the control loop. Currently, I am at 20,000 encoder counts per inch and running a max of 240ipm. Gearing down at 1.4:1, I would have the increased resolution of 28,000 encoder counts per inch while still maxing out at either 240 or 250ipm at most. If this is a good thing, I would also switch to GT2 pulleys on my Y with a 1.5:1 reduction for 30,000 encoder counts and same ipm as the X. Am I thinking correctly that this would be beneficial for the control loop?

    Thanks.
    You may want to look into rebuilding the ballscrews if they were decent quality to start. Lots of companies doing this and its not too hard to even do it yourself assuming screw itself (usually the last to go) is still good.

    How wide are your belts and how big are the pulleys? L series belts are pretty light duty, are you sure they are heavy enough for your machine? I think gearing down to match max motor rpm with max desired speed would probably be a good idea, but honestly I dont know how or if it will affect the control loop. Seems like more torque and resolution would be a bonus though.



  2. #26
    Member
    Join Date
    Nov 2006
    Location
    USA
    Posts
    51
    Downloads
    0
    Uploads
    0

    Default Re: PID Servo Tuning with SnapAmp Chicken and Egg Variables

    Thanks for the reply. My machine is a medium duty 4'x4' gantry router.

    Quote Originally Posted by mmurray70 View Post
    You may want to look into rebuilding the ballscrews if they were decent quality to start. Lots of companies doing this and its not too hard to even do it yourself assuming screw itself (usually the last to go) is still good.
    I assume you mean rebuild the ball nuts, not screws. That may be an option for some, but In this case, due to poor initial machine design, it is in my best interest to take the opportunity to completely change the end mount bearings at the same time, which also forces me to get a longer screw.

    Quote Originally Posted by mmurray70 View Post
    How wide are your belts and how big are the pulleys? L series belts are pretty light duty, are you sure they are heavy enough for your machine? I think gearing down to match max motor rpm with max desired speed would probably be a good idea, but honestly I don't know how or if it will affect the control loop. Seems like more torque and resolution would be a bonus though.
    The original belts were the 1/2" wide type L. I am replacing with 15mm GT3 5mm pitch. For my X, due to space constraints, my pulleys will be 20 tooth at motor to 28 tooth at the ballscrew. My max RPMs should be under 2k, probably not over 1,750 to maintain 80% of critical speed on the screw. The servo is rated at 2,800 RPM with a max top at 4k. Per my 70 volts at the snapamp and 31.1vpk at the servo, I will only be able to reach 2,250 RPM. That still will have several hundred RPM of overhead from system RPM. Maybe I misunderstood what you meant, but In general, even if I could, I do not think matching the max motor RPM to the desired max system RPM would be good since there would be no room for overlap.



  3. #27
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    3243
    Downloads
    0
    Uploads
    0

    Default Re: PID Servo Tuning with SnapAmp Chicken and Egg Variables

    Hi Jason,

    Is the encoder on the lead screw or the motor?

    Higher resolution and more torque to the lead screw would be good.

    But how lower gearing will effect the control loop is hard to say without knowing all the masses and dynamics. In general I would expect lower gearing to degrade the stability. Most systems basically behave like a mass-spring-mass system.

    PID Servo Tuning with SnapAmp Chicken and Egg Variables-two-mass-spring-system-png

    One mass is the motor rotor. The spring is the belt/leadscrew/bearings/etc. The other mass is the table/gantry. This system will have a resonance at a frequency of sqrt(K/m), where m is the effective mass = (m1 x m2)/(m1 + m2). A higher resonant frequency is better because the servo can make corrections faster without exciting the resonant frequency and causing oscillations. Larger masses will lower the resonant frequency. Higher spring stiffness will raise the resonant frequency.

    The lower gearing will have an effect like multiplying the effective motor rotor mass. However if the mechanics have other lower resonant frequencies then this change may not have a significant effect.

    Another consideration is maximum acceleration. Motor torque needs to do two things: accelerate the motor rotor and the payload. Lower gearing means more torque needed to accelerate the motor and less to the payload. With very low gearing the torque goes mostly to the motor but it must accelerate to such a high speed it limits the acceleration. With high gearing the torque mostly goes to the payload but is small due to the gearing. It turns out for a given motor to accelerate the payload at the highest rate the inertia matching should be 1:1. So it depends on the current inertia ratio whether maximum acceleration will be increased or decreased. Many systems typically use a smaller motor to save cost so the inertia ratio is greater than 1. If that is your case, the lower gearing would improve acceleration. Often maximum possible acceleration is not used/needed as it may cause too much disturbance/vibration and so may not be an issue anyway.

    Last edited by TomKerekes; 11-27-2019 at 03:43 PM. Reason: Fixed attachment
    Regards
    TK http://dynomotion.com


  4. #28
    Member
    Join Date
    Nov 2006
    Location
    USA
    Posts
    51
    Downloads
    0
    Uploads
    0

    Default Re: PID Servo Tuning with SnapAmp Chicken and Egg Variables

    Tom,

    That is a bit to chew. I was not aware of the specific formulas or the exact science, but what you noted is precisely what I have been pondering.

    The encoder is on the servo motor. The servo is an older Baldor NEMA 34 sized, fairly big, and far more capable than I am able to take advantage of due to critical speeds of other system components. From there I want to say I am running far below maximum possible acceleration, but I am not sure how to truly determine without a significant amount of work. The effect of the motor rotor mass was my basic concern. I am not too sure about the resonant frequency other than my upgrades to the ballscrew should stiffen that portion of the equation over prior.

    I am thinking of the 1.4:1 lowering as kinda small (I am looking at 1.5:1 for my larger Y if this works well) with probably not too much of the possible negative impacts and hopefully more of the potential positive. Maybe that hope is an error. If it makes the system less stable, worst case scenario, I burn some cash on an extra pulley and belt to go back to 1:1. Does that sound like a grossly ignorant approach?

    Thanks again.



  5. #29
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    3243
    Downloads
    0
    Uploads
    0

    Default Re: PID Servo Tuning with SnapAmp Chicken and Egg Variables

    Hi Jason,

    I am thinking of the 1.4:1 lowering as kinda small (I am looking at 1.5:1 for my larger Y if this works well) with probably not too much of the possible negative impacts and hopefully more of the potential positive. Maybe that hope is an error. If it makes the system less stable, worst case scenario, I burn some cash on an extra pulley and belt to go back to 1:1. Does that sound like a grossly ignorant approach?
    No, I think that is reasonable.

    btw I think the moment of inertia increases with the square of the gear ratio.

    Which reminds me of my favorite job interview question: How many times harder is it to spin (moment of inertia) any object if it is doubled in size? ie a 2ft cube of steel vs a 1ft cube of steel? Hint - it is a big number

    Regards
    TK http://dynomotion.com


  6. #30
    Member
    Join Date
    May 2012
    Location
    canada
    Posts
    443
    Downloads
    0
    Uploads
    0

    Default Re: PID Servo Tuning with SnapAmp Chicken and Egg Variables

    Quote Originally Posted by TomKerekes View Post
    Hi Jason,

    No, I think that is reasonable.

    btw I think the moment of inertia increases with the square of the gear ratio.

    Which reminds me of my favorite job interview question: How many times harder is it to spin (moment of inertia) any object if it is doubled in size? ie a 2ft cube of steel vs a 1ft cube of steel? Hint - it is a big number
    Been a while since I did any moment of inertia stuff but your looking at 8 times the mass, with double the surface speed for a given rpm, energy goes up with square of velocity so Im guessing 32 times higher, not really too sure though. Am I close enough to get the job?

    Wow it definity is a lot more then you would think for sure even if I dont have the right answer. I guess thats why Brother can get such insanely fast ramp times on the speedios with their little bitty BT30 spindles. That stuff about matching inertia load to payload is interesting too Tom, thanks for posting.

    Jason, yes I mean re-balling the nuts. And yes again, you would not want gearing to reach maximum, no load servo rpm. Obviously you will have no torque to do anything. I was suggesting you matching gearing to the maximum usable range of the motor. Cant hurt to try it.



  7. #31
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    3243
    Downloads
    0
    Uploads
    0

    Default Re: PID Servo Tuning with SnapAmp Chicken and Egg Variables

    Your hired. Yes 5th power of size. Mass is 3rd order with size. Then each particle of mass further out needs more torque to get the same force and also needs to accelerate to a higher speed.

    Regards
    TK http://dynomotion.com


  8. #32
    Member
    Join Date
    May 2012
    Location
    canada
    Posts
    443
    Downloads
    0
    Uploads
    0

    Default Re: PID Servo Tuning with SnapAmp Chicken and Egg Variables

    Cool, i got it right! 32 times higher, that is interesting for sure, I never would have realized this if you didn't mention it. Learn something new every day.



  9. #33
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    3243
    Downloads
    0
    Uploads
    0

    Default Re: PID Servo Tuning with SnapAmp Chicken and Egg Variables

    Yes 4th power with radius and 1st power with length. Much of my experience has been with laser scanning mirrors that have very high accelerations. People often suggest increasing motor size to draw faster, but that doesn't work for a number of reasons.

    Regards
    TK http://dynomotion.com


  10. #34
    Member
    Join Date
    Nov 2006
    Location
    USA
    Posts
    51
    Downloads
    0
    Uploads
    0

    Default Re: PID Servo Tuning with SnapAmp Chicken and Egg Variables

    Sorry, guys, for some reason I occasionally stop getting notifications when new messages are posted on cnczone. I only noticed you posted now that I am getting back to the issue after having upgraded the mechanical.

    To recap, my previous condition, most notable on the X axis and some on Y, was some sort of oscillation or chattering of varying intensities at various feedrates on my 3 axis 4'x4' gantry router with Brushed DC servos. The oscillation sort of resembles mechanical resonance and/or stiction issues, but it is also clearly seen in the step response results. Before the holidays, I found the ballnuts were at best dirty, worst worn out, so decided time to replace a handful of poorly implemented components and the screw instead of messing with cleaning possibly bad parts.

    What I have recently changed mechanically (it has taken a while since unfortunately everything had to be custom):

    • New 5/8" Ballscrew
    • New Ballnuts (one fixed with another wave washered as antibacklash)
    • Improved float for the antibacklash ball nut vs. previous setup
    • New bearing end mount blocks and bearings (fixed angular contact at motor end, wide bearing mount with single angular and single deep groove allowing floating at opposite end with springs tensioning the screw)
    • Pulleys and belts now all GT2 or GT3 style
    • Pulley gear ratio improved (sort of) from 1:1 to 28:20 (1.4)


    Regarding our last conversation of the gearing benefits vs cost, I added a geared advantage to both my X and Y. The X, which I also changed all those other parts noted, is now at 1.4:1 and has just enough RPM to run at my intended rapid speed, but has no extra guts to take on any cutting load at the rapid. I had to slow down my max rapid 10% and it has plenty of torque there. The Y cannot reach full speed since I changed it to 1.5:1. I had to lower the Y top speed about 17%. I had guesstimated the 70-75v supply would give the motors enough overhead to run successfully based on the documentation I have on hand. I guesstimated wrong. If the snapamp could take the 120v my motors are rated, I would have plenty of power and speed. Since it cannot, I will run it slower until I get a chance to experiment with maybe closer to 1.25:1 ratios or eventually go back to 1:1.

    Questions on gear ratio... I assumed it would be preferable for rounding stack up and maybe less floating math to have clean ratios like 1.4 and 1.25 vs 1/3 or others with long and eventually rounded values. Does that matter with kflop and kmotion? If not, to what decimal place should the ratio be entered?

    So what does it do now? Well, same as before except quieter and flipped direction of more notable chatter. The new parts are definitely better and far more reliable, but I am now a month and a half later dealing with the same fun. YEAH!!!

    Gonna cry for a second... Tuning is not fun when stuff ain't gettin' done. I spend a lot of time better understanding the impacts and values of the many many aspects and tools available, just to forget and learn a lot over again when I don't get around to tuning again for many months later. Too bad my mind was programmed long ago not to hold on to the small details. Bummer. Moving on...

    My previous tunes seem to be fairly closely following, but the chatter is strong with this one. My top speed WAS 240ipm, now only 225. The chatter for both my new screw setup and old both occur most severely in the 140-180 ipm range. It is there in all speeds, but faint/tolerable below and above that range. Looking at the step response results, there seems to be an oscillation (almost harmonic) that is present at all velocities, but resonates most in that 140-180 range. It also seems to typically have a 10-14 hz pattern. The amplitude is usually small and under a few units. The sharpness of the pattern is more saw tooth at the speeds that suck vs sinusoidal at those that are fair. I will post some results and data.



  11. #35
    Member
    Join Date
    Nov 2006
    Location
    USA
    Posts
    51
    Downloads
    0
    Uploads
    0

    Default Re: PID Servo Tuning with SnapAmp Chicken and Egg Variables

    Some data and images...

    28000 units/inch
    Max velocity with current setup is 105000/s or 225ipm.

    PID Servo Tuning with SnapAmp Chicken and Egg Variables-x_chatternewscrewfilter-jpg


    Full Rapid with light chatter
    PID Servo Tuning with SnapAmp Chicken and Egg Variables-fullrapidlightchatter_225ipm-jpg


    Lots of chatter, 182ipm
    PID Servo Tuning with SnapAmp Chicken and Egg Variables-highchatter_182ipm-jpg


    Lots of chatter, 165ipm
    PID Servo Tuning with SnapAmp Chicken and Egg Variables-highchatter_165ipm-jpg


    Slow, 32ipm, fairly smooth motion but clearer oscillation
    PID Servo Tuning with SnapAmp Chicken and Egg Variables-slowsmooth_32ipm-jpg

    Attached Thumbnails Attached Thumbnails PID Servo Tuning with SnapAmp Chicken and Egg Variables-x_chatternewscrewfilter-jpg   PID Servo Tuning with SnapAmp Chicken and Egg Variables-fullrapidlightchatter_225ipm-jpg   PID Servo Tuning with SnapAmp Chicken and Egg Variables-highchatter_165ipm-jpg   PID Servo Tuning with SnapAmp Chicken and Egg Variables-highchatter_182ipm-jpg  

    PID Servo Tuning with SnapAmp Chicken and Egg Variables-slowsmooth_32ipm-jpg  
    Attached Files Attached Files


  12. #36
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    3243
    Downloads
    0
    Uploads
    0

    Default Re: PID Servo Tuning with SnapAmp Chicken and Egg Variables

    Hi Jason,

    Assuming this is the "chatter" I measure 21.2Hz at the 182ipm. At slower speeds the frequency seems to be proportionally slower. This would point to something mechanical.

    PID Servo Tuning with SnapAmp Chicken and Egg Variables-chatter182-png

    If I did the math right it seems to exactly match the rotation rate of the motor.

    182ipm = 3.033ips
    3.033ips / 0.2 in/rev = 15.17rps
    15.17rps x 1.4 = 21.2rps

    Possibly something out of balance in the motor or pulley not centered which then excites some mechanical resonance?

    It doesn't appear to be a tuning or feedback problem as the output stays relatively constant. Your tuning seems to be very aggressive holding 1~2 counts of error. Especially for a large router? As a test you might greatly reduce your gains,allow much greater errors, move at the same speed and see if the "chatter" still exists.

    Regards
    TK http://dynomotion.com


Page 3 of 4 FirstFirst 1234 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

PID Servo Tuning with SnapAmp Chicken and Egg Variables

PID Servo Tuning with SnapAmp Chicken and Egg Variables

PID Servo Tuning with SnapAmp Chicken and Egg Variables