I am trying to model a microgrid using small signal analysis, but I do not know exactly how to simulate it by Matlab and hence its output. Can anyone assist me advising which book is preferable or any tutorial for Matlab simulation?
There is an excellent example on microgrid using small signal analysis. This example shows the behavior of a simplified model of a small-scaled micro grid during 24 hours on a typical day. The model uses Phasor solution provided by Specialized Technology of SimPowerSystems in order to accelerate simulation speed. Also, there is a PhD dissertation in the link below. I think you can get help from these.
If you are trying to simulate a microgrid through coding in MATLAB, the best option that you have is to make a non-linear/linear model of your system. This will consist of all the DGs and their respective dynamic response equations, along with the average models for your converters. Once you have your system's differential equations ready, use any ode solvers to get the response of your system. Just to give you a hindsight as to how many equations you expect, refer to the following:
Micro Turbine: 4 primary equations decomposed in d-q components, simplified with algebraic equations depending upon the configuration at your PCC
PV: Equations for PV current and voltage. The voltage equation will be solved through Newton Raphson Method. Other equations for the same DG will include the filter equations. This depends upon which type you are using (LC, LCL). For LC filter you you will require 2 equations (d-q components) for currents and further 2 equations for dc link voltage for the intermediate boost converter.
Wind Turbine: For wind t again depends upon the configuration and type of generator you are using. I used both flux linkage model and the induction generator model when I was doing this work. For PMSG based WT, you will require 2 equations for the stator currents, 1 equation for turbine speed and 1 for the rotor angle. The filter equations will again depend upon the configuration and as explained above.
Battery: The battery models are widely available in the literature. I prefer the CIEMAT model. You will also need the modeling equations for the bi-directional converter in this case too.
In my case, I used a very simplified model for the converters in the sense that mine were thyristor based converter with control signals as the duty cycle and the phase angle. In this case, if you linearize the above non-linear system you must come up with around 30 states for your system with the controller. The model that you are going to linearize will be around the operating point that you have set for your DGs.