This paper deals with the voltage regulation in a weak system which contains large inductive loads and wind turbines using Doubly Fed Induction Generators (FDIGs). The DFIGs demand large amounts of reactive power from the grid and as a result, there is a voltage drop in the system which may be extra deteriorated if large inductive loads and motors are also present in the same line. The problem of the voltage regulation in these cases is treated with the installation of a Static Var Compensator (SVC) besides the capability of the DFIGs to partially regulate the voltage themselves. In this paper, new modeling procedures based on optimal control are developed for the design of the SVC controller and a novel strategy for the grid side converter of the DFIG is presented. The nonlinear system is simulated in the SIMULINK software so that the performance of the new controllers is validated.