Stepper Acceleration and Velocity clarification

Supporting Visual Studio on Windows
nm17
Phidgetly
Posts: 32
Joined: Mon Nov 27, 2017 3:29 am
Contact:

Stepper Acceleration and Velocity clarification

Postby nm17 » Wed Mar 25, 2020 5:19 am

Hi

I hope everyone is well and safe.

I was wondering if you could help / clarify how acceleration and velocity of bipolar steppers works when connected to STC1003 and StepperController class.

1. Velocity: the VelocityMax in Stepper class is 115,000 but I can set it to much higher value and the motor appears to be working faster. Can you please explain why is the maximum 115,000 and what is the actual effect of setting higher values as velocity? Is 115,000 parameter equivalent of 115,000 microsteps per minute?

2. Acceleration: what exactly is the Stepper.Acceleration parameter and how is it affecting real velocity? I note AccelerationMax is 10,000,000 which looks like quite a large number. For example, can you explain / provide formula used by the controller / graph for a scenario - if I set motor.Velocity=115000 motor.Acceleration to 50,000 - what does the actual velocity curve look like over time over e.g. 100000 steps (or 10s of operation)?

Esentially I am trying to finetune motor so understanding how software parameters are translated in velocity and acceleration would be very helpful.

Thanks

fraser
Engineering
Posts: 280
Joined: Thu Nov 19, 2009 4:41 pm
Contact:

Re: Stepper Acceleration and Velocity clarification

Postby fraser » Wed Mar 25, 2020 10:47 am

All of the units for these values are found on the product page under specifications. Velocity is microsteps per second, so the device at a velocity of 100,000 will perform 6250 full steps (100000 1/16 steps) in 1 second.

Acceleration is microsteps/second^2. So if your acceleration is 10000, and your MaxVelocity is 100000, your current velocity will increase by 10000 microsteps every second until it reaches 100000 microsteps/sec.

Very large accelerations are allowed to accommodate near-instant acceleration if desired. 10,000,000 microsteps/s^2 would get a motor from 0-100,000 in ~10 milliseconds.

Hope this helps clear some things up, if anything else is unclear, let me know

nm17
Phidgetly
Posts: 32
Joined: Mon Nov 27, 2017 3:29 am
Contact:

Re: Stepper Acceleration and Velocity clarification

Postby nm17 » Wed Mar 25, 2020 1:54 pm

Thanks Fraser, this really clarifies (I think the spec does not mention 'per second' explicitly hence the confusion about what the units represent).

The remaining questions on this topic I have are:

1) Veolcity Max in the API is 115000 - is there any particular reason why this is 115,000? I can actually drive motor faster by just setting Velocity to a higher value so I am unsure to the logic behind 115,000 - I assume this could be some hardware limitation?


2) Will the controller limit the velocity to what is set as Stepper.Velocity regardless of acceleration? In other words, the controller will not try to accelerate once it reaches the set velocity, correct? I assume this is the case but I have been getting a resonance-like high pitch noise from the motor at various (high) speeds and it felt like velocity going above what was set but I can't be sure so wanted to confirm controller will not exceed velocity :-)

Thanks

fraser
Engineering
Posts: 280
Joined: Thu Nov 19, 2009 4:41 pm
Contact:

Re: Stepper Acceleration and Velocity clarification

Postby fraser » Thu Mar 26, 2020 10:11 am

It should be limiting at 115000, so I will have to take a look at that. We recently did a big stepper overhaul and its possible something snuck through testing.

1) The limit at 115000 is infact a hardware limitation. We wanted to provide as much speed as possible. Stepper logic is pretty processor intensive, as you have to process all the information between each step. That velocity limit is near the limits of the processor but not beyond.

2) The controller should not exceed the set velocity. Basically if the next calculated velocity on an acceleration is above the max velocity, it will choose the max velocity over the higher velocity. I hope that you're not actually seeing that it is going higher because that would be a big problem. You can always add a VelocityChange event to see what the actual velocity is compared to your MaxVelocity. If you find the velocity is in fact exceedting the max, let me know.

nm17
Phidgetly
Posts: 32
Joined: Mon Nov 27, 2017 3:29 am
Contact:

Re: Stepper Acceleration and Velocity clarification

Postby nm17 » Fri Mar 27, 2020 4:04 am

You were (unsurprisingly :roll: ) right. The max velocity will go to 115k only. Being able to set the Stepper.Velocity above the 115k max makes sense as I guess this allows programmer to have more options for achieving different acceleration curves.

I have attached a diagram showing how 300k velocity with 150k acceleration compares to 150k velocity with 75k acceleration over roughly 260k micro-steps.

I still get a lot of hissing resonance sound at the top of the Velocity I set. It seems like the acceleration is really driving the resonance the only way to avoid resonance seems to be setting acceleration at about half the velocity to avoid hissing. Is this expected behaviour from a stepper??

Thanks for your clarifications, I hope this conversation is useful to someone else in future too!
Attachments
speed comparison 300-115k.PNG


Return to “C#.NET”

Who is online

Users browsing this forum: No registered users and 1 guest