Wind turbine systems are constructed using different types of generators, aero-mechanical components and control systems. Due to their ability to work in low speed, Axial Flux Permanent Magnet (AFPM) generators are becoming widespread in wind energy systems which contributes to eliminating the gearbox from the system, noticeable increase in efficiency and decrease in system weight. Due to the modular nature of the stator in AFPM generators, it is possible to control each module independently. In this paper, in addition to obtain the dynamic model of the turbine and AFPM generator, a control strategy is designed based on Mixed Integer Nonlinear Programming (MINLP) to incorporate both pitch angle and the number of active stator modules as control input signals. These control signals are used in order to maximize system efficiency and regulate output voltage in different wind speeds and electrical loads. Simulation results for a typical generator shows the effectiveness of the proposed method in speed control of the generator.