4.1. Automatic Generation Control Model
A well-stablished model for AGC is used in this paper to evaluate the simultaneous demand-side and generation-side frequency control problem. This model is based on the frequency droop control in power plants serving the grid in conjunction with integral controllers on selected power plants [
24]. Assuming the grid voltage and the frequency dynamics are decoupled, the frequency control problem is reduced to an equivalent single-inertia system, relinquishing the need for network topology. In this paper, a hybrid generation system comprising a steam and a hydro power plant is used for the generation-side microgrid control based on models in [
24], as shown in
Figure 7. The steam plant has a second order dynamics, and the hydro plant has a non-minimum-phase first order transfer function. These models are the linearized versions of complex physics-based nonlinear models [
24], and are suitable for stability analysis and control design. Both power plants are equipped with speed governors (controllers), which respond to changes in frequency immediately after an event (sudden change in load), by adjusting the fuel valve or water valve positions. Besides, the steam power plant is equipped with an integral controller which is responsible for bringing the frequency back to the target level (e.g., 60 Hz) after the initial response from the droop controllers. This way, the steam generator becomes the main power plant in charge of tracking slow changes in the load, and the hydro power plant provides additional bandwidth to suppress the transient disturbances.
The output from the power plants is subtracted from the load, resulting in a net power imbalance in the system. A first order linearized model is traditionally used for analyzing the grid’s inertial dynamics, and is adopted in this study as shown in
Figure 7. This model includes two parameters, accounting for the collective grid rotor inertia through time constant
M, and the load damping factor, through constant
D. The entire generation-side system is represented in the normalized
per-unit (pu) system for the simplicity of analysis and consistency with the literature. The parameters of the system used for the simulations of this section are adopted from [
24] and listed in
Table 2. Most of the parameters are various time constants associated with the response time of the power plants and the controllers. As can be seen, all the time constants are within 10 s, which indicates the frequency can be recovered within a few seconds after an event. In practice, there are limits on the ramping rate of the power plants, which would impact frequency recovery depending on the size of the disturbance. An improved generation-side model is used in the next section to account for these limits.
To simulate the AGC system response, a 5% step increase in load is applied to the system at
t = 10 s, and response of the system is recorded for 2 min.
Figure 8 shows the frequency deviation in pu, as well as the power plants responses to the step disturbance with and without integral controller on the steam plant.
As can be seen in both cases, the frequency is recovered within a few seconds. The system with integral controller is able to eliminate the steady-state error within a few minutes (with Ki,AGC value of 1). Without the integral controller, both power plants share 50% of the load at steady state due to identical frequency droop coefficients (Rh = Rs). With integral controller, however, the steam plant takes the full burden of the load at steady-state, allowing the hydro plant to go back to its initial state after the preliminary reaction.
4.2. Clock-Like Frequency Controller (CLFC) for Thermostatic Loads
To control grid frequency through internet-connect thermostatic loads, the control error signal is changed from power imbalance in CLC to frequency deviation in CLFC. Therefore, the control strategy must be changed accordingly. Due to the first order dynamic relation between the frequency and power imbalance, a modified error signal is created and used as input to the controller, combining frequency deviation and its time derivative as follows:
where
σ is a positive control parameter, determining the weight of the time derivative of the frequency error in the control process. This modification builds a predictive response in the controller to take action before the frequency deviates significantly. It is also consistent with other methods proposed in the literature for grid frequency control using thermostatic loads [
9].
The positive and negative error signals for frequency control are then defined as:
where
is the correction term to bring clock hands together when the magnitude of the weighted error term,
, is smaller than a certain threshold set by
. The CLFC gets activated only when the magnitude of
exceeds
. The positive and negative clock hands are then adjusted based on projected error integrals as before:
To demonstrate the operation of CLFC, a diagram is created that separates the three error regions for the controller, and summarizes the clock hand dynamics for each region (see
Figure 9). For example, consider a case where the AC loads are in the cooling mode, and Δ
f and its time derivative are positive. These indicate there is more power generation than demand. In this case,
is negative, and if it grows to the point where
, the negative clock-hand will be activated and the setpoint temperatures will be reduced, increasing the AC power and hence, the total power demand in the network. This will drive
back to the desirable region.
To demonstrate the performance of the proposed CLFC system, a simulation is created, in which the microgrid frequency is controlled using the aggregate AC power only. The block diagram of this hypothetical system is shown in
Figure 10. The CLFC subsystem receives the frequency error, computes the setpoint temperature offsets, and broadcasts them to the AC thermostats with a certain time delay. To simulate the system in the pu scale, the aggregate AC power is shifted down by its initial value to start from zero, and is scaled by a conversion factor (
pu_c). This factor is set to be 1/(
NACPmax) in this simulation, where
Pmax indicates the expected value of the AC electrical power (i.e., 5.6 kW in this paper). The performance of the CLFC is then evaluated by applying a disturbance Δ
L and monitoring the frequency error signal.
The simple case of constant ambient temperature (30 °C) is considered for the simulation of this section. The disturbance signal is set to be 5% step increase in load, 1 min after the start of the simulation. For the first simulation, time delay and
εf are set zero, the value of
σ is set 5, and the two integrator gains are set to be equal (i.e.,
Ki,p =
Ki,n).
Figure 11 shows the response of the CLFC system for different values of the integrator gains. As can be seen from
Figure 11a, the frequency recovery is accomplished successfully, with the frequency returning to the original level after a temporary departure. The larger the integral gains, the smaller the frequency deviation. The integral gain cannot be increased beyond a certain value due to risk of instability because of time delays.
Figure 11b shows that the frequency recovery is achieved by moving the AC power in the opposite direction of the load disturbance, and hence, maintaining the power balance in the system. The clock hands separation angle for this simulation are shown in
Figure 11c in the pu scale, with 1
pu indicating 2π radians. It is important to note that if the load disturbance is not corrected externally, the clock hand separation will drift toward 1.0
pu, resulting in control saturation and loss of performance.
To demonstrate the effects of the frequency time derivative, the same simulation is repeated by fixing the integrator gains (
Ki,p =
Ki,n = 2) and trying different values of
σ, ranging from 0 to 20. Time delay and
εf are kept at zero.
Figure 12 shows the resulting frequency trajectories, underscoring impact of the derivative term in the controller’s transient performance. Although increasing
σ enhances frequency error characteristics, it may increase risk of noise amplification. In the simulations of this paper, the value of
σ is set to 5 to create a reasonable balance between performance and noise sensitivity in the system.
The next simulation is to evaluate the impacts of time delay. Since internet communication is not delay-free, it is important to evaluate the impacts of different communication delays on the controller performance.
Figure 13 shows the performance of the system for different time delay values ranging from 0–10 s. As can be seen, the time delay results in performance drop and possible instability. In practice, an upper bound must be characterized for the time delay, and used to tune the appropriate control gains. The larger the time delay, the smaller must be the CLFC integrator gains. A time delay of 4 s is used in the simulations of this paper, hereafter.
The last simulation of this section investigates the impact of parameter
εf, the activation threshold for CLFC.
Figure 14 shows the response of the system with
εf = 0.01
pu compared to
εf = 0. For the nonzero
εf, the grid frequency remains within ±
εf, except during the disturbance period around
t = 20 min. The maximum frequency deviation is, however, similar to the one with
εf = 0. It is important to note that in the CLFC formulation,
εf represents the upper bound of modified error signal (
ξ).
Figure 14a shows that this parameter can also serve as an upper bound for the frequency error. The clock hands separation angle in
Figure 14b indicates that increasing the value of
εf from 0 to 0.01 reduces the sensitivity of the CLFC considerably, thereby enhancing user comfort without compromising the control performance during fault periods.
4.3. Simultaneous Generation and Demand Control
In this section, the demand-side CLFC algorithm is integrated with AGC after some modifications in the AGC system. First, rate limits of 2% and 100% per minute are applied to the steam and the hydro plants, respectively, based on the values suggested in [
24]. Moreover, capacity limits of 0.8
pu and 0.2
pu are applied to the steam and the hydro plants to reasonably scale the two power plants and keep their output limited to their maximum value. To further improve the frequency dynamics, a second integrator is added to the steam plant to maintain the integral of the frequency near zero, for maintaining the grid’s clock cycle accuracy. Finally, to avoid integration wind up in the event of rate or capacity saturation, an integrator anti-windup algorithm is applied to both integrators. This logic compares the control signal with the rate and saturation limits, and stops integration during periods when the limits are activated. The full power system diagram with both CLFC and modified AGC system is shown
Figure 15. The ambient temperature and the user setpoint inputs are included inside the aggregate AC model subsystem. In addition, a renewable source is included in the simulation.
The initial simulation is for the simple case of constant ambient temperature (30 °C), and a 5% step increase in the demand. The renewable source is set to zero for this simulation.
Figure 16a shows the response of the system for four different scenarios: steam plant only, steam and CLFC, steam and hydro, and all three systems together.
When only the steam plant controller is active, the frequency recovery is very slow due to the 2% per min rate limit on the steam plant. In this case, the inclusion of CLFC helps to improve frequency recovery. However, when the hydro plant is included in the control loop, the benefit of CLFC is diminished, since the hydro plant responds quicker than both steam plant and CLFC due to faster ramp rate (100% per minute).
Figure 16b shows the outputs of the power plants, the aggregate AC power, as well as the injected load disturbance for the case of having all three systems included in the control loop. The hydro power plant responds to the load immediately, and then drops gradually as the steam plant overtakes the load. The aggregate AC power truncates about a quarter of the load disturbance and maintains its state within the 10 min simulation interval. In the extended simulation, however, the aggregate AC power returns to its initial state through the setpoint correction mechanism built in the CLFC algorithm.
The previous simulation reveals that the CLFC system can be outpaced by the hydro plant under normal conditions. In the next section, a scenario is investigated, in which the power demand exceeds the maximum generation capacity of the microgrid. This can happen on a very hot day, when the AC units work excessively to maintain desirable indoor temperatures. To provide a realistic simulation, the ambient temperature shown in
Figure 2 is shifted up by 5 °C to resemble a hot day with 22 °C low and 37 °C peak temperature. The California Independent System Operator (CAISO) data is used to obtain sample grid demand and renewable power profiles for the simulation. The data for the same day as the ambient temperature data is used for consistency. To separate the aggregate AC power from the total grid demand, the true ambient temperature is used first to obtain and subtract the aggregate AC power from the demand. To covert the power data to the pu scale, a margin of 2% is assumed for the peak demand below the generation capacity (combined steam and hydro). The net demand, defined as the total power demand minus renewable power, has a much larger clearance margin from the generation capacity (around 30%).
Figure 17 shows the resulting power trajectories. The peak aggregate AC power is around 30% of the total grid demand for the true ambient temperature. This value would rise to around 59% when the ambient temperature is offset by 5 °C. The base demand (dashed line in
Figure 17), defined as the total grid demand minus the aggregate AC power, is used as the demand input in the simulation, with aggregate AC power being calculated via CLFC, and injected to the system separately.
It is important to note that all the power inputs (AC, base demand, and renewable) are offset to start from zero in the simulation to avoid initial imbalance in the system. The steam and hydro plant saturation limits are offset as well to account for these initial conditions. The hydro plant is assumed to be in its mid-point, initially, moving the saturation limits from [0 0.2] to [−0.1 0.1], and the rest of the load minus the renewable generation is initially picked up by the steam plant.
Figure 18 shows the simulation results with and without CLFC, for the case of elevated ambient temperature. As can be seen in
Figure 18a, in the absence of CLFC, the frequency deviates significantly during certain time periods. The reason is that the net demand (total power demand minus renewable power) exceeds the maximum generation capacity as shown in
Figure 18b, resulting in the saturation of both steam and hydro power plants. The integrator anti-windup plays a crucial role in the timely recovery of frequency after the net demand returns to the trackable range. To maintain the clock cycle accuracy, there is an over-frequency period (between Hours 20–30), during which the integral of frequency is corrected to zero. The integrator gain for this purpose, i.e.,
Ki,G2, is set to 0.0001. Note that, the simulation time is extended to 36 h (repeating the first 12 h) for a better view of the system responses.
When the CLFC mechanism is active, the frequency deviation is maintained within ±
εf (0.005
pu). This is achieved by curtailing the aggregate AC power such that the net grid demand remains below the generation capacity, as seen in
Figure 18c. The clock hands separation angle in
Figure 18d shows how CLFC responds to the frequency error. When the error is within the specified limit, the frequency control is accomplished by the steam and the hydro plants, and the clock hands are locked unless separation angle is nonzero. When the frequency approaches the threshold limits due to AGC saturation, the CLFC takes action automatically to contain the frequency within the specified range. Clock hand separation angle returns slowly to zero when |
ξ| <
εf, via the setpoint correction mechanism. The value of
α is set to 0.0001/2π in this simulation.
Evaluating the total simulation time for the simultaneous AGC and CLFC system with 5000 AC units indicates that the proposed CLFC method is a computationally-friendly algorithm. It takes around 3 milliseconds per simulation time step to compute both control signals and the evolution of AC temperatures using a computer with 8 GB memory and an Intel Core i7 processor. The proposed control method can therefore accommodate millions of AC systems for large-scale grid-wide updates every 2–4 s. The main limitation remains to be the internet communication bandwidth and delays associated with broadcasting control signals to the connected thermostats.
The simulations of this section underscore the importance of demand-side energy management in resource limited microgrids when the conventional generation system reaches its maximum capacity. This research can be extended to investigate other scenarios such as presence of energy storage, economic load dispatch, and larger power grids with multi-area networks.