In this study, wind energy that is one of the sources of clean and renewable energy is modeled for generating electrical energy by using PSIM©. E- 33 type (ENERCON) wind turbine data sheet is used for the modeling. Wind turbine system is chosen as variable speed instead of fixed one because of the advantage of generating more efficient and higher quality electrical energy. So the generator is connected to the power electronic circuit first and then the step-up transformer. Permanent magnet synchronous machine (PMSM) is chosen as a generator. An uncontrolled rectifier is modeled after the generator in the system and an inverter is also modeled at the grid side for generating electrical energy in the suitable form. Active and reactive power control is achieved by the grid side converter with the indirect current control. Synchronization with the grid is made by Phase Locked Loop(PLL). Both of the power converters are modeled and simulation results are presented. In the last part of study, power quality is evaluated with the harmonic analysis and the total harmonic distortion of the system is in the range of IEC 61400-36 and IEEE 519-1992 Standards.