*Fixed Dummy Value Model*

In this case, a fixed dummy value, along with each of the actual values, was sent to the control room. The dummy value of the power was not dependent on the load. It did not vary with the variation in load or variation in the actual value of power. In the fixed dummy value model, to select the dummy value of a particular power, the average value was calculated from all the actual measured values that occurred for that value at all the instances. That average value was selected as the dummy value of power. In this case, the dummy values were determined by taking the mean of the last year's worth of historical measurement data, i.e., real-time measured values are stored from the past year and utilized for the calculation of fixed dummy values based on Equations (18)–(21). Later, these values were inserted into the memory of the meters and were simply appended or added to all the newly acquired measurements accordingly. It should be noted that the dummy value will no longer change with the newly acquired measurements. The calculation of the fixed dummy value was done by using these formulas:

$$\begin{array}{c} p'\_{v(y)}(l) = \frac{\sum\_{s=1}^{ml} z\_s(lp)}{ml} \\ l = 1, 2, 3, \dots, b \quad \text{and} \quad lp = 1, 2, 3, \dots, b \end{array} \tag{18}$$

$$\begin{array}{c} \begin{array}{c} \begin{array}{c} q'\_{v(y)}(l) = \frac{\sum\_{s=1}^{mt} z\_s(lq)}{mt} \end{array} \\ l=1,2,3,...,...,b \end{array} \end{array} \tag{19}$$

$$\begin{array}{c} p'\_{\text{vw}(y)}(l) = \frac{\sum\_{v=1}^{ml} z\_s(lpv)}{ml} \\ l = 1, 2, 3, \dots, \dots, t \quad \text{and} \quad lpv = 2b + 1, 2b + 2, \dots, \dots, 2b + t \end{array} \tag{20}$$

$$\begin{array}{c} q'\_{\text{vw}(y)}(l) = \frac{\sum\_{s=1}^{nt} z\_s(lqv)}{mt} \\ l = 1, 2, 3, \dots, t \quad \text{and} \quad lqv = 2b + t + 1, 2b + t + 2, \dots, 2b + 2t \end{array} \tag{21}$$

In (18), *p v*(*y*) (*l*) represents the *l*th entry of the dummy values vector **p v**(**y**) . *zs*(*l p*) denotes the *lp*th entry of the *s*th historical measurement vector. *mt* is the total number of instances for which the historical measurement vectors are obtained. To calculate the first entry of the dummy measurement vector **p v**(**y**) , the sum of the first entries of all the historical measurement vectors is calculated and then divided by the total number of instances for which those historical measurement vectors are obtained. Similarly, the second entry of the dummy values vector **p <sup>v</sup>**(**y**) can be calculated by finding the mean of the second entries of *mt* historical measurement vectors. The same procedure is adopted for finding all the entries of **p <sup>v</sup>**(**y**) and the dummy values of all the active powers injected into the buses are calculated in this way. In (19), *q v*(*y*) (*l*) denotes the *l*th entry of the dummy values vector **q v**(**y**) **,** and *zs*(*lq*) represents the *lq*th entry of the *s*th historical measurement vector. *mt* gives the total number of historical measurement vectors. The *l*th entry of the dummy values vector **q <sup>v</sup>**(**y**) is found by calculating the mean of the *lq*th entry of *mt* historical measurement vectors. By using this procedure, the dummy values of all the reactive powers injected into the buses can be calculated. In (20) and (21), *p vw*(*y*) (*l*) and *q vw*(*y*) (*l*) represent the *l*th entry of each of the dummy measurement vectors **p vw**(**y**) and **q vw**(**y**) **,** respectively. *zs*(*lpv*) and *zs*(*lqv*) denote the *lpv*th and *lqv*th entries of the *s*th historical measurement vector, respectively. The *l*th entry of each of the dummy measurement vectors **p vw**(**y**) and **q vw**(**y**) is calculated by finding the mean of the *lpv*th and *lqv*th entries of *mt* historical measurement vectors, respectively. Therefore, the dummy values of the active and reactive powers flowing through all the transmission lines can be calculated by using Equations (20) and (21), respectively.

By applying Equations (18)–(21), the dummy values are calculated at a single instant by using *mt* historical measurement vectors and then those calculated dummy values are kept the same for all the instances, i.e., the dummy values do not change for the other instances. In fact, in the fixed dummy value model, the dummy values depend only on the historical measurement values and they do not depend on the real-time measurement values.

**p wv**(**y**) and **q wv**(**y**) can also be calculated using this method and all the dummy values are selected in this way. These dummy values are placed in **zdy**, which is embedded in the meters. These values are also placed in another vector **d** present in the control room. When the system is hacked by the attacker, 2*m* power values will be obtained by the attacker in **zdy** instead of *m* values. In the next step, the Jacobian matrix will be constructed by the attacker and a stealthy attack will be done in this way:

$$\mathbf{z\_{dry}} = \mathbf{z\_{dy}} + \mathbf{H\_{dy}} \ast \mathbf{c} \tag{22}$$

Here, **zdyr** denotes the measurement vector received in the control room at the *y*th instant. For the detection of an attack, a comparison is made between the dummy values obtained from **zdyr** and those dummy values set by the control room. The following equation is used in the control room to detect the attack:

$$r(\mu) = d(\mu) - z\_{dyn}(\upsilon) \tag{23}$$

where *u* = 1, 2, 3 . . . , *m* and

$$v = 2, 4, 6, \dots, 2m$$

Here *d(u)* denotes the *u*th entry of the dummy values vector *d*, which is selected and set by the defender. Meanwhile, *zdyr*(*v*) denotes the *v*th entry of the received measurement vector. In the case of a secure system:

$$|r(u)| = 0\tag{24}$$

where *u* = 1,2, 3, . . . , *m*.

During the case of no attack, **zdyr** = **zdy**.

To launch an attack, the attacker changes the actual and dummy values according to the construction of the stealth attack. As the dummy values are fixed, they should not change for a secure system. Therefore, for an attack, the value of |*r*(*u*)| will come out to be greater than zero and the attack will be detected in this way.

The conventional technique for bad data detection (BDD), such as DC state estimation (SE), fails to detect a stealth FDI attack. Moreover, AC SE is also bypassed by this attack. However, our model with a fixed dummy value was capable enough to detect the FDI attacks in the AC power flow network and all the attacks could be detected by the control room.
