This document presents a model and analysis of a wind energy conversion system (WECS) using MATLAB. It summarizes the components that make up a WECS, including the wind turbine, generator, controller, rectifier-inverter, battery, load equipment, and transformer/grid. It then models each component in MATLAB, including the wind turbine blades, drive train dynamics, asynchronous generator, and reduction of the generator order for stability studies. The modeling is used to simulate a test case of a WECS both as a standalone system and grid-connected to analyze its performance and stability when interfaced with the grid.