7i33 servo loop tuning error
31 May 2016 12:35 #75284
by Octo cnc
7i33 servo loop tuning error was created by Octo cnc
Hi. I am trying to tune a servo loop using a 7i43, a 7i33 and a copley junus servo amplifier. The motor is a electrocraft e243. I have already tune the torque and velocity loop with the amplifier using the copley tuning program (CME2). The motor max speed is 5000 rpm.
I have tuned the amplifier so that 10v analog input is 4200 rpm (70 rps). I haven't link the motor to anything yet. So I have changed the scale to 1 turn = 1 mm so that the top speed is 4200 mm/min or 70 mm/second for clarity purpose. The encoder as 2500 input/rev. When I tune the drive at low speed I manage to have a low error or at least I can see that the error gets smaller when I tune the drive using halscope and the calibration tool. However I have some issues at higher speed where I have a big error. It seems to be a change when I crossed the 600 rpm mark. The error gets bigger, the faster I go. I have the same error bump with a P (PID) value of 20 or 150 so I don't think it come from PID values. Maybe the rate is to high for the 7I43. Does someone has an idea why I have this error?
I have attached the INI file and two screenshots. One is the velocity and error at 500 rpm and the other is the velocity and error at 600 rpm.
Thank you.
I have tuned the amplifier so that 10v analog input is 4200 rpm (70 rps). I haven't link the motor to anything yet. So I have changed the scale to 1 turn = 1 mm so that the top speed is 4200 mm/min or 70 mm/second for clarity purpose. The encoder as 2500 input/rev. When I tune the drive at low speed I manage to have a low error or at least I can see that the error gets smaller when I tune the drive using halscope and the calibration tool. However I have some issues at higher speed where I have a big error. It seems to be a change when I crossed the 600 rpm mark. The error gets bigger, the faster I go. I have the same error bump with a P (PID) value of 20 or 150 so I don't think it come from PID values. Maybe the rate is to high for the 7I43. Does someone has an idea why I have this error?
I have attached the INI file and two screenshots. One is the velocity and error at 500 rpm and the other is the velocity and error at 600 rpm.
Thank you.
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Away
- Platinum Member
Less
More
- Posts: 5007
- Thank you received: 1441
31 May 2016 13:36 - 31 May 2016 13:42 #75288
by Todd Zuercher
Replied by Todd Zuercher on topic 7i33 servo loop tuning error
Try setting your OUTPUT_SCALE = 10 instead of 70.
When you set that to 70 it is like saying the maximum speed (70rps) would take 70 volts from your analog output to your amp, but the max output is capped at 10v. At F600 you run out of head room (your 600rpm or 10rps) and your max output hence the large growing following error.
When you set that to 70 it is like saying the maximum speed (70rps) would take 70 volts from your analog output to your amp, but the max output is capped at 10v. At F600 you run out of head room (your 600rpm or 10rps) and your max output hence the large growing following error.
Last edit: 31 May 2016 13:42 by Todd Zuercher.
Please Log in or Create an account to join the conversation.
31 May 2016 14:34 #75291
by Octo cnc
Replied by Octo cnc on topic 7i33 servo loop tuning error
Thank you for your answer. You are right. It works now. I thought that OUTPUT_SCALE was the 10v velocity in mm/s.
I guess the 10v velocity is MAX_VELOCITY.
Do you now what STEPGEN_MAXVEL is?
Thank you.
I guess the 10v velocity is MAX_VELOCITY.
Do you now what STEPGEN_MAXVEL is?
Thank you.
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Away
- Platinum Member
Less
More
- Posts: 5007
- Thank you received: 1441
31 May 2016 15:08 #75293
by Todd Zuercher
Replied by Todd Zuercher on topic 7i33 servo loop tuning error
STEPGEN_MAXVEL and STEPGEN_MAXACCEL are the maximum velocity and acceleration settings for a step generator (step motor, or step/dir servo control). They don't really apply to an analog servo control, I don't know why they'd even be there. You can probably safely comment them out or remove them. Often they need to be set a little higher than the actual max velocity and acceleration settings for the joint, to accommodate backlash compensation, and some other things.
Please Log in or Create an account to join the conversation.
31 May 2016 16:48 #75297
by Octo cnc
Replied by Octo cnc on topic 7i33 servo loop tuning error
ok. I think it's in the INI file because I have use a firmware with 4 pwm and 4step although I haven't define any axe as step dir.
Thank you.
Thank you.
Please Log in or Create an account to join the conversation.
02 Jun 2016 14:28 #75336
by andypugh
Replied by andypugh on topic 7i33 servo loop tuning error
Be aware that a bare motor is often very hard to tune, and that the optimal tune for the bare motor will be very non-optimal once the motor is moving the machine.
Please Log in or Create an account to join the conversation.
03 Jun 2016 10:24 - 03 Jun 2016 10:26 #75396
by Octo cnc
Replied by Octo cnc on topic 7i33 servo loop tuning error
yes. I know that. I wanted to see how it works first without loads just in case I would make a stupid mistake.
I have another question about servo tuning:
The junus amplifier can be controlled by analog +-10v which works now with the 7i43 and a 7i33.
It could also be controlled by PWM signal. There is two mode:
1. PWM+DIR where the PWM varies from 0 to 100% and a DIR pin goes high or low for direction control.
2. PWM only where the PWM varies from 0 to 100%. values over 50% are seen as positive values. Values under 50% are seen as negative speed values.
I have connected the amplifier signal directly to the 7i43 and created some configuration to try it.
When I tried a configuration with PWM type1 or PDM and use the PWM+DIR config of the amplifier. The motor went crazy when I start to move it. I don't know why. I have tried to change the coder and motor sign without success.
I tried a configuration with PWM type0 and use the PWM only mode with the amplifier. It works ok except that when I start a move after I push the F2 button the motor moved a little bit in an awkward way. After that slight move the offset is off by around 1mm so I have a 1mm error. If I move after that there is no problem. The motor turns smoothly and does the right move except that the machine position is still off. If I command a G1 x10 f400, the machine will go to x11then If I command a G1 x15 f400, the machine will go to x16. The movement are precise. I can eliminate this problem by doing a homing after I push the F2 button but it means that I have to home that axis each time I put the machine on and off with F2.
I have attached a capture of what is happening when I push the jog button right after I turned the machine on with F2.
any idea?
Thank you.
I have another question about servo tuning:
The junus amplifier can be controlled by analog +-10v which works now with the 7i43 and a 7i33.
It could also be controlled by PWM signal. There is two mode:
1. PWM+DIR where the PWM varies from 0 to 100% and a DIR pin goes high or low for direction control.
2. PWM only where the PWM varies from 0 to 100%. values over 50% are seen as positive values. Values under 50% are seen as negative speed values.
I have connected the amplifier signal directly to the 7i43 and created some configuration to try it.
When I tried a configuration with PWM type1 or PDM and use the PWM+DIR config of the amplifier. The motor went crazy when I start to move it. I don't know why. I have tried to change the coder and motor sign without success.
I tried a configuration with PWM type0 and use the PWM only mode with the amplifier. It works ok except that when I start a move after I push the F2 button the motor moved a little bit in an awkward way. After that slight move the offset is off by around 1mm so I have a 1mm error. If I move after that there is no problem. The motor turns smoothly and does the right move except that the machine position is still off. If I command a G1 x10 f400, the machine will go to x11then If I command a G1 x15 f400, the machine will go to x16. The movement are precise. I can eliminate this problem by doing a homing after I push the F2 button but it means that I have to home that axis each time I put the machine on and off with F2.
I have attached a capture of what is happening when I push the jog button right after I turned the machine on with F2.
any idea?
Thank you.
Last edit: 03 Jun 2016 10:26 by Octo cnc.
Please Log in or Create an account to join the conversation.
06 Jun 2016 20:12 #75580
by Octo cnc
Replied by Octo cnc on topic 7i33 servo loop tuning error
Hi. I have fixed it using the bias parameter.
bye.
bye.
Please Log in or Create an account to join the conversation.
Moderators: cmorley
Time to create page: 0.076 seconds