File Exchange

image thumbnail

Current Controller DC/DC Bidirectional Converter

version (229 KB) by Mahmoud Saleh
Current Controller DC/DC Bidirectional Converter Model with a detailed description


Updated 19 Jul 2017

View License

Current Control DC/DC Bidirectional Converter Simulink 2016b, 06/15/2017 Mahmoud Saleh
If you need lower version of the model like Simulink 2015 or lower let me know in the comments
The description of each element is on top of it and how it was calculated. The model is flexible to work within wide range of values. If you have questions please email me at my main email:, student email: msaleh000@citymail.cuny,edu, gmail:
In the subject of your email write: Bidirectional Mathwork question so that I would be able to track the emails even if they went to junk mail.
I am an expert in modeling in Simulink, especially microgrids, I have encountered many problems and I was able to fix it. I used to work with dSpace and I build with my colleagues microgrid testbed at City College of New York. We modeled according to the hardware components avialable in our lab, then we build it and test it. I will try to help in case you have a question.
This work was used in the following publications, please kindly reference them in case you will use this model:
More description about the model and it is testing results in hardware is provided here:
For Citation use :
- M. Saleh, Y. Esa, Y. Mhandi, W. Brandauer and A. Mohamed, "Design and implementation of CCNY DC microgrid testbed,"
2016 IEEE Industry Applications Society Annual Meeting, Portland, OR, 2016.
Also This Model was used in the paper:
For Citation use :
-M. Saleh, A. Althaibani, Y. Esa, Y. Mhandi and A. Mohamed, "Impact of clustering microgrids on their stability and resilience during blackouts," 2015 International Conference on Smart Grid and Clean Energy Technologies (ICSGCE), Offenburg, 2015, pp. 195-200.

Comments and Ratings (20)

Nice work Sir,....Sir i need need lower version of the model like Simulink 2014.. email id : Thanks..

Guimin Long

He WenBin

Eric Yeap

Amazing model, thank you for sharing it with us.

umaid ali

its a great well.......thanks a lot :)

please tell
how tuning is done for other voltage level?

Mahmoud Saleh

Sorry for the late reply i was quite busy and just saw this comment.
A quick answer on top of my head would be that the capacity of the battery is small and need to be increased, also in the past the matlab model for batteries used to give me hard time because it needs to be adjusted carefully to work porperly for your application (e.g. slow dynamics, capcity). One thing you can do, is that replace the batteries with super capacitor and increase it's size to see what will happen and understand wheater the battery model need to change or it is a control problem (i.e. the controller is slow to respond to the changes from the MG). The idea is to think about series of tests to trouble shoot where is the problem and then try to fix it.
Let me know if you have further questions and please share the outcomes of your finding so that we all learn
Best regards,

By the way I am talking about voltage controller but I accidently put the comment here :D

Hi Mahmoud, I have one question: If we increase the microgrid current to 5A for example, then the voltage will rise till nearly 500V. Battery should be charging in this situation but it charges too slowly, almost it doesn't charge at all, so the voltage stays at 500V. You mentioned that (I_Microgrid + I_Bidirectional) * R_MG should be ~ V_ref which is probably why it is not working like this. But, can we adjust it so it charges the battery with bigger current and keeps the voltage at 300V at the same time? I would like to connect it to the PV panel, so when I produce too much power from the PV I will charge the battery but I will also keep the voltage at 300V...

I will converted to 2016a and upload it as soon as possible, probably during this week. However, I thought I uploaded many version of that model. Anyways, I'll double check and upload it.

i need this in 2016a

Yusef Esa

Great model, Thanks. It works.


Uploaded multiple Simulink model versions in case needed

This work was used in the publications mentioned in the Description, please kindly reference them in case you will use this model. Thank you for your support, more models will be published soon.

Please leave a comment if you need the model in another Simulink version or in case you have a question, I will publish more models once I get the time and I am opened to suggestions.

MATLAB Release Compatibility
Created with R2016b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Discover Live Editor

Create scripts with code, output, and formatted text in a single executable document.

Learn About Live Editor