Vahid66 -- I'll come at this from a bit of a different angle than the commenters so far. If you ever want to decelerate faster than your electrical and mechanical losses would cause you to, you must have a place to "put" the kinetic energy you will be absorbing.
In a DC motor, if you apply current to create torque in the opposite direction from the velocity, you will automatically be generating. As sreid pointed out, a 4-quadrant drive will have an electrical path for the generated voltage and current. This path is through the "flyback diodes", and the net effect is to increase the DC bus voltage.
The important question is "now what?". Most industrial systems have pretty significant capacitor banks on the DC bus that can absorb quite a bit of this energy. Your battery bank could absorb it (if not fully charged), but the question is how fast -- what is the charge rate of the battery. Hybrid cars have "supercapacitors" to absorb this energy quickly, then bleed it off into the batteries. I suspect you may want some capacitance on the DC bus. You may even need a shunt resistor to dissipate this energy if the batteries can't take it or take it fast enough.
But as others have said, without knowing your particular situation, we really can't say what is needed in your case.
Curt Wilson
Delta Tau Data Systems