In order to get the maximum power from the wind, the variable-speed turbine should run at different speed when wind speed changes.The dynamic characteristics of the control system must be properly defined and designed to achieve satisfactory generated power quality and system security, availability and reliability. Therefore great attention has to be kept in the theoretical design task, as well as in the experimental validation phase, in order to assure the correct operation of the control system both in normal and in perturbed conditions. This paper presents the design of an PI controller, the control system is trained to find the gain of the regulator by minimizing the overshoot and the tracking error. The tuning problem is solved with optimizing by particles swarm; the speed of synchronous generator is controlled in the wind turbine, the system is connected to a chopper converter represented by a variable resistive load, the turbine uses the model of rigid axis. in order to development and test the control system the model in the system coordinate of the rotor is used.