4.6 Continuous-time Extended Kalman Filter
4.7.1 Observer-based MPC and closed-loop receding horizon simulations
Although we have commented on the performance of the filters in estimating the ra-diation force and velocity, a more appropriate measure of their performance should consider closed-loop behaviour of the observer-based controller. Here, we consider again the optimal control problem solved at each iteration of the receding horizon con-trol.
Optimal Control Design
We use the same indirect optimal control method as in Section 3.3.1. The main differ-ence here is that we do not have access to either the radiation force or exact values of the device velocity or displacements. Based on measured outputs, estimates from ob-servers will be used. The Hamiltonian of the optimal control problem can be re-written as:
H(x, u,λ,t) := − Bptou2x22+ Gu1x2+λ1x2+ λ2
M+µ∞{ fexc(t)+
Gu1− Bptou2x2− fr−Cx1}.
(4.29)
Taking the derivative of the Hamiltonian with respect to the inputs, the switching func-tions and hence the gradient of the cost can be shown to be the same as in (3.20) and (3.22), respectively. The full-order plant model is no longer used for prediction.
Instead, the observer dynamics are evolved to find the estimates ˆx2 and ˆfr. These
esti-4.7 Example Simulations 87
60 65 70 75 80 85 90 95 100
−4
−2 0 2 4
time (s)
˙ ζ(m/s)
ζ˙
ˆ˙ζ(EKF,nrad= 3) ˆ˙ζ(H∞, nrad= 3) ˆ˙ζ(H∞, nrad= 1)
(a) velocity estimates
60 65 70 75 80 85 90 95 100
−1 0 1
time (s)
˙ ζerror(m/s)
ez(EKF, nrad= 3) ez(H∞, nrad= 3) ez(H∞, nrad= 1)
(b) errors in velocity estimates
Figure 4.5: Velocity estimates with observers based on radiation subsystems of order nrad equal to1 and 3 for the H∞filter, and an EKF based on a 3rdorder radiation subsystem.
mates are then used in the adjoint dynamics:
dλ1
dt = Cλ2
M+µ∞, dλ2
dt = 2Bptou2x2− Gu1−λ1+Bptoλ2u2 M+µ∞ ,
(4.30)
where ˙λi(t) = −∂ H∂ x
i(x(t), u(t),λ(t),t). The adjoint stateλ = [λ1T λ2T]T has final condi-tionλ(tf) = 0, as before, because the terminal cost is zero.
4.7 Example Simulations 88
60 65 70 75 80 85 90 95 100
−1
−0.5 0 0.5 1 1.5 ·105
time (s) frvs
ˆ f(N)r
fr
ˆfr(EKF, nrad= 3) ˆfr(H∞, nrad= 3) ˆfr(H∞, nrad= 1)
(a) radiation force estimates
60 65 70 75 80 85 90 95 100
−6
−4
−2 0 2 4 6 ·104
time (s) frerror(N)
ez(EKF, nrad= 3) ez(H∞, nrad= 3) ez(H∞, nrad= 1)
(b) errors in radiation force estimates
Figure 4.6: Radiation force estimates with observers based on radiation subsystems of order nrad equal to1 and 3 for the H∞filter, and an EKF based on a 3rdorder radiation subsystem.
In Step 1 of Algorithm 1, rather than evolving the state dynamics of the full-order model, we now estimate the observer state ˆx over[t0,tf] by integrating the low-order observer dynamics with the initial condition ˆx(t0) = ˆx0 and no innovation term. Similarly, in Step 2 of Algorithm 1, the second order costate dynamicsλ is computed by backward integration of (4.30) over [tf,t0] using the estimated observer dynamics and the final valuesλ(tf) = 0.
We present sample simulations to show the performance of the observers in the optimal
4.8 Conclusion 89
control scheme of Section 3.3.1. Based on the result in Figure 3.8, a prediction hori-zon of 12 s with 1 s control interval Tcwas used. The effect of model-mismatch on the estimator based receding horizon control is shown, considering both the EKF and H∞
filters of various orders. Figure 4.7 shows the cumulative energy extracted when various observers are used. Similarly, all these observers were also tested under parameter un-certainty for the damper value Bpto; the filters are based on a value of Bpto= 304kNs/m and the true value is now Bpto= 275kNs/m. Table 4.1 shows the average power ex-tracted under all these situations. The filter order is nrad+ 2, where nrad is the order of the radiation subsystem used.
The lowest-order observers show the most suboptimal power. However, the worst performing observer-based controllers deliver only about 9% less power than the full knowledge controllers. Under the given measurement noise, performance does not im-prove much for filters with nrad higher than 2 or 3. The H∞ filters generally perform similarly to the same order EKF filters in closed-loop. We can, therefore, conclude that a low-order filter for velocity and radiation force estimation can be effectively used in a receding horizon controller. Such an implementation is shown to deliver about 3-times more power compared to an uncontrolled WEC system; see Figure 4.7. Ran-dom noise with a normal distribution and a bound equal to 50% of the maximum of the actual displacement and velocity absolute values was used; the standard deviation for each measurement noise is less than 0.5 times its bound. These bounds are used in the EKF.
Table 4.1: Performance of the filters in average extracted power (kW) under closed-loop simula-tions. Under parametric uncertainty, the filters are based on a value of Bpto= 304kNs/m where the true value is now Bpto= 275kNs/m; the same measurement noise is applied in all cases. The
“Full-order” column shows the performance when, rather than an observer, the full-order model with complete state knowledge is used.
Filter Nominal Performance (kW) Under parametric uncertainty (kW) nrad H∞ EKF Full-order No control H∞ EKF Full-order No control
1 186.1 184.8 204.2 68.6 176.8 175.4 199.6 67.5
2 191.5 193.2 204.2 68.6 186.6 187.2 199.6 67.5
3 194.0 194.4 204.2 68.6 187.6 187.7 199.6 67.5
4 194.6 194.6 204.2 68.6 188.3 187.9 199.6 67.5
5 194.6 194.6 204.2 68.6 188.3 188.3 199.6 67.5
4.8 Conclusion
In this chapter, the low order H∞filter design for bilinear systems with bounded inputs has been investigated. Since the robust unbiased functional filters in the literature are
4.8 Conclusion 90
(a)
Figure 4.7: Cumulative extracted energy of observer-based receding horizon control. The order of the radiation subsystem for observer design is nrad. Tp= 8 s and Hs= 2 m used; G = B = 0.3 ∗ (M + µ∞).
4.8 Conclusion 91
either not applicable for some problems, the wave energy example being one, or do not preserve unbiasedness in the presence of uncertainties, we have proposed a new robust low-order filter design method. An LPV formulation of the bilinear system has been used to design a filter that is based on a lower order model of the plant, but with closed-loop robust disturbance attenuation guarantees around the full-order model. Although the optimal filter synthesis is a (non-convex) BMI problem, we have used an efficient LMI-based coordinate descent algorithm to find solutions locally. Example simulations in dynamic radiation force estimation of a wave energy converter have been used to show robustness of the H∞ filter under parametric and other model uncertainties by comparing the performance with an extended Kalman filter. In addition to to alleviating the need to know the spectrum of the noise covariances by the EKF, the H∞ filter is robust to model uncertainties.
We have also investigated the robustness of the filters when used within a receding horizon control of a heaving buoy. It was shown that performance, in terms of power extracted, is only marginally lower when using these observers compared to a full-knowledge MPC controller. We have, therefore, presented a viable bilinear observer-based control scheme for a heaving WEC.
92
Chapter 5
Matrix Exponential Methods for Integration of Bilinear Control Systems
In Chapter 3, the use of an indirect method for the computation of an optimal controller was proposed. The main computational cost of the projected gradient method in Al-gorithm 1 is the forward integration of the system dynamics and the integration of the adjoint dynamics backwards. For this reason, the computational efficiency of relevant ODE solvers for bilinear systems was investigated.
Based on the variation of constants formula for linear systems, we show that bilinear control systems with zero-order hold on the input can be integrated to a high prescribed precision by computing the action of the matrix exponential on a vector. We make use of advanced new results in the literature for efficient computation of the latter with some a priori guarantees on the error tolerance. In Section 5.3.3, we derive new a priori bounds on the computational complexity of integrating bilinear systems with a given backward error as a function of the problem data. We also investigate the use of Krylov subspace methods for computing the action of a matrix exponential on a vector.
In Section 5.4, using our new bounds on computational complexity, we propose a direct exponential integrator to solve bilinear ODEs via the solution of a sparse linear sys-tem. We also analyse the sparsity and computational complexity of solving the result-ing linear system. It is then compared with a similarly implemented sparse fourth-order explicit Runge-Kutta scheme. Numerical experiments are also used to assess the advan-tages of the exponential integrators compared with the classical Runge-Kutta method. In addition to the wave energy system, we use a PDE heat transfer model for the controlled cooling of a metal slab.
5.1 Exponential Integrators: Avoidingϕ Functions 93
In Section 5.6, the exponential integrator with our new bounds is used in a novel sparse direct collocation of bilinear systems for optimal control. Example academic quadratic problems with bilinear dynamics are used to demonstrate the feasibility of the proposed approach.
5.1 Exponential Integrators: Avoiding ϕ Functions
The work in [112] reviews exponential integrators for some ODEs, namely methods of integration for solving initial value problems of the form
˙x(t) = Lx(t) + g(t, x(t), p(t)), x(t0) = x0, t ≥ t0, (5.1) where x(t) ∈ Rn, L ∈ Rn×n, and g(·) is a nonlinear function with possibly time varying parameters p(t). The solution of (5.1) satisfies the variation of constants formula
x(t) = e(t−t0)Lx0+ Z t
t0
e(t−τ)Lg(τ, x(τ), p(τ))dτ, ∀t ≥ t0. (5.2)
An equivalent representation for (5.2) is [112, Lem. 5.1]:
x(t) = e(t−t0)Lx0+
∞ l=1
∑
(t − t0)lϕl((t − t0)L)g(l−1)t0 , ∀t ≥ t0, (5.3)
where g(l−1)t0 =dtdl−1l−1g(t, x(t), p(t))|t=t0and the so calledϕ-functions satisfy the recursive equations
ϕl+1(z) = ϕl(z) −l!1
z , l = 0, 1, . . ., ϕ0(z) = ez. (5.4) The proof of [112, Lem. 5.1] is based on a Taylor series expansion of g(·) about t0. In computer simulations, some finite pth order truncation of (5.3) is often sought to approximate the solution as
x(t) ≈ ˆx(t) = e(t−t0)Lx0+
p l=1
∑
(t − t0)lϕl((t − t0)L)g(l−1)t0 , ∀t ≥ t0. (5.5)
In practice, only orders of only up to p= 4 are considered [112].
A result of great interest to us is to compute (5.5) without explicitly computing theϕ -functions [113, Thm. 2.1]; a method to compute the action of the ϕ-functions on a vector with only a marginal increase in computational cost is proposed in [113, Thm.
2.1]— an expression for the right hand side of (5.5) is derived involving only a single
5.1 Exponential Integrators: Avoidingϕ Functions 94
matrix exponential. Let L∈ Rn×n, the matrix exponential of L is given by
eL= In+ L +L2 2! +L3
3! + . . . . (5.6)
where Inis the identity matrix of size n.
Now, let W = [wp, wp−1, . . . , w1] ∈ Rn×pwhere the stacked vectors wkare derivatives of Then, the integral in (5.5) can be computed via the matrix exponential of ˜L. It can be shown that
where the last column of K is K(1 : n, p) =
p l=1
∑
(t − t0)lϕl((t − t0)L)gt(l−1)0 .
Therefore, the right hand side of (5.5) can be written as
ˆx(t) =h
, the last column of a p-dimensional identity matrix.
In an explicit time-stepping method, also called exponential time differencing in the literature [112], the evaluation of the solution of the semilinear ODE (5.1) can be done in a semi-analytical fashion by computing the action of a matrix exponential on a vector.
By discretizing the time span of interest, the ODE can be integrated as accurately as we can calculate the matrix exponential or its action on a vector. This is one of the reasons that motivates the need for a computationally inexpensive method to compute expressions of the form eLy, where y is a vector [113, Sec. 3]. The computational saving made in not calculating ϕ-functions is most pronounced in applications where n≫ p; semidiscretized PDEs often result in such approximations, where n is a number of orders bigger than p. Although not relevant to the bilinear systems we consider here, it is also important to mention that the nonlinearity in (5.2) can be approximated using various quadrature rules to derive exponential variants of the classical linear multistep, Runge-Kutta and general linear methods of implicit and explicit kinds [112]. See [114]