Hello Muhammad,
Thank you for asking.
For modeling regenerative braking circuit for BLDC motor, the following link (sample model) will be helpful.
https://jp.mathworks.com/help/physmod/sps/ug/bldc-hysteresis-current-control.html
I hope this will help.