So, what the heck is "phase stepping" ?
In the discussions about VFAs (or belt ripple?) and acoustic noise in the Core One, we keep coming back to "phase stepping calibration". A feature that was introduced in the Prusa XL and apparently helped a lot to avoid resonances in particularly noisy XL units. Prusa developers have stated on Github that "phase stepping is already active on the Core One, but it cannot be calibrated yet".
So I'm wondering: What exactly is phase stepping, and how is it calibrated? The most detailed info I found from Prusa was in a blog post. But that mainly explains the benefits (smoothing out whatever unit-specific tolerances in the stepper motors), not really the technical details.
My best guess so far:
- Stepper motors are used in micro-stepping mode (up to 256 micro steps per full motor step, where a full motor step is either 1.8° or 0.9° of rotation). You increase the current on one motor winding, while decreasing the current on the other, both following a sinusoidal pattern (shifted by 90° between windings).
- But the micro-steps are known not to be evenly spaced, i.e. following that sinusoidal current pattern in equidistant time steps will not result in equidistant micro-rotation of the motor axis. When you intend to drive the motor at a constant speed, you will instead produce small periodic speed variations.
- So I assume that "phase stepping" is a way of driving the motor windings which lets you correct for this unevenness -- either by programming the current curves in a shape that slightly deviates from the nominal sine pattern, or by varying the time steps to be not-quite-equidistant. And "calibrated phase stepping" means that you can determine and optimize either the current curve or the time steps to give the smoothest motor operation.
Does anyone here have more background knowledge on this? Are the above assumptions correct? If so, which correction is actually used -- tweaking the currents or the time steps? Special thanks for any link to a technical document (from Prusa, the Marlin firmware team, or Trinamic maybe?) which you might have!
RE: So, what the heck is "phase stepping" ?
I can't answer your question about what specifically Prusa means, but I can confirm from personal experience that tracking linearity can be improved by modifying the stepping program to account for characteristics of a specific motor. I did this in the context of a 3d-printed altazimuth telescope mount, which I was able to get to track surprisingly well. In that case because I was driving a telescope, I could compute the correction by pointing the telescope at a target and observing how the target moved in the camera image as I drove the stepping motor a specific program of voltages, adjust the program acordingly, and iterate this a few times. (I also had to correct for an unknown nonlinearity due to optics, but I could separate that from the motor nonlinearity because the former was low spatial frequency while the latter was high frequency.)
By the way, I'm not quite sure whether a sine wave is the necessarily best program to use even in the absence of motor irregularities. The crucial thing is that you drive the adjacent windings in a complementary fashion as the rotor moves from one to the next. I did experiment with a few different starting points (e.g. sine wave, sawtooth, etc.), but I don't recall what ended up being the best starting point. But I'm certainly not an expert so maybe there's some good reason to use a sin wave instead of some other shape. Maybe someone can comment on that?
RE: So, what the heck is "phase stepping" ?
I'm also very interested in the technology behind, but only find documentation about what it achieves, not how.
My hunch: the microstepping creates sines for positions between full steps, but using perfect sines only fits mechanics (the positions of poles in the motor) that also is perfect. I suspect that the calibration tests variations of the sine shape to the motor windings (maybe trying to alter the sine to something more triangular in one direction, more rectangular in the other?), and listens to vibrations at the expected frequency with the accelerometer. Then it selects the "sine" variation that gives the least amount of vibration.
This is just a guess, some input from someone who actually knows would be exciting!
RE: So, what the heck is "phase stepping" ?
> But I'm certainly not an expert so maybe there's some good reason to use a sin wave instead of some other shape. Maybe someone can comment on that?
If you use the simplified model of one electrical turn is one mechanical turn, you would probably understand that sine and cosine are the ideal wave forms.
See here:
In the above, you can go full positive current through A, none in B. The magnet moves accordingly. Or full positive in B, none in A. The magnet moves accordingly. And you use trigonometry to get inbetween, just like in any coordinates system.
RE: So, what the heck is "phase stepping" ?
@bruce-lucas @jurgen-7
Prusa mentioned they use Trinamic drivers. The whole things kind of sounds like they started using Trinamic's StealthChop, StealthChop2, maybe SpreadCycle:
https://www.analog.com/en/lp/001/secret-silent-stepper-motor-control.html
RE: So, what the heck is "phase stepping" ?
@bruce-lucas @jurgen-7
Prusa mentioned they use Trinamic drivers. The whole things kind of sounds like they started using Trinamic's StealthChop, StealthChop2, maybe SpreadCycle:
https://www.analog.com/en/lp/001/secret-silent-stepper-motor-control.html
I don't think that this is behind "phase stepping". In my understanding, Trinamic's "stealth chop" deals with the way a targeted motor current (in a given phase of the stepper movement) is controlled via chopping. In contrast, phase stepping seems to be about the sequencing of multiple phases to obtain the smoothest motion.
Without Prusa publishing technical details, "phase stepping" largely remains a marketing term. Maybe someone is enterprising enough to try and reverse-engineer it from the firmware sources? I did take a look a couple of months ago, but could not figure out what is actually happening...
RE: So, what the heck is "phase stepping" ?
Without Prusa publishing technical details, "phase stepping" largely remains a marketing term. Maybe someone is enterprising enough to try and reverse-engineer it from the firmware sources? I did take a look a couple of months ago, but could not figure out what is actually happening...
I seem to recall CNC Kitchen doing a video on this recently. I didn't watch the full video (I intend to) but I believe Stefan was alluding to this but I could be wrong.
RE:
Ah, not CNC Kitchen but "Made with Layers". I'll need to watch it again though.
RE: So, what the heck is "phase stepping" ?
Didnt make any noticable difference on my printer, but I guess it could help to compensate for a large tolerance span, which makes some printers noisy and some not.
