• No results found

Modelling and Control System design to control Water temperature in Heat Pump

N/A
N/A
Protected

Academic year: 2021

Share "Modelling and Control System design to control Water temperature in Heat Pump"

Copied!
72
0
0

Loading.... (view fulltext now)

Full text

(1)

Modelling and Control System design to control Water temperature in Heat Pump

Modellering och reglersystemdesign för att styra vattentemperaturen i värmepump

Md Mafizul Islam Md Abdul Salam

Faculty of Health, Science and Technology Master’s Program in Electrical Engineering Degree Project of 15 credit points

Supervisor: Jorge Solis (Karlstad University), Jonas Andersson (Hetvägg AB) Examiner: Arild Moldsvor (Karlstad University)

Date: 09th December 2013 Serial number:

(2)

I

Abstract

The thesis has been conducted at Hetvägg AB and the aim is to develop a combined PID and Model Predictive Controller (MPC) controller for an air to water heat pump system that supplies domestic hot water (DHW) to the users. The current control system is PLC based but because of its big size and expensive maintenance it must be replaced with a robust controller for the heat pump. The main goal of this project has been to find a suitable improvement strategy. By constructing a model of the system, the control system has been evaluated. First a model of the system is derived using system identification techniques in Matlab-Simulink;

since the system is nonlinear and dynamic a model of the system is needed before the controller is implemented. The data has been estimated and validated for the final selection of the model in system identification toolbox and then the controller is designed for the selected model. The combined PID and MPC controller utilizes the obtained model to predict the future behavior of the system and by changing the constraints an optimal control of the system is achieved. In this thesis work, first the PID and MPC controller are evaluated and their results are compared using transient and frequency response plots. It is seen that the MPC obtained better control action than the PID controller, after some tuning the MPC controller is capable of maintaining the outlet water temperature to the reference or set point value. Both the controllers are combined to remove the minor instabilities from the system and also to obtain a better output. From the transient response behavior it is seen that the combined MPC and PID controller delivered good output response with minimal overshoot, rise time and settling time.

(3)

II

Acknowledgments

First of all we would like to thank our Supervisor Jonas Andersson at Hetvägg for his support, suggestions and also for giving the facilities needed in completion of this thesis work

We would like to give special thanks to our supervisor Jorge Solis at Karlstad University for his valuable guidance and advice in key situations of the project. Without his suggestions this thesis would not have been possible.

We are very thankful to our Examiner Arild Moldsvor at Karlstad University for giving us an opportunity to do this thesis work.

Finally, we are thankful to entire faculty at Karlstad University, Swapan Chatterjee and all those people who have been involved in this thesis project. We are deeply indebted to our parents for their encouragement and moral support through our entire studies.

(4)

III

Table of Contents

Abstract ... I Acknowledgments ... II Nomenclature ... VI List of Figures ... VIII List of Tables ... X

1 Introduction ... 1

1.1 Overview ... 1

1.2 Background ... 1

1.3 Problem formulation ... 3

1.4 Purposes of master’s thesis ... 3

1.5 Thesis Contribution ... 4

2 System description ... 5

2.1 Overview of the heat pump system ... 5

2.2 Heat transfer of the system ... 6

2.3 Outside air temperature of the system ... 7

2.4 Refrigerant of the system ... 8

2.5 Discharge of the heat exchanger ... 9

3 Modeling of the system ... 11

3.1 System Identification Introduction ... 11

3.2 Model structure for identification method ... 11

3.3 Model quality and experimental design ... 11

3.4 System identification principle ... 12

3.5 System identification loop ... 13

3.6 System identification method ... 14

3.7 Data Examination ... 14

3.8 Model structure selection ... 15

3.9 Model Estimation ... 17

3.9.1 Estimation of the ARX model structure ... 17

3.9.2 Estimation of the ARMAX model structure ... 18

3.10 Model Validation ... 18

3.10.1 Residuals analysis ... 19

3.10.2 Pole-Zero analysis ... 20

3.11 Fitting model for controller design ... 22

4 Controller design ... 24

(5)

IV

4.1 Controllers of a system ... 24

4.1.1 Proposed controllers ... 24

4.2 PID Controller ... 25

4.2.1 PID controller Theory ... 25

4.2.2 Proportional term ... 25

4.2.3 Integral term ... 26

4.2.4 Derivative Term ... 26

4.3 PID Controller for the heat pump ... 27

4.4 PID controller tuning rules ... 27

4.4.1 Ziegler Nichols Tuning ... 27

4.4.2 Traditional Z-N tuning Method ... 28

4.4.3 Modified Z-N Tuning Method ... 28

4.5 PID tuning for the system ... 29

4.6 Transient response specifications ... 30

4.6.1 Traditional Ziegler-Nichols response ... 30

4.6.2 Modified Ziegler-Nichols response ... 31

4.7 Pole-Zero analysis of the PID Controller ... 31

5 MPC controller design ... 33

5.1 MPC Introduction ... 33

5.2 MPC Model ... 33

5.3 MPC Theory ... 33

5.3.1 MPC Internal model ... 34

5.3.2 Constraints ... 34

5.3.3 Cost funciton ... 35

5.3.4 Output prediction ... 35

5.4 MPC Tuning ... 36

5.4.1 Prediction horizon Np ... 36

5.4.2 Control horizon Nu ... 37

5.4.3 Weighting matrices ... 37

5.5 MPC controller response ... 38

5.6 Pole-Zero analysis of the MPC Controller ... 39

5.7 PID-MPC controller response ... 39

6 Results analysis and Discussion ... 41

6.1 Simulation result analysis ... 41

6.2 Analysis of the model selection results ... 41

6.3 Analysis of the PID controller result ... 42

(6)

V

6.4 Analysis of the MPC and PID-MPC result ... 42

6.5 Results comparison with previous work ... 44

7 Conclusion and Future work ... 45

7.1 Conclusion ... 45

7.2 Future Work ... 45

Bibliography ... 47

Appendix A ... 51

A.1 Constant coefficient for air to water ... 51

A.2 constant coefficient for water to outside air ... 51

A.3 Water inside the condenser ... 52

A.4 Outlet temperature and area... 52

A.5 Minimum and Maximum ambient temperature effect ... 53

A.6 P-h diagram for refrigerant R-134a ... 54

Appendix B ... 55

B.1 System identification toolbox processor ... 55

B.2 ARMAX2422 model specifications ... 55

B.3 ARX791 model specifications ... 56

B.4 ARX221 model specifications ... 56

B.5 ARX611 model specifications ... 57

B.6 OE221 model specifications ... 57

Appendix C ... 58

C.1 simulation model without controller ... 58

C.2 Simulation model with PID controller ... 58

C.3 Simulation model with MPC controller ... 59

C.4 Simulation model with PID-MPC controller ... 59

Appendix D ... 59

D.1 Bode plot of the PID controller scheme ... 59

D.2 Bode plot of the MPC controller scheme ... 60

D.3 Bode plot of the PID-MPC controller scheme ... 60

(7)

VI

Nomenclature

Abbreviations

MPC Model Predictive Control

PID Proportional Integral and Derivative COP Coefficient of performance

deg.C Degree Celsius AR Autoregressive

ARX AR models with Extra Regressors ARMAX ARMA models with Extra Regressors ARMA Autoregressive moving average

BJ Box–Jenkins

OE Error Estimation PI Proportional Integral PD Proportional Derivative MV Manipulated Variable Z-N Ziegler Nichols

CHR Chien Hrones Reswick TSP Temperature setpoint Td Traditional method Mod Modified method

Mathematical Symbols

𝑁𝑝 Prediction horizon 𝑁𝑐 Control horizon

∆T Change of temperature TV Coolant temperature TS Evaporation temperature

EC Electronically Commutated/ Brushless DC electric motor R134a Refrigerant type

Total change of energy Change of time

Constant depends on the refrigerant flow

The refrigerant flow rate

Constant depends on the water temperature

(8)

VII

The temperature of the refrigerant flowing inside the tube

Initial Energy

Constant which depends on outside temperature

Outside temperature

Constant depends on water and refrigerant na Order of the polynomial A(q)

nb Order of the polynomial B(q) + 1 nc Order of the polynomial C(q)

nk Input-output delay expressed as fixed leading zeros of the B polynomial ( ) The rational transfer function

( ) The rational transfer function ̂ ( ) The cross covariance function ̂ ( ) Input autocorrelation

̂ ( ) Output autocorrelation Kp Proportional gain Ki Integral gain Kd Derivative gain Ti Integral time Td Derivative gain

umin Minimum input flow rate umax Maximum input flow rate xmin Minimum state

xmax Maximum state Tmin Minimum temperature Tmax Maximum temperature

Mp Maximum overshoots

Mu Maximum undershoots

Tr Rise time Tp Peak time Ts Settling time

(9)

VIII

List of Figures

Figure 2.1 Overview of the heat pump system . . . 5

Figure 2.2 Block diagram of the heat exchanger/condenser . . . 6

Figure 2.3 Outside air temperatures during autumn season . . . 7

Figure 2.4 Comparison of the refrigerant coefficient of performance . . . 8

Figure 2.5 Outlet refrigerant temperatures from heat exchanger . . . 9

Figure 2.6 Outlet water temperatures from the heat exchanger . . . 9

Figure 3.1 The system identification loop . . . 13

Figure 3.2 The data set time plot of the heat pump system . . . 14

Figure 3.3 Estimation data . . . 14

Figure 3.4 Validation data . . . 14

Figure 3.5 Step response plot for different model structure . . . 16

Figure 3.6 Frequency response for different model structure . . . 16

Figure 3.7 The ARX model estimated output . . . 17

Figure 3.8 The ARMAX model estimated output . . . 18

Figure 3.9 Residual analysis of the ARX model structure . . . 19

Figure 3.10 Residual analysis of ARMAX model structure . . . 20

Figure 3.11 Pole-Zero for the arx791 model structure . . . 20

Figure 3.12 Pole-Zero for the amx2422 model structure . . . 21

Figure 4.1 Block diagram of the PID-MPC controller scheme . . . 24

Figure 4.2 Block diagram of PID controller for the condenser . . . 27

Figure 4.3 Response curve for Ziegler Nichols method . . . 28

Figure 4.4 The transient response specifications . . . 30

Figure 4.5 Response curve using Traditional Ziegler-Nichols method . . . 30

Figure 4.6 Response curve using Modified Ziegler Nichols method . . . 31

Figure 4.7 Pole-Zero plot of the PID Controller scheme . . . 32

Figure 5.1 Block diagram of the MPC controller scheme . . . 34

Figure 5.2 Prediction horizons tuning of the MPC controller . . . 37

Figure 5.3 Input weight tuning of the MPC controller . . . 37

Figure 5.4 Outlet water temperature using MPC controller . . . 38

Figure 5.5 Poles and Zeros plot of MPC controller . . . 39

Figure 5.6 Outlet water temperature using PID-MPC controller . . . 39

(10)

IX

Figure 5.7 Poles and zeros plot of PID-MPC controller . . . 40

Figure 6.1 The outcome by Td. and Mod. PID tuning method . . . 42

Figure 6.2 Outlet water temperature using PID and MPC controller . . . 42

Figure 6.3 Result comparison of PID, MPC and PID-MPC controller . . . 43

(11)

X

List of Tables

Table 2.1 Transient response specifications for the system . . . 10

Table 3.1 ARX model structure specifications . . . 17

Table 3.2 ARMAX model structure specifications . . . . 18

Table 3.3 The Pole-Zero locations of the arx791 model structure . . . . 21

Table 3.4 The Pole-Zero locations of the amx2422 model structure . . . . 21

Table 4.1 Ziegler-Nichols Tuning first (Traditional) method . . . 28

Table 4.2 Modified Ziegler-Nichols Tuning (CHR) method . . . 28

Table 4.3 Traditional Ziegler Nichols tuning method result . . . 29

Table 4.4 Modified Ziegler Nichols tuning method result . . . 29

Table 4.5 Comparison of controller parameters . . . 29

Table 4.6 Transient responses of the Traditional Z-N tuning method . . . 31

Table 4.7 Transient responses of the Modified Z-N tuning method . . . 31

Table 5.1 MPC tuning parameters value . . . 38

Table 5.2 The transient response specifications of the MPC controller . . . 38

Table 5.3 The transient response specifications of the PID-MPC controller . . . 40

Table 6.1 Experimental result for ARX and ARMAX models . . . 41

Table 6.2 Transient response specifications comparison . . . 43

(12)

XI

Keywords

Water temperature control, System identification, system identification toolbox, Proportional integral derivative (PID), Model predictive control (MPC), water flow control, Heat pump control system.

(13)

Page:- 1

Chapter 1

Introduction

The aim of this chapter is to present the introduction of the project and overview of the topics presented in this report. This chapter will also cover the background, objectives and purposes of the master’s thesis.

1.1 Overview

The Heating system is a system with a very high thermal inertia so a good control of the system is always a challenge. The system is complex and dynamic so accurate control of the system is difficult to realize. In the heat pump system energy is drawn from the surrounding air and sun which is used to heat water stored in a conventional water tank. Heat pump water heaters can be designed for installation as either an integral part of the water heater tank [1].

When water flow through heat exchanger/condenser, they give up or gain energy. Thus, the driving temperature varies through the exchanger [2]. On the other hand if the water in the tank is cold it has to be heated up, so a good control strategy is needed to maintain exact temperature of water before it is filled in tank. The purpose of the air to water source heat pump is to utilize the energy stored in the air or renewable energy sources so as to get a lesser heating cost.

When controlling the heat pump we need to see the amount of power consumption and also the user comfort must not be affected [3]. In any control system, the designing of the control system is the most important thing. There are different types of controllers, which can be conventional or intelligent. A controller measure and control the supply of water [4] to the condenser. All heat pumps require a control system either to control water level in the tank or the outlet water temperature from the condenser. This thesis presents a strategy of designing the control system for the heat pump that maintains the temperature of domestic hot water (DHW) supply with the help of PID and MPC controller. PID and MPC controllers are selected for the reason that it gives good control action, more robustness and simplicity. Each heat pump uses the hot refrigerant from the compressor to heat the water inside the condenser.

As the water temperature in our system is varying the goal of the controller will be to obtain the control over the flow of the refrigerant to get a constant domestic hot water temperature.

An accurate model of the system is needed for the proper designing of the controller; it is shown that the model can be obtained using system identification toolbox techniques where the estimation and validation of the model is done.

The traditional and modified Ziegler Nichols tuning is studied and compared for the selection of better achievement of the control action, the PID and MPC results are studied and from the transient response behavior of both the controllers it is seen that PID and MPC combined scheme performs better than only using the PID and MPC controller Therefore Model Predictive Control (MPC) and PID control is the best advanced technique that will help in obtaining the control of water temperature for heat pump.

1.2 Background

The heat pump consists of four main parts: a condenser, evaporator, compressor and an expansion valve. When the compressed or hot refrigerant is passed from the condenser, heat is transferred from a hot medium to a cold medium. In ground source heat pump, heat is extracted from a bore hole and transferred to the refrigeration medium by a heat exchanger called evaporator. When the pressure on refrigerant increases its temperature also increases which develops heat.

(14)

Page:- 2 Heat is then transferred from the refrigerant medium to the water by an exchanger called condenser. After the refrigerant transfers heat it is passed through expansion valve where the pressure and the temperature are lowered. To minimize the power consumption we are using air to water heat pump because as the temperature of water increases in heating the consumed electrical power also increases. Therefore air to water heat pump is a good alternative for saving electrical energy. The main idea in this thesis is to control the water temperature for which the refrigerant flow towards condenser must be controlled. To achieve the best output of the system before designing the controller the system need linear modeling. The model based design describes the system identification procedure which is used to identify the system. The purpose of system identification is to establish a mathematical model and use the results of system identification to resolve practical problems by developing a controller [5].

System identification is used in the process of formulating the mathematical model of system using the measurement data [6].

There are several steps used for identification procedure which include the model selection [7]

model estimation, validation and error analysis [8]. This wide variety of model structures and identification methods provides the investigator with an extensive toolkit [9]. The residual, correlations analysis [10] is very important to validate the design model. The PID and MPC controller are used for the reason that it gives efficient and faster results closer to equilibrium or the set point. One type of controller which is most widely used these days is the PID controller. In practice PID controller gives good performance although its tuning is a bit complex task but it gives accurate results. MPC is advanced controlling method among all strategies. Model predictive control is used to predict the impact of certain control signals to improve the performance of the system. At each sampling instant, information about the real plant is gathered through measurements which then are used as input data for the internal plant model. An algorithm of PID based on the Model Predictive control methods is derived.

The three parameters of PID namely KP, KI and KD are tuned to achieve better closed loop performance. Depending on this algorithm for time delay system will enhance the real time performance and reliability of the process control system.

On analyzing the three parameters it seen that the effect is not ideal so a new structure is developed in this paper which can effectively solve this problem by introducing a feedback from the actuator output to the controller. This structure provides an effective way for modeling and control of the process [11]. A PID controller is selected for controlling the temperature of the heat pump system. The comparison performances are done between the PID controller and conventional on-off controller. Both the controllers are designed and evaluated using Matlab Simulink software. The comparison of simulation results showed the effectiveness of PID controller in maintaining inner refrigerator temperature than conventional controller [12].

A PID controller of Heat Exchanger system is done in this thesis paper. In heat exchanger the temperature control of outlet water is very important. Due to the disadvantages of the conventional controller a model based PID controller is designed in this system to control the outlet water temperature. With the implementation of designed model based PID controller the temperature of the outlet fluid reaches the desired set point in the shortest time irrespective of the disturbances. The transient response behavior of the system has shown improvement in overshoot and settling time [13]. The Application of Nonlinear PID controller in main steam temperature control is discussed. The fixed parameters of the PID lead to poor performance.

The ideal change between the error of the control object and control parameters are evaluated and nonlinear PID is formed to remove the error. The parameters of nonlinear PID controller are tuned using NCD block set in Simulink and it performs better than the traditional linear PID controller [14]. A Hybrid PID-fuzzy control scheme is developed for managing energy resources in buildings. A parallel structure of either combination of PID and Fuzzy controller

(15)

Page:- 3 is selected or Fuzzy supervision of PID controller. The simulations of the controlled scheme is tested in a mock building set up and finally a criteria describing the way energy is used and controlled is evaluated using the proposed controlled scheme [15].

In application of model predictive controller in agricultural processes the main aim is to achieve temperature control of the greenhouse. In this work a real time model predictive controller is designed to control the nonlinear system with constrained manipulated variables.

The linearized model is obtained at each sample instant and optimal control is achieved [16].

MPC controller is compared with an adaptive PID controller in terms of energy, economic savings and transparency.

A predictive control is implemented to control the temperature of a batch reactor. First a cascade control structure is implemented according to the heating or cooling system and the differences in the sub unit’s dynamics are also considered [17]. Predictive functional control is implemented for the temperature control of the exothermic chemical reactor. Its differences with the MPC controller are studied. The results describe the performance of the cascade control structure in maintaining the temperature of the batch reactor.

We studied from the previous work that the MPC controller is suitable for heating systems and no other controllers like optimal or adaptive controls. The selection of the controller is mainly depended on the type of the system and the predicted results. As the heating system is dynamic and for the system like DHW heat pump the temperature is abruptly changing so an advanced controller is needed that can adapt and control the fast variations of the temperature.

MPC controller predicts the future behavior of the system and gives control action in advance so it is selected for heat pump. The controller checks and calculates the errors and quickly gives the control action.

1.3 Problem formulation

The control of water temperature is an important factor in the operation of the heat pump system. The heat pump in this thesis works on air to water energy and it is a complex and dynamic system therefore the outlet temperature of water from the condenser keeps changing constantly. The water is used for domestic purposes therefore a good control of water temperature is needed. The outlet temperature of water from the condenser must be around 600C when it is filled in the tank for domestic use.

Therefore the main aim of the thesis is to control the outlet water temperature from the condenser/heat exchanger of the heat pump. In doing so we control the refrigerant flow as it plays a vital role in heating of water in the condenser. A good approach would be to implement a PID controller along with model based controller for the system. The suggested control system is small size and relatively less expensive than previous controller. The construction and evaluation of a new control scheme will require a model of the condenser.

So another objective of this project is the modeling of the system in order to use it as a base for the controller design.

1.4 Purposes of master’s thesis

The main focus of this master thesis is to design a controller to control the outlet water temperature from the condenser. In order to obtain the control of the water temperature our primary task would be to control the refrigerant flow. In doing so we need to completely analyze how the system behaves in different conditions. An accurate model of the system is to be obtained using mathematical modeling and also system identification methods and later on a PID and model based controller would be designed to achieve better control action of the system.

The final results of this project thesis will indicate what types of controller/controlling techniques will be best for similar systems. This thesis project also has additional education

(16)

Page:- 4 purposes to finalization of the master’s degree and can be viewed as to apply the theoretical knowledge into the real life engineering problem and also gets the deeper insights of the real system modeling and controlling techniques.

1.5 Thesis Contribution

Throughout the master’s thesis we have worked together, however there are some tasks that are contributed mostly by individual in below:

 Analyzing and calculating the mathematical expression and design the PID controller , tuning of the controller and adjust the controller for the system. Studying the behavior of the system (Md. Abdul Salam).

 Modeling the Heat Pump System identification techniques, studying various models structure behaviors that are suitable for the system. Studying the working of system in different temperature conditions and its effects (Md Mafizul Islam).

 Comparing the tuning methods for PID controller, Programming for the Controller in MATLAB-Simulink, Design and simulation of Model Predictive controller (Md. Abdul Salam).

 Combining the model with controller for the control of water temperature. Model Predictive Controller (MPC) design and tuning (Md. Mafizul Islam).

(17)

Page:- 5

Chapter 2

System description

The aim of this chapter is to give an indication of the system at Hetvägg prototype 8; it also provide a subterranean look of the system sections specially the system dynamics related to the heat pump. The structure presented in this chapter will be the foundation for the simulation.

2.1 Overview of the heat pump system

In this project an air source heat pump is used to heat the water temperature. In the heat pump section the refrigerant in the evaporator is passing through the compressor. The compressor compresses the refrigerant and it gets superheated which is the input of the condenser of the heat pump and passes through a copper tube inside the condenser. The system shown in figure 2.1 is a heat pump that works to heat the cold water in the tank. The cold water from the outside source is filled in the tank. The thermostat detects the temperature of the water and if the temperature is below 450C the circulating pump starts working and it pumps the cold water into the condenser for heating.

Figure 2.1 Overview of the heat pump system

The condenser transfers the heat energy from the compressed refrigerant flowing inside the copper tube to the cold water and the resultant hot water is again filled back in the tank for the use age. A compressor is used to increase the pressure of the refrigerant [18]. An immersion heater which is operated by electric energy is placed at the bottom of the water tank and a thermostat is placed 1/3 of the total height from the bottom of the tank. When the water temperature goes down i.e. below 600C it increases the chance of legionella growth. So the water temperature should not be less than 600C inside the tank. If the temperature decreases below 450C thermostat reads this value and it gives signal to immersion heater and heater start working for heating water in emergency conditions.

The evaporator sends the low pressure liquefied coolant to the compressor. The expansion valve controls the high pressure of liquefied coolant which is streaming towards evaporator.

The behavior of the expansion valve can be studied by the calculating the temperature difference at the inlet and outlet of the evaporator [19].

∆T = TV – Ts (2.1)

(18)

Page:- 6 where Ts = Evaporation temperature at the outlet of evaporator and Tv = Coolant temperature at the inlet of evaporator. To reduce the electric consumption we have to keep running immersion heater as less as possible. For better understanding of the system we are dividing the whole system into two different systems that is primary system included the heat pump section and the secondary section include the boiler section shown in figure 2.1. The heat pump section includes the evaporation, compression, expansion and condensation parts and the boiler section includes the water tank with placed immersion heater and thermostat inside and circulation pump outside of the tank.

2.2 Heat transfer of the system

The condenser of the heat pump is used to transfer the heat energy from hot media to cold media. It acts as a heat exchanger for the system [20]. It has two copper tubes with same dimensions i.e. one is for air source heat pump and other one is for solar source heat pump which is not used in this system.

Figure 2.2 Block diagram of the heat exchanger/condenser

From figure 2.2, the block diagram of the condenser where the input is the refrigerant and the cold water. The output of the condenser is the hot water which is getting heat energy from superheated refrigerant. The amount of energy transferred from copper tube to water with a unit of time i.e. the total energy is directly proportional to the refrigerant flow rate and the temperature of the air.

( ) ( ) ( ) (2.1) where represent the total Energy of the system, is the constant value which depends on the metal of the tube, is the refrigerant flow rate, is the constant value which depends on water temperature and is the temperature of the refrigerant flowing inside the tube. By taking the differential in equation (2.1) with respect to time we find the small quantity of energy transferred,

( ) ( ) ( )

( ) ( ) ( ) (2.2) To find the total energy transferred of the system if we take integration in equation (2.2) from 0 to t, we have

( ) ( ) (2.3) where, is the initial energy containing in the water. The system is not perfectly isolated so the system will leave some temperature to the outside which will affect the system.

(19)

Page:- 7 If the outside temperature or disturbance is included in equation (2.3) we obtain the heat transfer equation for the system shown in equation (2.4)

( ) ( ) ( ) ( ) ∫ (2.4) where, is a constant. It depends on the outside surface and is the outside temperature or room temperature. The constant value is directly proportional to the difference between refrigerant and water temperature.

( ) (2.5) In equation (2.4), the term is the heat transfer constant between water and refrigerant [21].

The output water temperature from the condenser depends on the input water to the condenser. The mass of input water is inversely proportional to the output water temperature and directly proportional to the temperature getting from the heat transfer of the system.

2.3 Outside air temperature of the system

The outside air temperature or ambient temperature varies with time and it also depends on weather conditions. The outside air temperature during winter and summer time is different.

In summer season the outside temperature is high so the outside air temperature also gives the higher values compare to the winter season. In this heat pump water heating system have heavy plastic condenser whose heat transfer coefficient is very less and also it is covered by a case so the outside air temperature will affect the system. The simulation has been run in this three days and the numbers of experimental result can be found with longer duration but for simplicity the 98 samples of time has been taken which is the equal number of the samples of discrete time system.

The heat transfer coefficient for the condenser is less as it is covered by a plastic case, see appendix A2. Hence the ambient temperature will affect the system. In figure 2.3 the sample is chosen with largest variations of the system during autumn season.

Figure 2.3 Outside air temperatures during autumn season

The detected outside air temperature from the sensor during autumn season is shown in figure 2.3. It can be seen that the minimum temperature is noted as 15.340C and the maximum temperature fluctuation is 27.010C. In autumn operation it gave 1.010C higher peak than winter maximum value and also the minimum value is 2.590C lesser than the winter operation minimum value. Therefore the ambient temperature of autumn is chosen for the system

(20)

Page:- 8 modeling because of the large temperature variance for the real process. The range of the ambient temperature that could affect the system performance is in between 1.060C~1.870C which is found from the autumn operation of the system. It depends on the covers and the tube materials of the heat exchanger. In this system, plastic cover and copper tube are used and the experimental value found for autumn operation time shown in appendix A.4 by considering the PVC plastic and copper tube heat transfer coefficients and their dimensions.

2.4 Refrigerant of the system

The main input to the condenser is the refrigerant flows and the cold water shown in block diagram of the condenser in figure 2.2. The input refrigerant temperature depends on refrigerant flows. The ambient temperature of condenser or outside surface temperature is the output disturbance of the system. The cold water (100C) flows through the condenser to heat it up. The flow rate of the inlet water to the condenser depends on the usage of the warm water by the end user. The more warm water is used by the end user the more cold water needs to be heated up and the flow rate of inlet water to the condenser will be high but the water inside the condenser remain unchanged which is 3.902 kg can be seen in appendix A.3.

Modeling of the control system does not depend on the flow rate of inlet water it depends on the amount of water contained in the condenser. The heat pump technology is very popular to heat water for industrial and domestic purpose. However, the efficiency ratio of heat pump water heaters is methodically related to the refrigerant used in the heat pump system. The refrigerant R134a has been widely applied for industrial and domestic heat pump system. It can be seen from figure 2.4 that it is really not a matter what kind of refrigerant is used, the COP gradually declines with the decrease of the outside temperature/ambient temperature. To find the best refrigerant for the system it is a need to evaluate the performance of R600a, R290 (propane), R134a, and other refrigerants type in an optimized finned-tube air-to- refrigerant evaporator and analyze its effect on the system coefficient of performance [22]

The increase of inlet water temperature of the copper tube condenser and the influence of outside air temperature on the COP is 4.71%~8.33% greater than other refrigerant [23]. The coefficient of performance can be found from the P-h diagram of the refrigerants. The P-h diagram of the refrigerant R134a is shown in appendix A.6 with the description.

Figure 2.4 Comparison of the refrigerant coefficient of performance

The dynamic system’s refrigerant flow varies with time and with the varying evaporating temperature. The refrigerant flow for the system is determined from the data analysis. The refrigerant flow rate to the compressor depends on the evaporating temperature. When the evaporating temperature reaches its minimum value which is -150C for this system, the refrigerant flow reached its minimum value 9.40 kg/h. The Refrigerant flow from the

(21)

Page:- 9 evaporation meet the compressor before it passes through the condenser tube, where it is compressed by the compressor and passed through a pressure switch which allows only high pressure i.e. the flow rate is 27.51 kg/h~34.06 kg/h depending on the various condensation and evaporation temperature.

2.5 Discharge of the heat exchanger

The cold water passes through the condenser to get heated. The heat transfer of the system happens between cold media and the hot media when refrigerant passes through copper tube.

The cold media gains heat and the hot media loses heat i.e. the refrigerant lose energy and it passes from condenser to expansion valve. The refrigerant temperature after losing heat is shown in figure 2.5 and it is a continuous process. The input refrigerant flow has been taken from the data analysis of the plant.

Figure 2.5 Outlet refrigerant temperatures from heat exchanger

The water temperature is the output response of the simulation design model with ambient temperature using the condensing temperature range 350C ~550C and the evaporating temperature range -150C ~ +100C. The water temperature is increasing from its initial values to the maximum values. The condenser output water temperature is varying with change in some parameter of the system such as input refrigerant and cold water temperature and the outside air temperature or ambient temperature. The output water temperature from the condenser is given in figure 2.6. From the above description of the system it is clear that the system need accurate modeling and design of controller to improve the performance.

Figure 2.6 Outlet water temperatures from the heat exchanger without controller

(22)

Page:- 10 The condenser outlet water temperature without any controller shown in figure 2.6 gives the response specifications shown in table 2.1. At time 8 minutes there is no change in the response of the system due to the startup process. As the system runs it takes some time for the refrigerant to reach the condenser and as the compressed refrigerant flows through the condenser the water starts gaining heat and there is a change in the output response.

Table 2.1 Transient response specifications without controller Response

specifications

Overshoot Rise Time Settling time Undershoot Peak time

values 6.22 16 26 7.78 55

The transient response specifications of the system are found from the Matlab for figure 2.6 when the system runs without a controller. It shows there is a high rise in overshoot, rise time and settling time from the required range of temperature (600C). Therefore a controller is needed to control the given range of temperature by minimizing the values in overshoot, rise time and settling time and for the steady behavior of the system.

(23)

Page:- 11

Chapter 3

Modeling of the system

The aim of this chapter is to describe the system identification procedure, modeling and validations of the system. This chapter also describes and analyzes the dynamic system behaviors.

3.1 System Identification Introduction

System identification is the procedure to find the model from data sets. In a dynamic system it is very important to know the identity of the system. It is the science of building mathematical models of dynamic systems from observed input-output data. The fundamental element in science is to construct the models from observed data set for the system. System identification is a very large topic especially for dynamic system with different techniques that depend on the character of the models to be estimated. It is an iterative process and sometimes need to go back to the previous steps and repeat it.

3.2 Model structure for identification method

The system input and output at sample k is given by u(k) and y(k) respectively. The dynamics of the discrete time process is described by the following transfer function:

( )

( )

It is equivalent to the linear discrete time differential equation [56] is following

( ) ( ) ( ) ( ) ( ) (3.1) The system’s input and output are chosen in discrete time, so that the observed data are always collected in samples. In equation (3.1), the sampling interval is one time unit which is not necessary but it makes the notation easier. The equation (3.1) can be written as a way of determining the next output value given previous observations.

( ) ( ) ( ) ( ) ( ) The vector notation form is following

( ) ( ) ( ) ( ) ( ) Using the above vector notation the equation (3.1) can be rewritten as

( ) ( ) (3.2)

3.3 Model quality and experimental design

By taking n=0 in equation (3.1), the observe data for the process can be written as

( ) ( ) ( ) ( ) (3.3) where e(k) is the white noise sequences with variances . So the equation (3.2) can be written as

( ) ( ) ( ) (3.4) The input sequences u(k) = 1,2,3,…..m. by replacing y(k) in equation (3.3) the obtained expressions are

(24)

Page:- 12 ̂ (𝑁) [∑ ( ) ( ) ∑ ( ) ( )

]

(𝑁) ∑ ( ) ( )

̅ ̂ (𝑁) ∑ ( ) ( )

The mathematical expectation of the system is following

̂ (𝑁) ( ) ( ) (𝑁) ( ) ( ) (3.5) The parameter error of the system can be defined as

̂ ̅ (𝑁) ∑ ( ) ( )

( ) ( ) (𝑁) (𝑁)

where e is a sequence of independent variables so that

( ) ( ) ( ) ( ) ( )

Thus the computed covariance matrix of the estimate ̂ is determined by the input properties R(N) and the noise level .

̅

𝑁 (𝑁)

The covariance matrix of the input ̅ of the ith and jth elements is

𝑁∑ ( ) ( )

If R is nonsingular the covariance of the parameter [44] is approximately given by

̅ (3.6) From equation (3.6), it can be seen that the covariance is proportional to the noise variance and inversely proportional to the input power. The covariance does not depend on the input’s or noise signal.

3.4 System identification principle

The system identification core [25] of estimating the model revolves around the following concepts

Model: Model is the relationship between observed parameters. It allows the prediction of properties or behaviors of the object.

True description: It is the description of the model which is the same character of the above topic model but it covers more description and complexity of the system.

Model class: Model class is the set or collection of the models.

Estimation: It is the process of selecting a model. The data used for selecting the model is commonly called Estimation data.

(25)

Page:- 13 Validation: This is the process to ensure the model that the model is not useful for estimation data, also for data sets of interest.

Model fit: This is the measurement of the particular model that should be able to fit to a particular data set. The best fit of the model is identified by getting error signal of the system.

3.5 System identification loop

The order of the steps in the loop does not only define the sequential order in which the tasks are executed, but also how they influence each other. The system identification loop used to implement and identify the dynamics is shown in figure 3.1.

Figure 3.1 The system identification loop

At the first step in the system identification procedure it is very important to state the purpose of the model. Now days there are a huge variety of model applications, for example, the model could be used for signal processing, control design, simulation and error detection.

Identification methods and experimental conditions depend on the purpose of the model so it should therefore be clearly stated. If the model is used for control design, it is important to have an accurate model around the desire choices. The identification experiment design consists of a number of choices like which signal to manipulate or measure and how to manipulate or measure. It also includes some practical aspects. The experimental data can be changed only by a new experimental data [54]. The identification experimental designs are done in mainly two steps. In the first step, preliminary identification experiment to get primary knowledge about important system characteristics.

The step response, impulse responses are performed in this step. The information obtained from the first step is then used to find the suitable experiments for the main experiments.

Some system characteristics of the preliminary experiments include time invariant, linearity, transient response and frequency response analysis. In the main experiments, especially the input signal is discussed. The identification gives the accurate model where the estimation errors are lesser.

(26)

Page:- 14

3.6 System identification method

The above core concept for system identification will be described in details for the system in below. The system identification toolbox with different models of the system are shown in appendix B.1, in the toolbox state t=heating system, u=input refrigerant and y=output temperature. By using the system identification toolbox, the refrigerant flows (u) used as input data sets and water temperature (y) used as output data sets.

Figure 3.2 The data set time plot of the heat pump system

Figure 3.2 shows the input and output data sets used in the system identification are 98 samples of time plot which are found from the simulation of the mathematical equations without effect of outside temperature and using the compressor performance check point data at standard operating or testing conditions, the plotted input and output data are shown in figure 3.2. The system identification procedure is executed using the data examination, model structure selection, model estimation and model validation. These four steps are described in sections 3.7-3.10 in details.

3.7 Data Examination

The input and output data sets sequence without any disturbance effect and standard testing operating condition of the compressor are used to detect the data. The input and output data sequences shown in figures 3.3 & 3.4 are divided into estimation and validation data sets. The estimation and validation data are used to test the model characteristics, as it defines the fitting percentages of the model and the errors associated with the design model. The total 98 samples input and output data sets are used of the time plot to identify the model where the first 50% i.e. from 0 to 49 of the input and output data sets are used for estimation purpose and the rest 49 to 98 samples of the data sets are used for validation purpose.

Figure 3.3 Estimation data Figure 3.4 Validation data The select ranges option in the system identification toolbox processor is used to define the boundaries for estimation and validation data and, then the data set was split into two separate

(27)

Page:- 15 parts. The first part of the separated data is used for estimation or identification and the remaining part of the data is used for validation as shown in above figures. After estimation and validation of the data sets it is required to check outliers, aliasing effects and the trends.

The outliers are the observations that are separated in some manner from the rest of the data.

According to their location the outliers may have moderate to severe effects on the regression model [26].

It seen from the data observations that no outliers are obtained for the system. If there are any aliasing effects in the experimental data sets, it can be improved by increasing the sampling rate. In this case, the sampling time 1 second is used to get the best signals without aliasing.

The mean of the input and output signals are removed from the experimental data sets to detect the linear trends of the input and output data.

3.8 Model structure selection

The model estimation is performed to determine the model structure set. It can be a very simple model set such as the static gain K mapping the input to the output. The simple static gain mapping for discrete time model is ( ) ( ). The model structure can be complex which can affect the accuracy of the model to approximate the real process. In some cases the simple models can be well approximated by using the simple model similar to discrete model as seen above. The most common model structure in discrete time domain form used for system identification process is given by

( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) (3.7) where u and y is the input and output sequences respectively, e(k) is a white noise with zero mean. The polynomials A, B, C, D and F are defined as

( ) ( )

( ) 𝑐 𝑐 (3.8) ( )

( )

The system model can be divided into AR, ARX, ARMAX, BJ, and OE [25]. The form of model structure with one or more polynomials are identified as following

AR model

( ) ( ) ( ) (3.9) ARX model

( ) ( ) ( ) ( ) ( )) (3.10) ARMAX model

( ) ( ) ( ) ( ) ( ) ( ) (3.11) Box-Jenkins (BJ) model

( ) ( ) ( ) ( ) ( ) ( ) ( ) (3.12) Output-error (OE) model

( ) ( ) ( ) ( ) ( ) (3.13)

(28)

Page:- 16 The models shown in equations (3.9-3.13) are implemented from the system identification toolbox shown in appendix B.1 and some test on analysis is done to select the best model structure for the system. The choice of model structure depends on the estimation of the input and output data sequences. It is not always necessary that a model structure with more parameters and more polynomials is better. The best model is a matter of choosing a suitable structure in combination with the number of parameters using the poles as less as possible for lower orders. The estimated step response plot of the ARX, ARMAX, BJ and OE models are shown in figure 3.5 as a reference model to check the response of the model.

Figure 3.5 Step response plot for different model structure

The step response analysis gives information on stationary gain, dominating time constant and time delay. An indication of the disturbances acting on the system is also obtained from the step response. The step response signals from input to output for ARX, ARMAX and OE models are responding with time but BJ model is not responding with time. The frequency responses of the ARX, ARMAX, BJ and OE models used as reference models are given below in figure 3.6.

Figure 3.6 Frequency responses for different model structure

In figure 3.6, the ARX, ARMAX and OE structured model gives the frequency response curve of the dynamic system. The frequency response for the system is used for the quantitative measure of the out spectrum of the system and it is used to characterize the dynamics of the system. The ARX model shows large phase offset because of the polynomial difference and e(k) of the system..

The BJ model structure is not responding for the heat pump system. A sufficient condition for the predictor to be stable is that the C(q)and F(q) are stable for all (Lemma 4.1). The ARX, ARMAX and OE model with different polynomial orders are following these conditions of stability whereas the BJ model for any polynomial orders does not follow that

(29)

Page:- 17 condition. It is well known from the system identification textbook [24] that in the prediction error structure the predictors needs to be stable. When the ARX and ARMAX model structures are used this isn’t a problem because the dynamic model and the noise model share denominator polynomials and when the predictors are formed it cancel the polynomials. But for BJ model it’s not the case and if the underlying system is unstable, the predictors will basically be unstable and this makes the model structure inapplicable for the system. When parameter estimation algorithm is implemented for the Box-Jenkins case, typically we should secure stability in every iteration of the algorithm projecting the parameter vector into the region of stability. For the system, this process of course leads to erroneous results [27].

The above analysis of the step and frequency response it can be seen that if the ARX and ARMAX models compute in different orders or ways it can give the accurate models and it contain fundamental characteristics of the true process.

3.9 Model Estimation

Model estimation is a procedure for fitting a model with a specified model structure given in equations (3.9-3.13). Modeling errors are not to be considered systematic errors in the observations [28]. The models have different structure such as ARX, ARMAX, BJ models.

3.9.1 Estimation of the ARX model structure

The computed ARX models are to find suitable orders and delays the following equation (3.14) & used to estimate for different polynomials orders.

( ) ( ) ( ) ( ) ( )(3.14) where na nb and nk are in the range from 1 to 10. For each estimated model, the prediction errors and sum of squares are computed. In figure 3.7, the best fit two ARX model are presented by considering the prediction error and percentages of fitting the model with the estimated data. In this figure, y axis represents the approximate water temperature of the system of the estimation data. The measured and simulated output validation data from the system id toolbox are presented in figure 3.7 using the ARX model structure.

Figure 3.7 The ARX models estimated output

The following table 3.1 shows the computed final prediction & mean square error for different polynomial orders of the ARX model structure

Table 3.1 ARX model structure specifications

Model FPE MSE Fit (%)

arx791 0.0002 0.0001 99.96

arx611 0.54 0.45 96.64

arx221 0.17 0.16 97.61

(30)

Page:- 18 From the ARX models shown in appendix B.1, the following models arx791, arx611 and arx221 model structure shows the less prediction and mean square errors compare to further polynomial ARX model structure. So the ARX models shown in table 3.1 have been considered for validation test.

3.9.2 Estimation of the ARMAX model structure

The computed ARMAX models are to find suitable orders and delays the following equation (3.15) & used to estimate for different polynomials orders.

( ) ( ) ( ) ( ) ( ) 𝑐 ( ) 𝑐 ( ) (3.15)

with 𝑐( ) 𝑐 𝑐 (3.16) For each estimated ARMAX model, the prediction errors and sum of squares are computed.

In the figure 3.8, the best fit two ARMAX model are presented by considering the prediction error and percentages of fitting the model with the estimated data. The measured and simulated model output plots from the system id toolbox are presented in figure 3.8 using the ARMAX model structure.

Figure 3.8 The ARMAX models estimated output

The computed prediction and mean square errors for different polynomial orders of the ARMAX models are given in table 3.2

Table 3.2 ARMAX model structure specifications

Model FPE MSE Fit (%)

amx4422 0.04 0.08 98.63

amx6422 0.03 1.84 91.88

amx2422 0.04 0.10 98.39

From the ARMAX models shown in appendix B.1, the following models amx4422, amx6422 and amx2422 models shows the less prediction and mean square errors compare to other ARMAX models. Therefore the ARMAX models shown in table 3.2 are selected for final validation.

3.10 Model Validation

The obtained model can validate in a variety of ways. In a typical identification all of these are used to confirm an accurate model structure.

(31)

Page:- 19

3.10.1 Residuals analysis

The residual analysis for different models of a system is very important to get the best model.

It is the analysis of a signal that describes the quantity of signal contain at the end of the process [29]. The parametric model describes in section 3.8 is in the form

( ) ( ) ( ) ( ) ( ) (3.17) where ( ) and ( ) are the rational transfer function. The residuals are computed from the input output data as

( ) ( ) ( ) ( ) ( ) (3.18) The residuals are computed based on the data used for the identification and the identified model and, then ideally the residuals should be white and independent of the input signals.

The residuals analysis can be done in several ways such as the autocorrelation of the input output signals for the residuals, the cross-correlation between the residuals and the input and distribution of residual zero crossings. The covariance function is estimated as

̂ ( ) ∑ ( ) ( ) (3.19) where ̂ ( ) represent the cross covariance or cross-correlation of the input and output signals [54]. Similarly, the auto-covariance or autocorrelation function ̂ ( ) and ̂ ( ) are respectively. The impulse response estimate can be derived using the relationship

̂ ( ) ∑ ( ) ̂ ( ) (3.20) The simplified form of the equation (3.20) is given below when u is the white noise sequence.

̂( ) ̂ ( ) (3.21) Correlation function is rather elusive when it’s being measured. Extreme care must be taken to ensure that the measurement method itself does not introduce large errors. The problem associated with the accuracy has been examined carefully and also another problem that has not received the same degree of attention [29].

Figure 3.9 Residual analysis of the ARX model structure

arx791 arx221 arx611

(32)

Page:- 20 The residual analysis are best fit two ARX models shown in figure 3.9 with autocorrelation of residuals for the output of the validation data and the cross correlation for input and the output residuals of the validation data [30]. In the figure 3.10 the residual analysis of different order ARMX models residuals are following

Figure 3.10 Residual analysis of ARMAX model structure

It is seen from analysis of figure 3.9 and 3.10 the models pass whiteness and independence and it shows significant correlation between past inputs and the residuals. The stability is the key concept in control system design. It is very important for the dynamic system to be stable.

The system can be input output stable if and only if its poles are inside the unit circle [31].

3.10.2 Pole-Zero analysis

The poles and zeros are the properties of a system. A system is characterized by its poles and zeros. The poles and zeros plot is represented graphically by plotting their locations on the complex z-plane. The plots variable z represents the axes which have imaginary and real values. The location of the poles are usually marked by a cross (×) and zeros location are marked by a circle (◦). The poles and zeros location provide qualitative insights of the response characteristics of the system. The poles and zeros location for the ARX model is shown in figure 3.11.

Figure 3.11 Pole-Zeros for the arx791 model structure

amx2422 amx4422 amx6422

(33)

Page:- 21 From figure 3.11 it is clear that the arx791 model has 9 poles and 8 zeros. The poles and zeros location are shown in table 3.3. However the order of the model is the number of poles [32].

The arx791 model structure characterizes 9th order of the system.

Table 3.3 The Pole-Zero locations of the arx791 model structure No.of pole-zero Poles location Zeros location

1 0 -1.86

2 0 1.14 + 1.17i

3 0.45 + 1.78i 1.14 - 1.17i

4 0.45 - 1.78i 0.9

5 0.89 0.26 + 1.01i

6 0.04 + 0.37i 0.26 - 1.01i

7 0.04 - 0.37i -0.37 + 0.37i

8 0.45 + 0.07i -0.37 - 0.37i

9 0.45 - 0.07i

The poles and zeros for amx2422 model structure are given in table 3.4. In figure 3.12, shows the amx2422 has 4 poles and 3 zeros.

Figure 3.12 Pole-Zero for the amx2422 model structure

The location of the poles and zeros are presented in table 3.4. The order of the amx2422 model is 4 which is less compared to the arx791 model as the amx2422 model structure has less number of poles and zeros

Table 3.4 The Pole-Zero locations of the amx2422 model structure No of poles/zeros Poles location Zeros location

1 0 0.17 + 1.36i

2 0 0.17 - 1.36i

3 0.55 + 0.20i -0.37

4 0.55 - 0.20i

References

Related documents

46 Konkreta exempel skulle kunna vara främjandeinsatser för affärsänglar/affärsängelnätverk, skapa arenor där aktörer från utbuds- och efterfrågesidan kan mötas eller

Byggstarten i maj 2020 av Lalandia och 440 nya fritidshus i Søndervig är således resultatet av 14 års ansträngningar från en lång rad lokala och nationella aktörer och ett

Omvendt er projektet ikke blevet forsinket af klager mv., som det potentielt kunne have været, fordi det danske plan- og reguleringssystem er indrettet til at afværge

I Team Finlands nätverksliknande struktur betonas strävan till samarbete mellan den nationella och lokala nivån och sektorexpertis för att locka investeringar till Finland.. För

För att uppskatta den totala effekten av reformerna måste dock hänsyn tas till såväl samt- liga priseffekter som sammansättningseffekter, till följd av ökad försäljningsandel

The increasing availability of data and attention to services has increased the understanding of the contribution of services to innovation and productivity in

Närmare 90 procent av de statliga medlen (intäkter och utgifter) för näringslivets klimatomställning går till generella styrmedel, det vill säga styrmedel som påverkar

Den förbättrade tillgängligheten berör framför allt boende i områden med en mycket hög eller hög tillgänglighet till tätorter, men även antalet personer med längre än