EtherCAT + RPi build log along with questions

More
3 years 8 months ago - 3 years 8 months ago #264498 by LAUSCH
Hi Pseudo,

The exchange with you is very valuable to me - thanks for that. I came to the very same conclusion namely that the drives control is competing with LinuxCNC but without any PID in Linux it will also not work properly...
Maybe I find some spare time during the weekend so I can try optimizing my configuration.

Cheers
Christian
 
Last edit: 3 years 8 months ago by LAUSCH.

Please Log in or Create an account to join the conversation.

More
3 years 8 months ago #264771 by LAUSCH
Hi Pseudo,

Today I spent some time on optimizing the drive setup:
Initial Setup:
  • Pr0.00 = 1 (set bandwith automaticall)
  • Pr0.02 = 1 (velocity mode)
  • Pr1.15 = 0 (mode of position control - fixed to first gain)
  • PID within LinuxCNC was basically the same for all axes with P=5; I=0; D=0; FF1=1
Then I was entering LinuxCNC and opened the hal-scope in order to check on the following error.
The speed was set to 10m/min and I moved the axis.
Following errors were about 0.35mm.

Afterwards I have changed the parameters of the drives to
  • Pr0.00 = 0 (inactive)
  • Pr0.02 = 0 (inactive)
  • Pr1.XX Gain adjustment values set to default
  • Inertia Ratio values remained unchanged
(PS: with these settings I cannot recommend to use the jogging command of Motion Studios)
The results in hal-scope basically did not change - which admittedly was a bit unexpected.

But the big game changer was that from now on I was able to adjust my PID parameters freely without any strange interferences from the drives (in the past I got rattling noises and vibration as soon as the PID parameters became to "strong").

The procedure was as follows:
  1. ​​​​​​​Increase P until some oscillation is visible and slighlty lower the value again (velocity set to 10m/min)
  2. Then I tried to use I and D to adjust the remaining error as well as overshoots without satisfying results - so I kept I = 0 and D =0
  3. Increase FF1 very slightly and got the effect that was expected from integral part
  4. Put FF2 into action to remove overshoots as expected from differential part
As you can also see in the attached pictures this helped to extremely lower the following error to values below 0.07mm at 10m/min. With these values I seem to reached a limit. Typically I am machinng with velocities of less then 3m/min. At these velocities I get following errors which are ridicolously low.
I used these settings to mill a few parts and I am really happy with it!

Attached you will find my latest settings. 

Maybe you can try this approach with your machine setup and report if you also get good results?

​​​​​​​Cheers

 

Please Log in or Create an account to join the conversation.

More
3 years 8 months ago #265295 by pseudo
Hi Lausch,

As usual you've solved a problem just when I needed it ;) I'm going to implement this today and report back, I only have one question: "Inertia Ratio values remained unchanged" as in you reset them to defaults, or left them as they were after inertia ratio identification?

Also, your observation that I and D don't seem to behave how you expect matches my observations too, I ended up leaving the motors with a very sub-optimal tune as a result. I did play a little with the FFs but had crazy results - I suspect that once I implement your recommended changes and the drive is no longer fighting linuxcnc I'll get much more predictable results.

One other question: What is your setup for homing? Are you using CIA402 homing and a separate halcomponent? I'm using linuxcnc's basic homing currently but need to set my max ferror to 10mm so they don't following error during homing (for some reason they stop reporting position for some stages of homing?). I've noticed in some threads they mention the complexities of using CIA402 homing but as the issue is changing rapidly and a lot of the posts on it are a year old I've put that in the 'not right now' pile for a bit.

Please Log in or Create an account to join the conversation.

More
3 years 8 months ago - 3 years 8 months ago #265481 by pseudo
Quick update:

Did what you suggested and it definitely improved things. A couple other things I played with that you might find useful:
  • Manually tuning: X axis is flawed (dual fixed 4m ATL5 steel core belts the gantry crawls up like a rack, is effectively a spring, resonance issues) so I ended up manually tuning pr1.00-04, and pr1.12 while linuxcnc was simultaneously tuning the PID on linuxcnc. I started with setting the drive's stiffness to give some good starting values, then switching the auto modes off as you recommended, then playing with the settings manually. I didn't bother doing this for the other axis as they were fine without it. I managed to halve the following error this way (but likely only because it's such an odd kinematic setup)
  • 3.12 and 3.13 accel/decel: These values limit drive's responsiveness but do prevent jerk, I reduced the from the defaults (100) to 20
  • 3.14 - Sigmoid accel/decel: given the springiness of the X axis I added a tiny bit of S curve via this parameter which smoothed out the bounce and allowed smoother movement/tighter pid.
  • 3.16 Zero speed clamp: I'm unsure if this had any impact during PID testing but I suspect it will in use. Basically it sets what RPM the drive should consider 'stopped' and try and clamp the speed at 0. Given the very low reduction on X (one revolution of the motor is 6.3mm of travel) I dropped this to the lowest value of 10 for this axis. I think it'll have an impact when the drive is accelerating from stop etc.
  • 4.37-39: for the axis with a brake (Y in my case) tweaking these settings improved smoothness when the drive is enabled - previously the axis would drop a small amount when the motor turned off leading to a shock load on the brake. You might find it useful also
  • 6.08/09 torque compensation: It took forever to find a parameter to bias for gravity, turns out it's these two. My Y is on a 10mm ballscrew and pushing ~15kg, if you disconnect the motor from the screw it falls pretty quickly (all axis are set up for high speeds and small loads). I noticed that the drive would always lag going up and then overcompensate, by tweaking this I got it to behave symmetrically.


    One thing I haven't been able to figure out is vibration suppression... I previously got it to work (in one of the videos I sent you) but I haven't been able to get it to work with the velocity mode change (with drives set to auto or manual), not sure what's going on there. Also never got the adaptive auto filter to do anything (in position or vel mode), did you ever play with those features?
Last edit: 3 years 8 months ago by pseudo. Reason: Mistake

Please Log in or Create an account to join the conversation.

More
3 years 8 months ago #265533 by LAUSCH
Hi pseudo,

Good to hear that you are making continuous progress. And thank you for sharing all your experiences.
Unfortunately I cannot help you with the homing aspect. As my drives are equipped with multiturn absolute encoders there is no need to home the system at all.
It seems that due to the low acc. and vel. of my machine many standard parameters work sufficiently for me.
I will for sure try some of these parameters.
 

Please Log in or Create an account to join the conversation.

More
3 years 5 months ago #272217 by buzzFab
Hey pseudo and LAUSCH, I recently picked up some Leadshine EL8 and ELM2 motors and absolute encoders, I will probably start bench testing next week. how are your builds coming along? have you made any progress improving the response of the drives and motors?. I'm going to use Orange Pi 5 Plus instead of a RPi4 as it has dual 2.5g ethernet ports.  

Please Log in or Create an account to join the conversation.

Time to create page: 0.189 seconds
Powered by Kunena Forum