Observer Design for Estimation of Nonobservable States in Buildings

Efficient temperature control requires more than air temperature measurements. Relevant variables, such as wall, ceiling, and other construction temperature evolution are usually unmeasured. Estimation of such quantities is often difficult because they are not observable with respect to available data. ,eir availability however would allow efficient control design. In this paper, we propose a method for designing state observers that efficiently estimate not only observable but also nonobservable (but detectable) state variables. Our method uses contraction semigroup, to obtain observer with a monotonic error reduction. Proposed approach gives twice as fast estimation as pure simulation and avoids transitional error standard observer would have. Problem of state estimation in building control applications is an important one. Attractiveness of obtaining values of physically unmeasurable variables is easily visible, as it would allow more efficient methods of temperature control. In this paper, authors discuss the problem of such estimation using a lumped capacitance model. ,is type of model is usually only detectable but not observable. Methods of observer tuning for such systems are not discussed properly in the literature and require special consideration. In this paper, three approaches for estimation are compared: pure model, eigenvalue shifting, and contraction semigroup observer. Results are illustrated with numerical experiments.


Introduction
One of the currently important areas of control and electrical engineering is the problem of efficient energy usage in building installations [1,2]. It is especially important because of economical reasons. While problem of industrial and office buildings is well known, the area of housing buildings was not extensively investigated. Practical approaches of home owners usually focus on thermal isolation and efficient heaters (either condensation gas furnaces or heat pumps). e idea of using dedicated control strategies for housing buildings is not yet popular; however, it is believed that it would lead to both increase in comfort and more efficient energy usage.
In order to formulate proper control algorithms, methods of modelling and estimation have been investigated. Sufficient models for building dynamics are obtained by the lumped capacitance method [3,4] . Conveniently, they can be interpreted as electrical circuits. Different approaches include fractional calculus, finite elements, or thermal responses [5][6][7]. A comprehensive review of building modelling was performed by Davies [8]. Methods of simulation of heat transfers in buildings were reviewed by Clarke [9]. Methods of control of building systems were considered among the others by Wang [10] and also by Underwood and Yiki [11]. Methods of control for housing buildings were investigated in [12,13].
It is obvious that control without information is not possible. In perfect conditions, we would measure all the relevant variables having full information about the system. If measurements are not complete and system is observable, then there is a plethora of methods for state estimation. Among the others are state observers, filters, recursive algorithms, hybrid algorithms, or optimisation approaches [14][15][16][17][18][19][20].
Problem occurs when certain states of the system do not fulfill the observability requirement. In this paper, we present a methodology for estimating state under much weaker detectability condition. In such case, only asymptotic state estimation is possible. We present a contraction semigroup-based approach allowing estimation of the entire state vector (including nonobservable states) with continuous reduction of estimation error. We compare it with pure model and eigenvalue shifting approach. e rest of the paper is organised as follows: we present an example of mathematical model of a room and show that it is detectable, but not observable. We then present three methods of constructing state estimator for a detectable system, including contraction semigroupbased approach. We then verify its application for the analysed system and present discussion of methods' effectiveness.

Mathematical Model of a Room
For modelling of temperature evolution inside the building, the method of lumped thermal capacitance method was used. Every element that can influence the temperature is modelled with two resistors and one capacitor. e notations for the variables used in this article are as follows: e modelled system is a single room two walls of which are outside walls and two that are inside walls. Room surface is 63 m 2 , and its volume is 179.5 m 3 . Equations and their parameters are from [21]. e proposed model is consistent with real system ( [11], p. 244). e electrical analogue of the system is presented in Figure 1. We assume, that the only measurement is the temperature inside the room. e analysed model is presented in the form of vector matrix notation: where A is the state matrix, B is the control matrix, Z is the exogenous input matrix, C is the output matrix, x(t) is the state, z(t) is the exogenous input, u(t) is the control, and y(t) is the output.
Matrix A has most of its elements equal to zero, except Other matrices take the following form: In equation (1), matrix 8 and vector 10 temperatures T z1 , T z2 , and T z3 are interpreted as exogenous inputs, as they are not measured (usually such measurements are not available).
ey cannot be ignored, as they would introduce additional errors in the estimation. Frequently used simplification is to assume that these temperatures are equal to T out ( [11], p. 88).
Assuming that matrices of the model have to be modified. In the case of state matrix A, the following elements are changed matrix of exogenous inputs takes the following form: and vector of inputs is reduced to For reminder of the paper, we will multiply the state equation (1) by E −1 obtaining standard state equations with

Analysis of Observability
As it is common with systems with real parameters and order grater than 3 using the standard Kalman condition for observability, i.e., cannot be applied directly. e number of multiplications of rarely well-scaled coefficients often makes the matrix rank undeterminable. It is frequent that (in case of single output systems) determinant of the Kalman matrix is close to zero but results are inconclusive. For larger systems, it is more practical to use the extension of detectability condition, that is, is criterion is much more numerically efficient, as the determination of matrix rank is much easier.
Using extension of detectability condition, one can easily determine that the system is not observable, as for two eigenvalues the rank is 5. e system is however detectable because it is asymptotically stable. It is enough for the construction of Luenberger observer. It is however problematic how to set the gains of the observer because the literature does not present appropriate criteria for such case. It is often suggested to decompose the system into observable and unobservable subspaces; however, such decomposition for our case is not practical. Another way to solve the problem with lack of observability was presented in article [12] where indistinguishable states were aggregated into one state.
e decomposed system has its own observable state variables that cannot be used for the determination of values of physical state variables. We will now discuss three approaches for detectable system observer.
We will focus on the full-rank Luenberger observer, that is, It is a known fact that for estimation error defined as e � x − x, error dynamics evolves according to the following equation: and error of estimation will be a focus of the analysis.

Pure Model Estimation
is approach is popular in electric drive control and is effectively an open loop estimator. In such case, matrix gain G � 0 and observer reduces to the following form: e system is asymptotically stable, so the error estimation is as follows: Pure model estimation does not use information about system outputs. at is why its dynamics is equal to the dynamics of the original system. Its merit is however that the estimate is not influenced by measurement errors.

Eigenvalue Shifting
Because the system is not observable, its eigenvalues cannot be placed at desired values; however, one can choose such gain G that real parts of error dynamics matrix A − GC eigenvalues are shifted to the left as far as possible. Such gain is a solution of the following optimisation problem: It is a typical min-max problem and comes with all its difficulties. Such problems are usually hard to solve using any simple method. After careful analysis of Nelder-Mead and genetic and other derivative-free algorithms, the best results were obtained with simulated annealing.

Contraction Semigroup Observer
is type of research was considered in earlier research (see [22], where it was focused on systems observable but with multiple outputs.
is type of observer cannot be constructed for every kind of system, as it depends strongly on structural properties of matrix; among the others, it can be constructed for systems where error dynamics state matrix takes the form of symmetric, normal, or diagonally dominated Metzler matrix. However, this approach can be used for detectable systems with desired structure as it does not require specific placement of eigenvalues.

Motivation. It is a common conception that if linear systems, such as
have only real negative eigenvalues, it is well damped. It is usually explained that the absence of complex eigenvalues guarantees the lack of oscillations. Norm of the trajectory fulfills the following relation: Moreover, the exponential stability of the system guarantees that the norm of fundamental matrix ‖e At ‖ is bounded as follows: where c � max i Reλ i (A).Let us consider the following matrix It can be easily seen that this matrix has real, distinct eigenvalues, so its trajectories should be well damped. However, see Figure 2 for the plot of the norm of the trajectory of system 21 with the matrix 23 with the initial condition: As one can see, the initial norm ‖x(0)‖ � 1 is multiplied by about 150 at t ≈ 1.5. at is why additional analysis of damping of the system is necessary. It should be noticed that the bound 22 still holds. Unfortunately, the multiplier c(ε) in general case can be arbitrarily large; in this case, it would be about few hundreds.
One can easily come to the conclusion that if error of the observer would behave in the similar way, the control quality would be seriously impaired. Moreover, analysis of these phenomena is desired because it is quite common for observers with high gains to generate large transitional errors. In the literature, it is called the peaking phenomena. e best possible situation for the estimation quality would be for the error of estimation to decrease with time. In case of systems with linear error dynamics in order for this to happen, the evolution must behave as a contraction semigroup, that is, ‖exp((A − GC)t)‖ ≤ e −αt , α > 0. It gives an exponential bound on the vanishing of error and guarantees that the error will not exceed the initial value.

Bound on the Matrix Exponential.
In order to guarantee the fulfillment of one needs to find a way to asses the value of matrix exponential norm. It is rather obvious that determination of such norm explicitly, especially as a function of observer parameters, is difficult, if not entirely impossible. Let us introduce the following.
Definition 1 (Damping coefficient). A real number μ(A) will be called a damping coefficient of matrix exponential of A if Norm of the matrix exponential fulfills the following bound: e exact value of a damping coefficient depends on the norm used in Definition 1. For spectral norm, we have For more details on damping coefficient (under the name logarithmic norm), see [23]. As it can be seen if damping coefficient is negative, then matrix exponential of A is a contraction semigroup.
In this paper, this methodology was used for design of the observer. e main idea was to find observer gain G which would lead minimal damping coefficient, and if that coefficient would be negative, then this gain would be used. at proved to be the case, and the gain being the solution to is optimisation problem was well conditioned and easily solvable with a Nelder-Mead algorithm.

Observer Comparison
In this section, comparison of observers obtained with three described methods is presented. For every case, the evolution of Euclidean norm of the system is analysed. For each case, plots of the norm are presented in linear and logarithmic scales. e principal reason for using both these scales is that, in all cases, error should vanish approximately exponentially. It is easily visible in the initial stages on the linear scale; however, when the error drops few orders of magnitude, the differences stop being visible. In logarithmic scale however, the exponential trend is visible as the straight line, and one can easily observe error behaviour for all orders of magnitude. It should be noted that because the times of integration of differential equations are long, special consideration has to be taken with the respect to solver. Initially, the Dormand-Prince 5(4) solver was used; however, it introduced artificial oscillations. It was replaced with a Kolpfstein-Shampine 1-5 solver, which is dedicated for stiff equations, and these oscillations were eliminated.
e first system presented is the estimator using only model. Its operation is illustrated in Figure 3. Figure 3(a) presents vanishing of the error in linear scale, and Figure 3(b) shows strictly exponential behaviour. It can be seen as the point of reference for other observers, which should at least produce some improvement. e second observer analysed was based on eigenvalue shifting. Its operation is illustrated in Figure 4. It can be easily seen that peaking phenomena occur.
e error norm has two maxima visible both in linear (Figure 4(a)) and logarithmic scales (Figure 4(b)). Initial error is multiplied by 10. In logarithmic scale, it can be seen that reduction to the order 10 0 occurs faster than for pure model, and reduction of error from that is the the fastest up till order 10 − 3 .
e system however exhibits oscillations that make further reduction impossible. ese oscillations are connected with a conjugate complex pair of eigenvalues: of the observer matrix A − GC. Appearance of complex eigenvalues is the consequence of the optimisation-based eigenvalue shifting approach. e final analysed observer was based on obtaining contraction semigroup. Its operation is illustrated in Figure 5. As it can be seen, this observer does not introduce errors visible as in the case of the previous one. e observer is the fastest to reach the order of magnitude of 10 0 and does not introduce transitional errors. What is important, the observer keeps the exponential vanishing of error throughout the simulation.
For comparison of observer performance, it is best to view the error behaviour at the same plot. Because the biggest difference is visible both for high (transitional error) and low (oscillations) orders of magnitude, trajectories are presented in the logarithmic scale in Figure 6. One can observe as follows: (i) Both eigenvalue shifting and contraction semigroup approach lead to improvement over pure model simulation. (ii) e fastest initial reduction (until order of 10 0 ) is obtained with the contraction semigroup observer, which does not introduce initial errors. (iii) Eigenvalue shifting allows very quick reduction of the error to the order of 10 − 3 . However, presence of oscillations stops the exponential vanishing at that level.
Mathematical Problems in Engineering 5 (iv) Contraction semigroup observer keeps the exponential trend till the end of simulation, overtaking in error reduction.

Conclusions
Analysis of methods of observer parameter tuning shows advantages of contraction semigroup approach to others considered. However the problem of observer tuning for detectable systems is still open, as this approach can be applied only for a specific class of systems, which is not fully defined. It should be noted that both proposed observer tuning methods have their strengths. Eigenvalue shifting observer allows quick reduction of error to relatively low values. Unfortunately it introduces transitional errors, which can lead to very completely unsuitable control. In extreme cases, it could lead to temperature oscillations in the building, which would lead to a drastic comfort reduction. Contraction semigroup observer guarantees that no transitional error will be greater than the initial one.
is along with initial convergence suggests this observer as the suggested one for building control applications. Unfortunately, lack of observability of the system does not allow combination of the two-construction of the switching function based on available measurements is impossible.

Data Availability
e data used to support the findings of this study are included within the article.

Conflicts of Interest
e authors declare that they have no conflicts of interest. During initial 100 seconds contraction, semigroup design shows the fastest error vanishing (corresponding to error less than 1°C). In that period, eigenvalue shfting design introduces transitional error up to an order of magnitude greater than the initial one. After 100 seconds, eigenvalue shifting design reduces error faster but then starts oscillating. Contraction semigroup design reduces error monotonically till the end.