* If we reduce the revolutions, the power must decrease at least proportionally.
* LM317 is not a transistor but a voltage stabilizer. And it is not suitable for speed control.
* In this similar topic, the discussants have a mediocre idea of how this is done - I didn't notice any mention of feedback or motor EMF.
Integrated circuits have long been specialized to regulate the rotation of motors. Before, transistors were used - for example, the MK125 tape recorder had a transistor regulator. In those days, linear regulators were used - for low-power motors they could be, but for higher power, pulsed ones are better. It's just that someone who knows little, invents the use of a PWM system, or a triac dimmer system (when powered from the mains), and probably has no idea that this is not a speed control, only medium voltage control, or that it is not the same (and the difference in performance is that the motor torque is reduced). The speed controller system is to stabilize the engine EMF, and with high power it is to do it through PWM, but it is not limited to the PWM itself (the difference is that in the speed controller there is feedback from the motor to the controller, in the voltage controller not there was, there was a speed regulator) - I don't remember seeing a diagram of such a speed regulator system on the forum. But there is definitely a scalak for that with a description of how to use it (and probably in the title of the description there is "motor regulator") - this has been widely used for decades.