# A Stackelberg Game Approach for Price Response Coordination of Thermostatically Controlled Loads
## 3 Stackelberg Game Coordination
### Existence and Uniqueness of Stackelberg Equilibrium  
Based on the above analysis of the game process, we can deduce the Stackelberg equilibrium by backward induction method [22]. Firstly, each follower determines its best strategy trajectory by solving (18) with respect to a strategy \(p\) from the leader. Then, combining the best strategy trajectory \(\mathbf{u}^{*}(p)\) with (17), the leader obtains its best strategy \(p^{*}\). Subsequently, each follower determines its best strategy \(u_{i}^{*}(p^{*})\) when it is informed of the best strategy \(p^{*}\) of the leader. **Lemma 1**. : _Given a broadcast price \(p\) from EECC, each follower has a unique optimal strategy \(u_{i}^{*}(p)\), such that:_  
\[u_{i}^{*}(p)= \begin{cases}\beta_{i}^{+},&\text{in case }p\leq\frac{wb_{i}}{q_{i}}e^{b_ {i}\left(1-\beta_{i}^{+}/q_{i}\right)}\\ q_{i}-\frac{q_{i}}{b_{i}}\ln\frac{pq_{i}}{wb_{i}},&\text{in case }\frac{wb_{i}}{q_{i}}e^{b_ {i}\left(1-\beta_{i}^{+}/q_{i}\right)}<p<\frac{wb_{i}}{q_{i}}e^{b_{i}}\\ 0,&\text{in case }p\geq\frac{wb_{i}}{q_{i}}e^{b_{i}}\end{cases} \]  
Proof of Lemma 1.: By (12) and (14), we obtain that each follower's utility function \(C_{i}(u_{i};p)\) is continuous and differentiable over a convex set \(\mathcal{U}_{i}\). Then, by (12), we have  
\[\partial^{2}C_{i}(u_{i};p)/\partial u_{i}^{2}=\frac{\omega b_{i}^{2}}{q_{i}^{ 2}}e^{b_{i}\left(1-u_{i}/q_{i}\right)}>0.\]  
Hence, \(C_{i}(u_{i};p)\) is a strictly convex function w.r.t. \(u_{i}\). By \(\partial C_{i}(u_{i};p)/\partial u_{i}=0\), we obtain the optimal trajectory w.r.t \(p\) as below:  
\[\widetilde{u}_{i}(p)=q_{i}-\frac{q_{i}}{b_{i}}\ln\frac{pq_{i}}{\omega b_{i}}. \tag{21}\]  
Furthermore, because the feasible set \(\mathcal{U}_{i}\) defined in (6) is a bounded set, the boundary conditions of the optimal strategy in (21) is determined by (21). Based on the best strategies \(\mathbf{u}^{*}(p)\), EECC determines the best electricity prices \(p^{*}\) by maximizing its utility function (16). **Lemma 2**. : _The leader has a unique optimal strategy \(p^{*}\), such that:_  
\[p^{*}=\operatorname*{arg\,max}_{p\in[P,p_{\max})}\ S_{E}\big{(}p;\mathbf{u}^{*}(p) \big{)}, \tag{22}\]  
_where \(p_{\max}\equiv\max_{i\in\mathcal{N}}\left\{\frac{ub_{i}}{q_{i}}e^{b_{i}}\right\}\)._  
Proof of Lemma 2.: The Proof of Lemma 2 is given in Appendix A. **Remark 5**. : _From Lemma 2, there exists a unique optimal strategy (22) when \(p\in[P,p_{\max})\). Considering \(p\geq p_{\max}\), we have \(u_{i}^{*}(p)=0\) by (21), for all \(i\in\mathcal{N}\). In addition, by (16), we obtain that the utility function \(S_{E}(p;u_{i}^{*}(p))=-\omega\sum_{i=1}^{N}d_{i}(0)\) is a constant for all \(p\geq p_{\max}\). Therefore, there is no unique optimal strategy in the given range of \(p\)._  
**Theorem 1**. : _Considering \(p_{\max}>P\), there exists a unique Stackelberg equilibrium \((p^{*},\mathbf{u}^{*})\) for the proposed game._  
Proof of Theorem 1.: By Lemma 1, we have \(C_{i}(u_{i}^{*};p^{*})\leq C_{i}(u_{i};p^{*})\) for all \(i\in\mathcal{N}\), then (20) holds. Then, by Lemma 2, (19) is satisfied. Therefore, according to the Definition 1, \((p^{*},\mathbf{u}^{*})\) is the unique equilibrium of the Stackelberg game. **Remark 6**. : _If \(p_{\max}\leq P\), then we have EECC's utility function \(S_{E}(p;u_{i}^{*}(p))=-\omega\sum_{i=1}^{N}d_{i}(0)\). Thus, considering \(p_{\max}\leq P\), EECC cannot find a unique optimal strategy._  
Based upon Theorem 1, we specify Algorithm 1 to achieve the Stackelberg equilibrium of the game. ```
0: Initialize the time horizon \(\mathcal{T}\equiv[t_{k},t_{k}+T]\);  Initialize the switch state \(W_{i}(t_{k})\) of TCL user \(i\);  Initialize the market price P;  Initialize the reference temperature \(\theta_{i}^{r}\) of TCL user \(i\);  Set the reference demand \(q_{i}\) of TCL user \(i\) by (13) w.r.t \(\theta_{i}^{r}\). 0: EECC's optimal broadcast price \(p^{*}\);  Each TCL user's adjusted set-point temperature \(\widehat{\theta}_{i}^{*}\).