*2.2. Frequency Regulation Problem*

In the power system, since the power is difficult to store in large quantities, the real-time power balance between the generation side and the demand side must be maintained which can achieve the goal of suppressing the grid frequency fluctuations, keeping the reliable power supply, avoiding accidents and hurting the user power equipment [20,21]. The aggregated TCLs can reliably provide the frequency regulation service by energy storage and flexible scheduling, which are mentioned by demand-side management. In that case, the power consumption of the TCLs tracks the frequency modulation power signal of the power grid by an effective controller and a control algorithm.

The frequency regulation signal *P*AGC, which is a continuous change of positive and negative power signals and reflects the supply and demand deviation, thus, *P*AGC needs to stacked on a baseline load signal *P*BL—that will generate the actual tracking signal *<sup>P</sup>*target, which can be tracked by the aggregated TCLs. Here, *P*BL is selected as the rated power at one temperature set-point. It can be described as:

$$P\_{\rm BL} = \sum\_{i=1}^{N} \frac{T\_d - T\_i^{\rm sct}}{\eta\_i \mathcal{R}\_i},\tag{4}$$

$$P\_{\text{target}} = P\_{\text{ACC}\_{\text{'}}} + P\_{\text{BL}\_{\text{'}}} \tag{5}$$

where *N* represents that the quantity of TCLs.

From Figure 3, we can observe that the inputs of the controller are the difference between the actual tracking signal *<sup>P</sup>*target and the power consumption *P*total, which are the tracking error signal *e* = *<sup>P</sup>*target − *P*total and its differential *de*. The controller output is the temperature set-point change *u*. In the control scheme, since the fuzzy neural network controller looks like a black box with brilliant self-learning and self-adaptive ability, we do not need to model the aggregated TCLs. The fuzzy neural network can be trained to encode the internal characteristics of the controlled object into the initial value of the connection weight. The connection of BP and PSO algorithm is also used to optimize the parameters of the controller and achieve the goal of reducing load tracking errors, improving tracking performance of the power grid frequency signal, and providing better frequency regulation service.

**Figure 3.** System structure diagram.

### **3. Fuzzy Neural Network Control Scheme**
