Mori MVJR Build Log

More
06 Nov 2011 04:05 - 06 Nov 2011 04:06 #14602 by schmidtmotorworks
Progress Report

I have power to the servos now with one axis motor disconnected from the screw for testing.
I tried the manual jog in AXIS and the motor turned about 1/2 turn then started vibrating.
(I have to admit it was exciting to see something move on that machine!)

From reading the following in PID tuning, I guess this means the P is too high or I should increase I next.

'"Simple method

If the system must remain on line, one tuning method is to first set the I and D values to zero. Increase the P until the output of the loop oscillates. Then increase I until oscillation stops. Finally, increase D until the loop is acceptably quick to reach its reference. A fast PID loop tuning usually overshoots slightly to reach the set point more quickly; however, some systems cannot accept overshoot."


I am not clear what "increase P until the output of the loop oscillates" means.

Does it mean the same as the drive motor vibrating?

If so, does it mean that it would:
1. Start to osculate just from increasing the P without jogging it?
2. Start to osculate just from increasing the P after jogging it?
3. Something else?

I guess the next thing to do is start tuning the rest of INI file.

The default value DEADBAND in my INI = 0.000015; I don't know what resolution my encoder has but I would be surprised to hear that it was that close, maybe that number should be more like 0.0002"?

Here is what I have now, if anyone sees something out of line can you set me straight?

[TRAJ]

AXES = 3
# COORDINATES = X Y Z
COORDINATES = X Y Z
# HOME = 0 0 0 0
HOME = 0 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
CYCLE_TIME = 0.010
DEFAULT_VELOCITY = 1.00
MAX_VELOCITY = 6.567
DEFAULT_ACCELERATION = 6.0
MAX_ACCELERATION = 10.0

[AXIS_0]

TYPE = LINEAR
MAX_VELOCITY = 6.567
MAX_ACCELERATION = 10
BACKLASH = 0.000
FERROR = .5
MIN_FERROR = .5

INPUT_SCALE = -25400

# PID tuning params
DEADBAND = 0.000015
P = 10
I = 0
D = 0
FF0 = 0
FF1 = 0
FF2 = 0
BIAS = 0
Last edit: 06 Nov 2011 04:06 by schmidtmotorworks.

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

More
06 Nov 2011 13:33 #14604 by BigJohnT
Replied by BigJohnT on topic Re:Mori MVJR Build Log
schmidtmotorworks wrote:

I am not clear what "increase P until the output of the loop oscillates" means.

Does it mean the same as the drive motor vibrating?

If so, does it mean that it would:
1. Start to osculate just from increasing the P without jogging it?
2. Start to osculate just from increasing the P after jogging it?
3. Something else?


I'd start with a P = 1
The oscillates is when the PID is trying to hold the position but it keeps overshooting due to too much P for the rest of the settings. Having said that you won't be able to tune the servos without the full load on the motor. It is a good idea to make sure your in control of the the motor before tuning the axis. I would increase the P in small increments or it might get wild (wonder how I know) and exciting. I would venture to guess that the vibration is really motor oscillation trying to hold position but overshooting on each attempt.

Have you seen the wonderful and clear explanations on PID and FFn on this forum?

John

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

More
06 Nov 2011 15:50 #14607 by schmidtmotorworks
Hmmmm, maybe my procedure is off then.

I removed my drive motor thinking I would need to adjust the speed first.

But now I find this osculation problem shows up first.

So what should I do first?

Reconnect the motor to tune PID, or get it roughed-in while it is disconnected first?

Have you seen the wonderful and clear explanations on PID and FFn on this forum?


I'm not sure, I found some reading, but don't feel confident that I know what I am doing.

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

More
06 Nov 2011 16:01 #14608 by PCW
Replied by PCW on topic Re:Mori MVJR Build Log
I would leave it connected, the tuning will be quite different for bare motors than when they are connected to the ballscrews/linear_motion_parts

You also may need to tune the drives velocity loop (outside of EMC, for older drives this may be a potentiometer adjustment)

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

More
06 Nov 2011 17:11 #14611 by BigJohnT
Replied by BigJohnT on topic Re:Mori MVJR Build Log
schmidtmotorworks wrote:

Hmmmm, maybe my procedure is off then.

I removed my drive motor thinking I would need to adjust the speed first.

But now I find this osculation problem shows up first.

So what should I do first?

Reconnect the motor to tune PID, or get it roughed-in while it is disconnected first?

Have you seen the wonderful and clear explanations on PID and FFn on this forum?


I'm not sure, I found some reading, but don't feel confident that I know what I am doing.


Read this.

www.linuxcnc.org/component/option,com_ku...,14483/lang,english/

and like Peter said you can't tune the bare motor as the reactions will be very different and you will find that you have wasted a bunch of time, unless of course your learning how to use HalScope or making sure your e-stop circuit is near by and functioning properly... I might do those with the bare motor.

John (who is a rank beginner when it comes to servo tuning and has only done it 3 times)

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

More
06 Nov 2011 17:23 - 06 Nov 2011 19:17 #14612 by schmidtmotorworks
After a reboot python problem went away
Last edit: 06 Nov 2011 19:17 by schmidtmotorworks.

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

More
07 Nov 2011 01:41 - 07 Nov 2011 05:24 #14624 by schmidtmotorworks
Major progress today, I set the P (in PID) to 1.0 now all the axis can move smoothly.
Last edit: 07 Nov 2011 05:24 by schmidtmotorworks.

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

More
07 Nov 2011 11:51 #14631 by BigJohnT
Replied by BigJohnT on topic Re:Mori MVJR Build Log
Great news! You'll soon be making chips...

John

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

More
07 Nov 2011 13:44 #14633 by andypugh
Replied by andypugh on topic Re:Mori MVJR Build Log
schmidtmotorworks wrote:

I have power to the servos now with one axis motor disconnected from the screw for testing.
I tried the manual jog in AXIS and the motor turned about 1/2 turn then started vibrating.

As has been said, it is very difficult to tune PID with a bare motor. However, it is a good idea to start with a bare motor to make sure that it isn't going to run away (the fact that the motor stopped indicates that the encoder and controller agree about which way is clockwise, which is a very good start.)

I have forgotten what sort of motor you have, but if they are brushless then it might be worth commenting out the PID from the HAL and making sure that you can spin the bare motor smoothly at variable speeds with setp commands from the command line or in the machine->show hal config window.

Whilst you can't tunr you PID loop properly for the machine, you might be able to tune the bare motor with a very low P and I terms, but the numbers you come up with will be entirely wrong for when the machine is re-connected. Don't get too worried if you can't actually tune the bare motor.
However, what you have done so far is not a waste of time because you now know that the motor isn't going to run away.

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

More
07 Nov 2011 16:02 #14647 by schmidtmotorworks
My motors do have brushes.

With P set to 1, I was able to send

"unlinkp hm2_5i23.0.pwmgen.00.value"
"setp hm2_5i23.0.pwmgen.00.value .1"

the motor ran smoothly

I stepped it up to:
"setp hm2_5i23.0.pwmgen.00.value .5"

It still runs smooth but a little more than twice as fast as i expected so I will probably start adjusting the pots tonight. Is it correct to do this before PID have been established, or will I need to come back and do that again later?

I thought I had read an explanation of a procedure to adjust PID using halscope but I can't find it now.
Does anyone know of a doc on that?

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

Moderators: cncbasher
Time to create page: 0.546 seconds
Powered by Kunena Forum