Ripple shows up because there’s a 5th harmonic in the motor’s flux linkage (and therefore back-emf). From the perspective of the field-oriented control, these harmonics at the phases show up as AC disturbances on the D/Q voltages. The two current loops will try to squash these disturbances, but it’s ability to do so depends on the current loop bandwidth and the magnitude of the disturbances.
The post goes in-depth about causes and introduces Adaptive Feedforward Cancellation. This is a weird technique which has the seemingly magical property of giving your controller infinite gain at a specific frequency – i.e. it will perfectly track a signal at that frequency, or perfectly reject a disturbance at that frequency.
Make a robot friend with Adafruit’s CRICKIT – A Creative Robotics & Interactive Construction Kit. It’s an add-on to our popular Circuit Playground Express, FEATHER and other platforms to make and program robots with CircuitPython, MakeCode, and Arduino. Start controlling motors, servos, solenoids. You also get signal pins, capacitive touch sensors, a NeoPixel driver and amplified speaker output. It complements & extends your boards so you can still use all the goodies on the microcontroller, now you have a robotics playground as well.