# Energy Bus-Based Matrix Modeling and Optimal Scheduling for Integrated Energy Systems
## 2 Matrix-Modeling Method
### Transient-State Model  
Due to the fluctuations in the RESs and loads, the IES needs to continually adjust the set points (inputs) of the devices. After each adjustment, the system takes a period of time to enter the steady state. For electricity and gas, the steady state can be achieved quickly, while a long time (a few minutes to tens of minutes) is required for the energy flows of cooling and heat. In the rolling optimization of the IES, the cooling and heat are mostly in an unsteady state, so it is necessary to use a transient model of the energy flow. The details will be discussed in this subsection.  
For energy conversion devices, the transient values of their output energy flow depend on their state vectors \(\mathbf{x}_{i}\), and the transient model can be represented as  
\[\dot{\mathbf{x}}_{i}=\mathbf{A}_{i}\mathbf{x}_{i}+\mathbf{B}_{i}\mathbf{e}_{i,\text{in}}\] (15) \[\mathbf{e}_{i,\text{out}}=\mathbf{C}_{i}\  
where \(\mathbf{L}_{i}\in\mathbb{R}^{m\times m}\) and \(\mathbf{R}_{i}\in\mathbb{R}^{m\times 4}\) are the state matrix and input matrix of the discrete-time model of the device \(i\) in a fixed sampling period \(T_{\text{s}}\), respectively. Through (16), it is obtained that  
\[\begin{array}{l}\mathbf{x}_{i}(k)=\mathbf{L}_{i}^{k}\mathbf{x}_{i}(0)+\mathbf{L}_{i}^{k-1}\mathbf{ R}_{i}\mathbf{e}_{i,\text{in}}(1)+\cdots+\mathbf{R}_{i}\mathbf{e}_{i,\text{in}}(k)\\ \mathbf{e}_{i,\text{out}}(k)=\mathbf{C}_{i}\mathbf{x}_{i}(k)\end{array} \tag{18}\]  
This shows the transient energy output \(\mathbf{e}_{i,\text{out}}\) at any sampling point. On this basis, the energy supply and demand can achieve a strict balance and the set point optimization for any energy flow can be implemented in the same rolling cycle.  
In this study, the state vectors of the PGU, gas boiler, absorption chiller, and electric chiller are their output vectors, i.e., \(\mathbf{C}_{i}=\mathbf{I}\). This means that the transient conversion of the natural gas, electricity, cooling, and heat energy flows has inertial characteristics, which mainly exist in the transfer of a certain energy flow. For the cooling and heating processes, the chiller and PGU must bring the cooling and heating media to certain temperatures, and their energy outputs vary with the temperatures of the media. The transient state of electricity or gas changes very quickly and can be approximated as an inertial element. Hence, the state matrix can be expressed as  
\[\mathbf{A}_{i}=\begin{bmatrix}-1/\tau_{i,\text{g}}&0&0&0\\ 0&-1/\tau_{i,\text{e}}&0&0\\ 0&0&-1/\tau_{i,\text{c}}&0\\ 0&0&0&-1/\tau_{i,\text{h}}\end{bmatrix} \tag{19}\]  
where \(\tau_{i,\text{g}}\), \(\tau_{i,\text{e}}\), \(\tau_{i,\text{c}}\), and \(\tau_{i,\text{h}}\) are the gas, electricity, cooling, and heat inertia time coefficients of device \(i\). The input matrix is represented as  
\[\mathbf{B}_{i}=-\mathbf{A}_{i}\mathbf{H}_{i} \tag{20}\]  
The transient-state model of device \(i\) is  
\[\mathbf{e}_{i,\text{out}}(k)=\mathbf{L}_{i}^{k}\mathbf{e}_{i,\text{out}}(0)+\mathbf{L}_{i}^{k- 1}\mathbf{R}_{i}\mathbf{e}_{i,\text{in}}(1)+\cdots+\mathbf{R}_{i}\mathbf{e}_{i,\text{in}}(k) \tag{21}\]  
with  
\[\mathbf{L}_{i}=\begin{bmatrix}\exp\bigl{(}-T_{\text{s}}/\tau_{i,\text{g}}\bigr{)} &0&0&0\\ 0&\exp(-T_{\text{s}}/\tau_{i,\text{e}})&0&0\\ 0&0&\exp(-T_{\text{s}}/\tau_{i,\text{c}})&0\\ 0&0&0&\exp(-T_{\text{s}}/\tau_{i,\text{h}})\end{bmatrix} \tag{22}\]  
\[\mathbf{R}_{i}=(\mathbf{I}-\mathbf{L}_{i})\mathbf{H}_{i} \tag{23}\]  
It is clear that the transient output at a specified time \(kT_{\text{s}}\) can be calculated via the input sequence \(u(0),\ldots,u(k)\). If the sampling time \(T_{\text{s}}\) is sufficiently greater than the inertia time \(\tau\), we can obtain  
\[\mathbf{L}_{i}\rightarrow\mathbf{0},\mathbf{R}_{i}\rightarrow\mathbf{H}_{i} \tag{24}\]  
and the transient-state model can be degraded into the steady-state model.