How to implement DC-DC buck regulator circuit for charging and discharging a battery

I am trying to implement a battery controller for a project in Matlab simulink.
The following video demonstartes the performance I require. I want a constant output of 12V from a battery that varies between 42 and 36V. The video has little explaination for the settings given the required performance. If anyone could help explain how I could adjust the settings that would be greatly beneficial.
The file for this circuit can be found here:

Categories

Products

Asked:

on 20 Mar 2022

Answered:

on 3 Jan 2023

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!