## 3 Control Structures
### Implementation of DVC in RSCAD
#### 3.1.1 Reactive Power Control  
From the control structure developed, as shown in Figure 3 and inspired by Reference [9], it can be seen that, unlike in conventional current control, the reactive current is not directly utilized for voltage control. The converter voltage is directly controlled here, and this allows the current to modify on its own according to varying network conditions. This strategy is similar to the voltage control in conventional synchronous generators. The reactive control loop consists of an outer loop based on a slow VAR controller that tracks the changes in set points required by the system-wide demand. The inner loop consists of a fast-acting controller, as the name suggests, that responds towards crucial changes in voltage where quick action is required [9]. **Slow global VAR control**: It is the upper-level controller and can be modelled as a power factor, reactive power or voltage controller. The reference values can be directly sent as inputs to the PI controller if the controller is made to use for reactive power or power factor control. The voltage controller is used here, and this requires reactive power reference (\(q_{PCC\_ref}\)) to be determined from a predefined voltage versus reactive power droop characteristic. A voltage value for which the injection of reactive power is zero is obtained from this characteristic. The obtained reactive power reference output is provided as input to the PI controller having a small proportional gain (\(k_{Q}\)) and ample time constant (\(T_{Q}\)) in order to avoid transformer tap changes and not very fast in order to avoid unwanted controller interactions. The automatic adjustment of reactive power in relation to varying voltage using the proportional gain, (\(k_{QV}\)) is significant. There is no dead band present in order to ensure continuous voltage control. The proportional gain that represents the droop can be obtained from the following relation,  
\[k_{QV}=\frac{\Delta q}{\Delta V_{N}}, \tag{7}\]  
where \(\Delta V_{N}\) is the difference in reference and measured voltages, \(\Delta q\) is the difference in reference and measured reactive powers at the PCC. In theory, the proportional gain can be varied with changes in power flow. But this is not practically feasible and hence it is recommended to set the reactive power reference based on load flow calculation in the network and corresponding optimum power flow (OPF) calculations. The values could be updated at regular intervals. \(V_{N\_ref}\) can be determined from \(q_{PCC\_ref}\) as,  
\[V_{N\_ref}=-\frac{q_{PCC\_ref}}{k_{QV}}+V_{N}, \tag{8}\]  
where \(V_{N}\) is desired voltage and \(V_{N\_ref}\) is the voltage at which no reactive power injection is required. The reactive power limits (\(q_{max}\) and \(q_{min}\)) are the continuous values in steady state and can be computed from the P-Q diagram of the converter operation. The time constant is chosen in the range of 5-30 s wherein a value in the higher range tends to stabilize whereas a value in the lower range can cause interactions with other controllers. The slow global VAR controller must be made inactive once the converter current limit is reached and also during cases of large voltage sags or swells by providing a signal to deactivate the controller. A scenario that could lead to the case mentioned above is a three-phase short circuit event. The output from the upper-level controller must be constant because of the chosen high integration time constant or must be limited by a blocking signal [9]. **Fast local voltage control**: The voltage reference output (\(V_{PCC\_ref}\)) received from the slow global VAR controller is provided as input to the fast local controller. This controller must be able to provide prompt support for grid voltage during the time of faults. The response of the controller in terms of voltage support must depend on local inputs sensed at the PCC (\(V_{PCC}\)) and not on quantities that need to be measured at remote places using a communication mechanism.