To this scope, the tank is discretized into six layers, which is powered by the heat pump. Hence, according to a standard discretization procedure with sampling time of $Ts$, 10 min in this paper, the discrete-time realization of the continuous-time model (1) and (4) takes the following form:

$x\u0307(k)=f(x(k),u(k))y(k)=C\u2009x(k)$

$xk=[Twk,\u2009Tzonek,Tpavk,Tpik,T1k,T2k,T3k,T4k,T5k,T6k,EBatt(k)]T$

$uk=[Tinlet(k)PHP(k)PBattk\u2202Batt(k)\u2202grid(k)]T$

$C=[TzonekT1kSOCBatt(k)]$