## 2 Virtual Battery Model of Individual Inverter AC
### Virtual Battery Model of Inverter AC  
In the inverter \(AC\), the power consumption of the compressor operation accounts for the majority of power consumption. The relationship between the electric power and the frequency of the compressor can be simplified to a linear formulation [16]:  
\[P(t)=k_{p}f_{AC}(t)+l_{p} \tag{6}\]  
where \(P(t)\) is electric power of inverter \(AC\) at \(t\)th period, \(f_{AC}(t)\) denotes frequency of the compressors at \(t\)th period, \(k_{p},l_{p}\) refer to constant coefficients of the inverter \(AC\).  
In a similar form of \(P(t)\), the cool power of inverter \(AC\) system can be formulated as follows:  
\[Q_{c}(t)=k_{q}f_{AC}(t)+l_{q} \tag{7}\]  
where \(k_{q},l_{q}\) refer to constant coefficients of the inverter AC.  
Considering (6) and (7), the linear relationship between \(P(t)\) and \(Q(t)\) can be presented as:  
\[P(t)=\frac{k_{p}}{k_{q}}Q_{c}(t)+\frac{l_{p}k_{q}-k_{p}l_{q}}{k_{q}} \tag{8}\]  
Considering (7), at the initial temperature with no external control signals, the baseline of electric power is represented as follows:  
\[Q_{base}=\frac{1}{R_{a}}(T_{out}-T_{0})+Q_{h} \tag{9}\]  
where \(Q_{base}\) refers to baseline of cool power.  
Substituting (8) and (9), the benchmark of electric power can be depicted as:  
\[P_{base}=\frac{k_{p}}{k_{q}R_{a}}(T_{out}-T_{0})+\frac{k_{p}}{k_{q}}Q_{h}+ \frac{l_{p}k_{q}-k_{p}l_{q}}{k_{q}} \tag{10}\]  
where \(P_{base}\) refers to the baseline of electric power.  
Considering the control signals from the control center, the power deviation of electric power is considered as the charge/discharge power \(P_{e}\)[13], which is given as follows:  
\[P_{e}(t)=P(t)-P_{base} \tag{11}\]  
where \(P_{e}(t)\) is charge/discharge power at \(t\)th period.  
Considering (8) and (10), \(P_{e}(t)\) can be reformulated as:  
\[P_{e}(t)=\frac{k_{p}}{k_{q}}(Q_{c}(t)-Q_{h})-\frac{k_{p}}{k_{q}R_{a}}(T_{out}- T_{0}) \tag{12}\]  
Substituting (4), (5) and (12) into (1), the dynamic behaviors related to SOC can be calculated as:  
\[\frac{dsoc(t)}{dt}=-\frac{dT_{in}(t)}{T_{max}-T_{min}}=-\frac{soc(t)}{R_{a}C} +\frac{k_{q}}{k_{p}R_{a}(T_{max}-T_{min})}P_{e}+\frac{soc(0)}{R_{a}C} \tag{13}\]  
Similarity in the form of (1) and (13) provides an intuitionistic form to describe the update process of SOC. The dynamic behavior of individual ACs is developed by Equation (13) and the related state-space model can be established for real-time frequency control. Moreover, the discrete solution of formulation (13) can be utilized for dispatch optimization. Proof can be given as follows.  
By solving (1), \(T_{in}(t)\) is calculated as:  
\[T_{in}(t)=(T_{0}-T_{out}-R_{a}Q_{h}+RQ_{c}(t))e^{-\frac{t}{R_{a}c}}+T_{out}+R_{a }Q_{h}-RQ_{c}(t) \tag{14}\]  
In the same manner, the discretization form of virtual SOC of individual AC can be formulated, the validity of which the formulation can be verified by another derivation method proposed in [16]:  
\[\left\{\begin{array}{l}soc(k+1)=\omega_{s}soc(k)+\omega_{p}P_{e}+\gamma\\ \omega_{s}=e^{-\frac{\omega_{s}}{R_{a}c}}\\ \omega_{p}=k_{q}R_{a}\Big{(}1-e^{-\frac{\omega_{s}}{R_{a}c}}\Big{)}/k_{p}(T_{ max}-T_{min})\\ \gamma=(1-\omega_{s})\cdot soc(0)\end{array}\right. \tag{15}\]  
where \(\omega_{s},\omega_{p},\gamma\) refers to auxiliary variables in the discrete solution.