{'fraction_non_alphanumeric': 0.04016891543928314, 'fraction_numerical': 0.014265114841899268, 'mean_word_length': 4.686383601756955, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Particle Model Predictive Control: Tractable Stochastic Nonlinear Output-Feedback MPC

We combine conditional state density construction with an extension of the Scenario Approach for stochastic Model Predictive Control to nonlinear systems to yield a novel particle-based formulation of stochastic nonlinear output-feedback Model Predictive Control. Conditional densities given noisy measurement data are propagated via the Particle Filter as an approximate implementation of the Bayesian Filter. This enables a particle-based representation of the conditional state density, or information state, which naturally merges with scenario generation from the current system state. This approach attempts to address the computational tractability questions of general nonlinear stochastic optimal control. The Particle Filter and the Scenario Approach are shown to be fully compatible and -- based on the time- and measurement-update stages of the Particle Filter -- incorporated into the optimization over future control sequences. A numerical example is presented and examined for the dependence of solution and computational burden on the sampling configurations of the densities, scenario generation and the optimization horizon.


INTRODUCTION
Model Predictive Control (MPC), in its original formulation, is a full-state feedback law (see Mayne et al. (2000); Mayne (2014); Maciejowski (2002)). This underpins two theoretical limitations of MPC: accommodation of outputfeedback, and extension to include a compelling robustness theory given the state dimension is fixed. This paper addresses the first of these issues in a rather general, though practical setup.
There has been a number of approaches to output-feedback MPC, mostly hinging on the replacement of the measured true state by a state estimate, which is computed via Kalman filtering (e.g. Sehr and Bitmead (2016b); Yan and Bitmead (2005)), moving-horizon estimator (e.g. Copp and Hespanha (2014); Sui et al. (2008)), tube-based minimax estimators (e.g. Mayne et al. (2009)), etc. Apart from Copp and Hespanha (2014), these designs, often for linear systems, separate the estimator design from the control design. The control problem may be altered to accommodate the state estimation error by methods such as: constraint tightening as in Yan and Bitmead (2005), chance/probabilistic constraints as in Cannon et al. (2012) or Schwarm and Nikolaou (1999), and so forth. Likewise, for nonlinear problems, where the state estimation behavior is affected by control signal properties, the control may be modified to enhance the excitation properties of the estimator, as suggested in Chisci et al. (2001); Marafioti et al. (2014). Each of these aspects of accommodation is made in an isolated fashion.
The stochastic nonlinear output-feedback MPC algorithm presented in this paper is motivated by the structure of Stochastic Model Predictive Control (SMPC) via finitehorizon stochastic optimal control. The latter method requires propagating conditional state densities using a Bayesian Filter (BF) and solution of the Stochastic Dynamic Programming Equation (SDPE). By virtue of implementing a truly optimal finite-horizon control law in a receding horizon fashion, one can deduce a number of properties of the closed-loop dynamics, including recursive feasibility of the SMPC controller, stochastic stability and bounds characterizing closed-loop infinite-horizon performance, as discussed in Sehr and Bitmead (2016a).
Unfortunately, solving for the stochastic optimal outputfeedback controller, even on the finite horizon, is computationally intractable except for special cases such as linear quadratic Gaussian MPC because of the need to solve the SDPE, which incorporates the duality of the optimal control law in its effect on state observability. While the BF, required to propagate the conditional state densities, is readily approximated using a Particle Filter (PF), openloop solution of the SDPE results in the loss of the duality of the optimal control. While not discussed in this paper, this effect can be mitigated sub-optimally by imposing excitation requirements as in Chisci et al. (2001); Marafioti et al. (2014).
Approximately propagating the conditional state densities by means of the PF naturally invites combination with the more recent advances in Scenario Model Predictive Control (SCMPC), as discussed for instance by Blackmore et al. (2010); Calafiore and Fagiano (2013); Grammatico et al. (2016); Lee (2014); Mesbah et al. (2014);Schildbach et al. (2014). Scenario methods deal with optimization of difficult, non-convex problems in which the initial task is recast as a parametrized collection of simpler, generally convex problems. Random sampling of uncertain signals and parameters is performed and the resulting collection of deterministic problem instances is solved. The focus has been on full state feedback for systems with linear dynamics and probabilistic state constraints. The technical construction is to take a sufficient number of samples (scenarios) to provide an adequate reconstruction of future controlled state densities for design.
In contrast to solving the SDPE underlying the stochastic optimal control problem, the future controlled state densities in SCMPC are open-loop constructions. However, they present a natural fit combined with the particlebased conditional density approximations generated by the PF, where individual particles can be interpreted as scenarios from an estimation perspective. Moreover, while SCMPC is typically formulated in the linear case, the basic idea extends to the nonlinear case, albeit with the loss of many computation-saving features. In this paper, we propose and discuss this output-feedback version of SCMPC combined with the PF, which we call Particle Model Predictive Control (PMPC). Compared with the stochastic optimal output-feedback controller (computed via BF and SDPE), the PMPC controller is suboptimal in not accommodating future measurement updates and thereby losing both exact constraint violation probabilities along the horizon and the probing requirement inherent to stochastic optimal control. On the other hand, PMPC enables a generally applicable and, at least for small state dimensions, computationally tractable alternative for nonlinear stochastic output-feedback control.
The structure of the paper is as follows. We briefly introduce the problem setup in Section 2 and SMPC in Section 3 and proceed by introducing the PMPC control algorithm based on its individual components and parameters in Section 4. After describing the algorithm and its correspondence to SMPC, we use a challenging scalar nonlinear example to demonstrate computational tractability and dependence of the proposed PMPC closedloop behavior on a number of parameters in Section 5. The example features nonlinear state and measurement equations and probabilistic state constraints under significant measurement noise. Finally, we conclude with Section 6.

STOCHASTIC OPTIMAL CONTROL -SETUP
We consider receding horizon output-feedback control for nonlinear stochastic systems of the form (2) starting from known initial state probability density function, π 0|−1 = pdf(x 0 ). To this end, we denote the data available at time t by ζ t {y 0 , u 0 , y 1 , u 1 , . . . , u t−1 , y t }, ζ 0 {y 0 }. The information state, denoted π t , is the conditional density of state x t given data ζ t .
(3) We further impose the following standing assumption on the random variables and control inputs. Assumption 1. The signals in (1-2) satisfy: 1. {w t } and {v t } are sequences of independent and identically distributed random variables. 2. x 0 , w t , v l are mutually independent for all t, l ≥ 0. 3. The control input u t at time instant t ≥ 0 is a function of the data ζ t and given initial state density π 0|−1 .
Denote by E t [ · ] and P t [ · ] the conditional expected value and probability with respect to state x t -with conditional density π t -and random variables {(w k , v k+1 ) : k ≥ t}, respectively, and by k the constraint violation level of constraint x k ∈ X k . Our goal is to solve the finite-horizon stochastic optimal control problem (FHSOCP) In theory, solving the FHSOCP at each time t and subsequently implementing the first control in a receding horizon fashion leads to a number of desirable closedloop properties, as discussed in Sehr and Bitmead (2016a). However, solving the FHSOCP is computationally intractable in practice, a fact that has led to a number of approaches in MPC for nonlinear stochastic dynamics. We propose a novel strategy that is oriented at the structure of SMPC based on the FHSOCP, but numerically tractable at least for low state dimensions.
As a result of the Markovian state equation (1) and measurement equation (2), the optimal control inputs in the FHSOCP must inherently be separated feedback policies (e.g. Bertsekas (1995); Kumar and Varaiya (1986)). That is, control input u t depends on the available data ζ t and initial density π 0|−1 solely through the current information state, π t . Optimality thus requires propagating π t and policies g t , where u t = g t (π t ). (4) Motivated by this two-component separated structure of stochastic optimal output-feedback control, we propose an extension of the SCMPC approach to nonlinear systems, merged with a numerical approximation of the information state update via particle filtering. Before proceeding with this novel approach, we briefly revisit the two components of SMPC via solution of the FHSOCP.

STOCHASTIC MODEL PREDICTIVE CONTROL
The information state is propagated via the Bayesian Filter (see e.g. Chen (2003); Simon (2006)): for t ∈ {0, 1, 2, . . .} and initial density π 0|−1 . The recursion (5-6) has the following features: • The measurement update (5) combines the a priori conditional density, π t|t−1 , and pdf(y t | x t ), derived from (2) using knowledge of: the function h(·, ·), the density of v t , and the value of y t . • The time update (6) combines π t and pdf(x t+1 |x t , u t ), derived from (1) using knowledge of: control input u t , function f (·, ·, ·), and the density of w t . • For linear Gaussian systems, the filter recursion (5-6) reduces to the well-known Kalman Filter.
Combined with solution of the FHSOCP, this leads to the following SMPC algorithm, as discussed in Sehr and Bitmead (2016a).

5:
Measure y t

7:
Apply first optimal control policy, u t = g 0 (π t ) 8: Compute π t+1|t 9: end for Notice how this algorithm differs from common practice in stochastic model predictive control in that it explicitly uses the information states π t . Throughout the literature, these information states -conditional densities -are commonly replaced by state estimates. While this makes the problem more tractable, one no longer solves the underlying stochastic optimal control problem.The central divergence however lies in Step 2 of the algorithm, in which the SDPE is presumed solved offline for the optimal feedback policies, g t (π t ), from (4). This is an extraordinarily difficult proposition in many cases but captures the optimality, and hence duality, as a closed-loop feedback control law. The complexity of this step lies not only in computing a vector functional but also in the internal propagation of the information state within the SDPE.

TRACTABLE NONLINEAR OUTPUT-FEEDBACK MODEL PREDICTIVE CONTROL
In this section, we motivate a novel approach to outputfeedback MPC that maintains the separated structure of SMPC while being numerically tractable for modest problem size.

Approximate Information State & Particle Filter
The BF (5-6) propagates the information state π t to implement a necessarily separated stochastic optimal outputfeedback control law. While implementing this recursion precisely is possible only in special cases such as linear Gaussian systems, where the densities can be finitely parametrized, the BF can be implemented approximately by means of the Particle Filter, with the approximation improving with the number of particles, as described for instance in Simon (2006). In parallel with the BF, the PF consists of two parts: the forward propagation of the state density, and the resampling of the density using the next measurement.
The following algorithm describes a version of the PF amenable to PMPC in the context of this paper. This is a slightly modified version of the filter design described by Simon (2006).

4:
Compute the relative likelihood q p of each particle x − t,p conditioned on the measurement y t by evaluating pdf(y t | x − t,p ) based on (2) and pdf(v t ).

6:
Sample N p particles, x + t,p , via resampling based on the relative likelihoods q p .

7:
Given u t , propagate x − t+1,p = f (x + t,p , u t , w t,p ), where w t,p is generated based on pdf(w t ). 8: end for While a number of variations -such as roughening of the particles and differing resampling strategies, including importance sampling -of this basic algorithm may be sensible depending on the system at hand, this basic algorithm suffices in presenting a numerical method of approximating the Bayesian Filter to arbitrary degree of accuracy with increasing number of particles N p (see e.g. Smith and Gelfand (1992)). For a more detailed discussion on the PF for use in state-estimate feedback control, see Rawlings and Mayne (2009).

Scenario MPC and Particle Model Predictive Control
The Scenario Approach to MPC (e.g. Calafiore and Fagiano (2013) simulates, an open-loop controlled stochastic system with sampled process noise density pdf(w t ). These propagated samples are then used to evaluate controls for constraint satisfaction and for open-loop optimality with probabilities tied to the sampled w t densities. In many regards, this is congruent to repeated forward propagation of the PF via (6) without measurement update (5) and commencing from a singular density at x t orx t|t . Particle MPC simply replaces the starting point,x t|t , by the collection of particles {x + t,p , p = 1, . . . .N p } distributed as π t , as illustrated in Figure 1. Before introducing the PMPC algorithm, we define a sampled, particle version of the FHSOCP, with N s scenarios and N p available a posteriori particles at time t, means that x k+1,s ∈ X k+1 for at least (1 − k+1 )N s scenarios. Following the approach in Schildbach et al. (2013), one may also choose to replace this constraint by x k+1 ∈ X k+1 and select the number of scenarios N s according to the desired constraint violation levels k+1 . We are now in position to formulate the PMPC algorithm following the schematic in Figure 1.

4:
Compute the relative likelihood q p of each particle x − t,p conditioned on the measurement y t by evaluating pdf(y t | x − t,p ) based on (2) and pdf(v t ).

6:
Generate N p a posteriori particles, x + t,p , via resampling based on the relative likelihoods q p .

8:
Given u t , propagate x − t+1,p = f (x + t,p , u t , w t,p ), where w t,p is generated based on pdf(w t ). 9: end for

Computational Demand
Computational tractability of PMPC deteriorates with increasing: number of particles; number of scenarios; system dimensions; control signal grid spacing; MPC horizon. While the number of particles required for satisfactory performance of the PF grows exponentially with the state dimension (e.g. Snyder et al. (2008)), it is unclear how to select an appropriate number of scenarios in the nonlinear case. Suppose the state and input dimensions are n and m and that the numbers of particles and scenarios are chosen as N p = P n and N s = S n for positive integers P and S, respectively, and that the MPC horizon is N . Further assuming a grid of U m points in the control space and brute-force evaluation of all possible sequences, the order of growth for PMPC is approximately O(P n + S n U mN ).
Notice that the computational demand associated with the conditional density approximation in PMPC is additive in terms of the overall computational demand. This indicates that, provided the PF is computationally tractable for given state dimensions, tractability of PMPC is roughly equivalent to tractability of standard statefeedback SCMPC. In the example below, we found that scenario optimization tends to be the computational bottleneck at least for low system dimensions. Clearly, this observation holds only when the scenario optimization is performed by explicit enumeration of all feasible sequences over a grid in the control space, which may be avoided for particular problem instances. But the experience also confirms that in the nonlinear case the open-or closed-loop control calculation dominates the computational burden in comparison to state estimation.

NUMERICAL EXAMPLE
Consider the scalar, nominally unstable nonlinear system x t+1 = 1.5 x t + atan (x t − 1) 2 u t + w t , where x 0 , w t and v l are mutually independent random variables for all t, l ≥ 0 and x 0 ∼ U(1, 2), w t ∼ U(−2, 2), v t ∼ N (0, 5), for all t ≥ 0. We aim to minimize the quadratic cost function while satisfying the constraints P k+1 [x k+1 ≥ 1] ≥ 0.9, −5 ≤ u k ≤ 5, along the control horizon N , that is k ∈ {t, . . . , t + N − 1} for t ≥ 0. Notice how this system has both limited observability and controllability close to the constraint but infeasible unconstrained optimal states. In combination with the very noisy measurements, this is a challenging control problem. To implement PMPC as described in Section 4 for this nonlinear stochastic output-feedback control problem, we further restrict the control inputs to integer values, such that u t ∈ {−5, −4, . . . , 4, 5}. Figure 2 displays simulated closed-loop state trajectories, control values and measurement values for four PMPC controllers with differing parameters subject to the same realizations of process and measurement noise, respectively. Figure 2a displays closed-loop simulation results under PMPC with horizon N = 3, N p = 5, 000 particles and N s = 1, 000 scenarios. While the poor observability properties of the system show close to the probabilistic constraint, it is satisfied at all times in this simulation. This is still the case when decreasing the number of particles to N p = 100 in the simulation displayed Figure 2b. However, we see how in this case, the decreased accuracy of the PF leads to larger state-values in closed-loop. Similar behavior is observed in Figure 2c when reducing the number of scenarios to N s = 50. Additionally, the controller violates the probabilistic constraint 3 times in this case. This trend continues when reducing the horizon to N = 2, as displayed in Figure 2d.

CONCLUSION
We presented PMPC as a novel approach to outputfeedback control of stochastic nonlinear systems. Generating scenarios not only from the distribution of the process noise but also from the particles of the Particle Filter, PMPC combines the benefits of the Particle Filter and Scenario MPC in a natural fit, allowing for a numerically tractable version of stochastic MPC with general nonlinear dynamics, cost and probabilistic constraints. Given a particular system instance, the algorithm and its properties may be adapted to exploit specific problem structure. Such extensions include: sub-optimal probing via additional constraints; scenario removal; provable closed-loop properties such as constraint satisfaction with specified confidence levels; optimization over parametrized policies.