## 1 Introduction
It is also claimed that rule based optimisations for energy systems are preferable to algorithm-based optimisations, because they are computationally more efficient and easier to implement in real-world applications in [17]. The types and capacity of DG and storage devices are optimised in [18] using a number of hybridised techniques. By introducing sensitive and non-sensitive load concepts (sensitive loads are those loads in which delivery of power to them should be guaranteed under any conditions. ), [PERSON], [PERSON] et al. also develop an operational energy management strategy in micro-grids in [18]. However, in both approaches described in [17; 18], the household's comfort may be compromised; due to requirements of DR in [17] and considering the non-sensitive load in [18]. In [19], a smart Energy Hub is modelled and multi-energy networks based on an integrated demand side management technique are proposed. Similar to [20; 21], the simulation time period for this work is one hour, which does not sufficiently consider dynamic changes of the EH modelled at domestic level. For integrated energy systems, a combined heat and power (CHP) unit can be used to couple the heat and electricity carriers. Residential buildings can benefit from micro-CHP to simultaneously generate heat and power, and thus provide energy services at increased overall efficiency. Based on [22], the overall capacity for micro-CHP is normally below 15 kW. In some work, for example [4; 19], the heat efficiency and electricity efficiency of CHP are assumed to be constant. However, since the output of most micro-CHP may be varied, the efficiency also varies with any dynamic operation. Additionally, a CHP system requires some ramp up time to reach a steady state after it switched on or to match actual output after a set point is changed [23]. Finally, micro-CHP presents the problem of whether to best schedule the output to meet electricity demand, heat demand or a compromise between the two, a problem addressed in this paper with the control rules and the energy storage. In most work on building level Energy Hub optimisation, instead of attempting to predict load, it is assumed systems have perfect forecasts and so know energy demand in advance [2,4]. However, load prediction at building and micro-grid level can require long computation times and often performs poorly (an average error of 4.8% is given in [24] based on a number studies including [25, 26, 27]). Alternatively, in [28], a stochastic optimal strategy is proposed to solve the uncertainty of demands. This method can offer more accurate simulation results, however it increases the complexity of computation. It is therefore important to include improved load prediction in future work and always take into account its performance and computation time in the context of overall optimisation. In this paper, a rule based system optimisation model will be proposed. Moreover, considering the difficulties to precisely predict heat and electricity load at building level, this paper proposes a 'CHP switch' (CHPS) algorithm to control energy generation. This algorithm simultaneously considers the heat load and electricity load, which reduces the errors caused by energy prediction. The system time step is set as one minute, and thus will better track the true dynamic changes of the hybrid energy system. The optimisation model presented here further reduces energy cost, by 22.9% compared with 20% in [10]. The major contributions of this paper are: (1) developing the rule based control method; (2) constructing a 'CHP switch' algorithm; (3) introducing dual battery operation in this context and (4) demonstrating the efficacy of the overall control strategy against a theoretical minimum. The overall optimisation algorithm for the Energy Hub at building level proposed in this paper is summarised in Figure 1.  
The rest of this paper is organised as follows. In Section 2, the EH model, CHPS algorithm and modified CHPS algorithm are introduced.