## 2 Spatially Fixed Virtual Sensing Algorithms
### The Kalman filtering virtual sensing method
\begin{array}{cc|cc}\mathbf{I}&\mathbf{S} _{ps}^{\mathrm{T}}&\mathbf{S}_{vs}^{\mathrm{T}}&\mathbf{0}\\ \hline\mathbf{S}_{ps}&\mathbf{R}_{p}&\mathbf{R}_{pv}&\mathbf{0}\\ \mathbf{S}_{vs}&\mathbf{R}_{pv}^{\mathrm{T}}&\mathbf{R}_{vs}&\mathbf{0}\end{array}  \right]\delta_{nk}, \tag{24}\]  
where \(E[\cdot]\) denotes the expectation operator, \(\mathbf{I}\) is the identity matrix and \(\delta_{nk}\) is the Kronecker delta function. The term \(\mathbf{B}_{s}\mathbf{s}(n)\) in Eq. (23) can be interpreted as process noise, \(\mathbf{w}(n)\), and the combined influence of the measurement noise signals and disturbance signals can be interpreted as an auxiliary measurement  
Figure 9: Block diagram of (a) implementation of the Kalman filtering virtual sensing method and (b) the generalised control configuration with two sets of inputs and two sets of outputs [53]. noise signal, \(\mathbf{v}(n)\), where  
\[\mathbf{w}(n) =\mathbf{B}_{s}\mathbf{s}(n), \tag{25}\] \[\mathbf{v}(n) =\left[ \begin{array}{c}\mathbf{D}_{ps}\mathbf{s}(n)+\mathbf{v}_{ p}(n)\\ \mathbf{D}_{vs}\mathbf{s}(n)+\mathbf{v}_{v}(n)\end{array} \right]. \tag{26}\]  
Using these definitions, the following covariance matrix can be defined  
\[E\left[\left[ \begin{array}{c}\mathbf{w}(n)\\ \mathbf{v}(n)\end{array} \right]\left[ \begin{array}{c}\mathbf{w}(k)\\ \mathbf{v}(k)\end{array} \right]^{\mathrm{T}}\right]=\left[\frac{\bar{\mathbf{Q }}_{s}}{\bar{\mathbf{S}}_{s}}\left|\frac{\bar{\mathbf{S}}_{s}^{\mathrm{T}}}{ \bar{\mathbf{R}}_{s}}\right]\delta_{nk}. \tag{27}\]  
The covariance matrix \(\bar{\mathbf{Q}}_{s}\) of the process noise \(\mathbf{w}(n)\) is given by  
\[\bar{\mathbf{Q}}_{s}=\mathbf{B}_{s}\mathbf{B}_{s}^{\mathrm{T}}. \tag{28}\]  
The covariance matrix \(\bar{\mathbf{R}}_{s}\) of the auxiliary measurement noise \(\mathbf{v}(n)\) is given by  
\[\bar{\mathbf{R}}_{s} =\left[ \begin{array}{c|c}\bar{\mathbf{R}}_{p}&\bar{\mathbf{R}}_ {pv}\\ \hline\bar{\mathbf{R}}_{pv}^{\mathrm{T}}&\bar{\mathbf{R}}_{v}\end{array} \right]\] \[=\left[ \begin{array}{c}\mathbf{R}_{p}+\mathbf{S}_{ps}^{\mathrm{ T}}\mathbf{D}_{ps}+\mathbf{D}_{ps}\mathbf{S}_{ps}+\mathbf{D}_{ps}\mathbf{D}_{ ps}^{\mathrm{T}}&\mathbf{R}_{pv}^{\mathrm{T}}+\mathbf{S}_{ps}^{\mathrm{T}} \mathbf{D}_{vs}^{\mathrm{T}}+\mathbf{D}_{ps}\mathbf{S}_{vs}+\mathbf{D}_{ps} \mathbf{D}_{vs}^{\mathrm{T}}\\ \hline\mathbf{R}_{pv}^{\mathrm{T}}+\mathbf{S}_{vs}^{\mathrm{T}}\mathbf{D}_{ps} ^{\mathrm{T}}+\mathbf{D}_{vs}\mathbf{S}_{ps}+\mathbf{D}_{vs}\mathbf{D}_{ps}^{ \mathrm{T}}&\mathbf{R}_{v}+\mathbf{S}_{vs}^{\mathrm{T}}\mathbf{D}_{vs}+ \mathbf{D}_{vs}\mathbf{D}_{vs}^{\mathrm{T}}\end{array} \right]. \tag{29}\]  
The covariance matrix \(\bar{\mathbf{S}}_{s}\) between the process noise \(\mathbf{w}(n)\) and the auxiliary measurement noise \(\mathbf{v}(n)\) is given by  
\[\bar{\mathbf{S}}_{s}=\left[ \begin{array}{c}\bar{\mathbf{S}}_{ ps}\\ \bar{\mathbf{S}}_{vs}\end{array} \right]=\left[ \begin{array}{c}\mathbf{D}_{ ps}\mathbf{B}_{s}^{\mathrm{T}}+\mathbf{S}_{ps}\mathbf{B}_{s}^{\mathrm{T}}\\ \mathbf{D}_{vs}\mathbf{B}_{s}^{\mathrm{T}}+\mathbf{S}_{vs}\mathbf{B}_{s}^{ \mathrm{T}}\end{array} \right]. \tag{30}\]  
The virtual sensing algorithm in state space form, that estimates the virtual error signals \(\tilde{\mathbf{e}}_{v}(n|n)\), given measurements of the physical error signals \(\mathbf{e}_{p}(i)\) up to \(i=n\), is as follows [8, 12]  
\[\left[ \begin{array}{c}\tilde{\mathbf{z}}(n+1|n)\\ \tilde{\mathbf{e}}_{v}(n|n)\end{array} \right]=\left[ \begin{array}{cc}\mathbf{ A}-\mathbf{K}_{ps}\mathbf{C}_{p}&\mathbf{B}_{u}-\mathbf{K}_{ps}\mathbf{D}_{pu}& \mathbf{K}_{ps}\\ \mathbf{C}_{v}-\mathbf{M}_{vs}\mathbf{C}_{p}&\mathbf{D}_{vu}-\mathbf{M}_{vs} \mathbf{D}_{pu}&\mathbf{M}_{vs}\end{array} \right]\left[ \begin{array}{c} \tilde{\mathbf{z}}(n|n-1)\\ \mathbf{u}(n)\\ \mathbf{e}_{p}(n)\end{array} \right], \tag{31}\]  
where \(\mathbf{K}_{ps}\) is the Kalman gain matrix and \(\mathbf{M}_{vs}\) is the virtual innovation gain matrix.