In this schematic the main principle of Regenerative Breaking is demonstrated.
Change the duty cycle of the pulse train to change the motor control.
0% = Full Power
100% = Dissipate All kinetic energy
50-90% = Regenerative Breaking
The 10H inductor is there to magnify the inductive effect of a DC motor. The 1F capacitor is there to simulate the kinetic energy of the vehicle.
The Half-bridge MOSFET configuration is driven by a PWM loop to control the current. Due to the inductive effects of the motor, the current will be reversed and it will charge the battery (since P = V * I and I = negative).