Adaptive Microfluidic Modeling of a Membraneless Micro Redox Flow Battery Using Extended Kalman Filter

Membraneless micro redox flow batteries are a promising technology that can improve traditional redox flow batteries performance. However, a precise modeling and control of the microfluidic dynamics is a complex task for which only open loop control strategies can be found in the literature. In this work, a strategy for the adaptive modeling of the microfluidic dynamics of a membraneless micro redox flow battery is presented. The model is based on proposed equations whose constant parameters are identified using grey-box modeling techniques. Intrinsic limitations of applying these equations to the real system (stochasticity of the microfluidic system, non-considered variables, non-linearities) are overcome by adapting the model through the addition of correction factors calculated in real time. In the proposed use case, an extended Kalman filter is used to estimate the factors. Also, the model with real-time adaption is proven to be suitable for control design using a model-based control technique such as incremental state optimal control. The modeling and the controller adequacy are validated in simulation and real experiments. Model adequacy to real system is demonstrated through fitness measurements of the deviation from it, which show prominent values under various conditions. It also allows a model-based control design that improves microfluidic response, with zero steady state error and fast and non-overshooting action, which is expected to result in higher battery efficiency and reactant conversion ratio.


I. INTRODUCTION
Redox Flow Batteries (RFB) are a technology that has been available for the last decades [1], [2], and which has experienced a recent growth due to its suitability to be used with renewable intermittent energy sources such as photovoltaic solar or wind.This technology offers a long cycle life and low degradation, providing an energy storage structure with power decoupled from energy [3], [4].It is estimated that the total installed capacity of RFB is 1100 MWh by 2021 [5] and it is expected to grow together with energy demand because The associate editor coordinating the review of this manuscript and approving it for publication was Halil Ersin Soken .
of the role of energy storage in grid stabilization, power availability, and reliability [6].
The progress in microfabrication and microfluidics fields has allowed to prototype redox reaction cells for liquid electrolytes at the microscale [7], [8], such as in [9], [10], [11], [12], and [13].Microfluidics offers prospects to raise the efficiency and rate of electrochemical energy conversion through enhanced mass transport and flexible cell design [8].They also remove the separation membrane to reduce costs and to optimize the battery performance as they decrease internal electrical resistance.This lack of membrane is possible because the flow rates of the two electrolytes preserve a laminar regime and make contact in a controlled interphase, so that the advective mixing of the two species is minimized [14], [15].
Previous works on micro redox cells use syringe pumps in an open control loop, where syringe plunger displacement speed is fixed for the calculated desired flow.This is the only flow pumping control, introducing pulsations and flow errors that increase reactant crossover and self-discharge.These systems do not define a dynamic flow model of the aggregate cell and microfluidic system, they only fix the flow at the inlets of the cell, considering that cell manufacturing does not introduce much disturbance [16], and not considering variations in the fluid properties during operation.Most of them do not recirculate the electrolytes to the tanks either, only a few examples [12] and [13], use syringe pumps at the outlets withdrawing at a fixed open loop speed for collecting electrolytes for later runs [17].This approach cannot guarantee the optimal position of the interphase between electrolytes, causing more reactant crossover and higher self-discharge.This has limited the practical use of this technology, as leads to lower columbic efficiencies (<40%) and lower reactant conversion (<20%) [7].These losses have been minimized partially by changing cell designs [18], [19] but not by improving flow control or using more suitable pumping systems.All described complexities cause that charge-discharge operation with electrolyte recirculation has not been demonstrated to date [7].Beyond these problems of lack of feedback and control for the interphase position, limited recirculation and lower efficiencies, it is true that the referenced works benefit from the simplicity of setup and operation of an open-loop setup with syringe pumps.
In [20] a model for microfluidic cells with flow-through porous is presented, but although briefly describing flow distribution inside the cell due to electrodes porosity, it focuses on electrochemical design simulation.In [21] reinforcement learning algorithms are applied to two co-flowing laminar streams at the inlets of a simple general microchannel with computer vision feedback.The first attempt for microfluidic reactors of fluidic modelling has been done in [22], where the influence of the fluid dynamics configuration on the proposed equivalent electrical model has been studied.This work demonstrated the importance of fluidic control for a good electrochemical performance, but it does not tackle the dynamic fluidic modelling and control itself.However, for conventional redox flow batteries the flow rate influence has been modeled in several works, such as in [23] using a hybrid convolutional neural network.Also, these models of regular RFB have been used for optimization techniques of the flow rate operation [24], and its control strategy design [25].
In this work, the dynamic microfluidic model is tackled, so that system response is known and interphase in the cell can be guaranteed by precisely controlling flow rates at the inlets and outlets of the cell.Consequently, self-discharge and electrolytes crossover are minimized, improving efficiency and making recirculation possible, as the model from [22] studying fluid dynamics influence on electrochemical response indicates.The dynamic fluidic model reflects the microfluidic response of the flow rates to actions of the active elements of the system (pumps and valves) measured with sensors for feedback (flowmeters), and it is used for designing the closed-loop control.The base for the numeric description of the model is theoretical fundamentals of microfluidics in conductions that have been largely discussed [26], [27], adapted with experimental knowledge of the system behavior as an elaboration of a network of microfluidic channels [28].These relations are written in heuristic equations.The parameters of the equations are identified using classical grey-box modeling methods [29].Particularly, regression using Gauss-Newton algorithm has been widely applied and used for nonlinear regression [30], [31].Other methodologies, such as genetic algorithms and neuronal networks have also been used for these tasks and have been specifically used for the identification of the parameters of conventional RFB [32].
The proposed model is extended with some correction factors that are adjusted in real time to deal with stochasticity and changes in system properties.This is an inherent problem of microfluidic systems because of bubbles or variable wettability [21], [33], that is more evident in this system due to variability in actuators response and electrolyte properties.The Extended Kalman Filter (EKF) is a well-known algorithm for parameter estimation in nonlinear systems [34], and in this work it is applied for the estimation of these factors.It has been widely used for model parameters estimation in a variety of applications, from tumor growth modeling [35] to lithium-ion batteries surface temperature estimation [36] or electrical circuit models of vanadium RFB [37].Hance, it is a proven option for real time adaption of the correction factors, and EKF is used novelly for this micro membraneless batteries and this dimension of microfluidic dynamics.A derivative free alternative as the Unscented Kalman Filter has also been extensively used [38], which allows to avoid Jacobian matrix calculation at the cost of losing computational efficiency and stability [39].
Linearized models can be used in several control design techniques.The most common design is the Linear Quadratic Regulator (LQR), that does not guarantee zero steady-state error in real applications with disturbances or modeling errors [40], [41], [42].Optimal control based on incremental state model is one of the existing control strategies that cancels this steady-state error.Incremental state control uses function cost optimization as LQR, but it modifies and augments the state-space system matrices.Applying the calculated feedback gains to this control structure is similar to introducing an integral action [43], [44].
The main contributions of this work are presenting for the first time a microfluidic dynamic model for micro membraneless redox flow batteries, for a system able to recirculate electrolytes, proposing dynamic equations that describe general behavior of the micro-fluid dynamics and identifying the specific parameters for the systems using grey-box 100208 VOLUME 11, 2023 Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
techniques.It also proposes correction factors to be added to the proposed general equations to correct the system model due to microfluidic stochasticity and a methodology for real time adaptation of the correction factors.This model is validated experimentally, and it is demonstrated that the model can be used for system closed loop control, with the proposed incremental state optimal control.This paper is organized as follows.Section II details membraneless micro redox flow batteries, and the cell and complete system of the battery used in this work.Section III introduces the methodology for obtaining the microfluidic model, from the proposed equations and the grey-box model identification of parameters, to how correction factors are added.Section IV explains how the model is used in this use case, with the EKF algorithm for the correction factors estimation and regulation with the incremental state-space optimal control.Results of model identification, real-time estimation of the factors for correction and control applied to the simulation model and to the real system are discussed in Section V. Finally, conclusions are detailed in Section VI.

II. MEMBRANELESS MICRO REDOX FLOW BATTERIES
The typical structure of a RFB consists of two liquid electrolytes (vanadium is the most common active species [4]) contained in two independent tanks.These electrolytes are pumped through a fluidic system into the electrochemical reactor that consists of several cells separated in two halves, each one receiving one of the electrolytes and each one with one electrode.Cells are separated by an ion-exchange membrane, that maintains electrolytes physically separated but ionically connected.After reacting, electrolytes are pumped back into their respective tanks, storing chemical energy.The amount of energy stored is proportional to the tank capacity, and the power is proportional to the electrode active area, the number of cells in each reactor, and the number of reactors [7].Therefore, power is decoupled from energy.Also, they offer long cycle life and low degradation.This makes them suitable for intermittent operation energy storage applications, even when they have lower power and energy densities than other technologies such as Li-Ion batteries.A deeper analysis and evaluation of the status and perspective of RFB technology, components, designs, integration, performance and cost is offered in the review referenced in [7].
Micro redox flow cells are a more recent concept that uses progress in microfluidics and microfabrication to develop a cost-effective and rapid fabrication solution [10].These designs can eliminate the separation membrane by working on a controlled laminar regime of the two colliding electrolytes within the cell.The separation membrane, aside from introducing resistive losses, can represent 20-40% of the total cost of a 300kWh RFB [16].These batteries can be scaled-up putting together multiple cells in a stack, but their targeted applications are of less power than conventional ones, as when number of cells increase distribution of reactants among the stacked cell becomes challenging [8].However, they increase surface-to-volume  ratio because of miniaturization and have on-chip integration capability [12].
In this work, the reactor consists of a single micro cell for redox reactions that charge/discharge the electrolytes, based on the one proposed in [17].The system architecture of the full battery is shown in Fig. 1.
The system architecture includes the active elements to pump and regulate the electrolytes, aside from the reactor cell, which is also schematically represented in Fig. 2.
Pumps are located at the inlets of the cell, pumping each of the electrolytes from its respective tank in a regulated flow rate.Pumps are based on micro piezoelectric actuators that deflect a membrane in two chambers and create a differential pressure that impulses the liquid.Using these pumps, instead of syringe ones as in the state of the art, introduces complexity in their control, but provides flexibility to adapt pumping actions faster, and reduces pulsation.Nevertheless, to fully control the cell interphase and maximize battery efficiency, the flows at the outlets also need to be controlled, so one valve is placed in each of them to regulate the pressure drop.The valves consist of a membrane in contact with the liquid channel that deflects when an air pressure is applied at the other side of the membrane.This air pressure is regulated by varying the power of a micro air compressor.The flows (Q 1 to Q 4 ) are measured with microfluidic flowmeters in each of the inlets and outlets.The full system setup and reaction cell are shown in Fig. 3.

III. PROPOSED ADAPTIVE MODEL
The model needs system variables to be selected.The inputs are defined as the voltages of the pumps and the differential voltage of the valves, and the outputs as the inlets flows and the difference between the outlet flows, as shown in (1).The reason for defining the system variables as differences is trivial for the output: the input flows must be the same as the output ones, then knowing only three of them the fourth is also known.The reason for choosing the third input as the differential voltage of the valves is to introduce an additional constraint: at least one of the valves must be always completely opened.This constraint makes the system compatible determinate (3 variables and 3 equations).The solution of the system also becomes the one that requires least actuator power, as the valves generate the minimum additional pressure drop.
The system has some intrinsic problems that make its operation complex, as is common in stable flow microfluidic applications [21], [33].Bubbles or variable wettability in the surfaces and in the internal porous media of the cell modify the pressure drop across the fluidic channels.Furthermore, micro actuators do not have a repeatable response, for example, pumps do not impulse always the same flow at the same operation conditions (applied voltage) and ambient conditions (same electrolyte, room temperature and humidity, etc.).The reason for this is that they have internal passive valves in the chambers that fluctuate their micro internal position and response.Besides, the valves membranes have strong inertias and deflection hysteresis.Together with these stochastic conditions, the dynamics also present a nonlinear behavior.Finally, external conditions of the system can change the dynamic response of the actuators and the liquids, mainly the change in temperature or the state of charge of the electrolytes.

A. PROPOSED DYNAMIC EQUATIONS
In order to describe the behavior of the dynamic of the fluids within the system three discrete equations are proposed.These discrete equations are based on theoretical analysis of microfluidics dynamics principles.These expressions are consistent with momentum and mass conservation principles as stated in continuity and Navier-Stokes equations [26], [27].In microfluidics, the gravitational force terms are neglected, so for incompressible and isothermal fluids, the momentum equations are reduced to Stokes equation [8].The proposed expressions consider the relation between flow, viscosity inertia, pressure drop in the conduction and external pumping work for incompressible viscous fluids in laminar regime, without considering changes in density or temperature.The system is composed with a set of microfluidic ducts, so the influence of each on the others is related with heuristics and based on experimental observations.Dynamic equations are proposed simplifying the relations: The equations shown in (2) represent the discrete evolution of the three variables defined as outputs of the system.The defined parameters in the equations are described in Table 1.
The equations that describe the flow at the inlets (Q 1 and Q 2 ) are symmetrical, and depend on the terms: 1) Inertia of the fluid at the same inlet, which is represented by Q i (k)a i , where the flow at instant k+1 is proportional to the flow at the previous instant k in the same inlet multiplied by the inertia factor a i , that must be positive and less than 1 as friction slows down flow (ratio between viscous force and inertia).2) Pump action at the same inlet, represented by where flow at k+1 is proportional to pump voltage at instant k multiplied by gain factor k Vi , that must be positive as pump action tends to increase flow.the flow decrease at instant k+1 is proportional to the absolute value of input 3 (difference in the power of the valves) at instant k multiplied by a gain factor k P3 .The valve action being a negative absolute value is because moving away from zero (both valves fully opened) will increase pressure drop, and inlet flows will be reduced.k P3 must have a positive value to be consistent with this.5) Constant pressure drop of the cell inlet, represented by −c Pi , where flow is decreased by a constant factor.This term must be positive, and it is not valid when flow is close to zero, as it represents a constant pressure drop at higher flows (the typical working range for the cell).
The equation for output 3 (Q 3 − Q 4 ) has the terms: 1) Inertia of the fluids at the outlets, represented by , where the difference in outlet flows at instant k+1 is proportional to the difference at previous instant k multiplied by the inertia factor a 3 .This factor must have a value around 1, as the difference in flows at the outlets tend to stay similar when no other term interacts.2) Valves action, represented by U 3 (k) k V 3 , where flow at instant k+1 is proportional to pump voltage at instant k multiplied by gain factor k V 3 .This gain parameter must be negative as valve action in one inlet tends to decrease flow at this inlet by closing and narrowing fluid conduit, and therefore increase it at the other outlet.3) Inlet to outlet inertia, (Q , where difference of outlet flows at instant k+1 is proportional to flow difference at the inlets at the previous instant k multiplied by the inertia factor c Q3 .The cell structure favors that the negative electrolyte at the inlet tends to flow through the negative outlet, and the same for the positive side.Consequently, c Q3 value should be positive.4) Constant pressure drop difference at cell outlets, represented by c P3 , where the difference in flow is modified by a constant factor.This term can have any value, as it represents tendency to flow preferably by one of the outlets due to the constant difference in the pressure drop.It is not valid when the flow in the inlets is close to zero, as at this point the difference would also be zero.

B. GREY BOX MODEL IDENTIFICATION
The parameters for the dynamic equations are first identified using nonlinear grey-box model identification, using the Adaptive subspace Gauss-Newton search included in the identification toolbox of MATLAB.This regression algorithm is further explained in [30].The nonlinearity in the equations is raised by the absolute value term, as indicated previously in ( 2).The identified model is expected to have good similarity with the same data used for identification, but to have differences when ambient conditions change the system response, as stochasticity becomes evident, and the model would become imprecise.Nevertheless, it should maintain dynamic coherence, as the aim of this grey-box parameter identification is to have a generalization of the response that can be proven to have consistency.This behavior is shown in the results of Section V.

C. FACTORS FOR MODEL CORRECTION
To solve problems of generalization of the model for all experiments, three correction factors for the actuators (f 1 , f 2 , and f 3 ) are introduced modifying previous parameters.
These factors aim to solve the variability in the response of actuators, whether caused by stochasticity or external conditions, and to compensate for nonlinearities in the system.

D. STATE-SPACE REPRESENTATION
The system model is described as a state-space system based on dynamic equations described in (1) and ( 4) with the correction factors that will be adjusted in real time.The states are selected to be the same as the outputs shown in (1).Due to the nonlinear nature of the equations, the system is described as two linear state spaces, each one describing half of the working space, which are continuous for the case where the action of the valves is equal to zero. 100211 Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
The state space representation described in ( 5) is used for the design of the control structure presented in Section IV-B, together with the correction factors values updated in real time as explained in Section IV-A.

IV. USE CASE
The modeling methodology described in Section III is now implemented with the Extended Kalman Filter chosen for real-time factor correction estimation, and incremental state-space optimal control for the model-based regulator design.indicates the volumes of the system, and the subscripts indicate whether the volume is measured at the inlet or outlet, and the numbers whether they belong to the negative or positive side (1 and 2 respectively).

A. EKF FOR FACTOR CORRECTION ESTIMATION
The correction factors for the actuators in the model are calculated in real time to have an estimation of the system response that can be used for controller gains adjustment.
The chosen algorithm for this task is the EKF that recursively approximates the nonlinear set of equations by applying linearized equations in every iteration.It is chosen because it generally works well with non-linear systems, with less computational cost than other more complex algorithms such as the Unscented Kalman filter, and it is an iterative method that considers a measurement, model and initial estimation variances, with no need to store all previous states.The state of the filter, X (k), is defined as the set of the correction factors, f i (k), and the process variables defining its evolution are the values of the actuators and the previous values of the flows.
The measurement vector, Z (k), is built with the measurement of the flows from the sensors in the current instant: It is considered that the best estimation of state evolution, expressed in function f , is that factors have the same value plus unknown random process noise w.Estimated variables are noted with superscripted symbol '' − ''.Symbol '' ˆ'' notes internal auxiliar variables of the filter algorithm.
For the h function defining measures estimation, equations of the system from ( 4) are used, since the prediction of the measure is that it will follow the proposed model dynamics plus the measurement noise v.
Jacobian matrices of partial derivatives are calculated as: Then, the steps of the algorithm are detailed.First, the prediction step, where P − (k) is an a priori estimation of the covariance of the error between estimated and real state vectors, P (k − 1) is the a posteriori estimation of the covariance of the error between estimated and real state vectors from previous instant k−1, and Q(k−1) is the covariance matrix of process noise w.The equations are: After obtaining the value of the state in instant k, predicted from the values in k−1, the correction step is made.In this step, the calculated gain K (k) is applied to the estimation from the prediction step to correct the state and R(k) is the covariance matrix of the measurement noise v.The corrected state, that is the output of the filter, is calculated in this step: The final step of the filter is updating the values for the next iteration, where values of instant k become k−1.Values for 100212 VOLUME 11, 2023 Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.

B. CONTROLLER DESIGN
The variables to be controlled are the inlet and outlet flows to optimize the electrochemical cell operation.This proper operation should guarantee that the interphase of the electrolytes is centered, and enough active species of the liquid are in the cell for the electric current demand at the instantaneous state of charge.Considering this, all cell flows are externally calculated and given to the controller as reference setpoints.
The controller is expressed in discrete form, with a sample time T s of 0.2 s.The control strategy is an incremental state optimal control, that uses the state space linear implementations from Section III-D.The state is expressed in an incremental form as presented in [43], for adding an integral action that removes the steady-state error together with the dynamic response of an LQR optimal control [44].The controller scheme is shown in Fig. 4.
The general expressions of the converted state space are: The control action is defined also as an incremental function and control gain separated into two partial matrices: where Y r and X r are reference output and reference state (which increment part is zero).The feedback gain is calculated with new state matrices that, as in ( 22), now are expressed as: The optimal control for this new dynamic model is calculated to solve with the well-known LQR process, that minimizes the cost function defined in (23), where Q and R matrices are defined to weight error versus action in the cost.
Then, the control action K is a gain calculated using P, that is the solution to discrete algebraic Riccati equation: The optimal control gain is calculated using the augmented matrices described in (21) applied to state-space defined in Section III-D.Since the state-space representation is adaptive and changes in real time with the EKF estimation of the correction factors, the solution of the Riccati equation must be found at every instant.Consequently, the best approach is to have an iterative process that converges to the solution.The iterative equations described in [34] are: Cost matrices Q and R are adjusted by trial and error in simulation and real experiments.For iterative calculation, state-space system matrices are updated in real time with the value of the correction factors from the EKF and checking the sign of U 3 .

V. RESULTS AND DISCUSSION
In this Section, the results from the grey-box model identification of the proposed equations are shown for different experimental data, it is discussed the contribution of the correction factors, the real-time estimation of the factors using the EKF is validated, and the incremental control response is shown in both simulation and real experiments.

A. MODEL IDENTIFICATION RESULTS
The results from applying grey-box model identification explained in Section III-B are shown in Fig. 5.This figure shows the response of the equations proposed in (2) (without the correction factors) for the parameter values obtained (shown in Table 2 ), compared to the same data used for the identification (with 0,2 s sample time) and to data from a different experiment.It must be noted that the values in Table 2 are coherent with their definition as referred in Section III-A.
The fitness of the models indicated in Fig. 5 and subsequent experiments is calculated using the expression: The identified model shows good similarity to the data used for identification, as expected.Also, as shown in the second experiment, when the conditions change the model is more imprecise due to stochasticity (change in actuators, wettability, or air bubbles).There is dynamic coherence between experiments, therefore the aim of this grey-box model identification to have a generalization of the response is proven, and the need of a model adaptation can be concluded.Factor correction results are also studied.A broad approach for proving this correction suitability is made by identifying the value of the factors in a new grey-box identification regression for the equations presented in (4), using for the rest of the parameters the values from Table 1 previously obtained.Then, the response is compared with experimental data (data from the second experiment of Fig. 5 is used).This is shown in Fig. 6.
Values of the factors for the example of the figure are: f 1 = 1.0216, f 2 = 1.0364, and f 3 = 1.1471.It is demonstrated that using a correction in the actuator factors can help to obtain a more accurate model of the system.These factors are close to 1 (their initial value), which indicates that small changes in actuators conditions modify notably the system response.

B. REAL TIME CORRECTION RESULTS
The validation of the real-time estimation strategy is performed through two tests.First, real data is used for    The responses are represented in Fig. 7, and it is demonstrated how real-time correction with EKF achieves a very precise modeling of the response.
For the second test, a simulation model is built with equations from (4), with factor values changing in real time with white noise added.The model is excited with a sequence of inputs similar to the sequences obtained from real data, and the EKF estimation is applied.The random evolution of the factors values is compared with the estimated values from the EKF.The result, shown in Fig. 8, shows that the estimated values match the evolution of the factors fed to the model.

C. CONTROLLER RESULTS
The response of the controller is first simulated using the equations from (4) as the system model.The correction factors are considered in those equations as inputs with cumulative white noise added to the value to simulate stochasticity and other nonlinearities.The setpoint references of the desired flows are changed in steps simultaneously in the three flows to check the dynamic response, as shown in Fig. 9.
The optimal control with incremental state has a smooth and fast response.It has practically no overshoot and zero steady-state error.It also has a fast response for Q 1 and Q 2 (less than 5 s), and for Q 3 − Q 4 less than 10 s.Cost matrices values are Q = I and R = I •100, the same values that are used in real experiments.
The experimental setup, presented in Fig. 2, has all the fluidic system, the electrochemical cell, pumps, valves, flow sensors, and electronic drivers, connected to the computer that runs the control algorithms and logs data.The results using the same setpoint steps as in the simulation are also shown in Fig. 9.
The control has a good response in real experiments, and very similar to the simulation.It has no overshoot and zero steady-state error.For Q 1 and Q 2 it has a fast and stable response (around 5 s settling time), and for Q 3 − Q 4 it is slightly slower than in simulation, 15 s, but still acceptable.This slower response can be attributed to the also slower estimation of the correction factor f 3 (as shown in Fig. 7) which mainly influences this third output, as indicated by the equations presented in (4).

VI. CONCLUSION
In this paper a model for the microfluidic dynamics of a redox flow micro battery is presented.It is based on proposed dynamic equations for the system configuration and instrumentation (pumps, valves, and flowmeters) that allow the control of the interphase of the electrolytes.The model is further refined with correction factors that can be estimated in real time to adapt the model response to the system stochasticity.In this work an extended Kalman filter algorithm is proposed for estimating those factors.The modeling methodology and real implementation are validated with simulations and real experiments.
The model is also demonstrated to be valid for control design.For the first time for a micro fluidic membraneless redox flow battery a real closed-loop control is implemented based on the obtained model.The control strategy using optimal control with incremental state is designed for this specific system, and it is validated both in simulation and experimentally.This is demonstrated to be a valid control for the requirements of a micro redox flow battery, maintaining electrolytes interphase in their optimal positioning and minimizing the mixing losses.
As future work, it is proposed to refine the proposed equations with more complex relations, and to analyze the effect of adding more parameters to the filter estimation.Besides, different controllers can also be designed to deal with stochasticity and nonlinearities and their performance can be compared to the one proposed in this work.

FIGURE 1 .
FIGURE 1. System scheme, with reaction cell, tanks, pumps connected to the inlets of the cell, valves at the outlets, and flowmeters and arrows indicating the negative and positive electrolyte flows (Q 1 to Q 4 ).

FIGURE 2 .
FIGURE 2. Reaction cell schemes with electrolytes interphase (diffusion is not represented).(Left) Optimal position of the interphase.(Right) Malfunction with bad position of the interphase and electrolytes mixing.

FIGURE 3 .
FIGURE 3. Detail of the electrochemical cell and full experimental setup.
instant k+1 is proportional to voltage of the pump at the other inlet at instant k multiplied by a gain factor k Pj , that must be positive as this pump action tends to decrease flow.4) Pressure drop from valves action, − |U 3 (k)| k P3 , where

FIGURE 4 .
FIGURE 4. Control scheme with incremental state space, with control gain values coming from the iterative calculation applied to the EKF estimated model.

FIGURE 5 .
FIGURE 5. (Up) System output for model with grey box identified parameters compared to real experimental data for the same experiment as used for identification.(Down) Comparison with real data for a different experiment.Fitness measurement is indicated for each dataset.

FIGURE 6 .
FIGURE 6. Experimental data compared with models with and without factor correction calculated in an offline regression.Fitness measurement is indicated for each dataset.

FIGURE 7 .
FIGURE 7. Comparison of real data system response with the model with online EKF factor correction and the model without factor correction. Fitness measurement is indicated for each dataset.

FIGURE 8 .
FIGURE 8. Random factor values fed to the simulated model of the system and EKF online estimation of these values.Estimated values are adjusted precisely to random changes in the factors fed to the model.

FIGURE 9 .
FIGURE 9. (Up) Simulation results of applying the designed control to the simulated system with step changes in all three flow references.(Down) Experiment results of applying the designed control to the real system with step changes in all three flow references.

TABLE 1 .
Parameters of proposed equations.

TABLE 2 .
Values of parameters of proposed equations.