Different Model Predictive Control Approaches for Controlling Point Absorber Wave Energy Converters Diploma Thesis by cand. kyb. Markus Richter Examiner: Prof. Dr.-Ing. O. Sawodny Supervisor: Prof. Dr.-Ing. M. E. Maga˜ na Institute for Systemdynamics, University Stuttgart Prof. Dr.-Ing. O. Sawodny October 5, 2011
86
Embed
Different Model Predictive Control Approaches for ...
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Different Model Predictive Control
Approaches
for Controlling Point Absorber Wave
Energy Converters
Diploma Thesis
by
cand. kyb. Markus Richter
Examiner: Prof. Dr.-Ing. O. Sawodny
Supervisor: Prof. Dr.-Ing. M. E. Magana
Institute for Systemdynamics, University Stuttgart
Prof. Dr.-Ing. O. Sawodny
October 5, 2011
Abstract
Ocean wave energy is a promising renewable energy source that can be converted
into useful electrical energy using wave energy converters (WECs). In order for
WECs to become a commercially viable alternative to established methods of en-
ergy generation, operating the WEC in an optimal fashion is a key task. Thus,
model predictive control (MPC) is an encouraging control method that exploits
the entire power potential of a WEC on the one hand, while respecting the con-
straints on motions and forces on the other hand. This work focuses on one
subclass of WECs, namely, buoy type point absorbers with a linear generator as
the power take-off (PTO) system and presents different MPCs whose goals are to
optimize the generator force. For a linear one-body model of the point absorber
it is shown that optimizing the power generation is possible without using an
optimal velocity reference trajectory. Therefore, the control of a linear two-body
model with a similar approach can be demonstrated, even though no adequate
reference trajectory can be calculated in this case. Moreover, possibilities to deal
with the occurance of infeasibility problems are introduced and implemented.
Due to possible nonlinear effects, such as the mooring forces, a nonlinear model
predictive controller is proposed, whose performance is compared to a linear
MPC, also controlling the nonlinear system. The proposed controllers are val-
idated and compared through simulation for regular and irregular sea states.
Declaration
Herewith I affirm that I have written this thesis on my own. I did not enlist unlawful
assistance of someone else. Cited sources of literature are perceptly marked and listed
By plugging (3.39) in the objective function (3.36), X is eliminated and one gets
J =1
2(Jxx0 + JuU + JuF − T )T Q(Jxx0 + JuU + JuF − T ) +
1
2UT RU . (3.42)
By expanding and neglecting the terms without dependence on U , the objective func-
tion can be written as
J =1
2UT (Ju
T QJu + R)U + UT (JuT QJxx0 − Ju
T QT + JuT QJuF), (3.43)
and is now only quadratic dependent on U .The constraints need to be reformulated as well. The constraints from (3.30) -
(3.32) can be also written as
Dkuk ≤ dk, for k = 0, . . . , N − 1, (3.44)
Ekxk ≤ ek, for k = 1, . . . , N. (3.45)
The input constraints are already only dependent on U and can be written in matrix
form as
DDU ≤ d, (3.46)
where DD = diag(D0, . . . ,DN−1) and d = [dT0 , . . . , dTN−1]
T .
The state constraints contain the state xk. To get rid of it, xk is replaced by (3.39). It
follows
E1Bdu0 ≤ e1 − E1Adx0 − E1Bdf0,
...
EN(AdN−1Bdu0 +Ad
N−2Bdu1 + . . .+BduN−1) ≤ eN − ENAdNx0 − EN(Ad
N−1Bdf0
+AdN−2Bdf1 + . . .+BdfN−1).
(3.47)
With the definitions ED = diag(E1, . . . ,EN) and e = [eT1 , . . . , eTN ]
T the constraints can
be written as
EDJuU ≤ e− EDJxx0 − EDJuF . (3.48)
Now, the MPC problem can be restated as
minU
J(U), (3.49)
where
J =1
2UT (Ju
T QJu + R)U + UT (JuT QJxx0 − Ju
T QT + JuT QJuF), (3.50)
subject to[
DD
EDJu
]
U ≤[
d
e− EDJxx0 − EDJuF
]
. (3.51)
3.3. MPC FORMULATION 23
Problems in this form are usually called Linear Quadratic Problems (LQP), because
the objective function is quadratic and all constraints are linear. There exist many
appropriate methods to solve problems of this class. The reader is referred to [27] and
[34].
3.3.2 Direct Power Maximization Formulation
The next MPC problem formulation is also done in terms of the input variables U ,which allows the constraints formulation to remain the same. The difference is that
this formulation can maximize the power directly, without the need of an optimimal
trajectory for the buoy velocity. This can be very advantageous in case no optimal
trajectory can be calculated. Also, the assumption of a sinusoidal monochromatic wave
in order to calculate the reference can be a problem in the previous formulation. For
irregular waves, it generally cannot be expected that the calculated optimal trajectory
be the optimal one. Moreover, this trajectory can be far away from the optimal power
generation under certain conditions.
The following formulation focuses on optimizing the generated power without using
a reference. In general it is defined by
Pgen = −Fgen(t)z(t). (3.52)
In matrix form over the complete horizon, the power is given by
Pgen = −X T(2)U (3.53)
where the subscript (2) denotes the second component of each xk in X . To extract the
second components of X , the matrix S is defined, i.e.
S =
0 1 0 0 . . . 0
0 0 0 1 . . . 0...
...
0 0 0 0 . . . 1
, (3.54)
with dim(S) = (N × 2N), so that the following holds:
Pgen = −(SX )TU . (3.55)
Plugging (3.55) in (3.39) yields
Pgen = −(S(Jxx0 + JuU + JuF))TU= −x0
TJxTSTU − UTJu
TSTU − FTJuTSTU
= −(UTJu
TSTU +(x0
TJxTST + FTJu
TST)U).
(3.56)
To make this problem fit the minimization problem, the sign is switched. Hence the
MPC formulation for generating power optimization is
minU
J(U), (3.57)
24 CHAPTER 3. ONE-BODY WEC
where
J(U) = 1
2UT
(
JuTST + R
)
U +1
2
(x0
TJxTST + FTJu
TST)U , (3.58)
(3.59)
subject to[
DD
EDJu
]
U ≤[
d
e− EDJxx0 − EDJuF
]
, (3.60)
where R is again the weighting matrix for the input.
The trajectory formulation is naturally convex, thus every local solution is the global
solution of the optimization problem. That is why convexity is a requirement for most
global optimization algorithm for LQP problems. It can also be shown that the power
formulation yields a convex problem which is no longer symmetric, see Appendix A.
However, this is only shown for the two-body case due to redundancy. Hence, the same
optimization methods used in the trajectory formulation can be applied.
3.4 Implementation
The simulation is implemented using Matlab/SIMULINK. The simulation model for
the one-body direct formulation is shown in Fig. 3.3. It mainly consists of four different
U Y
U Y
U Y
S−Function
generate _sinus
RealPlant
Fgen
Fe
pos
vel
Phase
(−pi/2 0 pi/2)
Offset
0
Level −2 M−fileS−Function
MPC
Iteratations firstoptimization
vel _buoy
pos_buoy
F_gen
F_e
Frequency
[1/(2*pi) 1/(2.5*pi) 1/(3*pi)]
vel _buoy
pos_buoy
pos_wave
vel _wave
F_gen
F_e computation
eta F_e
F_eExitflag Optimization
Exitflag Infeasibility catching
Amplitude
(0.1 0.2 0.3)
Fig. 3.3: SIMULINK simulation model for one-body direct power formulation.
blocks. The “generate sinus” block is able to generate a superposition of sine waves
as wave input signal with corresponding prediction over a certain horizon. The wave
signal consists of position, velocity and acceleration, and perfect prediction is assumed.
According to (3.4), a prediction for the excitation force can be calculated in the block
“Fe computation”. The actual MPC algorithm is implemented in the Level-2 M-file
s-function “MPC”. As stated earlier, the inputs of the “MPC” are the predictions of
the excitation force, as well as the current system state, which is the output of the
“RealPlant” block. It is assumed that the current system state can be measured. The
3.5. RESULTS 25
ouputs of the “MPC” block are the first generator force signal and certain signals for
the optimization status.
The hydrodynamic parameters of the point absorber used in the simulation are given
in Table 3.1. The parameters are taken from [7] and were determined from analysis
Variable Explanation Value
m Mass 1997 kg
A Added mass 5660 kg
B Viscous damping 11,400 N/(m/s)
k Hydrostatic stiffness 88,970 N/m
Tab. 3.1: Hydrodynamic parameter of the point absorber.
with ANSYS AQUA [1]. The simulation parameter used for the MPC simulations are
given in Table 3.2. The position constraint is equivalent to the stroke length of the
Variable Explanation Value
∆t Sample time for optimization 0.1 s
Thor Optimization horizon 3 s
N Number of values 30
T Simulation Time 50 s
cp Position constraint 1 m
cv Velocity constraint 1 m/s
cu Generator force constraint 80,000 N
Tab. 3.2: Simulation parameter.
generator and is taken from [33]. The generator constraint is chosen so that the MPC
control can be effectively tested.
3.5 Results
In this section, the two different implementations are verified and compared by means
of computer simulation. In the following, “MPC Traj” and “MPC Power” denote the
MPC with the trajectory formulation and the direct power formulation, respectively.
In all figures they are abbreviated by (T) and (P), respectively, and the optimal control
law by (O). First, a simple sinosodial wave with an amplitude of 0.6 m and a period
time of 7 s is used as the input wave signal. In Fig. 3.4, the simulation results with the
optimal control can be seen. On the top left, the wave elevation η and the actual buoy
displacement with optimal control are plotted. It can be noted that displacements
of 2.4 m are achieved which would be clearly above the actual requirements. The
26 CHAPTER 3. ONE-BODY WEC
0 10 20 30 40 50−3
−2
−1
0
1
2
3
Time [s]
Pos
ition
[m]
Displacement of Wave and Buoy
η
z (O)
0 10 20 30 40 50−3
−2
−1
0
1
2
3x 10
5
Time [s]
For
ce [N
]
Excitation and Generator Force
Fe
Fgen (O)
0 10 20 30 40 50−3
−2
−1
0
1
2
3
Time [s]
Vel
ocity
[m/s
]
Wave, Buoy and Commanded Velocity
η
z (O)zcom
0 10 20 30 40 50
−200
−100
0
100
200
300
Time [s]
Pow
er [k
W]
Power Generation
Pgen (O)
Fig. 3.4: Simulation results with the optimal control law and a monochromatic sinu-
sodial wave as input signal.
excitation force, seen on the top right, is in the range of ±50,000 N, whereas the
generator force with about 200,000 N would violate the constraints. On the bottom
left it can be seen that the actual velocity with this control law is exactly the same
as the earlier calculated commanded velocity which is later used as a reference. The
generated power, plotted on the bottom right, is within −210 kW and +260 kW and
the average generated power is 25.24 kW. It has to be noted that the amount of reactive
power at some points is enormous, so that a large energy storage is necessary.
Fig. 3.5 shows the phase relation between excitation force and actual velocity with
the optimal control law. It can be seen that the optimal velocity has to be in phase
with the excitation force, which was discussed in Section 3.2.
The next simulation compares the two different MPCs, where the same wave data as
in the previous simulation is used. The parameters and constraints of Table 3.2 are
applied, and Fig. 3.6 shows the results. The buoy positions for both controllers satisfy
the limits of ± 1 m well. Also, almost no difference between both trajectories can
be seen. The same holds for the generator force. Both trajectories are almost the
same and respect the generator limit as desired. On the bottom left, the buoy and the
commanded velocity are plotted. The MPC attempts to follow the commanded velocity,
but is restricted by the constraints. Even though, “MPC Power” is not designed to
follow the comanded velocity, the same results as for “MPC Traj” are obtained, and
3.5. RESULTS 27
0 10 20 30 40 50−2.5
−2
−1.5
−1
−0.5
0
0.5
1
1.5
2
2.5
Time [s]
For
ce [N
/10
5 ] / V
eloc
ity [m
/s]
Fe
z (O)
Fig. 3.5: Phase relation between excitation force and actual velocity with the optimal
control law
the generation power trajectories are almost the same. It turns out that the range here
is only between -23 kW and 58 kW, so significantly less energy storage is required.
However, the average generated power is less than with the optimal control law, namely
17.45 kW for “MPC Power” and 17.42 for “MPC Traj”. But that is still a large value
given that the constraints restrict the allowed ranges for position, velocity and generator
force by more than half. All in all it can be stated that both MPC formulations respect
the constraints as desired and that the power formulation yields almost the same results
as the trajectory formulation for the monochromatic wave data.
The wave data modelling the incoming waves is then modified. The new input
signal is a superposition of three sinewaves with amplitudes between 0.1 m and 0.3
m and period times between 1/2π s and 1/3π. Fig. 3.7 shows the simulation results
under the same conditions apart from the wave data change. Again, it can be seen
that all constraints are satisfied and that both formulations yield almost the same
results. There is one interesting time period between 33 s and 43 s. In that period, the
results of both formulations differ significantly. As can be seen on the bottom left, the
velocity trajectory of “MPC Power” does not follow the commanded one, even though
it is within the constraints. In this case, the power formulation calculates a completely
different solution. Nevertheless, the constraints are satisfied and the average power is
about the same. The average generated power for “MPC Traj” is 8.03 kW and for
“MPC Power” is 7.87 kW .
Interestingly, the optimal generated power with the optimal power law is only 3.72
kW. The wave signal in this simulation is a superposition of sine waves with different
frequencies and amplitudes, and certainly not a monochromatic wave. Also, the signal
28 CHAPTER 3. ONE-BODY WEC
0 10 20 30 40 50
−1
−0.5
0
0.5
1
Time [s]
Pos
ition
[m]
Position of Wave and Buoy
z (T)z (P)η
0 10 20 30 40 50
−1
−0.5
0
0.5
1
x 105
Time [s]
For
ce [N
]
Generator Force
Fgen (T)Fgen (P)
0 10 20 30 40 50
−2
−1
0
1
2
Time [s]
Vel
ocity
[m/s
]
Buoy and commanded Velocity
z (T)z (P)zcom
0 10 20 30 40 50
−20
0
20
40
60
80
Time [s]
Pow
er [k
W]
Power Generation
Pgen (T)Pgen (P)
Fig. 3.6: Comparison between “MPC Traj” (T) and “MPC Power” (P) in case of
monochromatic sinusodial wave as input signal.
is chosen so that there is no clear dominant wave frequency, making it one of the worst
cases for this control law. This is the reason why the optimal power law is not optimal
in this case. It is very interesting to see that the MPC algorithm of “MPC Traj”
finds almost the same optimum trajectory for Fgen as “MPC Power”, even though
“MPC Traj” tries to follow the “wrong” optimal reference trajectory.
In summary, two different observations can be made: First, the formulation by
means of the optimal trajectory yields good results even if the optimal trajetory is by
far not the optimal one. That is an intersting result which was not expected in the
first place. Secondly, the formulation by means of the direct power optimization leads
to almost the same results as the other formulation. The advantage here is that no
reference trajectory is necessary. Therefore, this approach can be easily applied to the
linear two-body case, since an optimal velocity can not be calculated to easily fit the
two-body case yet.
3.5. RESULTS 29
0 10 20 30 40 50
−1
−0.5
0
0.5
1
1.5
Time [s]
Pos
ition
[m]
Position of Wave and Buoy
z (T)z (P)η
0 10 20 30 40 50
−1
−0.5
0
0.5
1
x 105
Time [s]
For
ce [N
]
Generator Force
Fgen (T)Fgen (P)
0 10 20 30 40 50−2
−1
0
1
2
3
Time [s]
Vel
ocity
[m/s
]
Buoy and commanded Velocity
z (T)z (P)zcom
0 10 20 30 40 50−40
−20
0
20
40
60
Time [s]
Pow
er [k
W]
Power Generation
Pgen (T)Pgen (P)
Fig. 3.7: Comparison between “MPC Traj” (T) and “MPC Power” (P) in case of a
superposition of sine waves as input signal.
30 CHAPTER 3. ONE-BODY WEC
Chapter 4
Linear Model Predictive Control of
Two-Body WEC
This chapter presents a hydrodynamic two-body model of the point absorber in the
time domain, which emphasizes the special mooring configuration and the formula-
tion as a state space model. The next section deals with the model predictive control
algorithm and extents the work done in the previous chapter. Additionally, two dif-
ferent approaches to handle possible infeasibility problems are shown before giving an
insight into the implementation of the two-body MPC. Finally, simulation results of
both approaches with irregular wave data are compared. The influence of horizon and
step time of the control algorithm is also discussed by means of simulation results.
Finally the influence of the mooring parameter for power generation is shown before
the robustness behaviour is determined.
4.1 Two-Body Model
In this chapter, the point absorber is considered as a two-body device. This assumption
is more realistic and better reflects the actual physical device. The left side of Fig. 4.1
illustrates the L10 point absorber developed at the Oregon State University. The right
side shows a schematic two-body diagram which is used to derive the model. The
floating body is called float or buoy, and the damping body is a combination of a spar
and a ballast tank (in the following just called spar). Furthermore, the spar is moored
to the sea floor in order to dampen the spar’s motion. Also, the two-body model is
restricted to heave motion.
4.1.1 Equations of Motion
Much work has already been done on modelling two-body point absorbers. The herein
presented modelling follows the work of Eidsmoen [13] and Ruehl [37]. In order to derive
32 CHAPTER 4. TWO-BODY WEC
Sea Floor
mooring
Tank
Spar
PTO
x
zFloat
Fig. 4.1: L10 Wave Energy Coverter [38] (left) and schematic diagram (right).
the equations of motion for the two bodies in the time-domain, some assumptions are
made:
• The formulation is based on Linear Wave Theorie (LTW).
• Frequency dependent parameters of the L10 are assumed to be constant.
• The spar is taut-moored with three cables. The pretension of the cables is induced
by the buoyancy forces of the spar. Therefore, the spar’s buoyancy force can be
neglected.
• The radiation forces are assumed to be linear and no convolution terms are used
to calculate it.
As can be seen on the right side of Fig. 4.1, x and z denote the position of the spar,
respectively, of the buoy. Based on Newton’s law, the dynamic equations of the buoy
can be written as
Fgen + Fe1 − Fr1 − Fh1 − Fr12 = m1z, (4.1)
where z(t) is the buoy acceleration, m1 is the mass of the buoy, Fe1 is the excitaton
force induced by the incoming waves, and Fgen is , as in the one-body model, the force
produced by the power take-off system. Similar to the one-body case, the forces are
Fr1 = A1z(t) + b1z(t), (4.2)
Fh1 = gρπr2buoyz(t) = k1z(t), (4.3)
where A1 is the buoy’s added mass, b1 is its viscous damping and k1 is the hydrostatic
stiffness.
Furthermore, there is a coupled radiation force resulting from the interaction of the
two bodies. Here, the force Fr12 is acting from the spar on the buoy and can be written
as
Fr12 = A12x. (4.4)
4.1. TWO-BODY MODEL 33
The same procedure can be applied to the second body. It follows that
−Fgen + Fe2 − Fr2 − Fr21 − Fm = m2x (4.5)
Fr2 = A2x+ b2x (4.6)
Fr21 = A21z (4.7)
Fm = 3K(sinα)2x = Kmx. (4.8)
There is no restoring or buoyancy force, since it is assumed that this force causes the
pretension in the mooring cables.
The mooring force is dependent on the adopted configuration. In this thesis, a
taut-moored buoy with 3 cables is considered as shown in Fig. 4.2. The three mooring
Fig. 4.2: Mooring configuration with three cables (left) and schematic diagram for
force derivation (right).
cables are configured like a tripod and there is an angle α with respect to the sea floor.
According to Hook’s law, the mooring force in the direction of the cable can be written
as
F = −K(L′ − L), (4.9)
where K is the cable stiffness. The vertical mooring force is then
Fm = −3F sin(α). (4.10)
Using the cosine theorem yields
Fm = −3K(√
L2 + x2 − 2Lx cos(π
4+ α)− L
)sin(α). (4.11)
However, this is a nonlinear law for the mooring. It is expected that linearization
around x = 0 yields good results, since x << L.
34 CHAPTER 4. TWO-BODY WEC
The linearization gives
Fm,lin = Fm(x = 0) +δFm
δx(x = 0) x
= −3K sin(α)x− L cos(π
4+ α)
√L2 + x2 − 2Lx cos(π
4+ α)
(x = 0) x
= 3K sin(α) cos(π
4+ α)x
= −3K sin(α)2x = −Kmx
(4.12)
This holds for x > 0. The same result with the opposite sign follows for x < 0. Even
for large displacements such as 0.5 m, the difference between the nonlinear and the
linear mooring force calculation is only 0.04% for a cable length of 170 m. Hence, the
linear case is a very good approximation and the mooring force can be written as in
(4.8).
4.1.2 State Space Form and Discretization
In order to control the two-body point absorber via MPC, a discrete time state space
representation is necessary as well. Here, the formulation as a state space model is not
straightforward. The problem lies in the coupling terms within the coupled radiation
calculation. This coupling occurs in the second derivative, thus a state space model
can not be formed without reformulating first. Equations (4.1)-(4.8) can be rewritten
asFgen + Fe1 − b1z − k1z − A12x
m1 + A1
= z (4.13)
−Fgen + Fe2 − b2x−Kmx− A21z
m2 + A2
= x. (4.14)
Transforming these equations in state space form requires plugging (4.13) into (4.14)
and vice versa to get rid of the coupling terms A21z and A12x. The equations can be
restated as
z(m1 + A1 −
A12A21
m2 + A2︸ ︷︷ ︸
me1
)= Fgen + Fe1 − b1z − k1z
+A12
m2 + A2
Fgen −A12
m2 + A2
Fe2 +A12b2
m2 + A2
x+A12Km
m2 + A2
x
(4.15)
x(m2 + A2 −
A21A12
m1 + A1︸ ︷︷ ︸
me2
)= −Fgen + Fe2 − b2x− A21
m1 + A1
Fgen
− A21
m1 + A1
Fe1 +A21b1
m1 + A1
z +A21Km
m1 + A1
z −Kmx
(4.16)
Now, it is possible to find a state space formulation with the state vector
x =[
z z x x]T
and the initial conditions x0 =[
0 0 0 0]T
. Moreover, it is
4.2. MPC FORMULATION 35
assumed that the entire state is measurable. The system in state space form can be
written as
x = Ax+BFgen +B1Fe1 +B2Fe2 ,
y = x,(4.17)
where
A =
0 1 0 0
− k1me1
− b1me1
A12Km
me1 (m2+A2)A12b2
me1 (m2+A2)
0 0 0 1A21k1
me2 (m1+A1)A21b1
me2 (m1+A1)−Km
me2− b2
me2
, (4.18)
B =
01
me1+ A12
me1 (m2+A2)
0
− 1me2
− A21
me2 (m1+A1)
(4.19)
B1 =
01
me1
0
− A21
me2 (m1+A1)
, B2 =
0
− A12
me1 (m2+A2)
01
me2
. (4.20)
In what follows, the inputs Fgen, Fe1 and Fe2 are denoted by u, v and w, respectively.
With the same discretization approach as in Chapter 2, the following discrete-time
system can be obtained
xk+1 = Adxk +Bduk +Bd1vk +Bd2
wk, x0 ∈ R4,
yk= xk, (4.21)
where
Ad = eAh, Bd =
∫ h
0
eAφ dφB, (4.22)
Bd1=
∫ h
0
eAφ dφB1, Bd2=
∫ h
0
eAφ dφB2. (4.23)
4.2 MPC Formulation
The MPC formulation for the two-body case is very similar to the direct power for-
mulation in the one-body case. There is no information about an optimal reference
trajectory, so this formulation is also the appropriate way to deal with the two-body
problem.
The optimization problem for the two-body case can be defined as
minxk,uk
J(xk, uk), (4.24)
36 CHAPTER 4. TWO-BODY WEC
where
J(xk, uk) = −N∑
k=1
[−q
(zk − xk
)uk−1
︸ ︷︷ ︸
−Pgen
−r u2k−1
], (4.25)
subject to
xk+1 = Adxk +Bduk +Bd1vk +Bd2
wk (4.26)
|zk − xk| ≤ cp, ∀k = 1, . . . , N (4.27)
|zk − xk| ≤ cv, ∀k = 1, . . . , N (4.28)
|uk| ≤ cu, ∀k = 0, . . . , N − 1, (4.29)
One main difference is that the position and velocity constraints are now referred to the
relative position and relative velocity between buoy and spar, since the stroke length
is determined by the relative displacement. Also, the generated power is calculated by
the product of the generator force and the relative velocity.
Again, the following augmented vectors are used
X =[
xT1 , x
T2 , ..., x
TN
]T
, U =[
u0, u1, ..., uN−1
]T
, (4.30)
V =[
v0, v1, ..., vN−1
]T
, W =[
w0, w1, ..., wN−1
]T
. (4.31)
Solving system (4.26) and substituting in itself yields
X = Jxx0 + JuU + JvV + JwW , (4.32)
where
Jx =
Ad
Ad2
Ad3
...
AdN
, Ju =
Bd 0 0 . . . 0
AdBd Bd 0 . . . 0
Ad2Bd AdBd Bd . . . 0...
. . ....
AdN−1Bd Ad
N−2Bd . . . Bd
, (4.33)
Jv(w) =
Bd1(2)0 0 . . . 0
AdBd1(2)Bd1(2)
0 . . . 0
Ad2Bd1(2)
AdBd1(2)Bd1(2)
. . . 0...
. . ....
AdN−1Bd1(2)
AdN−2Bd1(2)
. . . Bd1(2)
, (4.34)
and
dim(Ju,Jv,Jw) = (4N ×N),
dim(Jx) = (4N × 4).(4.35)
4.3. INFEASIBILITY HANDLING 37
Now, the objective function (4.25) can be reformulated in vector form as
J(X ,U) = q(X(2) −X(4)
)TU + UT R U= q
(S1X − S2X
)TU + UT R U= qX T (S1
T − S2T )
︸ ︷︷ ︸
S
U + UT R U(4.36)
with the matrix R = diag(r) with dim(R) = (N × N) and the matrices S1, S2
with dim(S1,S2) = (N × 4N). S1 and S2 extract the second state (buoy velocity),
respectively, fourth state (spar velocity) from the augmented state vector X .
S1 =
0 1 0 0 0 0 . . . 0 0 0
0 0 0 0 0 1 . . . 0 0 0...
. . ....
0 0 0 0 0 0 . . . 1 0 0
, (4.37)
S2 =
0 0 0 1 0 0 0 . . . 0
0 0 0 0 0 0 0 1 . . . 0...
. . ....
0 0 0 0 0 0 0 0 . . . 1
. (4.38)
Using (4.32), the objective function can be formulated as a quadratic function that
depends on U , namely,
J(U) = UT(qJu
TS+ R)U + q
(xT0 Jx
T + VTJvT +WTJw
T)S U . (4.39)
The constraint formulation as well needs just a few adjustments based on the one-body
case. Provided that all constraints can be written as in (3.44) and (3.45), the MPC
can be written as
minU
J(U), (4.40)
where
J(U) = UT(qJu
TS+R)U + q
(xT0 Jx
T + VTJvT +WTJw
T)S U , (4.41)
subject to[
DD
EDJu
]
U ≤[
d
e− EDJxx0 − EDJvV − EDJwW
]
. (4.42)
This problem is also a convex optimization problem, as shown in Appendix A.
4.3 Infeasibility handling
In general, constrained optimization problems makes searching for the optimal solution
more difficult. Furthermore, a serious problem can arise: the optimization problem is
infeasible. That means there exists no solution within the boundaries. If this situation
occurs, the optimization stops without a solution and the control loop is open. This
38 CHAPTER 4. TWO-BODY WEC
breakdown of the control can cause serious damage to the device and should be avoided.
There are different possibilities to handle infeasibility problems. Most approaches
try to deal with the infeasibility problem after it has occured. A simple method consists
of setting the control signal equal to a constant value. Also, another type of control
law, for example a P, PI or PID controller can be used in the event that the MPC does
not find a solution. However, both implementations can not guarantee stability of the
system within the constraints, since the system was already in a critical state when the
breakdown occured. Another method prioritizes constraints and does not consider the
least important ones while solving the problem again. However, it can not be assured
how much the constraints get violated.
This thesis introduces two approaches regarding hard and soft constraints. The
first approach tries to find a feasible solution by relaxing some constraints after an
infeasibility condition occurs, and resolves the optimization problem for the expanded
region. Here the generator force limit cu and the velocity constraint cv can be relaxed,
since overspeed and over-rated generator conditions can be tolerated for the short term
[7]. The constraints for the new optimization can be defined by
|zk − xk| ≤ cp, ∀k = 1, . . . , N (4.43)
|zk − xk| ≤ rv cv, ∀k = 1, . . . , Nr (4.44)
|zk − xk| ≤ cv, ∀k = Nr + 1, . . . , N (4.45)
|uk| ≤ ru cu, ∀k = 0, . . . , Nr − 1 (4.46)
|uk| ≤ cu, ∀k = Nr, . . . , N (4.47)
(4.48)
where rv and ru are the relaxation factors for velocity and generator force, respectively,
and Nr denotes the number of time steps into the future until the non-relaxed con-
straints are valid again. This helps improve the stability attributes of the MPC, since
it allows to violate the limits only at the beginning of the horizon.
The second approach tries to prevent the occurance of infeasibility problems from
the start. The original hard constraints are replaced by soft constraints through the
introduction of positive slack variables ǫp, ǫv. In order to penalize violations of con-
straints, quadratic terms including the slack variables are inserted into the objective
function that yields the new optimization problem
minU ,ǫp,ǫv
Jnew(U , ǫp, ǫv), (4.49)
where
Jnew(U , ǫp, ǫv) = J(U) + wpǫ2p + wvǫ
2v (4.50)
4.4. IMPLEMENTATION 39
subject to
|zk − xk| − ǫp ≤ cp, ∀k = 1, . . . , N (4.51)
|zk − xk| − ǫv ≤ cv, ∀k = 1, . . . , N (4.52)
|uk| ≤ cu, ∀k = 0, . . . , N − 1 (4.53)
0 ≤ ǫp ≤ cǫp , 0 ≤ ǫv ≤ cǫv . (4.54)
The constraints cǫp , cǫv are hard upper bounds for the slack variables which are nec-
cessary, in particular, for the position. The weighting factors wp, wv can be arbitrarily
choosen and weight the penalty for violating the position and the velocity constraints,
respectively.
4.4 Implementation
The simulation is also implemented using Matlab/SIMULINK. A diagram of the simu-
lation model is shown in Fig. 4.3. Here, different types of irregular wave data obtained
from [36] can be loaded. The prediction for the incoming wave elevation is calculated
in the “Prediction calculation” block, where it is assumed that the prediction is per-
fect. In the next block, the excitation forces for both bodies are calculated by means
of causal and noncausal impulse response functions from [36] as well. In that work, the
impulse responses are obtained using frequency domain hydrodynamic analysis with
ANYSY/AQUA [1] for the L10 wave geometry and parameters. The actual MPC is
implemented similarly to the one-body case in a Level-2 Matlab S-Function, and ob-
tains the future predictions for the excitation forces of both bodies and the current
state of the device as inputs. The actual optimization problem is solved by means of
the Matlab QP-solver “quadprog”. In order to check the status of the optimization,
several other outputs are given to find, for instance, the points where the infeasibility
catching is active. Moreover, it is assumed that all states are measurable.
Simulation Time
12:34
UY
UY
RealPlant
Fgen
Fe_1
Fe_2
z
zdot
x
xdot
Prediction calculation
Prediction_2
PTO
−20000
MPC
TwoBody_diff
Iteratations firstoptimization
vel_buoy
pos_buoy
F_gen_opt
vel_plate
pos_plate
F_e_2
vel_plate
vel_buoy
F_e_1
vel_plate
pos_plate
vel_buoy
pos_buoy
F_gen
F_e_2
vel_diff
F_gen_optF_e_1
Exitflag Optimization
Exitflag Infeasibility catching
Excitation Force Determination
eta
eta1
Fe1
Fe2
Add
Fig. 4.3: SIMULINK simulation model for two-body WEC control with MPC.
40 CHAPTER 4. TWO-BODY WEC
For the system parameters of the L10, the results in [36] obtained by ANSYS AQWA
[1] analysis are used. An overview is shown in Table 4.1, where the mooring constant
Variable Value
m1 2625.3 kg
m2 2650.4 kg
A11 8866.7 kg
A22 361.99 kg
A12 361.99 kg
A21 361.99 kg
b1 5,000 N/(m/s)
b2 50,000 N/(m/s)
k1 96,743 N/m
Km 300,000 N/m
Tab. 4.1: System parameter of the two-body L10 WEC.
is based on an angle α = 60◦ and a cable stiffness K = 133,333Nm
which is within the
common range for the stiffness of mooring cables, according to [10].
4.5 Results
Computer simulations are used to validate the MPC algorithm and its performance
regarding the generated power. Furthermore, the formulation with relaxed constraints
is compared to the soft constraints formulation. Another focus is on the behaviour
when changing the parameters ∆t and Thor. In the end, the MPC is tested with
several changes of parameters only in the “RealPlant” block, in order to simulate
system uncertainties. A frequency spectrum from January 2009 of the NDBC Offshore
buoy 46050 which is deployed off the coast of Oregon west of Newport [26] is used to
generate a time series for the wave elevation. In all simulations this time series is used
as the input signal to calculate the excitation forces.
Six different cases are treated in this section. First, the controller behaviour of “Case
1” and “Case 2” are compared. The parameters for “Case 1” are listed in Table 4.2.
This MPC is implemented with the relaxed constraint formulation. This means that the
generator force constraint of 80,000 N can be violated in case an infeasibiliy condition
occurs up to a value of 120, 000 N and the velocity constraint up to 2 ms. In “Case
2”, the MPC is implemented by means of soft constraints. This formulation has no
parameter values for Nr, rv and ru. The changed and the new parameters are listed in
Table 4.3. To get comparable parameters, the hard constraint for the position is also
set to 1 m consisting of 0.9 m soft constraint and the slack variable constraint of 0.1 m,
4.5. RESULTS 41
Variable Explanation Value
∆t sample time for optimization 0.1 s
Thor Optimization horizon 3 s
N Number of values 30
T Simulation Time 100 s
q Power weighting factor 1
r Input weighting factor 0
cp Relative position constraint 1 m
cv Relative velocity constraint 1 m/s
cu Generator force constraint 80,000 N
Nr Relaxation number 10
rv Relaxation factor velocity 2
ru Relaxation factor generator force 1.5
Tab. 4.2: MPC parameter values for the formulation with relaxed constraints (Case 1).
Variable Explanation Value
cp Relative position constraint 0.9 m
cǫp Slack variable position constraint 0.1 m
cǫv Slack variable velocity constraint 1 m/s
wp Weighting factor position slack 108
wv Weighting factor velocity slack 106
Tab. 4.3: MPC parameter values for the formulation with soft constraints (Case 2).
and the same holds for the velocity constraint. Furthermore, the weighting factor for
the position slack is much greater than for the velocity, in order to penalize violations
of the position constraint harder than violations of the velocity constraint.
To get a first insight into the motion of the incoming waves and of the device,
Fig. 4.4 shows wave, buoy and spar position for “Case 1”. The wave elevation η has a
significant wave height of 4 m. It can be seen that the buoy position slightly lags the
wave elevation and can not achieve the same amplitude as the wave elevation due to
the constraints and the induced generator force. In general the spar position is within
±0.3 m.
More interesting is how often an infeasibility problem occurs, and Fig. 4.5 shows
that the optimization problem is infeasible at several points. A consecutive time span
within which the optimization problem is not feasible is around 48 s. This is an
interesting point to look at in the next figure as well. Fig. 4.6 shows the comparison
between “Case 1” and “Case 2”. On the top left it can be seen that the hard position
constraint is never violated in either formulation. The trajectory in “Case 2” tries to
respect the soft constraint, since the penalty for violations is strong. The opposite can
42 CHAPTER 4. TWO-BODY WEC
0 20 40 60 80 100−2.5
−2
−1.5
−1
−0.5
0
0.5
1
1.5
2
2.5
Time [s]
Pos
ition
[m]
zxη
Fig. 4.4: Wave elevation, buoy position and spar position for the relaxed constraints
formulation (Case 1). The wave data is from January 2009 of the NDBC
Offshore buoy 46050.
be seen for the relative velocity on the bottom left. Since the penalty for violations
is less, “Case 2” tends to violate this soft constraint more often. The generator force
constraint in “Case 2” is never violated which is the purpose of the formulation. Only
in the relaxed formulation is this constraint allowed to relax and it seems to be used
at several instants in time, in particular around 48 s. At that time, the genarator force
almost reaches its hard limit.
On the bottom right, the power generation is shown and there is no noticeable
difference between both lines in the figure. However, the average power of “Case 1” is
26.13 kW and is only 24.62 kW for “Case 2”. A possible reason for this is, for example,
the possibility of having a larger generator force in “Case 1”. Moreover, in “Case 2”
the MPC tries to respect the soft constraint of 0.9 m and thus limits the usable stroke
displacement which leads to less power extraction. That can be reduced by lowering
the weighting factor for the position slack.
It should also be noted that the optimization problem in “Case 2” is always feasible,
which is a big advantage in regards to the computational effort of the MPC. Indeed,
the soft constraints formulation contains two more optimization variables (ǫp, ǫv) which
slightly increases the computation time, but in many cases it is possible to operate the
MPC without infeasibility problems. Since a MPC is supposed to run in real time, a
recalculation of the optimization problem as in “Case 1” is not always possible. So it
is adventageous to have a formulation which is in general able to calculate the solution
without recalculating as in the soft constraints formulation. However, it has to be
said that even the soft constraints formulation can yield infeasibility problems (though
4.5. RESULTS 43
0 20 40 60 80 100
−2
1
Time [s]
Infe
asib
ility
Cat
ch
Fig. 4.5: Frequency of the infeasibility problem for Case 1. 1 means original problem
is feasible. −2 means original problem is infeasible.
rarely), since the slack variables are also subject to constraints. So, for the worst case
scenario it makes sense to combine both formulations so that it is possible to relax the
generator force constraint, even in “Case 2” if an infeasibility problem occurs.
Next, two cases are compared in terms of the number of optimization variables. In
both cases the soft constraints formulation of “Case 2” is used. In “Case 3” the horizon
time is set to 6 s from 3 s and in “Case 4” the step time is doubled to 0.2 s. Therefore,
the weighting factors for the slack variables are set to half of the original value in “Case
3” and are doubled in “Case 4” in order to get comparable conditions. It is remarkable
that the results of “Case 3” are almost the same as in “Case 2”. Likewise, the average
generated power of 24.44 kW is similar as well. Therefore, the results of both cases are
compared directly, without comparison with “Case 2” which can be seen in Fig. 4.7.
Here as well, no noticeable difference can be seen and the average power in “Case 4”
is 24.34 kW. The advantage of the larger time step is that the number of optimization
variables decreases.
“Case 2” contains 32, “Case 3” 62 and “Case 4” only 17 optimization variables.
This makes a huge difference regarding the computation time, since the computational
effort increases with more optimization variables. “Case 4” yields almost same results,
even though the sample time is doubled. But one important difference can be seen
in Fig. 4.7, especially in the relative velocity plot. The trajectory calculted with the
larger time step tends to oscillate much more which can cause problems (particulary
in case of large inaccuracies between model and the actual device). However, it can be
seen that a horizon of 3 s is sufficient for this type of wave data.
44 CHAPTER 4. TWO-BODY WEC
0 20 40 60 80 100
−1
−0.5
0
0.5
1
Time [s]
Pos
ition
[m]
Position Difference of Buoy and Plate
Case 1Case 2
0 20 40 60 80 100
−1
−0.5
0
0.5
1
x 105
Time [s]
For
ce [N
]
Generator Force
Case 1Case 2
0 20 40 60 80 100−1.5
−1
−0.5
0
0.5
1
1.5
2
Time [s]
Vel
ocity
[m/s
]
Velocity Difference of Buoy and Plate
Case 1Case 2
0 20 40 60 80 100−40
−20
0
20
40
60
80
100
120
Time [s]
Pow
er [k
W]
Power Generation
Case 1Case 2
Fig. 4.6: Comparison between relaxed (Case 1) and soft (Case 2) constraints formu-
lation of the MPC.
0 20 40 60 80 100
−1
−0.5
0
0.5
1
Time [s]
Pos
ition
[m]
Position Difference of Buoy and Plate
Case 3Case 4
0 20 40 60 80 100−1.5
−1
−0.5
0
0.5
1
1.5
2
Time [s]
Vel
ocity
[m/s
]
Velocity Difference of Buoy and Plate
Case 3Case 4
Fig. 4.7: Comparison between the soft constraints formulation with the changed pa-
rameter Thor = 6s (Case 3) and the same formulation with changed param-
eter ∆t = 0.2s (Case 4).
4.5. RESULTS 45
Next, only the influence of the mooring parameter Km on the system peformance is
discussed. Therefore, the mooring constant is changed fromKm = 300,000 N/m (“Case
2”) toKm = 50,000 N/m (“Case 5”). Both cases are simulated with the soft constraints
formulation. The results are shown in Fig. 4.8. The position and velocity trajectories
0 20 40 60 80 100
−1
−0.5
0
0.5
1
Time [s]
Pos
ition
[m]
Position Difference of Buoy and Plate
Case 2Case 5
0 20 40 60 80 100
−1
−0.5
0
0.5
1
x 105
Time [s]
For
ce [N
]
Generator Force
Case 2Case 5
0 20 40 60 80 100−1.5
−1
−0.5
0
0.5
1
1.5
2
Time [s]
Vel
ocity
[m/s
]
Velocity Difference of Buoy and Plate
Case 2Case 5
0 20 40 60 80 100−40
−20
0
20
40
60
80
100
120
Time [s]
Pow
er [k
W]
Power Generation
Case 2Case 5
Fig. 4.8: Comparison between the soft constraints formulation with mooring constant
Km = 300,000 N/m (Case 2) and the same formulation with Km = 50,000
N/m (Case 5).
on the left do not differ significantly. However, a large difference can be seen in the
generator force. The generator force in “Case 5” is within its limits as well. But it is
in general far away from the limits and much smaller than in “Case 2”. Due to the
smaller generator force, it can be seen, that the generated power is also much smaller,
namely, only 11.91 kW in comparison to 24.62 kW on average. It stands out as well
that the required reactive power is less which is advantageous regarding the required
energy storage. Fig. 4.9 shows the spar position for both simulations. Because of the
extreme change of the mooring constant, the mooring force decreases significantly and
thus, the spar motion is within a larger range up to ±1.3 m in comparison to only ±0.3
m in “Case 2”. This is the reason why the relative position and velocity between buoy
and spar are naturally less with smaller mooring forces. So, the generator force does
not need to exceed its limits to respect position and velocity constraints. Hence, the
generated power decreases, since the relative motion difference decreases. Generally,
it can be stated that a stronger mooring increases the power generation. However, it
46 CHAPTER 4. TWO-BODY WEC
0 20 40 60 80 100−1.5
−1
−0.5
0
0.5
1
1.5
Time [s]
Pos
ition
Spa
r [m
]
Case 2Case 5
Fig. 4.9: Comparison of Spar position between the soft constraints formulation with
mooring constant Km = 300,000 N/m (Case 2) and the same formulation
with Km = 50,000 N/m (Case 5).
has to be pointed out that a stronger mooring brings the generator faster to its limits.
Therefore, especially for rough wave conditions, it might be advantageous to have a
looser mooring to prevent violations of constraints and physical damage of the device.
Moreover, in case there is a chance to alter the mooring configuration during operation,
that can be used to improve the power generation in mild wave climates by increasing
the mooring constant and in rough conditions, the mooring constant could be reduced
to protect the device from damage.
Finally, the MPC is tested regarding inaccuracies between model and actual device.
Hence the parameters of the system model inside the MPC and the excitation force
calculation remain the same, whereas the parameters of the actual system change. This
definitely does not test the behaviour of every uncertainty. It is only a check regarding
parameter uncertainties and does not include unmodelled dynamic uncertainties or
non-linearities in the actual device. Nevertheless, it is a good first try to get an idea
of the robustness attributes of the proposed MPC.
The changed real plant parameters for “Case 6” and the unchanged model param-
eters are displayed in Table 4.4. Basically, the mooring and damping forces of the
assumed actual WEC are reduced and the added mass and restoring force of the buoy
are augmented. In order to compare the results with the unchanged model, “Case 2”
and “Case 6” are shown together in Fig. 4.10, where there are significant differences
in the velocity and position trajectories. But it is remarkable that the constraints are
not (or only slightly) violated. However the average generated power is only 18.59 kW.
Overall it can be stated that the MPC with the changed system parameters is still
4.5. RESULTS 47
Variable Real Plant Model
A11 9,500 kg 8866.7 kg
A22 320 kg 361.99 kg
A12 380 kg 361.99 kg
A21 340 kg 361.99 kg
b1 4,000 N/(m/s) 5,000 N/(m/s)
b2 42,000 N/(m/s) 50,000 N/(m/s)
k1 120,000 N/m 96,743 N/m
Km 210,000 N/m 300,000 N/m
Tab. 4.4: Comparison of real plant and model parameters.
0 20 40 60 80 100
−1
−0.5
0
0.5
1
Time [s]
Pos
ition
[m]
Position Difference of Buoy and Plate
Case 2Case 6
0 20 40 60 80 100
−1
−0.5
0
0.5
1
x 105
Time [s]
For
ce [N
]
Generator Force
Case 2Case 6
0 20 40 60 80 100−1.5
−1
−0.5
0
0.5
1
1.5
2
Time [s]
Vel
ocity
[m/s
]
Velocity Difference of Buoy and Plate
Case 2Case 6
0 20 40 60 80 100−40
−20
0
20
40
60
80
100
120
Time [s]
Pow
er [k
W]
Power Generation
Case 2Case 6
Fig. 4.10: Comparison between the original soft constraint formulation with original
WEC parameters of Table 4.1 (Case 2) and the same formulation with the
changed WEC parameters of Table 4.4 for the L10 (Case 6).
stable and remarkably robust with respect to the system constraints.
For a better overview, all discussed cases with explanation are shown in Table 4.5.
48 CHAPTER 4. TWO-BODY WEC
Case Explanation
1 Relaxed constraint formulation
2 Soft constraint formulation
3 Soft constraint formulation with larger step time (∆T = 0.2 s)