Welcome! Log In Create A New Profile

Advanced

Understanding acceleration

Posted by Chowderhead 
Understanding acceleration
March 09, 2012 07:42AM
I think I have a very basic understanding of the advantages of acceleration, but I was hoping someone could elucidate it further for me and make some suggestions regarding tuning acceleration settings.

Thanks!
Re: Understanding acceleration
March 10, 2012 03:58AM
They key part is flow rate from the nozzle and the rate of change of flow rate.

The robot is much, much, much faster than the extruder.

The key is determining the peak acceleration and deceleration in the flow rate, this will determine the peak acceleration/deceleration in the robot.

A machine is only as fast as its slowest component.
Re: Understanding acceleration
March 10, 2012 12:21PM
Without acceleration, the printer will try to instantly drive the motors into full speed from standstill when it executes a movement command. This causes a lot of stress to the mechanical components and just plain won't work unless the speeds are kept comparatively low. With acceleration, it's quite easy to increase the print speed until the extruder becomes the bottleneck.

I used to use an acceleration of 2000 mm/s*s for X and Y, but recently changed to 1000 mm/s*s, which made the printer operate better and had a negligible effect on the print times (a test block with lots of fine honeycomb infill took just 5% longer to print).

The extruder (at least my direct drive extruder) has practically no moving mass to accelerate so it can handle enormous accelerations (7000 mm/s*s) with no problems. It only limits the top speed, with acceleration the moving mass on other axes is the limiting factor.
Re: Understanding acceleration
March 10, 2012 11:26PM
If I'm understanding right:

Acceleration improves machine reliability by managing motor torque.
Tuning acceleration is a means of increasing production rate.

So if I'm not concerned with maintaining a high production rate, I don't really need to worry about optimizing acceleration? Does print quality benfit by lower acceleration settings? I'm guessing lower acceleration reduces energy consumption and therefore lowers heat load on the electronics?
Re: Understanding acceleration
March 12, 2012 11:52AM
No, going back to basic physics:

Force = Mass x Acceleration

From an axis perspective; If you set no acceleration and command a speed of say 200mm/s the motor needs to accelerate the mass of the axis from 0 to 200mm/s in 1 step (duration is proportional to commanded speed and is effectively non-linear). So it either has to be capable of generating ridiculous forces, which would probably break the machine! Or accelerate up to that speed.

As it cannot generate that kind of force the result is missed steps as the program is trying to step the motor again before it has completed the previous step.

The stepper motors are constant current, so always draw power while they are enabled. Although more frequent stepping will increase the power consumption of the system.

I personally would be more concerned that the electronics and associated components can take the heat load, rather than trying to reduce power consumption, as you may experience conditions that can overload the cooling system.
Re: Understanding acceleration
March 12, 2012 07:00PM
What does the "Jerk" parameter control?
It is presumably something similar to acceleration ?
Re: Understanding acceleration
March 12, 2012 07:40PM
It should be the rate of change of acceleration but I have a feeling the term may be misused in reprap firmware, although having never looked at any of it I could be completely wrong.


[www.hydraraptor.blogspot.com]
Re: Understanding acceleration
March 12, 2012 09:08PM
nophead Wrote:
-------------------------------------------------------
> It should be the rate of change of acceleration
> but I have a feeling the term may be misused in
> reprap firmware, although having never looked at
> any of it I could be completely wrong.

I took a quick look at the Marlin code since I have been wondering about this too.

Couldn't find a precise explanation, but it looks like it's related to the change of velocity at corners, so it's something that allows going through a corner at speed. From a mathematical standpoint, it's not possible to go through a sharp corner at speed with anything less than infinite acceleration, even if the lines share a velocity component, but the jerk value in the firmware allows fudging things a bit and blazing through a circle of line segments at pretty much full speed.
Re: Understanding acceleration
March 12, 2012 10:02PM
^Right. It decelerates enough so the X/Y components of the dV are equal to the jerk value. That way you don't come to a complete stop at every single line segment, but you are slow enough that machine compliance can round the corner enough without skipping steps.


www.Fablicator.com
Re: Understanding acceleration
March 13, 2012 08:55AM
Really back to basics; sorry to be pedantic and/or overly simplistic:

1) Assuming there is no slip, stepper motors rotate through a given arc by firing a set number of coils sequentially regardless of the rate of acceleration?
2) Acceleration is accomplished with stepper motors by changing the frequency at which motor coils fire?
3) Slip limits acceleration?
4) Real time current draw increases with increasing acceleration?
5) Does braking a loaded stepper motor require power or is the reverse emf used for braking?
6) If the extruder can be accelerated at significantly higher rates than any other motor-driven part, at very low axes speeds, is there a risk of having the extruder overtake axes movement? For instance, at a corner the axes accelerate out of it at a lower rate than does the extruder, so the diameter of the deposited plastic decreases moving out of the corner.

Edited 2 time(s). Last edit at 03/13/2012 09:52AM by Chowderhead.
Re: Understanding acceleration
March 13, 2012 09:29AM
1) Yes, for a given path the order the coils are triggered should remain the same, just at a different timing.
2) Yes
3) Yes (if the torque required to accelerate at a high rate is not supplied by the motor the motor misses steps)
4) Unsure, but don't think so.
5) Unsure, but I think power is required for fast breaking.
6) The extruder would only over overtake axis movement if the x/y axis are skipping steps. In reality, the extruder always lags the X/Y because the plastic acts like a spring and requires a certain amount of compression/pressure before extruding.


www.Fablicator.com
Re: Understanding acceleration
March 13, 2012 11:19AM
4) Current in the motor falls with speed and it can never exceed the stationary value because it is limited by the constant current drive. Power supply current increases slightly with increasing load, so will increase slightly during faster acceleration. This is a secondary effect due to the rotor lagging more and changing the phase of the back EMF relative to the drive EMF.

5) During breaking I think the PSU current will fall a little as the lag becomes a lead. The same effect as above but in reverse.


[www.hydraraptor.blogspot.com]
Re: Understanding acceleration
March 14, 2012 12:24AM
> 4) Real time current draw increases with increasing acceleration?

Real time current draw increases with increasing speed, but not by the method you would initially suppose

When the stepper is spinning, it acts as a generator, creating a voltage that opposes the drive current from the pololu. In response, the pololu must provide more voltage to overcome the back-EMF and keep the same current flowing.

From the pololu's perspective, voltage increases while current remains the same. Load power increases, and so it must take more current from the supply.

If the back-EMF ever reaches a level where the pololu hits the supply voltage and thus can't maintain current, then torque drops sharply and you will lose steps. This is why we use very low voltage stepper motors.

> 5) Does braking a loaded stepper motor require
> power or is the reverse emf used for braking?

The reverse EMF is used for braking in one of two ways- the pololu decides which is suitable for various parts of the cycle. They are listed in the datasheet as "fast decay" (motor self-generated current is returned to supply) or "slow decay" (motor self-generated current is shorted to maintain current flow)

If you unplug a motor from your electronics, it's fairly easy to spin by hand. now short out a pair and spin it. now short out both pairs, see how much force it takes to turn it smiling smiley

> 6) If the extruder can be accelerated at
> significantly higher rates than any other
> motor-driven part, at very low axes speeds, is
> there a risk of having the extruder overtake axes
> movement? For instance, at a corner the axes
> accelerate out of it at a lower rate than does the
> extruder, so the diameter of the deposited plastic
> decreases moving out of the corner.

No. It is the task of firmware to keep all axes locked together. It combines the vector components with acceleration and velocity limits for each axis, and chooses the highest overall acceleration and velocity that doesn't violate any axis' limits. You can see this easily by sending (eg)
G1 X100 Y100 Z1 F18000
G1 X0 Y0 Z50 F18000
The 2nd move should move a lot slower due to the firmware keeping all axes locked in sync while the Z axis' speed limit dominates.

This is why we can't use otherwise fantastic chips like the ST dSpin which has lots of acceleration profile stuff built-in, but no way to keep multiple axes synchronised.


-----------------------------------------------
Wooden Mendel
Teacup Firmware
Re: Understanding acceleration
March 14, 2012 12:26AM
Oh, forgot to mention that you'd have to brake our steppers extremely hard for the power consumption to drop to 0!


-----------------------------------------------
Wooden Mendel
Teacup Firmware
Re: Understanding acceleration
March 14, 2012 07:13PM
Thank you all for the explanations, never would have occured to me all that's required to control these little motors! I'm sitting here loving the music of the printer.
Re: Understanding acceleration
March 14, 2012 08:12PM
Chowderhead Wrote:
-------------------------------------------------------
> Thank you all for the explanations, never would
> have occured to me all that's required to control
> these little motors! I'm sitting here loving the
> music of the printer.

Doesn't take much to drive a stepper..

It does get quite complex when you want a stepper to maintain torque across a range of speeds without overheating, and then it gets even more involved when you want to keep multiple steppers synchronised when they have different speeds and loads!

Embedded development is _fun_ for those of us who are into it smiling smiley


-----------------------------------------------
Wooden Mendel
Teacup Firmware
Re: Understanding acceleration
May 16, 2012 03:28AM
My Mendel90 is printing quite nicely now but since changing to Marlin firmware a few days ago I have noticed significant warping at sharp corners of the base of angular prints. The print is generally sticking well to the glass and I am now wondering if this is an acceleration/jerk issue.

I like the way that Marlin speeds the nozzle around smooth curves. I don't like the way it is pulling the filament sideways on sharp corners.
Could someone advise me which parameters I should tweak, and in which direction, to make the head slow right down as it approaches a 90 degree angle, but stay nice and smooth around the narrower angles of gentle curves?
These are my current settings:
#define DEFAULT_AXIS_STEPS_PER_UNIT   {80.2, 80.2,2564,697.7}
#define DEFAULT_MAX_FEEDRATE          {500, 500, 5, 45}    // (mm/sec)    
#define DEFAULT_MAX_ACCELERATION      {1500,1500,50,250}    
#define DEFAULT_ACCELERATION          1500    // X, Y, Z and E max acceleration in mm/s^2 for printing moves 
#define DEFAULT_RETRACT_ACCELERATION  1500   // X, Y, Z and E max acceleration in mm/s^2 for r retracts
#define DEFAULT_MINIMUMFEEDRATE       0.0     // minimum feedrate
#define DEFAULT_MINTRAVELFEEDRATE     0.0
#define DEFAULT_MINSEGMENTTIME        20000   // Obsolete delete this
#define DEFAULT_XYJERK                20.0    // (mm/sec)
#define DEFAULT_ZJERK                 0.4     // (mm/sec)

Re: Understanding acceleration
May 16, 2012 04:15AM
richgain Wrote:
-------------------------------------------------------
> My Mendel90 is printing quite nicely now but since
> changing to Marlin firmware a few days ago I have
> noticed significant warping at sharp corners of
> the base of angular prints. The print is generally
> sticking well to the glass and I am now wondering
> if this is an acceleration/jerk issue.

nope, that's definitely bed too hot. leave it hot for first layer, then drop temperature below Tg.

I use 70c for PLA first layer bed temperature then 55c for rest of print, with kapton surface.

I don't go above 100c with ABS, I find it ruins the ABS film left by abs+acetone method. I have never found any technique that allows me to print ABS on bare glass, and I've tried /everything/.


-----------------------------------------------
Wooden Mendel
Teacup Firmware
Re: Understanding acceleration
May 16, 2012 04:52AM
Do the corners of the first layer stick properly or are the pulled up as it corners?

Perhaps all you need to do is slow the first layer outline speed, or increase the bed temperature for the first layer.


[www.hydraraptor.blogspot.com]
Re: Understanding acceleration
May 16, 2012 05:42AM
nophead Wrote:
-------------------------------------------------------
> Perhaps all you need to do is slow the first layer
> outline speed, or increase the bed temperature for
> the first layer.

The photos show that the warping occurs after printing the perimeter, look closely at the corner on the left. If it were simple poor adhesion or too fast first layer then it would look scrappy and come good in a few layers rather than look like it printed fine then shrank afterwards. I've had that issue before, and it was definitely leaving the bed too hot during the print. The other sign is that only the bottom ~10mm has shrunk inwards, the rest of the print looks fine.


-----------------------------------------------
Wooden Mendel
Teacup Firmware
Re: Understanding acceleration
May 16, 2012 05:55AM
The part in the photo was printed in ABS with:
30 mm/s outlines and infill
50% speed on first layer
2 perimeters and 3 solid layers, 25% infill
Nozzle temp 235C for first layer then 225C
Bed temp 120C throughout - cleaned with acetone, no ABS juice.

The first layer prints nicely with no distortion of the corners. The second layer is when the corners start to lift as the head changes direction.
I will try again with a lower bed temperature and an even slower speed.
Re: Understanding acceleration
May 16, 2012 06:44AM
Yes 120C is too hot after the first layer. You need to be below the melt point of the ABS.

I can't get ABS to stick to glass unless I use ABS juice. Even then it seems unreliable. Sometimes objects lift. Sometimes they stick so well they pull flakes off the glass when removed.


[www.hydraraptor.blogspot.com]
Re: Understanding acceleration
May 16, 2012 07:37AM
nophead Wrote:
-------------------------------------------------------
> Yes 120C is too hot after the first layer. You
> need to be below the melt point of the ABS.
>
> I can't get ABS to stick to glass unless I use ABS
> juice. Even then it seems unreliable. Sometimes
> objects lift. Sometimes they stick so well they
> pull flakes off the glass when removed.

wow I've never had that problem, I find that the ABS film pulls off glass very easily, too easily to prevent warping. I had to put it on sanded PET tape to stop it pulling up..


-----------------------------------------------
Wooden Mendel
Teacup Firmware
Re: Understanding acceleration
May 16, 2012 11:55AM
Now onto my fourth attempt, and finally making some progress.
For the third attempt I tried slowing the print speed down to 24 mm/s, used ABS juice and turned the heated bed down to 120C first layer, 100C the rest, and it was much worse. All the pieces warped and came loose very easily when I aborted.
Now it's running at 16 mm/s with 120C first layer and 110C thereafter. Painfully slow to print but at least all the pieces are holding so far.
It still makes me think that a profile that printed faster but decelerated into the sharp corners and accelerated after them could work as a strategy for reducing warping.
Re: Understanding acceleration
May 16, 2012 12:44PM
The first layer should be stuck so well that it doesn't matter what happens on the layer above. After all the only contact with the layer below is with molten plastic, so it shouldn't be able to excerpt much force. Seems like your basic problem is adhesion. If molten plastic dragging on it is enough to lift it how will it hold down the massive warping force the corners of a large object except when a few mm high?

It should be decelerating around sharp corners since one motor has to stop and the other start from stopped. If it manages that with no acceleration why would it ever need any as it is the worst case condition where it decelerates the most. On shallower bends it can decelerate less.


[www.hydraraptor.blogspot.com]
Re: Understanding acceleration
May 16, 2012 06:07PM
Thanks all, for your helpful advice. I did finally succeed in getting almost flat pieces at the fourth attempt.



You have rightly pointed out, nophead, that the motors are decelerating and accelerating already. I suppose I was thinking about varying the rate of deceleration and acceleration - is that the jerk factor? I'm curious to know why printing more slowly causes less warping. All the advice recommends it and it certainly seems to have helped in my case, but I'm not sure I fully understand how it works.
Re: Understanding acceleration
May 16, 2012 08:26PM
I don't know why slower would produce less warp, perhaps because it allows the plastic more time to solidify before the next layer.

Mathematically jerk is the rate of change of acceleration but I think Marlin uses it to mean a speed below which acceleration isn't used. I.e. up to a certain speed you can start instantaneously, so no point in accelerating below that speed. You can jump to it and then accelerate from there.

I just use simple trapezoidal acceleration with no look ahead.


[www.hydraraptor.blogspot.com]
Sorry, only registered users may post in this forum.

Click here to login