Detection and Correction of the Controlled Object Transfer Function in the Smart Home Control System

The method to determine dynamic characteristics of an object according to a performed experiment is presented. The so-called area method makes it possible to computerize the procedure, and parametric optimization is used to correct the obtained transfer function. All the procedures may be carried out by a controller of the heating system of a smart home. When ambient temperature and other conditions change, the transfer function of a controlled object may be automatically adjusted recalculating the parameters of a system controller for optimal usage of heat and electric energy DOI: http://dx.doi.org/10.5755/j01.eie.23.1.9839


I. INTRODUCTION
In recent years, the issue of saving energy of all types has become more and more relevant not only because of energy price but also because of other global issues (global warming and environmental pollution).Not only is energy saving relevant when using more efficient sources of primary energy conversion, but it is also possible and necessary as a result of efficient control [1]- [3].One of possible sources of energy saving is efficient control of heating systems in dwelling houses.Energy usage in newly built houses is lower due to more efficient materials in terms of heating.Often such houses use smart control systems [4] that enhance energy saving even more.Low heat resistance materials were used in construction of old dwelling houses, therefore a considerable amount of energy is used to keep normal conditions during winter due to both the state of the building and inefficient control.In order to have optimal control of any object, accurate characteristics of the object are needed.Both static and dynamic characteristics of such Manuscript received 9 December, 2015; accepted 24 September, 2016.This research was funded by EU Structural Funds project "In-Smart" (Nr.VP1-3.1-ŠMM-10-V-02-012),Ministry of Education and Science, Lithuania.
an object as a dwelling house cannot be described using an analytic method in practice since it possesses so many constituents and sometimes indefinite elements, which would make it extremely time consuming to achieve the goal.If we were to set performance characteristics to such an object, we would face a series of unknowns since a lot of constructional elements of dwelling houses are hidden and sometimes even unknown.Thus it is most effective to determine performance characteristics of such an object experimentally.For static characteristics, this method is very efficient; however, to obtain dynamic characteristics of an object, a series of special calculations has to be performed, which in most cases gives a possibility to set just approximate characteristics.On the other hand, in order to have optimal control of such an object, most precise dynamic characteristics are needed.Consequently, the aim of this article is to show how quickly and fairly accurately the performance characteristics may be obtained so that the smart home would satisfy its name and purpose.
Experimental characteristics may be obtained in various ways; yet one of the easiest is monitoring and recording the change of the measured parameter in time after the initial constant change of input parameter or signal has been sent to the system.Having obtained the characteristics (Fig. 1, curve F(t)), one only has to perform a reverse action to get the characteristics of an object that evaluates all the elements and their parameters existing in such a system.Solution of a differential equation with constant coefficients and zero initial conditions is unique, and the solution may be shown as a graph or as a data table.However, the reverse action, i.e. to get a differential equation from a graph or a table, is not unambiguous anymore because everything depends on assumptions and accuracy of calculations.To determine the coefficients of a differential equation manually according to the experimental data, the area method proved to be most efficient.When using a computer, we do not apply the manual method to do calculations mechanically, but use the initial source of the area method in analytic form for calculations.
A transfer function is a differential equation of a different form widely used in the field of automated control.A general form of the transfer function is as follows Only in special cases it is of the following form 1 ( ) . 1 In order to get the transitional process F(t) the solution is obtained using the Laplace transform Due to the area method it may be assumed that the transfer function is of the form (2), and the value of the first area S1 may be determined as the area between the initial impact and the experimental curve (as it is shown in Fig. 1) where   In this way, the first approximation is and then the transition process given by it is a solution of ( 7) The area S2 shown in Fig. 2 by darker area is determined as follows The obtained result of second approximation is as follows It is also possible to determine the transfer function using ( 1), yet it is much more complicated and requires manual solution of the problem.Consequently, it would not be possible to use it in the control system of a smart home.In this case, after area calculation, we would have the following system of equations: To get coefficients a and b, we should have m + n equations, and if j > n then the equation acquires a simpler form 1 1 .
The difference in determining characteristics by one way or another is that the first way allows computerizing the process of obtaining dynamic characteristics in the structure of a smart home under changing ambient conditions (sun, cold, wind, etc.), whereas the second one does not allow this possibility.

II. THE DESCRIPTION OF THE METHOD
The authors of the article propose a method to computerize setting of the transfer function of the controlled object and its adjustment while the control system is functioning.Calculations are performed using relative units, attributing the real values at the end.
The dynamic curve of object response is obtained as follows: when the object temperature and the transfer medium temperature are steady, we increase the debit by increasing the rate of revolutions in a pump, and we measure and record temperature at any time intervals.The obtained dynamic response curve F1(t) is shown in Fig. 1.
Finally, we have to use the dynamic characteristics to determine the transfer function.We will estimate the transfer function coefficients and type employing the following model (Fig. 3).The essence of the method is as follows: unit 3 and unit 2 contain our experimental curve and steady value of the curve, respectively.Integrating, we get the value of the first coefficient of the transfer function in unit 4.
To estimate the second coefficient, we search for difference between the transfer function of first approximation (Fig. 2, curve F1(t)) and a second-order integral of the dynamic experimental curve.As a result, we have the value of transfer function coefficient for the second term.
To get the third coefficient, we search for the difference between the transfer function of the previous approximation and a third-order integral of the dynamic experimental curve.As a result, we have the value of transfer function coefficient for the third element.We continue the process until we get a negative value of the integral.In our case, a sixth-order integral becomes negative.
Having performed such iterations, we get the following transfer function The obtained values of transfer function coefficients are presented in Table I.
As a result, we see that there exists a certain difference (Fig. 4) between experimental and obtained dynamic characteristics.Since one cannot determine the minimum time constant from a general form of the transfer function, we have to detect it experimentally for further calculations.The step of integration may be increased until we get the difference in the values of obtained results.This is necessary for further application of obtained results to adjust a chosen regulator.

III. ADJUSTMENT OF THE TRANSFER FUNCTION THROUGH PARAMETRIC OPTIMIZATION
The transfer function obtained for the initial adjustment of the system is sufficient; however, if we want to have a smart home system with optimal energy control, we have to adjust the transfer function.In general, the transfer function is of the form (1), and we have made an assumption that the object transfer function is of the form (2). The authors notice that optimization has not been used to solve problems of such type because it is time consuming and the existing software is cumbersome.
Software CENTAURUS [5] is used for parametric optimization, including the transfer function, indicating the coefficients to be changed so that the expression of the transfer function would have maximum correspondence to experimental characteristics.The software fully covers the functions of MATLAB SIMULINK, it has optimization and variation regimes and its size is 2.2 MB.It is most efficient to use one of the fastest landing methods, namely the Rosenbrock's one.It should be noted that a new approach to solution possibility resulted in the following.Using operating system Windows 7, 2.6GHz processor, and 4 GB of operating memory, 1,000 optimization steps required only 32 sec.After optimization, slightly different coefficients of the transfer function were obtained; the values of them are given in Table I.The transitional process of it is shown in Fig. 5. Curve discrepancy is shown in Fig. 6.Fig. 6.Experimental characteristics of object response to the impact and its discrepancy with dynamic characteristics.
As one can see, there is a discrepancy between the characteristics.If we assume that the experiment was performed correctly and measurement errors are only possible within the limits of device accuracy, we could claim that this object also contains the constituents of the transfer function found in the numerator.The nature of discrepancy allows us to state that a fading oscillating process is still existent in the system.However, according to its nature (amplitude and duration), we can state that there is also a differentiating-type component.To find the parameters of such a transfer function, the authors once again suggest optimization as a way to find the coefficients of the transfer function while taking the difference in areas as a criterion and changing all the four parameters in the transfer function (13).A general expression of such an additional correction link would be as follows Software CENTAURUS may perform optimization simultaneously changing up to 10 parameters.Optimization is again performed using the Rosenbrock method; the integral criterion may have either quadratic or absolute error, which affects the final result insignificantly.However, when using the integral of absolute error, we get that it is better to have smaller differences that can be compensated  In such a way a revised transfer function of an object is as follows: adding ( 12) and ( 14), we get If experimental characteristics and transitional process given by the transfer function (15) were shown as a graph, the differences would practically be unnoticeable.

V. SELECTION AND ADJUSTMENT OF REGULATORS
Energy saving in smart home heating system poses certain requirements for the entire control system.The usual heating system has two circuits of heat energy: primary and secondary [6]- [8].The primary circuit is a system that converts energy and supplies the secondary circuit.For an individual house, this constitutes a furnace using certain fuel, the energy of which is transferred to the secondary circuit directly or through a heat exchanger.In the case of a block of flats, the circuit constitutes the primary energy carrier of cogeneration network, which transfers energy to the secondary circuit through a heat exchanger.The secondary circuit comprises the entire house structure with any system of heat transfer to the house environment.To reach comfortable conditions, the secondary circuity has a circulating pump of adjustable speed.Control of such a system means controlling the parameters of both circuits.
During a cold season, the temperature of heating water is set and its regulation is not included into house structure, whereas in the case of an individual furnace, its operating regime is regulated by setting a regime depending on outside temperature.The control structure is designed in such a way that in the first case, the heat exchanger regime is regulated by controlling the water flow, in the second case, combustion process in the furnace is controlled.
In the secondary circuit, to attain comfortable conditions, the performance of a circulating pump is adjusted and, in our case, all the correction is done by changing the debit of circulating water and thus saving not only the primary energy usage but also the use of electric energy for economic control of the circulating pump.
Effective functioning of both systems is ensured by regulators the parameters of which depend on the parameters of the controlled object.Two types of regulators are usually installed in such systems regardless of energy saving issue.For the given system with analysed object parameters, control characteristics of two regulators are presented.To determine the characteristics of regulators, optimization was used while forcing the control according to a chosen law.
Adjustment is performed for two regulators, PI and PID. Figure 8 clearly shows that qualitative indicators of both regulators are similar except for a response time.PID regulator has a forcing function, which allows the system to enter a steady work regime phase faster and cancels all additional usages of energy.

VI. FUNCTIONING OF SMART HOME HEATING SYSTEM
There is no difference in equipment of heating systems in an ordinary house and a smart house (as shown in Fig. 9), everything depends on the control method.
One should remember the established requirements and settings for the existing heating systems.Furnace operating regime is set in advance using set points depending on ambient temperature, so that water of sufficient temperature would enter the heating system, which would enable reaching set or comfort conditions in the secondary circuit.If the system contains a heat exchanger to which water is supplied from a network, water temperature is regulated elsewhere, and sufficiently adequate operation of the heat exchanger has to be ensured.The amount of energy transferred through the heat exchanger is controlled using a valve in the flat system so that the water temperature in the secondary circuit is of adequate height.Therefore, the purpose of the controller is to adequately control a furnace or a heat exchanger.Fig. 9. Smart home heating system: furnace (heat exchanger in the case of a block of flats), controller, pump of adjustable speed, water and ambient temperature sensors, individual thermal regulators and valves that guarantee proper functioning of the system if control fails.
The purpose of the secondary circuit pump is to guarantee proper water circulation, regardless of the temperature of return water in the present system; therefore, in many cases discrepancies between certain parameters distort comfort conditions in the premises.Very often temperature regimes are exceeded and this leads to increased cooling of the premises discharging the excess heat to the outside, thus incurring loss.
Another feature of the systems is temperature reduced in the premises by a few degrees at night, which is once again related to comfortable environment and hygiene.
Due to various extraneous agents, the operation of such a heating system is disturbed.Some factors are objective and we cannot affect their influence (e.g.alternating weather conditions such as sun and wind).Other factors are subjective and they can be influenced by the dwellers: change in the setting of individual temperature regulators in different rooms, etc.The objective and subjective changes affect the characteristics of the control system, which makes the operation of controllers non-efficient since they are not adjusted to the varied characteristics of the system.
The control of smart home heating system, on the other hand, may be different.When the control system is initially adjusted, the solution of the analyzed problem may be obtained using the system controller to revise the object parameters and characteristics from time to time.This is convenient when the set temperature is changed twice a day.
The dynamic characteristics of a furnace or a heat exchanger are set and practically unchanging, whereas dynamic characteristics of heated premises may change several times during the day depending on the exploitation of individual rooms: food making, using other devices powered by electricity, etc.The most suitable time to adjust regulators parameters is the moments when the heating is turned down for the night and turned up for the morning.The process will be as follows.
For the night, heating of premises is reduced by two to four degrees.According to the schedule, the controller changes the combustion of furnace by reducing the process so that the amount of heating provided would corespond the parameters set in advance.At the same time, the regulator of pump speed blocks the regulation for a set period of time, which records changes in the system and then the controller parameters are adjusted according to obtained results, and it controls the system until the moment of increased heating in the morning.Analogous procedures are carried out: the amount of heat generated by the furnace is increased, variables are measured without adjustment, regulators parameters are revised and this operation continues until the moment of heating reduction for night regime.
Why is this control process so special?Because of the type of control structure, when a cregulator is a fragment in the control program, it can be disconnected from the control and connected to the control without any problems, which would not be possible without additional expenses in the case of different control equipment.
The adjustment of regulator parameters may be simplified to the adjustment of coefficients of the system model through optimization, without implementing changes into the previous model of the system.This can be done in less than one minute.Then, analogously using the optimization procedure, regulator parameters are adjusted, which again takes less than a minute.After these actions, a pump regulator that revises the heating process due to the changes in dynamic characteristics of an object and discrepancies and other foreseen and unforeseen changes is switched on.One of the advantages of a centrifugal pump is the fact that its coefficient of performance η remains constant when resolutions alter up to 50 %, thus debit is directly proportional to resolutions [9] , whereas pump using power alters considerably 3 .
A centrifugal 300 W circulating pump was used for the experiment.The need for heating during the night is changed for 6 hours while reducing the process of combustion in the furnace and the amount of heat supplied to the secondary circuit of the house while reducing the amount heat through reduced speed of the pump.1.456 kWh economy of electrical energy was obtained during the six hour period.

VII. CONCLUSIONS
One object in the structure of smart home does not have a clear mathematical description, that is, the home structure which determines the efficiency of energy usage.The majority of energy is used by the heating system of the house, thus the possibility to calculate the performance characteristics of the heating system more or less accurately is shown.The characteristics are adjusted and corrected automatically while the system is operating.According to dynamic characteristics of the system, regulator parameters are adjusted.For the heating system to work more efficiently, it is suggested to use a circulating pump, which helps to control the amount of supplied heat.Even if a low capacity pump is used, considerable economy of electric energy is observed.

Fig. 3 .
Fig. 3.The model for determining the transfer function parameters of an object.

Fig. 4 .
Fig. 4. Experimental characteristics of the object response to the impact (1) and the obtained dynamic characteristics (2).

Fig. 5 .
Fig. 5. Experimental characteristics of object response to the impact (1) and obtained dynamic characteristics (2) after optimization.
optimization results are reflected in the transfer function (14) and are shown as a diagram in Fig. 7.

Fig. 7 .
Fig. 7. Correction of discrepancies in characteristics by a corrective transfer function after parameter optimization: 1 -discrepancy, 2correction result.

Fig. 8 .
Fig. 8. Characteristics of optimally adjusted regulators: 1-object characteristics, 2 -chosen control law, 3 -control of a system with PI regulator, 4 -control of a system with PID regulator.

Fig. 10 .
Fig.10.Heating system switch from day regime to night one and backwards: 1 -resolutions of centrifugal circulating pump, 2 -set temperature, 3 -actual temperature, 4 -electric energy used by the pump in kWh when its speed is not changed, 5 -electric energy used by the pump in kWh when its speed is changed, 6 -electric energy saved by the pump in kWh.

TABLE I .
VALUES OF TRANSFER FUNCTION COEFFICIENTS.