Vanadium redox flow batteries real-time State of Charge and State of Health estimation under electrolyte imbalance condition

This paper presents a novel observer architecture capable to estimate online the concentrations of the four vanadium species present in a vanadium redox flow battery (VRFB). The proposed architecture comprises three main stages: (1) a high-gain observer, to estimate the output voltage and its derivatives; (2) a dynamic inverter, to obtain a set of concentration candidate solutions; and (3) a static selector, to determine the actual concentrations. The methodology does not rely on the classic assumption of balanced electrolytes, thus significantly widening the application range in comparison with most of the literature previous studies. Furthermore, to perform the estimation, only a single voltage and current measurements are required, which eliminates the need of including complex and costly additional sensors. To validate the proposal, comprehensive simulation tests are conducted. These tests take into account typical side reactions that cause imbalance in VRFB systems, such as vanadium crossover and 𝑉 2+ oxidation. The observer shows a remarkable performance when dealing with these realistic conditions, allowing to estimate with high accuracy and robustness the four vanadium concentrations, the State of Charge and the State of Health with a relative error below 2%.


Introduction
The massive deployment of renewable energies (RE) is widely accepted as the only viable solution to the present energy crisis.On the one hand, the development of RE will make it possible for every country to fulfil the growing energy demand, eliminating the dependency on scarce and unevenly distributed fossil fuels deposits.On the other hand, their clean nature allows to substantially reduce the CO 2 and other pollutants emissions, hence contributing to the decarbonisation and limitation of climate change.As a result, RE are being promoted by governments and international organisations, and their capacity is growing faster than ever before.For instance, according to an European Commission Report [1], between 38 and 40% of the energy produced in the European Union by 2030 must come from renewable sources in order to meet the greenhouse gas emissions reduction set in the Climate Target Plan.
One of the main challenges of this transition towards a sustainable energy system is related to the managing of the energy generated by renewable sources.Given their intermittent and unpredictable nature, RE need to be coupled with appropriate energy storage systems (ESS) in order to attain a large penetration.These will enable RE to have the largest share in electricity production, without generating grid stability issues [2].In addition, ESS are necessary for the feasibility of RE based stand-alone power systems, ensuring a continuous power supply by storing the surplus during high energy production periods, and releasing it when demanded [3].
Among the different types of ESS developed so far, redox flow batteries are now positioned as one of the most promising for largescale stationary applications [4].This is because of their combination of a high energy efficiency (up to 80%) and long lifespan with a simple and safe operation.The most distinctive feature of these batteries is the fact that the electrolytes are stored in two tanks separated from the electrochemical stack.As a result, the energy capacity can be decoupled from the power, thus attaining a greater degree of flexibility and modularity in comparison with conventional technologies such as lithium batteries [5].Although several types of redox flow batteries are being investigated, at the moment, the All-Vanadium Redox Flow Battery (VRFB) is the most mature [6].By using only one active element, most of the cross-contamination problems that affect other RFB technologies are eliminated.The huge interest that VRFB are gaining nowadays can https://doi.org/10.1016/j.est.2023.107666Received 13 December 2022; Received in revised form 3 April 2023; Accepted 6 May 2023 be illustrated with the ongoing installation of a VRFB system with a power of 200 MW and a 800 MWh capacity in Dalian, China [7].
In this context, a great effort is being put by companies and research institutions to make VRFB more efficient, reliable, and cost competitive.One of the fields that is gaining special attention in the last years is the real-time estimation of the battery unmeasured internal states and parameters [8].In particular, the concentrations of vanadium species in the electrolytes, the State of Charge (SoC), and the State of Health (SoH), are some of the variables that play a key role in the battery monitoring and operation [9,10].At laboratory scale, these can be measured with high accuracy through experimental methods such as UV-Vis spectroscopy or ultrasonic measurements [11].However, the application of these techniques in practical applications imply an increase of the cost and complexity of the system.Therefore, its estimation using model-based algorithms that rely only on easily measurable variables such as the current, the voltage and the flow rate becomes very appealing.
Most of the VRFB estimation works available in the literature are based on Equivalent Circuit Models (ECM).This is because of the relative simplicity of these models, together with their high accuracy in representing the battery's electric response [12].However, many of the parameters of these models do not have a clear physical interpretation, and some details of the real system cannot be adequately captured.Wei et al. and Zhao et al. used a multi-timescale estimator [13] and an Extended Kalman Filter (EKF) [14,15] to determine, in real time, the parameters of a first order ECM and estimate the battery's SoC.Xiong et al. [16] estimated the ECM parameters by means of a sliding mode observer, and introduced an empirical capacity fade factor to represent the capacity loss.In the same line, in [17,18], the estimation of the ECM parameters is conducted using a recursive least squares algorithm, which is combined with an adaptive EKF algorithm that allows to monitor the evolution of the battery capacity.In [19], the classic ECM approach is substituted by a data-driven autoregressive exogenous model, which is coupled with a H ∞ observer for online SoC estimation.More recently, Fornaro et al. [20,21] developed a methodology based on sliding-mode differentiators that allows to estimate the electric parameters of the ECM, and then compute the SoC and SoH, considering different practical applications.
Unfortunately, the ECM approach does not allow to obtain the individual concentrations of the vanadium species present in the battery.Thus, it is not capable to detect when the battery is suffering from side reactions that deviate their behaviour from the ideal one.This problem is aggravated by the fact that most side reactions, such as those associated with vanadium crossover or oxidation reactions, have a cumulative effect that lead to a condition known as electrolyte imbalance, which reduces its performance and charge capacity [6,22].Therefore, even in those works where capacity loss is considered, the specific nature of such degradation is unknown.In addition, they normally assume that the curve that relates the battery voltage with the SoC is independent of the ageing status, which is rather questionable since it contradicts the Nernst equation for most types of imbalances.
Other authors have resorted to electrochemical models, that are based on the mass balances of vanadium species and, consequently, every term in them has a clear physical meaning.In this context, Clemente et al. [23] has estimated the SoC of a VRFB using a sliding mode observer, though preserving the classical balanced electrolyte hypothesis.Recently, the same group has developed a non-linear observer that is able to deal with unequal flow rates [24].Although auspicious results were obtained with this approach, it presents two important limitations.Firstly, it assumes that the mass in both sides of the system is known and constant, which is only valid when the vanadium crossover rate is negligible.Secondly, it does not consider possible side reactions that modify the average oxidation state of the system.Therefore, the proposal is still unable to deal with the general case of an imbalanced VRFB.Khaki et al. proposed resourceful algorithms that couple both ECM and electrochemical models.They succeeded in estimating parameters of these models [25,26], and improving the battery performance [27], although the specific causes of the capacity fade are not completely elucidated.Finally, Jienkulsawad et al. stated that, from an estimation viewpoint, it is not possible to lift the hypothesis of a balanced VRFB without including additional sensors to the system.Consequently, besides the classical voltage and current measures, they include measures of half cell potential against different reference electrolytes/electrodes [28,29].
In this work, we overcome the aforementioned limitations by introducing a novel observer architecture capable to estimate the concentrations of the four species present in a non necessarily balanced VRFB system, only from a single voltage and current measurement.This knowledge is used to infer valuable information of the electrolyte status, with great importance to detect possible malfunctions and optimise the battery performance.
The main contributions of this paper can be summarised in the following points: • It is established by means of an observability analysis that, when the battery is unbalanced, the system is non-observable, i.e., four different concentrations trajectories generate the same output voltage.• A novel architecture to overcome this non-observability is developed, allowing obtain online the four vanadium species concentrations.
• The SoC and two indicators for the reversible and irreversible SoH are defined and successfully estimated.• The proposal is numerically validated through computer simulation.
The remainder of this work is structured as follows.In Section 2 a general description of a VRFB system with its main reactions and side reactions is presented and, accordingly, an electrochemical model to describe its behaviour is formulated.Section 3 defines the specific SoC and SoH indicators that will be used to determine the status of a VRFB.Afterwards, the feasibility of reconstructing all the concentrations of the system is discussed via an observably analysis.Section 4 presents an observer architecture capable to meet the proposed objective.In Section 5 the proposal is assessed and validated through comprehensive computer simulation.Finally, Section 6 derives some conclusions and final remarks.

Dynamic model
This section introduces the model used to describe the VRFB behaviour.Firstly, a brief overview of the fundamental operating principles of a VRFB system is presented.Then, a mathematical model is formulated to represent the main electrochemical phenomena that take place in the system.Finally, some assumptions are made in order to obtain simplified versions of the model that will be used in the remainder of this work.

System description
A VRFB consists of two tanks where solutions of vanadium active species in sulphuric acid, or electrolytes, are stored.In the negative side of the system, the electrolyte contains V 2+ and V 3+ whereas, in the positive side, the electrolyte contains VO 2+ (also known as V 4+ ) and VO + 2 (also known as V 5+ ).When the battery is operating, both electrolytes are pumped from the tanks to an electrochemical cell (or stack of cells), where the redox reaction takes place.The cell is internally divided by an ion-exchange membrane that allows to close the electric circuit while keeping the electrolytes separated.Most commercial VRFB use a cation-exchange membrane that, ideally, allows only the passage of protons.The outlet of each half-cell is connected to its respective tank, hence closing the hydraulic circuit.A schematic diagram of a typical VRFB system is presented in Fig. 1.The main reactions that take place at the surface of the cell electrodes are the following: At the negative electrode: At the positive electrode: In addition to the aforementioned reactions, other side reactions may occur in a VRFB system at a much lower rate, whose effect is to produce self-discharge and, more importantly, an electrolyte imbalance that reduces the battery's charge capacity [5,11].The most common side reactions are those resulting from the undesired crossover of vanadium species through the membrane.In general, the molar flux of vanadium in one direction is greater than in the other, i.e., the crossover is asymmetric, thus leading to a build-up in one side and a depletion in the other.This results in a condition known as stoichiometric imbalance that reduces the battery capacity but can be recovered by a simple remix of the electrolytes [22].
On the contrary, those side reactions that produce a net shift of the vanadium average oxidation states, known as faradaic imbalance, result in a capacity loss that can only be reverted by means of more complex chemical or electrochemical methods [30,31].These include, for instance, the hydrogen evolution reaction at the negative electrode during charge operation [32], and the air oxidation that suffers the V 2+ when the negative tank is not perfectly sealed [33].

Complete model
Many models have been proposed in the literature to describe the evolution of each vanadium species concentration in a VRFB system.For control and estimation purposes, the most popular are lumped parameter models derived from Skyllas-Kazacos formulations [8,34].In particular, considering that the VRFB is composed of two tanks and a stack of  cells that behave exactly the same, the following model can be formulated: where   are the vanadium species concentrations ( indicates the vanadium oxidation state),  is the tank/half-cell volumes,  is the flow rate,  is the membrane area,   is the molar flux of species  through the membrane;  is the stack current (assumed to be positive in charge operation),  is the Faraday constant, and   is a coefficient that allows to represent possible V 2+ oxidation in the negative electrolyte tank.The subscripts and superscripts  and  stand for the cell and the tanks while  and  refer to the negative and positive side of the system, respectively.In Eqs.(1) to (4), the left hand side represents the net accumulation of species .For the cells, the first term of the right hand side describes the effects of inlet and outlet electrolyte flows, the second one stands for the crossover and associated side reactions, and the third one is the net effect of the main electrochemical reaction.As for the tanks, the main term of the right hand side represents the inlet and outlet flows, while the second term in the negative tank accounts for possible V 2+ oxidation [35].
The vanadium crossover can be caused by several mechanisms, that include diffusion, migration and convection.It was found, however, that generally a simple diffusion law is accurate enough to describe the crossover dynamics: where   is the permeability coefficient of species  in the membrane and  is the membrane thickness.The theoretical open circuit voltage of the cell, can be calculated by means of the Nernst equation [12]: where  0 is the standard cell voltage,  is the temperature,  is the ideal gas constant,  is the Faraday constant,  H is the H + concentration and   are the activity coefficients of the species involved in the reaction.
In practice, however, since activity coefficients and proton concentration remain approximately constant throughout the battery operation, Eq. ( 6) can be simplified, replacing the standard potential by the formal cell potential   that lumps all these constant terms [12,36]: When the battery is operating, the actual cell voltage deviates from the    because of the ohmic effects and the electrode polarisation overpotentials that appear in the presence of electric current.When required, however, it is common practice to place an auxiliary open circuit cell in the system whose function is to monitor the    .Alternatively, the open circuit voltage can be inferred by adequately processing the terminal voltage and current measurements, such as in the way presented in [20].In the remainder of this work, it will be assumed that the    is a measured variable.

Reduced model
The considered model has strong nonlinearities in the output voltage, and is of too large dimension for a straightforward observer design and analysis.For this reason, it is convenient to reduce the complexity of the model by a proper model reduction, in order to ease the observer design process.
In general, in order to guarantee a proper electrochemical performance, the flow rate from the tanks to the stack provides a much higher reactant supply than the consumption originated by the electrochemical reaction.As a result, the difference between cell and tanks concentrations becomes negligible in most practical applications.Therefore, the model can be reduced to fourth order, with no distinction being made between cell and tanks concentrations, and considering an overall volume that is equal to the sum of that of the tanks and the cells.This is a common hypothesis made in the literature for VRFB, and will be assumed to be valid in the remainder of this paper.Additionally, it will be assumed that the tanks and the half cells have the same volume in both sides of the VRFB.Then, the system can be written in the state space, as follows: where  = (  +   ) is the total volume of each side of the system, x = [ 2 ,  3 ,  4 ,  5 ]  is the state vector of concentrations and ̇x is its time derivative;   and   represent the crossover and oxidation dynamics, respectively;  = [1, −1, −1, 1]  accounts for the main electrochemical reaction dynamics; and  is an auxiliary output that results from subtracting to    all the constant terms, keeping only those dependent on the vanadium species concentrations.The expressions for   and   are: 8) can be further reduced by making two additional assumptions: 1.The total vanadium moles in the system (  ) remains constant   =  ( 2 +  3 +  4 +  5 ).Since VRFB are closed systems, this a natural assumption, and will hold as long as the battery does not suffer from a serious damaging event such as an electrolyte leakage.Defining   =   ∕ and solving for  5 , the order of the system can be reduced from 4 to 3, since  5 is now expressed in terms of the other species concentrations: 2. The dynamics of the VRFB can be separated into two timescales.Those processes related with the main electrochemical reactions operate in a timescale of minutes and hours.In contrast, the effects of side reactions take several days or weeks to have an impact on the battery condition.Since the observer is expected to be capable to provide rapid estimations, within a timescale of minutes, a model that considers only the main electrochemical reactions can be utilised (i.e., neglecting the side reaction terms given by  1 and  2 ).The observer, however, will still be able to compensate this slight discrepancy in the model and track the effects of the side reactions thanks to its correction terms, as it will be explained in Section 4.
Then, the resulting model is: where This is a simplified model for the system, but is generally valid for short time periods, thus being very useful for observer design purposes.Therefore, the model presented in Eq. ( 10) will be used for the observability analysis (Section 3) and the observer design (Section 4), while the more complete model of Eq. ( 8) will be used as the ground truth to validate the accuracy and performance of the proposed observer (Section 5).

Problem formulation
This section presents the estimation objectives of this work.Then, the feasibility of performing such task only from current and voltage measurements is discussed by means of an observability analysis.

Main objective
The objective is to design an observer capable to estimate online the concentrations of the four vanadium species present in the VRFB only from the cell voltage and current measures.That is, where x is the estimation generated by the observer and  is the state of the reduced order model (10).Such estimation will be later used to compute essential indicators of the VRFB status, such as the State of Charge and the State of Health.It is important to remark that, in this paper, the usual hypothesis of balanced electrolytes is not imposed, significantly widening the range of application of the proposal and allowing to have a deeper insight into the aforementioned indicators.
In particular, the individual anolyte/catholyte SoC will be obtained and the reversible causes of the battery capacity fading will be distinguished from the irreversible ones.The SoC is defined as the quotient between the available electric charge of the battery and its maximum capacity.In the case of an imbalanced battery, it is necessary to define an individual SoC for each electrolyte, which can be expressed in terms of the concentrations of vanadium species present in each side of the system in the following way [11]: At the negative side: At the positive side: Then, the overall battery SoC, can be defined as SoC = min{SoC  , SoC  } [37].

T. Puleston et al.
The SoH, in turn, is used to quantify the loss of capacity in relation to the maximum capacity, corresponding to a balanced battery.In previous works it has been assumed that the main cause of this loss is the net crossover towards one of the sides of the system [16,38].Indeed, as previously discussed, the crossover results in a stoichiometric imbalance, where one of the electrolytes has less active species moles than the other, hence reducing the battery charge capacity.The mass change produced in one side of the battery with respect to the other, which, assuming equal volumes in both sides of the system is: Then, the state of health of the electrolyte associated to the effects of crossover can be defined as: where   is the original vanadium concentration of the VRFB, that corresponds to a balanced electrolyte (  =   ∕2).Evidently, when the battery is balanced, the vanadium concentration in the positive side ( 4 +  5 ) is equal to that in the negative side ( 2 +  3 ), which results in a  = 0 and a SoH  = 1.However, the definition given in (15) does not account for possible oxidation effects, which also diminish the battery capacity.In a VRFB that has not suffered from net oxidation, the remix results in a mixture with an overall composition of V 3+ and V 4+ in proportion 1:1 (often referred to as V 3.5+ ) [31].Then, when the battery is recharged, the concentration of V 2+ in the negative side will be equal to that of V 5+ in the positive side.In contrast, when the remix is conducted in a faradaic imbalanced battery, the proportion of V 3+ and V 4+ is no longer 1:1.This faradaic imbalance can be better visualised by defining the index   , which quantifies the deviation from the average oxidation state of +3.5 corresponding to a balanced VRFB.
Positive values of   indicate a net oxidation of the system, or oxidative imbalances, whereas negative values of   indicate a net reduction or reductive imbalance [31].For instance, as a limit situation, in a stoichiometrically balanced VRFB (SoH  = 1) a   equal to   means that when the positive electrolyte is completely charged (SoC  = 1), the negative one will be completely discharged (SoC  = 0), effectively reducing to 0 the battery capacity.In this line, a complementary definition of the SoH that indicates the net oxidation (or reduction) suffered by the VRFB is: It is very important to make this distinction between SoH  and SoH m because, as previously discussed, knowing the magnitude of each of them permits to decide in advance the best treatment to recover the electrolyte capacity.Specifically, only the electrolyte degradation originated by crossover can be reverted by remixing the electrolytes, while oxidative phenomena require of more complex chemical or electrochemical methods.Furthermore, by following the evolution of these indexes, it is possible to recognise if any component of the battery is not working properly, and take specific actions to solve it.For instance, a rapid decrease in SoH m can be a sign of membrane degradation, while a decrease in SoH  could be associated to a sealing problem in the negative tank or an incorrect operation that leads to hydrogen evolution at the negative electrode.

Observability analysis
A system, defined by the dynamics ẋ =  () and the output  = ℎ(), is said to be observable if it is possible to reconstruct uniquely (at least asymptotically) the trajectory in the state-space () using only information from the output  up to the time  [39].Specifically, in Conversely, if a certain trajectory in the output voltage can be generated by at least two different trajectories in the concentrations, or state space, the system will be non-observable.An illustration of these two possible situations is presented in Fig. 2.
In this work, the observability analysis is performed considering the simplified version of the battery model, which is presented in Eq. ( 10).This decision is sensible, since the crossover and oxidation processes are much slower than the main electrochemical dynamics.Therefore, to consider them explicitly in the estimation algorithm would be of little help, especially taking into account that their parameters typically present a large degree of uncertainty.The correction terms of the observer, however, will allow to track the electrolyte imbalance generated by side reactions.
It is worth mentioning that there is no general procedure to study the observability of a non-linear system.In this case, however, the possibility of finding an analytic solution to () results significantly helpful.Integrating Eq. (10a) from time  0 to time , it is possible to obtain an expression that describes the evolution of the vanadium species concentrations: where the positive sign holds for  2 and  5 and the negative for  3 and  4 , and  ,0 is the concentration of species  at time  0 .Then, the resulting output trajectory of the system is: It can be proven that a trajectory described in Eq. (19), that is a set of values (0),  (1), … , (), can be generated by different trajectories in the concentration's space, that is, can be generated by multiple initial conditions  ,0 for  = 2, … , 5. Consequently, the system is, in principle, not observable.This is because of the particular symmetry of (19), that allows to exchange the values of  2,0 and  5,0 (or  3,0 and  4,0 ), without producing any effect on ().For instance, let us assume that, at a given time (arbitrarily taken as  = 0), the concentrations, expressed in mol∕l, are   = [0.3,1.2, 1.6, 0.6]  .From that time on, the battery is charged/discharged with a current (), thus generating a certain trajectory in the concentrations and, accordingly, in the voltage.It can be shown that there will be three other possible initial concentrations combinations that would generate the same output trajectory as   .Specifically, those other ''candidates'' will result from permuting the positions of  2,0 and  5,0 ; of  3,0 and  4,0 ; and of both simultaneously.The four possible candidate solutions to Eq. ( 19) are listed in Table 1.This table also includes the values of  and   that will be later used to analyse the physical meaning of each candidate.

Remark 1.
It is important to distinguish Eq. (10b) from Eq. (19).While the former has infinite solutions, i.e., infinite possible combinations of concentrations that generate the same output at a particular time , the latter has only four.This is because (10b) is a static relation between  and  while (19) relates the trajectories of () and ().In other words, (19) implies the fulfilment of (10b) for every time , thus being much more restrictive.The existence of only four solutions can be proven by deriving the analytic inversion of Eq. ( 19).The resulting expression is of considerable length and has been obviated in this document to ease the reading.
In most of the previous VRFB estimation works, this multiplicity of solutions to the estimation problem does not occur since the balanced electrolyte hypothesis is imposed:  2 and  3 are assumed to be always equal to  5 and  4 , respectively [12,14,20,23].However, this is a highly restrictive assumption because, as previously mentioned, although electrolytes normally start from a balanced condition, it is well known that they tend to imbalance over time, even when the VRFB is correctly operated [22].Other authors have proposed to include additional sensors to obtain information of the complete concentration vector, such as two reference electrodes that monitor independently each half cell voltage and make the system strictly observable [28,29,38].However, the addition of sensors does not only imply an additional cost, but also dealing with cumbersome measures and periodical re-calibrations that make the operation of the battery more complex.
Moreover, it can be mentioned that the most common observer techniques, e.g. the extended Kalman filter [28], the sliding-mode observer [40] or the high-gain observer [41], rely on an underlying observability assumption.For non-observable systems such observer algorithms become numerically unstable, thus, cannot be implemented in practice.
As a result of the aforementioned limitations, the possibility of reconstructing the concentrations of the system only from a single voltage and current measures without imposing any restriction in the electrolyte status becomes very appealing.However, for this to be possible, two questions need to be addressed: (i) how to obtain the four possible solutions to the estimation problem; and (ii) how to select which candidate is the correct one.
Regarding the first question, note that once one of the candidates (whether the correct one or not) is found, the other three candidates can also be determined.Specifically, these can be easily obtained by permuting the positions of the concentrations in the way that has just been discussed.The specific proposal to find one of the candidates will be detailed in Sections 4.2 and 4.3.
With respect to how to recognise the correct candidate, the following discussion is pertinent.Despite producing the same output, the four candidates are associated to different types of imbalances.In particular, they differ in the net direction of the crossover and the net oxidation suffered by the species.For instance, in Table 1, candidates A and B are associated with a net crossover ( > 0) towards the positive side of the system, while in candidates C and D the net crossover is towards the negative side ( < 0).As for the net oxidation, this can be easily appreciated by analysing the index   .Candidates A and C, correspond to a VRFB that has undergone a net oxidation, while the opposite occurs for candidates B and D.
In general, the direction of the net crossover mainly depends on the membrane composition.For example, Nafion and s-Radel membranes tend to produce a build-up in the positive side and a dilution in the negative one [34,42], while the opposite trend is observed in the comparatively less used anion exchange membranes [38].As for the net oxidation, this almost always proceeds towards an oxidative imbalance (  ≥ 0), since the oxidative processes of air oxidation and hydrogen evolution usually prevail over the reductive oxygen evolution and solid elements corrosion.This physical knowledge of the system can be used to discard the incorrect solutions and identify the right one.The systematic criterion proposed in this paper is developed in Section 4.4.

Observer architecture
This section presents the methodology developed for the online estimation of the VRFB concentrations.The general structure of the observer is presented in Section 4.1, while a detailed description of its main components is provided in Section 4.2, 4.3 and 4.4.

Main idea
The proposed estimation strategy is based on a high-gain observer (HGO), whose outputs converge to the VRFB output and its derivatives up to order two.Subsequently, the estimates generated by the observer are processed by a dynamic inverter that guarantees the convergence of its states to one of the possible concentration trajectories that generate the measured output.The methodology is completed with an algorithm capable to reconstruct the four candidates from x, and select the correct one, x * , by means of using side-information.A diagram of the observer architecture is presented in Fig. 3.
Before delving deeper into the description of these components, it is important to introduce the concept of the observability map,   .This is defined as the vector of successive time derivatives of the output, up to the order :   ∶= [()   () ..

. 𝑑 𝑘 𝑑𝑡 𝑘 𝑦(𝑡)] 𝑇 = [ℎ(𝐱) 𝐿 𝑓 ℎ(𝐱) ... 𝐿 𝑘 𝑓 ℎ(𝐱)] 𝑇
, where   indicates the Lie Derivative in the direction of  :  +1   ℎ() =   (   ℎ()) (), with  0  ℎ() = ℎ().Specifically, the observability map of order 3 that will be used for the design of the HGO and the inverter of the following subsections is: For the sake of simplicity, the previous map was formulated by assuming a constant current, which allows to eliminate the terms that depend on İ.This hypothesis will be assumed to hold for the remainder of this work.However, if necessary, the current derivatives could be also taken into account, at the cost of having a more complex expression for ÿ.
It can be noticed that, in accordance to the findings of Section 3.2, if a given concentration generates a certain vector , the other permutations discussed in 3.2 would result in the same vector .That is, the map  is not injective.

High-gain observer
The first stage of the estimation process is to design an algorithm capable to process the measured output of the system, , and provide an estimate of the same signal and its derivatives up to order two.To this end, one possibility is to use a differentiator, namely, an algorithm that computes the derivatives of a signal at time , only from the measured values of that signal up to time  [43].However, differentiator algorithms normally have a high degree of noise sensitivity, which is mainly caused by the fact that these do not include in their structure the knowledge of the system model.Another possibility is to use an observer, which makes use of the model to attain a better noise rejection capacity [39].
Most of the observers intended for non-linear systems require to previously bring the system into a canonical form, taking the system output and its successive derivatives as the new states.Accordingly, the transformation that expresses the new states, , in terms of the original ones , is given by the observability map (20): Then, the system dynamics given in ( 10) can be rewritten in terms of the new coordinates, , as follows: Remark 2. It can be appreciated in ( 21) that ξ 3 is still dependent on the original  coordinates.This is because the map () is not injective, i.e., its inverse  =  −1 () does not exist.Moreover, an analytic expression for a local inverse of () that, given a certain , would allow to obtain one of the four solutions is not available.Therefore, it is not possible to express the system (21) only in terms of .
There are several types of observers that can be designed for a system in the canonical form (21).These include, for instance, high-gain observers (HGO) [44], sliding-mode observers [40], and homogeneous observers [39].In this work, with the aim of reducing the design and implementation complexity, a HGO has been chosen for being the one with the simplest structure and, at the same time, exhibiting a good performance when dealing with non-linear systems.The observer is composed of a copy of the system dynamics, and a correction term proportional to the error in the output estimation.These dynamics are given by: where   are fixed constants of the observer;  is a design constant that must be tuned to attain an optimal performance; and  is a filtered version of the error in the output estimate,  − ξ1 .
Remark 3. The constants   > 0 must be chosen so that the polynomial  3 + 1  2 + 2 + 3 is Hurwitz.In turn,  > 0 is the design parameter of the HGO, and must be small enough to guarantee the convergence of the algorithm in a reasonable time, but not too small since this would lead to a sharper peaking phenomenon and greater noise sensitivity [44].
Noise-sensitivity is one of the main issues that affect model-based estimation of electrochemical systems [45,46].Specifically, it is known that the estimates provided by a HGO can present an important deviation from the real value when the measurement noise is high.Therefore, reducing the noise contained in the correction term can substantially improve the quality of the observer estimates.To this end, a classic first-order low pass filter is employed in this work, whose beneficial effect when coupled with a HGO has been proved in [47].It must be noted that the signal to be filtered is not the output itself, but the error between the measured output and its estimation.Otherwise, the filtered  would be virtually delayed with respect to the estimated ξ1 , hence leading to an incorrect computation of the estimation error.
With these considerations, the filter equation is: where  is a design parameter that corresponds to the inverse of the filter time constant, which must be large enough to ensure the overall stability of the observer.Finally, it is important to remark that ( 22) is not a closed-form expression of the observer dynamics, since the second term of ̇ξ 3 depends on the original coordinates, .As the inverse of () does not exist, the values of x will be computed dynamically, in the way presented in Section 4.3.

Dynamic observability map inverter
To bring back the system states from the HGO coordinates, , to the original ones, , is a key step in the observation process.The inversion is essential not only to recover the information regarding the real system concentrations, but also to close the loop of the HGO (22), as discussed in the previous subsection.In principle, this could be done in a numerical way by finding, in every time step, one candidate x that ''inverts'' the map [48]: However, that method is highly sensitive to possible noises in the HGO outputs.Furthermore, the coupling of the HGO with the solver may have an unpredictable interaction during the transients and could even lead to stability issues.Finally, to run online a non-linear optimisation algorithm highly increases the computational burden.
T. Puleston et al.These drawbacks can be overcome by using a dynamic inverter, based on the proposal of Astolfi et al. [49].This algorithm is well suited to be coupled with a HGO and guarantees an exponential convergence rate if its gains are set large enough.The dynamics of the algorithm are given by: where  is a large enough positive constant, ξ is the estimate of () proportioned by the observer in (22), ( x) is the previously defined transformation (20) evaluated in x, and ( x) is the Moore-Penrose pseudoinverse (represented with the superscript †) of the Jacobian matrix of ( x).Accordingly, ( x) is given by: where In summary, the dynamic inverter ( 24) coupled with the HGO described in 4.2, ensures the convergence of x to one of the four possible candidates presented in Section 3.2.The way to select the correct one will be discussed in the following subsection.

Selector
As previously stated, the inverter introduced in Section 4.3, will converge to one of the possible solutions of (20).Therefore, x can converge to an incorrect candidate if the initial conditions are not sufficiently close to the real , or when the estimates suffer a large deviation during the observer transient.
The first step of the proposed solution is the following: since the x to which the inverter converges is one of the four candidates described in Section 3.2, it is possible to reconstruct a table with the four of them.For instance, renaming the estimate provided by the inverter at a time  as candidate ''a'',   () = [ 2, ,  3, ,  4, ,  5, ], the matrix of candidates will be: Evidently, in a balanced battery, the four candidates would be actually the same, and no selection stage is needed.On the contrary, when the electrolytes are imbalanced, the question on how to recognise the correct option, x * , arises.As previously mentioned, one index that distinguishes the four options is   .In the simplest case, when the imbalance is caused only by crossover mechanisms (which is the assumption of the majority of works that consider an imbalanced electrolyte),   = 0 and the selection is straightforward.
In a more general case, assuming that an estimate of the initial   is available ( ,0 ), it is possible to recognise the correct candidate in the following way : where  = {  ,   ,   ,   } is the set that contains the four possible candidates for x * .
Remark 4. The reader may be wondering why, if information regarding  ,0 is available, this is not imposed from the beginning to further simplify the model ( 10) to order 2. The reason is that, if  ,0 were strictly imposed, the observer would not be able to provide reliable estimates when slight deviations from that value occur in the real plant due to side reactions.In contrast, the proposed methodology does not require the   of the chosen candidate to be exactly the same to  ,0 , which allows to track possible charge imbalances.Moreover, the  ,0 can be periodically updated, by using   ( x * ), thus attaining a greater degree of flexibility and accuracy.
A sensible initial guess is to assume  ,0 equal to 0 if the battery has not suffered a long exposure to oxidative phenomena.When this is not the case, the physical knowledge of the system behaviour can be used to discard the incorrect candidates (for instance by analysing the direction of the net crossover and net oxidation, in the way presented in Section 3.2).Then, its   can be computed and taken as  ,0 .Subsequently, the selector ( 27) is set in motion and the estimation process automatically updates its value, effectively allowing to reconstruct x * from the values of x provided by the inverter.This automatic procedure allows to track the actual concentrations of the system, independently of the direction of crossover and oxidation.
An illustrative representation of the selection process stages is presented in Fig. 4. In the figure, each curve represents a possible trajectory in the state space.Specifically, starting from a wrong candidate x provided by the inverter (stage 1), the four possibilities are generated (stage 2), and the right one is selected (stage 3).In this example, x corresponds to   , while the option that is ultimately selected, x * , is   .

Results and discussion
In this section, the performance of the proposed estimation methodology is thoroughly assessed and analysed via computer simulations (the utilised software is MATLAB-Simulink).The results are structured into two sets, covering different time-spans.The first one, denoted as Case A: short term simulation, corresponds to a one-cycle simulation whose purpose is twofold.Firstly, to further clarify the functioning of the proposed observer.Secondly, to assess its performance and utility in determining the concentrations and individual electrolyte SoC of an imbalanced VRFB.The second set, referred to as Case B: extended time simulation, presents a long term operation of the battery and allows to better appreciate how the methodology can be used to track the battery's SoH.

Validation conditions and simulation set-up
In order to validate the performance of the observer under realistic conditions, the actual battery is simulated using a complete model based on Eq. ( 8) that includes side reaction dynamics.The permeability coefficients, necessary to describe the crossover dynamics, are taken from [50], and correspond to the widely used Nafion 117 membrane.In contrast, comparatively less information is available in the literature regarding the oxidation dynamics.Therefore, to illustrate the merits of the proposed observer in a reasonable time-window, it is considered a value of   that would produce a net oxidation of approximately a 10% of the vanadium contained in the negative tank in a one-week period.Finally, measurement noise is considered by including additive noise in the voltage signal.The estimation will be assumed to be satisfactory if the relative errors in the concentrations, SoC and SoH estimates remain below 5%.
The physical and design parameters of the VRFB under study are presented in Table 2.Note that the system is of a rather small scale.For the validation, this fact is not a drawback, but it contributes to the assessment of the proposed methodology in two ways.On the one hand, since side reactions actuate comparatively fast in smaller VRFB, it eliminates the necessity of conducting extremely long tests.On the other hand, it assesses the methodology under highly exigent conditions, given that the perturbations related to side-reactions are more significant than in larger VRFB.Hence, the results obtained in this section cover, in adverse conditions, the problems that are commonly found in VRFB systems.

Case A: short term simulation
In this case, one charge/discharge cycle of the VRFB is simulated.The battery is firstly charged with a current of 25 A (138 mA/cm 2 ) and then discharged with a current of −25 A, being the duration of each half cycle equal to one hour.To test the algorithm under adverse conditions, it is assumed that the battery starts from a highly unbalanced situation, being the initial concentrations:  0 = [ 2 ,  3 ,  4 ,  5 ] = [0.25,0.82, 0.97, 0.36], and its corresponding  ,0 equal to 0.24.Note that the value of  0 is unknown for the observer, i.e., its initial estimations are considerably far from the real ones.Regarding the implementation of the observer, it is firstly necessary to tune its parameters.Following the considerations presented in Section 4, together with a thorough analysis and exhaustive simulation tests, it has been found that the values presented in Table 3 result in a good performance of the estimation methodology.
An example of the empirical procedure followed for tuning the observer parameters is illustrated through the selection of .In Fig. 5, the estimation of the VRFB concentrations for three possible values of  are compared.
In Fig. 5(a), the high value of  ( = 4) ensures an excellent noise rejection capacity of the estimation algorithm, at the expense of a lengthy convergence time.On the contrary, in Fig. 5(c) ( = 0.25), the observer converges very fast, but the noise sensitivity seriously aggravates.In turn, Fig. 5(b) ( = 1.1) shows the results with the value of  that was ultimately selected, exhibiting a good trade-off between the previous two extreme cases.Note that the maximum estimation error is found in  2 and  5 , at the end of the charge half-cycle.For the selected case,  = 1.1, the relative error bound is 2% with a mean of 0.51%, which is a highly satisfactory result.
It is possible to appreciate in Fig. 5 that, once the estimation algorithm starts, a certain lapse must be awaited until the convergence is attained.This is particularly noticeable in the first half cycle since, in principle, no information regarding the real concentrations or  is available, i.e., the estimates initial conditions could be very far from the real ones.For the rest of the cycles, this transient effect is significantly mitigated or eliminated.
Another aspect that is worth to be further clarified is the way in which the selector works.In this sense, a simulation was generated to test the inverter/selector under highly exigent conditions.This is obtained by combining a poorly tuned HGO ( = 0.25), as in the case displayed in Fig. 5(c), with a high measurement noise.As a result, the estimates generated by the inverter may shift from one solution to the another under the presence of severe noise or sensor outliers.For instance, Fig. 6(a) displays the estimation of  2 generated by the inverter, where the local estimation ĉ2 ''jumps'' from  2 to  5 .However, even in this unfavourable scenario, the selection algorithm is able to deal properly with this situation, allowing to distinguish between the final estimations ĉ * 2 and ĉ5 * correctly, as can be appreciated in Fig. 6(b).
To conclude Case A, the SoC n and SoC p , computed from the concentration estimates of Fig. 5(b), are presented in Fig. 7.It is possible to note that the error in the estimation is attenuated with respect to the concentration error, remaining below 1.1% throughout the complete cycle (excluding the initial convergence transient).As a final remark, it can be noticed that SoC n and SoC p cross each other in both charge and discharge half-cycles.This is because, as a consequence of imbalance, the negative side is operating with a more diluted electrolyte.Then, this electrolyte will be the first in reaching the maximum and minimum practical operation SoC (typically around 20 and 80%, respectively), hence being the limiting side of the system.It should be remarked that, even though the observer has no information of this side reaction on its model, the estimation of the observer is still able to correctly track the battery SoC.This exemplifies the robustness of the algorithm in front of unmodelled dynamics.

Case B: long term simulation
In this case, two weeks of VRFB operation are simulated to asses the capacity of the algorithm to track possible stoichiometric and faradaic imbalances and compute its SoH.The battery starts from the condition presented in Case A, and is subjected to successive charge/discharge cycles.To better appreciate the difference between the effects of diffusion and oxidation, it is firstly assumed that the former is the only one present during the first week of operation.During the second week, the oxidation is also activated in the simulated VRFB, which may correspond to a pernicious event, such as an incorrect sealing of the negative electrolyte tank.
Fig. 8 shows the evolution of the estimated SoH m and SoH c , computed by evaluating Eqs. ( 15) and (17) in the estimated concentrations.It is firstly possible to note that, in accordance with the described situation, the battery starts with a SoH lesser than 1, corresponding to the initial imbalance, which further deteriorates during the considered period.In particular, SoH m starts from a value of 0.89 and gradually decreases to reach a value of 0.85.As for SoH c , it remains constant in 0.8 during the first half of the period and then rapidly deteriorates until 0.72 at the end of the second week.
In Fig. 8, it can be appreciated that the estimations provided by the observer are very close the real values and permit to satisfactorily track the SoH degradation, with an error bound below 1.2% throughout the entire interval.Since it is normally unnecessary to have an updated estimation of the SoH in a timescale of seconds or minutes, the estimations presented in Fig. 8 correspond to filtered versions of the SoH computed with Eqs. ( 15) and (17).The filtering prevents possible deviations that may appear under noise peaks when the instantaneous estimated concentration are used; hence attaining a greater degree of robustness and accuracy.Again, it should be mentioned that the proposed observer does not have any information of the side reactions that are occurring in the battery.Nonetheless, it can be seen that accurate estimation is still achieved even if multiple side reactions occur at different time-intervals.
To demonstrate the importance of estimating the SoH through the proposed methodology, two specific inferences regarding this case can be drawn.First of all, the detection of a slope change in SoH c can be taken as an indication that an unwanted event occurred in the battery.Specifically, this event would be causing an accelerated oxidation of the vanadium species.As a consequence, this could lead to a revision that would allow to promptly fix the problem before it progresses and becomes more serious.Furthermore, it would be recommended that the first aspects to be checked are possible air leaks in the negative tank leaks or signs of overloading causing hydrogen evolution.Instead, if the change in the slope had occurred in SoH m , it would be advisable to look for possible defects in the exchange membrane or hydraulic connections that lead to an accelerated passage of vanadium ions from one electrolyte to the other.
Secondly, it is possible to recognise that, towards the end of the period under study, the SoH c is significantly lower than the SoH m .Therefore, it can be inferred that a remix strategy would be clearly insufficient to achieve a good recovery of the battery capacity.Since oxidation is the predominant cause of the imbalance, it would be essential to carry out a chemical/electrochemical rebalancing procedure to restore the electrolyte.

Conclusions
This paper presented a novel estimation methodology capable to obtain online the concentrations of the four vanadium species existing in a vanadium redox flow battery.In contrast to previous works in the field, the proposed algorithm deals with not necessarily balanced electrolytes with a reduced number of sensors.Specifically, it only relies on voltage and current measurements, avoiding the necessity of including additional sensors that would increase the cost and complexity of the setup.Therefore, the practical implementation of the proposed strategy in a commercial system becomes more feasible and straightforward.
From the estimation point of view, the design of such observer architecture presented a complex challenge.This is because, as it has been formally demonstrated through an observability analysis, four different trajectories in the concentrations can generate the same output  voltage.However, in this paper it has also been proved that a relationship between these candidates can be established and, consequently, a systematic procedure has been developed to select the correct one.In this context, the designed observer, based on a high-gain observer coupled with a dynamic inverter and a static selector, guarantees the convergence of the estimated concentrations to the real ones.
Through comprehensive computer simulation, the performance of the observer has been assessed and validated.It has been found that, after a short convergence transient, the accuracy of the concentration estimation remains very high, with a relative error bound up to 2% and a mean of 0.51%.It should be noted that the oxidation and crossover were considered in the simulation tests for being two of the most typical imbalance causes.However, it is worth mentioning that, for the observer, these phenomena are disturbances whose specific nature is not explicitly taken into account.In other words, the observer does not require the values of the crossover and oxidation parameters in order to work properly.Therefore, it is inferred that it will also be robust to other causes of imbalance that have a similar effect, such as hydrogen evolution at the negative electrode.
The values of the vanadium concentrations have been used to obtain the individual SoC of both electrolytes that comprise a VRFB.Furthermore, two indicators of the battery state of health, have been defined and computed.The first one, SoH m , is associated to the stoichiometric imbalances originated by crossover, which can be reverted by electrolytes remix.The second one, SoH c , accounts for oxidative processes that can only be restored through more complex electrochemical or chemical methods.It was shown that the accuracy in the estimation of these indicators is very high, even in the presence of measurement noise and perturbations.Specifically, the relative error bound is attenuated with respect to the concentration's error, remaining below 1.1% and 1.2% for SoC and SoH estimations, respectively.The capacity of tracking these indicators results extremely valuable for monitoring the battery status and promptly detect possible malfunctions.Therefore, it can be concluded that this knowledge would permit to take the right decisions to correct these problems and attain an optimal battery performance.
The encouraging results obtained in this paper open the door to new research lines.In particular, the authors are currently developing advanced control setups which, based on the information provided by the observer, will allow to optimise the efficiency and minimise the degradation of VRFB systems.In addition, it is also planned to further investigate the effects of noise, exploring novel noise-rejection methods, aiming to enhance the noise immunity of the proposal.

Fig. 2 .
Fig. 2. Schematic representation of an observable system (a): each trajectory in  generates a different output; and a non-observable system (b): at least two different trajectories in  generate the same output.

T
.Puleston et al.

Fig. 4 .
Fig. 4. Representation in the state space of the selection process stages.

Fig. 6 .
Fig. 6.Estimation of  2 under high noise conditions.(a) Estimation provided by the inverter, before the selection stage.(b) Estimation of  2 and  5 after the selection stage.

Table 1
Concentration candidates list.