How do I design a microgrid using Simulink?
This video has all the basics you need 

Just remember:
 1. Always drag and drop 'Powergui'. Otherwise, nothing related to electricity will work.
 2. Only drag and drop blocks from a single library. If you use components from multiple libraries, then Simulink can't simulate it.   

If you can't find your desired component in the library you are using, then make a transfer function of it and use that.