Capacitor and voltage with a mapped output

Yes that is it. The switching on and off of the motor drive by the PWM is being smoothed and as your motor represents a very light load the capacitor supplies enough power when the drive is off to keep the motor going.