Control of a Buoyancy-Based Pilot Underwater Lifting Body

This paper is about position control of a specific small-scale pilot underwater lifting body where the lifting force stems from buoyancy adjusted with an air pocket in the lifting body. A mathematical model is developed to get a basis for a simulator which is used for testing and for designing the control system, including tuning controller parameters. A number of different position controller solutions were tried both on a simulator and on the physical system. Successful control on both the simulator and the physical system was obtained with cascade control based on feedback from measured position and height of the air pocket in the lifting body. The primary and the secondary controllers of the cascade control system were tuned using Skogestad’s model-based PID tuning rules. Feedforward from estimated load force was implemented in combination with the cascade control system, giving a substantial improvement of the position control system, both with varying position reference and varying disturbance (load mass).


Introduction
Underwater lifting operations is a common task in e.g. the offshore oil and gas production industry.This paper is about control of a small-scale physical pilot underwater lifting system. 1 The lifting principle is adjustment of the buoyancy by controlling the amount of air in the air pocket of the lifting body.Buoyancy can provide a large lifting force with little energy, but it requires a control system.A position control system is designed and implemented to keep the body with load at a reference position.A mathematical model is developed to get a basis for a simulator which is used for testing and for designing the control system, including tuning controller parameters.Fossen (1994) and others, describe position control of underwater vehicles, but there is not much research reported about stabilizing underwater bodies using buoy-ancy.Several control functions were tried both on a simulator and on the physical system.The only method which worked well on the physical system was standard cascade control with positional control as the primary (master) control loop and air mass in the lifting body as the secondary (slave) control loop.The selected control strategy has certain similarities with the control structure described in a US patent by Otterblad and Dovertie (1985) where the inner loop is based on a measurement of the lifting force. 2 The simulator and the control system are implemented in a LabVIEW program running with cycle time 0.02 sec on a PC.
The paper is organized as follows: The system is described in Section 2. A mathematical model is derived in Section 3.This model is the basis of a simulator of the system, and it is also used for design and tuning of the controllers and the observer (estimator).Con-trol system design, including state observer design, is described in Section 4. Experimental results are presented in Section 5. Conclusions are given in Section 6.
2 System Description Fig. 1 shows schematically the lifting body, including the position control system.Fig. 2 (left) shows a photo of the lifting body inside a water tank used for testing the position control system.Fig. 2 (right) shows the actuator which is a pneumatic control valve which adjusts the air flow into the air pocket of the lifting body.The air flows out of the air pocket via a valve with fixed (manually adjustable) opening.The lifting body position y is measured with a pressure sensor.The position is calculated from the pressure measurement, since the position is proportional to the hydrostatic pressure.The height of the air pocket in the lifting body is measured with an ultrasound level sensor. 3 It is certainly an open question whether the configuration shown in Fig. 1 represents optimal design.Alternative configurations are controlling the outlow, and controlling both inflow and outflow simultaneously with split-range control.However, it was not a purpose of the present project to find the optimal configuration 3 It was important that the cap of the lifting body where the sensor was mounted was isolated (we used foam plastic), to avoid disturbing sound reflections.in this sense, but to design and implement a proper position control system for the selected configuration, assuming that the principal results are transferable to a different configuration.

Variables and parameters
Variables and parameters with values are given below.
• y [m] is position of lift body.Position is zero at the water surface, and positive direction is downwards.
• f lif t [N] is buoyancy lifting force.
• f h [N] is hydrodynamic drag or damping (friction) force acting on the lifting body from the water.
is gravity force on the system.
• f d [N] is any independent environmental force in addition to the forces defined above.
• m tot [kg] is total (resulting) mass to be lifted by the lifting body.
• m b [kg] is mass of the ballast water.
• m air [kg] is mass of air in air pocket • m add = 2.0 [kg] is added (virtual) mass related to the forced motion of water as the lifting body moves.
• m cyl = 6.0 [kg] is mass of the body.
• m cyl lif t = 2.0 [kg] is mass of the water corresponding to volume taken up by the lifting body in the water (causing buoyance force).
• m l = 5.0 [kg] (default value) is mass of load attached to the lifting body.
] is volume of lifting body.
• V a [m 3 ] is volume of air pocket in lifting body.
• A cyl [m 2 ] is cross-sectional area of lifting body.
] is a cross-sectional area parameter used to calculate f d .
• L cyl = 0.6 [m] is length of lifting body.
• L a [m] is height of air pocket in lifting body.
• ρ a [kg/m 3 ] is density of air in air pocket (at the present depth).
• F in [kg/s] is air mass flow into lifting body from the compressor, through the control valve.
• F out [kg/s] is air mass flow out from lifting body through outlet valve.
• K vout is valve constant of outlet (manual) valve.
• p atm [Pa] is atmospheric air pressure.
• p s [Pa] is the pressure of the air out from air compressor (air supply).
• ∆p in [Pa] is pressure drop across air inlet valve.
• ∆p out [Pa] is pressure drop across air outlet valve.
• u [V or %] is valve control signal.
The parameters K h and K vout were adjusted manually in a simulator until the simulated position showed the similar response as the measured position.The parameter m add was given an assumably reasonable value.

Mathematical modelling
A mathematical model describing the motion of the lifting body was developed from the following modeling principles: • Equation of motion of the lifting body with load • Mass balance of the air in the air pocket of the lifting body Modeling details are given in the following sections.

Equation of motion
Applying Newton's Second Law gives m tot in eq. ( 1) is described in detail below. where m a is given by the mass balance of the air in the lifting body, cf.eq. ( 20) below.Now, eq. ( 1) becomes where In eq. ( 6), ρ a is a function of depth y given by the Gas Law: R is the specific gas constant, and T is the temperature.Assuming constant T , eq. ( 8) gives Here, p a (y) = p atm + ρ w g (L a + y) (10) Now eq. ( 9) gives Here we will make the assumption that y L a (13) which will hold when the lifting body is at relatively large depths.This implies ρ a (y) ≈ ρ aatm 1 + ρ w gy p atm (14) which is used in eq. ( 6).Each of the terms at the right side of eq. ( 1) are now described: In eq. ( 1), the lifting force f lif t is given by where In eq. ( 1), where K h is adjusted manually during experiments.In eq. ( 1), where the term m cyl lif t g is the buoyance force due to the lifting body itself being submerse.

Mass balance of air in air pocket
The mass m a of the air in the air pocket of the lifting body is varying.A mathematical model of m a is given by the following mass balance of the air in the lifting body: The air mass inflow F in and the air mass outflow F out are described in detail in the following.
Modeling the air inflow F in is assumed to be a controllable (adjustable) input variable.In practice the specified F in is obtained by manipulating the control signal u to the inlet control valve.u is a voltage in the range of [0 -5V] which will be represented with a percent value in the range of [0 -100%], with a linear relation between the ranges.F in is ideally given by the valve equation: ∆p in is the pressure drop across the valve: Hence, In the project we inverted this valve function by using table-lookup based on linear interpolation between the tabular data.Hence, for any specified flow F in , the table-lookup give the valve control signal u needed to obtain that flow.One convenient consequence of this is that the nonlinear valve can be represented by a linear valve with flow F in as the control signal (or manipulating variable).

Modeling the air outflow
In eq. ( 20) the air mass outflow F out through the valve, which has fixed opening, is modelled as where ∆p out is the pressure drop across the valve.sign(∆p out ) is the sign function, which has value 1 if the argument (∆p out ) is positive, and −1 if the argument is negative.∆p out is given by 4 Control System Design

Introduction
Several controllers were designed and tried out both on the simulator (based on the model described in Section 3) and the real system.The application of these controllers is described briefly below.All of the controllers worked on a simulator, but the only method which worked well and without problems on the physical system was cascade control, which also was enhanced with feedforward from estimated load force.(Section 4.2 describes details of the cascade control system.)One practical problem with the physical system is that the height of the water tank is relatively small as the height is about 1.5 m.Therefore, the lifting body with load mass easily reached physical constraints during experiments.Some of the other controllers might work well too under different physical conditions.Certainly, it is benefical if the control task is satisfactorily solved with a "standard" controller and this turned out to be the case in the present application (with cascade control).
Below is a short description of the application of the various controllers: • Feedback linearization in combination with a Kalman filter which estimates the state variables.The state variables are the lifting body position and velocity and the mass of air in the air pocket.Basically, with this controller, nonlinear (and linear) terms of the process model are cancelled out.The resulting process model is linear and simple (three integrators in series).
A linear pole-placement controller for this model, augmented with an integrator in the controller to obtain integral control action, was designed.Although the controller worked excellently with the simulated system (with no model errors assumed), it was not able to stabilize the real system.This is probably because of too large sensitivity to model errors.Model errors are particularly apparent when the system reaches physical constraints, but this was not analyzed in detail.Furthermore, the sensitivity to an erroneous estimate of mass of air in the air pocket in the lifting body is probably large.The mass of air is closely related to the lifting force.Intuitively, an erroneously calculated lifting force may cause problems for stabilization of the body position.
• Linear feedback control with pole-design in combination with a Kalman filter which estimates the state variables.This controller is based on a simplified process model being valid close to a certain operating point, which was selected as the "static" operating point, where the body is at rest (this is the most critical operating point regarding stability).This controller worked well on the simulated system, but not on the real system, probably because of the same reasons as for Feedback linearization (see above).
• PID controller with lead element in series with the PID controller.Ordinary PID control could not stabilize the system at all due to the dynamic properties of the process which is roughly a triple integrator (three integrators in series), at least at a static operating point where damping hydrodynamic drag force (as modeled in this project) is zero.Position is integral of velocity which is integral of acceleration which is proportional to mass of air in air pocket, and this mass is roughly the integral of air inflow.A PID controller can stabilize a double integrator, but not a triple integrator because a phase lead of more than 90 degrees provided by the controller is needed, and the PID controller can not add more positive phase (lead action) than 90 degrees (ideally) to the control loop.Therefore, a lead-lag element with dominant lead action providing the additional phase lead was included in the controller, succeeding the PID controller.Actually, this controller was able to stabilize the real system, but it became unstable after small disturbances (perturbations), so it was concluded that the controller was not sufficiently robust.Also, the control signal was very noisy, due to the derivative action corresponding to the phase lead action.This noise makes the stabilization difficult.
• PID controller together with body acceleration feedback, where the acceleration was estimated with a state observer.The purpose of acceleration feedback is similar to the lead-lag element mentioned above, i.e. to add sufficient positive phase in the control loop.The observer, which is designed from specified oberver poles, estimates the lifting bag position, velocity, and acceleration using only position measurement.The experiences with this controller are similar with the experiences with PID controller with lead element.An alternative to estimating the acceleration is, of course, to measure it, but this was not implemented in this project.(So, it is unclear if control using acceleration measurement works better than using acceleration estimate.) • Cascade control, with feedforward from estimated load force.The primary (master) loop of the cascade control system realizes position control, and the secondary (slave) loop realizes control of air height in the air pocket of the lifting body.Cascade control is "industry standard", and it worked successfully without problems in this project.In the controller design, the clue is to identify the secondary process variable to be measured.Fig. 4 shows a block diagram of the cascade control system based on feedback from measured underwater lifting body position y (this feedback is of course obligatory in a positional control system) and measured air height L a of the air pocket.Thus, two sensors were implemented.
Since a mathematical model exists, it was tempting to try feedback from estimated L a as an alternative to feedback from measured L a .However, this did not work well on the physical system as the control system became unstable.The system relies on accurate knowledge about L a , and an estimate can not replace the measurement in this case.
One practical benefit of cascade control compared with more complex control structures is that the user can manipulate the amount of air (the secondary or internal process variable) directly during testing etc.This is done by setting the primary controller into manual mode, and manipulating the manual control signal of the primary controller which is the setpoint of the secondary controller.

Signal filters
Lowpass (time-constant) filters were implemented in LabVIEW to smooth the y measurement -this is filter F 1 in Fig. 4 -and the L a measurement -this is filter F 2 in Fig. 4. Also, a lowpass filter was implemented to smooth the control signal, u = F in -this is filter F 3 in Fig. 4. In the experiments the F 1 filter was used with time-constant of 0.1 s because that measurement was somewhat noisy.The F 3 filter was used with a timeconstant of 0.1 s to get a smooth control signal to the valve.The F 2 filter was actually not used (i.e. its timeconstant was set to zero) because the measurement of L a contained little noise.

Controller tuning
The master PID controller and the slave PI controller were both tuned using the mathematical model of the system.4Both controllers were tuned from specifications of the response-time (time-constants) of the respective control loops using Skogestad's method of PID controller tuning Skogestad (2003).
Tuning of the primary controller (PID) The primary control variable is L a , which is used as the setpoint of the secondary loop.It is assumed that the dynamics of the secondary loop which controls L a is so fast relative to the dynamics of the primary loop that the setpoint of L a is obtained approximately immediately.Thus, the process model used as the basis for tuning the primary loop is as follows: where To tune the primary PID controller, a transfer function model with L a as input and y as output is useful.This model can be derived by rigorous linearization of a nonlinear state-space model corresponding to eq. ( 27).
Alternatively, it can be derived as follows: Since the hydrodynamic damping force f h given by eq. ( 31) has its minimum value of zero when the speed ẏ is zero, the most critical operating point -which should be used for controller tuning -is at ẏ = 0. From the model eqs.( 27) -( 32), the relation between L a and y at this operating point is From eq. ( 33) the transfer function from L a to y is found as where the gain K 1 is P 1 (s), which is a "double integrator", can be controlled with a PID controller.To tune the controller parameters, Skogestad's method, also denoted the SIMC method 5 , Skogestad ( 2003) is used: where T C1 is the user-specified time-constant of the control system (the primary loop).In general for the double-integrator being tuned with Skogestad's formulas, it turns out that the actual (simulated) timeconstant is about three times larger than the specified T C1 .But since T C1 has to be manually adjusted on the real system, this inaccuracy is not important.T C1 is the only tuning parameter of the PID controller.T C1 can be selected by trial-and-error on a simulator, and should be further tuned on the real control system.It was found that T C1 = 2.5 s (39) 5 SIMC = Simple Internal Model Control was a good value on the simulator and on the real system.Skogestad's tuning rule assumes a serial PID controller function, which has the following transfer function (assuming u is the control signal and e is the control error): where K ps , T is , and T ds are the controller parameters given by eqs.( 36) -( 38).However, the PID controller used in this project actually implementes a parallel PID controller, which has the following transfer function: To transform the serial PID settings to parallell PID settings, we apply the following serial-to-parallel transformations Skogestad (2003): Tuning of the secondary controller (PI) The secondary control loop controls L a .The setpoint is L a ref which is equal to the output of the primary controller.
The control variable calculated by the secondary controller is F in , which is applied to the control valve.
The mathematical model of the process that the secondary controller controls, is given by eq. ( 20) which is repeated here: The relation between L a and m a is given by Above, the air density ρ a is given by eq. ( 14).Because y is known at any instant of time, ρ a can be calculated by eq. ( 14) and is therefore known.Furthermore, we can assume that the outflow F out is a disturbance.Then, the model of the process that the secondary controller controls, is The transfer function from control variable F in to process output variable L a becomes which is an integrator.The gain K 2 is To tune the secondary controller for a process given by eq. ( 48), we use Skogestad's method Skogestad (2003): where T C2 is the user-specified time-constant of the secondary control system.It was found that is a good value on the simulator and on the real system.

Estimation of load force
An estimator of the load force was implemented.The force estimate was used in feedforward control as explained in Section 4.4.The estimator was designed as an observer with specified dynamics, see Goodwin et al. (2001).The design is described in the following.
The mathematical model which is the basis of the estimator is where f e is the environmental or disturbance force to be estimated.f e will actually represent any force that is not included in the model, or that is not modelled correctly.It is assumed that f e is unknown without any information about its variation.An appropriate model which describes f e is therefore ḟe = 0 (55) It is assumed that all variables and parameters except f e are known.In particular, L a is known from its measurement.In applications where the m tot varies substantially, it may be necessary to estimate it, but this has not been done in the present project.f e will be estimated with an observer, which is a state-estimator designed from pole (or eigenvalues) specifications.(An observer has the same structure as the Kalman filter.)It is the difference between the measured and the estimated position, e = y meas − y est , that updated the estimates, including the estimate of f e .To design the observer, we need to write the model in eqs.( 54) -( 55) as a state-space model (v is velocity): The observer is given by K 1 , K 2 and K 3 are observer gains.Fig. 5 shows a block diagram of the observer.The observer gains are calculated from specified dynamics in terms of poles of the closed (feedback) loop of the observer.It can be shown that the characteristic polynomial of this loop is The observer poles were selected as Butterworth poles Franklin and Powell (1980).Butterworth poles give a step response with a slight overshoot and good damping.(Of course, other poles configurations are possible.)Butterworth poles of a normalized third order system correspond to the following characteristic polynomial: where c 3 = 1; c 2 = 2; c 1 = 2; c 0 = 1 (64) If we specify that the system has response-time 6 T r approximately equal to 3T , the Butterworth polynomial becomes Haugen ( 2010) which has the same roots as Comparing c obs (s) and c butter (s) gives the following formulas for the observer gains: The algorithm of the observer ready for progamming is derived by discretizing the observer formulas in eqs.( 59) -( 61) using Forward differentiation approximation.The resulting observer formulas are as follows: h is the time-step (0.02 s).The observer response-time T r was set to 0.8 s.
6 Here, response-time means time to reach 63% of steady-state value, similar to the definition of time-constant for first order systems.

Feedforward from estimated load force
From eq. ( 54) we get the following feedforward controller function: which is added to the control output from the primary controller, L aprim , so that the total reference to the secondary controller becomes Fig. 6 shows the structure of the cascade control system including estimator (observer) and feedforward model. C

Introduction
Experiments were run with cascade control with feedforward from estimated load force.Fig. 7 shows the available parameters of the control system.The experiments reported in the next sections are about • position reference tracking, where the reference was changed as a ramp, and • disturbance (load) compensation, where the load was suddenly changes by adding a mass of 0.5 kg.The reference was then constant at 0.3 m.

Position reference tracking
Fig. 8 shows the lifting body position reference (setpoint) r and measurement y, together with air body height reference L a ref and measurement L a .Also the control signal F in applied to the control valve is shown.The position reference was initially 0.3 m, and then changed as a ramp downwards with slope 0.005 m/s, and then upwards with the same slope.When the reference was constant (before the ramping started), the maximum position control error was approximately 0.02 m, due to various sources of noise in the system (the error is zero in an ideal, noise-free system).During the ramping, the maximum steady-state error was approximately 0.03 m.In an earlier experiment, cascade control without feedforward from estimated force was run.The control error was substantially larger than with feedforward.(No plots are shown here.)The superior control at using feedforward from estimated load was somewhat surprising, because the load was not changed during these experiments.It seems that the load estimate encapsulates the effects of various sources causing the control error to become different from zero.

Disturbance (load) compensation
Fig. 9 shows the responses as a mass load of 0.5 kg was suddenly added to the body at time 360 s, and then suddenly removed from the body at time 410 s.The maximum response in the lifting body after the load was added was 0.08 m, while the maximum response after the load was removed was 0.12 m -an average of 0.10 m.It took about 15 sec until the position was back at the reference.
In another similar experiment without feedforward the maximum response in the lifting body was 0.23 m, and position was back at the reference after 250 sec.Thus, disturbance compensation was substantially improved with feedforward.

Conclusions
A mathematical model has been derived from physical principles.The state variables are lifting body position and speed, and mass of air in the air pocket of the lifting body.Successful stabilizing position control of the lifting body was obtained with cascade control.The cascade control system is based on feedback from both measured lifting body position and measured air height in the lifting body.Thus, two sensors were implemented.Both the master PID controller and the slave PI controller were tuned using Skogestad's modelbased PID tuning rules.The only specifications for Skogestad's tuning is the time-constant of the control loop.The tunings were tried on the simulator before being applied to the real system, and there was hardly any need to retune the controllers.Feedforward from estimated load force was implemented with the cascade control system.At constant position reference the maximum control error was 0.02 m.At ramping position reference of slope 0.005 m/s the maximum control error was 0.03 m.At constant reference but with a suddenly added load mass of 0.5 kg the maximum control error was 0.10 m in average (0.08 m after the load was added, and 0.12 m after the load was removed), and the position was back at the reference after 15 s.Experiments with cascade control but without feedforward gave a control error that was substantially (many times) larger, both at changing reference and at changing disturbance (load mass).

Figure 1 :
Figure 1: The lifting body with load.

Figure 2 :
Figure 2: Left: Water tank with lifting body.Right: Pneumatic control valve (Samson, Type 3241, Series 250) for controlling the air flow to the cylinder.

Figure 3 :
Figure 3: Air flow F in [kg/s] as a function of the valve control signal.

Figure 5 :
Figure 5: The observer which is used to estimate the environmental force f e .(1/s is the transfer function of an integrator.)

Figure 7 :
Figure 7: Controller settings of the cascade control system in LabVIEW.

Figure 8 :
Figure 8: Cascade control with feedforward from estimated load force: Ramped changes of the position reference.

Figure 9 :
Figure 9: Cascade control with feedforward from estimated load force: A load mass of 0.5 kg was added at time 360 s, and then removed at time 410 s.
The process model was a great help to this end as the model revealed that the state variables are lifting body position and velocity and mass of air in the air pocket.The primary controller is of course based on the lifting body position, and indirectly on velocity which is calculated by the derivative action of the PID controller.The secondary controller is based on the third process state variable -the air mass.(The cascade controller resembles state-variable feedback, which is known to be able to stabilize "any" process.)However, this mass is not measured directly.