Model-Free Non-Invasive Health Assessment for Battery Energy Storage Assets

With the increasing application of battery energy storage in buildings, networks and transportation, an emerging challenge to overall system resilience is in understanding the constituent asset health. Current battery energy storage considerations focus on adhering to the technical specification of the service in the short term, rather than the long-term consequences to battery health. However, accurately determining battery health generally requires invasive measurements or computationally expensive physics-based models which do not scale up to a fleet of assets cost-effectively. This paper alternatively proposes capturing cumulative maloperation through a physics model-free proxy for cell health, articulated via the strong influence misuse has on the internal chemical state. A Hidden Markov Chain approach is used to automatically recognize violations of chemistry specific usage preferences from sequences of observed charging actions. The resulting methodology is demonstrated on distribution network level electrical demand and generation data, accurately predicting maloperation under a number of battery technology scenarios.


I. INTRODUCTION
Electrical Energy Storage (EES) is becoming an increasingly important component in power distribution networks, with its ability to accommodate uncertain demand and intermittent renewable generation reducing the need for excessive standby generation [1], [2], accommodating peak demands, grid frequency regulation [2] and other services. Battery energy storage (BES), among the lowest cost and most compact form of storage, has great potential as the key provider of these services but has limitations that need to be considered for long-term practical operation. As an electrochemical device that behaves according to its underlying chemistry, BES can perform sub-optimally when exposed to conditions such as fast charge and discharge rates, overcharge, over-discharge, shallow or deep charging cycles and high or low temperature. Prolonged maloperation can compromise useful life and in some cases result in catastrophic failure. The understanding of the difference between BES chemistries and their behaviour under different operating conditions becomes vital when matching them to an energy storage operation strategy in the power system, otherwise high costs of premature The associate editor coordinating the review of this manuscript and approving it for publication was Reinaldo Tonkoski . replacement and resulting risk to system resilience can be incurred.
Planning charge/discharge schedule of BES around its chemical limitations to preserve its operational integrity, presents an additional layer of complexity over the EES scheduling problem: not only do demand and generation need to be anticipated and charge/discharge actions dispatched, but these also must be done within the chemical constraints of the battery.
BES are capable of providing multiple network services such as energy bulk services (arbitrage [3], support of renewable integration [2], [4], [5]), ancillary services (regulation black start, load following and ramping, frequency response [6], [7]), transmission and distribution infrastructure services [7], [8], customer energy management services (power quality and reliability [9], [10]), but these rely heavily on optimal scheduling to leverage their flexibility. The need to work within cell chemical limits may hamper the provision of these services and requires a model of battery behaviour, or rather preferred battery behaviour, which articulates the bounds of operation for this device according to its chemistry.
Battery models developed to-date can be divided into four groups: namely physics models [11]- [13], equivalent circuits models [14]- [18], analytical models [19]- [21] and data-driven models [23]- [32]. In the physics category, VOLUME 9, 2021 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ the electrochemical battery model [11]- [13], being the first principle in nature, is one of the most accurate models but also the least suitable to EES applications due to its complexity, computational effort and need for detailed parameter values. These models will capture battery nonlinear behaviour but will not directly address the estimation of the state of charge (SoC) or state of health (SoH) [12], [32]. The second group of the battery models, electrical-circuit models [14]- [16], describe battery behaviour with simple electrical circuits where different electrical components like resistors, capacitors and voltage source mimic the battery cell characteristics. Most of these models capture I-V characteristics; some can predict the runtime and can track the SoC [18]. The simplified electric-circuit models [15]- [17] are computationally fast and can be easily incorporated into more complex systems and simulations tools [33] Unfortunately, they do not integrate non-linear capacity behaviour which leads to inaccurate predictions of the remaining battery capacity and operating time [15] -which is crucial for battery management systems. Imprecise prediction of remaining battery capacity can lead to battery over-discharging and over-charging limiting its lifespan. Zhang et al. [34] developed an enhanced electric circuit model by combining the electric circuit model developed in [15] with Rakhmatov's diffusion analytical model developed in [19]. The resulting model is capable of capturing the battery recovery effect but its applicability for performance prediction for battery management systems is limited due to the complexity of the analytical part of the model [35]. The next group of models are analytical models such as the Rachmatov and Vrudhula diffusion model [19], [20] and the Kinetic battery model [21], while easily implemented, these lack a means of accurately capturing the potential degradation that is important to storage asset health. The last group are data-driven models widely used for battery SoH estimation and prediction due to their flexibility and being model-free [32]. Among these models, numerous approaches to predict battery SoH and remaining operating time were used such as Bayesian network [22], neural network [24], support vector machine [25], artificial neural network [26], fuzzy logic [27] and Gaussian Process Regression [28]. The advantage of data-driven models is that they require little or no knowledge of the complex electrochemical mechanisms taking place in the battery cell [36] and they have good performance to nonlinear problems [37]. The drawback of those methods is that they require a significant amount of experimental data from extensive and often complex laboratory tests, which is time-consuming to obtain [36], [38]. The testing of long term ageing effects in real operating conditions may span 6-11 years depending on battery technology. It can be accelerated to 1-2 years under laboratory conditions [39], however with the current development of the high-performance batteries [40]- [42] characterised by an extended lifetime, obtaining a sufficient amount of ageing data becomes a more resource-intensive task. Another drawback of these models is that their performance heavily depends on the quality and quantity of data available for modelling and applying the modeling technique [37]. Moreover, it is difficult to reproduce realistic operating regimes in the laboratory settings, thus the resulting model can be more error prone in online prediction [36]. Another group of data-driven models are stochastic models of battery discharging and charging processes based on Markov Chains that were developed to model primary (non-rechargeable) [29], [30] and secondary (rechargeable) batteries [23], [31]. These models assumed a fully observable state space where the SoC was represented as a Markov Chain whose state transitions captured the charging and discharging process. While these models attempt to estimate SoC, most of them do not quantify how it was achieved, obscuring a high charge rate or a micro-cycle. The model introduced in this paper is based on the Hidden Markov Model (HMM) which stochastically models the battery limitations imposed by its chemistry as a combination of present and previous sequential charging actions, and articulates the preferred operating regime as a measure of health consequence. In contrast to models based on the Markov Chain introduced in earlier works, it addresses the issue of the partially observable state space which is a more realistic assumption due to the inability to observe the internal state and chemical processes taking place inside the cell. With scalability in mind, the approach applied in this work requires no telemetry other than would be required to meter the use of the battery, unlike other data-driven methods, the model developed does not require extensive or invasive laboratory battery performance data; training data is instead generated based on simplified knowledge of preferences to operating regime dictated by battery chemistry. Additionally, only a single input is used to predict the maloperation level that approximates SoH of BES compared to multiple inputs required in other data-driven models; for example, three inputs (temperature, discharge current and end-of-discharge voltage) required in the model based on a Bayesian network proposed in [22] and three (charging time, the instantaneous voltage drop at the start of discharge, the open-circuit voltage of a fully discharged battery) in the model based on the probabilistic neural network applied in [26]. The resulting model developed here makes predictions simply based only on the operating regime imposed on the device (e.g. actions set by a BES controller) thus minimising requirements for extensive monitoring of battery parameters across an asset fleet.
The paper is structured as follows: the physics of battery health is discussed in Section II, providing a selection of contemporary battery storage types along with an explanation of how their chemistry dictates restrictions to operation. This section concludes with an articulation of the rules that constitute the general guidelines for managing battery health within charging regimes. In order to accommodate this relation in the inherently stochastic operational environment, the use of Input-Output Hidden Markov Models (IOHMM) is introduced along with its saliency to the application in Section III. Section IV provides operational case studies on a low voltage (LV) community energy system comprising photovoltaic (PV) generation in order to show the impact of various charge profiles on battery health. Section IV also demonstrates the agreement of the proposed model with capacity degradation observed in lab-based battery tests.

II. BATTERY CHEMISTRY CHARGE CONSTRAINTS
All batteries experience a decline in capacity which can be accelerated if the battery is subject to stress factors such as temperature, a high or low state of charge, high depth of discharge, cycling under a partial state of charge and long intervals between recharging to fully charged state [43], [44].
This section describes the underlying chemical processes dictating the operational constraints for different rechargeable battery chemistries currently used as BES in the energy sector and is concluded with a definition of the charging rules for different battery types.

A. LEAD-ACID BATTERY
Possibly the most established type of battery, the lead-acid battery takes a number of forms but two dominant technologies, valve-regulated lead-acid battery (VRLA -sealed lead acid) and flooded lead-acid are considered here. Both types are chemically alike but have fundamental differences in construction impacting on their behaviour during cycling and therefore possible applications.
Lead-acid batteries are sensitive not only to overcharging and overdischarging but also to chronic undercharging: if not fully charged, a harmful build-up of sulphate crystals on the electrodes in a process called sulphation [45], [46] raises the battery internal resistance. When sulphation is prolonged, crystals reach a size that cannot be easily broken down by the charging process, meaning irreversible damage [45] Hence the lead-acid battery should be stored in a fully charged state to prevent performance deterioration.
Overdischarging of the lead-acid battery or storing it in a discharged state too long leads to the occurrence of the hydration process where lead hydrates are deposited on the separators leading to permanent damage from short circuits between negative and positive plates during recharging [46].

B. NICKIEL-CADMIUM BATTERY
The stability of the active materials gives nickel-cadmium (NiCd) batteries the potential of maintaining stable capacity and internal resistance over 1000 cycles until rising selfdischarge compromises performance [47]. A NiCd battery experiences a memory effect when repeatedly shallow cycled which limits the possible applications to those that allow deep cycling operation or those that permit conditioning [47].
Loss of capacity due to repeated charging battery before it is completely discharged can be reversed by conditioning charging, performing a couple of charge cycles after the full discharge of the battery [47]. NiCd has a high self-discharge rate of 10-15% per month [48].
The NiCd can be charged with the rate of 1C and achieve a high percentage of nominal capacity in just 55 minutes; increasing the charging rate to 2C, a low charging current rate needs to be applied at the end of charging until full charge state to prevent damage of the battery due to overcharging [49].

C. NICKEL-METAL HYBRID BATTERY
Nickel-metal hybrid (NiMH) batteries were designed to eliminate the memory effect shortcomings of the NiCd battery by using hydrogen-absorbing metal for the negative electrode. The NiMH battery is characterized by high self-discharge, around 20% in the first 24 hours and 10% monthly afterwards, and low cycling life, strongly influenced by deep discharges, overcharges and elevated temperatures [50].
Due to intensive heat generation during fast charging and high-load discharging, the application of this battery technology should be limited to those with slower rates of charging and the elimination of possible high-load discharge events. The charging rate of the NiMH battery above 0.5 C can be dangerous due to the fast raising of internal battery temperature [49]. Additionally, charging at higher rates, 1 C, is inefficient and causes a reduction of battery standard capacity to less than 65% from before charging event [49].

D. LITHIUM-ION BATTERY
The lithium-ion battery has a self-discharge rate much lower than NiCd, typically up to 5% per month [51]. It does not suffer the memory effect compared to NiCd technologies, does not require periodic cycling like lead-acid or nickel-cadmium to prolong the life and also tolerates microcycles (minimal charging can actually prolong life) [52].
Lithium-ion batteries cannot tolerate overcharge and overdischarge. During the overcharging of the cell excess energy is produced due to exothermic decomposition of the cathode material leading to oxygen production [53] and fast cell temperature rise which in turn leads to thermal runaway of the cell and potential fire and explosion risk [54].
Overdischarging or low voltages, below low threshold voltage limit of the lithium-ion cell, 2.7V, influence the battery performance due to the collapse of the lead lattice [54].
During over-discharge or extremely low voltages, the electrolyte reduction and the production of the combustible gas occurs introducing potential safety risks [54]. Recharging over-discharged cell can lead to a short circuit within the cell due to copper dendrites, which form on the negative electrode [54] and irreversible damage to the cell. The battery technology can be charged with relatively fast rates, 1C or 2C, only if the upper charge voltage limit is not reached [52].

E. VANADIUM REDOX FLOW BATTERY
The Vanadium Redox Flow Battery (VRFB) can reach 12000-13000 cycles [55] and is not directly influenced by the depth of discharge as long as the battery is operated within its voltage limits [55], [56]. The long cycle life is the result of a lack of change in the electrode material during cycling operation that would limit the cyclic lifetime of conventional VOLUME 9, 2021 batteries due to electrode material degradation over time [57], [58].
The VRFB does not experience life degradation due to repeated deep discharges, can be stored completely discharged for long periods without a negative effect on its performance, can be over-discharged within the limits of the capacity of the electrolytes, but overcharging must be prevented [58]. In the overcharged state, oxygen and hydrogen evolution occur at the positive and negative electrodes respectively leading to interruption in electrolyte flow that reduces the operational state of charge and decline of the battery efficiency [59].
The VRFB can be charged and discharged at any rate [60], however, the cycle efficiency decreases when the charging rate is too high due to oxygen and hydrogen evolution that can occur during rapid recharge [61]. It is also claimed that VRFB can withstand fluctuating power demand without any signs of performance deterioration [58]. Similar to the lithium-ion battery, the performance of VRFB is not affected by micro cycling [58].

F. ZINC-BROMINE FLOW BATTERY
Zinc-Bromine battery (ZnBr FB) has a cycle life in the range of 2000 cycles and is not affected by the depth of discharge which actually promotes battery health by removing zinc deposits on the negative electrode as well as zinc dendrites [62], [63]. If the operating regime of the battery does not allow full discharge every cycle, the full discharge should be performed every couple of days to maintain battery life [63]. Overcharging, in the extreme case, leads to electrolysis of the electrolyte and the production of water leading to irreversible damage of battery cell. A major drawback of the ZnBr FB is its high self-discharge rate which is attributed to diffusion of Br 2 from the bromine side electrode, across the membrane, to zinc electroplated electrode and subsequent oxidization of the plated zinc that causes the decline of the battery charge when stored unused in the fully charged state [64]. The charging and discharging rate have an important impact on the performance of ZnBr FB. An increase in the rate of charge/discharge decreases the cycle efficiency of this technology [58].

G. SODIUM SULPHUR HIGH-TEMPERATURE BATTERY
Sodium Sulphur batteries (NaS) have a very low self-discharge rate due to the good conductivity of beta-alumina solid electrolyte for sodium ions and its insulating properties for electrons -characteristics that do not allow cross mixing of active materials with electrodes [65].
The beta-alumina ceramic electrolyte used, in its solid state, separates the active material of molten electrodes and allows sodium ions to flow from the negative to the positive electrode during charging processes and in the opposite direction during discharging of the cell [66]. NaS has a high cycling efficiency of 80-90% [65] with only a small portion of the energy used to maintain battery operational temperatures [66]: NaS operates in temperatures in the range of 300-350 • C to maintain the molten state of the positive and negative electrode, made of Sulphur and Sodium respectively [67], [68].
This battery type has long cycle life in a range of 3500 to 5000 cycles at 80% depth of discharge [65] due to the absence of morphological changes of electrodes due to their molten state [69], which is a limiting factor for batteries with solid electrodes. One of the important advantages of the NaS battery is its flexible operation over a wide range of different charging/discharging rates and depth of discharge. However, during overcharging, the solid electrolyte can be damaged due to ceramic breakdown and the cell voltage can be reduced due to insulating properties of molten Sulphur, the final product of charging [66]; overdischarging of NaS battery leads to irreversible chemical changes in Sulphur electrode, where high resistance solid Na 2 S 2 is formed, leading to poor recharging performance and even structural damage [66]. Table 1 summarizes the operating preferences for the battery chemistries documented in this section. The term charge sensitivity, used in the table, means the preference of the battery cell to: not being overcharged (charged above the maximum energy that battery can safely accept), over-discharged or undercharged (more specifically, partially charged). The cycle preference describes how deep the battery prefers to be discharged. Here 'deep' means continuous discharge until it is fully discharged, identified when the battery cell reaches its cut-off voltage. This is an important preference for the NiCd and ZnBr batteries as it can prevent the memory effect occurring [47] in NiCd battery and avert zinc dendrite formation potentially resulting in separator puncture for ZnBr batteries [62], [63]. A shallow cycle means discharging the battery to some point, for example, 50% of the SoC. This is particularly important for the lead-acid battery which prefers to be shallow cycled; deep cycling can accelerate softening of the active material leading to capacity loss [70]. In contrast, the ZnBr battery prefers to be deep cycled as it helps remove zinc dendrite formations from the battery cell [63]. Micro-cycling here is defined as constant charging and discharging without a prior complete cycle of the device. The charge condition describes the battery preference to reach a particular state of charge to ensure device healthy operation (full -SoC at practical maximum, empty -SoC at practical minimum). For example, a lead-acid battery prefers to be fully charged before discharging in order to prevent sulphation processes occurring, thus positively influencing battery health [45]. On the contrary, ZnBr battery prefers to be fully discharged before charging again to break down the zinc dendrites created during battery cycling [63]. The last term, idle SoC, is the one in which a battery prefers to be kept in when at rest. As an example, lead-acid batteries have a preference for being stored fully charged as it can prevent battery performance deterioration due to the sulphation process occurring as a consequence of self-discharge [44]. For ZnBr batteries,  the preferred idle SoC is the fully discharged state, as it can prevent oxidization of the plated zinc leading to loss of charge [63].

H. ARTICULATION OF RULES REQUIRED FOR MODEL TRAINING
Long-term cell performance for the same battery chemistries is shown in Fig. 1 [48], [71]- [73]. Based on the operating preferences of the batteries, Table 1, the set of rules dictating the favoured operation from the battery health point of view are defined. These rules are then learned by the developed BES models. The rules are dictated by battery chemistry and therefore are different for each battery type, with some similarities between some types of batteries; for example, a rule to discharge device fully before recharging again applies to both ZnBr FB and NiCd batteries. Although this rule is the same for both batteries, it is dictated by completely different chemical reactions taking place inside cells when running contrary to preference (specifically the memory effect for NiCd battery and dendrite formation in ZnBr FB).
To train the prediction models, the set of preferences for each battery chemistry are summarised in Table 1. These are used to create rules which will label exemplar charge schedule actions according to the resulting impact on the battery health. Taking the lead-acid battery as an example, the resulting preference rule consequents would be: 'do not overcharge', 'do not overdischarge' and 'do not undercharge' for generation surpluses, sustained generation deficits and prolonged high demand rule antecedents respectively.

III. INPUT-OUTPUT HIDDEN MARKOV MODEL OF BATTERY PERFORMANCE
Operationally, the modelling challenge being faced is recognising maloperation from observed sequences of charge/discharge actions -this is inherently stochastic as well as dependent on ordering and recency of previous actions. While degradation from maloperation will be modelled, it is assumed that the BES operating environment is not hostile and that the sole threat to asset life is through misuse.
An IOHMM is proposed as a means of capturing the stochastic nature of the charge process impact on non-observable battery chemical states but also by introducing time dependency of these state transitions and relation to preferred actions. IOHMM assumes that the next state depends only on the current state (Markov assumption), the probability of output observation depends only on the state that produces this observation (observation independence assumption) [74], and the probability of state transition depends on the time when the transition took place [75]. IOHMM have previously been used in a variety of applications ranging from sequence processing in grammatical inference problems [76], synthesis of facial animation from audio [77], hand gesture recognition [78], modelling of financial returns series [79], modelling of forecasting of electricity prices [80] and fault diagnosis and prognosis of diesel generators [81]. This method accommodates incomplete data (unobserved internal state of the battery), captures long-term dependencies in data and captures the stochastic character of the overall modelled energy system.

A. INPUT-OUTPUT HIDDEN MARKOV MODEL
The IOHMM is used for supervised learning of time series data and defines the conditional distribution P(y 1 , . . . , y T |u 1 , . . . , u T ) of an output sequence y T = y 1 , y 2 , . . . , y T given an input sequence u T = u 1 , u 2 , . . . , u T .
The IOHMM is a doubly stochastic process in which the underlying dynamic process cannot be observed directly instead being observed through another stochastic process as a function of the first one. The latent and output variables of the IOHMM are influenced by the input variable, often called the control signal, resulting in non-homogeneous (time dependent) Markov chain [75]. In consequence, the dynamics of the system defined by the transitions probability in IOHMM changes with time according to the input signal.
The IOHMM can be defined as a tuple:  where: Z = {z 1 , z 2 ,. . . ,z n } is a set of N states, = {x 1 , x 2 ,. . . , x M } is the observation sequence, U = {u 1 , u 2 ,. . . , u K } is the input signal sequence, A = {a ijk } is the transition probability matrix, where a ijk is probability of transition from state i to j at time t, given input signal signal u t = k, a ijk = P(z t+1 = j|z t = i, u t = k), B = {b i (k)} is the observation distribution probability, also called emission probabilities of an observation x t being generated by state z t = i given input u t = k, π = {π i } is the initial state distribution where π i is the distribution of the system starts in state z i .

B. IOHMM SPECIALIZATION TO BATTERY OPERATING STATE
The model framework proposed comprises the set of actions, observables and hidden states that encapsulate the time-dependent chemical processes taking part inside the battery during operation. Among the actions comprising the input signal to the model, 'u' in Fig. 2, there are three possibilities: perform charge, discharge or hold.
The model observables, the output from the model, 'x' in Fig. 2, are the battery preference indexes emitted by the unobservable chemical internal states of the battery due to the performed action, 'z' in Fig. 2. This observed index can be either: positive, indicating the positive effect on the battery due to the performed action, negative indicating that battery is harmed by the performed action because it was contrary to preferences dictated by its chemistry, or zero indicating that battery neither benefits nor degrades as a consequence of the action. Dependencies between the states and transitions between states resulting from a particular action are modelled as an IOHMM with the information flow shown in Fig. 2.
The introduction of a latent variable facilitates the modelling of micro-cycling, preference to be fully charged or discharged before discharged or charged again, respectively and similar phenomena into the battery model.
Training data D is used to find optimal parameters of the IOHMM. D is the set of R pairs of input/output sequences, where the input describes the action that is scheduled to perform by BES and the output of the model is the resulting preference index describing the battery preference to the performed action dictated by cell chemistry: The training set D was generated based on the set of rules articulated in Section II (H - Table 1) and on resources available in the system.

C. IOHMM PARAMETER ESTIMATION
The optimal parameters of IOHMM, transition probabilities and observation probability matrices learned using a formulation of the Expectation-Maximization (EM) algorithm proposed in [76] for training IOHMM that is similar to the Baum-Welch algorithm used to train an HMM [74]. EM is a general technique that is used in the estimation of the distribution with hidden data. This is an iterative approach to maximum likelihood estimation (MLE) that aims to maximize the log-likelihood function where are the model parameters and log-likelihood function is defined by As the state variables z t (describing the path in the state space) are not observed, (4) is treated as parameter estimation with missing data. Let D f be the complete data set defined as and corresponding complete-data likelihood is Due to the unobservable nature of state variables Z, L f ; D f cannot be maximized directly. The solution requires the introduction of an auxiliary function and iterating it over the distribution of Z in two steps until a local maximum of the likelihood is found. Where Q( ;ˆ ) is expected value of complete data log-likelihood given model parameters computed at the end of the previous iteration and observed data D. The iteration steps comprise computation of Q( ; k ) = E[L f ; D f |D, k ] for k = 1, 2,... (expectation step) and the parameters updates as k = argmax Q( ; k ) (maximization step). Application of EM requires careful initialization of the parameters (specifically, initial state transition probability, observation probability and the initial state distribution) to avoid convergence in a suboptimal local minima -the standard practice of replications with random restarts was employed is employed to address this.

D. RECOGNITION HEALTH INDEX SEQUENCES
For given cell chemistry, the trained model can be used to predict an observation sequence of preference/health indices given an input sequence of charge actions. The complete data model was used, as in the Viterbi algorithm, to calculate the joint values of the states and outputs that is the most likely. This approach was applied due to high computational requirements when calculating directly the output sequence that is most likely given the input signal (which grows exponentially with the sequence length). The algorithm (8) for asynchronous IOHMM proposed by [82] was used.
where V (i, t) is the probability of the best state and output subsequence ending up in state i at time t;a (i, j, t) is the probability of transition from state i to state j at time t, given input u t = k; b(i, z, t) is the probability of observation x z being generated by state z t = i at time t, given input u t = k. The computational time of the proposed method is equal to that of the Viterbi algorithm, which is employed for the state sequence estimation and therefore the preference index prediction.

IV. COMMUNITY ENERGY SYSTEM CASE STUDY
Training and testing of the model are performed on 30-minute resolution historical data of electrical demand and PV generation measured at a community LV distribution feeder. The model is applied to estimate what would happen to a hypothetical battery as it is charged according to the predicted generation and the predicted demand on the basis of self-supply maximization. The output from the trained model on subsequently observed data is a cost measure that acts as a proxy for battery health.

A. CASE STUDY DATA
A representative sample of three consecutive days of demand, generation and storage schedule actions, are shown in Fig. 3. Demand data (upper part of Fig. 3) have a noisy and volatile character due to the low level of load aggregation typical at LV level. This exhibits a peak value of 4.8 kW. The generation data available (shown in the middle part of Fig. 3) has an intermittent nature across its daily pattern, consistent with small PV installations. A peak value of 8.6 kW (not shown) was exhibited within the period considered.
These characteristics of demand and generation data make the forecasting task challenging. This often results in large forecasting errors, which in turn introduce uncertainty in the system, thus making it difficult and demanding to plan the BES regime. To capture and demonstrate the identification of maloperation, a BES of 10 kWh was assumed, with a naïve persistence generation forecast and a day ahead Gradient Boost Machine forecast for the demand [83]. This scenario has been designed to capture frequent instances of maloperation due to the excess of the generation with respect to demand.

B. EXPERIMENTAL PROCEDURE
The battery model development process is divided into two phases. In the first phase, the original sequence of the observations, preference/health indexes, were produced based on the available resources, load requirements and a set of rules described in the previous section that encoded operational preferences of the battery summarized in Table 1 into the health index. The index is assigned based on the battery preferences for the action to be performed in relation to the previous actions and SoC, and is strictly battery type dependent. When the action is in agreement with operational preferences of the battery then the positive index is produced; when there are no preferences to the performed action, the zero index is produced; in other cases, the negative index is generated. The resulting data set was split into training and testing sets in the proportion of 70% to 30% of data respectively, to allow training and then out-of-sample evaluation.
Next stage involves the generation of IOHMM based on the original preference index, constituting output signal from the model, and the input signal of the model, a scheduled actions for the storage, training dataset. The trained model estimates the health index itself (output of the model) based only on the input actions (input of the model). The scheduled actions for energy storage: 'perform charge', 'discharge' or 'hold', constitute the only required input to the model; the information about BES state, SoC and previous action is not required as this knowledge is encoded in the VOLUME 9, 2021 IOHMM parameters. A flow chart of the model development procedure with the flow of information in the system is shown in Fig. 4.

C. MODEL SELECTION
The basic problem of the HMM and IOHMM implementation includes the choice of hidden states number. The decision basing only on the value of likelihood, by choosing the model with the highest value, is not simply the best criterion as the chosen model can be overfitting or can be computationally intractable to use. Bayesian Information Criterion (BIC) is minimized to decide the optimal number of hidden states for the IOHMM based battery model. BIC is the form of penalized log likelihood that allows a tradeoff between the model likelihood and its computational complexity [84] which in turn limits its ability to generalize. It can be represented as where: L f is a model likelihood (6), k is the degree of freedom or number of parameters in the model, and the length of the training data is T . Applying BIC different battery chemistries resulted in different numbers of states: 11 states for Lithium-ion and NaS batteries, 12 states for NiMH, NiCd, ZnBr FB and VRFB batteries, and 6 states for Lead-acid battery. The change of BIC value with an increasing number of states in the model for NaS battery is shown in Fig. 5. The minimum value of BIC indicates the fewest number of states for a model that gives the best likelihood of the model when complexity as the penalty is applied.

D. VALIDATION OF METRIC AGAINST LABORATORY TEST DATA
To assess the effectiveness of the proposed battery maloperation model as a proxy for actual battery degradation, outof-sample testing was performed using publically available detailed battery usage data obtained under lab conditions [85] This dataset consists of current, voltage and charge schedule information for a lithium-ion battery. Due to the minimal input requirements for the IOHMM maloperation model, only the sequence of charge actions is required. The IOHMM model output is compared against the measurement of battery capacity from every 50 random cycles of operation. Comparison of capacity fade and cumulative maloperation/preference index produced by the IOHMM is shown in Fig. 6.
From Fig. 6 it can be seen that the IOHMM maloperation measure follows the trend observed in the capacity of lithium-ion battery operated under random charging. The level of battery maloperation reflects battery capacity degradation due to ageing processes. During the first month of operation, the IOHMM exactly follows the real degradation in capacity and then the maloperation model slightly overestimates the battery degradation level. From an asset management point of view, it is always more appropriate to take the worst-case scenario into account rather than deal with consequences of battery failure due to underestimating its degradation level. Formally, Spearman correlation between the IOHMM output and the capacity fade was 0.99 with a corresponding p-value of 1.42 * 10 −4 , indicating that the IOHMM model metric can determine a measure of the battery degradation with minimal knowledge of battery state, without invasive measurements or an intensive physics-based model.

E. RESULTS AND DISCUSSION
From (1), the trained model consists of probabilities of emission of health index by state, initial state distribution a and state transition probabilities matrix, examples of which are given in Fig 7 for two battery models, ZnBr FB and Lithiumion. In the IOHMM the input variable can influence either the distribution of the latent variable, output variable or both. In the case of the NiMH, Lithium-ion and NaS battery models the influence of input signal on transitions was not observed, shown in Fig. 7 (a) on the Lithium-ion battery example.
For the Lead-acid, ZnBr FB, VRFB and NiCd batteries the influence of the input signal on the state transition probabilities was observed and is illustrated in Fig. 7 (b) for ZnBr FB. For the purposes of this work, the latent variable structure is valued for its ability to adapt to different functional forms; the actual interpretation of this latent structure in chemical terms is subject to further research.
The results presented in Fig 8 show that the health index predicted by the models does not follow the short-term diurnal patterns of the actual index, although a general long-term trend is recovered, providing valuable knowledge about the impact of the forecast error. The prediction of the battery preference indexes at the end of the testing stage are summarized in Table 2. Examples comparing the original cumulative preference index with cumulative index generated by the IOHMM for Lithium-ion and VRFB batteries are shown in Fig. 8. At the end of the test periods, the actual cumulative health index of the VRFB is highest of all cell chemistries considered, which is in agreement with its more robust design. The occurrence of the same value of the index for most battery models except VRFB indicates that the batteries degrade at  the same pace, indicating that the maloperation metric is reflective of the physical degradation process.
The actual cumulative health index, Fig. 8, is characterized by diurnal patterns observed in the photovoltaic generation data. The lower peak on the graph corresponds to the time when the generation drops below the load requirements, and the higher one when generation starts to exceed demand. In the case of the Lithium-ion model, Fig 8(upper), the predicted index alternately overperforms and underperforms the original index (point 1 and 2 on Fig 8(upper), respectively).
At the end of the test period, the predicted cumulative index differed only by 5.99%. For the VRFB battery model, the predicted preference index behaved in similar to that of Lithium-ion until day six then starts to increasingly underestimate the maloperation index, Fig 8 (lower). At the end of the test period, the predicted index differs from the actual one by 16.6%. Underestimating the battery health can have less severe consequences than overestimating it, but it could lead to loss of the opportunity to use the BES or needless replacement of the asset ahead of the end of its life.

V. CONCLUSION
As battery storage aggregation becomes more commonplace, the management of the constituent battery assets will require health metrics to ensure ongoing contractual turn up and turn down commitments are fulfilled to their agreed capacity. To address this, this paper has presented a non-invasive VOLUME 9, 2021 approach that predicts the extent to which a battery asset has been maloperated.
The proposed IOHMM based metric captures the differences in the preferred operation of the battery, dependent on its chemistry, that allows the incorporation of preferences like micro cycling, deep cycling and maintaining full capacity. By capturing the information on how well the battery is operated in regard to its chemical preferences, the model becomes a potential decision support tool for planning and asset management tasks by increasing knowledge about suitability of a BES for its intended application or the suitability of the planned charging/discharging regime for a BES. The IOHMM model can be potentially incorporated as the cost function in a charge schedule optimizer, allowing battery health awareness in a BES management system to be established.
The minimal knowledge requirement also makes the model suitable when dealing with practical cases where installations may comprise heterogeneous cell chemistries. While this can undoubtedly be developed to support condition monitoring and remaining useful life estimates, the wider interest could be from using this as the policy function in an automated scheduler -this can be used to diversify the impact of maloperation across a portfolio of battery assets, prolonging their life and reducing the capital expenditure costs for storage aggregators.