Modeling and Control Dynamics in Microgrid Systems with Renewable Energy Resources