#
Fast Wavelet-Based Model Predictive Control of Differentially Flat Systems^{ †}

^{*}

^{†}

## Abstract

**:**

## 1. Introduction

## 2. Preliminaries

#### 2.1. Differential Flatness

_{1}, u

_{2},⋯, u

_{m}]

^{T}is the input, x = [x

_{1}, x

_{2},⋯, x

_{n}]

^{T}is the state and f(x, u) is a smooth vector field. The system Equation (1) is differentially flat if there exists a flat output z = [z

_{1}, z

_{2},⋯, z

_{m}]

^{T}with the same dimension being the input satisfying the three following properties:

- the elements of z are differentially independent;
- there exists an L-B isomorphic map Φ, such that:$$z=\Phi \left(x,\dot{u},\ddot{u},\cdots ,{u}^{\left(k\right)}\right)$$
- there exists an L-B isomorphic map Ψ = (Ψ
_{1}Ψ_{2})^{T}, such that:$$x={\mathrm{\Psi}}_{1}\left(z,\dot{z},\ddot{z},\cdots ,{z}^{\left(r\right)}\right)$$$$u={\mathrm{\Psi}}_{2}\left(z,\dot{z},\ddot{z},\cdots ,{z}^{\left(r+1\right)}\right)$$

#### 2.2. Haar Wavelets Approach to Operational Calculus

^{β}, with β a positive integer. j and k are the integer decomposition of index i, i.e., i = 2

^{j}+ k − 1. From the point of view of signal representation, a larger j represents smaller resolution and higher frequency, and k relates to the phase shift of the wavelet.

_{0}, t

_{1}) can be transformed to $y(\tau )\in {\mathcal{L}}_{2}\left(\left[0,1\right)\right)\phantom{\rule{0.2em}{0ex}}$ through t = t

_{0}+τ(t

_{1}− t

_{0}). Additionally, it can represented by a Haar series $y(\tau )={\displaystyle {\sum}_{i=0}^{\infty}{c}_{i}{h}_{i}(\tau )}$, where ${c}_{i}={\displaystyle {\int}_{0}^{1}y}(s){h}_{i}(s)\mathrm{ds}$. Usually, in practical applications, the continuous signal y(τ) is represented by the finite discrete form $\mathrm{y}={\left[{y}_{0}\phantom{\rule{0.6em}{0ex}}{y}_{1}\phantom{\rule{0.2em}{0ex}}\cdots \phantom{\rule{0.2em}{0ex}}{y}_{m-1}\right]}^{T}$, and the discrete values y

_{i}are obtained by sampling at time τ = i/m. The discrete form of the Haar wavelets can be denote as ${\mathrm{h}}_{i}={\left[{h}_{0,i}\phantom{\rule{0.6em}{0ex}}{h}_{1,i}\phantom{\rule{0.2em}{0ex}}\cdots {h}_{m-1,i}\right]}^{T}$, i = 0,1⋯, m−1, respectively. The Haar wavelet transform matrix H, of dimension m, is defined by:

**Y**= H

^{T}·y. For example, m = 4; the Haar transform of y = [1, 1, 1, 1]

^{T}is:

_{H}·Y.

## 3. Main Results

#### 3.1. Nonlinear MPC for Flat Systems

_{0}is the state measurement at sampling time t, $\mathcal{U}$ is the input constraint and ${\mathrm{\Omega}}_{\alpha}=\left\{x|{\Vert x\Vert}_{P}^{2}\le \alpha \right\}$ is the terminal state constraint. This is an infinite dimensional programming problem, which is not suitable for online optimization. Usually, the continuous model can be discretized by a Runge–Kutta (or other) method, and the online optimization Equation (11) can be solved in discrete form. However, due to the nonlinear dynamical model constraint, the resulting online discrete time optimization is still a time-consuming process.

^{(}

^{r}

^{)}are the flat output and its derivatives, and the order of derivative r corresponds to the controllability index satisfying Equation (5).

_{p}. Another approach is to break down the whole trajectory into several splines with the l-th order of continuity [14,15]. Then, calculate the derivatives of the flat output by differentiation, and reformulate the infinite dimension variational problem as a finite nonlinear programming problem on the polynomial’s coefficients or the splines’ control points. This works well for simple L-B isomorphic maps Ψ, such as linear or polynomial representations, which are special cases in nonlinear process control. As such, there is no explicit expression for the cost function with respect to polynomial coefficients or the splines’ control points. Although the cost function can be calculated online through a proper numerical integral algorithm, it will increase the optimization time.

#### 3.2. Haar Wavelet-Based Optimization

^{(1)}(t),⋯, z

^{(}

^{l}

^{)}(t), t ∈ [0, T

_{p}] through integration. Then, the continuous time optimization problem in Equation (12) is transformed into a discrete nonlinear optimization problem with respect to the coefficient vector V.

^{j}, j ∈ ℕ as a balance of resolution and computational time (as required by the particular application), and normalize the time domain of the optimization problem by t = T

_{p}σ, where σ ∈ [0, 1]. Let z

^{(i)}, Z

^{(i)}, i = 0, 1,⋯, r denote the discrete form of flat output’s i-th order derivative and its Haar coefficient vector, respectively. Assume the initial condition of z

^{(i)}by ${\mathrm{z}}_{0}^{(i)}={\left[{z}_{i,0}\phantom{\rule{0.6em}{0ex}}{z}_{i,0}\phantom{\rule{0.2em}{0ex}}\cdots \phantom{\rule{0.2em}{0ex}}{z}_{i,0}\right]}^{T}$ and the Haar coefficient vector of the profile of z

^{(}

^{i}

^{+1)}is Z

^{(}

^{i}

^{+1)}. Therefore, the Haar coefficient vector of initial condition can be calculated as ${\mathrm{Z}}_{0}^{i}={\left[\sqrt{m}{z}_{i,0}\phantom{\rule{0.6em}{0ex}}0\phantom{\rule{0.4em}{0ex}}0\phantom{\rule{0.2em}{0ex}}\cdots \phantom{\rule{0.2em}{0ex}}0\right]}^{T}$. Then, the profile of z

^{(i)}can be calculated through ${\mathrm{z}}^{(i)}={\mathrm{z}}_{0}^{(i)}+{T}_{p}{\displaystyle {\int}_{0}^{1}{\mathrm{z}}^{(i+1)}d\sigma}$. Performing the Haar transform as in Equations (8) and (9), Z

^{(i)}can be calculated through:

^{(i)}can be calculated recursively as:

^{(i)}can be easily computed through the Haar transform:

**Problem 1.**Haar wavelet-based NMPC.

#### 3.3. Reducing Decision Variables through Wavelet Coefficient Selection

## 4. Case Study

#### 4.1. A Flat Chemical Reactor Model

_{in}. There are three reactions occurring inside the reactor, and this reaction scheme is shown in Figure 3 with the desired product being component B, with C and D representing by-products. The material balance equations are given below.

_{1}(t), x

_{2}(t) are the concentrations of A and B and the manipulated variable, u, is the inlet flow rate. The model parameters and operating point are summarized in Table 1. It can be shown that the CSTR model Equation (17) is differentially flat with the flat output z as defined below [36]:

#### 4.2. Simulation Results

^{*}= 1 and with input constraint 0.95 ⩽ u ⩽ 1.05, that is, restraining the flow rate to be within ±5% of the nominal value. Figure 5 shows the state and input trajectories for this case. It is seen that the proposed HMPC algorithm is effective at regulating the system whilst respecting the constraint.

## 5. Conclusions

## Acknowledgments

## Author Contributions

## Conflicts of Interest

## References

- Qin, S.; Badgwell, T. A. Survey of Industrial Model Predictive Control Technology. Control Eng. Pract
**2003**, 11, 733–764. [Google Scholar] - Henson, M. Nonlinear model predictive control: Current status and future directions. Comput. Chem. Eng.
**1998**, 23, 187–202. [Google Scholar] - Mayne, D.; Rawlings, J.B.; Rao, C.V.; Scokaert, P.O.M. Constrained Predictive Control: Stability and Optimality. Automatica
**2000**, 36, 789–814. [Google Scholar] - Diehl, M.; Bock, H.G.; Schlöder, J.P.; Findeisen, R.; Nagy, Z.; Allgöwer, F. Real-time optimization and nonlinear model predictive control of processes governed by differential-algebraic equations. J. Process Control
**2002**, 12, 577–585. [Google Scholar] - Albuquerque, J.; Gopal, V.; Staus, G.; Biegler, L.T.; Ydstie, B.E. Interior point SQP strategies for large-scale, structured process optimization problems. Comput. Chem. Eng.
**1999**, 23, 543–554. [Google Scholar] - Bartusiak, R.D. Assessment and Future Directions of NMPC; Springer: Berlin, Germany, 2007; Chapter NLMP; pp. 367–381. [Google Scholar]
- Yang, X.; Biegler, L.T. Advanced-multi-step nonlinear model predictive control. J. Process Control
**2013**, 23, 1116–1128. [Google Scholar] - Lévine, J. Analysis and Control of Nonlinear Systems: A Flatness-based Approach; Springer-Verlag: Berlin/Heidelberg, Germany, 2009. [Google Scholar]
- Rothfuss, R.; Rudolph, J.; Zeitz, M. Flatness Based Control of a Nonlinear Chemical Reactor Model. Automatica
**1996**, 32, 1433–1439. [Google Scholar] - Murray, R.M.; Rathinam, M.; Sluis, W. Differential Flatness of Mechanical Control Systems: A Catalog of Prototype Systems, Proceedings of the ASME International Mechanical Engineering Congress and Expo, San Francisco, CA, USA, 12–17 November 1995.
- Martin, P.; Devasia, S.; Paden, B. A different look at output tracking: Control of a vtol aircraft. Automatica
**1996**, 32, 101–107. [Google Scholar] - Mahdevan, R.; Agrawal, S.; Doyle, F., III. Differential flatness based nonlinear predictive control of fed-batch bioreactors. Control Eng. Pract
**2001**, 9, 889–899. [Google Scholar] - Flores, M.E.; Milam, M.B. Trajectory Generation for Differentially Flat Systems via NURBS Basis functions with Obstacle Avoidance, Proceedings of the American Control Conference, Minneapolis, MN, USA, 14–16 June 2006.
- Suryawan, F.; de Doná, J.; Seron, M. Minimum-time trajectory generation for constrained linear systems using flatness and B-splines. Int. J. Control.
**2011**, 84, 1565–1585. [Google Scholar] - Suryawan, F.; de Doná, J.; Seron, M. Splines and polynomial tools for flatness-based constrained motion planning. Int. J. Syst. Sci.
**2012**, 43, 1396–1411. [Google Scholar] - De Doná, J.; Suryawan, F.; Seron, M.; Lévine, J. A flatness-based iterative method for reference trajectory generation in constrained NMPC. In Nonlinear Model Predictive Control; Springer: Berlin, Germany, 2009; pp. 325–333. [Google Scholar]
- Karimi, H.; Lohmann, B.; Jabedar Maralani, P.; Moshiri, B. A computational method for solving optimal control and parameter estimation of linear systems using Haar wavelets. Int. J. Comput. Math.
**2004**, 81, 1121–1132. [Google Scholar] - Karimi, H.; Moshiri, B.; Lohmann, B.; Jabehdar Maralani, P. Haar Wavelet-Based Approach for Optimal Control of Second-Order Linear Systems in Time Domain. J. Dyn. Control Syst.
**2005**, 11, 237–252. [Google Scholar] - Hsiao, C.; Wang, W. Optimal control of linear time-varying systems via Haar wavelets. J. Optim. Theor. Appl.
**1999**, 103, 641–655. [Google Scholar] - Karimi, H.; Jabedar Maralani, P.; Moshiri, B.; Lohmann, B. Numerically efficient approximations to the optimal control of linear singularly perturbed systems based on Haar wavelets. Int. J. Comput. Math.
**2005**, 82, 495–507. [Google Scholar] - Hsiao, C. Haar wavelet direct method for solving variational problems. Math. Comput. Simul.
**2004**, 64, 569–585. [Google Scholar] - Chen, C.; Hsiao, C. Haar wavelet method for solving lumped- and distributed-parameter systems. IEE Proc. Control Theor. Appl. D
**1997**, 144, 87–94. [Google Scholar] - Fliess, M.; Lévine, J.; Martin, P.; Rouchon, P. On differentially flat nonlinear systems, Proceedings of the IFAC-Symposium, Bordeaux, France, 24–26 June 1992; pp. 408–412.
- Fliess, M.; Lèvine, J.; Martin, P.; Rouchon, P. Flatness and defect of nonlinear systems: Introductory theory and examples. Int. J. Control.
**1995**, 61, 1327–1361. [Google Scholar] - Lévine, J. On necessary and sufficient conditions for differential flatness. Appl. Algebra Eng. Commun. Comput.
**2011**, 22, 47–90. [Google Scholar] - Martin, P.; Rouchon, P.; Murray, R.M. Flat Systems, Equivalence and Trajectory Generation; Technical Report; California Institute of Technology: Pasadena, CA, USA, 2003. [Google Scholar]
- Wu, J.L.; Chen, C.H.; Chen, C.F. Numerical inversion of Laplace transform using Haar wavelet operational matrices. IEEE Trans. Circuits Syst. I: Fund. Theor. Appl.
**2001**, 48, 120–122. [Google Scholar] - Wu, J.L. A wavelet operational method for solving fractional partial differential equations numerically. Appl. Math. Comput.
**2009**, 214, 31–40. [Google Scholar] - Chen, H.; Allgöwer, F. A quasi-infinite horizon nonlinear model predictive control scheme with guaranteed stability. Automatica
**1998**, 34, 1205–1217. [Google Scholar] - Yu, S.; Reble, M.; Chen, H.; Allgöwer, F. Inherent robustness properties of quasi-infinite horizon nonlinear model predictive control. Automatica
**2014**, 50, 2269–2280. [Google Scholar] - Liu, J.; Muñoz de la Peña, D.; Ohran, B.J.; Christofides, P.D.; Davis, J.F. A two-tier architecture for networked process control. Chem. Eng. Sci.
**2008**, 63, 5394–5409. [Google Scholar] - Liu, J.; Muñoz de la Peña, D.; Christofides, P. Distributed Model Predictive Control of Nonlinear Process Systems. Am. Inst. Chem. Eng. J
**2009**, 55, 1171–1184. [Google Scholar] - Christofides, P.D.; de la Peña, D.M.; Liu, J. Networked and Distributed Predictive Control: Methods and Nonlinear Process Network Applications; Springer: London, UK, 2011. [Google Scholar]
- Tippett, M.J.; Tan, C.K.; Bao, J. Non-Constant Prediction-Step MPC for Processes with Multi-Scale Dynamics, Proceedings of the 19th IFAC World Congress, Cape Town, South Africa, 24–29 August 2014.
- Pannocchia, G.; Rawlings, J.B.; Mayne, D.Q.; Mancuso, G. Whither discrete time model predictive control? IEEE Trans. Autom. Control.
**2014**, 60, 246–252. [Google Scholar] - Sira-Ramirez, H.; Agrawal, S.K. Differentially Flat Systems; Marcel Dekker: New York, NY, USA, 2004; Volume 17. [Google Scholar]

**Figure 1.**Representation of the flatness property (adapted from [8]).

**Figure 4.**Simulation result with resolution m = 16. (a) Closed loop state trajectory; (b) flat output trajectory.

**Figure 5.**Simulation result under the input constraint with m = 16. (a) State trajectory; (b) input trajectory.

**Figure 6.**MPC with different filters (resolution m = 64). (a) State trajectory by Filter 2; (b) computational time cost.

Parameter | Description | Unit | Value |
---|---|---|---|

C_{in} | Inlet concentration of A | kg mol/m^{3} | 4.9 |

x_{1}(0) | Initial concentration of A | kg mol/m^{3} | 1.5 |

x_{2}(0) | Initial concentration of B | kg mol/m^{3} | 2 |

${x}_{1}^{\ast}$ | Nominal concentration of A | kg mol/m^{3} | 2 |

${x}_{2}^{\ast}$ | Nominal concentration of B | kg mol/m^{3} | 1 |

u^{∗} | Nominal flow rate | kg mol/h | 1.1 |

k_{1} | Reaction 1 rate constant | h^{−1} | 0.6 |

k_{2} | Reaction 2 rate constant | h^{−1} | 0.1 |

k_{3} | Reaction 3 rate constant | h^{−1} | 0.5 |

**Table 2.**Average computation time cost of the controller without the input constraint. HMPC, Haar wavelet-based MPC; PMPC, Polynomial basis MPC; NMPC, nonlinear MPC.

Resolution | HMPC (ms) | PMPC (ms) | NMPC (ms) |
---|---|---|---|

m = 4 | 4.7 | 6.2 | 9 |

m = 8 | 5.7 | 9.6 | 16 |

m = 16 | 7.6 | 22 | 40 |

m = 32 | 20 | 80 | 160 |

© 2015 by the authors; licensee MDPI, Basel, Switzerland This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution license (http://creativecommons.org/licenses/by/4.0/)

## Share and Cite

**MDPI and ACS Style**

Wang, R.; Tippett, M.J.; Bao, J.
Fast Wavelet-Based Model Predictive Control of Differentially Flat Systems. *Processes* **2015**, *3*, 161-177.
https://doi.org/10.3390/pr3010161

**AMA Style**

Wang R, Tippett MJ, Bao J.
Fast Wavelet-Based Model Predictive Control of Differentially Flat Systems. *Processes*. 2015; 3(1):161-177.
https://doi.org/10.3390/pr3010161

**Chicago/Turabian Style**

Wang, Ruigang, Michael James Tippett, and Jie Bao.
2015. "Fast Wavelet-Based Model Predictive Control of Differentially Flat Systems" *Processes* 3, no. 1: 161-177.
https://doi.org/10.3390/pr3010161