Here is the braking principle for the wiring diagram shown in the picture:
With this wiring configuration, stepping on the brake pedal while the vehicle is moving disconnects the battery from the PWM controller. The module stops power output and short-circuits the motor simultaneously to create reverse braking force, realizing the braking function. When you release the brake pedal, power is restored to the PWM module, and the module restarts automatically.
English