Servo tuning issues (Velocity mode driven from 7i77)

More
22 Apr 2019 01:12 #131444 by tommylight

Tommylight, if my encoder_scale was set incorrectly, wouldn't I get the wrong output for a commanded distance? For example, right now if I command 1", I get 1". If it was set 4x too low, for a 1" command, wouldn't I expect to get 0.25" of axis motion?

Yup that is correct. Just wanted to be sure. Thank you.

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

More
28 Apr 2019 02:11 #132143 by fungus
No sir, thank you :)

Something occurred to me this week; the DMMDRV configuration software only allows you to tune the drive while it is in "positioning" mode. It may be that the drive is capable of true "velocity" mode, but is tuned in a funky way. I'm going to dig back into the drive's settings and maybe try to use LinuxCNC to drive it during the tuning process.

My f-error plot is not symmetrical in the over/undershoot plots as I'm tinkering with FF1 & FF2. A lot of my issues smell like a velocity loop problem.

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

More
03 May 2019 15:09 #132640 by adamj12b
A little late to the party but I may be able to shed some light on the Dyn4 Drives.

I retrofit my bed mill with them and 1kW servos and had a hell of a time getting them tuned to where I was happy. forum.linuxcnc.org/30-cnc-machines/33016...ofit?start=80#114020

First, The DMMDRV tunes the drive is position mode for auto-tuning, but according to DMM, its ok. Also, I was not getting full speed from the motor. Here is what tech support told me:

The auto tuning always puts the drive in position mode so it doesn't matter what the final control mode is. I t calculates the parameter depending on the load and not control mode. Don't worry about the inertia mismatch, the auto tuning usually does a very accurate job reading the load and setting the parameters.

In speed servo mode, the GEAR_NUM parameter is used to set the speed at 10V analog input. So I imagine your GEAR_NUM is currently set to the default 500 so it's only achieving ~430rpm.

Change GEAR_NUM to 3000 and put the drive into speed mode then test again. You should be close to 3000rpm at 10V input.


With that said, I was never able to get the drives and thus machine tuned, to my satisfaction using velocity mode. I ended up using torque mode and had way easier success. Originally, Feburary 2018, I tuned the drives by hand as the auto-tune we released a few weeks after I did this. I found out about the auto-tune a year later, Feb 2019 and decided to give it a shot. Even after understanding linuxcnc and servos a lot more, I was not able to get the velocity loop to work at the same results as previous torque mode. So I switched back to torque with re-tuned linuxcnc and the results were even better then before. In torque mode, It took a huge amount of P gain to get the system to be rigid.

Here is a picture of my Z axis tuning plot and pid settings. Andy told me on the IRC a few months back that this was tuned tighter then he could have bothered. :laugh:



Im curious to see your error plot.

As for hardware, I am running 1kW servos, with 2:1 belt reduction into 5TPI screws on all 3 axis. The line Num in the drive is set to 1000 to output the encoder signal as 1000 lines. Once quadrature decoded, thats 4000 CPR. * 2 for belt = 8000 and then *5 for the screw is the 40000 for the axis scale.



If you need a look at my working config, I can send some your way when I get to the machine. Just let me know.

Hope it helps

-Adam
Attachments:

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

More
05 May 2019 15:59 #132850 by fungus
Hey Adam!

Thanks for the tips. I'm a bit baffled why DMM buries the true gains from the end user. You can definitely still get it into non-working states, so they really should just open it up.

I am very confused about one thing: in the DYN4 manual , it specifically states that the GEAR_NUM parameter does not relate to anything but "Position Mode" and "RS-232" commands (seen on page 44 of above link).
Did you get a change from it? It shouldn't be valid for your torque loop either from what the manual indicates!

I was not able to use the auto-tuning, as every time it made the Integration Gain far too high (eventually faulting the drive due to over-temperature). I have belt drives (4:1), so it's not rigid enough to have much kI. I have about as much faith in auto-tuners as I do in auto-routers for PCBs ;)

I may not be able to get it to a satisfactory state, but I may get it good enough to cut some metal at low feed rates. Both my mill and lathe are down right now due to servo tuning issues. I need something that works!

I'll try to post a pic of my following error later this evening.

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

More
05 May 2019 23:12 #132886 by fungus
Here's the following error on the X axis. This is done by jogging with the "+/-" buttons in Axis.
Note the following error before and after the command... Before is above, after is below. Also, the overshoot at beginning and end are asymmetrical.
Attachments:

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

More
06 May 2019 00:20 #132889 by fungus
Hmm. I ran a modified version of the lathe_pawn example, and the following errors there are quite significant.

I'm at a bit of a loss as to what I should do here. Maybe scrapping this and going for the torque mode is the next step...
Attachments:

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

More
06 May 2019 00:51 #132891 by adamj12b
That is quite far off...

In usually don't have much faith in auto tuning but decided to note my config and give it a shot. It definitely helped big time in the ring on deceleration.

First, can you tell us more about your hardware. What is the machine? How much inertia? What motor model and voltage are for feeding the drive.

What I found surprising helpful, was don't pick the motor you have, but pick the next size up. This changes the the inertia mismatch calculation and thus gains. I picked the 1.3kw motor when I only have 1.0. also set all settings on the least rigid options. Then tweek them down. Temp issues are concerning. I have never had any issues with no active cooling.

-Adam

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

More
12 May 2019 16:07 #133568 by fungus
I asked DMM some questions regarding the issue. Followings is the reply:

Hello,

The tuning of the drive is all the same no matter the final operation mode.

I assume you already ran through the auto tuning from the program, correct?

If the motion is not ideal, you can let us know the problem and we can advise to adjust the Gain parameters manually.

You can also use the Test Movement in the parameters screen and set the movement to Step and increase the amplitude to maximum so the motor moves 45degrees at 1Hp. Then change the parameters while the motor is in motion so determine the best settings.

Normally for a lath the Integration Gain is set to 5 and does not need to be changed. Keep Speed Gain a bit lower than Main Gain and increase/decrease these two parameters until the motion is stable. For example, start with Main Gain at 10 and Speed Gain at 8 and increase until the movement is rigid.


I really don't dig the concept that the tuning is the same for separate modes. Really, the target market for these is probably those who will utilize the step/dir or serial command capabilities.

I'm going to attempt to tune up the "Torque" mode and see if I have better luck there.

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

More
12 May 2019 18:15 - 12 May 2019 18:16 #133585 by fungus
Adam,
Sorry about forgetting to include this info.
Lathe: Nardini FastTrace toolroom lathe.
Motors: DMM 86M-DHT 750W (no brake)
Drives: DYN4, 240VAC
Inertia: I could do a lot of calculation and find this, but I have no specs. How would I go about quantifying this without disassembling the machine and weighing the saddle/cross slide?
Reduction: 4:1, belts

As for temp issues, the servo does not actually have temperature feedback (or that's what I was told). The temperature is calculated within the DYN4 based on load detected. Odd, but maybe that works.
Last edit: 12 May 2019 18:16 by fungus.

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

More
12 May 2019 19:54 #133592 by fungus
I set up the X axis as torque mode, and so far it's gone a lot smoother.

Attached is how far I've gotten in LinuxCNC. One thing that is persistent in all is the flatline f_error both before and after jog motions. Am I missing something here? Is it a tuning issue or an artifact of jog motions vs MDI?

(purple = vel-fb, overlayed on green = joint-vel-cmd, blue = output, red = f-error)
Attachments:

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

Time to create page: 0.145 seconds
Powered by Kunena Forum