Port-Hamiltonian Modeling and Control of a Micro-Channel Experimental Plant

We present a port-Hamiltonian system (PHS) model based on the interconnection between basic hydraulic elements equivalent to electrical components such as capacitors, inductors, and resistors to represent the dynamics of a water micro-channel experimental plant. We compare the fluid-structured interconnected PHS model with the data obtained from a micro-channel experimental plant. We then implement a controller using the total hydraulic-mechanical energy as a local Lyapunov function. Finally, we apply an integral action controller (IAC) to correct for modeling errors and load disturbances. The IAC is easy to design given the proposed interconnected model.


I. INTRODUCTION
Dinamycal systems can be defined as energy storing and transforming elements. This is particularly convenient for describing complex nonlinear systems, since they can be considered the interconnection of subsystems with a basic configuration. Models based on ports, such as port-Hamiltonian systems (PHS) [1], allow definition of a unified framework for systems arising from different physical domains, since the dynamics of the systems are determined by the energy interchange between their possible multi-physical components. From a control perspective, the benefit of models whose structures have direct physical motivations is that the parameters have physical meaning, and thus, the synthesis and tuning of model-based controllers can be related with physical considerations [2].
An important characteristic of PHS is the principle of modularity of their components, with an emphasis on the physical structure and the interconnections between said components. PHS are defined in terms of two geometric structures: a power conserving interconnection and an energy dissipation structure [1]. The Hamiltonian behind the PHS can then be used as The associate editor coordinating the review of this manuscript and approving it for publication was Engang Tian . a candidate Lyapunov function to study closed-loop stability. Such a feature is very appealing since candidate Lyapunov functions can be difficult to find and/or very complex: see for example [3], [4], and [5]. In [6] a control interpretation from a mathematical model obtained from physics principles led to the presentation of a framework based on a triptych, with behavioral equations and latent variables as side panels and the behavior of a dynamical system in the center panel. The objective is to regulate the steady state system behavior by shaping the energy of the system. The controller itself can be considered a dynamical system, which is interconnected to the plant process to change its behavior. The objective is then to find a dynamical system (controller) that can change the total energy function to a desired form (energy shaping). This technique is a fundamental part of the passivity based control (PBC) approach, which is used, for example, to design manipulator robot controllers in [7], and to solve classes of Euler Lagrange systems in [8]. A passive system with a desired storage function can be found in [9].
Recent research related to PHS and PBC covers different applications. In [10], a DC-DC boost converter with constant power loads is modeled as a PHS and then controlled with an adaptive interconnection damping assignment passivity based control (IDA-PBC). To control the acceleration of a mobile VOLUME 8, 2020 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ inverted pendulum (MIP), a nonlinear controller based on IDA-PBC is developed in [11]. In [12], an input disturbed stochastic port Hamiltonian system (Id-SPHS) is stabilized by a PBC controller. The model considers state and input disturbances. In [13], an energy dissipating hybrid controller is proposed and applied to a plant with time continuous dynamics. Using IDA-PBC, the authors of [14] implement a high performance level control for a plant of three tanks interconnected in a cascade configuration. The proposed method can deal with the nonlinear dynamics of several interconnected tanks using mass balance physics principles. In [15], a vocal folds model is based on a vocal fluid-structure interaction compared to a mechanical massspring-damper structure equivalent. A port-Hamiltonian formulation is used to model moving containers considering two-dimensional equations under rigid body motions in [16], obtaining a mixed-port-Hamiltonian system, with finite and infinite-dimensional energy variables and ports.
The micro-channel process is physically characterized by simultaneous accumulation and transportation of water, which is normally modeled by a set of boundary controlled partial differential equations (PDEs), namely the Saint-Venant equations [17]. The control objective is to regulate the water level and/or the water velocity in the micro-channel by using the gate openings as control actions. Formally,the control design concerns the solution of PDEs, leading to the study of existence and decay of classical solutions of hyperbolic systems, using for instance a Riemann invariants approach [18], [19] or operator theory [20]. Alternatives to control design approaches based on models described by PDEs are early lumping approaches [21], in which the PDEs are spatially approximated by a set of ordinary differential equations (ODEs). The advantage of working with ODEs is that simpler control design techniques can be used although at the expense of possibly losing the physical interpretation of the model and the parameters. A structure preserving approximation, i.e., an approximation that preserves the physical properties of the distributed model of the micro-channel is proposed in [22], and later used in [23] to design a passivity based controller for the process. Recently, modeling by interconnection of basic energy storing elements of complex distributed physical systems has been reported to describe the fluid-structure interaction in tubes with time-varying geometries [24].
The first contribution of this work is the proposition of a lumped element model based on the interconnection of elemental energy storing elements. Transportation and accumulation of water are taken into account by pipe and tank elements, respectively, while the controlled gate opening is modeled by controlled fluid resistances. We do not consider here an explicit communication network for the proposed interconnection, which in turn could introduce the extra challenges of latency, power limitations or malicious attacks: see for example [25]. One of the benefits of the proposed interconnected model is that parameters have direct physical interpretations since they characterize the basic physical properties of the process. Moreover, the control model is obtained without approximating sets of PDEs, which makes the modeling approach quite simple and convenient for deriving a control model for the micro-channel. It is of special interest to remark that the control model presented in this work is, with minor differences, identical to the spatially discretized model presented in [22], where a structure-preserving approximation scheme of the PDEs is used.
The model is then used, in our second contribution, to synthesize a control law for a desired level, using the total hydraulic-mechanical energy as a local Lyapunov function in a section of the micro-channel experimental plant. The developed control law can also be interpreted as a stabilizing proportional controller, which is easy to design and offers a fast response. The proportional control presents steady state level error for real life applications due to modeling errors and disturbances. As a result, we then propose and implement a stabilizing integral action controller (IAC) to correct the steady state level error in our experimental setup. All theoretical results are experimentally verified showcasing how the PHS approach can be used as a first-principle approach, from modeling to control, simultaneously preserving a physical interpretation. The micro-channel experimental plant is located at the Systems Control Laboratory, Universidad de Concepción, Chile.
This paper is organized as follows. Section II shows the model results based on the interconnection of basic hydraulic elements. In Section III the control law is obtained using the total hydraulic-mechanical energy as a Lyapunov function and an IAC controller is designed. Section IV describes the experimental results, where the PHS model is adjusted and the control results are shown. Finally, conclusions are presented in Section V. A preliminary version of the interconnected PHS modeling has been previously communicated in [26]. The interconnected PHS experimental control results are presented here for the first time. The notation used in this paper is summarized in Table 1.

II. FLUID-STRUCTURED INTERCONNECTED PHS MODEL
In this section an interconnected lumped model is proposed based on elemental energy storing elements. Transportation and accumulation of water, which are the fundamental physical phenomena in the micro-channel, are taken into account, respectively, by pipe and tank elements while the controlled gate opening is modeled by controlled fluid resistances. One of the benefits of the proposed model is that parameters have direct physical interpretations, since they characterize the basic physical properties of the process. Moreover, the control model is obtained from the systematic interconnection of basic elementary subsystems, rather than by approximating sets of PDEs, which makes the modeling approach simple and convenient for deriving a control model for the microchannel. Another key feature of the proposed model is that the slope of the micro-channel is modeled by pressure drop  inputs, which makes the slope easy to handle even if it varies in space.

A. THEORETICAL MODEL APPROACH
In this subsection, we first expose the PHS modeling of a section of the micro-channel with a controllable fluid resistance. Then, we proceed to interconnect several of these sections in order to obtain the complete model of the channel. The spatial resolution of the final model depends on the number of subsections into which the micro-channel is divided. Each subsection is modeled as a PHS with elemental fluid elements: a tank with its associated fluid capacitance, a pipe with an inertance and a fluid resistance. The tank models water accumulation through a potential energy function, whilst the pipe models water transport through a kinetic energy function.
The PHS model representation of one such subsystem is where intensive and extensive variables are, respectively, the pressure p in the tank and the output flow q, and the volume V and the fluid momentum . The input flow q in and the external pressure p ext compose the system disturbance map. The pressure inside the tank and the output flow with the negative sign are part of the output vector. The control input signal u ∈ R represents the actuator. The state vector is , the Hamiltonian of the total system energy is , and the passive output is vector y ∈ R 2 . The potential energy stored in the tank is 1 2 where C f is the fluid capacitance. The stored energy in the ideal fluid inertance is 1 2 Iq 2 = 1 2 2 I and its partial derivative I = q, where I is the inertance. The total energy is the sum of the potential and the kinetic energies. All physical units are given in Table 1. In a first instance, we focus on two interconnecting subsystems, and we consider the micro-channel slope as a pressure drop. Specifically, we treat two types of subsystems, differentiated by the fluid resistance. The first subsystem has an uncontrollable fluid resistance as a parameter of the system. The second subsystem has a controllable fluid resistance (control input) that is the sluice gate representation.
In Figure 2, we represent the interconnection of two tanks and pipes with a slope. The PHS model that represents the VOLUME 8, 2020 interconnection of two groups of tanks and pipes is given by The output flow and the downstream pressure of the first subsystem interconnect both subsystems. The slope pressure drop is part of the disturbance vector. An intermediate flow appears in the output vector caused by the slope pressure drop presence in the disturbance vector. To interconnect several subsystems, the previous reasoning is applied to add N − 2 subsystems with uncontrollable fluid resistances. The entire micro-channel dynamics are then represented by the interconnection of several subsystems preserving the PHS structure. The proposed model considers N ∈ N number of tanks and pipes with slope: see Figure 3. All of the subsystems have uncontrollable fluid resistances, except for the last subsystem, where a controllable fluid resistance u is placed in the dissipation matrix diagonal The input flow in the first tank q in , the pressure differentials due to the slope pressure drops p and the external pressure at the last pipe p ext compose the interconnected system disturbance map. For more details about the derivation of the lumped PHS model, the reader is referred to [26].
In [22], a structure-preserving approximation, i.e., an approximation that preserves the physical properties of the distributed model of the micro-channel, is proposed; the approximation is later used in [23] to design a passivity-based controller for the process. The benefit of preserving the physical structure of the model is that the parameters have physical meaning, and thus, the synthesis and tuning of the model-based controllers can be related with physical considerations [2]. It is interesting to notice that the control model presented in this work is, with minor differences, identical to the spatially discretized model presented in [23]. The main differences are that in this work the control model is obtained without approximating sets of PDEs, which makes the modeling approach quite simple and convenient for deriving a control model for the micro-channel. Additionally, in [23] the controlled inputs are the upstream input flow and downstream output pressure, while in our model the control input is the fluid resistance induced by the sluice gate. Another important difference is that the micro-channel slope is part of the disturbance vector in the proposed model, modeled as a pressure drop, whilst in [23] the slope is included in the total energy function. Relating the slope with a pressure drop which can be modeled as an external constant input or disturbance makes it particularly well-suited for control applications since the smooth slope variations can be compensated with standard integral action control. A final smaller difference between the models is how the natural dissipation in the micro-channel is handled. In the present work, we assume a linear fluid dissipation term, whilst the Manning-Strickler dissipation term is considered in [23].

B. BASIC ELEMENT IDENTIFICATION
In order to produce an accurate model that represents the dynamics of a micro-channel experimental plant, a process of identification must be performed to obtain the model parameters that are difficult to measure.
We first identify two basic types of interconnected subsystems. The first basic subsystem considers an uncontrollable fluid resistance. The second basic subsystem considers a controllable fluid resistance: see Figure 2. We then validate the identified models for these two basic subsystems. We adjust the theoretical interconnected PHS structure to the experimental setup through a parameter identification experiment using ordinary least squares (OLS). The experimental setup has four level sensors (LIT-01, LIT-02, LT-03, and LT-04), one flow sensor (FIT-01), and one micro speed velocimeter (MSV-01) [27] that is used to estimate the flow. The flow sensor (FIT-01) registers the input flow directly from the pump output. The micro speed velocimeter (MSV-01) and the level sensor (LIT-02) are located in the middle of the micro-channel section to be identified. The micro-channel section is divided into two basic subsystems. The first subsystem considers an estimated flow calculated from the velocimeter and level measurements as the output flow, which becomes the input flow for the second basic subsystem. The identification procedure considers the sluice gate position as the control variable for the second basic subsystem. See Figure 4 for the experimental setup indicating the sensors used in the identification experiment. The capacitance is a geometric parameter which is easy to verify, and it is related to the longitudinal section of the micro-channel. The schematic representation of the identified subsystems is shown in Figure 2.

1) UNCONTROLLABLE FLUID RESISTANCE SUBSYSTEM
The first basic subsystem considers one tank and one pipe and an uncontrollable fluid resistance. The output flow is estimated using the speed and level measurements. The first subsystem parameters expression is: h 1 (kT s ) = γ 1 (q 1 (kT s + T s ) − q 1 (kT s )) + γ 2 h 2 (kT s ) where k ∈ N is the time index, T s (s) is the sample time, γ 1 and γ 2 are the model parameters, h 1 is the water level height (m) in the first subsystem, h 2 is the water level height in the second subsystem and q 1 is the output flow of the first subsystem.

2) CONTROLLABLE FLUID RESISTANCE SUBSYSTEM
In the second subsystem, the output flow q 2 is estimated from the level measurements before and after the sluice gate.
To determine the fluid resistance value, we consider the term α g = 0.66 (an empirical term), see [23]: where B is the width of the micro-channel (m), h 2 is the water level height of the second subsystem, h 3 is the water level height after the sluice gate, g is the gravity (m 2 /s) and h g is the sluice gate opening (m). This subsystem, considering p ext equal to K 1 h 3 , can then be described by the following expression: h 2 (kT s ) = γ 4 (q 2 (kT s + T s ) − q 2 (kT s )) + γ 5 h 3 (kT s ) where again k ∈ N is the time index and ρ is the water density (Kg/m 3 ). γ 4 , γ 5 , and γ 6 are the model parameters. Table 2 resumes the unknown parameters and their definitions based on the parameters of the continuous time model.

3) TWO INTERCONNECTED SUBSYSTEMS IDENTIFICATION
In this identification experiment we use (4) and (6) to simultaneously identify a subsystem with an uncontrollable fluid resistance interconnected with a subsystem with a controllable fluid resistance. The input flow for this experiment is 1.5 l/s. A seventh-order pseudorandom binary sequence (PRBS) with a period of ten minutes was applied to the sluice gate position, varying between 0.6 cm and 2.6 cm from the micro-channel floor. These values cause an appreciable change in the micro-channel level. The PRBS design parameters such as the period and the order were taken from [28], where an identification process was conducted to identify the parameters for a similar process. The first half of the experimental data was used to calculate the parameters, whilst the second half of the data was used to validate the model. The sample period was T s = 0.04 s. Table 3 indicates the parameters obtained from the identification experiment using OLS (γ 1 to γ 6 ), and those inferred through the parameter definitions (see Table 2). The area and the capacitance are found directly from the micro-channel geometry (C f = A ρg ).   The identification method gives the inertances, along with the uncontrollable fluid resistance caused by the friction of the flow with the walls. We now report in Figure 5 the validation results for the first subsystem, and in Figure 6 the results for the second subsystem, respectively, where we plot: • The experimental data reserved for validation (red dashed lines), • The simulation based on the identified parameters reported in the second column of Table 3 for the interconnection model given by the discrete time equations (4) and (6) (blue solid lines), • The simulation using the deduced parameters of the continuous time interconnected PHS model reported in the fourth column of Table 3 (green dashed lines). We observe from both figures that the reported signals are all visually in agreement, which allows us to consider the experimental identification proposed in this section as successful.

III. LOCAL LEVEL CONTROL
In this section, we present two local control approaches; in the first instance a purely proportional controller is developed, and in the second instance a proportional-integral controller is derived. In both cases, passivity arguments are used to show the stability of the closed-loop system. The control objective is to maintain a desired reference level in the section just before the controlled gate.

A. PROPORTIONAL CONTROL
According to the basic element interconnection model approach in [26], a proportional control law based on the total hydraulic-mechanical energy as a local Lyapunov function was presented. The proportional control offers some advantages, such as being easy to design, a quick response, and stability. This proportional controller is simulated and implemented in the experimental setup. The following proposition presents the controller.
Proposition 1: Consider the subindex N to denote the tank subsystem just before the controllable fluid resistance. The control law is then with V * N the volume reference, * N = I N q * N the corresponding steady state momentum and with δ, α, β positive tuning constants.
Proof: Consider the following local energy function for the N-th section

Considering a constant input flow, its time derivative iṡ
Considering the equilibrium point, we have * N I N = q N−1 and that N I N = q N , and we then havė Replacing (7) in (10), we obtaiṅ from which we achieve asymptotic stability applying LaSalle's invariance principle.

B. INTEGRAL ACTION CONTROL
To correct for any steady state error, an integral action controller is implemented. The output of interest is the level of the channel, which is related to the volume of the tank sections: it is hence a nonpassive output. This implies that the integral action cannot be straightforwardly applied via the interconnection of the conjugated output of the system with a passive integral action controller [1]. In this section, we extend the integral action controller (IAC) presented in [29] to the fluid-tank system under study. In [29], the authors design a port-Hamiltonian controller that achieves IA and can reject matched and unmatched disturbances when applied to a port-Hamiltonian system. For the design of the IAC, we assume that the system is operating at some constant equilibrium determined by a constant input flow and outside pressure. The controller is designed to ensure that the volume V N of subsystem N is maintained at some desired value V * N in the presence of parameter uncertainties or slow changes in the input flow of the system or the exterior pressure of the system. Rewriting the model of the micro-channel as an input affine control system, considering constant disturbances, and for a shifted Hamiltonian function with its minimum at the desired dynamical equilibrium we have with conjugated output y = q N . It is assumed that the controlled gate, at the exit of tank system N, is never completely closed. This is accounted for by the constant fluid resistance R f N . The shifted Hamiltonian function is (13) where the equilibrium point (V * , * ) is a function of the constant input flow q * in , constant exterior pressure p * ext , and the slope drop pressures p * . Just as in the previous section, a local controller, i.e. a controller for the N-th tank system section, is synthesized to control the level around the section at some reference value. Considering the N-th section, we have where H d N is the Hamiltonian of section N, and d 1 and d 2 are constant disturbances which take into account any constant or very slow variation in the inlet flow and parameter modeling errors which are propagated through the model. Since we are interested in eliminating the error in the volume V N , and this state variable is not in the output equation of our model, we consider the integral action controller proposed in [29], which is a state integrator in the formζ = ∇ V N H d N , where ζ ∈ R is the state of the controller, H c ( N , ζ ) = 1 2I a ( N − ζ ) 2 is the controller Hamiltonian function and I a is a positive tuning constant to be selected. The closed-loop dynamic is then given by where the closed-loop Hamiltonian is given by The control system (15) allows regulating the volume reference V N by adjusting the reference value of the momentum coordinate. The reader is referred to [29] for further details. The following assumption is necessary to guarantee closed-loop asymptotic stability. Assumption 1: R f N is constant, H d N is strongly convex and has no cross terms between N and V N , and there is an equilibrium point of N such that ∇ N H d = −d 2 . Under Assumption 1, the closed-gradient at equilibrium becomes implying that the desired reference V * N is ensured by shifting the closed-equilibrium for the N coordinate.
Proposition 2: If Assumption 1 is satisfied, then the closed-loop system (18) is asymptotically stable.
Proof: The proof follows by direct application of Proposition 3 in [29], considering as Lyapunov function The dynamical controller can be interpreted as the interconnection of a fluid Resistance-Inertance parallel circuit in series with a pressure source, as shown in Figure 7. VOLUME 8, 2020 Since the controllable fluid resistance R f N is part of the control action, it appears as part of the controller in the figure. The fluid inertance I a is connected in parallel with R f N , and the desired pressure reference is obtained by a pressure source of value V * N /C f N . Figure 7 shows that the control action can be interpreted as the interconnection of the last section of the tank system with the dynamical controller. Indeed, it is not difficult to show that (15) can be written as the equivalent systeṁ (20) using coordinate transformation z = N − ζ , and where u c is the input of the controller. The closed-loop system is then obtained by a power preserving interconnection between (20) and (14). See [29] for more details on the interpretation of this class of control system.

A. SYSTEM DESCRIPTION
All reported experiments were performed on a micro-channel setup located at the Systems Control Laboratory, Universidad de Concepción, Chile. The micro-channel is an experimental plant that can represent open channel flow hydraulic phenomena at scale, as in Figure 8. The micro-channel has two installed ultrasonic level sensors, Endress+Hauser R Prosonic M, one Rosemount R ultrasonic level transmitter, one ultrasonic level sensor Maxbotix R , one electromagnetic flow meter Endress+Houser R Promag 10, one micro speed velocimeter (MSV) developed in [27], with a linear actuator Exlar R GSX series, a water pump to boost the flow with a variable frequency drive (VFD) Rockwell PowerFlex R , and a pneumatic Fisher R Fieldvue R Instruments actuator. The plant is controlled by a PLC Rockwell Contrologix R using the software RSlogix R and MATLAB R -Simulink R . The piping and instrumentation diagram (P&ID) of the micro-channel is shown in Figure 4. Notice that we also have stressed in Figure 4 the two basic subsystems previously discussed in Section II-B. Finally, the overall micro-channel dimensions are as follows: length, 7 m; width, 0.145 m; height, 0.345 m; and a slope of 0.328 o .

B. THREE-SUBSYSTEM EXPERIMENT
We first report an open loop estimation experiment with three basic subsystems, each based on the parameters identified from Section II-B. Two basic uncontrollable fluid resistance subsystems (tank, pipe, uncontrollable fluid resistance) followed by one controllable fluid resistance subsystem (tank, pipe, controllable fluid resistance) are interconnected in series: see Figure 9. Each subsystem has a physical length of 1.32 m. Figure 10 shows the model response to different changes in the sluice gate position h g . We observe from Figure 10 that there is a mismatch between the estimated and measured levels, more notoriously for the low value range (6 − 8 cm) and high value range (12 − 25 cm) of the level for Subsystem 1. We show the comparison between the estimated and experimentally measured water level height for Subsystem 1 because this subsystem is the one farthest away from the controllable fluid resistance, and thus, the subsystem that will present the highest estimation error.

1) CONTROLLABLE FLUID RESISTANCE ADJUSTMENT
In order to improve the estimation results, we further adjusted the controllable fluid resistance model. The desired controllable fluid resistance was compared with the controllable fluid resistance calculated from the sluice gate position. The method used to adjust the controllable fluid resistance values was again OLS, and the structure of the equation was selected as a seventh-order polynomial.
where u is equal to the difference between the pressure before and after the sluice gate divided by the output flow calculated with (5).û is the necessary controllable fluid resistance required to fit the simulated level to the experimental level value. The experimentally identified parameters η i , i = 1, · · · 8 that adjust u toû are reported in Table 4. We observe from Table 4 that our improved adjustment results inû ≈ η 3 u 2 + η 2 u + η 1 . The mean square error (MSE) obtained for the Subsystem 1 level with the adjusted controllable fluid resistance is 1.0692, while it is 1.3646 without adjustment. This shows an improvement of approximately 33% in the estimation due to the proposed adjustment. Figure 11 shows u and the adjustedû, and Figure 12 shows the experimental validation of Subsystem 1 water level height. We again observe from these two figures that the proposed further adjustment of the controllable fluid resistance resulted in the improved estimation of the water level height reported for Subsystem 1.
Note that here u is related to a controllable fluid resistance. The control variable u in Section III-A represents the controllable fluid resistance, while in Section III-B, u is a special case where the plant is interconnected with the controller and u represents a pressure drop that must be divided by the output flow to determine the equivalent fluid resistance.

C. LEVEL CONTROL EXPERIMENT
Here we report the simulation and experimental validation for the control of a model with four subsystems representing the micro-channel setup: see Figure 13. In all cases, we implemented the controllable fluid resistance adjustment described in the previous Section IV-B. The parameters used were the ones obtained from the identification experiment reported in Section II-B: R f n = 22.5 Ns/m 5 , where the fluid capacitance for each tank is C f n = 0.0195 m 5 /N , the fluid inertance for all pipes is I n = 4.6 Ns 2 /m 5 and the inertance for the last pipe is I 4 = 0.0294 Ns 2 /m 5 . The tuning constants are α = 1, β = 11, and δ = 0.005. The level set-point starts at 5 cm and increases to 16 cm at time 35 s. The sub-indexes of the pipes are related with the number of subsystems n = 1, 2, . . . , N, with N = 4 being the last subsystem.  The experimental results are shown for comparison in Figure 15. We observe that the first tank water level height is stable, but it also has a steady state error caused by the model and the sluice gate positioning errors.
The experimental result in Figure 15 motivates the use of an IAC, as described next.

D. INTEGRAL ACTION CONTROLLER
Four tanks were considered for this interconnection (N = 4). The level of the first tank is controlled by manipulating VOLUME 8, 2020   the resistance (sluice gate) on the fourth pipe. The control is activated at t = 100 s and there is an increment of 2% in the flow q in at 1000 s as an input disturbance. The parameters are selected as in the previous level control experiment (see also Table 3). The selected controller constants are I a = 100 Ns 2 /m 5 and R f N = 4.9 Ns/m 5 : see Proposition 2. Figure 16 shows the simulated controller with IA, and Figure 17 reports the obtained experimental results.
We observe that the controller from Proposition 2 results in a stable feedback loop based on the interconnected PHS model: it effectively grants tracking of a constant set-point and successfully rejects the constant input disturbance, both in simulation and (more importantly) in the experimental setup.

V. CONCLUSION
A lumped port-Hamiltonian hydraulic model has been proposed for a micro-channel class. The fluid model consists of the interconnection of basic valve-pipe-tank elements, similar to the modeling of electrical circuits with R, L, and C elements. The advantage of the model is its simplicity and modularity, and the resolution of the model depends on the number of fluid elements used. The slope of the micro-channel is taken into account as pressure drops modeled as external inputs to the system, which allows for facile modeling of the slope of the channel in a lumped fashion. It is interesting that comparing our model with the model obtained from the spatial approximation of the Saint Venant equations [22] highlights the convergence of both models with only slight differences.
The capacitance was calculated based on the geometric characteristics of the channel. The rest of the parameters for the interconnected PHS model of the micro-channel were identified using OLS. The open loop estimation using three basic subsystems exhibits some error between the estimated water level height of the first subsystem and the experimental data. To improve this open loop estimation the controllable fluid resistance was further adjusted.
A proportional controller based on the interconnected PHS model has been designed. This controller is based on a local Lyapunov function equation, which results in a stable feedback loop. The simulations using MATLAB R -Simulink R show good results, while the experimental results present steady state error due to modeling uncertainty. To correct the steady state error, an integral action controller (IAC) was proposed and implemented, maintaining the idea of representing the actuator by a dynamic controllable fluid resistance. The IAC corrected the steady state error, even with an input flow disturbance. Four subsystems were used to represent the interconnected PHS model. Future research will aim to interconnect more subsystems to better approximate the micro-channel process, further improving its control by analyzing the impact of other identification methods. Another possibility is to consider the case of multiple network interconnected (uncontrollable and controllable) subsystems subject to saturation and/or possible cyber-attacks, for which the main challenge would be to model the communication network as a PHS model.