Figure below shows us a PWM Speed DC Motor Rotation circuit. This circuit has two functions, Forward-Reverse and Regenerative Braking function. On this circuit, we can control the speed of DC 12V motor with Power Mosfet IRF150 using a signal PWM. The Relay RY1 work as control Reverse with the digital alarm, change Q10. The Relay RY2 work as function brake resistor. The F1 use to protect through the circuit by control Run or stop with the digital alarm. D1 is used to protect the current turn back from DC motor. You can watch the detail on the circuit below.

PWM Speed Rotation Forard Reverse and Regenerative Braking13 circuit schematic