1

A Nonlinear Hybrid Life Support System: Dynamic Modeling, Control Design, and Safety Verification Sonja Glavaski†, Dharmashankar Subramanian†, Kartik Ariyur, Ranjana Ghosh, Nitin Lamba, and Antonis Papachristodoulou

Abstract— We present control design for a Variable Configuration CO2 Removal (VCCR) system, which exhibits a hybrid dynamical character due to the various modes in which one needs to operate the system. The VCCR is part of an overall NASA Air Recovery System of an intended human life-support system for space exploration. The objective of the control system is to maintain CO2 and O2 concentrations in the crew cabin within safe bounds. We present a novel adaptation of the model predictive control technique to a nonlinear hybrid dynamic system. We exploit the problem structure and map the hybrid optimization problem into a continuous nonlinear program (NLP) with the aid of an appropriate representation of time and set definitions. We present a systematic approach for designing the objective function for the Nonlinear Model Predictive Control (NMPC) regulation problem that achieves a long-term, cyclic steady state. We also present a simple switching feedback controller and compare the performance of the two controllers during off-nominal and failure conditions to highlight the benefits of a systematically designed NMP controller. We then perform safety verification of both control designs—the Model Predictive Control with techniques from Statistical Learning Theory and the switching feedback controller with Barrier Certificates computed using Sum of Squares programming. The two approaches yield consistent results.

Manuscript received September 30, 2004. This work was funded by NASA Ames Research Center, under Contract # NAS2-01067. † First two authors are equal contributors. Sonja Glavaski is a Principal Research Scientist with Honeywell Labs. 3660, Technology Drive, Minneapolis, MN 55418 USA (email: [email protected]). Dharmashankar Subramanian is a Research Staff Member with IBM T.J. Watson Research Center, Yorktown Heights, NY 10598 (e-mail: [email protected]). Kartik Ariyur is a Research Scientist with Honeywell Labs. 3660, Technology Drive, Minneapolis, MN 55418 USA (email: [email protected]). Ranjana Ghosh is a Research Scientist with Honeywell Labs. 3660, Technology Drive, Minneapolis, MN 55418 USA (email: [email protected]). Nitin Lamba is with Honeywell Automation and Control Solutions, St. Louis Park, MN, 55416 (email: [email protected]). Antonis Papachristodoulou is Lecturer with Department of Engineering Science, University of Oxford, Parks Road, Oxford OX1 3PJ, UK (email: [email protected])

Index Terms—Optimal Control, Model Predictive Control, Hybrid System, Barrier Certificates, Sum of Squares Programming, Statistical Learning Theory

I. INTRODUCTION Hybrid dynamic models describe hierarchical processes, which evolve according to different sets of lower level dynamic components (differential or difference equations) depending on the upper level logical/discrete mode that characterizes the system, at any given point in time. Hybrid systems have many applications and many approaches to develop control schemes for them have been pursued. The specific application domain for this work is advanced life support systems that are used for manned space exploration missions. We develop two controllers—one based on Model Predictive Control, and another a switching feedback controller—for the Variable Configuration CO2 Removal system (VCCR) and verify safety of each of the controlled systems. The methodology developed in this work, both for control design and for safety verification, may be of practical use to a broad class of hybrid problems. The VCCR exhibits hybrid dynamical behavior because of the various modes in which it needs to be operated. It is part of an overall Air Recovery System ([1],[2]), which in turn is part of an intended human life-support system for space exploration. The paper is organized as follows: Section II presents the configuration and hybrid dynamic model of the VCCR system that we developed, Sections III and IV present the nonlinear model predictive control synthesis, and Section V presents NMPC simulation results. Section VI presents a switching feedback controller design and Section VII compares the performance of the two controllers under off-nominal and failure conditions. Section VIII overviews hybrid system safety verification using barrier certificates and their computation by Sum of Squares programming, and Section IX provides their construction for our system. In Section X we use statistical learning theory to verify safe performance of the NMPC.

2 II. VARIABLE CONFIGURATION CO2 REMOVAL SYSTEM

different, depending on what mode of operation applies to the system. Lastly, the overall system has an oxygen generation system (OGS), which can send make-up O2 into the cabin, if required. B. Dynamical Model Let c ∈ {CO2 , O2 , inert} represent a component in the

Fig. 1: VCCR Model

A. System Description The basic functions of the VCCR system include recovery of CO2 from the crew cabin by adsorption into one of two adsorber beds. It also includes desorbing the accumulated CO2 and sending it to an accumulator for downstream CO2 Removal System (CRS). In this study, we look at a physical idealization of the VCCR system (the configuration of which was obtained from Metrica Traclabs) that consists only of the crew cabin, two adsorber beds, and the CO2 accumulator, without the CRS system, as shown in Figure 1. The physical configuration of the system is such that when one of the adsorber beds is connected to the crew cabin, and is undergoing CO2 uptake via adsorption, the other bed is undergoing either air-save or desorption, with the following synchronized operation. During the time interval (say, ‘halfcycle’) when the adsorbing bed returns CO2-lean air back into the cabin, the other bed involves two modes of operation in sequence - the Air-Save mode and the CO2-Desorb mode. In Air-Save mode, the desorbing bed recycles CO2-lean air back into the cabin from its gas phase. For the remainder of the ‘half-cycle’, it operates in the CO2-Desorb mode in which it delivers CO2 that is released from the solid phase. This CO2 can either be vented, or be accumulated into the CO2 accumulator. During maintenance, the accumulator can also be used to send CO2 back into the cabin, if needed. The adsorber beds have a saturation capacity beyond which they cannot adsorb any more CO2. As a result, after every adsorption step, the beds change their roles and the adsorbing bed starts AirSave followed by desorption, while the re-generated bed is connected to the cabin for adsorption. Therefore, the system is operated in a cyclical pattern of operation. At any given point in time, the system can exist in any of four different modes of a hybrid system, which form a sequence of four quarter-cycles that compose one full-cycle of operation. 1) Mode 1: Bed 1 in Adsorb, and Bed 2 in Air-Save. 2) Mode 2: Bed 1 in Adsorb, and Bed 2 in Desorb. 3) Mode 3: Bed 2 in Adsorb, and Bed 1 in Air-Save. 4) Mode 4: Bed 2 in Adsorb, and Bed 1 in Desorb. The dynamic equations that describe the state evolution in the adsorber beds, crew cabin, and the CO2 accumulator are

system, and j ∈ {1,2} represent a bed in the system. Also, let subscript C denotes the crew cabin, and subscript A denotes the CO2 accumulator. The subscripts, variables and parameters used in the following sections are defined in the Appendix I. For the four modes of operation, the dynamical equations for the cabin, the adsorbers and the accumulator take the following form: 1) Adsorber j is in Adsorb, Adsorber j ′ ≠ j is in Air-Save In this mode, adsorber j is connected to the cabin and CO2 from the cabin gets accumulated at the corresponding rate of adsorption. Stream 1 from the adsorber bed, j, into the cabin, is the only outflow from the adsorber bed. There is another inlet flow into the cabin because adsorber j' is sending air back since it is in Air-Save mode. Hence, the component mass balance equation of the cabin becomes: .   v1 ρ (c, j ) − v1 ρC (c) + v2 ρ (c, j ' ) + rC (c) + m(c) = dρ (c) VC C dt

(1)

Note that the generation rate rC (c) is positive for CO2, negative for O2 and zero for inert. For adsorber j, the component balance becomes: dρ (c, j ) v1 ρ C (c) − v1 ρ (c, j ) − rads ( j , c) = V j (2) dt dQ(c, j ) = rads ( j , c) (3) dt Similarly, the component mass balances for adsorber j' become: dρ ( c , j ' ) − v 2 ρ ( c, j ' ) = V j ' (4) dt dQ(c, j ' ) (5) =0 dt Since there are no O2 or inerts in the accumulator, its mass balance takes the form: . dQ A (c) = − m (c ) (6) dt The negative sign indicates that the CO2 make-up stream is an outlet from the accumulator and hence reduces the mass inside it. 2) Adsorber j is in Adsorb, Adsorber j ' ≠ j is in Desorb: In this mode, there is no flow into the cabin so v2 term in (1) disappears and the equation for the cabin takes the following form: . dρ C (c )   − + + ρ ( , ) ρ ( ) ( ) (c )  = VC v c j v c r c m 1 1 C C  dt 

(7)

The dynamics of adsorber j remains the same in this mode.

3 However, adsorber j' desorbs CO2 and mass balance becomes:

− v 2 ρ (c, j ' ) + rdes ( j , c) = V j '

dρ (c, j ' ) dt

dQ(c, j ' ) = − rdes ( j , c), for c = CO2 dt

(8) (9)

Now that the outlet of adsorber j' is connected to the accumulator, its mass balance modifies to the following: . dQ A (c) = v 2 ρ (c, j ' ) − m(c), for c = CO2 dt

use collocation on finite elements ([6], [7]) to convert the infinite dimensional, continuous, differential equations into a finite dimensional, discretized set of algebraic equations within each quarter cycle (see Figure 2). Based on prediction done over the regulation horizon, a future optimal control maneuver is computed for each quarter cycle in the horizon, in terms of the control inputs noted previously. The control inputs that are actually implemented correspond to the first quarter cycle.

(10)

III. NON LINEAR MODEL PREDICTIVE CONTROL Controller synthesis with mathematical programming is based on the receding horizon philosophy. Traditionally, this has been done for linear dynamic systems, and is also referred to as Model Predictive Control (MPC)[3]. We have adapted this concept to work with the above nonlinear, hybrid system, and use the term, nonlinear model predictive control (NMPC), in the rest of the paper. A good overview of nonlinear model predictive control can be found in [4]. In an earlier paper [5], we developed an open-loop, full horizon version of the nonlinear hybrid controller. In this paper, we develop the receding horizon version of the problem The permissible modes of operation of the system and the cyclical pattern of these modes are noted in this section, from the perspective of developing a nonlinear programming based controller. For a given number of full-cycles under consideration, the control inputs to be decided by any controller include the following for each quarter-cycle: 1) Volumetric flow rate from the cabin to the adsorbing bed 2) Volumetric flow rate out of the air-saving, or desorbing bed 3) Cycle time duration 4) Mass flow rate of CO2 from the accumulator to cabin 5) Mass flow rate of O2 from the OGS to the cabin In traditional linear MPC and NMPC, the continuous time axis is discretized into a finite number of time points, and the differential equations are converted into difference equations applied at these time points. The number of time points denotes the regulation horizon over which the classical MPC problem is formulated. Our adaptation of this concept in the NMPC framework for the VCCR physical system is as follows. We define our NMPC regulation horizon at the time scale of quarter cycles, i.e. a finite number of quarter cycles into the future. This is a subtle, and novel, departure from classical linear MPC, where the control regulation horizon is defined in terms of the number of discretization points. Secondly, we let the duration of each quarter cycle be determined as a decision variable by the NMP controller. In other words, the NMP controller decides when to switch from one mode to another. Switching control applied does not impose unique state space partition, making controlled system be of hybrid rather than switched nature, as distinguished in [12]. Also, within each quarter cycle, the NMPC framework utilizes an appropriate nonlinear model of the system to predict the future state. We

Fig. 2: Time Discretization Schematic

The details of the nonlinear programming formulation within the NMPC framework are described next. Firstly, the time axis is modeled into a specified number of quarter-cycles along with some set definitions (Table 1) that aid in converting a set of four mode-dependent sets of dynamic equations into a single finite-dimensional set of discretized algebraic equations. Let I = {i0 , i0 + 1,..., i0 + M − 1} , where M is the number of quarter-cycles under consideration (i.e. the NMPC regulation horizon, as adapted for our work). The system can start with any mode, with the only restriction that the two beds follow the cyclical pattern for subsequent quarter-cycles. Further, let us define subsets of I (Table 1), based on the cyclical pattern of operation, and let m = i mod 4, ∀i ∈ I . These sets exploit the cyclic nature of the process and identify the correct set of differential equations that apply to each quarter cycle in the regulation horizon. For each quarter cycle, i, the time interval of interest, T(i), which is the same as the (unknown) duration of the quarter cycle, is divided into N FE finite elements of length h fe , such that fe = N FE

∑h

fe

= T (i )

(11)

fe =1

We have taken the finite elements to be of equal size within each quarter cycle. If the time duration, T(i), is represented by the interval [t i ,0 , ti , f ] , then, l = fe

ti , fe = t i , 0 + ∑ hl , ∀fe = 1,.., N FE ( note : t i , N FE = ti , f ) (12) l =1

TABLE 1 SET DEFINITIONS

Bed 1

Mode Adsorb

Definition BA,1 = {i | (m = 1) ∨ (m = 2)}

4 2

Adsorb

BA,2 = {i | (m = 3) ∨ (m = 0)}

1

Air-Save

B AS ,1 = {i | (m = 3)}

2

Air-Save

B AS ,2 = {i | (m = 1)}

1

Desorb

BD ,1 = {i | (m = 0)}

2

Desorb

BD, 2 ={i | (m = 2)}

1,2

Adsorb

1,2

1,2

B A = {(i, j )

Air-Save

[ ( j = 1) ∧ (i ∈ B A,1 )] ∨ [( j = 2) ∧ ( i ∈ B A, 2 )]}

B AS = {(i, j )

Desorb

BD = {(i, j )

[ ( j = 1) ∧ (i ∈ B AS ,1 )] ∨ [( j = 2) ∧ ( i ∈ B AS ,2 )]}

[ ( j = 1) ∧ (i ∈ BD ,1 )] ∨ [( j = 2) ∧ ( i ∈ BD , 2 )]}

Within each finite element, we place N CP collocation points. The time profiles of algebraic and differential variables are approximated using derivatives and values evaluated at the N CP collocation points, whose relative position within each finite element is the same. The collocation points are positioned as,

τ i , fe,cp = t i , fe −1 + h fe ρ cp , ∀cp = 1,..., N CP (Note that

τ

i , fe , N CP

(13)

= t i , fe ).

In the above equation, ρ cp ∈ [0,1] , and are chosen to be the shifted roots of orthogonal polynomials of degree N CP . In this work, we use Radau points, as they allow convenient setting of constraints at the end of each element [8]. A monomial basis representation is used for the differential profiles. So a differential variable, z, in quarter cycle, i, and finite element, fe, is given as: N CP  t − t i , fe −1  dz i   z i (t) = z (t i , fe −1 ) + h fe ∑ Ωcp   h  dt  (14) cp =1 fe i , fe ,cp   ∀ t ∈ [t i , fe −1 , t i , fe ]

In the above equation, the time polynomial Ωcp is of order N CP , and uniquely satisfies the following conditions: Ωcp( 0 ) = 0 , for cp = 1,...,N CP ' Ωcp (ρk ) = δq,k , for cp = 1,...,N CP ; k = 1,...,N CP

(15)

The ODE’s are written at each collocation point with each finite element by introducing a variable for each statederivative. Continuity constraints are imposed at the boundaries of each finite element, and at the boundaries of each quarter cycle time slot. IV. NLP FORMULATION A. System Constraints The discretization based on collocation and finite elements leads to a set of algebraic equations that represent the system dynamics (described in Section II) in the NLP formulation as equality constraints. Additional equality constraints that apply are the definition of the mass fraction for each component,

constraints that preserve physical continuity across quarter cycles, and constraints that model the differential variables within the collocation. Details on the resulting equalities can be found in Appendix II. Additionally, the length of time slot was also bounded by appropriate values to avoid getting trivial solutions (with zero length of time slots). Lastly, at the end of Air-Save step, pure vacuum cannot be attained and the bed fluid phase can only reach a certain minimum pressure. So we define a minimum total concentration corresponding to that attainable pressure. Moreover, in order to prevent loss of oxygen and inert into the CO2 accumulator, a maximum total concentration is also defined. B. Objective Function Development The classical objective function used in linear and nonlinear MPC is reference state trajectory tracking. For complex, hybrid systems, such as the subject of study in this paper, such an objective function may not be sufficient to address the desired trade-off between long-term nominal stability and short horizon of control calculation. We used a systematic iterative procedure to develop an appropriate NMPC objective function. The first two steps gave us an initial quadratic function with the basic regulation objective; the rest were arrived at to ensure robustness of safe performance: 1) Follow set point of CO2 in the cabin. 2) Follow set point of O2 in the cabin. 3) Avoid excessive switching. 4) Maximize the clean-up of CO2 from the adsorber bed solid phase, over the Desorb step duration. 5) Maximize the amount of CO2 in the accumulator, by the end of the Desorb steps (regardless of bed identity). 6) Minimize the absolute amount of solid phase loading of CO2 by the end of the Desorb step. Consequently, the NMPC objective takes the following form: Minimize w1

∑ ∑ (y

C (CO 2 , i, i∈I fe∈FE ,cp∈CP

+ w2

∑ ∑ (y

− w3

∑ T (i)

fe, cp) − y C* (CO 2 )

C (O 2 , i , i∈I fe∈FE ,cp∈CP

fe, cp) − y C* (O 2 )

)

2

)

2

(16)

i∈I

− w4

∑ ∑(Q(c, i, j, N

FE ,

N CP ) − Q 0 (c, i, j )

c = CO2 (i , j )∈BD

− w5

∑ ∑Q

A ( c, i,

)

2

N FE , N CP )

c = CO2 (i )∈ID

+ w6

∑ ∑Q(c, i, j, N

FE , N CP )

c = CO2 (i , j )∈BD

subject to the set of constraints described in words in subsection IV.A (see Appendix II for details). The physical restrictions of the system define system parameters and limits on the control and manipulated variables (Tables 2 and 3).

5 Together, they define controller feasible space. The initial conditions (Table 4) and model parameters (Table 5) are also defined for the NMPC. The control problem horizon was chosen to be 4 quarter cycles (i.e. effectively one full cycle).

TABLE 2: SYSTEM PARAMETERS

Name rads ( j , CO2 ) rdes ( j , CO 2 ) rC (CO2 ) - rC (O2 ) y C* (CO2 ) y C* (O2 )

Description Rate of adsorption of adsorber j (g/hr) Rate of desorption of adsorber j (g/hr) Rate of CO2 generation (4 crew) in the cabin (g/hr) Rate of O2 consumption (4 crew) in the cabin (g/hr) set point (in % mass fraction) of cabin CO2 level set point (in % mass fraction) of cabin O2 level

Values 166.28

Q U (CO2 , j ) Q UA (CO2 ) VC

Description CO2 uptake limit (solid phase) of adsorber j (g) storage limit of CO2 accumulator (g) Volume of the cabin (m3) 3

NCP

127.6 M

0.76 23.2

Values 498.95 45000 25 0.4

y CL (CO2 ) ,

Bounds on cabin CO2 level (% mass fraction)

0.59, 1.05

Bounds on cabin O2 level (% mass fraction)

22.5, 25.4

Bounds on volumetric flow in stream 1 (g/m3) Bounds on volumetric flow in stream 2 (g/m3) Upper bound of CO2 make-up stream (g/hr) Upper bound of O2 make-up stream (g/hr)

30, 50

y CU (O2 ) v1L , v1U v 2L , vU2 .U

m (CO2 ) . U

m (O2 )

0.1, 10

80 80

TABLE 4: INITIAL CONDITIONS

Name ρC0 (c, i0 ,1)

ρC0 (c, i0 ,1,1) ρC0 (c, i0 ,2,1)

Description Initial component densities in the cabin at start (g/m3) Initial component densities in adsorber A (j=1) at start (g/m3) Initial component densities adsorber B (j=2) at start (g/m3)

L U T AS , T AS

TDL , TDU

Volume of adsorber j (m )

y CL (O2 ) ,

Name NFE

152.72

Vj y CU (CO2 )

0

250

20000

TABLE 5: MODEL PARAMETERS

181.43

TABLE 3: PHYSICAL BOUNDS

Name

Initial mass (solid phase) of CO2 in adsorber A (j=1) (g) mass (solid Q 0 (CO 2 , i 0 ,2,1) Initial phase) of CO2 in adsorber B (j=2) (g) 0 Q A (CO 2 , i 0 ,1) Initial mass of CO2 in the accumulator (g)

Q 0 (CO2 , i0 ,1,1)

Values CO2 = 12.07 O2 = 279.35 Inert = 911.87 CO2 = 12.07 O2 = 279.35 Inert = 911.87 CO2 = 2.56 O2 = 410 Inert =1269

ρ L (CO2 ) , ρ U (CO2 )

Description Number of finite elements within a quarter-cycle time length Number of collocation points within each finite element Number of quarter cycles under consideration for NMPC Bounds on quarter-cycle time length for Air-Save mode (hr) Bounds on quarter-cycle time length for Desorb mode (hr) Minimum and maximum total bed concentration at the end of Air-Save mode (gm/m3)

Values 10 3 4 0.03, 0.2 0.03, 1.0 30, 40

The NLP optimization formulation was modeled using AMPL [9] and solved using CONOPT [10]. This NLP based controller was coupled with a MATLAB® [11] model of the VCCR system (the simulator) we developed, so that the control actions obtained after solving the NLP could be used to simulate the system in real time. While the desorb rate is higher than the adsorb rate, the system needs to spend sufficient time desorbing to prevent a run-away to solid phase saturation in the beds. Thus, when one of the beds is undergoing Adsorb, there is a physical motivation for the other bed to spend a higher fraction of this time interval in Desorb, over Air-Save. The third term in the objective function (16) does not discriminate between Desorb and AirSave steps. As such, there is no driver in the NMPC for cleaning up the beds, to ensure that future NMPC invocations are left with sufficient capacity of adsorption. This shortsightedness of limited horizon control calculation would eventually push the beds towards saturation, and would results in system failure. Thus we augment objective function with the fourth part to ensure that future NMPC invocations have adequate capacity of adsorption left in the adsorber beds. Note that the summation in the fourth term in the objective function (16) applies only to set BD. The fifth term in the objective function ensures removal of the desorbed CO2 from the fluid phase of the adsorber beds by transporting it to the accumulator. Finally, to avoid beds operating (oscillating) at high CO2 solid-phase levels we added the sixth term to the objective function. This way oscillation occurs at low CO2 solid-phase levels, so there is adequate capacity for adsorption in the face of unforeseen disturbances, which further allows more robust system operation.

6 Figure 3 shows the bed solid phase CO2 profiles (notional) with the objective function including all six terms.

B. Case Studies 1) We present the controller performance on an off-nominal condition: Cabin at very high CO2 concentration The primary goal was to study the effect of such extreme scenarios on the performance of the controller. For this case, the VCCR-NMPC system was simulated for about 160 hours. Figure 4 shows the carbon dioxide concentration (in % mass fractions) profiles. It takes the cabin CO2 concentrations to the desired set-point and maintains it around the set-point. A stable cyclic pattern is observed in solid phase concentration of both adsorber beds with 5 minute Air-Save mode and 1 hour Desorb mode. Thus, the NMPC demonstrates effective controller performance in the face of off-nominal initial concentrations in the cabin.

Fig. 3: Bed Solid Phase CO2 Profile

V. SIMULATION RESULTS A. Controller Tuning The multi-objective NMPC optimization formulation requires tuning of the weights for the six terms that occur in the objective function. The tuning exercise was carried out in two steps: first, taking into account the typical magnitudes of the contributions of the six terms to the objective, and then, factoring the relative importance of these goals. The CO2 concentration control was chosen as the most important goal. The performance of the controller with the tuned weights has been studied in a case study with a nominal initial condition of the system. The tuned weights of objective terms are listed in Table 6. The “baseline” tuning of weights gives good performance on all six objectives. It should be noted that, regardless of the actual choice of the weights in the objective function, the safety requirements are inherently satisfied in any feasible/optimal solution to the nonlinear program, as these are present as hard constraints in the formulation. In the presence of appropriately chosen weights in the objective, the controller seeks qualitatively better solutions, in addition to just feasibility – say, with the appropriate weight on the low bed CO2 driver, the controller maintains low average CO2 levels in the bed solid phase, and leads to long, stabilized, cycle-times.

Fig. 4: NMP Controller Performance with High Initial CO2 in the Crew Cabin.

VI. SIMPLE SWITCHING FEEDBACK CONTROLLER TABLE 6: TUNED WEIGHTS FOR OBJECTIVE TERM

Name w1 w2 w3 w4 w5 w6

Description Weight for CO2 control Weight for O2 control Weight for chattering control Weight for desorption driver Weight for CO2 driver Weight for low Bed CO2 driver

Values 10 0.05 1 0.1 0.01 1

To highlight the benefits in performance attainable through the systematic NMPC design procedure proposed in Section IV, we compare its performance with a simple switching feedback controller. The controller consists of ProportionalIntegral (PI) laws for regulating O2 and CO2 levels in the cabin, heuristic feedback laws for controlling volume flow rates and a switching rule. The PI laws regulating cabin O2 and CO2 levels through compensatory supplies respectively from the OGS and the accumulator are as follows:

7

)

(

)

(17)

where ρCref (CO2 ) = 6 g/m3 , ρ Cref (O2 ) = 285 g / m 3 ,

k p = 8, k i = 9 . The integrator states have saturation limits

)

v 2 = 5 ρ(CO 2 ,j )

m 3 hr

3

(18)

m hr

0 0 2

0.5

1

1.5

2

2.5

3

3.5

4

4.5

5

3

3.5

4

4.5

5

NMPC Controller

1.5

1

1 if ( S k − 1 = 1) ∧

0.5

0

(19)

[Q (CO ,1) = QU (CO ,1) ∨ Q (CO ,2) = 0] 2 2 2 Sk = 2 if ( Sk − 1 = 2) ∧ [Q (CO ,2 ) < QU (CO ,2) ∧ Q (CO ,1) > 0 ] 2 2 2 1 if ( S k − 1 = 2) ∧ [Q (CO ,2 ) = QU (CO ,2) ∨ Q (CO ,1) = 0] 2 2 2

0

0.5

1

1.5

2

2.5 Time (hrs)

Fig. 6: Comparison of Controller Performance in the Crew Cabin with One Active Adsorber (single side operation).

500

Bed 1 solid CO2

[Q (CO ,1) < QU (CO ,1) ∧ Q (CO ,2) > 0] 2 2 2 2 if ( Sk − 1 = 1) ∧

1

0.5

The rationale for the proportional control is to keep the blowing/pumping effort proportional to the quantity of CO2 in the fluid phase, and thus keep our efforts economical. Finally, the switching of adsorption from one bed to another is governed by the following rules:                           

Heuristic Feedback Controller

1.5 CO

(

v1 = 40 − 0.1 ρ Cref (CO 2 ) − ρ C (CO 2 )

2

2

 0  243.1 0 and  73.1  to prevent unachievable control inputs for     the CO2 and O2 supplies respectively. We have designed the speeds of the control action such that the control laws are not sensitive to the periodic sudden fluctuations of gas concentrations caused by the beds switching from Adsorb to Air-Save to Desorb. The adsorption and desorption volume flow rates (in effect the control of blower speed for adsorption and pump/compressor speed for desorption) are controlled by ‘proportional’ feedback:

before each invocation of the controller, and infers the condition of failure through parameter value updates. For the case where only a single bed is operational, Figure 6 shows the Cabin CO2 concentration profile and Figure 7 shows the time trace of adsorber bed solid phase CO2. From the profiles, it is evident that the VCCR-NMPC system can sustain for almost 5 hours, before the concentrations of O2 and CO2 hit the permissible limits. In contrast to this behavior, the heuristic feedback controller is able to sustain the system for 3.5 hours. The look-ahead capabilities of the NMP controller allow it to cope better in the face of failure. As seen in Figure 6 and Figure 7, while the NMP controller and the heuristicfeedback controller operate identically in the Adsorb mode, the NMP controller terminates the Desorb mode just correctly with the right volumetric flow rates, so that overall feasibility of the system is maintained for a longer duration.

Cabin x

(

k   m& (O2 ) = k p + i  ρ Cref (O2 ) − ρ C (O2 ) s  k   m& (CO2 ) = k p + i  ρ Cref (CO2 ) − ρ C (CO2 ) s 

Heuristic Feedback Controller

400 300 200 100 0

0

0.5

1

1.5

2

2.5

3

3.5

4

4.5

5

2.5

3

3.5

4

4.5

5

500

NMPC Controller 400 Bed 1 solid CO2

where S k = 1 plus adsorption into bed 1 and S k = 2 implies adsorption into bed 2. The switching law simply covers all possible cases and ensures that energy is not spent in trying to adsorb more into a saturated bed, or to desorb more CO2 away from an empty bed.

300 200 100

VII. CONTROLLER PERFORMANCE COMPARISON The critical failure modes in the VCCR system are single bed failure and degradation of adsorption/desorption rates. In studying the performance of the NMP controller for these two failure modes, it is assumed that the failure condition is known, and the corresponding failure-mode dynamic models are used inside the NMPC formulation. This assumption can be relaxed if we have a parameter estimation routine that runs

0

0

0.5

1

1.5

2

Time (hrs)

Fig. 7: Comparison of Controller Performance in Adsorber Bed 1 with One Active Adsorber (single side operation).

When the rates of adsorption and desorption reduce to half of their design values, the carbon dioxide adsorption rate in both adsorber beds fall below the generation rate in the cabin

8 and the crew cabin starts accumulating CO2 rapidly. As a result, the VCCR system can sustain with an optimal controller for approximately 1.2 hour, before CO2 concentration reaches the upper limit in the cabin (see Figures 8 and 9). The NMPC gives rise to a qualitatively different profile due to its look-ahead capability. But, it is important to note that both controllers exhibit similar performance with respect to time of failure, since this is a system limitation and no controller will be able to maintain safety in this extreme situation. Computation and execution time of NMP controller is of the order of few minutes, compared to few milliseconds for switched controller execution. While the simulations illustrate safe performance under nominal and off-nominal conditions, they do not prove overall safe performance. In the rest of the paper, we provide guarantees of safe performance for both the controllers. NMPC Controller 2

Cabin x

CO

1.1 1 0.9 0.8 0.7 0.6

0

0.2

0.4

0.6

0.8 Time (hrs)

1

1.2

CO

2

Heuristic Feedback Controller

Cabin x

We first derive the model of the VCCR system controlled by the switching PI controller [14] as a hybrid system using the framework presented in [16]. To handle the verification problem, we consider the setup in [15] and solve it using the tools in [17]. We present here only information relevant to this particular problem. 1) Problem Formulation The continuous state of a hybrid dynamical system evolves according to a set of continuous time differential equations determined by its discrete states, which in turn are governed by a discrete event process (such as a finite automaton). A hybrid system is a tuple H = (χ , L, X 0 , I , F , T ) with the following components.

1.2



1

0.8

0.6

vary outside the required levels. NMPC is not given in the closed form and thus can not be verified using any of the existing control validation tools. We approached safety verification of NMPC by establishing a Safe Operating Envelope (SOE) within which, the control actions are safe, for a given set of initial conditions. No safety guarantees can be made about control actions outside the bounds of the SOE. This approach will be described in the next section. On the other hand, performance of our simple switching PI controller can be verified using Barrier Certificates. Here we present this approach.

0

0.2

0.4

0.6Time (hrs) 0.8

1

1.2

Fig. 8: Comparison of Controller Performance in the Crew Cabin with Degraded Adsorbers (half adsorb/desorb rates).

χ ⊂ ℜ* is the continuous state-space.

• L is a finite set of locations. The overall state-space of the system is X = L × χ , and a state of the system is denoted by (l , x ) ∈ L × χ . •

X 0 ⊂ X is a set of initial states.



I : L → 2 χ is the invariant, i.e., the set of all possible continuous states while at location l.



F : X → 2 ℜ is a set of vector fields, one of each location.

100

NMPC Controller Bed 1 solid CO

2

80 60 40

0

0.2

0.4

0.6

0.8

1

1.2

Time (hrs) 100

Heuristic Feedback Controller 2

80 Bed 1 solid CO

T ⊂ X × X is a relation describing discrete transitions between two locations, when a guard relation is satisfied. The system evolves from the initial conditions in the set X 0 , and after a sequence of continuous flows and discrete transitions that are described by the map T. A set of unsafe states is denoted X u ⊂ X . In addition, for each location •

20 0

n

60 40 20 0

0

0.2

0.4

0.6

0.8

1

1.2

Time (hrs)

Fig. 9: Comparison of Controller Performance in Adsorber Bed 1 with Degraded Adsorbers (half adsorb/desorb rates).

VIII. CONTROLLED SYSTEM SAFETY VERIFICATION USING THE SUM OF SQUARES DECOMPOSITION Our task is to verify the safety of the controlled system, in particular to ascertain that the levels of CO2 and O2 do not

l ∈ L , we define the set of initial and unsafe continuous states as Init (l ) = {x ∈ X : (l , x ) ∈ X 0 } , Unsafe(l ) = {x ∈ X : (l , x ) ∈ X u } . To each tuple (l ′, l ) ∈ L × L

with l′ ≠ l , we associate a guard set Guard (l ′, l ) = {x ′ ∈ X : ((l ′, x ′), (l , x )) ∈ T } for some x ∈ X . The safety verification problem aims in deciding whether the system can reach a set of unsafe states X u ⊂ X . To answer this question, we use a recently developed approach, to construct Barrier Certificates [18].

9

Theorem 1

of the two beds and z 4 = m& O2 the make-up mass flow of O2 in

[15] Let the hybrid system H = (χ , L , X 0 , I , F ,T ) and the

the cabin. All the above quantities are in units of g/m3. Finally, we denote by x5 and x6 the weights in grams of CO2 in the solid phase of adsorber beds 1 and 2. The state x of the system is comprised of the states related to CO2 and O2 concentrations, x={x1,…,x6, z1,…,z4}. Figure 10 gives a pictorial representation of the hybrid system dynamics. Qmax is the maximum weight of CO2 that the bed can adsorb.

unsafe set X u be given.

Suppose there exists a barrier

certificate, i.e., a collection {Bl ( x )} of functions Bl (x ) for all

l ∈ L , each of which is differentiable with respect to its argument and satisfies

Bl ( x ) > 0

∀x ∈ Unsafe (1)

Bl ( x ) ≤ 0

∀x ∈ Init (1)

(20)

Initial Conditions

Mode 1:

(21)

∂Bl ( x ) f l ( x ) ≤ 0, ∀x ∈ I(1) s.t. B l ( x ) = 0, f l ⊂ F ∂x

x& = f 1 (x )

(23)

x6 ≤ 0.05Qmax

Mode 41: x& = f 41 (x )

Mode 21:

x2 ≤ 6

[15] Let the hybrid system H and the descriptions of all the sets I(l), Init(l), Unsafe(l) and Guard(l) be given. Suppose there exist polynomials B l (x ) , a positive number ε and of

sums

of

square

σ Unsafe(l ) (x ) ,

σ Init (l ) ( x ) ,

σ I (l ) (x ) and σ Guard (l ,l ′) (x ) and σ B′ l (x ) such that the following

(x )g Unsafe(l ) (x ) T − Bl ( x ) + σ Init (l ) ( x )g Init (l ) (x ) ∂B (x ) f 1 (x ) + σ IT(l ) (x )g I (l ) ( x ) − l ∂x

Invariant: x ≤ 0.99Qmax 5

x5 ≤ 0.05Qmax

x5 ≥ 0.95Qmax

Mode 4: x& = f 4 (x )

x& = f 3 (x )

Invariant: x5 ≥ 0.99Qmax x ≤ 0.01Q

Invariant: x2 ≥ 5.5

6

max

Mode 3:

x2 ≤ 6

Fig. 10: VCCR hybrid dynamics diagram

expressions:

Bl ( x ) − ε

x& = f 21 (x )

Invariant: x6 ≤ 0.99Qmax

Proposition 2

vectors

2

x ≥ 0.95Qmax 6

Then the safety of the hybrid system H is guaranteed.

Search for a barrier certificate can then be formulated as a Sum of Squares optimization problem, given by the following proposition:

Mode 2: x& = f (x ) Invariant: x5 ≤ 0.99Qmax x ≥ 0.01Qmax 6

Invariant: x3 ≥ 5.5

(22)

∃ l′ ∈ L s.t. x ∈ Guard (l′, l), B l′ ( x ) ≤ 0

x3 ≤ 6

T + σ Unsafe (l )

(24) (25) (26)

T − Bl (x ) + σ Bl′ ( x )Bl ′ (x ) + σ Guard (l,l′ ) ( x )g Guard (l ,l ′ ) ( x ) (27)

are sums of squares for each l , l ′ ∈ L2 , l ≠ l ′ . Then the safety of the hybrid system H is guaranteed.

IX. CONSTRUCTING BARRIER CERTIFICATES FOR VCCR SYSTEM In order to apply the above proposition, we have to introduce the initial and unsafe sets, the invariant sets for the various modes and the guard sets as semi-algebraic sets. We do so in the following more compact notation. We denote x1 = ρc(CO2), the concentration of CO2 in the cabin, x2 = ρc(CO2,1), x3 = ρc(CO2,2), the concentrations of CO2 in the fluid phase in Bed 1 and Bed 2 respectively andֹ x 4 = m& co2 the make-up mass flow of CO2 in the cabin. Similarly, we denote all states related to concentration of O2 as z 1 = ρ c (O 2 ) , O2 concentration in the cabin, z 2 = ρ (O 2 ,1) and z 3 = ρ (O 2 ,2 ) the concentrations of O2 in the fluid phase

The initial conditions will be assumed to be in the following set:

{

X0 = x ∈ χ

(x1 − 9 )2 + (x2 − 9 )2 + ( x3 − 25)2 + (x4 − 16 )

2

- 0.5 2 ≤ 0,

(z1 − 280 )2 + (z2 − 280 )2 + ( z3 − 280 )2 2 + (z 4 − 80 ) − 52 ≤ 0, (x 6 − 20 )(x6 − 30 ) ≤ 0, (xl − 220 )(xl − 350 ) ≤ 0} (28) The unsafe set is given by:

X u = {x ∈ χ ( x1 − 7.1)( x1 − 126) ≥ 0,

(z1 − 271)(z1 − 305) ≥ 0}

(29)

If we assume that the inerts have a concentration of around 913 g/m3, then, in terms of mass fraction percentages, the above unsafe set corresponds to: CO2 in the range 0.59 – 1.05%. O2 in the rage 22.5 – 25.4%. We already mentioned that we assume that the system switches between 6 states, the intermediate state 21 and 41 shown in Fig. 10 take into account the saturations in the beds. In all modes, part of the invariant set is described by:

10

I com = {x ∈ χ (x 1 − 9 ) + ( x 2 − 7 ) + ( x3 − 7 ) 2

2

2

+ (x 4 − 16) − 7 2 ≤ 0, 2

(z1 − 280)2 + (z 2 − 280)2 2 + ( z 3 − 280) − 40 2 ≤ 0, z 4 ( z 4 − 200) ≤ 0}

(30)

For the various modes, based on state variables, constraints and definitions of modes, we further have:

 5,5 − x3 ≤ 0, x5 (x5 − Qmax ) ≤ 0  I 1, p = x ∈ χ  x6 ( x4 − Qmax ) ≤ 0     x (x − 0.99Qmax ) ≤ 0, I 2, p = x ∈ χ 5 5 (x6 − 0.01Qmax )(x6 − Qmax ≤ 0) 

 x (x − 0.99Qmax ) ≤ 0, I 21 , p = x ∈ χ 5 5  x6 (x6 − 0.01Qmax ) ≤ 0    5.5 − x2 ≤ 0, x5 (x5 − Qmax ) ≤ 0,  I 3, p = x ∈ χ  x6 (x6 − Qmax ) ≤ 0  

 (x − 0.01Qmax )(x5 − Qmax ) ≤ 0,  I 4, p = x ∈ χ 5  x6 (x6 − 0.99Qmax ) ≤ 0  

inherent stiffness in the systems, i.e., having fast and slow dynamics, or even states that take values in different orders of magnitude. To alleviate this problem, we re-scale all states so that they are the same order of magnitude.

2) Verification Result Given the initial, unsafe, invariant and guard sets, a quadratic set of Barrier functions was constructed that proves the safety of the system. The same verification was performed with bed one degraded and its adsorption rate rads (CO 2 ,1) set to 155 g/hr. The control law provides safe functionality in this case too, which is verified by constructing a Barrier certificate.

X NMPC SAFETY VERIFICATION USING STATISTICAL LEARNING THEORY

(31)

 x (x − 0.99Qmax ) ≤ 0, I 41 , p = x ∈ χ 6 6  x5 (x5 − 0.01Qmax ) ≤ 0  

The invariant set for each mode is then I l = I com ∩ I l , p . Switching between the various modes happens when the state in the particular mode finds itself in the guard set. The guard sets are depicted in Fig. 10, and reproduced here for convenience: Guard (1,2 ) = {x ∈ χ x3 − 6 ≤ 0}

Guard (2,21 ) = {x ∈ χ x6 (x6 − 0.05Qmax ) ≤ 0}

Guard (21 ,3) = {x ∈ χ (x5 − 0.95Qmax )(x5 − Qmax ) ≤ 0} (32) Guard (3,4 ) = {x ∈ χ x 2 − 6 ≤ 0}

Guard (4,41 ) = {x ∈ χ x5 ( x5 − 0.05Qmax ) ≤ 0}

Guard (41 ,1) = {x ∈ χ ( x6 − 0.95Qmax )( x6 − Qmax ) ≤ 0} 1) Computational Considerations The system consists of 6 modes with a ten dimensional continuous state space in each. The vector fields are polynomial in their variables, which facilitates the use of the Sum of Squares decomposition for the analysis, and are of highest order 2. What is required therefore is to construct 6

functions Bl as required by Proposition 2 and have 4 SOS conditions for each one of them. All conditions but condition (27) are of order 2 if B is of order 2. Condition (27) will be higher order than the rest. In fact, with 10 state variables, the size of the LMI that is produced by this setup is on the boundary of what can be solved using any current SDP solver [20]. Another problem that appears in such computations is

Given that NMPC design approach doesn’t result in a closed form controller, but an algorithm, to conduct it’s safety verification is equivalent to establishing a Safe Operating Envelope (SOE) within which, the control actions are safe, for a given set of initial conditions. Safety verification is thus posed as essentially a problem of binary classification, where a “good” classifier can make a decision about a set of the initial conditions and categorize it into class Y : “safe” or “not safe” ( Y = {+1, -1}). The “goodness” of the classifier is determined by the number and severity of its misclassifications, where false positives are considered more serious errors (where the classifier would erroneously categorize a certain set of inputs as safe under all conditions) than false negatives (which merely mean the classifier is being very conservative and maybe affecting performance). The SOE for a system is determined from a framework based on Statistical Learning Theory [21]. The SOE is “learned” from a set of simulation training samples, thus the system is safe with only a finite statistical guarantee. The verification framework computes these statistical guarantees from Vapnik Chervonenkis style generalization bounds [23]. The basic learning problem is: given a set of inputs X and corresponding output set Y, determine function which maps X to Y, with minimum error. Mathematically, this is represented as follows: Let H be the space set of hypothesis functions that maps X to Y (in other words, the set of possible classifiers). We define a training sample set Sn of size n, defined over input space X and output space Y, drawn according to a fixed unknown probability function (F(X,Y)) on Z = X × Y, such that S n = {( x i , y i )}in=1 ∈ Z n

(33)

For a hypothesis h, such that h ∈ H we define a loss of hypothesis l(h) as l : YxY → ℜ l (h ) = ∫ l (h(x ), y )dF ( x , y ) (34) In the verification framework, we define this loss to be the weighted classification error where:

11

 0 , h( x ) = y

 l ( ρ ) (h(x ), y ) =  ρ , h( x ) = −1, y = 1,0 ≤ ρ ≤ 1 1, h( x ) = 1, y = −1 

(35)

That is, the loss is zero, if the hypothesis result matches the true value of y for a given set x, it is 1 if the hypothesis gives a false positive and is a value ρ, which is the value of the weight given to a false negative. If ρ = 1, this reduces to an unweighted classification error. When ρ =0, the loss function l reduces to the probability of making a false positive error. Based on the actual and empirical classification error, and on learning parameters ε and δ, (where 1-δ is the confidence that the probability of the error is less than or equal to the specified tolerance ε), an error metric to give a fundamental upper limit on the probability of the maximum classification error being less than the specified tolerance ε, is defined as follows [21]:

  P sup l (h ) − lemp (h) ≥ ε  ≤ 1 − δ h∈H  

(36)

We can determine the minimum number of training samples required to train a hypothesis, such that the required statistical guarantees of safety (given by ε and δ) are satisfied [22].

B. Classifiers Based on the structure of the input space, different classifiers can be used for hypothesis generation such as hyperplane or hyperrectangle classifiers, support vector machines, neural networks etc. The tool that was used for this analysis supported the following classifier: 1) Separating Hyperplanes A hyper-plane in an n-dimensional space is characterized by the linear equation: α 1 x1 + α 2 x 2 + α 3 x 3 + ..... + α n x n + α n +1 = 0 (37) and divides the space into two sides: points that lie on one side of the plane are classified as acceptable, while points that lie on the other side are classified as unacceptable. A 0-1 classifier function can thus be formulated as (1 + sign(α 1 x1 + α 2 x 2 + α 3 x 3 + + α n x n + α n+1 )) 2 (38) 2) Bounding Hyperrectangles A hyper-rectangle in an n-dimensional space is characterized by the following bounds: α ilb ≤ x i ≤ α iub for i = l...n (39) The hyper-rectangle divides the space into two regions. The region enclosed by the hyper- rectangle is safe or acceptable. The region falling outside the hyper-rectangle is classified as unsafe. In the statistical verification tool developed in [21], a heuristic approach is used to determine the best hypothesis for the above two classifiers, that have zero false positives and minimum false negatives. 3) Support Vector Machines Support vector machines, (foundations of which were laid by [23]) are learning machines that can perform binary

classification (pattern recognition) and real valued function approximation (regression estimation) tasks. Support Vector Machines non-linearly map their n-dimensional input space into a high dimensional feature space. In this high dimensional feature space, a linear classifier is constructed. In the case where the data can be represented by a linear function, construction of a separating hyper-plane is relatively straight forward. In the case where a linear boundary is inappropriate, the SVM can map the input vector, x, into a high dimensional kernel space, z. By choosing a non-linear mapping a priori, the SVM constructs an optimal separating hyper-plane in this higher dimensional space. Some common kernels used are polynomials, radial basis functions and sigmoid functions. An excellent tutorial on Support Vector Machines is given in [24] and is recommended for further reading. X. SAFETY VERIFICATION OF THE NMP CONTROLLED VCCR USING SLT Safety specifications of the VCCR system require that the O2 and CO2 concentrations in the cabin stay within the specified upper and lower bounds. The aim of our verifier is to ensure that the controller maintains the safety condition, for different initial and operating conditions in the system. Our safety criteria have been defined as follows: • For off nominal initial or operating conditions, the NMPC must maintain cabin feasibility for at least 12 hours • For failure conditions, i.e. single side operations, the NMPC must maintain cabin feasibility for at least 4 hours. The statistical verification framework provides offline verification, the experimental set up for which is discussed in the next sub-section.

A. Experimental Set Up The following 8 input parameters affect the cabin CO2 and O2 concentrations: • Initial CO2 and O2 concentrations in the cabin • Initial CO2 concentration in the solid phase of each adsorber bed • Adsorption (and corresponding desorption) rates in the beds Limitations on the simulation time required per sample governed the choice of the number of input parameters for our experiments. We wanted to use the minimum number of training samples for training, while at the same time, ensuring that the hypothesis space derived takes into account the interactive effects of all the input parameters on the output. For each experimental block 2 parameters were allowed to vary between their lower and upper limits, while the rest of the parameters, were fixed at nominal, high or low operating conditions. This allowed us to analyze the individual effects of the varying inputs, at different level settings or initial conditions in the system. A second set of experiments was

12 conducted for single side operations, where the parameters varied were the initial concentrations of CO2 and O2 in the cabin, with the rest of the input parameters staying at the nominal values (except for the adsorption and desorption rates for the non-functioning bed).

constant at 911.87 g/m3. The pressure within the cabin was also assumed constant at 1 atmosphere.) The adsorption rates (and corresponding desorption rates) in the beds were varied between half nominal rate to nominal rate, i.e.

B. Verification Analysis and Results: In our analysis, we conducted tests that show that NMP controller is able to regulate the system to a regular cyclic pattern within the stipulated safety time limit. The scenarios of interest that were verified using SLT are those which represent fault or off–nominal conditions i.e. varying adsorption rates at high initial concentration in the cabin and in the beds. Also, verification for single side operations has been studied. The results for these are discussed below:

84.141 ≤ riads ≤ 168.282 , i = 1,2 (40) Assuming a linear correlation between the adsorption and desorption rates, the corresponding desorption rates for the beds, were varied between 90.7 ≤ rides ≤ 181.4 , i = 1,2 (41) This scenario was of interest as it is studying the performance of the controller under two simultaneous extreme operating conditions: when the cabin concentrations are very high to start with and both beds are not able to adsorb or desorb at full rate.

TABLE 7 HYPOTHESIS SUMMARY Case I: (a) Bounding Hyperrectangle Classifier Number of Training Samples: 1097 Error Tolerance. 6.0% Confidence 95% False Positives: 0; False Negatives: 47 Hypothesis: 154.84<= r1ads <=168.18; 150.05<= r2ads <=166.71 Case II: (a) Hyperplane Classifier Number of Training Samples: 1141 Error Tolerance 5.13% Confidence 95% False Positives: 0 False Negatives 208 Hypothesis: (1 r1ads) + (0 r2ads) +(-168.282) = 0 (b) Bounding Hyperrectangle Classifier Number of Training Samples: 1097 Error Tol 6.4% Confidence 95% False Positives : 0 False Negatives 58 Hypothesis: 147.82<= r1ads <=166.9;145.3208<= r2ads <=167.9 Case III: (a) Hyperplane Classifier Number of Training Samples: 1141 Error Tolerance 5% Confidence 95% False Positives : 0 False Negatives: 1273 Hypothesis: (-0.68 ρcinit (CO2 ) )+(0.024 ρcinit (O2 ) +(-1.3) = 0 (b) Bounding Hyperrectangle Classifier Number of Training Samples: 1097 Error Tolerance 5.85% Confidence 95% False Positives: 0 False Negatives: 90 Hypothesis: 7.83<= ρcinit (CO2 ) <=9.6;272.36<= ρcinit (O2 ) <=304.6 Number of Test Samples for each case :

500

1) Case I: High Initial CO2 and O2 Cabin Concentration, with Varying Adsorption and Desorption Rates For this case, the initial concentrations in the cabin were set at the upper specification limit: CO2: 12.07 g/m3 O2: 279.35 g/ m3 (the inert concentration was assumed

2) Case II: High Initial CO2 Holdup in Adsorber Beds, with Varying Adsorption and Desorption Rates For this case, the initial concentrations in the cabin were kept at nominal values, but the concentration of CO2 in the bed that is first in the Desorb cycle, was set at a high initial value - set at the upper specification limit: CO2: 400 g/m3 As in the previous case, the adsorption rates (and corresponding desorption rates) in the beds were varied between half nominal rate to nominal rate. This scenario was also of interest as it is studying the performance of the controller under two simultaneous extreme operating conditions: when the adsorption bed is are very high to start with and both beds are not able to adsorb or desorb at full rate. The hypotheses obtained by hyperplane and hyperrectangle analysis methods are shown in Table 7. The SVM analysis for this problem did not show a marked improvement in the statistical guarantees or in the performance on test samples. 3) Case III: Single Side Operations In this case, we studied the performance of the NMPC, when one adsorber bed is not functioning, the second bed is adsorbing and desorbing at the nominal rate and the initial concentrations of CO2 and O2 in the cabin are varied between the upper and lower bounds. A study of the VCCR-NMPC system showed that it could sustain a single side operation for 5 hours, when operating at nominal initial conditions, before the system reaches its physical limits. Based on this observation, we set the safety criterion for the NMPC –VCCR system to sustain feasibility under varying initial conditions to be at least 4 hours. The hypotheses obtained by hyperplane and hyperrectangle analysis methods are shown in Table 7. SVM analysis of the system did not show improved results and showed one false positive on the test samples. 4) Summary We studied several scenarios for safety verification of the VCCR system controlled by the NMPC. For each scenario, the verifier hypothesized the following safety bounds (based

13 on the findings from the hyperrectangle analysis), shown in Table 8. TABLE 8 SUMMARY TABLE FOR STATISTICAL VERIFICATION RESULTS Case Input Range Initial State Hypothesis Statistical Summary Guarantee I

adsorb rates 84.14<= riads <= 168.28

HIGH Initial CO2,O2 in Cabin

II

adsorb rates 84.14<= riads <= 168.28,

HIGH Initial CO2 Holdup in Beds

III

Initial CO2, O2 in Cabin

Single Side Operations

154.8<= r1ads <=168.2 150.1<= r2ads <=166.7 147.8<= r1ads <=166.9 145.32<= r2ads <=167.9 7.83<= ρ cinit (CO2 ) <=

9.6 272.36<= ρcinit (O2 ) <=304.

95 % Confidence 0.06 Error Bound 95 % Confidence 0.06 Error Bound 95 % Confidence 0.059 Error Bound

to be less tight than those found by theoretical methods (Barrier Certificates). The safety bounds depend on the definition of the safety criteria used for training the verifier and also on the statistical guarantees obtained from the system. This flexibility makes this method widely applicable to a wide variety of domains of increasing complexity and size. The computation of barrier certificates, given the order of the certificates and the dimension of the state space, takes polynomial time. Our computations took two hours on average for 2nd order barrier certificates for a system with ten states. The time needed for Statistical verification largely depends upon the time needed to simulate the system and generate the number of samples needed for the fidelity required. In our case, these simulations took a couple of months.

6

ACKNOWLEDGMENT XI CONCLUSION We have modeled the VCCR as a hybrid dynamical system, developed two control designs for it and verified their safety. Our NMPC design exploits the fact that the sequence of modes through which the system transitions is fixed, and therefore does not need to use logical or integer variables. Such a view appears general enough to address a broad class of nonlinear hybrid systems, which exhibit a structured pattern of switching across modes. We illustrated a systematic method of objective function engineering for the NMPC regulation problem to ensure long term safe performance for a fixed, short horizon of control computation. To benchmark NMPC performance we designed simple switching PI controller. We also demonstrated the use of Barrier Certificates as a method to verify safe performance of the switching PI controller. Recent progress in the construction of Barrier Certificates for proving safety of dynamical systems helped us find an appropriate framework for safety verification of the life support system controlled by the switching controller. Though the controller and its switching rules are simple, we do not have a closed form expression for the equilibrium sets of the closed loop hybrid system, and hence Lyapunov stability analysis and computation of region of attraction are impossible. Construction of a barrier certificate for the controlled system proves that it will not escape into unsafe operating regions. Though we were able to provide a barrier certificate for our controlled system, we were on the limits of what could be achieved with current computing capabilities on a desktop (10 states with 6 discrete modes). There are also numerical difficulties in scaling semi-definite programming to larger dimensional problems. Next, a statistical approach was used to verify the safety performance of the NMPC, under various failure operating conditions. This approach is a good trade off between exhaustive enumeration of all possible scenarios on one hand and rigorous numerical or formal methods on the other. The safety bounds determined by the statistical verifier were found

The Authors wish to thank our program monitor, Dr. Robert Morris, NASA Ames Research Center, for his support, suggestions and encouragement throughout the course of this project. APPENDIX I

Notation: Subscripts Component C I Quarter-cycle time slot J Absorber bed Fe Finite element within a quarter-cycle Cp Collocation point within a finite element Notation: Variables 1. Adsorber Beds Fluid phase concentration of component ρ ( c, j ) c in adsorber bed j ρ (c, i, j , fe, cp) Fluid phase concentration of component c in adsorber bed j at collocation point cp within finite element fe in time slot i Fluid phase concentration of component c ρ 0 (c, i, j , fe) in adsorber bed j at the start of finite element fe in time slot i Gra ρ (c, i, j, fe, cp) Gradient of the fluid phase concentration of component c in adsorber bed j at collocation point cp within finite element fe in time slot i Solid phase mass of component c in Q ( c, j ) adsorber bed j Solid phase mass of component c in Q(c, i, j , fe, cp) adsorber bed j at collocation point cp within finite element fe in time slot i 0 Solid phase mass of component c in Q (c, i, j , fe) adsorber bed j at the start of finite element fe in time slot i Gra Q (c, i, j , fe, cp) Gradient of the solid phase mass accumulation of component c in adsorber bed j at collocation point cp within finite element fe in time slot i

14 2.

ρ C (c )

Cabin

APPENDIX II

Concentration of component c in crew cabin Concentration of component c in crew ( , , , ) ρ C c i fe cp cabin at collocation point cp within finite element fe in time slot i 0 Concentration of component c in crew ρ C (c, i, fe) cabin at the start of finite element fe in time slot i Gra ρ C (c, i, fe, cp) Gradient of the concentration of component c in crew cabin at collocation point cp within finite element fe in time slot i Mass fraction of component c in crew cabin yC (c, i, fe, cp) at collocation point cp within finite element fe in time slot i 3. Accumulator Mass of component c in the accumulator Q A (c ) Mass of component c in the accumulator at Q A (c, i, fe, cp) collocation point cp within finite element fe in time slot i 0 Mass of component c in the accumulator at Q A (c, i, fe) the start of finite element fe in time slot i Q AGra (c, i, fe, cp) Gradient of mass of component c in the accumulator at collocation point cp within finite element fe in time slot i 4. Flow Streams Total mass flow rate from the cabin to v1 , v1 (i ) adsorbing bed, in time slot i Total mass flow rate from air-saving or v 2 , v2 (i ) desorbing bed, in time slot i . Mass flow rate of component c into the m(c) , m& (i, c ) crew cabin, in time slot i 5. Time Time duration of quarter-cycle time slot i T (i )

The discretized set of algebraic equations transform into constraints that represent the dynamics in the NLP formulation. The crew cabin material balance in the Air-Save mode, for example, takes the following form upon discretization:

(

)

VC ρ CGra (c, i, fe, cp) =

v1 (i )(ρ (c, i, j , fe, cp) − ρC (c, i, fe, cp) )    + rC (c) + v2 (i ) ρ (c, i, j ' , fe, cp) + m& (i, c) ∀i ∈I , fe ∈ FE , cp ∈ CP, c ∈ C ,

(42)

(i, j , j ' ) ( j ≠ j ' , & (i, j ) ∈ B A ,&(i, j ' ) ∈ B AS ).

Similar discretization is carried out on all the remaining material balance differential equations. The constraints that model the continuity conditions across the quarter-cycle time slots in the discretized model are as follows:

ρC0 (c, i,1) = ρC (c, i − 1, N FE , N CP ) QA0 (c, i,1) = QA (c, i − 1, N FE , N CP )

(43)

∀ i∈I | i > i0 , c ∈ C

ρ 0 (c, i, j ,1) = ρ (c, i − 1, j , N FE , N CP ) Q 0 (c, i, j ,1) = Q (c, i − 1, j , N FE , N CP )

(44)

∀ i∈I | i > i0 , j ∈ J , c ∈ C To determine variable values at every collocation point within finite elements, following constraints are obtained for the crew cabin concentrations, for example:

ρ C (c, i, fe, cp) = ρ C0 (c, i, fe) T (i ) + N FE

NCP

∑ Ω(cp', cp)[ρ

Gra C (c , i ,

fe, cp' )]

cp ' =1

Time point corresponding to the end of Q (c, i, fe, cp) = Q 0 (c, i, fe) (45) A A finite element fe in time slot i NCP Time point at collocation point cp within + T (i ) τ i , fec,,cp Ω(cp' , cp)[Q AGra (c, i, fe, cp' )] N FE cp ' =1 finite element fe in time slot i Time point corresponding to the start of ti , 0 ∀i ∈ I , fe ∈ FE , cp ∈ CP, c ∈ C time slot i Similar constraints are obtained for the adsorber bed Time point corresponding to the end of t i, f concentrations. time slot i Lastly, the constraints that model the continuity conditions across finite elements take the following form for the crew Notation: Parameters cabin concentrations, for example: Rate of generation of component c in the r (c)

t i , fe



C

ρ C0 (c, i, fe) = ρ C0 (c, i, fe − 1)

Vj

crew cabin Rate of adsorption of component c in adsorber bed j Rate of desorption of component c in adsorber bed j Fluid phase volume of adsorber bed j

Q A0 (c, i, fe) = Q A0 (c, i, fe − 1)

VC

Crew cabin volume

+

Ω(cp, cp' )

Multipliers for Cubic Roots for collocation

rads ( j , c) rdes ( j , c)

+

T (i ) N FE

T (i ) N FE

NCP

∑ Ω(cp', N

Gra CP )[ ρ C (c, i ,

fe, cp' )]

cp ' =1

(46)

NCP

∑ Ω(cp', N

Gra CP )[Q A (c, i ,

fe, cp' )]

cp ' =1

∀i ∈ I , fe ∈ FE | fe > 1, c ∈ C Similar constraints are obtained for the adsorber bed concentrations.

15 REFERENCES [1] [2]

[3] [4]

[5]

[6]

[7]

[8]

[9] [10] [11] [12]

[13]

Finn, C.: “Documentation of the BIO-Plex Baseline Simulation Model”, NASA Ames Research Center, January 20, 1999 Malin, J., Kowing, J., Schreckenghost, D.,Bonasso, P., Nieten, J., Graham, J., Fleming, L., MacMahon, M., Thronesbery, C.: “Multi-Agent Diagnosis and Control of an Air Revitalization System for Life Support in Space”, IEEE Aerospace, 2000. Bemporad, A., Morari, M.: “Control of Systems integrating logic, dynamics, and constraints”, Automatica, 35, Pages 407-427, 1999. Allgower, F. and Zheng, A., Eds., Nonlinear Model Predictive Control, vol. 26 of Progress in Systems and Control Theory, Birkhauser, Basel; Boston; Berlin, 2000. Subramanian, D., Ariyur, K., Lamba, N., Deshpande, R. and Glavaski, S.: “Control Design for a Hybrid Dynamic System: A NASA Life Support System”, Lecture Notes in Computer Science 2993, Hybrid Systems: Computation and Control, 7th International Workshop, HSCC 2004, Philadelphia, PA, USA, March 2004, Proceedings, pp 570-584. Raghunathan, A., Gopal, V., Subramanian, D., Biegler, L. and Samad, T., “Dynamic Optimization Strategies for 3D Conflict Resolution of Multiple Aircraft”, AIAA Journal of Guidance, Control and Dynamics, Volume 27, Number 4, Pages 586-595, July-August 2004 Ascher, U.M. and Petzold, L.R. “Computer Methods for Ordinary Differential Equations and Differential-Algebraic Equations”, SIAM, Philadelphia, PA, USA, 1998 Bader, G., and Ascher, U.”A new basis implementation for mixed order boundary value ODE solver,” SIAM J. Scientific Computing, Vol. 8, No. 4, 1987, pp. 483 Fourer, R., Gay, D., and Kernighan, B., "AMPL" The Scientific Press, South San Francisco, California, 1993. CONOPT solver by ARKI Consulting & Development A/S http://www.conopt.com Matlab, The MathWorks, Inc., http://www.mathworks.com/products/matlab/ Henzinger T., Ho P.H., and Wong-Toi H.,”Algorithmic Analysis of Nonlinear Hybrid Systems”,IEEE Transactions on Automatic Control, 1998, Volume 43, Number 4, pp.540-555 H. Wong-Toi, “The Synthesis of Controllers for Linear Hybrid Automata”. In Proceedings of the 36th Conference on Decision and Control. pp 4607-4612, December 1997.

[14] Glavaski S., Papchristodoulou A., and Ariyur K., “Safety Verification of Controlled Advanced Life Support System Using Barrier Certificates”, Lecture Notes in Computer Science 3414, Hybrid Systems: Computation and Control, 8th International Workshop, HSCC 2005, Zurich, Switzerland, March 2005, pp 306-322 [15] S. Prajna and A. Jadbabaie. “Safety Verification of Hybrid Systems Using Barrier Certificates”. In Hybrid Systems: Computation and Control, LNCS 2293, pp 477-492. Springer-Verlag, 2004. [16] R. Alur, C. Courcoubetis, N. Halbwachs, T. A. Henzinger, P.-H. Ho, X. Nicolin, A. Oliviero, J. Sifakis, and S. Yovine. “The Algorithmic Analysis of Hybrid Systems”. Theoretical Computer Science, 138:3-34, 1995. [17] S. Prajna, A. Papachristodoulou, and P.A. Parrilo. “SOS-TOOL – Sum of Squares Optimization Toolbox, User’s Guide”. Available at http://www.cds.caltech.edu/sostools and http://www.aut.ee.ethz.ch/~parrilo/sostools, 2002. [18] P. A. Parrilo. “Structured Semi-Definite Programs and Semi-Algebraic Geometry Methods in Robustness and Optimization”. Ph.D. Thesis, California Institute of Technology, Pasadena, CA, 2000. Available at http://www.mit.edu/~parrilo [19] L. Vandenberghe and S. Boyd. “Semi-Definite Programming”. SIAM Review, 38(1):49-95, 1996. [20] J. F. Sturm. Using SeDuMi 1.02, a MATLAB toolbox for optimization over symmetric cones. Optimization Methods and Software, 11-12:625653, 1999. Available at http://fewcal.kub.nl/sturm/software/sedumi.html [21] Binns, P. Elgersma, M. Ganguli, S. Ha, V. Samad, T., “Statistical verification of two non-linear real-time UAV controllers”. This paper appears in: Real-Time and Embedded Technology and Applications Symposium, 2004. Proceedings. RTAS 2004. 10th IEEE [22] Ha,V. and T. Samad, “Generalization Bounds for Weighted Binary Classification with Applications to Statistical Verification” , International Joint Conference on Artificial Intelligence (IJCAI'05), pp 722-727, August 2005. [23] V.N. Vapnik, "The Nature of Statistical Learning Theory", Springer-Verlag, New York, ISBN 0-387-94559-8, 1995. [24] C. J. C. Burges. “A Tutorial on Support Vector Machines for Pattern Recognition”. Knowledge Discovery and Data Mining, 2(2), pp 121167, Kluwer Academic Publishers, 1998.

A Nonlinear Hybrid Life Support System: Dynamic ...

develop control schemes for them have been pursued. The specific application domain for this work is advanced life support systems that are used ... a hybrid system, which form a sequence of four quarter-cycles that compose one full-cycle of ...

237KB Sizes 0 Downloads 281 Views

Recommend Documents

Nonlinear System Theory
system theory is not much beyond the typical third- or fourth-year undergraduate course ... Use of this material for business or commercial purposes is prohibited. .... A system represented by (5) will be called a degree-n homogeneous system.

A Study of Nonlinear Forward Models for Dynamic ...
644727) and FP7 European project WALK-MAN (ICT 2013-10). .... placement control for bipedal walking on uneven terrain: An online linear regression analysis.

Spaces of nonlinear and hybrid systems representable ...
Ri = (Rni , {Ai,σ}σ∈X,Ci,Bi), i = 1, 2, and assume that for i = 1, 2, Ri is a ... Bi = {Bi,j ∈ Rni. | j ∈ J}. ...... algebra. D. van Nostrand Company, Inc. New York, 1953.

and PD-PID Controllers for a Nonlinear Inverted Pendulum System
nonlinear problem with two degrees of freedom (i.e. the angle of the inverted pendulum ..... IEEE Region 10 Conf. on Computers, Communications, Control and.

Dynamics of a nonlinear electromechanical system with ...
Corresponding author. Tel.: +237-998-0567; fax: +237-222-262. ... magnet magnet stone stone magnet coupling magnet cool spring kn spring k1 x1 xn. C. R e(t).

Metrics and Topology for Nonlinear and Hybrid ... - Semantic Scholar
rational representation of a family of formal power series. .... column index is (v, j) is simply the ith row of the vector Sj(vu) ∈ Rp. The following result on ...

Realization Theory of Nonlinear Hybrid Sys- tems - Semantic Scholar
system such that the vector fields, reset maps and readout maps are in fact ... hybrid coalgebra realization We will prove that an input-output map cannot have a.

Metrics and Topology for Nonlinear and Hybrid ... - Semantic Scholar
power series Ψeo,ey and Seo based on the maps Ceo,ey and Peo, ... formal power series Seo ∈ R ≪ O∗ ≫ by defining Seo(ǫ)=1 for the empty word and.

Realization Theory of Nonlinear Hybrid Sys- tems
In the special case of nonlinear analytic systems both the finite Lie-rank and the ... out that existence of a realization by an analytic hybrid system implies that the ...

A Hybrid Learning System for Recognizing User Tasks ...
800. 900. 1000. 0.6. 0.65. 0.7. 0.75. 0.8. 0.85. 0.9. 0.95. 1. The number of features K. Precision. SVM .... erage is small and the same as the SVM when coverage is larger. For FB .... partment of Interior-National Business Center. The authors.

Hybrid contact lens system and method
Jun 8, 2006 - Chen, San Diego, CA (US); Joe Collins,. See application ?le for complete search history. Carlsbad, CA (US); Jerome Legerton,. 56. R f. Ct d.

Nonlinear Dynamic Inversion and Block Backstepping
10−2. 10−1. 100. 101. 102. (a) M1(I6 + P(s)C)−1N1 (nx to x) ω [rad/s] σm a x(. ˜ S. (iω. )) 10−2. 10−1 ..... Framework Programme Theme7 Transport, Contract no.

Nonlinear dynamic modeling of surface defects in ...
Aug 6, 2008 - defective bearing rotor systems as the parameters of the system changes. ..... period of T ¼ 1/Ovc where Ovc ¼ ZOvc is the varying compliance frequency, so that: ~UрtЮ ¼ ~Uрt ю TЮ. (18) ... This information is needed to ...

Dynamic, Nonlinear Feedback Regulation of Slow ...
Oct 22, 2008 - Health Mutant Mouse Regional Resource Center]. Animals were anes ... mV between the internal solution and the chamber solution, measured using a flowing 3 ... and pClamp 9 software (Molecular Devices). After obtaining the ... sion tube

Dynamic Resource Allocation in Hybrid Optical ...
Jun 14, 2015 - Department of Electrical and Computer Engineering,. National .... ing bandwidths for requests in Cloud and datacenter networks [15, 16]. In [15],.

Spatial Dependence, Nonlinear Panel Models, and ... - SAS Support
linear and nonlinear models for panel data, the X13 procedure for seasonal adjustment, and many ... effects in a model, and more Bayesian analysis features.

Dynamic Embedding of Virtual Networks in Hybrid ...
problem of embedding virtual networks on a hybrid datacenter, which translates to the joint ... Illustration of a hybrid optical-electrical datacenter network be created on-demand, ...... cation Academic Research Fund Tier 2 Grant No. MOE2013-.

Trama-A-Web-based-System-to-Support-Knowledge-Management ...
Try one of the apps below to open or edit this item. Trama-A-Web-based-System-to-Support-Knowledge-Management-in-a-Collaborative-Network.pdf.

Trama-A-Web-based-System-to-Support ... - Drive
Whoops! There was a problem loading this page. Trama-A-Web-based-System-to-Support-Knowledge-Management-in-a-Collaborative-Network.pdf.

SEIS: A Decision Support System for Optimizing ...
neural networks or other plug-in tools can access all the data .... Pilot Project (SWPP). It will be ..... visualization application that allows the proper visualization.

A Whole-Farm Planning Decision Support System for ...
13 Aug 1999 - CLIGEN's random number generator was replaced with. UNIRAN, which allows the control of stream numbers and has been thoroughly tested (Marse and Roberts, 1983). The CLIGEN module programs are run from FLAME by calling Windows applicatio

Specification of a Component-based Domotic System to Support User ...
more, scenario integration in the system should be au- tomatic and dynamic, in ... Few systems support more complex users requirements, but are based on ...