Masters Thesis: Nonlinear control of electronic converters

162
Delft Center for Systems and Control Nonlinear control of electronic converters Fast and optimal control using sampling-driven nonlinear MPC R. Koch Master of Science Thesis

Transcript of Masters Thesis: Nonlinear control of electronic converters

Page 1: Masters Thesis: Nonlinear control of electronic converters

Delft Center for Systems and Control

Nonlinear control of electronicconvertersFast and optimal control using sampling-drivennonlinear MPC

R. Koch

Mas

tero

fScie

nce

Thes

is

Page 2: Masters Thesis: Nonlinear control of electronic converters
Page 3: Masters Thesis: Nonlinear control of electronic converters

Nonlinear control of electronicconverters

Fast and optimal control using sampling-driven nonlinear MPC

Master of Science Thesis

For the degree of Master of Science in Systems and Control at DelftUniversity of Technology

R. Koch

March 11, 2021

Faculty of Mechanical, Maritime and Materials Engineering (3mE) · Delft University ofTechnology

Page 4: Masters Thesis: Nonlinear control of electronic converters

Copyright © Delft Center for Systems and Control (DCSC)All rights reserved.

Page 5: Masters Thesis: Nonlinear control of electronic converters

Abstract

This thesis considers the design of the sampling-driven nonlinear model predictive controllerfor power electronic converters. Most model predictive control (MPC) schemes that are usednowadays lack in the application for systems with high sampling frequencies because of theirhigh computational time, especially when the system is nonlinear. This is, for example, thecase for most of the power electronic systems. Recently, a new approach of MPC control isproposed which is based on sampling control inputs from the input space. In contrast withother MPC approaches, this approach is focused on suboptimal control instead of the optimalcontrol in other MPC approaches which usually results in a less optimal control sequence,but, furthermore, it still benefits from all the advantages of the MPC control method.This thesis describes several efficient and fast methods to determine the offline part of thesampling-driven nonlinear MPC (SD-NMPC) controller, which are the local controller withcorresponding domain of attraction (DOA) and the initial control sequence steering the systeminto this DOA, using only linear optimization tools. Among all these methods, we determinedthe best option for the buck-boost converter with resistive load and the voltage source inverter(VSI) controlling a permanent-magnet synchronous motor (PMSM). Besides the offline part,we also improved the online part of the SD-NMPC control method which resulted in a fastand optimal controller for these systems. This method has shown all the benefits of theimplementation of an MPC controller. Based on the results, we could conclude that theSD-NMPC control method is a fast and efficient way to apply an MPC method to powerelectronic converters.

Master of Science Thesis R. Koch

Page 6: Masters Thesis: Nonlinear control of electronic converters

ii

R. Koch Master of Science Thesis

Page 7: Masters Thesis: Nonlinear control of electronic converters

Table of Contents

Preface xiii

1 Introduction 11-1 State of the art of the control of power converters . . . . . . . . . . . . . . . . . 11-2 Research topic and content of this thesis . . . . . . . . . . . . . . . . . . . . . . 21-3 Contributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2 Model of Electronic Converters 52-1 The buck-boost converter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2-1-1 Design and operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62-1-2 Discrete model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82-1-3 Equilibrium points and set of allowable states and inputs . . . . . . . . . 9

2-2 Three-phase voltage source inverter (VSI) with permanent magnet synchronousmotor (PMSM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102-2-1 Field oriented control . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122-2-2 Motor model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142-2-3 Equilibrium point and set of allowable states and inputs . . . . . . . . . . 19

2-3 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

3 Local controller and domain of attraction (DOA) of the power converter systems 233-1 Random sampling approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

3-1-1 Linear quadratic controller . . . . . . . . . . . . . . . . . . . . . . . . . 243-1-2 Initial proposal for the DOA . . . . . . . . . . . . . . . . . . . . . . . . 253-1-3 Sampling an n-dimensional ellipsoid . . . . . . . . . . . . . . . . . . . . 263-1-4 The shortened random sampling algorithm to determine the DOA . . . . 293-1-5 Application: the buck-boost converter . . . . . . . . . . . . . . . . . . . 303-1-6 Application: the three-phase VSI . . . . . . . . . . . . . . . . . . . . . . 33

Master of Science Thesis R. Koch

Page 8: Masters Thesis: Nonlinear control of electronic converters

iv Table of Contents

3-2 Linear feedback of quadratic systems with linear Lyapunov functions . . . . . . . 353-2-1 Design of the controller . . . . . . . . . . . . . . . . . . . . . . . . . . . 353-2-2 Initial set as DOA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383-2-3 Modified algorithm to determine the DOA using a linear Lyapunov function 423-2-4 Application: the buck-boost converter . . . . . . . . . . . . . . . . . . . 453-2-5 Application: the three-phase VSI . . . . . . . . . . . . . . . . . . . . . . 50

3-3 Linear feedback of nonlinear quadratic systems with quadratic Lyapunov function 503-3-1 Design of the controller . . . . . . . . . . . . . . . . . . . . . . . . . . . 513-3-2 Lyapunov function and initial polytope . . . . . . . . . . . . . . . . . . . 533-3-3 The algorithm used to determine the linear feedback control gain with

corresponding DOA for quadratic systems . . . . . . . . . . . . . . . . . 563-3-4 Application: the buck-boost converter . . . . . . . . . . . . . . . . . . . 583-3-5 Application: the three-phase VSI . . . . . . . . . . . . . . . . . . . . . . 61

3-4 Nonlinear feedback of nonlinear quadratic systems with quadratic Lyapunov function 623-4-1 Design of the controller with DOA . . . . . . . . . . . . . . . . . . . . . 633-4-2 Application: the buck-boost converter . . . . . . . . . . . . . . . . . . . 693-4-3 Application: the three-phase VSI . . . . . . . . . . . . . . . . . . . . . . 70

3-5 Comparison of different methods to determine the local controller . . . . . . . . 713-6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72

4 Initial control sequence 754-1 Sequential quadratic programming . . . . . . . . . . . . . . . . . . . . . . . . . 76

4-1-1 Nonlinear control problem . . . . . . . . . . . . . . . . . . . . . . . . . . 764-1-2 Operation of SQP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 774-1-3 Application: the buck-boost converter . . . . . . . . . . . . . . . . . . . 784-1-4 Application: the three-phase VSI . . . . . . . . . . . . . . . . . . . . . . 80

4-2 Successive linearization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 814-2-1 Successive linearization based on the current state only . . . . . . . . . . 814-2-2 Successive linearization based on a sequence of states and inputs . . . . . 834-2-3 Application: the buck-boost converter . . . . . . . . . . . . . . . . . . . 834-2-4 Application: the three-phase VSI . . . . . . . . . . . . . . . . . . . . . . 85

4-3 Linear parameter varying MPC . . . . . . . . . . . . . . . . . . . . . . . . . . . 874-3-1 General form of the LPV model . . . . . . . . . . . . . . . . . . . . . . . 874-3-2 Constructing the LPV-MPC problem . . . . . . . . . . . . . . . . . . . . 894-3-3 Application: The buck-boost converter . . . . . . . . . . . . . . . . . . . 934-3-4 Application: The three-phase inverter . . . . . . . . . . . . . . . . . . . 95

4-4 Comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 964-5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99

R. Koch Master of Science Thesis

Page 9: Masters Thesis: Nonlinear control of electronic converters

Table of Contents v

5 Sampling-driven nonlinear MPC 1015-1 The online SD-NMPC algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . 1015-2 The buck-boost converter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1055-3 Comparing the SD-NMPC control method with a PID controller for the buck-boost

converter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1085-4 The three-phase VSI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1125-5 Comparing the SD-NMPC control method with PI controllers for the three-phase

VSI connected to a PMSM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1165-6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121

6 Conclusions and recommendations 1236-1 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1236-2 Future work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1256-3 Contributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125

A Additional data and results 127A-1 Domain of attraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127

A-1-1 The set P needed to apply Algorithm 2 to the buck-boost converter in buckmode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127

A-1-2 The set P needed to apply Algorithm 2 to the buck-boost converter in buckmode based on a voltage range of 5 V to 15 V . . . . . . . . . . . . . . 127

A-1-3 The set P needed to apply Algorithm 2 to the buck-boost converter inboost mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128

A-1-4 Model of the buck-boost converter for the determination of the local con-troller in Section 3-4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128

A-1-5 Results of applying the control problem of Theorem 4 to the system of thebuck-boost converter in boost mode . . . . . . . . . . . . . . . . . . . . 128

A-1-6 Model of the three-phase VSI connected to a PMSM for the determinationof the local controller in Section 3-4 . . . . . . . . . . . . . . . . . . . . 129

A-1-7 Results of applying the control problem of Theorem 4 to the system of thethree-phase VSI connected to a PMSM . . . . . . . . . . . . . . . . . . 129

B Used distributions for the application of the SD-NMPC controller to the systemof the three-phase VSI connected to a PMSM 131B-1 Uniform distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131B-2 Trapezoidal distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132B-3 Truncated normal distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133B-4 Comparing the distributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134

Bibliography 137

Glossary 141List of Acronyms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141List of Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141

Master of Science Thesis R. Koch

Page 10: Masters Thesis: Nonlinear control of electronic converters

vi Table of Contents

R. Koch Master of Science Thesis

Page 11: Masters Thesis: Nonlinear control of electronic converters

List of Figures

2-1 Electronic circuit of the buck-boost converter . . . . . . . . . . . . . . . . . . . 62-2 The two modes of operation of the buck-boost converter based on the state of the

switch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72-3 Electronic description of the VSI with PMSM load . . . . . . . . . . . . . . . . . 112-4 Block diagram of the implementation of FOC . . . . . . . . . . . . . . . . . . . 122-5 Order in which the transformations that take place in FOC . . . . . . . . . . . . 132-6 Voltage vectors of the VSI in αβ-frame . . . . . . . . . . . . . . . . . . . . . . . 152-7 Schematics of a delta-connected load connected to a wye-connected voltage source 162-8 Schematics of the model of the delta-connected PMSM . . . . . . . . . . . . . . 16

3-1 Results of the determination of the DOA of the buck-boost converter after the firstiteration. The states belonging to the set Js are green coloured, the set Us are redcoloured and the set Ps are blue coloured . . . . . . . . . . . . . . . . . . . . . 33

3-2 Results of the determination of the DOA of the PMSM connected to the VSI afterthe first iteration. The green samples show the coordinates that are inside Js. . . 34

3-3 Initial contractive set (orange) of the buck-boost converter before and after scalingwith respect to the state space (blue) . . . . . . . . . . . . . . . . . . . . . . . 46

3-4 Evolution of the contractive set (P) of the buck-boost converter using Algorithm 2 473-5 Resulting estimations of the DOA of the buck-boost converter where no vertices

are added to the contractive set. Two different values of ζ are used. . . . . . . . 483-6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 493-7 Contractive sets of the buck-boost converter system with complex eigenvalues of

the initial system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 493-8 Resulting estimation of the DOA for the inverter after applying Algorithm 2. . . . 513-9 Graphical representation of the ellipse and polytope P before and after scaling the

ellipse. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 593-10 Graphical results of applying Algorithm 3 to the buck-boost converter in buck mode 603-11 Resulting ellipse and P after applying Algorithm 3 to the buck-boost converter in

boost mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

Master of Science Thesis R. Koch

Page 12: Masters Thesis: Nonlinear control of electronic converters

viii List of Figures

3-12 Resulting sets after applying Algorithm 3 to the system of the inverter . . . . . . 62

3-13 Resulting estimated DOA and P after applying the method described in this sectionfor the buck-boost converter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70

3-14 Resulting estimated DOA after applying the method described in this section forthe three-phase VSI connected to a PMSM. . . . . . . . . . . . . . . . . . . . . 71

3-15 Comparing the methods described in this chapter based on the size of the DOAand the required computational time for the buck-boost converter. . . . . . . . . 73

3-16 Comparing the methods described in this chapter based on the size of the DOAand the required computational time for the three-phase VSI connected to a PMSM. 74

4-1 Plot of the states of the buck-boost converter in two modes (two different equi-librium points) using two different methods to determine the DOA as derived inChapter 3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79

4-2 Control input of the initial sequence of the buck-boost converter in two differentmodes (two different equilibrium points). . . . . . . . . . . . . . . . . . . . . . . 80

4-3 Initial sequence of the three-phase VSI connected to a PMSM computed using SQP. 814-4 Plot of the states of the buck-boost converter in buck mode using the two different

methods of successive linearization. Two different methods to determine the DOAare used as derived in Chapter 3. . . . . . . . . . . . . . . . . . . . . . . . . . . 84

4-5 Initial sequence of the buck-boost converter in boost mode using two approachesof successive linearization. The DOA of the local controller is determined as inSection 3-4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

4-6 Initial control sequence of the buck-boost converter for two modes. The DOA ofthe local controller is determined as in Section 3-4 and the first approach of thesuccessive linearization control problem is used. . . . . . . . . . . . . . . . . . . 85

4-7 State evolution of the initial control sequence of the VSI connected to a PMSMload using two approaches of the successive linearization control method. . . . . 86

4-8 Initial control sequence of the VSI connected to a PMSM load using two approachesof the successive linearization control method corresponding to the state evolutionin Figure 4-7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87

4-9 State evaluation of the initial sequence of the buck-boost converter in buck andboost mode for two different local controllers and their corresponding DOA deter-mined in Chapter 3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94

4-10 Initial sequence of the control input of the buck-boost converter in the two modesbased on the DOA determined in Section 3-4 . . . . . . . . . . . . . . . . . . . 95

4-11 Initial sequence of the three-phase inverter connected to a PMSM in order to reachthe DOA of the local controller determined in Chapter 3. . . . . . . . . . . . . . 96

4-12 Comparing the different methods described in this chapter to determine the initialcontrol sequence based on the length of this sequence and the time needed toobtained it. Two different methods of determining the DOA of the local controllerare used, the method described in Section 3-2 (blue bar) and the method describedin Section 3-4 (red bar). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97

4-13 Comparison between the three methods determining the initial control sequence ofthe three-phase VSI controlling a PMSM which are described in this chapter. Thecomparison is made based on the size of the sequence and the corresponding timeneeded to obtain it. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98

5-1 Histograms of the pseudo-random number generator and the quasi-random numbergenerator based on 10,000 sample values. The interval is set to 0.01. . . . . . . 103

R. Koch Master of Science Thesis

Page 13: Masters Thesis: Nonlinear control of electronic converters

List of Figures ix

5-2 Results of the buck-boost converter in buck mode after applying the SD-NMPCalgorithm. (a) shows the evolution of the inductor current and (b) the evolutionof the output voltage. The corresponding control inputs are shown in (c). Theseresults are compared with the initial sequence based on their values of the objectivefunction in (d). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106

5-3 Results of the buck-boost converter in boost mode after applying the SD-NMPCalgorithm. (a) shows the evolution of the inductor current and (b) the evolutionof the output voltage. The corresponding control inputs are shown in (c). Theseresults are compared with the initial sequence based on their values of the objectivefunction in (d). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107

5-4 Inductor voltage of the buck-boost converter in boost mode (Vo = 40 V) . . . . 1085-5 Frequency response of the buck-boost converter in two different modes. . . . . . 1095-6 Frequency response of the open loop system consisting of the buck-boost converter

and an integrator in two different modes. . . . . . . . . . . . . . . . . . . . . . 1095-7 Frequency response of the open loop system consisting of the buck-boost converter

and the PID controller designed in this section. . . . . . . . . . . . . . . . . . . 1115-8 Responses of the inductor current and the output voltage of the buck-boost con-

verter when using the PID controller and the SD-NMPC controller. . . . . . . . 1125-9 Results of the three-phase VSI with a PMSM as load after applying the SD-NMPC

algorithm. (a) shows the evolution of the stator currents in the dq-frame and (b)the evolution of the rotational velocity of the motor. The corresponding controlinputs are shown in (c) in the dq-frame. These results are compared with the initialsequence based on their values of the objective function in (d). . . . . . . . . . . 114

5-10 Phase currents in the abc-frame. . . . . . . . . . . . . . . . . . . . . . . . . . . 1155-11 Results of the three-phase VSI with a PMSM as load after applying the SD-NMPC

algorithm using intermediate equilibrium points. (a) shows the evolution of thestator currents in the dq-frame and (b) the evolution of the rotational velocity ofthe motor. The corresponding control inputs are shown in (c) in the dq-frame.These results are compared with the initial sequence based on their values of theobjective function in (d). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116

5-12 Schematic overview of the PMSM system controlled by three PI controllers. . . . 1175-13 Frequency response of the stator currents with respect to the stator voltages in

dq-frame. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1185-14 Frequency response of the open loop responses of the stator system with PI con-

troller in dq-frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1185-15 Frequency response of the open loop responses of the rotational velocity of the

motor with respect to the q component of the stator current with and without PIcontroller. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

5-16 Comparison of the states of the PMSM between using PI controllers or the SD-NMPC controller. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120

5-17 Comparison of the states of the PMSM between using PI controllers or the SD-NMPC controller when the reference speed is set at 80 rad/s. . . . . . . . . . . 120

B-1 Two possible implementations of the uniform distribution when sampling from theinput space. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132

B-2 Trapezoidal distribution around an initial control input with µ =[0.72530.0997

]and σ =

[0.050.01

]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134

Master of Science Thesis R. Koch

Page 14: Masters Thesis: Nonlinear control of electronic converters

x List of Figures

B-3 Truncated normal distribution around an initial control input with µ =[0.72530.0997

]and σ =

[0.050.01

]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135

B-4 Evolution of the value of the objective function of the three-phase VSI connectedto a PMSM when controlled with SD-NMPC using different sampling methods . 135

R. Koch Master of Science Thesis

Page 15: Masters Thesis: Nonlinear control of electronic converters

List of Tables

2-1 Values of the components and parameters of the buck-boost converter . . . . . . 82-2 Values of the components and parameters of the VSI connected to the PMSM . 19

3-1 parameters used for Algorithm 1 . . . . . . . . . . . . . . . . . . . . . . . . . . 323-2 Parameters used in Algorithm 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . 463-3 Results of applying Algorithm 2 to the buck-boost converter system using different

methods for increasing the relative distance between the origin and the vertices of P 47

5-1 Comparison between different number of samples in step of horizon for the buck-boost converter in boost mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . 107

5-2 Values of the parameters used to design the PID controller for the buck-boostconverter in buck mode (Vo = 10V) and boost mode (Vo = 40V). . . . . . . . . 110

5-3 Intermediate equilibrium points and boundary values of the three-phase VSI con-nected to a PMSM with reference speed of 140 rad/s. . . . . . . . . . . . . . . 115

5-4 Tuning parameters of the PI controllers used for the control of the three-phase VSIconnected to a PMSM. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118

Master of Science Thesis R. Koch

Page 16: Masters Thesis: Nonlinear control of electronic converters

xii List of Tables

R. Koch Master of Science Thesis

Page 17: Masters Thesis: Nonlinear control of electronic converters

Preface

This document represents my Master of Science graduation thesis at the Delft University ofTechnology. The topic of my thesis is based on both the technical development of the controlin power converters as the relation between my master System and Control and my bachelorElectrical Engineering.I want to thank prof.dr.ir. T. Keviczky for his support in my search to my master thesissubject as well as the support during my research.

I hope you enjoy reading my thesis,

Rik Koch

Master of Science Thesis R. Koch

Page 18: Masters Thesis: Nonlinear control of electronic converters

xiv Preface

R. Koch Master of Science Thesis

Page 19: Masters Thesis: Nonlinear control of electronic converters

“I think it’s very important to have a feedback loop, where you’re constantlythinking about what you’ve done and how you could be doing it better. I thinkthat’s the single best piece of advice: constantly think about how you could bedoing things better and questioning yourself.”— Elon Musk

Page 20: Masters Thesis: Nonlinear control of electronic converters
Page 21: Masters Thesis: Nonlinear control of electronic converters

Chapter 1

Introduction

Power converters are used to process and control energy at the input of the converter suchthat the voltages and currents are optimally suited for the load connected to the converter.The input of the converter can be either a DC voltage or current or an AC voltage or cur-rent. Initially power converters have been used to control motors for industrial applications,but nowadays power converters are used in almost all electronic devices varying from homeappliances such as refrigerators and microwaves to wind turbines and solar panels.

1-1 State of the art of the control of power converters

As power converters play an important role in almost all technological artifacts, their controlhas experienced a lot of attention. This has been strengthened by the development of micro-processors. As the density of transistors on a integrated chip has been doubled every 2 years(Moore’s law) for already more than 50 years, the computational speed of these integratedcircuits have been increased as well. This makes it possible to perform more complex com-putations in limited time which results in the switch from the more classical control methodsused to control power converter, such as proportional-integral-derivative (PID) control andclassic linear control (see literature report), towards the more computational complex controlmethods, such as model predictive control (MPC). MPC is a control method that is based onsolving an optimization problem in order to steer a system from its initial state into the desiredequilibrium state. Compared with the other control methods, it is easier to take constraintson parameters (states and inputs) into account as it only adds constraints to the optimizationproblem. Moreover, the design of an MPC controller is also more flexible as more emphasiscan be put on parameters in the system by changing their weights in the objective function.In the beginning, MPC has mainly be used in chemical reactors and power plants becauseof their low sampling frequency, but nowadays MPC is used in a broader variety of appli-cation. This trend is not only caused by the improvement of microprocessors, but also theconverters itself have become more complicated. It is harder to design classical controllers,such as PID controllers, when the dynamics of the system has become more complicated.

Master of Science Thesis R. Koch

Page 22: Masters Thesis: Nonlinear control of electronic converters

2 Introduction

Also, the demand for more strict constraints on voltages and currents has made the design ofclassic controllers more complex. But the development of microprocessors is not enough forthe possibility to implement MPC for power electronic converters, the MPC strategies itselfand the optimization tools have to be improved as well. In this field, there is still lots of spacefor improvement.One of the promising MPC strategies that can be used in the scope of power electronic con-verters is the sampling-driven nonlinear MPC (SD-NMPC) controller introduced in [8]. ThisMPC method is designed specifically for nonlinear control systems with limited computationaltime. The design and application of the SD-NMPC controller can be divided into three steps:

1. The design of a local controller with corresponding domain of attraction (DOA)

2. Based on the initial state of the system, a sequence of control inputs have to be deter-mined which steers the system states into the DOA determined in the previous step

3. Using samples drawn from the input space of the system, the control sequence deter-mined in the previous step combined with the local controller in the first step, can beimproved based on a specified objective function.

The first two steps have to be performed before the system is executed which means thatthey operate offline. This means that the limited computational time, as demanded by thesampling period of the system, does not have to be taken into account for the execution ofthese two steps. The last step is performed online. The offline computations already resultin a stabilizing solution of the control problem. The online computations are only needed toimprove the control sequence and, therefore, make the controller more optimal. The mainadvantage of this control type is that it is computationally light compared with other MPCcontrol methods. The reason is that no nonlinear optimization algorithms have to be usedto make the controller more optimal. Only evaluations of the model and objective functionshave to be performed in order to find a more optimal control sequence.

1-2 Research topic and content of this thesis

In this thesis, we will design a SD-NMPC controller to power electronic converters. Among alltype of power converters, we will apply this controller to the buck-boost converter connectedto a resistive load and the three-phase voltage source inverter (VSI) connected to a permanent-magnet synchronous motor (PMSM). Important considerations in the design of this controlleris limiting the computational time of the execution of the different steps as mentioned before.We will not focus on the design of the specific circuits of these converter, but only on thedesign of the controller. However, we will derive the model of these converters in Chapter 2and discuss important aspects of the behavior of these system. For more information aboutthe electronic design of these converters, we would refer the reader to [23] among others.The models derived in Chapter 2 are used for the design of the SD-NMPC controller in thesubsequent chapters of this thesis. In Chapter 3, the first step of the SD-NMPC controllerwill be investigated. This includes the elaboration of different methods that can be used todetermine a local controller for the SD-NMPC controller with its corresponding DOA. The

R. Koch Master of Science Thesis

Page 23: Masters Thesis: Nonlinear control of electronic converters

1-3 Contributions 3

best suited method is chosen for the two converters and will eventually be used to apply theSD-NMPC controller.These methods are specifically chosen based on the form of the models ofthese systems which is quadratic in both cases as we will show in Chapter 2. The initial controlsequence steering the initial state of the system into this DOA is discussed in Chapter 4. Alsoin this chapter, we will elaborate different methods to determine this initial sequence andreason which is the most suited for these converters. Finally, in Chapter 5 we will applythe SD-NMPC controller to the buck-boost converter and the three-phase VSI and discussthe resulting responses. We will also compare these results with a PID controller applied tothese converters. Thereafter, the conclusion of this thesis will be given in Chapter 6 togetherwith recommendations for future research topics related to the control of power electronicconverters.

1-3 Contributions

When designing the SD-NMPC controller for the buck-boost converter connected to a resistiveload and the three-phase VSI connected to a PMSM, we will use different methods to applythe three steps mentioned above. In the design of the local controller with correspondingDOA, we will use three methods which are based on methods described in literature. Oneof those methods is developed for all types of nonlinear models (Section 3-1) and the twoother methods are specifically developed for the type of quadratic models (Section 3-2 andSection 3-4). The remaining methods described in Chapter 3 (Section 3-3) is also developedfor quadratic models but has fully been developed in this thesis.For the determination of the initial control sequence of the SD-NMPC controller (the secondstep), we will use three methods that has already been applied in the field of MPC controlbut not specifically for the SD-NMPC controller. This is mainly because of the lack of [8] toresearch methods to determine the initial control sequence in the second step of applying theSD-NMPC controller. [8] uses an "oracle" to determine the initial control sequence.The final step of the SD-NMPC algorithm (Chapter 5) will generally be equal to the methoddescribed in [8]. We will only modify this method based on the applications covered inthis thesis. Those are based on the fact that we will choose a lower control horizon of theSD-NMPC method than the size of the initial control sequence and we will use a differentprobability distribution than the uniform distribution for the control of the three-phase VSIconnected to a PMSM because this will result in a more optimal control sequence. Thesecontributions will be revisited in Chapter 6.

Master of Science Thesis R. Koch

Page 24: Masters Thesis: Nonlinear control of electronic converters

4 Introduction

R. Koch Master of Science Thesis

Page 25: Masters Thesis: Nonlinear control of electronic converters

Chapter 2

Model of Electronic Converters

In this chapter, we will describe the models of two electronic converters that are covered inthis thesis. These are the buck-boost converter with resistive load and the three-phase voltagesource inverter (VSI) with a permanent-magnet synchronous motor (PMSM) as load. Thechoice for the buck-boost converter is based on the simplicity of the model. It consists of twodynamic components which means that the model has only two states. This makes it easyto visualize the trajectory of the states and the domain of attraction (DOA) of this systemamong others. Moreover, the buck-boost converters has only one switch that needs to becontrolled which means that it has only one input. On the other hand, the three-phase VSIis more complicated. It has 6 controlled switches which leads to 2 inputs and 3 states insteadof 2. The choice for the three-phase VSI is made based on the importance of the type ofconverter in real life applications and it also shows how the sampling-driven nonlinear modelpredictive control (MPC) (SD-NMPC) algorithm can be used in a real life application. Thischapter is divided into two main sections. In the first section, the model of the buck-boostconverter is derived which will be used in this thesis and the second section describes thederivation of the model of the three-phase VSI.

2-1 The buck-boost converter

The buck-boost converter is an electronic converter that operates as a DC-DC converter, itconverts a direct current (DC) voltage at the input of the converter into a DC voltage atthe output of the converter. The voltage at the output of the buck-boost converter can beeither lower or higher than the input voltage as the name of the converter already implies.The electronic circuit of the buck-boost converter is drawn in Figure 2-1. It consists of twodynamic components, an inductor L and a capacitor C. The switch S is used to controlthe output voltage of the buck-boost converter by applying a pulse-width modulated (PWM)signal. Furthermore, the buck-boost converter consists of a diode D that ensures the currentcan only flow in one direction and a load Z that is assumed to be resistive in this thesis.

Master of Science Thesis R. Koch

Page 26: Masters Thesis: Nonlinear control of electronic converters

6 Model of Electronic Converters

Figure 2-1: Electronic circuit of the buck-boost converter

2-1-1 Design and operation

Depending on the state of the switch S, the buck-boost converter of Figure 2-1 has two modes.In these two modes, the dynamic behavior of the buck-boost converter is different. In thefirst case the switch is closed (S = 1). This leads to the electronic circuit shown in Figure 2-2a. In this mode, the inductor is charged by the input voltage source while the capacitor isdischarged by the load. There is no current flowing through the diode as the voltage overthe diode is always negative in this mode. This leads to the following first order differentialequations:

diLdt = Vin

L(2-1a)

dvodt = − 1

CZvo (2-1b)

Note that we consider the switch being ideal which means that the voltage drop over theswitch can be neglected. The second mode represents the state where the switch is open(S = 0). Figure 2-2b shows the electronic circuit corresponding to this mode. The diode isconducting in this mode. The reason is that the current through the inductor cannot changeinstantaneously, because that will result in an infinite large voltage over the inductor. Inthis mode, the inductor current will decrease as the inductor discharges. On the other hand,the capacitor is charged by the inductor in this mode. The first order differential equationsbelonging to this mode are given by:

diLdt = − 1

L(vo + Vd) (2-2a)

dvodt = 1

CiL −

1CZ

vo (2-2b)

Note that we modelled the diode using a constant voltage (Vd) that causes a voltage dropwhen the diode is conducting. Now we have determined the dynamic behavior of the buck-boost converter in the two modes separately, we can have a look at the behavior when thebuck-boost converter is switching between these two modes. That is done by applying aPWM signal on the switch with switching time Ts. In the first dTs, where d is the duty cycle,

R. Koch Master of Science Thesis

Page 27: Masters Thesis: Nonlinear control of electronic converters

2-1 The buck-boost converter 7

(a) S = 1 (b) S = 0

Figure 2-2: The two modes of operation of the buck-boost converter based on the state of theswitch

the switch is closed and in the remaining (1 − d)Ts in the period, the switch is open. Weassume that the system is in steady state. This means that the current through the inductorat time t is equal to the current at time t+ Ts, but this current does not have to be constantin between these two time instants. On the contrary, there is a ripple in this current givenby:

∆iL = VindTs2L (2-3)

We want this ripple as small as possible because we will not be able to compensate for thisripple in the design of the controller later in the thesis. That is because the sampling timeis chosen to be exactly equal to the switching time of the buck-boost converter. The processof sampling will automatically filter this behavior of the inductor current. Therefore, it isimportant to choose the components and the switching time in such a way that the ripple isas small as possible. It comes down to choosing a low switching period, or a high switchingfrequency, and an inductor with a large inductance.There is also another reason why we want a large inductance for the buck-boost converter.In order to ensure that the buck-boost converter is able to achieve this average current, thesystem has to operate in continuous conduction mode the whole time. This means that theslope in the inductor current has to be constant in the two modes of the converter as describedabove. In the mode where the inductor is charged, this is not an issue since we assume thatthere is no limit set on the maximum current the inductor can reach in this mode (althoughwe will see later that the average inductor current is limited). In case the converter is in themode where the inductor is discharged, this can be a problem. That is because the inductorcurrent cannot be lower than zero, or the amount of energy obtained from the inductor cannotbe more than the amount of energy stored in the inductor. This means that if all the energyis taken from the inductor, the slope in the inductor current will be zero which means that thebuck-boost converter is operating is discontinuous conduction mode. In order to ensure thatthe buck-boost converter is operating in continuous conduction mode, the inductance needsto be large enough. The minimum value of the inductor is given by the following equation:

L = TsZ

2 (1− d)4 (2-4)

Master of Science Thesis R. Koch

Page 28: Masters Thesis: Nonlinear control of electronic converters

8 Model of Electronic Converters

Table 2-1: Values of the components and parameters of the buck-boost converter

L 430 µHC 22 µFZ 80 ΩTs 25 µsVd 0.7 VVin 20 V

Note that the minimum inductance is dependent on the duty cycle of the switch when thesystem is in steady state (equilibrium point). This means that depending on the choice of L,not every output voltage of the buck-boost converter can be chosen as the converter is not incontinuous conduction mode.Besides the current through the inductor, the voltage at the output of the buck-boost converteris equal at time t and t+Ts, but not constant over time. This voltage has a ripple around itstarget value determined based on the duty cycle of the switching signal:

Vo = d

1− dVin − Vd (2-5)

The ripple on the output voltage can be described as:

∆vo ≈VodTsCZ

(2-6)

It can be seen that also in this case the switching time must be chosen small and the capac-itance of the capacitor must be large in order to minimize the voltage ripple on the outputof the buck-boost converter. In this thesis, the values of the different parameters of thebuck-boost converter are selected as shown in Table 2-1.

2-1-2 Discrete model

An elaborated derivation of the model of the buck-boost converter has already been carriedout in the literature research paper. The resulting average model, its behavior over onesampling time, is given by:

~xk+1 =[

1 −TsL

TsC 1− Ts

CZ

]~xk +

[0 Ts

L

−TsC 0

]~xkuk +

[(Vin+Vd)Ts

L0

]uk −

[VdL Ts0

](2-7a)

= A0~xk +A1~xkuk +Buk + ~f (2-7b)

where ~xk =[iL(k) vo(k)

]Tare the states of the model and uk is the duty cycle of the switch.

The average model shows the nonlinear behavior of the converter due to the product of thestate and the input of the system. Given the input and output DC-voltage of the converter,the equilibrium point is defined as:

~xe =[

11−d

VoZ

Vo

](2-8a)

ue = d (2-8b)

R. Koch Master of Science Thesis

Page 29: Masters Thesis: Nonlinear control of electronic converters

2-1 The buck-boost converter 9

where d = Vo+VdVo+Vin+Vd

is the duty cycle at the equilibrium point. In order to move the equilib-rium point to the origin, we will introduce the ~zk and sk represented by:

~zk = ~xk − ~xe (2-9a)sk = uk − ue (2-9b)

which results in the following model of the system:

~zk+1 = (A0 +A1ue)~zk +A1~zksk + (B +A1~xe)sk (2-10)

The model of the buck-boost converter as described in (2-7) can also be rewritten as a bilinearmodel ([7], [26]):

~xk+1 = A0~xk +B0uk +B(~xk)uk + ~f (2-11)

where B(~xk) =[~xTkB1~xTkB2

]. The system matrices are given by:

A0 =[

1 −TsL

TsC 1− Ts

CZ

], B0 =

[(Vin+Vd)Ts

L0

], B1 =

[0TsL

], B2 =

[−TsC

0

], ~f =

[−VdTs

L0

](2-12)

Also this model has to be translated such that the origin is the equilibrium of this system.Then, the model is given by:

~zk+1 = (A0 +BT(ue))~zk + (B0 +B(~xe))sk +B(~zk)sk (2-13)

where BT(ue) =[(B1ue)T(B2ue)T

]. In some cases, the bilinear model is easier to use as will be made

clear later in this thesis.

2-1-3 Equilibrium points and set of allowable states and inputs

The states of the buck-boost converter model, the capacitor voltage and the inductor current,cannot have any value within the set of real numbers (R). The capacitor voltage must be posi-tive as negative values are physically not possible for the buck-boost converter. Furthermore,the maximum value of this voltage is not determined based on the type of DC converter,but based on the maximum voltage the capacitor or the load can handle. Assume that welimit this voltage between 0 and 50 V. Besides this voltage, the current flowing through theinductor is limited by the choice of the inductor and the diode. Let’s assume that this currentis limited between 0 and 2.5 A. The input variable uk is the duty cycle of the switch. Thisvalue is always limited between 0 and 1 (and between −ue and 1 − ue after the model hasbeen shifted such that the origin is the equilibrium of the system). The sets X and U cannow be determined based on the limits set above and the equilibrium point, because we wantthe origin of the set being the equilibrium which must also be in the interior of these sets. Inthis thesis, we will take two different equilibrium points, one where the buck-boost converteracts as a buck converter and one where this converter acts as a boost converter. As the inputvoltage of the buck-boost converter (Vin) is set at 20 V, choices for the output voltages canbe Vo = 10 V and Vo = 40 V.

Master of Science Thesis R. Koch

Page 30: Masters Thesis: Nonlinear control of electronic converters

10 Model of Electronic Converters

Let us first consider Vo = 10 V (the buck-boost converter in buck mode). This capacitorvoltage results in the following value of the equilibrium point:

~xe =[0.1919

10

], ue = 0.3485 (2-14)

Note that this equilibrium point is between the limits set on the inductor current and theduty cycle of the equilibrium point is between 0 and 1. The set of allowable states and inputscan be constructed based on these values as:

X = ~x ∈ Rn|~aTX,i~x ≤ 1, ∀i ∈ Z[1,4] (2-15a)

AX =[

0 0 0.4333 −5.21170.025 −0.1 0 0

](2-15b)

U = u ∈ Rm|Mu ≤ ~um (2-15c)

M =[

1−1

], um =

[0.65150.3485

](2-15d)

where ~aX,· are the columns of AX.In case we set the output reference voltage to 40 V (boost mode), the equilibrium point isgiven by the following expression:

~xe =[1.5175

40

], ue = 0.6705 (2-16)

which also satisfies the state and input constraints which are set above. Note that the dutycycle is larger than 0.5086 which also indicates that the buck-boost converter is operating inboost mode. Because the expressions of the state and input space of the buck-boost converterare also dependent on the equilibrium point, these deviate from the values shown in (2-15).In case of the buck-boost converter operating in boost mode, those are given by:

X = ~x ∈ Rn|~aTX,i~x ≤ 1, ∀i ∈ Z[1,4] (2-17a)

AX =[

0 0 1.0178 −0.6590.1 −0.025 0 0

](2-17b)

U = u ∈ Rm|Mu ≤ ~um (2-17c)

M =[

1−1

], um =

[0.67050.3295

](2-17d)

2-2 Three-phase voltage source inverter (VSI) with permanentmagnet synchronous motor (PMSM)

The second converter covered in this thesis is the three-phase VSI with a PMSM as the loadof this converter. A VSI is an electrical converter which converts a DC voltage at the input ofthe converter into an alternating current (AC) voltage at the output. This AC voltage has a

R. Koch Master of Science Thesis

Page 31: Masters Thesis: Nonlinear control of electronic converters

2-2 Three-phase voltage source inverter (VSI) with permanent magnet synchronous motor (PMSM) 11

sinusoidal shape. The three-phase concept means that there are three sinusoidal voltages atthe output which have the same frequency and amplitude. The only difference is the phaseof these voltages. This phase must be 120° separated from each other in other to ensure thatthe voltages sum up to 0. The mathematical expression of these voltages are described bythe equations:

va = Vo sin(ωt) (2-18a)

vb = Vo sin(ωt+ 2

3π)

(2-18b)

vc = Vo sin(ωt− 2

3π)

(2-18c)

where ω is the rotational frequency of the sinusoidal wave and Vo the amplitude. The electricalcircuit of the VSI is shown in Figure 2-3a. At the input of the converter a DC voltage sourceis placed. In parallel to this voltage source, we will place a capacitor (in between the voltagesource and the inverter). This capacitor is used to filter the voltage peaks that arise due tothe inductance of the voltage source. More information about this capacitor can be found in[24]. In the sequel of this thesis, we will neglect the dynamic behavior of this capacitor. Thethree-phase inverter itself consists of six switches (S1 − S6), two connected to each phase.These pairs of two switches are complementary to each other. If one of the switches is turnedon, the other one of the pair is always turned off to prevent a short between the positiveand negative terminal of the input DC voltage source. Also, always one of these switches isturned on in order to prevent a floating phase of the load. The VSI is controlled by changingthe state of the switches in order to get the output voltage as in (2-18). A more elaboratedexplanation of the inverter can be found in the literature report.We have chosen a PMSM as the load of the VSI. This motor is shown in Figure 2-3b. The

(a) Schematics of the VSI with PMSM load(b) Cross section of the PMSM with twopole pairs

Figure 2-3: Electronic description of the VSI with PMSM load

mechanical part of the PMSM consists of two parts, the stator and the rotor. The rotor isbuild up of magnets with alternating north and south poles, while the stator is composed ofthree-phase windings as shown in the figure. When a current is flowing through the windingsof the stator, a magnetic field is created. As the current is alternating, so is the magnetic

Master of Science Thesis R. Koch

Page 32: Masters Thesis: Nonlinear control of electronic converters

12 Model of Electronic Converters

field in the stator. Due to the fact that opposite poles will attract and equal poles repel,the magnets on the rotor will experience a force which will cause the rotor to rotate. Themain characteristic of synchronous motors is that the rotor rotates at synchronous speedwhich means that the rotational speed of the rotor is proportional to the frequency of thethree-phase current flowing though the windings on the stator side of the motor.

Figure 2-4: Block diagram of the implementation of FOC

2-2-1 Field oriented control

The switches of the inverter are controlled using field oriented control (FOC). Figure 2-4shows a block diagram of FOC of a PMSM. In FOC, the mechanical angle of the rotor (θr),the rotor velocity (ωr) and the current through all of the three phases are known, eitherby measuring or identification. The reference signal used in FOC is usually the rotationalspeed (rotor speed) or the torque applied to the motor (electromagnetic torque (T )). Thisreference signal will be converted into a reference current that can be compared with thecurrent measured at the three-phase output of the inverter. The controller will determinea correction voltage that should be applied to the PMSM in order to track the references.However, it is not possible to directly apply a voltage to the PMSM. We have to controlthe state of the switches instead. The conversion from the voltage output of the controllerto the PWM signal controlling the switches of the inverter is done using space vector pulsewidth modulation (SVPWM). But before we continue with SVPWM, we have to look atthe transformations that are needed to be done in order to apply this controller. The mainreasons for applying the transformations is that the measured and reference currents are boththree-phase and sinusoidal. This makes is more complicated to construct a controller in order

R. Koch Master of Science Thesis

Page 33: Masters Thesis: Nonlinear control of electronic converters

2-2 Three-phase voltage source inverter (VSI) with permanent magnet synchronous motor (PMSM) 13

to let the system track the references. The transformations that make these signals two-phase and not sinusoidal are the Clarke and Park transformations. These transformationshave already been extensively elaborated in the literature report, so only the definitions arerepeated in this thesis. The Clarke transformation is used to transform the 3-phase systeminto a two-phase system where the two phases are parallel to each other in the αβ-frame.Note that this transformation is possible because of the rule that the sum of the phases ofthe three-phase system is zero. This transformation is mathematically described by:

~xαβ = 23TC~xabc (2-19a)

~xabc = TTC ~xαβ (2-19b)

TC =[1 −1

2 −12

0√

32 −

√3

2

](2-19c)

The transformation from the 2-phase stationary system (αβ-frame) into the 2-phase rotatingsystem is done using the Park transformation. This transformations will remove the sinusoidalbehavior of the signals such that the design of the controller becomes easier. The Parktransformation is dependent on the rotor flux angle (θe) in order to align the d-axis to the rotorflux. The q-axis is orthogonal to the d-axis. The Park transformation can mathematically bedescribed by:

~xdq = TP~xαβ (2-20a)~xαβ = TT

P ~xdq (2-20b)

TP =[

cos(θe) sin(θe)− sin(θe) cos(θe)

](2-20c)

Figure 2-5 summarizes the order in which the transformations take place in FOC method.After we have introduced the Clarke and Park transformations, we can go back to SVPWM

Figure 2-5: Order in which the transformations that take place in FOC

which transforms the correction voltages determined by the controller into the control signalsof the switches of the inverter. As the switches are discrete (either 1 or 0), the voltages onthe output phases of the inverter are also discrete. In order to be able to get continuousvoltages on the output of the inverter, we have to apply PWM signals to the switches whichwill result in an continuous average voltage on the output of the inverter. This means that,over a sampling period (or switching period), the voltage on the output of one of the phasesis Vin for some time and 0 V for the remaining time. The duty cycle of these signals aredetermined based on the correction voltage that has to be obtained. Because Vin is finite, thecorrection voltage is constraint to a hexagon in the αβ-frame as shown in Figure 2-6. Thevertices of this hexagon are determined based on the output voltages of the 8 configurations

Master of Science Thesis R. Koch

Page 34: Masters Thesis: Nonlinear control of electronic converters

14 Model of Electronic Converters

of the inverter. These 8 voltage vectors divide the hexagon in 6 triangles (sectors). If thecorrection voltage is in one of these 6 sectors, this correction voltage can be represented bythe two near voltage vectors, which bound this sector, and the zero vectors (~v0 and ~v7). Therelative time the correction voltage is represented by the non-zero vectors is computed usingthe following equation:

~λ =√

3 VsVin

[sin(π3k − θs

)− sin

(π3 (k − 1)− θs

)] k ∈ Z[1,6] (2-21)

where Vs is the amplitude of the correction voltage and θs is the angle between the correctionvoltage and the positive α-axis such that the correction voltage can be represented by:

~vs = Vs

[cos(θs)sin(θs)

](2-22)

The scalar integer k represents the sector in which the correction voltage is located, such that:

π

3 (k − 1) ≤ θs ≤π

3 k, k ∈ Z[1,6] (2-23)

The order in which the vectors appear within one sampling period is determined such that atevery switch from one vector to another only one of the pair of switches of the inverter hasto change its state. The reason for this is to reduce the harmonics in the system and lossesdue to switching. In case the two elements of ~λ do not sum up to one, which means thatthe zero vectors have to be used, the order of the vectors will always be the same. Firstly,the zero vector ~v0 is applied for 1−~λ(1)−~λ(2)

4 part of the period. Secondly, the non-zero vectorwhere only one switch is on (conducting), is applied for ~λ(1)

2 part of the period followed by theother non-zeros vector for ~λ(2)

2 part of the period. Finally, the zero vector ~v7 is applied to theswitches for 1−~λ(1)−~λ(2)

4 part of the period. Thereafter, all the vectors are applied again forexactly the same time to complete the period, but then mirrored. This means that we startwith the zero vector ~v7 and end with the zero vector ~v0. In the case the sum of the elementsof ~λ equals one, no zero vectors will be applied to the switches within that sampling period.This will change the order in which the vectors are applied to the switches, but the result willalways be in such a way that the least number of switches have to change their state withina sampling period.

2-2-2 Motor model

The model consists of the VSI connected to the PMSM. In the derivation of the model,we assume that the inverter is ideal and operates as a three-phase voltage source which isconnected in a wye configuration. The load can be either connected in a wye configurationtoo or a delta configuration. The advantage of the delta configuration is that the maximumspeed of the motor is larger than when the motor is wye-connected. This is because the phasevoltage over the three phases is

√3 larger. This can be shown using the electrical circuit

given in Figure 2-7. The inverter is shown using the voltage supplies vix (x ∈ a, b, c) andthe dynamic behavior of the motor by the impedance Z. In a wye-connected motor, the

R. Koch Master of Science Thesis

Page 35: Masters Thesis: Nonlinear control of electronic converters

2-2 Three-phase voltage source inverter (VSI) with permanent magnet synchronous motor (PMSM) 15

Figure 2-6: Voltage vectors of the VSI in αβ-frame

phase voltage of the motor (vmx) is equal to vix and so is the current. But when the motor isdelta-connected as in Figure 2-7, the phase voltage of the motor is given by:

vma = via − vib (2-24a)vmb = vib − vic (2-24b)vmc = vic − via (2-24c)

Now, suppose that the inverter voltages are given as in (2-18), then the phase voltages of themotor are given by:

vma =√

3V0 sin(ωt+ φ) (2-25a)

vmb =√

3V0 sin(ωt+ 2

3π + φ

)(2-25b)

vmc =√

3V0 sin(ωt− 2

3π + φ

)(2-25c)

where φ = −16π. The amplitude of the voltage has increased with

√3. Besides the amplitude,

also the phase has changed. This does not really influence the behavior of the motor as it hasnot changed with respect to the other phases of the motor. Note that the power deliveredto the motor is not dependent on the type of connection of the motor. This means thatif the voltage increases with

√3, the current should decrease with the same amount. The

consequence is less ohmic losses in the motor when the motor is delta-connected. It makes thedelta-connected PMSMmore efficient than the wye-connected PMSM. The main disadvantageof using a delta-connection is the circulating current which is extensively explained in [21].This current is the result of the fact that the delta configuration causes a loop by the waythe phases are connected. A circulating current will result in extra copper loss in the phases.Despite of the circulating current, the delta configuration has been favorable for the design

Master of Science Thesis R. Koch

Page 36: Masters Thesis: Nonlinear control of electronic converters

16 Model of Electronic Converters

of a motor and, therefore, this configuration will be used in this thesis.We will derive the model of the PMSM using the equivalent circuit given in Figure 2-8. The

Figure 2-7: Schematics of a delta-connected load connected to a wye-connected voltage source

Figure 2-8: Schematics of the modelof the delta-connected PMSM

phase voltage of the motor is described by the following equation:

~vm = Rs~im + Ld~imdt + d~λm

dt (2-26)

where Rs is the resistance of the stator windings (ohmic losses on the stator side), L is amatrix consisting of the inductance of the stator windings (self-inductance) and the mutualinductance (influence of the inductance of the other phases) and ~λm is the permanent magnetflux caused by the rotor linking the stator windings. We can describe the matrix L by thefollowing equation obtained from [18]:

Laa Lab LacLba Lbb LbcLca Lcb Lcc

=

Ls + Lm cos(2θe) −Ms − Lm cos

(2θe − 2

3π)−Ms − Lm cos

(2θe + 2

3π)

−Ms − Lm cos(2θe − 2

3π)

Ls + Lm cos(2θe + 2

3π)

−Ms − Lm cos(2θe)−Ms − Lm cos

(2θe + 2

3π)

−Ms − Lm cos(2θe) Ls + Lm cos(2θe − 2

3π) (2-27)

where Ls is the self-inductance of the stator windings, Ms the mutual inductance and Lm isthe fluctuation in the inductances. The angle θe is the electrical angle which is a multiplicationof the number of pole pairs (p) with the angle of the rotor (θr). This equation distinguishesa synchronous motor from other motor types.The permanent magnet flux linkage in (2-26) can also be described by a three phase equation,where the phases are separated by 120°. This results in the following expression:

~λm = λpm

cos(θe)

cos(θe − 2

3π)

cos(θe + 2

3π) (2-28)

Note that this flux linkage only has a component in the d-direction (in the dq-frame). Also,the flux will be synchronous to the rotation of the rotor because of this type of motor.

R. Koch Master of Science Thesis

Page 37: Masters Thesis: Nonlinear control of electronic converters

2-2 Three-phase voltage source inverter (VSI) with permanent magnet synchronous motor (PMSM) 17

After a sequence of computations and the Clarke-Park transformations, the resulting model(in dq-frame) can be represented by:

dimddt = −Rs

Ldimd + pLq

Ldωrimq + 1

Ldvmd (2-29a)

dimqdt = −Rs

Lqimq −

pλpmLq

ωr −pLdLq

ωrimd + 1Lqvmq (2-29b)

where Ld = Ls + Ms + 32Lm, Lq = Ls + Ms − 3

2Lm and ωr is the rotational speed of therotor

(ωr = dθr

dt

). Note that also the rotor speed is a dynamic parameter which should also

be represented as a state in the state space description. This state is described using thefollowing torque equation:

TL = TM − TSH (2-30a)

where TL is the load torque, TM the motor torque applied by the stator of the motor to therotor and TSH the shaft instant passive torque. The load torque is dependent on the type ofload attached to the motor. In general, this load can be described by the following dynamicalequation:

TL = JLdωrdt +DLωr +KLθr + TL0 (2-31)

where JL is the inertia, DL the damping parameter and KL the spring constant of the com-bination of the rotor and the load connected to the rotor. This load also applies a constanttorque TL0 to the motor. Another parameter in the torque equation is the motor torque. Thistorque is determined based on the part of the electrical power (Pe) that is transformed intomechanical power. This leads to the following equation of the motor torque:

TM = 32p((Ld − Lq)imdimq + λpmimq

)(2-32)

Other parts of the electrical power are converted into heat (resistive losses) and stored in thewindings (inductive power). The last torque parameter in the torque equation is the shafttorque. We will neglect the influence of the shaft torque on the dynamics of the motor. Now,we can describe the state involving the rotor speed by the following equation:

dωrdt = 3pλm

2JLimq −

KLJL

θr −DLJL

ωr + 3p2JL

(Ld − Lq)imdimq −TL0JL

(2-33)

These state equations are based on the state voltage and current of the motor. The voltageapplied to the motor is not equal to the output voltage of the inverter as described above andthe current flowing through the windings is not equal to the current that can be measured.Therefore, we have to replace the motor voltage and current by the inverter voltage andcurrent which are proportional to each other. This results in the following continuous statespace model:

ddt

iidiiqθrωr

=

−RsLd

0 0 00 −Rs

Lq0 −

√3pλpmLq

0 0 0 10

√3pλpm2JL

−KLJL

−DLJL

iidiiqθrωr

+

pLqLdωriiq

−pLdLqωriid

0p(Ld−Lq)

2JLiidiiq

+

3Ld

00 3

Lq

0 00 0

[vidviq

]−

000TL0JL

(2-34)

Master of Science Thesis R. Koch

Page 38: Masters Thesis: Nonlinear control of electronic converters

18 Model of Electronic Converters

This model includes the rotor angle θr. However, this angle is not going to stabilize to acertain equilibrium point but will continuously increase as the rotational speed reaches anon-zero equilibrium point. Therefore, it is better to remove it from the state space model.This is only possible under the assumption that KL << JL. The state space model will nowonly include 3 states, namely iid, iiq and ωr, instead of 4.In the remaining chapters of this thesis, we will only use discrete models and not continuousmodels. Therefore, we have to discretize this model. We will discretize this nonlinear modelusing the forward Euler method. This results in the following discrete model of the system:

~xk+1 = (A0 +A(~xk))~xk +B0uk + ~f (2-35a)

A(~xk) =

~xTkA1~xTkA2~xTkA3

(2-35b)

A0 =

1− RsTs

Ld0 0

0 1− RsTsLq

−√

3pλpmTsLq

0√

3pλpmTs2JL

1− DLTsJL

(2-35c)

A(2,3)1 = pLqTs

Ld(2-35d)

A(1,3)2 = −pLdTs

Lq(2-35e)

A(2,1)3 = p(Ld − Lq)Ts

2JL(2-35f)

B0 =

3TsLd

00 3Ts

Lq

0 0

(2-35g)

~f = −

00

TL0TsJL

(2-35h)

where A(j,k)i denotes the entry of the jth column and kth row of the matrix Ai. The other

entries of the matrices Ai (i ∈ Z[1,3]) are zero. Although this model is nonlinear, it still hasa special structure for the design of controllers, namely it belongs to the set of quadraticmodels. We will see in the sequel of this thesis why such a structure is useful for designingcontrollers.In the design of the local controller and the initial control sequence of the system, it is desirableto have the equilibrium point of the system in the origin. Therefore, we have to shift themodel described in (2-35). The shifted system can be given by the following equation:

~zk+1 = (A0 +A(~zk))~zk +B0~sk (2-36a)A0 = A0 +AT(~xe) +A(~xe) (2-36b)

where ~xe and ~ue are the equilibrium state and input respectively. Note that the constantterm ~f is not represented in this shifted state space model.Table 2-2 shows the values of the parameters of the PMSM. Throughout this thesis, theseparameters will be used to represent the PMSM.

R. Koch Master of Science Thesis

Page 39: Masters Thesis: Nonlinear control of electronic converters

2-2 Three-phase voltage source inverter (VSI) with permanent magnet synchronous motor (PMSM) 19

Table 2-2: Values of the components and parameters of the VSI connected to the PMSM

Vin 240 Vp 6Rs 1.5 Ωλpm 0.05 WbLq 110 µHLd 350 µHJL 0.019 kg·m2

DL 0.12 Ns/mTL0 30 NmTs 100 µs

2-2-3 Equilibrium point and set of allowable states and inputs

From the model in (2-35) and the parameters mentioned in Table 2-2, we will derive theequilibrium point used in the design of the controller for this system in this thesis. Theequilibrium point of this system is determined based on the desired value of the rotor speed.Besides that, we want maximum torque while controlling the speed of the motor. This isachieved by ensuring that the current vector (which is directly related to the torque) isorthogonal to the flux. As the flux is along the d-axis in the dq-frame, the current in thed-direction must be zero. Now, the equilibrium values of the other states and inputs (inputvoltages (~uk) and current in q-direction) can directly be calculated based on the desired valueof the rotor speed. In this thesis, we will choose the reference of the rotor speed at 140 rad/s.The corresponding equilibrium point of the system is given by:

~xe =

0180.1333

140

, ~ue =[−5.5481114.3154

](2-37)

Note that, although the equilibrium point of one of the voltages is negative, it does not meanthat one of the phase voltages is negative. Moreover, this is not even possible since the voltagerange can only be between 0 and Vin (the voltage of the input supply of the inverter). Thisvoltage supply will limit the possible voltage vectors of the system. Namely, these voltagevectors are limited by the hexagon of Figure 2-6 in the αβ-frame. However, the model ofthe system is not in the αβ-frame but in the dq-frame. Translating the voltages into to thedq-frame (Park transformation) is not possible, because the rotor angle is unknown. So, wehave to assume that the angle can be anything between 0 and 2π rad. This results in a setthat is the largest circle that fits in the hexagon given by the equation:

U = ~u ∈ Rm|3~uT~u ≤ V 2in (2-38)

The disadvantage of this inequality is that it is not linear which makes all the optimizationproblems that will follow non-convex. So, we will linearize this equation by approximating itwith the largest polytope that fits inside this circle. This can be done by taking a number ofpoints that lay on the boundary of this circle that form the vertices of this polytope. Whenthe polytope has more vertices, the approximation is better. At the same time, the controlproblem will be more complicated. Therefore, we have to make a considered choice for the

Master of Science Thesis R. Koch

Page 40: Masters Thesis: Nonlinear control of electronic converters

20 Model of Electronic Converters

number of vertices. We have chosen that the polytope will consist of 8 vertices which areevenly divided over the boundary of the circle. This results in the following expression of theset of inputs:

U = ~u ∈ Rm|M~u ≤ ~um (2-39a)

M =

0.003 0.00720.003 −0.00720.0072 0.0030.0072 −0.003−0.003 0.0072−0.003 −0.0072−0.0072 0.003−0.0072 −0.003

, ~um =

0.19161.84160.69831.38180.15841.80840.61821.3017

(2-39b)

The set of allowable states is dependent on this set as the currents flowing through thewindings are dependent on the voltage applied to the phases. Moreover, the power of theDC voltage supply is limited and the transistors of the inverter have a limited current thatthey can handle. Besides the current through the windings, the rotational speed of the motoris limited by the voltage applied to the windings of the motor which has its limitationsrepresented in U. Altogether, we have chosen to set the limits on the current between -210and 210 A and the limit of the rotor speed between 0 and 150 rad/s. The latter is chosenbased on the equilibrium point. We do not want the rotor to rotate in the opposite direction(negative speed) and we also do not want a large overshoot in the speed of the rotor. Theresulting set of allowable state can be given by the following equation:

X = ~x ∈ Rn|~aTX,ix ≤ 1, ∀i ∈ Z[1,6] (2-40a)

AX =

0.0048 −0.0048 0 0 0 00 0 0.0335 −0.0026 0 00 0 0 0 0.1 −0.0071

(2-40b)

2-3 Summary

The models derived for the buck-boost converter with resistive load and the VSI connected toa PMSM are both nonlinear. However, they both belong to a special type of nonlinear systems,the quadratic systems from which the bilinear system is a special type. These systems arequadratic in the state and linear in the input. Even when applying a linear control feedbackto the system, this system will still be quadratic. As we will show in the next chapters, acontroller can be designed for these type of systems that are not necessarily computationalcomplex. Besides the derivation of the models of these two converter systems, we have alsodetermined equilibrium points that will be used in the design of the controller in the sequelof this thesis. In case of the buck-boost converter, we have used two different equilibriumpoints. One of the equilibrium points corresponds to the converter operating in buck mode(Vo = 10 V) and the other equilibrium point to the converter operating in boost mode (Vo= 40 V). The equilibrium point of the three-phase VSI connected to a PMSM is determinedbased on the rotational speed set at 140 rad/s and the maximum torque applied to the motor.

R. Koch Master of Science Thesis

Page 41: Masters Thesis: Nonlinear control of electronic converters

2-3 Summary 21

In the next chapter, we will perform the first step of the design of the SD-NMPC controllerwhich is the construction of a local controller with corresponding DOA.

Master of Science Thesis R. Koch

Page 42: Masters Thesis: Nonlinear control of electronic converters

22 Model of Electronic Converters

R. Koch Master of Science Thesis

Page 43: Masters Thesis: Nonlinear control of electronic converters

Chapter 3

Local controller and domain ofattraction (DOA) of the power

converter systems

The sampling-driven nonlinear model predictive control (MPC) (SD-NMPC) algorithm drivesevery initial state within the state space of the system into the domain of attraction (DOA) ofthe equilibrium. This DOA is defined as the region in the state space including the equilibriumpoint for which each trajectory starting in this domain will stay within this region and,eventually, will reach the equilibrium point. Formally, the DOA can be described by thefollowing theorem:

Theorem 1. [17] Given a closed set D ⊂ Rn, with 0 ∈ D. The domain D is said to bean estimation of the DOA of the system ~x+ = ~f(~x) if and only if there exists a Lyapunovfunction v(~x) satisfying:

• v(~x) is positive definite for all ~x ∈ D

• ∆v(~x) = v(~x+)− v(~x) is negative definite for all ~x ∈ D

In case of linear systems, the DOA can easily be derived using the eigenvalues of the system[14]. However, we are dealing with nonlinear systems for which deriving the DOA is nottrivial. In this chapter, multiple methods are described to determine an estimate of theDOA of nonlinear systems. The first method determines the feedback control law usingdiscrete-time linear quadratic control and the corresponding DOA is derived using randomsampling of the state space. In the second method, we will derive the feedback controllaw based on a predefined DOA. This method only works for a special type of a nonlinearsystem, namely the quadratic system. This control law, which is linear, is determined usinga linear Lyapunov function. Thereafter, two more methods will be described for quadraticsystems that determines the feedback control law and the corresponding DOA based on a

Master of Science Thesis R. Koch

Page 44: Masters Thesis: Nonlinear control of electronic converters

24 Local controller and domain of attraction (DOA) of the power converter systems

quadratic Lyapunov function. Finally, we will make a comparison between these 4 methodsbased on their implementation in the buck-boost converter and the three-phase voltage sourceinverter (VSI) in order to find the most suitable method. This method will then be used inthe remainder of the thesis to apply the SD-NMPC control method.

3-1 Random sampling approach

The random sampling method determines the DOA based on samples drawn from a proposedDOA using a Lyapunov function that satisfies the constraints of Theorem 1. We will determinethe control input used to stabilize the system inside the DOA using a discrete-time linearquadratic controller. The Lyapunov function, that is used to determine this controller, willform the shape of the estimation of the DOA of the system. Lyapunov’s second criterion(Theorem 1) is tested by applying the Monte Carlo method to a region in order to definewhether this region is a valid estimate of the DOA of the system. The algorithm used todetermine the DOA corresponding the local feedback control law is derived from [8] andmodified in a way that the computational time of the algorithm is improved.

3-1-1 Linear quadratic controller

We determine the local feedback control law using linear quadratic control. This controlmethod determines a linear feedback gain (K) based on a minimization of a quadratic costfunction. The objective function and the control input is described by the following equations:

J =∞∑k=0

~xTkQ~xk + ~uTkR~uk (3-1a)

~uk = K~xk (3-1b)

where Q and R are the weighting matrices on the states and inputs, respectively. Theseweighting matrices influence the evolution of the states and inputs. The larger the weighton a state or input, the faster this parameter will approach its equilibrium value which, inthis case, is the origin of the system. So determining these weighting matrices is usually animportant part in the control of systems. However, in our case, the evolution of the statesand inputs do not matter at this stage of SD-NMPC as it is only needed to prove that thesystem can be stabilized. Therefore, we choose to scale the states and inputs such that theycontribute with an equal amount to the cost of the linear quadratic control problem. Thisresults in the following expression of the weighting matrices:

Q =

1~x2

e,10 · · · 0

0 1~x2

e,2

. . . ...... . . . . . . 00 · · · 0 1

~x2e,n

, R =

1~u2

e,10 · · · 0

0 1~u2

e,2

. . . ...... . . . . . . 00 · · · 0 1

~u2e,m

(3-2)

where ~xe,i is the equilibrium point of the state i and ~ue,i the equilibrium point of the inputbefore the system has been translated to the origin.

R. Koch Master of Science Thesis

Page 45: Masters Thesis: Nonlinear control of electronic converters

3-1 Random sampling approach 25

The controller gain is designed based on the linearization of the model ~xk+1 = ~f(~xk). Thisgives the following linearized model of the system:

~xk+1 = A~xk + B~uk (3-3a)

A =[∂ ~f(~x, ~u)∂~x

]~x=0,~u=0

(3-3b)

B =[∂ ~f(~x, ~u)∂~u

]~x=0,~u=0

(3-3c)

Using the expressions for the linearized model and the objective function in (3-1), the linearquadratic controller gain is defined as:

ATP0A− P0 − ATP0B(BTP0B +R)−1BTP0A+Q = 0 (3-4a)K = −(BTP0B +R)−1BTP0A (3-4b)

where the first equation is called the discrete Riccati equation which determines the matrix P0.This matrix is important as it will be part of the Lyapunov function used in the randomizedalgorithm to determine the DOA.

3-1-2 Initial proposal for the DOA

After we have determined the local controller, an estimation of the DOA of this system canbe derived. Several approaches can be applied to determine a DOA. In this section, a DOAis determined using the Monte Carlo method which is described in Chapter 5 of [8]. Thisapproach has a number of advantages. First of all, the implementation of the random sam-pling method is very simple and straightforward. A simple linear matrix equation needs tobe solved in order to obtain the linear control gain as we have elaborated above. Thereafter,the corresponding DOA of the system with this linear feedback controller is determined byfinding the largest area around the equilibrium where all the samples lead to a decrease of theLyapunov function in the next state as required by Theorem 1. The simplicity of this methodalso causes it to be computationally light. The computational time is lower than other, exactmethods that use nonlinear optimization tools to determine the DOA. Besides its simplicity,this method can be used for every nonlinear system. It does not need to have a particular formas the other methods described in this thesis. This makes it more applicable to any kind ofcontrol problem. The disadvantage of the Monte Carlo method is that the obtained region isnot guaranteed to be the DOA of the system, but only with a certain reliability depending onthe number of samples drawn. The more samples are drawn, the higher the reliability of thismethod as will be shown later. Moreover, the obtained DOA is an estimation of the real DOAas the Lyapunov function is not chosen such that the largest possible DOA is obtained butthe DOA is determined based on the Lyapunov function obtained from the linear quadraticcontroller described in (3-4a). This will result in a relatively small DOA which makes it moredifficult to find a valid initial sequence in the next step of the SD-NMPC algorithm.

The Randomized method to determine the DOA operates based on the following princi-ple. The linear quadratic controller in (3-4b) stabilizes the linearized model of our nonlinear

Master of Science Thesis R. Koch

Page 46: Masters Thesis: Nonlinear control of electronic converters

26 Local controller and domain of attraction (DOA) of the power converter systems

system based on Lyapunov’s theorem (Theorem 1), where the Lyapunov function is given by:

v(~x) = ~xTP0~x (3-5)

This Lyapunov function is quadratic and satisfies the first criterion of Theorem 1 if and onlyif matrix P0 is positive definite (P0 > 0). The Riccati equation in (3-4a) fulfills the secondcriterion of Lyapunov’s theorem. However, this criterion is only guaranteed to be fulfilledwith the linearized system and cannot be guaranteed using the system itself. The linearizedsystem is usually only a good approximation of the nonlinear system within a small regionaround the origin. Thus, we are looking for the largest area around the origin for which allpoints inside this ellipse satisfy Lyapunov’s second criterion and which is invariant. This areawill have the shape of an n-dimensional ellipse (where n is the number of states of the system)because of the form of the Lyapunov function.In order to determine the largest ellipse around the origin that satisfies Lyapunov’s secondcriterion, the initial (proposed) DOA is chosen as the largest n-dimensional ellipse around theorigin that is still within the set of allowable states (X). This means that we have to scale theinitial (proposed) DOA, for which we use the symbol D0, such that the boundary of this settouches the boundary of X. The scaling factor (c) ensures the maximum of D0 if it satisfiesthe following equation from [9]:

max(~aTX,iQ0~aX,i) = c, i ∈ Z[1,q] (3-6)

where Q0 = P−10 and the sets D0 and X are given by:

D0 = ~x ∈ Rn|~xTP0~x ≤ 1 (3-7a)X = ~x ∈ Rn|~aTX,i~x ≤ 1, ∀i ∈ Z[1,q] (3-7b)

Note that (3-6) is only solvable if P0 is non-singular which is the case for our system as thismatrix must be positive definite. Furthermore, the set X must be a convex polytope and theorigin must be in the interior of X in order to write X in this particular form. The value ofc, obtained from (3-6), can be multiplied with the matrix P0 of the set D0 in order to get thelargest ellipse inside X. The choice of the initial set is different from the one chosen in [8].In that thesis, the set X is chosen as the initial (proposed) DOA of the system. The reasonfor choosing a more general set as D0 is done based on the fact that they do not require theLyapunov function to decrease at the next state, but it requires the Lyapunov function todecrease at one of the consecutive states. This makes the assumption of the shape of theestimated DOA much more complicated. The reason that we choose to force the Lyapunovfunction to decrease at the next state is based on the simplicity of the obtained estimate ofthe DOA.

3-1-3 Sampling an n-dimensional ellipsoid

The next step in the randomized method involves drawing samples uniformly over the set S0.This is done by taking samples from low-discrepancy sequences, such as the Halton sequenceor the Sobol sequence which both have an interval between 0 and 1. In the remainder of thissection, we will use the symbol ς to represent a sample taken from a low-discrepancy sequencewith interval between 0 and 1. These samples must be transformed into coordinates within

R. Koch Master of Science Thesis

Page 47: Masters Thesis: Nonlinear control of electronic converters

3-1 Random sampling approach 27

the n-dimensional ellipse from (3-7a). We will do this using the hyperspherical coordinatessystem instead of the Cartesian system because of the ellipsoidal shape of D0. The relationbetween Cartesian coordinates and hyperspherical coordinates for an n-dimensional ellipsecan be given by:

x1 = a1r cos(θ1)x2 = a2r sin(θ1) cos(θ2)x3 = a3r sin(θ1) sin(θ2) cos(θ3)

...

xn = anrn−1∏i=1

sin(θi)

(3-8)

where ~x is an n-dimensional vector in Cartesian coordinates and (r, ~θ) respectively a scalar andan (n − 1)-dimensional vector in hyperspherical coordinates with r ∈ [0, 1], θ1, θ2, ..., θn−2 ∈[0, π] and θn−1 ∈ [0, 2π]. The n-dimensional vector ~a consists of all the radii of the ellipse inall the dimensions of the ellipse. These are related to the eigenvalues of matrix P0 in (3-7a).Note that this transformation is only valid if the eigenvectors of P0 are parallel to the axis ofthe Cartesian system. This is usually not the case and, therefore, we first need to transformthe ellipse such that it will satisfy this constraint. This can be done by diagonalizing thematrix P0, such that the equation of the ellipse from (3-7a) has the following form:

~ξTD0~ξ ≤ 1 (3-9a)D0 = V TP0V (3-9b)

where D0 is a diagonal matrix (with only non-zero elements on the diagonal) and ~ξ = V ~x.Matrices D0 and V can be obtained from P0 by computing the eigenvalues and correspondingeigenvectors of this matrix under the condition that P0 is a real symmetric matrix (P0 = PT

0 ).Fortunately, the Riccati equation always gives a real symmetric matrix P0 as its solution.Before we can draw samples from the ellipse, we have to transform the uniform distributionin the Cartesian coordinates system into a uniform distribution in the hyperspherical coor-dinates system. This transformation is derived from the theory described in [22], where therelation of the cumulative distribution function (PrX ≤ x = P (x)) and the probability den-sity function (p(x)) between the two different coordinates systems is given by the followingequations:

P (r) = P (x1) (3-10a)P (θi) = P (xi+1) ∀i ∈ Z[1,n−1] (3-10b)

p(r, ~θ) = det(JT (~x))p(~x) (3-10c)

JT (~x) =

∂x1∂r

∂x1∂θ1

· · · ∂x1∂θn−1

∂x2∂r

∂x2∂θ1

· · · ∂x2∂θn−1

... . . . ...∂xn∂r

∂xn∂θ1

· · · ∂xn∂θn−1

(3-10d)

where JT (~x) is called the Jacobian matrix. The solution to the determinant of the Jacobianmatrix can be found by applying (3-8) to this equation. For an n-dimensional ellipse, this

Master of Science Thesis R. Koch

Page 48: Masters Thesis: Nonlinear control of electronic converters

28 Local controller and domain of attraction (DOA) of the power converter systems

results in:

det(JT (~x)) =n∏i=1

airn−1

n−2∏j=1

sinn−1−j(θj) (3-11)

Now we know the relationship between the two probability density functions, we can determinep(r, ~θ) from p(~x). As we want to sample uniformly over the ellipse, p(~x) is equal to one overthe volume of the n-dimensional ellipse, or:

p(~x) =nΓ(n2 )

2πn2∏ni=1 ai

(3-12)

where Γ(·) is called the gamma function and is given by:

Γ(n) = (n− 1)!, n ∈ Z+ (3-13a)

Γ(n+ 1

2

)= Πn

i=1(2i− 1)2n

√π, n ∈ Z+ (3-13b)

Γ(1

2

)=√π (3-13c)

In order to link a sample drawn from a low-discrepancy function (ς) to a coordinate in theellipse, we have to compute the cumulative distribution function of each random variable(r, θ1, ..., θn−1), because that is equal to our sample (ς). We can obtain the cumulative distri-bution function by integrating the marginal density function (p(r), p(θ1), .., p(θn−1)), whichcan be calculated by integrating over the domain of every other variable. This gives thefollowing expressions for the cumulative distribution functions:

P (r) = rn = ς1 (3-14a)

P (θi) =∫ θi

0 sinn−1−i(θ′i)dθ′i∫ π

0 sinn−1−i(θ′i)dθ′i

= ςi+1, i ∈ Z[1,n−2] (3-14b)

P (θn−1) = θn−12π = ςn (3-14c)

The inverse function of these cumulative distribution functions show the transformation from~ς to coordinates in the ellipse. However, there is one major drawback in this transformation.When the dimension is larger than 3 (n > 3), not all the cumulative distribution functionshave an existing inverse function. This means that given a certain value for ~ς, the correspond-ing coordinate cannot be found. This problem can be fixed by approximating the functionusing piecewise quadratic and affine functions. Computing the inverse of these functions ismuch simpler. However, when the number of dimensions is large, this will take a lot of compu-tational effort. For this reason, we will propose a different method that will approximate then-dimensional ellipsoid using multiple n-simplices where n vertices are just outside the ellipseand the origin is the remaining vertex. The idea is that using multiple n-simplices, samplesdrawn from the uniform distribution does not have to be transformed into hypersphericalcoordinates but into barycentric coordinates. There are two ways to convert Cartesian coor-dinates into barycentric coordinates. The first way is by multiplying every vertex by a factorbetween 0 and 1 and adding the constraint that the sum of all these factor must be equal to1. This is needed in order to guarantee that the obtained coordinate is located in the interior

R. Koch Master of Science Thesis

Page 49: Masters Thesis: Nonlinear control of electronic converters

3-1 Random sampling approach 29

of the n-simplex or at its boundary. The second way is to choose two random vertices (exceptthe origin) and determine any point (~s1) between those to vertices using the variable λ1 bythe following formula:

~s1 = λ1~v1 + (1− λ1)~v2 (3-15)

where ~v1 and ~v2 are two vertices of the n-simplex. In the next step, we have to determine anypoint between ~s1 and one of the other vertices (except the origin if n > 2) using the variableλ2 and so on. When all the vertices near the boundary of the ellipse have been chosen, whichmeans that only the origin is left, the origin must be chosen as the final vertex. This resultsin the following conversion between Cartesian and barycentric coordinates:

~x =n∑i=1

(~vi − ~vi+1)n∏j=i

λj , λk ∈ [0, 1] ∀k ∈ Z[1,n] (3-16)

where ~vn+1 = 0. This second method is more suitable in our application as the cumulativedistribution function are all in the form of a power function:

P (λi) = λii = ςi, ∀i ∈ Z[1,n] (3-17)

From all these power functions, the inverse function exists and is even very straightforward.This method has only one important drawback. The approximation of the n-dimensionalellipse is more accurate if the number of n-simplices is large. This might become problematicwhen the dimension of our ellipse is very large. Nevertheless, this method is still morefavorable with a large number of dimensions than the previous method (with hypersphericalcoordinates).

3-1-4 The shortened random sampling algorithm to determine the DOA

The algorithm elaborated in this section will result in an estimate of the DOA of the non-linear system. It is based on the algorithm elaborated in Chapter 5 of [8], but differs inthe representation of the initial proposal of the DOA. In [8], the whole set X is consideredas a potential DOA while we have chosen to base the initial proposed DOA of the systemon the linearization of the system and the local feedback controller. Eventually, both initialproposals for the DOA will lead to the same estimation of the DOA.The implementation of the algorithm is pretty straightforward. From all the samples drawnfrom D0, the value of the Lyapunov function in (3-1-2) is computed (v(~xk)) and also the valueof the Lyapunov function of the next iteration (v(~xk+1)) is computed, such that ∆v(~xk) can becalculated. After the Lyapunov function has been evaluated for all the samples, the ellipsoidwill be scaled such that only samples that satisfy criterion 2 of Theorem 1, which means that∆v(~xk) is negative, are within this new ellipsoid. Thereafter, a new iteration of the algorithmis applied to check whether all states within this new set still satisfy this criterion. If that isthe case, we have found an estimation of the DOA of the nonlinear system. Depending on thenumber of samples drawn from D0 and the discrepancy of our quasi-random sequence, thealgorithm terminates after only two iterations. These aspects are not only important for thecomputational time of the algorithm, but also the reliability of the DOA. The more samples

Master of Science Thesis R. Koch

Page 50: Masters Thesis: Nonlinear control of electronic converters

30 Local controller and domain of attraction (DOA) of the power converter systems

are drawn, the more reliable the estimated DOA. In order to reduce the number of computa-tions, the minimum number of samples is determined such that the DOA is attracting with acertain probability. This probability is defined by the following equation from [10] and [27]:

Pr[Pr[∆v(~xk) ≤ 0] ≥ p∗] ≥ 1− δ (3-18)

where p∗ gives the probability that criterion 2 of Theorem 1 is satisfied within the estimatedDOA. The likelihood for the occurrence of this probability is given by the probability 1− δ.The corresponding minimum number of samples needed to ensure the reliability of the DOAis given by the following equation which is also obtained from [10] and [27]:

Ns = log (δ)log (p∗) (3-19)

where log(·) is the natural logarithm (log(x) = loge(x)). It can be deduced from (3-18) thatthe closer δ to 0 and p∗ to 1, the more reliable the obtained DOA will be. Simultaneously, thenumber of samples will be larger as well, which means that the computational time increases.Therefore, a deliberate choice must be made for the choice of p∗ and δ that ensures thereliability of the obtained DOA but does not lead to an unnecessary large number of samples.As the estimates DOA can never be guaranteed to be attracting at every coordinate withinthe set, an option for extra certainty has been build into the algorithm. This consists of aparameter τ that scales the obtained estimated DOA such that it will be slightly smaller thandetermined based on sampling.Besides criterion 2 of Theorem 1, this algorithm will also check whether the control inputof the system is within the set of allowable inputs (U). The full algorithm explained in thissection is written in pseudocode in Algorithm 1. The algorithm places the random samplesinto two different set depending on their value of the Lyapunov function, the value of thecontrol input and the position of this coordinate with respect to the boundary of X. The setUs consists of all the samples that do not satisfy criterion 2 of Theorem 1 or the control inputis not within U (see line 13). If Us is not empty, it means that the proposed DOA is notan estimation of the DOA of the nonlinear system. Then another iteration of Algorithm 1is needed to find an estimation of the DOA. The set Js consists of all the points that areattracting, which means that they satisfy Theorem 1. Moreover, these samples also have acontrol input that is within U. The final set that may contain samples is Ps. The samplesthat are in this set are so close to the boundary of X, determined by parameter µ in line 16,that there is a possibility that a point within the proposed DOA will have a consecutivestate outside X. It can be seen in the algorithm that samples in this set do not have anycontribution to the size of the next proposal of the DOA or to a next iteration at all. Thisis because the change that a point within S will cause this violation is usually very small(depending on the choice of the parameters p∗ and δ) and the SD-NMPC controller mightnot be influenced by these points as it will very rarely reach these states.

3-1-5 Application: the buck-boost converter

We will apply the controller elaborated in this section to the buck-boost converter describedin Section 2-1. This system can generally be formulated as:

~xk+1 = A0~xk + (B0 +B(~xk))uk (3-20)

R. Koch Master of Science Thesis

Page 51: Masters Thesis: Nonlinear control of electronic converters

3-1 Random sampling approach 31

Algorithm 1 Algorithm to determine the domain of attraction using the random samplingmethod. It is a shortened version of the algorithm described in [8].

1: function doa(X,U,D0,~f(·),K,δ,p∗,µ,τ)2: t← maxt|tD0 ⊂ X3: D← tD04: N ←

⌈log (δ)

log (p∗)

⌉5: while 1 do6: vmin ← 17: ~xi ∈ D ∀i ∈ Z[1,N ] . random sampling using the Halton sequence (uniform

distribution)8: for all i ∈ Z[1,N ] do9: vi ← ~xTi P0~xi

10: ~x+i ← ~f(~xi,K~xi)11: v+i ← ~x+T

i P0~x+i

12: ∆vi = v+i − vi13: if ∆vi > 0 or K~xi /∈ U then14: Us ← Us, ~xi15: vmin ← min(vmin, vi)16: else if ‖~xi ⊕−∂X‖2 ≤ µ then17: Ps ← Ps, ~xi18: vmin ← min(vmin, vi)19: else20: Js ← Js, ~xi21: end if22: end for23: if Us = ∅ then24: if Ps 6= ∅ then25: D← vminD26: end if27: break28: end if29: D← (vmin − τ)D30: end while31: return D32: end function

Master of Science Thesis R. Koch

Page 52: Masters Thesis: Nonlinear control of electronic converters

32 Local controller and domain of attraction (DOA) of the power converter systems

where the state variable ~xk represent the current flowing through the inductor (iL) and thevoltage over the capacitor (vo) which is also the voltage applied to the load. This voltageis the most important state as it is the one which has to track a reference value. Using theexpressions of the model matrices, the state and input spaces and the chosen equilibriumpoints in Section 2-1, we can determine the local controller with its corresponding DOA usingthe random sampling approach elaborated in this section. Let us first consider the buck-boostconverter in buck mode (Vo = 10 V). The control gain K and the initial proposed DOA ofthe system can be determined by solving the Riccati equation in (3-4a). In order to solve theRiccati equation, we have to linearize the model of the buck-boost converter. In case of thebilinear model of the buck-boost converter, this can be done by removing the nonlinear termfrom (3-20) (B(~xk)). The values of K and P0 that follow from solving the Riccati equationare given by:

K =[−0.5177 0.017

], P0 =

[29.7959 0.18940.1894 0.3174

](3-21)

Note that indeed P0 is positive definite and the eigenvalues of (A0 +B0K) are within the unitcircle.Using the K and P0 obtained from solving the Riccati equation, we can apply this systemto Algorithm 1. The parameters indicating the certainty of the DOA are given in Table 3-1.These parameters indicate that the change that the obtained DOA satisfies the second cri-terion of Theorem 1 being larger or equal to 99.9% is more than or equal to 99.9%. Thishigh certainty is accomplished by taken at least 6905 samples from the proposed DOA. Asan addition to this algorithm, we will draw 10% more samples that are all on the boundaryof the proposed DOA in order to even increase the certainty of the obtained DOA.After all parameters are defined, the algorithm can be applied. We will use the parameter-

Table 3-1: parameters used for Algorithm 1

δ 0.001p∗ 0.999µ 0.001τ 0.001

ization of the ellipse as the method used to draw samples from the proposed DOA, becausethe system has only 2 states which means that this can be done without approximation of theinverse functions. The resulting samples are shown in Figure 3-1a. From this figure, we cansee that there are no samples that violate the second criterion of Theorem 1. This means thatthere will be no second iteration of the algorithm. Despite this occurrence, the obtained DOAwill be smaller than the one used in the first iteration. The reason is that there are sampleson or very close to the boundary of X and, therefore, there is a possibility that the system willviolate the state constraints. Note that in this particular example of the buck-boost converterthis cannot happen because this boundary represents the current through the inductor being0. The resulting DOA is given by the equation:

D = ~x ∈ Rn|~xTP0~x ≤ 1 (3-22a)

P0 =[27.2655 0.17330.1733 0.2904

](3-22b)

R. Koch Master of Science Thesis

Page 53: Masters Thesis: Nonlinear control of electronic converters

3-1 Random sampling approach 33

Figure 3-1b shows the resulting samples from the ellipse used in the first iteration when

-0.2 -0.15 -0.1 -0.05 0 0.05 0.1 0.15 0.2

x(1)

-2

-1.5

-1

-0.5

0

0.5

1

1.5

2

x(2

)

Samples drawn from the ellipse

(a) Vo = 10 V

-1 -0.5 0 0.5 1

x(1)

-8

-6

-4

-2

0

2

4

6

8

x(2

)

Samples drawn from the ellipse

(b) Vo = 40 V

Figure 3-1: Results of the determination of the DOA of the buck-boost converter after the firstiteration. The states belonging to the set Js are green coloured, the set Us are red coloured andthe set Ps are blue coloured

the capacitor voltage is set to 40 V. Also, in this case, there are no samples that violate thesecond criterion of Theorem 1. The matrix P0 and the feedback control gain K belonging tothis result are given by:

P0 =[

1.048 0.01730.0173 0.0247

], K =

[−0.2172 0.0031

](3-23)

Comparing the two results, we can see that the ellipse obtained for the buck-boost converteroperating in boost mode (Vo = 40 V) is larger than the converter operating in buck mode(Vo = 10 V). The reason for this is the limitation in the current flowing through the inductor.In case of the converter in boost mode, this range is much larger as this current is larger inits equilibrium point. The range is even big enough that it is not limited by the lower boundof this current, but by its upper bound.

3-1-6 Application: the three-phase VSI

The second system for which we will determine a local controller is the VSI connected to apermanent-magnet synchronous motor (PMSM) derived in Section 2-2. In general, the modelof this system can be given by:

~xk+1 = (A0 +A(~xk))~xk +B0~uk (3-24)

where the states (~xk) represent the currents flowing through the stator windings in dq-frame(iid and iiq) and the rotational speed of the rotor (ωr). The system matrices are given as wehave set in Section 2-2. Based on the equilibrium point and the definition of the allowable setof states and inputs set in Section 2-2, we can determine the local feedback gain K and thematrix P0 that represents the initial proposed DOA of the system using the linear quadraticcontroller. In order to apply the controller to the system of (3-24), this model must belinearized. The linearized model is equivalent to (3-24) except for the fact that A(~xk) is zero.

Master of Science Thesis R. Koch

Page 54: Masters Thesis: Nonlinear control of electronic converters

34 Local controller and domain of attraction (DOA) of the power converter systems

Figure 3-2: Results of the determination of the DOA of the PMSM connected to the VSI afterthe first iteration. The green samples show the coordinates that are inside Js.

The controller gain K and matrix P0 can now be calculated by solving the Riccati equationin (3-4a). In contrast to the application of the buck-boost converter, the three-phase VSIconnected to a PMSM has two fast changing states, the stator current states, and one slowchanging state, the rotational velocity. In this case, it does not make sense to base the weightsof the states and inputs on the equilibrium point. A better option would be to put a largerweight on the faster changing states and a lower weight on the slower state. This results inthe following expression of the states of this system:

Q =

1 0 00 1 00 0 0.001

, R =[1 00 1

](3-25)

Based on these weighting matrices, we can determine the matrices K and P0 by solving theRiccati equation. This results in the following expressions:

K =[−0.3145 −0.0142 −0.04220.0845 0.1176 0.1389

], P0 =

1.2180 0.021 0.05390.021 1.0162 0.04420.0539 0.0442 17.8096

(3-26)

We can verify that P0 is positive definite and (A0 + B0K) has all its eigenvalues within theunit circle.After, the local feedback controller has been determined together with the initial proposedDOA, we can apply Algorithm 1 to this system. We have used the parameterization ofthe ellipsoid in order to sample points from the ellipsoid. Also, the same parameters areused as for the buck-boost converter, which are given in Table 3-1. The results of the firstiteration is shown in Figure 3-2. We see in this figure that all the samples within the proposedDOA satisfy the second criterion of Theorem 1 and the input constraints. Therefore, we canconclude that this set is a valid estimation of the DOA of this system. This estimated DOA

R. Koch Master of Science Thesis

Page 55: Masters Thesis: Nonlinear control of electronic converters

3-2 Linear feedback of quadratic systems with linear Lyapunov functions 35

can mathematically be described by the equation:

D = ~x ∈ Rn|~xTP0~x ≤ 1 (3-27a)

P0 =

1.3443 · 10−3 2.317 · 10−5 5.9475 · 10−5

2.317 · 10−5 1.1216 · 10−3 4.8734 · 10−5

5.9475 · 10−5 4.8734 · 10−5 1.9657 · 10−2

(3-27b)

3-2 Linear feedback of quadratic systems with linear Lyapunovfunctions

The model of the converters in Chapter 2 have a special form, they are quadratic models. Ageneral description of a quadratic model is given by the following equation

~xk+1 = (A0 +A(~xk))~xk + (B0 +B(~xk))~uk (3-28a)

A(~xk) =

~xTkA1~xTkA2

...~xTkAn

, B(~xk) =

~xTkB1~xTkB2

...~xTkBn

(3-28b)

Much research has been done on quadratic models and the control of these systems, especiallythe bilinear model. The bilinear model is a special form of a quadratic model, where A(~xk)is zero. For these type of models, local linear feedback controllers and their estimated DOAhave been derived using linear Lyapunov functions in, for example, [7], [19] and [26]. Inthis section, we will focus on the design of a local controller of quadratic systems with acorresponding DOA based on the theory of these papers. This section concludes with theapplication of this controller to the model of the buck-boost converter and the VSI with thePMSM load.

3-2-1 Design of the controller

As the title of this section already shows, the quadratic systems covered in this section arecontrolled using a linear controller. This controller has the following characteristic form:

~uk = K~xk (3-29)

where K is an m× n-matrix with m the number of inputs and n the number of states. Thisleads to the expression of the closed loop system given by:

~xk+1 = (A0 +B0K)~xk + (A(~xk) +B(~xk)K)~xk (3-30)

consisting of a linear part (A0 +B0K) and a nonlinear part (A(~xk) +B(~xk)K). Note that ifthe linear part is asymptotically stable, which means that (A0 +B0K) is Hurwitz, it does notmean that the system is asymptotically stable as well. So, applying classical linear controlmethods do not solve this control problem and that is why we have to apply a more general

Master of Science Thesis R. Koch

Page 56: Masters Thesis: Nonlinear control of electronic converters

36 Local controller and domain of attraction (DOA) of the power converter systems

approach of this control problem by returning to the definition described in Theorem 1. TheLyapunov function that is covered in this section has a linear form as also applied in [7], [19]and [26] among others:

v(~x) = maxi∈Z[1,p]

~aTi ~x (3-31)

The choice for a linear Lyapunov function will be made clear later in this section, but thereason is that the optimization problem, that will follow from the construction of the con-troller, is linear. This is always preferred in optimization theory. The specific construction ofthe Lyapunov function is based on a chosen set that will be the DOA of the system in (3-28),which is given by the equation:

P = ~x ∈ Rn|~aTi ~x ≤ 1 ∀i ∈ Z[1,p] (3-32)

The polytope P must be convex, otherwise it cannot be guaranteed to be the DOA of thequadratic system. Note that P also includes the origin (equilibrium of the quadratic system)in its interior. This Lyapunov function satisfies the first criterion of Theorem 1 as v(~x)is positive definite inside the DOA. Only in the origin, the value of v(~x) is zero. On theboundary of P, v(~x) is equal to 1. If we can prove that also the second criterion of Theorem 1is satisfied by the quadratic system, than the convex polytope P can be said to be the DOAof this system. The proof of this statement can be found in the definition of the Lyapunovtheory. As the value of the Lyapunov function must be lower for the sequential state of thesystem, this state will also be in the interior of P if the previous state was located in P. Thesame principle has been used in Section 3-1, where a quadratic Lyapunov function results inan estimated DOA in the same shape as the Lyapunov function. However, in Section 3-1, theDOA is determined based on a chosen Lyapunov function while in this section we will firstchoose a DOA and then determine the corresponding linear Lyapunov function.We will prove the second criterion of Theorem 1 based on the determination of the feedbackcontrol gain K from (3-29). At first sight, this seems a difficult problem because the nonlinearpart of the system makes this problem NP-hard. Therefore, the problem has to be rewrittenin order to simplify it. This can be done using a bilinear map [26] given by the equation:

A(~x(1), ~x(2)) = (A0 +B0K)~x(1) +(A(~x(2)) +B(~x(2))K

)~x(1) (3-33)

The property of the bilinear map is that it is an affine function with respect to one of thevariables when the other is taken constant. This is the reason why quadratic models are aspecial type of nonlinear models in the field of control theory. Now, if for all ~x(1) and ~x(2)

inside the DOA the system is asymptotically stable using the Lyapunov function of (3-31),then system is always asymptotically stable inside the candidate DOA as well. However, thebilinear map has not solved the complexity of this problem as the quadratic model is stillnonlinear with respect to the unknown K and variables ~x(1) and ~x(2). If only a finite numberof distinct values of ~x(1) and ~x(2) can be taken from P, this will turn the problem into severalinequalities for which every inequality is a linear matrix inequality (LMI). The choices for thevalues of ~x(1) and ~x(2) are made based on the conic partitioning of P. Every conic partition, Ei,consists of the equilibrium point of the system and some of the vertices of P. Mathematically,this conic partitioning can be represented by [26]:

Ei = ~x ∈ vert(P)|(~aTi − ~aTj )~x ≥ 0,∀j ∈ Z[1,p] ∪ 0 (3-34)

R. Koch Master of Science Thesis

Page 57: Masters Thesis: Nonlinear control of electronic converters

3-2 Linear feedback of quadratic systems with linear Lyapunov functions 37

Based on conic partitioning of the set P, this set can be divided into p subsets defined by:

Pi = ConvEi, i ∈ Z[1,p] (3-35)

where the operator Conv denotes the convex hull. Note that conic partitioning in this way isonly possible if P is a convex set. For a n-state system, Ei consists of n+ 1 points in the set Pwhere one of the points is the origin and the other n points are vertices of P. The subsystem,Pi, has a triangular shape (also called an n-simplex) which is useful for the determination ofasymptotic stability of the area as will be shown later. The following theorem follows fromthe preceding:

Theorem 2. [26] Suppose that for all i ∈ Z[1,p] the following equation holds:

ε~aTi ~x

(1) − ~aTj A(~x(1), ~x(2)) ≥ 0, ∀j ∈ Z[1,p], ∀ (~x(1), ~x(2)) ∈ Ei × Ei (3-36)

for ε ∈ R(0,1) and a feedback control gain designed such that MK~v ≤ ~um, ∀ ~v ∈ vertP, thenthe system is asymptotically stable inside P.

The proof for this theorem starts by showing that for all points within P, the control inputsatisfies the inputs constraint (~uk ∈ U). This can easily been done using the conic partitionsof P. Take the subset Pi of P, which consists of n+ 1 vertices, the origin and n vertices of Pwhere n is the dimension of the set P (equal to the number of states of the quadratic model).Because the subset has a triangular shape, barycentric coordinates are used to define anypoint using these n+ 1 vertices. These points can be given by:

~x =n+1∑j=1

λj~v(j) (3-37)

where all ~v(j) represent the vertices of Pi and all λj are parameters which sum is equal toone. Because we are only interested in the points within Pi, these parameters must alwaysbe larger or equal to zero. If it has been shown that for every vertex of P K~x ∈ U, assumingthat the origin is always in the interior of U, then for any point within any of the subsets Pi:

MK~x = MKn+1∑j=1

λj~v(j)

=n+1∑j=1

λjMK~v(j)

≤n+1∑j=1

λj~um

≤ ~um

(3-38)

which means that the control input corresponding to every point inside any Pi is within U.Thereafter, asymptotic stability of the system with feedback control gain K in P has to beproven. This can be done using Lyapunov’s theory. It has already been shown that v(~x) in(3-31) is positive definite inside P. The next step is to prove contractiveness of the set P for thesystem (criterion 2 of Theorem 1). First, consider ~x(1) being constant in (3-36) (~x(1) = ~x(1))

Master of Science Thesis R. Koch

Page 58: Masters Thesis: Nonlinear control of electronic converters

38 Local controller and domain of attraction (DOA) of the power converter systems

and equal to one of the vertices of Pi. ~x(2) can take any value in the subset Pi (~x(2) ∈ Pi).Applying these values for ~x(1) and ~x(2) in (3-36) results in the following expression:

ε~aTi ~x(1) − ~aTj

((A0 +B0K)~x(1) +

(A(~x(2)) +B(~x(2))

)K~x(1)

)≥ 0 (3-39)

which is an affine inequality with respect to ~x(2). This means that if this inequality holds forall ~x(2) ∈ Ei, then it also holds for all ~x(2) ∈ Pi as can be proven using barycentric coordinatescomparable with the proof given above:

~x(2) =n+1∑k=1

λk~v(k) (3-40a)

ε~aTi ~x(1) − ~aTj

((A0 +B0K)~x(1) +

(A( n+1∑k=1

λk~v(k))

+B( n+1∑k=1

λk~v(k))K

)~x(1)

)≥ 0

ε~aTi ~x(1) − ~aTj

((A0 +B0K)~x(1) +

n+1∑k=1

(AT(~x(1)) +BT(K~x(1)))λk~v(k))≥ 0

n+1∑k=1

λk

(ε~aTi ~x

(1) − ~aTj((A0 +B0K)~x(1) + (AT(~x(1)) +BT(K~x(1))) ~v(k)

))≥ 0

ε~aTi ~x(1) − ~aTj

((A0 +B0K)~x(1) + (AT(~x(1)) +BT(K~x(1)))~v(k)

)≥ 0, ∀k ∈ Z[1,n+1]

(3-40b)

Note that also in this case the sum of all λk must be equal to one. The same procedure applieswhen ~x(2) is taken constant while ~x(1) ∈ Pi, as this will also lead to an affine inequality of(3-36), because of the following property:

AT(~x(2))~x(1) = A(~x(1))~x(2) (3-41)

Note that B(~x) fulfills the same principle. Therefore, if (3-36) is satisfied for all (~x(1), ~x(2)) ∈Ei × Ei, then it is in accordance with all (~x(1), ~x(2)) ∈ Pi × Pi. As (3-36) is satisfied for all iand j, this means that it is satisfied for the worst case scenario. Therefore, (3-36) representsv(~xk)− εv(~xk+1) ≥ 0 which proves asymptotic stability on the condition that ε ∈ R(0,1). Thisconcludes the proof of Theorem 2.Given the set P, the only unknowns in (3-36) are the controller gain K and ε. This turns theproblem for which every constraint is an LMI. Therefore, this problem can be solved usinglinear optimization techniques.

3-2-2 Initial set as DOA

Before we can describe the algorithm which determines the control feedback gain for thelargest possible DOA of the system, an initial set P must be defined. From this initial set,we can iterate to find a larger set which is the DOA of the quadratic system. For this initialset, the only requirement is that it is a solution of our control problem. This means thatthere exists a K and a set P that satisfy the criteria of Theorem 1. The easiest way is to

R. Koch Master of Science Thesis

Page 59: Masters Thesis: Nonlinear control of electronic converters

3-2 Linear feedback of quadratic systems with linear Lyapunov functions 39

determine the set P based on a chosen K that is locally asymptotically stabilizing the system.A linear control method, such as LQ control or pole placement, are examples to determine amatrix K that makes the system locally asymptotically stable. Although in essence it doesnot matter whether pole placement is used or LQ control, pole placement is more favorablebecause complex poles of the linearized system can be prevented. The contractive set of asystem with complex poles might have more vertices compared to a system with real poleswhich results in more LMIs of (3-36) and, thus, a more complicated optimization problem.The contractive set corresponding to the system with feedback controller K is determinedusing the eigenvalues of the linearized version of the system as described in [14].First, the model of the system in (3-28) has to be linearized in the origin. This results in thefollowing equation:

~xk+1 = (A0 +B0K0)~xk = A0~xk (3-42)

where K0 is the initial feedback gain of the system and A0 is the initial system matrix. Usingthe Jordan decomposition, the system can be written in a similar way as:

~yk+1 = A0~yk (3-43)

where ~yk = P~xk and

A0 = P−1A0P =

L1 · · · 0. . .

Lp1

D1... . . . ...

Dp2

∆1. . .

0 · · · ∆p3

(3-44)

The matrix A0 is divided in three different groups. The first group consists of the Jordanblocks corresponding to real eigenvalues (L1, L2, ..., Lp1). The size of each block is dependenton the multiplicity of the eigenvalue (qi, i ∈ Z[1,p1]) and is given by:

Li =

λi · · · 0

1 . . .... . . . ...0 · · · 1 λi

(3-45)

where λi is an eigenvalue of the matrix A0. All the eigenvalues of Li need to be insidethe unit circle (|λi| < 1) in order to ensure asymptotic stability of the system. Based onthe eigenvalues, we can determine a polyhedral set that is invariant for the system. Thispolyhedral set (Si) that belongs to each block with only real eigenvalues is constructed as:

Si =~y ∈ Rqi

∣∣∣∣[Iqi−Iqi

]~y ≤

[~li~li

](3-46)

Master of Science Thesis R. Koch

Page 60: Masters Thesis: Nonlinear control of electronic converters

40 Local controller and domain of attraction (DOA) of the power converter systems

where the vector ~li is dependent on whether the multiplicity is equal to one or greater thanone. If the multiplicity of the eigenvalue i is one (qi = 1), ~li can be any positive number (notethat in this case ~li is a scalar) and when the multiplicity is larger than one (qi > 1), ~li isdetermined the following equation obtained from [14]:

~lTi =[li,1 li,2 · · · li,qi

](3-47a)

li,1 > 0, li,2 ≤li,1εi, ..., li,qi ≤

li,qi−1εi

(3-47b)

where li,1 can be any positive number and εi = 1− |λi|.The second group of matrix A0 consists of blocks with complex eigenvalues of the followingform:

λ1 = ρ cos (β) + jρ sin (β) (3-48a)λ2 = ρ cos (β)− jρ sin (β) (3-48b)

These eigenvalues, which also have to be inside the unit circle (ρ ∈ R(0,1)) in order to ensureasymptotic stability of the system, are always appearing in pairs. This means that if one ofthe eigenvalues is in the form of λ1 in (3-48), then there is also an eigenvalue of the form ofλ2. The blocks Di from (3-44) are constructed as follows:

Di =[ρi cos (βi) ρi sin (βi)−ρi sin (βi) ρi cos (βi)

](3-49)

The corresponding invariant polyhedral set for these blocks are different compared to the firstgroup in the sense that it is not just a constant bound on the state variables, but it has thefollowing form:

Π = ~y ∈ R2|Wi~y ≤ ~wi (3-50a)

Wi =

cos(πN

)sin(πN

)cos

(3πN

)sin(3πN

)...

...cos

( (2k+1)πN

)sin( (2k+1)π

N

)...

...cos

( (2N−1)πN

)sin( (2N−1)π

N

)

, ~wi = cos

N

)1N (3-50b)

The polyhedral set of a complex pair of eigenvalues has the form of a regular polygon whichis symmetrical when N is even. The value N itself cannot be chosen arbitrarily, because ithas to satisfy the following conditions which are both necessary and sufficient for the numberof vertices of the polyhedral set [14]:

ρi cos((2k + 1)π

N− βi

)≤ cos

N

)(3-51a)

2kπN≤ βi <

2(k + 1)πN

(3-51b)

0 ≤ k < N − 1 (3-51c)

R. Koch Master of Science Thesis

Page 61: Masters Thesis: Nonlinear control of electronic converters

3-2 Linear feedback of quadratic systems with linear Lyapunov functions 41

This eventually boils down to N being larger than or equal to 2πβi. Note that a small N is

preferable because that will lead to less LMIs for computing the control feedback gain in thealgorithm explained later.The third group of matrix A0 is comparable with the second one but deals with multiplecomplex pairs of eigenvalues. The blocks in A0 are formed as (3-45) but then with Di as theblocks in (3-49) instead of the eigenvalues λi:

∆i =

Di · · · 0

I2. . . ...

... . . .0 · · · I2 Di

(3-52)

where, the dimension of ∆i is two times the multiplicity of the complex pair of eigenvalues(qi). Also, the conditions in (3-51) are more restricted in case of qi > 1. The less than orequal to sign (≤) in (3-51a) has changed into a strictly less than sign (<). The definition ofthe polyhedral set is a block diagonal version of W in (3-50) combined with a vector witha comparable structure to ~w in (3-50) and ~li in (3-47). This set is given by the followingequation which is also obtained from [14]:

Ω = ~y ∈ R2qi |Wi~y ≤ ~vi (3-53a)

Wi =

Wi · · · 0... . . . ...0 · · · Wi

, ~vi =

αi,1 ~wiαi,2 ~wi

...αi,qi ~wi

(3-53b)

αi,1 > 0, αi,2 ≥αi,1 cos

(πN

, ..., αi,qi ≥αi,qi−1 cos

(πN

(3-53c)

where ξ = cos(πN

)− ρi cos

((2k+1)π

N − βi).

When deriving the invariant set from the linearized systems, the invariant set has to bewritten into the right state variables. This is done by using the transition matrix P whichis defined in (3-44). The new invariant sets S (for real eigenvalues), Π (for complex pairs ofeigenvalues) and Ω (for complex pairs of eigenvalues with higher multiplicity) are given by:

P0 = ~z ∈ Rn|ΓP−1~z ≤ ~γ (3-54a)

Γ =

[IqS1−IqS1

]· · · 0

. . . [IqSp1−IqSp1

]... W1

.... . .

Wp2

W1. . .

0 · · · Wp3

, ~γ =

[~l1~l1

]...[~lp1~lp1

]~w1...~wp2

~v1...~vp3

(3-54b)

Master of Science Thesis R. Koch

Page 62: Masters Thesis: Nonlinear control of electronic converters

42 Local controller and domain of attraction (DOA) of the power converter systems

After the initialization of the invariant set (P0) and the feedback control gain (K0), P0 andK0 do not necessarily satisfy the state and input constraints (~xk ∈ X and ~uk ∈ U). That iswhy the invariant set has to be scaled in order to satisfy these constraints. This can be doneusing the following linear programming problem which still ensures the maximum invariantset corresponding to K0:

α∗ = − argminα−α (3-55a)

s.t. ∀~v ∈ vertP0 (3-55b)[AT

XMK0

]α~v ≤

[1p~um

](3-55c)

From the result of this linear programming problem, the initial set P0 can be derived. However,this does not mean that we found P0 and K0 that satisfy the criteria of Theorem 1, becausewe have determined P0 and K0 based on the linearization of the quadratic model in (3-28).This means that there is no guarantee P0 and K0 will meet the LMIs in (3-36). Therefore,asymptotic stability of the quadratic system cannot be concluded inside the set P0. In orderto meet the LMIs in (3-36), a new value of the initial control feedback gain has to be foundbased on the initial set P0.

3-2-3 Modified algorithm to determine the DOA using a linear Lyapunov func-tion

After P0 and K0 have been determined, the algorithm can be constructed. This algorithmwill find the largest possible invariant set around the equilibrium, which is the origin, forwhich the quadratic system with a linear feedback controller is asymptotically stable. In theforegoing, an initial set operating as the DOA of the system is derived and the optimizationproblem determining an asymptotically stable controller for this system. This algorithmhas to ensure that the largest DOA will be found for which the quadratic system can bestabilized. That will be achieved by increasing the size of the invariant set P. There are twopossibilities to extend this set at every iteration. The first option is by moving the verticesof the invariant set further away from the origin. This can be performed by multiplying thespecific vertex with (1 + s), where s is the relative increase in the distance between the originand the vertex with respect to the current distance between the origin and the vertex. sis initially kept constant for all the vertices and will decrease if the increase of every vertexwill lead to no solution of (3-36). The rate at which s decreases is determined using ζ. Thiscan be either a constant value or a sequence of ascending numbers. If ζ is a scalar value,s will constantly decrease based on the value of ζ. In the case ζ is a sequence of ascendingnumbers, s will be computed by dividing its initial value (s0) by the subsequent value of ζ.The advantage of this technique is that the number of vertices will not change as long as theboundaries of the state space are not reached and will only increase slightly when it doesreach these boundaries. The disadvantage of this technique is the flexibility of the invariantset. Although the shape of the invariant set can change, it will stay similar to the initial shapeof the invariant set. In order to allow more freedom in the structure of the invariant set, thesecond option enlarges the invariant set by moving a point on the edge of the invariant setfurther away from the origin instead of only the vertices. The movement of every point taken

R. Koch Master of Science Thesis

Page 63: Masters Thesis: Nonlinear control of electronic converters

3-2 Linear feedback of quadratic systems with linear Lyapunov functions 43

from the boundary of the invariant set is done in the same way as in the first option witha multiplication of (1 + s). The main drawback of this approach is the increase of numberof vertices. At every iteration, a new vertex is added to the invariant set which makes theoptimization problem more complicated, although the fact that it is linear. Therefore, wewill first start with the first option. Whenever an increase in the size of the invariant setdoes not lead to a solution of the control problem, which means that no controller has beenfound that makes the system asymptotically stable inside P and P itself an invariant set, wewill stop performing further iterations using the first method and we will continue using thesecond option until the algorithm does not give a solution using this method anymore. In thatcase, the algorithm will terminate and the final controller together with the correspondingDOA has been found. Algorithm 2 shows the algorithm described in this section in pseudocode in order to give a clearer illustration of its operation. One of the things that can beseen in Algorithm 2 but has not been described, is the convex hull taken of the expansionof the invariant set in line 11. The convex hull is taken to ensure that the invariant set isalways convex. If we have not taken the convex hull in this line, there are possibilities thatthe set Pt,new is non-convex, because at every iteration only one of the vertices is moved awayfrom the origin. This might also be the case when a point on the edge is moved away fromthe origin. Another operation performed in line 11 is the intersection of the newly obtainedinvariant set and X. This ensures that the quadratic system will not violate the constrainton the states.The condition mentioned in line 12 of Algorithm 2 shows that if the new invariant set is notdifferent from the previous one which resulted in an affirmative solution, then there is no needto determine a new feedback control gain Kt. This occurs when the vertex of Pt is alreadyon the edge of X, which means that no improvement is made when moving this particularvertex. In case the new invariant set is larger than the previous one, a new Kt is determinedby solving the LMIs in (3-36). It is preferable to find the feedback control gain that results inthe best improvement of the states of the system, which means the value of Kt that results inthe fastest advance towards the equilibrium. Therefore, ε has to be found as small as possible.This results in the following linear optimization problem:

minε,Kt

ε (3-56a)

s.t. ε~aTi ~v(1) − ~aTj A(~v(1), ~v(2)) ≥ 0, ∀j ∈ Z[1,p], ∀(~v(1), ~v(2)) ∈ Ei × Ei (3-56b)Ei = ~v ∈ vert(Pt)|(~ai − ~aj)T~v ≥ 0,∀j ∈ Z[1,p] ∪ 0 (3-56c)Kt~v ∈ U, ∀~v ∈ vertPt (3-56d)Pt = ~x ∈ Rn|P~x ≤ 1p (3-56e)ε ∈ R+ (3-56f)

The contractive set is said to be a valid solution for a asymptotic stable controller if ε from thisoptimization problem is less than 1. If the solution is not valid, the parameter ’enlarged’ is kept0. After all the vertices of Pt are evaluated, a check is performed whether any improvementhas been made. If at least one improvement has been made, which means that ’enlarged’is 1, new improvements will be made using the vertices of the newly obtained contractiveset. Otherwise, the value of s is decreased with a factor ζ after which the vertices of thecontractive set will be evaluated again. The function will terminate when the value of s islower than the predefined s∗. The result is then the largest contractive set that results where

Master of Science Thesis R. Koch

Page 64: Masters Thesis: Nonlinear control of electronic converters

44 Local controller and domain of attraction (DOA) of the power converter systems

Algorithm 2 Modified algorithm from [26] to determine the invariant set with asymptoticallystabilizing linear feedback gain (changes with respect to the algorithm described in [26] areshown in blue)

1: function DOA_Quadratic_model_LFL(P0,s0,s∗,ζ,X,U,A(·)) . U and A(·) areneeded to solve (3-56)

2: Pt ← P03: s← s04: l← 15: add_vertices ← 16: enlarged ← 17: while enlarged = 1 do8: enlarged ← 09: for all ~v ∈ vertPt do

10: ~vnew ← (1 + s)~v11: Pt,new ← ConvvertPt ∪ ~vnew ∩ X12: if Pt,new \ Pt 6= ∅ then13: Determine the feedback control gain Kt and ε by solving (3-56)14: if ε < 1 then15: P← Pt,new16: K ← Kt17: enlarged ← 118: end if19: end if20: end for21: Pt ← P22: if enlarged = 0 and s ≥ s∗ then23: s← s

ζ or s← s0ζ(l) , l + +

24: enlarged ← 125: else if enlarged = 0 and add_vertices = 1 then26: Add vertices to Pt27: add_vertices ← 028: s← s029: l← 130: end if31: end while32: return P, K33: end function

R. Koch Master of Science Thesis

Page 65: Masters Thesis: Nonlinear control of electronic converters

3-2 Linear feedback of quadratic systems with linear Lyapunov functions 45

the system is asymptotically stable. This set, together with the controller gain, will be usedin the SD-NMPC controller.

3-2-4 Application: the buck-boost converter

The algorithm will first be applied to the buck-boost converter from Section 2-1. The firststep involves checking whether a linear feedback controller exists for the state space X. Thisis done by solving (3-56) for Pt = X. The ε returned is 4.81 which is much larger than 1 forthe buck-boost converter operating in buck mode (Vo = 10 V). Therefore, the system is notasymptotically stable within the set Pt. The initial contractive set has to be defined in orderto apply Algorithm 2 to find a set for which there exists a controller that makes the systemasymptotically stable inside this set. The linear feedback control gain K0 and the matrix A0of (3-42) are given by:

K0 =[−0.1589 0.0101

], A0 =

[0.7164 −0.01980.7749 0.9836

](3-57)

where the control gain is determined using pole placement. The eigenvalues of A0, whichare the poles of the linearized model are λ1 = 0.8 and λ2 = 0.9. Both eigenvalues are realwhereby only the first group is needed to determine the contractive set belonging to thelinearized system. Moreover, the multiplicity of both eigenvalues is one which makes it evensimpler. The resulting contractive set is given by:

P0 = ~z ∈ R2|ΓP−1~z ≤ ~γ (3-58a)

Γ =

1 0−1 00 10 −1

, P =[−0.2305 0.10720.9731 −0.9942

], ~γ =

1111

(3-58b)

Figure 3-3a shows this initial contractive set. Note that this set exceeds X which means thatwhen the states enter this contractive set, the linear controller might steer them into a regionwhich is outside X. Therefore, the initial contractive set has to be scaled such that the wholeset is inside X. This is done by applying the optimization problem formulated in (3-55). Theresult is given in Figure 3-3b for α∗ = 0.5681. Because the linearized model of the buck-boostconverter is used to determine the controller and the contractive set while the actual model ofthe system is bilinear, the contractive set might not be asymptotically stable at every pointinside this set for the buck-boost converter with this linear controller. Therefore, (3-56) hasto be applied to find the controller gain K0 which makes P0 asymptotically stable for thebilinear model. The resulting value of K0 is:

K0 =[−0.6444 −0.0753

](3-59)

for which the set P0 is contractive because ε = 0.9071 < 1.After the initialization of the contractive set with corresponding linear control gain has beencompleted, Algorithm 2 can be applied to the buck-boost converter system. The parametersused in this algorithm are given in Table 3-2. The enlargement factor of the contractive set (s)starts with doubling the distance between the origin and the vertices. After one decrease of s,

Master of Science Thesis R. Koch

Page 66: Masters Thesis: Nonlinear control of electronic converters

46 Local controller and domain of attraction (DOA) of the power converter systems

(a) unscaled (b) scaled with α∗ = 0.5681

Figure 3-3: Initial contractive set (orange) of the buck-boost converter before and after scalingwith respect to the state space (blue)

the distance between the origin and the vertices increases with 50%, thereafter with 25% etc.When the increase is lower than 5%, the iteration terminates and the largest contractive setis determined. The choice of these parameters is based on the computational speed. If s∗ islower than 5%, the contractive set might be larger, but it will also increase the computationaltime of Algorithm 2.The result of Algorithm 2 is shown in Figure 3-4. Figure 3-4a shows the result of Algorithm 2

Table 3-2: Parameters used in Algorithm 2

s0 1s∗ 0.05ζ 2

when no additional vertices are added to the contractive set. The volume of P of the finalresult is 7.51% from the volume of X after 61 iterations of the algorithm (from which 22iterations lead to an increase of P). The other plot, Figure 3-4b, shows the result includingadditional vertices to the set P. These vertices are chosen in the midpoints between twovertices of P. The contractive set obtained is larger than the contractive set in Figure 3-4a asthe volume is 9.03% of the volume of X. However, the number of iterations is also much larger,namely 101 iterations (from which 24 lead to an increase of the contractive set). This is thereason that why limiting the number of vertices of the contractive set is desirable for systemswhere the computational time is an important factor for the determination of the control law.Although the computational time is not vital in case of the buck-boost converter, as thesecomputations take place offline (without direct control of the system), it is still desirable tolimit the computational time. This is because we can only start controlling the buck-boostconverter after a local controller has been determined with corresponding DOA and the initialsequence of the controller. The longer the computational time, the longer we have to waitbefore we can actually control the buck-boost converter.A better way to increase the volume of the contractive set is by using a different factor for ζ.In search algorithms, the use of the golden ratio is very popular as it minimizes the number

R. Koch Master of Science Thesis

Page 67: Masters Thesis: Nonlinear control of electronic converters

3-2 Linear feedback of quadratic systems with linear Lyapunov functions 47

(a) Using only the method of moving the vertices of thecontractive set

(b) Including additional iterations by adding vertices tothe set P

Figure 3-4: Evolution of the contractive set (P) of the buck-boost converter using Algorithm 2

of iterations needed to find an optimum. The golden ratio is defined as the ratio between twoquantities being equal to the sum of these quantities divided by the largest quantity. Thisgiven the following value for ζ:

ζ = 1 +√

52 ≈ 1.618 (3-60)

Besides the golden ratio, the Fibonacci sequence is also popular in the field of the searchalgorithms. This makes ζ a sequence of numbers instead of a scalar value as by the methodsdescribed above, which is given by:

ζ = 2, 3, 5, 8, 13, 21, 34, 55, 89, ... (3-61)

Note that we skipped the first two number of the Fibonacci sequence, because they are both1 which means that s does not change. The resulting relative volume of the contractive sets(with respect to the volume of X) together with the number of iterations needed to reach thisvolume is given in Table 3-3. Figure 3-5 show the resulting contractive sets for the buck-boost

Table 3-3: Results of applying Algorithm 2 to the buck-boost converter system using differentmethods for increasing the relative distance between the origin and the vertices of P

ζ s0 s∗ rel. vol. of P #iter. #improv. of Phalving 2 1 0.05 7.51% 61 22golden ratio 1+

√5

2 1 0.05 6.87% 61 19Fibonacci seq. 2,3,5,8,13,... 1 0.05 7.35% 61 20

converter using the golden ratio and the Fibonacci sequence to change the relative distance ofthe vertices with respect to the origin. From the table and the figures, we can see that thereis no much difference between the different choices for ζ. The reason for this is that most ofthe improvements of the DOA takes place using the initial value of s. Therefore, we will usethe ζ = 2 in the sequel of this section. The mathematical description of the contractive set

Master of Science Thesis R. Koch

Page 68: Masters Thesis: Nonlinear control of electronic converters

48 Local controller and domain of attraction (DOA) of the power converter systems

and the corresponding controller corresponding to this choice are given by:

P = ~x ∈ Rn|~aTP,i~x ≤ 1, i ∈ Z[1,4] (3-62a)

AP =[1.1457 −5.2117 1.1004 −0.16120.0476 0 0.3114 −0.1768

](3-62b)

K =[−0.2135 0.0153

](3-62c)

where ~aP,i are the columns of AP. Note, that this contractive set is dependent on the chosenequilibrium point of the buck-boost converter. This means that we have to apply Algorithm 2every time the equilibrium point changes.We can apply the same algorithm with the same parameters to the buck-boost converter

(a) Using the golden ratio (b) Using the Fibonacci sequence

Figure 3-5: Resulting estimations of the DOA of the buck-boost converter where no vertices areadded to the contractive set. Two different values of ζ are used.

where the reference voltage is 40 V instead of 10 V. Also, we will use the same poles whendetermining the initial controller of this system. This will obviously lead to the same proce-dure of finding the initial contractive set of the system which we have plotted in Figure 3-6a.After applying Algorithm 2, the resulting contractive set has been plotted in Figure 3-6b.Mathematically the estimated DOA with its corresponding controller can be given by:

P = ~x ∈ Rn|~aTP,i~x ≤ 1, i ∈ Z[1,4] (3-63a)

AP =[

0 1.0178 −0.659 0.1703 −0.01580.1 0 0 0.0937 −0.0279

](3-63b)

K =[−0.1502 0.0096

](3-63c)

Note that this set has 5 vertices instead of 4 although we did not add extra vertices to thecontractive set ourselves. This can happen when the intersect is taken from the set P aftermoving one of the vertices and the set X in line 11 of Algorithm 2. In the figure, we can seethat this set is completely different from the one determined for the buck-boost converter inbuck mode. This confirms the statement that every time the equilibrium point changes, wehave to apply Algorithm 2 again.

R. Koch Master of Science Thesis

Page 69: Masters Thesis: Nonlinear control of electronic converters

3-2 Linear feedback of quadratic systems with linear Lyapunov functions 49

(a) Initial contractive set of the buck-boost converter with40 V reference voltage

(b) Resulting estimate of the DOA of the buck-boostconverter with 40 V reference voltage

Figure 3-6

(a) Initial contractive set (b) Final contractive set

Figure 3-7: Contractive sets of the buck-boost converter system with complex eigenvalues ofthe initial system

We can place the poles of the initial controller at a different location. In case of other realpoles, this does not influence the eventual controller and estimated DOA that much, but itdoes when the poles are complex. As mention before, when the eigenvalues of A0 from (3-28)are complex, the number of vertices of the initial contractive set will be larger than in the caseof real eigenvalues. This is true as can be seen in Figure 3-7a for the buck-boost converter inbuck mode with eigenvalues at λ = 0.7 ± j0.5, where the contractive set (P0) consists of 13vertices. The resulting contractive set (P) is given in Figure 3-7b. The number of vertices ofP is 4 which is much lower than that of the initial set. The reason for this is the operations inline 11 of Algorithm 2. Both, the convex hull and the intersection with X can remove verticesof P. Also, this contractive set is slightly bigger, the relative volume is 7.6% with respect toX, than that of the contractive set in Figure 3-4a while the number of iterations is more than20% larger (75).

Master of Science Thesis R. Koch

Page 70: Masters Thesis: Nonlinear control of electronic converters

50 Local controller and domain of attraction (DOA) of the power converter systems

3-2-5 Application: the three-phase VSI

We will also apply Algorithm 2 to the three-phase VSI connected to a PMSM. The model ofthis system is also quadratic, whereby B(~x) is equal to zero. The first check of the systemis whether solving the optimization problem in (3-56) already gives a stabilizing solutionwhen using X as the proposed contractive set. Unfortunately, the results of this optimizationproblem given a value of ε larger than one which means that the obtained controller is notstabilizing the system. Therefore, we have to apply Algorithm 2 to this system. In orderto apply this algorithm to the PMSM, we first have to determine an initial polytope andstabilizing controller. We use pole placement to design a local linear feedback controller withpoles placed on λ =

[0.8 0.85 0.9

]T. The linearized model is obtained by setting A(~x) in

the model of the PMSM to zero (B(~x) from (3-28) is already equal to zero). The resultingfeedback controller can be described by the following expression:

K0 =[0.2841 −0.1105 −7.65550.0766 0.4031 −3.9387

](3-64)

Using this feedback control gain, we can determine a contractive set for the linearized model.As the closed loop poles of the system are all real, this is very trivial. The resulting setcontains 8 vertices and is given by:

P0 = ~x ∈ Rn|~aTP0,i~x ≤ 1, ∀i ∈ Z[1,6] (3-65a)

AP0 =

0.9407 −0.9407 0.8148 −0.8148 0.4214 −0.42141.7593 −1.7593 −0.6003 0.6003 0.9062 −0.9062

129.7578 129.7578 −9.4631 9.4631 129.9538 −129.9538

(3-65b)

where ~aP0,i are the columns of AP0. Now, we have found this set, we have to find a controllerthat makes this set an estimate of the DOA of the system. This can be done by solving (3-56).This result gives an ε smaller that one which means that the obtained controller is stabilizing.Thereafter, we can apply Algorithm 2 to the inverter controlling a PMSM. The parametersused are the same as in Table 3-1. The resulting contractive set is given in Figure 3-8. Thisset has a relative volume of 0.53% with respect to the set X. This is obtained after taking 104iterations, from which 54 lead to an increase in the size of the set, in order to find this set.However, the computational time is already such high that we have terminated the algorithmat this point. The reason for the high computational time is the size of the optimizationproblem constructed based on the contractive set. This set has 114 vertices and is describedby 70 inequalities. Based on these results, we have concluded that this method is not suitedfor this particular system.

3-3 Linear feedback of nonlinear quadratic systems with quadraticLyapunov function

Both systems elaborated in Chapter 2 are belonging to the class of quadratic systems. Thesesystems have been used in the design of the controller in the previous section, but we will

R. Koch Master of Science Thesis

Page 71: Masters Thesis: Nonlinear control of electronic converters

3-3 Linear feedback of nonlinear quadratic systems with quadratic Lyapunov function 51

Figure 3-8: Resulting estimation of the DOA for the inverter after applying Algorithm 2.

again use this type of system to design a controller with corresponding DOA in this section.For convenience, we will repeat the mathematical model of the quadratic system here:

~xk+1 = (A0 +A(~xk))~xk + (B0 +B(~xk))~uk (3-66a)

A(~xk) =

~xTkA1~xTkA2

...~xTkAn

, B(~xk) =

~xTkB1~xTkB2

...~xTkBn

(3-66b)

The reason that we will consider this type of model is the possibility to determine a linearfeedback gain and a corresponding invariant set using only linear programming. In literature,[2] and [6] show how the invariant set of a quadratic system can be found and [1] and [3]add the determination of a linear feedback gain to the theory. However, these papers dealwith continuous-time systems instead of discrete-time system which we are dealing with. So,the method explained in this section will differ in that sense to these papers. At the end ofthis section, this method will be applied to both systems, the buck-boost converter and thethree-phase VSI. The latter is a quadratic system itself and the other system has a bilinearmodel which is a special type of the quadratic model in (3-66).

3-3-1 Design of the controller

In this section, a linear feedback controller is used to control the quadratic system in (3-66).This controller has the following well-known configuration:

~uk = K~xk (3-67)

Master of Science Thesis R. Koch

Page 72: Masters Thesis: Nonlinear control of electronic converters

52 Local controller and domain of attraction (DOA) of the power converter systems

where K is a constant m×n-matrix called the control gain. Applying this control law to thequadratic system in (3-66) results in the following model:

~xk+1 = (A0 +B0K)~xk +

~xTk (A1 +B1K)~xk~xTk (A2 +B2K)~xk

...~xTk (An +BnK)~xk

(3-68)

At first sight, it seems that if we can make all the matrices Ai+BiK Schur, which means thatall the eigenvalues are within the unit circle, the system is asymptotically stable. However,this is not true in general. Therefore, we have to look back at Theorem 1 and constructa convex control problem in order to find a controller that stabilizes this quadratic systemwithin a certain domain. The Lyapunov function that is used to construct the convex controlproblem is quadratic and is written in the following general form:

v(~x) = ~xTP~x (3-69)

where P is positive definite in order to ensure that the first criterion of Theorem 1 is satisfied.The next step consists of constructing the convex control problem that verifies the secondcriterion of Theorem 1. This is done by simply applying the quadratic model of (3-66) to thefunction ∆v(~x). This gives the following expression:

∆v(~xk) = v(~xk+1)− v(~xk)

= ~xTk

((A(~xk) + B(~xk)K)TP (A(~xk) + B(~xk)K)− P

)~xk

(3-70a)

A(~xk) = A0 +A(~xk) (3-70b)B(~xk) = B0 +B(~xk) (3-70c)

The function ∆v(~xk) satisfies the second criterion in Theorem 1 if and only if it satisfies thefollowing condition:

(A(~xk) + B(~xk)K)TP (A(~xk) + B(~xk)K)− P < 0, ∀~xk ∈ D (3-71)

where D is called the DOA of the quadratic system. This equation is not written in the formof an LMI, because the matrix K appears quadratically in this equation. Therefore, we haveto rewrite this equation using the Schur complement. This results in the following LMI:[

P (A(~xk) + B(~xk)K)TPP (A(~xk) + B(~xk)K) P

]> 0, ∀~xk ∈ D (3-72)

Note that this LMI is only valid if P is invertible, which it is as P is positive definite. Anotherdistinctive feature of this LMI is its dependency of the state ~xk, which appears affine in thisLMI. This is a pretty pleasant property of this LMI as it will limit the number of inequalitiesin the control problem that will be formulated later in this section. Still, this state ~xk causesproblems in finding the control gain using this LMI as it is impossible to estimate the DOAby applying all possible states inside X in order to find D and K otherwise than using themethod described in Section 3-1. In this section we will use a polytope P, which is a subsetof X, in order to limit the required number of points in order to solve (3-71). The idea

R. Koch Master of Science Thesis

Page 73: Masters Thesis: Nonlinear control of electronic converters

3-3 Linear feedback of nonlinear quadratic systems with quadratic Lyapunov function 53

behind this method is that every point inside the polytope P can be written in barycentriccoordinates by dividing P into several n-simplices (Ei) based on the number of vertices of P.Each state within Ei can be written as the sum of a factor multiplied with each of the vertices.The barycentric coordinates have already been described in previous sections, thus only themathematical description is repeated here for convenience:

~x =n+1∑j=1

λj~vj , ∀~vi ∈ vertEi (3-73a)

n+1∑j=1

λj = 1 (3-73b)

Applying the barycentric coordinates to the LMI in (3-72) results in the following LMI:[P (A(~v) + B(~v)K)TP

P (A(~v) + B(~v)K) P

]> 0, ∀~v ∈ vertP (3-74)

The proof of this equation is comparable to the one in (3-40b). If a control gain has beenfound that satisfies these LMIs for a specified set P, the DOA can be found by determiningthe largest possible ellipsoid, which shape is dependent on the matrix P , that fits in P. Theonly problem that arises is that there is no guarantee that a solution to the control problemexists based on a given P and P. This is because the set P can be chosen too big. Therefore,we have to include a possibility to scale set P into the LMIs in order to guarantee a solution tothe control problem can be found. This gives the following expression of the LMIs of (3-74):[

P γ(A(~v) + B(~v)K)TPγP (A(~v) + B(~v)K) P

]> 0, ∀~v ∈ vertP (3-75)

where γ is the scaling parameter (γ ≥ 0). It can be seen that this equation is not an LMIanymore due to the multiplication of γ with K. Therefore, a different method will be appliedthat will iteratively find a solution to the control problem.

3-3-2 Lyapunov function and initial polytope

Before the algorithm will be elaborated, we will first consider the choice for matrix P in theLyapunov function and the polytope P. The choice for matrix P is essential as it determinesthe shape of the estimated DOA. The reason that the Lyapunov function is chosen up toa certain level curve as the DOA of the system is based on the second criterion of Theo-rem 1. That criterion states that the Lyapunov function will only decrease when the systemis evolving in time. This is in agreement with the invariant property of the DOA. So, thatmeans that the set D, which is the estimated DOA, has the same shape as the level curves ofthe Lyapunov function. These level curves are ellipsoidal, because the Lyapunov function isquadratic. The size of D is based on the possibility of finding a solution of the control prob-lem, which means finding the matrix K that satisfies (3-74). In prospect of the SD-NMPCalgorithm, we want to find the largest set D that results in a solution to the control problem.Therefore, we want to maximize the volume of the ellipsoid within X as the level curve of the

Master of Science Thesis R. Koch

Page 74: Masters Thesis: Nonlinear control of electronic converters

54 Local controller and domain of attraction (DOA) of the power converter systems

Lyapunov function. This can be done by solving the following optimization problem obtainedfrom [9]:

minP

trP (3-76a)

s.t. P > 0 (3-76b)[1 ~aTX,i~aX,i P

]> 0, ∀i ∈ Z[1,q] (3-76c)

where trP is the trace of the matrix P and ~aX,i are part of the constraints on the set Xwhich is given by:

X = ~x ∈ Rn|~aTX,i~x ≤ 1, ∀i ∈ Z[1,q] (3-77)

Minimizing the trace of matrix P means that the eigenvalues of P are minimized as the traceof a matrix equals the sum of the eigenvalues. Minimizing the eigenvalues means that theradii of the ellipsoid are maximized which is desirable. Furthermore, the second inequalityconstraint in this optimization problem represents the proposed estimated DOA, given byv(~x) ≤ 1, being inside the set X. In addition to the largest possible DOA, we also want thelevel curves to represent a possible solution to the control problem. Therefore, we are alsooptimizing the shape of the DOA by computing a feedback control gain that stabilizes thelinearized model of the quadratic system in (3-66). Note that the linearized model is obtainedfrom the quadratic model by removing the quadratic part of the model. There are two reasonsthat we will use the linearized model. Firstly, it will make the optimization problem solvablein all cases. Secondly, the solution of the control problem for the linearized model will resultin a solution for the quadratic model as well as long as the states are close enough to theequilibrium point (the origin). There are several methods to determine the feedback controlgain for the linearized model, such as LQ-control and pole placement. In this section wewill use LQ-control. The LQ-controller is based on the minimization of an unconstrainedquadratic cost function of the state and the input of the system. This results in the followingexpression of the control feedback gain:

K = −(BT0 PB0 +R)−1BT

0 PA0 (3-78)

where Q and R are positive definite weighting matrices on the state and the input respectively.The change of the Lyapunov function between two consecutive states of the linearized model(∆v(~x)) can be determined by applying this control gain to this linearized model. This resultsin the following inequality constraint:

AT0 PA0 −AT

0 PB0(BT0 PB0 +R)−1BT

0 PA0 − P +Q ≥ 0 (3-79)

This constraint is definitely not an LMI and so it has to be transformed into a form that is anLMI in order to solve this control problem using semi-definite programming. This has beencompleted using the Schur complement and results in:[

AT0 PA0 − P +Q AT

0 PB0BT

0 PA0 BT0 PB0 +R

]≥ 0 (3-80)

R. Koch Master of Science Thesis

Page 75: Masters Thesis: Nonlinear control of electronic converters

3-3 Linear feedback of nonlinear quadratic systems with quadratic Lyapunov function 55

Finally, the convex control problem can be formulated such that the matrix P can be deter-mined in order to maximize the estimated DOA with the algorithm elaborated later in thissection. This convex problem is given by:

minP,Q,R

trP (3-81a)

s.t. P > 0, Q ≥ 0, R > 0 (3-81b)[1 ~aTX,i~aX,i P

]> 0, ∀i ∈ Z[1,q] (3-81c)[

AT0 PA0 − P +Q AT

0 PB0BT

0 PA0 BT0 PB0 +R

]≥ 0 (3-81d)

The resulting value of P constructs the initial proposed DOA of the system centred aroundthe equilibrium (the origin) This domain is given by the equation:

D = ~x ∈ Rn|~xTP~x ≤ 1 (3-82)

After the matrix P has been determined, the polytope P needs to be derived. This polytopeshould include the initial proposed DOA (D ⊆ P). We will construct P by taking samplesfrom the boundary of the set D that are evenly distributed from each other. The procedureof sampling points on the boundary of the ellipsoid starts with the parameterizing of theellipsoid which is done using hyperspherical coordinates:

~x∂P = P−0.5

cos(θ1)sin(θ1) cos(θ2)

sin(θ1) sin(θ2) cos(θ3)...

Πn−2i=1 sin(θi) cos(θn−1)

Πn−1i=1 sin(θi)

(3-83)

where θ1, ..., θn−2 ∈ R[0,π] and θn−1 ∈ R[0,2π]. Sampling is done by determining the numberof samples in every dimension. For example, if we want N samples in every dimension, thismeans that we divide every interval of θi into N evenly distributed angles. In total, therewill be Nn−1 samples drawn from the n-dimensional ellipsoid. These samples represent thevertices of the polytope P, which is a convex set as the ellipsoid itself is convex. You willdirectly notice that if the dimension of the ellipsoid grows, which means that the value of nincreases, the number of samples drawn from the ellipsoid will grow exponentially. A largenumber of vertices of P has the advantage that the estimated DOA will eventually be largeras the relative complement of D in P is smaller. However, the disadvantage of a large numberof vertices of P is the higher complexity of the control problem as every vertex represents anLMI in the programming problem. Therefore, a deliberate decision has to be made in orderto determine the set P. After sampling the ellipsoid D, this ellipsoid is still not completelycontained in P. In order to accomplish this, the edges of P must be tangents of the ellisoidD. This is best realized by scaling D using the following programming problem from [9]:

minγ

γ (3-84a)

s.t.[γ ~aTP,i~aP,i P

]≥ 0, ∀i ∈ Z[1,p] (3-84b)

Master of Science Thesis R. Koch

Page 76: Masters Thesis: Nonlinear control of electronic converters

56 Local controller and domain of attraction (DOA) of the power converter systems

where γ is the scaling parameter. The resulting set D will be given to the following equation:

D = ~x ∈ Rn|~xTP~x ≤ γ−1 (3-85)

As we prefer to have the inequalities represented being smaller or equal to 1, we will multiplythe matrix P with γ and obtain a new scaled matrix P . Now, we have found both the initialpolytope P and the corresponding initial estimate of the DOA D.

3-3-3 The algorithm used to determine the linear feedback control gain withcorresponding DOA for quadratic systems

The algorithm described in this section is based on finding the largest invariant set for whichthe quadratic system of (3-66) can be made asymptotically stable with a linear feedbackcontroller. In (3-75), we have seen that scaling the polytope P in finding a stabilizing controllermakes the inequality constraints nonlinear. At the same time, scaling P is necessary for findinga solution to the control problem or at least to guarantee an existing solution. From thecomputation of the matrix P in the previous subsection, we know that there exists a set γP,where γ is the scaling parameter, such that the control problem of (3-74) gives a stabilizingsolution. But instead of scaling P directly, we will scale it indirectly. This can be done byscaling the Lyapunov function of the current state instead of the next state. Mathematically,this will give the following equation of the change in the Lyapunov function:

∆v(~xk) = v(~xk+1)− ρv(~xk) (3-86)

where ρ is a positive scaling parameter. According to Theorem 1, the system is asymptoticallystable inside D if ∆v(~xk) is smaller than 0 for every state in D except the origin and ρ is smallerthan 1. However, in this algorithm, we allow ρ to be larger than 1 in order to guarantee asolution of the control problem as long as ρ will eventually be smaller than 1. At the sametime, we do not want ρ to be much smaller than 1, because that will make the estimatedDOA much smaller than it can actually be which is not preferred regarding the SD-NMPCmethod. Eventually, the idea is that ρ is just a little less than 1. This can be achieved byscaling the set P based on the value of ρ. If ρ is larger than 1, P will be decreased and if ρis smaller than 1, P will be increased. The rate at which we will scale P is γ = 1

ρ . After anumber of iterations, ρ has to reach 1 (or actually a little less than 1) in order to find thelargest ellipsoid that operates as the DOA of the quadratic system. In order to guarantee asolution will be found using this algorithm, the following constraint is added to the controlproblem:

i∏j=1

ρj > 1 (3-87)

which requires that the next size of the polytope P must always be smaller than the initialsize of P. Note that this is a linear inequality constraint because all the scaling parametersρj are known except the ith one in the ith iteration of the algorithm. The next step in thealgorithm is to prove that reducing set P results in a more stable controller, which meansthat the change in the Lyapunov function is smaller. This means that ∆v(~xk) in (3-70) hasto be smaller for the scaled set P than the initial set P. It can directly be seen from (3-86)

R. Koch Master of Science Thesis

Page 77: Masters Thesis: Nonlinear control of electronic converters

3-3 Linear feedback of nonlinear quadratic systems with quadratic Lyapunov function 57

that ∆v(~xk) from (3-70) is smaller for the scaled set P if and only if the value of ρ in the ithiteration is always smaller than its value in the first iteration, or:

ρi < ρ1, ∀i ∈ Z≥2 (3-88)

To make this constraint even stronger, which means that we do not only want ρi to be smallerthan ρ1 but we want ρi to be closer to one than any other value of ρ from previous iterations.Mathematically, this can be described by:

ρi < 1 + |1− ρj |, ∀j ∈ Z[1,i−1] (3-89)

Note that if this constraint is valid for every i > 1, then only the constraint for which j = i−1is needed to add to the control problem.Now, we can define the optimization problem that needs to be solved at every iteration ofthe algorithm in order to find the largest DOA with an ellipsoidal shape with correspondingcontroller for a quadratic system of the form of (3-66). This is described in the followingtheorem.

Theorem 3. Given a quadratic system in the form of (3-66), a polytope P and a set Ddescribed by:

D = ~x ∈ Rn|~xTP~x ≤ c (3-90)

where c is the largest positive real scalar that ensures D ⊆ P. Using this information, we cansolve the following optimization problem:

minρi,K

ρi (3-91a)

s.t.[

ρiP (A(~v) + B(~v)K)TP

P (A(~v) + B(~v)K) P

]> 0, ∀~v ∈ vertP (3-91b)

K~v ∈ U, ∀~v ∈ vertP (3-91c)i∏

j=1ρj > 1 if i > 1 (3-91d)

ρi < 1 + |1− ρi−1| if i > 1 (3-91e)

Then, D is called the largest DOA with an ellipsoidal shape of this quadratic system that fitsin the polytope P if and only if the gain ρi in the following optimization problem is equal to1. In case ρ 6= 1, this optimization problem needs to be solved again in the next iteration butnow with P→ 1

ρiP and i→ i+ 1

In order to clarify the operation and the implementation of this algorithm, this algorithm hasbeen written in pseudo-code in Algorithm 3. This algorithm describes the iterative procedureas described in this section. It terminates when a stabilizing solution is found for which ρi isbetween 1 − δ and 1 or when the maximum number of iterations is exceeded. In the lattercase, the solution of (3-91) must be stabilizing which means that ρi ≤ 1. The value of δ hasbeen chosen arbitrarily between 0 and 1. Usually, this value is very small as that makes theobtained DOA is large as possible, ideally 1.

Master of Science Thesis R. Koch

Page 78: Masters Thesis: Nonlinear control of electronic converters

58 Local controller and domain of attraction (DOA) of the power converter systems

Algorithm 3 Algorithm to determine the control gain and the DOA of a quadratic systemwith linear state feedback control

1: function doa_quad_sys_lin_control(A(·),B(·),P ,P,U,δ,imax)2: P ← Solve (3-81)3: P← Convx∂P by applying the formula in (3-83)4: P ← γP by solving the optimization problem in (3-84)5: i← 16: while true do7: ρi,K ← Solving the convex optimization problem in (3-91)8: if ρi > 1 then9: P← 1

ρiP

10: else . 0 < ρi ≤ 111: if ρi > 1− δ & i < imax then12: P← 1

ρiP

13: else14: P← 1

ρiP

15: break the while loop16: end if17: end if18: i← i+ 119: end while20: end function

3-3-4 Application: the buck-boost converter

After we have elaborated the method, we will apply it to the converters covered in Chapter 2.The first converter is the buck-boost converter. As we have already explained before, themodel of the buck-boost converter is bilinear, which is a special type of the quadratic modeland can thus be used to determine a stabilizing controller and corresponding DOA using themethod described in this section. We will first start to design a controller for the buck-boostconverter operating in buck mode (Vo = 10 V). In the first step, we have to determine aninitial quadratic set that will form the shape of the DOA of the system. The only thing thatwill change later is the size of this set, but the shape will not change. In order to find this set,we will find the largest possible quadratic set that will result in a solution to the linearizedmodel of this system. This means that we first have to linearize the model of the buck-boostconverter. This can be done very easily as we only have to remove the quadratic part, in thiscase only B(~x). Thereafter, we have to solve the linear optimization problem in (3-81). Thisresults in the following expression of matrix P :

P =[27.1621 0

0 0.01

](3-92)

Note that the control feedback gain that we also computed in this optimization will not beused, because we cannot guarantee that it will stabilize the quadratic system. The polytopeP that approximates this function is obtained by taking 12 samples from the boundary of theellipse. These samples are the vertices of P. The resulting polytope is given in Figure 3-9atogether with the ellipse. We can see from this figure that this is indeed the largest ellipse

R. Koch Master of Science Thesis

Page 79: Masters Thesis: Nonlinear control of electronic converters

3-3 Linear feedback of nonlinear quadratic systems with quadratic Lyapunov function 59

that will fit inside X with the origin being its centre. The mathematical description of P isgiven in Appendix A-1-1.Now, we have found the initial sets, we can apply Algorithm 3 to this example of the buck-

(a) Before scaling the ellipse (b) After scaling the ellipse

Figure 3-9: Graphical representation of the ellipse and polytope P before and after scaling theellipse.

boost converter. In the first steps of the algorithm, we have to scale the ellipse such thatthe whole ellipse is inside the polytope P. This ellipse will form the boundary of the largestpossible estimation of the DOA for this controller. The scaling parameter γ is computedbeing 1.0718 which means that the ellipse should be 6.7% smaller that its original size. Thisis an acceptable difference. The resulting ellipse is shown in Figure 3-9b which shows thatit is indeed completely inside P. The remainder of the algorithm will be executed using theparameters δ equal to 0.01 and the maximum number of iterations (imax) set to 20. Theresults are shown in Figure 3-10. There are 27 iterations needed, so 27 times the optimizationproblem of (3-91) has to be solve, in order to find the solution. The reason that so manyiterations are needed is because (3-91) only gives a stabilizing solution at the twenty-seventhiteration. The number of iterations would have been less when the solution of this optimizationproblem is alternating between a stable solution (ρi < 1) and an unstable solution (ρi > 1).The relative volume of the obtained estimation of the DOA is 0.41%. This is the volume of Dwith respect to X. This is relatively low compared with the maximum size of the DOA whichhas a volume that is at least 11 times larger than this value. The mathematical representationof the obtained solution is given by:

D = ~x ∈ R2|~xTP~x ≤ 1 (3-93a)

P =[323.352 0

0 0.119

](3-93b)

and the feedback control gain is given by:

K =[−0.5603 0.0212

](3-94)

If we would have chosen a different set at the beginning of this algorithm instead of the statespace to determine the largest ellipse inside this set, say for example X which is a subset of

Master of Science Thesis R. Koch

Page 80: Masters Thesis: Nonlinear control of electronic converters

60 Local controller and domain of attraction (DOA) of the power converter systems

0 5 10 15 20 25 30

i

0.95

1

1.05

1.1

1.15

1.2

1.25

1.3

1.35

1.4

1.45

i

(a) Plot of the evolution of ρ from (3-91) (b) Resulting polytope P and DOA D of the system.

Figure 3-10: Graphical results of applying Algorithm 3 to the buck-boost converter in buck mode

X, then a different result will be obtained. Let’s say that X has the same current range butthe voltage is constrained between 5 and 15 V (instead of 0 and 40 V), then the solution ofAlgorithm 3 is obtained after the first iteration instead of 27 and the volume of the DOA is2.25% of X instead of 0.41%. The corresponding controller gain is given by:

K =[−0.1988 0.0054

](3-95)

The mathematical description of P is shown in Appendix A-1-2. This result shows that takingthe largest ellipse from the state space does not mean that the final estimated DOA is to amaximum extend.That is different when we look at the same system in boost mode (Vo = 40 V). The shape ofthe ellipse is again determined by solving (3-86), where the maximum shape of the ellipse isdetermined based on the set X. The corresponding polytope P that approximates the ellipsehas also 12 vertices which, of course, leads to a decrease of 6.7% of the volume of the ellipse.The mathematical description of this polytope can be found in Appendix A-1-3. Thereafter,Algorithm 3 can be applied to this system in boost mode. The results are shown in Figure 3-11. We see that the ellipse has not changed in size while running the algorithm, except fromdecreasing its size because of it has to be inside P. This is because the optimization problem of(3-91) already gives a stabilizing solution in the first iteration of the algorithm. This time thevolume of the obtained estimation of the DOA is 23.04% of the volume of X which is relativelylarge. The mathematical description of the DOA of this system and its corresponding linearfeedback control gain are represented by:

D = ~x ∈ R2|~xTP~x ≤ 1 (3-96a)

P =[1.1103 0

0 0.0107

](3-96b)

K =[−0.1988 0.0054

](3-96c)

R. Koch Master of Science Thesis

Page 81: Masters Thesis: Nonlinear control of electronic converters

3-3 Linear feedback of nonlinear quadratic systems with quadratic Lyapunov function 61

Figure 3-11: Resulting ellipse and P after applying Algorithm 3 to the buck-boost converter inboost mode.

3-3-5 Application: the three-phase VSI

This method can also be applied to the three-phase VSI connected to a PMSM as it is alsoa quadratic system (with B(~x) = 0). We will apply this method in the same way, using thesame parameters, as the buck-boost converter. This leads to an ellipsoid described by theequation:

D0 = ~x ∈ R3|~xTP~x ≤ 1 (3-97a)

P =

2.2676 · 10−5 0 00 1.1211 · 10−3 00 0 0.01

(3-97b)

The next step involves determining the polytope P from this ellipsoid. As the dimension of thestates of the system is three instead of two, taking 12 samples in case of the two dimensionalsystem means that we have to take 144 samples in case of the three dimensional system. Thiswill lead to quite a lot LMIs in the optimization problem of (3-91) which we have to solvewhile running the algorithm. Nevertheless, the ellipse will only decrease with 12% which is areasonable amount.Thereafter, we can apply Algorithm 3 to the system of the three-phase inverter connected

to a PMSM. The result is plotted in Figure 3-12. This results has also been obtained afteronly one iteration of the algorithm, because it already resulted in a stabilizing solution. Thevolume of D is 0.66% which is a reasonable amount for this application. Note that it is almostthe maximum size the ellipsoid can have. The mathematical representation of the estimated

Master of Science Thesis R. Koch

Page 82: Masters Thesis: Nonlinear control of electronic converters

62 Local controller and domain of attraction (DOA) of the power converter systems

Figure 3-12: Resulting sets after applying Algorithm 3 to the system of the inverter

DOA and its corresponding controller is given by:

D = ~x ∈ R3|~xTP~x ≤ 1 (3-98a)

P =

2.4697 · 10−5 0 00 1.221 · 10−3 00 0 1.0891 · 10−2

(3-98b)

K =[6.7016e · 10−3 3.2265 · 10−2 −0.24418.2746 · 10−2 0.1207 0.178

](3-98c)

3-4 Nonlinear feedback of nonlinear quadratic systems with quadraticLyapunov function

In the previous section, we have designed a linear feedback controller for a quadratic systemusing a quadratic Lyapunov function. We have seen that the optimization of the DOA hasto be performed separately from the determination of the feedback control gain as the levelcurves of the Lyapunov function were already known while the control gain was determined.In this section, we will also use a quadratic Lyapunov function to design a feedback controllerfor a quadratic system but now using a nonlinear controller. Moreover, the shape of the DOAis unknown during the design of the control problem, which means that it is optimized at thesame time as the controller is determined.Another difference between the approach in this section and the previous section is the nota-tion of the system. In this section, we will use a different notation than that in (3-66). This

R. Koch Master of Science Thesis

Page 83: Masters Thesis: Nonlinear control of electronic converters

3-4 Nonlinear feedback of nonlinear quadratic systems with quadratic Lyapunov function 63

representation of the model is given by:

~xk+1 = A(~xk)xk +B(~xk)uk (3-99a)

A(~xk) = A0 +n∑i=1

~x(i)k Ai (3-99b)

B(~xk) = B0 +n∑i=1

~x(i)k Bi (3-99c)

where ~x(i)k is the ith element of the n-dimensional vector ~xk. Note that although these two

representations of the quadratic system may look completely different, they can be convertedinto each other. This controller has been introduced in [12] and most steps taken for the designof the controller in this section are obtained from this paper. Only some small modificationsin this approach are made in order to make it applicable for the power converters describedin Chapter 2.

3-4-1 Design of the controller with DOA

The feedback controller in this section is, in contrast with the previous approaches, nonlinear.This means that the control gain K is dependent on the state of the system (K(~xk)). Thisleads to the following expression for the feedback controller of the quadratic system of (3-99a):

~uk = K(~xk)~xk (3-100a)K(~xk) = K1(~xk) +K2(~xk) (3-100b)

K1(~xk) = K0 +n∑i=1

~x(i)k Ki (3-100c)

The gain K2(~xk) does not have a specified structure, except from the fact that it is quadraticwith respect to the state ~xk. This controller combined with the quadratic system in (3-99a) will determine the evolution of the system. This system must be invariant within anestimation of the DOA determined in this section. The estimation of the DOA is determinedbased on the choice of the Lyapunov function and will be bounded by a level curve of thisLyapunov function as we have also done in the previous section. The reason for choosing theLyapunov function in order to estimate the DOA is based on the stability theory described inTheorem 1. If the system is asymptotically stable when the state is located in v(~xk) ≤ γ, thenthis is also an estimation of the DOA of the system because the system is invariant withinthis region. Therefore, we will use the following expression as the estimation of the DOA ofthe quadratic system:

D = ~x ∈ Rn|~xTP~x ≤ 1 (3-101)

where P is a symmetric positive definite matrix (P = PT > 0) obtained from the Lyapunovfunction v(~x) = ~xTP~x. Just like the method described in the previous section, this methodalso needs a polytope containing the estimated DOA around the origin. This polytope isassumed to be symmetric with respect to the origin which in accordance with the estimated

Master of Science Thesis R. Koch

Page 84: Masters Thesis: Nonlinear control of electronic converters

64 Local controller and domain of attraction (DOA) of the power converter systems

DOA as this region will always be symmetric with respect to the origin. The general descrip-tion of this symmetric polytope is given by:

P = ~x ∈ Rn|∣∣∣~aTi ~x∣∣∣ ≤ 1 ∀i ∈ Z[1,p] (3-102)

After the definition of the sets D and P, we can continue with the determination of thecontrol problem used to design the feedback controller. For simplicity reasons, the followingdefinitions and transformations are used in the sequel of this section which are obtained from[12]:

Q = P−1, ~ξ1 = Q−1~x, ~ξ2 = Z−1(~x)~x+ (3-103)

where Z(~x) is a non-singular polynomial matrix over the state ~x. Note that P is always non-singular since it has to be strictly positive definite. This means that P does not have zeroeigenvalues and, so, it is always invertible. Applying these transformations to the equation ofthe state space model in (3-99a) results in the following equality:

(A(~x) +B(~x)K(~x))Q~ξ1 − Z(~x)~ξ2 = 0, ∀~x ∈ X (3-104)

Using this equation, the transformations mentioned above and the definition of the changein the Lyapunov function in the seconds condition in Theorem 1, we can derive the followinginequality:

−~ξ1Q~ξ1 + ~ξT2 Z(~x)TQ−1Z(~x)~ξ2 + 2~ξT2(

(A(~x) +B(~x)K(~x))Q~ξ1 − Z(~x)~ξ2

)≤ 0 (3-105)

Solving this equation for Q and K(~x) will result in a feedback controller and its correspondingDOA. However, in the form of this inequality, this control problem is non-convex, which makessolving this problem NP-hard. Therefore, we have to transform this inequality into a formthat results in a convex control problem. In order to achieve this, we will use the followingtransformation from [12] regarding the feedback controller K(~x) and the matrix B(~x) from(3-99a):

F (~x) = F1(~x) + F2(~x) = K(~x)Q (3-106a)

F1(~x) = F0 +n∑i=1

~x(i)Fi (3-106b)

F2(~x) = ΠTu (~x)FΠ(~x) (3-106c)

B(~x) = ΨT(~x)[B0B

](3-107a)

Ψ(~x) =[In

Π(~x)

](3-107b)

where all Fi and F are constant matrices that are needed to be solved in the control problemformulated later in this section. The state dependent parameters Π(~x) and Πu(~x) are definedby the following equations:

Π(~x) = ~x⊗ In, Πu(~x) = ~x⊗ Im (3-108)

R. Koch Master of Science Thesis

Page 85: Masters Thesis: Nonlinear control of electronic converters

3-4 Nonlinear feedback of nonlinear quadratic systems with quadratic Lyapunov function 65

where ⊗ indicates the kronecker product. Note that, also in this case, the parameter ndefines the number of states of the system and m the number of inputs. Besides thesetransformations, we also want to rewrite the polynomial matrix Z(~x) such that the controlproblem will eventually be convex. In order to do so, we assume that Z(~x) is quadratic in ~x,which means that Z(~x) is a polynomial of the second order. This will result in an expressionof Z(~x) using two first order polynomial matrices Ψ(~x) from (3-107) which is obtained from[12]:

Z(~x) = ΨT(~x)ZΨ(~x) (3-109)

where Z is a constant matrix. Applying all the above-mentioned transformations to theinequality of (3-105) results in the following expression of this inequality:

~ξT1 Q~ξ1 + ~ξT2 ΨT(~x)(ZTΨ(~x)QΨT(~x)Z − 2Z)Ψ(~x)~ξ2

+ 2~ξT2(A(~x)Q+B0F1(~x) + ΠT(~x)BF1(~x) +B0ΠT

u (~x)FΠ(~x) + ΠT(~x)BΠTu (~x)FΠ(~x)

)~ξ1 < 0

(3-110)

This inequality is still not linear with respect to the unknown matrices and even not convex.Besides this, it is also not linear (or actually affine) with respect to the state ~x which isdesirable as we will see later. In order to make this inequality affine with respect to ~x, wehave to use the following properties of the matrices Ψ(~x):

N1Ψ(x) = In, N2Ψ(~x) = Π(~x) (3-111)

where N1 =[In 0n×n2

]and N2 =

[0n2×n In2

]obviously. When we apply these expressions

to the inequality, we can again perform a transformation. This time the transformation isperformed on the already transformed states ~ξ1 and ~ξ2:

~η =[Ψ(~x)~ξ1Ψ(~x)~ξ2

](3-112)

This will result in the Lyapunov inequality written in a matrix form as:

~ηT[

−NT1 QN1

NT1 (A(~x)Q+B0F1(~x))N1 +NT

2 BF1(~x)N1 +NT1 B0ΠT

u (~x)FN2 +NT2 BΠT

u (~x)FN2(NT

1 (A(~x)Q+B0F1(~x))N1 +NT2 BF1(~x)N1 +NT

1 B0ΠTu (~x)FN2 +NT

2 BΠTu (~x)FN2

)TZTΨ(~x)Q−1ΨT(~x)Z − 2Z

]~η < 0

(3-113a)

~ηΦ(~x)~η < 0, η 6= 0 (3-113b)Φ(~x) = Φ(~x) + ΓT(~x)Q−1Γ(~x) (3-113c)

In the last equation, the matrices Φ(~x) and Γ(~x) are first order polynomial with respect to ~xwhich means that they are affine in ~x. These polynomials can be described by the following

Master of Science Thesis R. Koch

Page 86: Masters Thesis: Nonlinear control of electronic converters

66 Local controller and domain of attraction (DOA) of the power converter systems

equations:

Φ(~x) =[

−NT1 QN1

NT1 (A(~x)Q+B0F1(~x))N1 +NT

2 BF1(~x)N1 +NT1 B0ΠT

u (~x)FN2 +NT2 BΠT

u (~x)FN2(NT

1 (A(~x)Q+B0F1(~x))N1 +NT2 BF1(~x)N1 +NT

1 B0ΠTu (~x)FN2 +NT

2 BΠTu (~x)FN2

)T−2Z

](3-114a)

Γ(~x) =[0n×(n2+n) ΨT(~x)Z

](3-114b)

Furthermore, if we apply the Schur complement to Φ(~x), the inequality which states that Φ(~x)must be negative definite, the obtained inequality will be an LMI. Note that the conditionin (3-113b) does not have to be valid for every ~η. That is because ~η has been originated bythe transformation mentioned in (3-112). From this equation, we know that the followingcondition obtained from [12] must hold:

Ω(~x)~η = 0 (3-115a)

Ω(~x) =[

Π(~x) −In2 0n2×n 0n2×n2

0n2×n 0n2×n2 Π(~x) −In2

](3-115b)

We will use Finsler’s lemma in order to find one LMI that satisfies this equation and theinequality in (3-105). This gives the following LMI:

Φ(~x) + LΩ(~x) + ΩT(~x)LT < 0 (3-116)

where L ∈ R(2n+n2)×(2n2+n) is a scaling matrix. Note that there are no conditions on L andthe LMI satisfies the second condition of Theorem 1 if there exists a matrix L such that thisLMI holds for every ~x in the estimated DOA. However, this LMI is conservative since matrixΦ(~x) and ~η are coupled via ~x as described in [11]. In order to make this LMI less conservativea linear annihilator (Λ(~x)) needs to be found such that Λ(~x)Π(~x) = 0 for all ~x, where Λ(~x) isa first order polynomial matrix. An option is the following annihilator from [12]:

Λ(~x) =

~x(2) −~x(1) 0 · · · 0

0 ~x(3) −~x(2) ......

... . . . . . . . . . 00 · · · 0 ~x(n) −~x(n−1)

⊗ In (3-117)

Implementing this annihilator into the LMI results in the following LMI:

Φ(~x) + LΩ(~x) + ΩT(~x)LT < 0 (3-118a)

Ω(~x) =

Π(~x) −In2 0n2×n 0n2×n2

0n2×n 0n2×n2 Π(~x) −In2

0(n2−n)×n Λ(~x) 0(n2−n)×n 0(n2−n)×n2

0(n2−n)×n 0(n2−n)×n2 0(n2−n)×n Λ(~x)

(3-118b)

Based on this LMI, we can formulate the control problem that will be used to determine thefeedback controller and the corresponding estimation of the DOA. This control problem isdescribed in the following theorem:

R. Koch Master of Science Thesis

Page 87: Masters Thesis: Nonlinear control of electronic converters

3-4 Nonlinear feedback of nonlinear quadratic systems with quadratic Lyapunov function 67

Theorem 4. [12] Consider the quadratic system defined in (3-99a), the polytope in (3-102)and the estimated DOA in (3-101), then the feedback controller can be determined with thelargest possible estimated DOA within P by solving the following convex optimization problem:

minF0,F1,...,Fn,F ,L,Q,W,Z

trW (3-119a)

s.t.[W InIn Q

]≥ 0 (3-119b)

Q > 0 (3-119c)~aTi Q~ai ≤ 1, ∀i ∈ Z[1,p] (3-119d)[Φ(~v) + LΩ(~v) + ΩT(~v)LT ΓT(~v)

Γ(~v) −Q

]< 0, ∀~v ∈ vertP (3-119e)

The feedback controller is determined by:

~uk = F (~xk)Q−1~xk (3-120)

The corresponding estimation of the DOA is formed by (3-101) where P = Q−1.

The minimization over the trace of W is done in order to minimize the eigenvalues of Was the trace of a matrix is the sum of its eigenvalues. The first inequality constraint in thecontrol problem, which is (3-119b), is an LMI formed by applying the Schur complement tothe following inequality:

W ≥ Q−1 (3-121)

Combining this inequality with the objective function of the control problem, W will even-tually equalize Q−1 and the eigenvalues of Q−1 are as small as possible. This means thatQ−1 has the smallest maximum eigenvalue for which a stabilizing solution can be found forthe control problem. The advantage of small eigenvalues of Q−1, or P which is equal toQ−1, it that it maximizes the estimated DOA, because the radii of an ellipsoid is inverselyproportional to the square root of the eigenvalue of P .The third constraint in this control problem, which is given by (3-119d), ensures that theestimated DOA (D) is inside the polytope P [9]. This is essential for the validation of fourthconstraint in this control problem, namely (3-119e). This constraint states that if the inequal-ity in (3-118) is valid for every vertex of the polytope P then it is also valid for every statewithin D. This statement can be proven by dividing P into several n-dimensional simplicesand using barycentric coordinates to represent all the point inside P. Because the LMI in(3-119e) is affine in the state ~x, it can be concluded that if this LMI is valid for every vertexof P then it is valid for every point inside P. As D is inside P, this LMI is also valid for everypoint inside the estimated DOA.The final step in the determination of the controller is defining whether the states are insideX and the inputs inside U. In the control problem formulated in Theorem 4 already takesthe set X into account as P is a subset of X, but it does not consider the constraint on theinput. This is necessary for the design of the local controller for the systems considered inthis thesis, which is not possible with the method described in [12] only. Therefore, we have

Master of Science Thesis R. Koch

Page 88: Masters Thesis: Nonlinear control of electronic converters

68 Local controller and domain of attraction (DOA) of the power converter systems

to determine for which states ~xk the input ~uk from (3-120) is inside U. In the ideal scenario,an extra constraint is added to the control problem that takes the admissible set of inputsinto account. However, this extra constraint will be non-convex which will make the wholecontrol problem non-convex. Therefore, we do not have another choice than scaling D aftersolving the control problem. In order to scale D, we have to either approximate this set witha polytope or use the polytope P. In case we use the first option, the approximation is donein the same way as mentioned in the previous sections using (3-83) and scaling this set (P)such that D is completely inside P using (3-84) (P = γP).After constructing P or setting P = P, we can use the barycentric coordinates again to deter-mine every point inside P using the origin and the vertices of P. This results in the followingexpression for the control input:

F (~x)Q−1~x ∈ U, ∀~x ∈ P (3-122a)(F0 +

n∑i=1

n∑j=0

λj~v(i)j Fi +

(( n∑j=0

λj~vj)⊗ Im

)TF

(( n∑j=0

λj~vj)⊗ In

))Q−1

n∑j=0

λj~vj ∈ U

(3-122b)n∑j=0

λj = 1 (3-122c)

where ~v0 is the origin and ~v1, ...~vn are the vertices of P. Because of the distributive propertyof the kronecker product regarding gains, namely kA⊗ B = k(A⊗ B), and the fact that allλj ’s are scalars, we can write this equation as:

n∑j=0

λjF0Q−1~vj +

n∑j=0

n∑k=0

λjλk

n∑i=1

~v(1)j FiQ

−1~vk

+n∑j=0

n∑k=0

n∑l=0

λjλkλl(~vj ⊗ Im

)TF(~vk ⊗ In

)Q−1~vl ∈ U

(3-123a)

n∑j=0

n∑k=0

n∑l=0

λjλkλl

(F0Q

−1~vl +n∑i=1

~v(1)j FiQ

−1~vl +(~vj ⊗ Im

)TF(~vk ⊗ In

)Q−1~vl

)∈ U

(3-123b)

F0Q−1~vl +

n∑i=1

~v(1)j FiQ

−1~vl +(~vj ⊗ Im

)TF(~vk ⊗ In

)Q−1~vl ∈ U, ∀~vj , ~vk, ~vl ∈ vertP

(3-123c)

These equations are all equal because not only the sum of all λj is one but also the sum ofall λjλk and the sum of all λjλkλl equals 1. This leads to the following linear optimizationproblem which determines the largest estimated DOA belonging to the controller that satisfiesthe input constraint:

maxγ

γ (3-124a)

s.t. 0 ≤ γ ≤ 1 (3-124b)

γ

(F0Q

−1~vl +n∑i=1

~v(i)j FiQ

−1~vl +(~vj ⊗ Im

)TF(~vk ⊗ In

)Q−1~vl

)∈ U, ∀~vj , ~vk, ~vl ∈ vertP

(3-124c)

R. Koch Master of Science Thesis

Page 89: Masters Thesis: Nonlinear control of electronic converters

3-4 Nonlinear feedback of nonlinear quadratic systems with quadratic Lyapunov function 69

The resulting estimation of the DOA can be given as:

D = ~x ∈ Rn|~xTP~x ≤ γ (3-125)

3-4-2 Application: the buck-boost converter

The first application that we will consider is the buck-boost converter. The buck-boostconverter can be described by a bilinear model which can also be written in the form of (3-99a). The description of the model is dependent on the position of the equilibrium point whichmeans that it will be different in the case of the buck-boost converter in buck mode (Vo = 10V) and the buck-boost converter in boost mode (Vo = 40 V). The matrices correspondingby these systems are given in Appendix A-1-4. Using the description of these systems inthe form of (3-99a), we can apply the controller elaborated in this section. This approach isdifferent than in the previous sections as there is no initialization needed and there is alsonot an algorithm that we have to apply. Only two optimization problem have to be solved inorder to find the controller which are given in (3-119) and (3-124). The only requirement isthat we have to present a polytope P that limits the size of the DOA determined using thisapproach. As no iteration of this set is needed, we can just use the state space to representP. The result of solving the optimization problem in Theorem 4 for the buck-boost converterin buck mode is given in Figure 3-13a. We can see that the estimated DOA determined inthis control problem has its maximum size in the direction of the inductor current (~x(1)) as ittouches the boundary of the state space. However, this estimated DOA does not necessarilysatisfy the constraints on the input variable of the buck-boost converter. Hence, we also haveto apply the optimization problem in (3-124) in order to ensure that the estimated DOAsatisfies the input constraints. This is done using a different polytope that P, because theshape of P is not in the same proportion as the ellipse that represents the estimated DOA.The new polytope (P) is bounded by the radii of the ellipse and can be described by thefollowing equation in case of the buck-boost converter in buck mode:

P = ~x ∈ R2|~aTP,i~x ≤ 1, ∀i ∈ Z[1,p] (3-126a)

AP =[

0 0 5.2117 −5.21170.1303 −0.1303 0 0

](3-126b)

where ~aP,i is represented by the ith column of AP. The resulting value of γ after solvingthe optimization problem in (3-124) applied to this system equals one, which means that thesolution obtained after solving the optimization problem in (3-119) already satisfies the inputconstraints. The resulting matrices representing the estimated DOA from (3-101) and the

Master of Science Thesis R. Koch

Page 90: Masters Thesis: Nonlinear control of electronic converters

70 Local controller and domain of attraction (DOA) of the power converter systems

construction of the feedback controller (see (3-100) and (3-106)) are given by:

F0 =[−0.0235 1.3204

](3-127a)

F1 =[2.7228 · 10−4 9.907 · 10−3

](3-127b)

F2 =[3.3795 · 10−4 −3.508 · 10−2

](3-127c)

F =[8.0039 · 10−5 8.1832 · 10−3 −2.7708 · 10−5 −1.3677 · 10−5

2.6697 · 10−5 −2.5387 · 10−4 3.2854 · 10−7 4.1004 · 10−4

](3-127d)

P =[27.1621 0.00020.0002 0.017

](3-127e)

where P is indeed positive definite.We have also applied this method to the buck-boost converter in boost mode. This results

(a) Converter in buck mode (Vo = 10V) (b) Converter in boost mode (Vo = 40V)

Figure 3-13: Resulting estimated DOA and P after applying the method described in this sectionfor the buck-boost converter.

in the estimated DOA as described in Figure 3-13b. In this case, the value of γ obtainedby solving (3-124) is equal to 0.8627 which is smaller than one. This means that afterwe have corrected the obtained DOA from the optimization problem in Theorem 4 suchthat it satisfies the input constraints, the new DOA is smaller than before this correction.The resulting matrices corresponding to the controller and estimated DOA can be found inAppendix A-1-5.

3-4-3 Application: the three-phase VSI

This method can also be applied to the model of the three-phase VSI connected to a PMSMas this is a quadratic model. First, also this model has to be written in the form of (3-99a)from which the results are given in Appendix A-1-6. Thereafter, we can solve the optimizationproblems in (3-119) and (3-124) in order to find the feedback controller and the correspondingestimation of the DOA that satisfies the state and input constraints. The result is given inFigure 3-14. In contrast to the example of the buck-boost converter, the value of γ from the

R. Koch Master of Science Thesis

Page 91: Masters Thesis: Nonlinear control of electronic converters

3-5 Comparison of different methods to determine the local controller 71

result of the optimization problem in (3-124) is 0.3729. This is lower than one, which meansthat the obtained DOA from the optimization problem in (3-119) must be decreased suchthat it is only 14% of its volume before scaling. The resulting DOA of this controller is givenby:

D = ~x ∈ R3|~xTP~x ≤ 1 (3-128a)

P =

3.5821 · 10−4 −2.2839 · 10−5 −9.9694 · 10−7

−2.2839 · 10−5 8.0654 · 10−3 −6.1748 · 10−6

−9.9694 · 10−7 −6.1748 · 10−6 7.1932 · 10−2

(3-128b)

The feedback controller as described by (3-106) is given in Appendix A-1-7.

(a) After solving the control problem in (3-119) (b) After solving the optimization problem in (3-124)

Figure 3-14: Resulting estimated DOA after applying the method described in this section forthe three-phase VSI connected to a PMSM.

3-5 Comparison of different methods to determine the local con-troller

In this section, we will compare the different methods described in this chapter and decidewhich one is the most suited for the two power converters. The most important point whichwill be used to compare these methods are the size of the estimated DOA and the time re-quired to determine the feedback controller with corresponding DOA. A larger DOA makesit easier to find an initial sequence for the SD-NMPC algorithm as will be explained in thenext chapter. So this is obviously the most important consideration by the choice of thebest suited method. Besides this, we also want to obtain the solution using the least amountof computations possible. Therefore, the computational time is an important factor in thiscomparison.The first converter covered in this thesis is the buck-boost converter. All the methods de-scribed in this chapter have been applied to the buck-boost converter in two different modes,the buck mode and the boost mode. Therefore, we will also make the comparison in thesetwo modes. The two most important parameters are plotted in the bar graphs shown in

Master of Science Thesis R. Koch

Page 92: Masters Thesis: Nonlinear control of electronic converters

72 Local controller and domain of attraction (DOA) of the power converter systems

Figure 3-15 for all the methods. These values are not absolute but relative to the largest oneamong the different methods, which in case of the buck-boost converter is the size of the DOAand the computational time from the method using a linear Lyapunov function (Section 3-2).The obtained DOA has by far the largest area of the four methods. So, focussing only on thesize of the DOA, the method using a linear Lyapunov function is the best among all of these.However, the computational time is also larger than that of the other methods. This is due tothe large number of iterations of its algorithm. On the other hand, the method determiningthe nonlinear controller (Section 3-4) is around 10 times faster than this method, but thedisadvantage of this method is that the obtained DOA is about 2 times smaller than the oneusing the linear Lyapunov function when the converter is in buck mode and 5 times smallerwhen the converter is in boost mode. The method described in Section 3-3 is comparablewith this method when the converter is in boost mode but shows worse performance thanthis method in buck mode. The sampling based method does not excel based on one of thesetwo characteristics. As we still do not know the effect of the size of the DOA on the com-putational time of the initial sequence in the next chapter, we cannot conclude which of thetwo methods suits better in determining a local controller with corresponding DOA for theimplementation of the SD-NMPC controller of the buck-boost converter. We will eventuallygive this conclusion in Chapter 4 as we then know how long it will take to determine theinitial sequence.The second converter that we cover in this thesis is the three-phase VSI connected to a

PMSM. As this system is different than the buck-boost converter, it has for example onemore state and input than the buck-boost converter, the comparison will result in a differentconclusion compared with the buck-boost converter. The four different methods are shown inFigure 3-16. We see that also here, the method using a linear Lyapunov function will result inthe largest DOA out of all these methods even though the algorithm has not finished due tothe large computational time. The computational time is even so large, also compared withthe other methods, that this method is actually not an option anymore for the SD-NMPCcontroller. The only other method that results in a relatively large DOA is the method usinga quadratic Lyapunov function to determine a linear controller for the system (Section 3-3).It is not only the method that results in the largest DOA but it is also the method whichsolves the local control problem in the shortest time. Therefore, we will choose this methodin the design of the application of the SD-NMPC controller for the three-phase inverter.

3-6 Summary

In this chapter we have described the first step in the design of the SD-NMPC controllerfor the buck-boost converter and the three-phase VSI controlling a PMSM described in theprevious chapter. This first step involves the determination of a local stabilizing controllerwith corresponding DOA. This is not trivial as the models of the converters covered in thisthesis are nonlinear. Four different methods are described in this chapter in order to deter-mine a controller and corresponding DOA for these nonlinear systems. In the first methodwe designed a linear quadratic controller based on the linearization of the nonlinear system.Random sampling of the proposed DOA is performed in order to determine whether all pointsinside this region satisfy Lyapunov’s criteria using the quadratic Lyapunov function corre-sponding to the LQ controller for the nonlinear system. The main advantage of this methodis that it will work for any kind of system as it consists of only straightforward mathematical

R. Koch Master of Science Thesis

Page 93: Masters Thesis: Nonlinear control of electronic converters

3-6 Summary 73

lin. Lyap. quad. Lyap., lin. contr. quad. Lyap., nonlin. contr. random sampling0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1re

lative

va

lue

srelative volume

relative time

(a) Converter in buck mode (Vo = 10 V)

lin. Lyap. quad. Lyap., lin. contr. quad. Lyap., nonlin. contr. random sampling0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

rela

tive

va

lue

s

relative volume

relative time

(b) Converter in boost mode (Vo = 40 V)

Figure 3-15: Comparing the methods described in this chapter based on the size of the DOAand the required computational time for the buck-boost converter.

computations and it does not include optimization problems. The disadvantage is that theobtained DOA cannot be fully guaranteed to be a valid DOA of the system.In the second method we have designed a linear controller and its corresponding DOA basedon a linear Lyapunov function. This method can be applied to our nonlinear systems becauseof their special form, which is the quadratic form. The advantage of this method is thatthe control problem that is constructed is linear which is usually easily and quickly solvable.Moreover, this method will usually result in a large DOA, because the controller is determined

Master of Science Thesis R. Koch

Page 94: Masters Thesis: Nonlinear control of electronic converters

74 Local controller and domain of attraction (DOA) of the power converter systems

lin. Lyap. quad. Lyap., lin. contr. quad. Lyap., nonlin. contr. random sampling0

0.2

0.4

0.6

0.8

1

1.2re

lative

va

lue

s

relative volume

relative time

Figure 3-16: Comparing the methods described in this chapter based on the size of the DOAand the required computational time for the three-phase VSI connected to a PMSM.

based on a given (proposed) DOA and not the other way around. The main disadvantageof this method is that the computational time is usually high due to the large number ofoptimization problem that are needed to be solved.The third and the fourth method described in this chapter uses a quadratic Lyapunov func-tion to determine a controller and corresponding DOA of the nonlinear system described inChapter 2. Also these methods are specifically used for quadratic system. The third methoddetermines a linear controller based on a given shape of the DOA. Thereafter, only the size ofthis set might change in order to ensure that it is asymptotically stable which is required fora DOA. The advantage of this third method is that it is faster than the second method andthe main disadvantage is that the obtained DOA might be small due to the lack of freedom inthe shape of the DOA. The fourth method has more freedom in the shape of the DOA as thecontroller and DOA are determined at the same time (within the same optimization prob-lem). However, the obtained feedback controller is nonlinear which means that satisfying theinput constraints leads to a non-convex optimization problem. Therefore, the obtained DOAis scaled after the controller has been determined in order to satisfy the input constraints.This might lead to a much smaller DOA as we have seen for the three-phase VSI controllinga PMSM. After applying all of these methods to the systems described in Chapter 2, we haveconcluded that the first method and the fourth method are suiting the best for the systemof the buck-boost converter and the third method shows the best performance for the three-phase VSI with a PMSM as load. These conclusions are mainly based on two main criteria,the size of the obtained DOA and the computational time needed to determine the controllerand corresponding DOA.In the next chapter, we will perform the second step of the SD-NMPC algorithm. This stepinvolves the determination of an initial control sequence that steers the state of the systemfrom its initial state into the DOA of the local controller which we have determined in thischapter.

R. Koch Master of Science Thesis

Page 95: Masters Thesis: Nonlinear control of electronic converters

Chapter 4

Initial control sequence

In the previous chapter, a local controller has been designed with a corresponding domainof attraction (DOA) that is a subset of the state space. This means that if the initial stateof a system is within this DOA, the local controller will steer this system to the equilibriumpoint. However, in most cases, the initial state is not in the DOA. In these cases, the localcontroller cannot steer the system into the equilibrium point or, at least, we cannot guaranteethat the system will go to this equilibrium point. In order to solve this problem, we have tofind a sequence of control inputs that will steer the system from its initial state into the DOAof the local controller designed in the previous chapter. This initial control sequence has tobe found such that it satisfies the following constraints:

~xi ∈ X, ∀i ∈ Z[1,N ] (4-1a)~xN ∈ D (4-1b)~ui ∈ U, ∀i ∈ Z[0,N−1] (4-1c)

where ~xi represents the ith state of the system and ~ui the ith input of the system. In total,there are N control steps needed to enter the DOA of the local controller. Although theseconstraints seem very straightforward, in reality this is not the case. That is because thesystem of the power converters covered in this thesis, the buck-boost converter and the three-phase voltage source inverter (VSI), are quadratic and, therefore, not linear. This will resultin inequality constraints of multiplications of multiple ~uis. It does not only make theseconstraints nonlinear but also non-convex. In this chapter, we will propose three methods todeal with this issue and solve the feasibility problem of (4-1) which are all based on modelpredictive control (MPC). The first methods is a nonlinear optimization method, sequentialquadratic programming (SQP). This method uses an iterative quadratic approximation ofthe optimization problem in order to solve this non-convex feasibility problem. The secondmethod is approximating the model of the system as a linear model and compute the controlinputs iteratively as a linear optimization problem. The third and last method covered in thischapter is using linear parameter varying MPC (LPV-MPC) to solve this non-convex problem.Finally, we will conclude this chapter with a comparison between these three methods wherebywe will decide which is the most suitable for the buck-boost converter and the three-phaseVSI connected to a permanent-magnet synchronous motor (PMSM).

Master of Science Thesis R. Koch

Page 96: Masters Thesis: Nonlinear control of electronic converters

76 Initial control sequence

4-1 Sequential quadratic programming

The most used method to solve constrained nonlinear programming problems is SQP as itcan be applied to any type of nonlinear programming problem and it is relatively fast. Theform of the programming problem that can be solved using SQP is given by the followingequation:

min~x

f(~x) (4-2a)

s.t. ~g(~x) ≤ 0p (4-2b)~h(~x) = 0q (4-2c)

where ~h(~x) describes the equality constraints and ~g(~x) the inequality constraints. SQP is aniterative procedure that computes a local minimum based on an initial warm sequence. Themain advantage of SQP is that the warm sequence does not have to satisfy the constraints ofthe programming problem. Also, the intermediate solutions, during the iterative procedure,do not have to satisfy these constraints. However, this advantage also shows a major disad-vantage. As the initial sequence does not necessarily satisfies the constraints, so can the localminimum. This means that the SQP algorithm might be unsolvable based on the choice ofthe initial sequence. Moreover, the found local minimum is not guaranteed to be the globalminimum of the optimization problem. This last point is not very important in the case ofsampling-driven nonlinear MPC (SD-NMPC), but the first one is. The whole idea is that acontrol sequence is found that satisfies (4-1). This is not guaranteed when using SQP withonly one initial control sequence. Therefore, we will use multiple control sequences in orderto solve the non-convex constrained problem in (4-1) whenever necessary.

4-1-1 Nonlinear control problem

First, we have to define the nonlinear programming problem that needs to be solved usingSQP. This nonlinear control problem must be based on the constrained problem in (4-1).We cannot just use this problem as the nonlinear optimization problem because the lengthof the control sequence (N) is unknown in beforehand. There are two ways to overcome thisproblem. The first method involves increasing the value of N until a solution is found forthe programming problem in (4-1). Using this approach, it is useful to have an idea of howlong the initial control sequence should be in order to minimize the number of programmingproblems that needs to be solved using SQP. In this case the nonlinear programming prob-lem in (4-2) does not include an objective function f(~x) which makes it a feasibility probleminstead of an optimization problem. The inequality constraints of this programming problem(~g(~x)) will consist of the constraints mentioned in (4-1) and there are no equality constraints.Furthermore, note that the system states of this control sequence are not part of the opti-mization variable. Only the control inputs are used to find a solution of the programmingproblem. We will not implement this method for the cases of the power converters. First ofall, the control sequence is relatively long. It might be in the order of hundreds of steps forthe buck-boost converter and even in much larger order for the three-phase inverter. Thismakes the feasibility problem very complicated which will directly have a negative impacton the computational time. Moreover, the initial control sequence needed to solve the SQP

R. Koch Master of Science Thesis

Page 97: Masters Thesis: Nonlinear control of electronic converters

4-1 Sequential quadratic programming 77

problem might result in a local optimum that is not feasible. Based on this result, we cannotconclude whether it is based on the fact that we have chosen the wrong initial sequence ofcontrol inputs or the control horizon is not long enough. This might eventually result in asolution with a control horizon that is much too long and it has taken too much time to findthis result.Instead, we will focus on the second method. The second method involves solving a controlproblem with a fixed horizon (Nc). This method includes the objective function which isconstructed such that the states of the system will be steered towards the DOA of the localcontroller. It does not mean that the system must be inside this DOA after Nc steps, butafter repetitive executions of the programming problem, the states of the system will enter theDOA. At every execution the current state is set as the last state of the previous executionof the programming problem using SQP. The advantage of this method is that there is noneed to guess the size of N and the size of a single optimization problem is fixed which meansthat the solving time is in general not increasing. Moreover, the result found might alreadybe very close to the optimal control action of the system as it follows from an optimizationproblem.

4-1-2 Operation of SQP

As mentioned before, SQP uses an approximation of the nonlinear programming problem in(4-2) in order to find a local optimum. The approximation is not made from the objectivefunction but the Lagrangian of the optimization problem which is given by the followingequation:

L(~x,~λ, ~µ) = f(~x) + ~λT~g(~x) + ~µT~h(~x) (4-3)

where ~λ and ~µ are the Lagrangian parameters. The approximation of this equation is per-formed using the Taylor series expansion until the second order which makes it a quadraticapproximation. The approximation is done around a certain operating point which is cho-sen based on an initial guess or the previous iteration. The quadratic approximation of theLagrangian is mathematically shown by the following expression:

L(~xk, ~λk, ~µk) = L(~xk, ~λk, ~µk) + ∇L(~xk, ~λk, ~µk)~dk + 12~dTk HL(~xk, ~λk, ~µk)~dk (4-4)

where HL is the Hessian of the Lagrangian with respect to its variables and ~dk is the dif-ference between the operating point of the Taylor estimation and a value in the direction ofthe local minimum. Besides the objective function, also the nonlinear constraints need tobe approximated. This is done by a first order Taylor series expansion as that makes theprogramming problem quadratic. The result of this quadratic programming problem is givenby:

min~dk

L(~xk, ~λk, ~µk) (4-5a)

s.t. ~g(~xk) + ∇~g(~xk)T~dk ≤ 0p (4-5b)~h(~xk) + ∇~h(~xk)T~dk = 0q (4-5c)

Master of Science Thesis R. Koch

Page 98: Masters Thesis: Nonlinear control of electronic converters

78 Initial control sequence

The solution of this quadratic programming problem is the direction in which the variablesof the Lagrangian are needed to be updated. The new operating points (i.e. ~xk+1, ~λk+1 and~µk+1) are computed using a line optimization in the direction of ~dk. This new operating pointis used in the next iteration of the quadratic programming problem. This process continuesuntil the local minimum is found which means that ~dk is zero or at least very close to zero.Note that the constraint will also be moved into the direction of a feasible solution. This isdone by choosing an appropriate function for the line optimization such as a penalty function.

4-1-3 Application: the buck-boost converter

The first application covered in this thesis is the buck-boost converter. The buck-boostconverter operates in two different modes, the buck mode and the boost mode. In buckmode, we will use the reference output voltage of 10 V and in boost mode, the referencevoltage is set at 40 V. The initial state of these converters can be any state within the statespace. In both cases, we will use vo = 0 V and iL = 0 A as that is the most obviouswhen starting the converter. This leads to the following expression of the initial state aftertranslating the system such that the equilibrium point is placed in the origin:

~x0 = −~xe (4-6)

where ~xe is the equilibrium point of the untranslated system.We have chosen to use the 2-norm in order to construct the objective function. This meansthat the objective function is quadratic with respect to the states of the system. Mathemat-ically, the objective function is given by:

f(uk, uk+1, ..., uk+Nc−1) =Nc−1∑i=0

~xTk+1+iQ~xk+1+i +Ru2k+i (4-7)

where Q and R are the weighting matrices on the states and inputs respectively. Theseweighting matrices are given by:

Q =[1 00 1

], R = 0.1 (4-8)

The reason for the lower weight on the input of the system is because it is not relevant inorder to reach the DOA of the local controller which is the main focus of the design of thiscontrol problem. The length of the control horizon (Nc) is set at 5 in order to minimize thenumber of variables of the control problem which makes the control problem simpler. At thesame time, a lower control horizon results in more control problems that are needed to besolved in order to reach the DOA.In Figure 4-1, we have plotted the evolution of the states of the system using the nonlinearcontrol problem solved with SQP until the states reach the DOA of two local controllersdetermined in Chapter 3. In all the plots, the DOA is reached after a final number of stepswhich is not surprising since the MPC problem is stabilizing as long as the control problemis solvable. This is always the case for the buck-boost converter. Obviously, the DOA isreached faster when the equilibrium point is closer to the initial state which makes the initialstate corresponding to the system operating in buck mode faster than the system operating

R. Koch Master of Science Thesis

Page 99: Masters Thesis: Nonlinear control of electronic converters

4-1 Sequential quadratic programming 79

(a) Converter in buck mode (DOA as defined inSection 3-2)

(b) Converter in boost mode (DOA as defined inSection 3-2)

(c) Converter in buck mode (DOA as defined inSection 3-4)

(d) Converter in boost mode (DOA as defined inSection 3-4)

Figure 4-1: Plot of the states of the buck-boost converter in two modes (two different equilibriumpoints) using two different methods to determine the DOA as derived in Chapter 3.

in boost mode. Besides that we also see that the initial sequence is shorter when the DOA isbigger. In particular in the case of the buck-boost converter it is much quicker because therange of the inductor current of the larger DOA is larger. The equilibrium is reached quickerwhen the current is larger, because a larger inductor current will cause a larger slope of theoutput voltage. This is the reason why the inductor current is not directly moving towards itsequilibrium point but it will first increase to a large value (sometimes even its maximum value)before its is moving towards its equilibrium point. The only exception is the initial sequencein Figure 4-1d where the inductor current is switching between its maximum value (or atleast very close to the maximum) and a current closer to the equilibrium value. The cause ofthis behavior is obviously the control of the input of the system (the switch of the buck-boostconverter) shown in Figure 4-2b which is switching between its minimum and maximum value.Besides the fact that the equilibrium is reached faster when the inductor current is larger,this result is not a global optimum of the control problem but a local optimum. This meansthat the found control sequence does not necessarily have to be optimal.Note that the shape of the DOA does not influence the control inputs of the initial sequence,but only the size of the sequence as the control problem is not dependent on the local DOA. So,

Master of Science Thesis R. Koch

Page 100: Masters Thesis: Nonlinear control of electronic converters

80 Initial control sequence

the control inputs shown in Figure 4-2a are valid for both systems in buck mode (Figure 4-1aand Figure 4-1c) and the control inputs shown in Figure 4-2b for both systems in boost mode(Figure 4-1b and Figure 4-1d). Note that these control inputs are based on the translatedsystem (with the origin as equilibrium point) and not the real system. In order to derivethe control inputs of the real system, we have to add the real equilibrium value (ue) to thesecontrol inputs.

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8

time [s] 10-4

-0.4

-0.2

0

0.2

0.4

0.6

0.8

u

(a) Converter in buck mode

0 1 2 3 4 5 6 7 8 9

time [s] 10-4

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

u

(b) Converter in boost mode

Figure 4-2: Control input of the initial sequence of the buck-boost converter in two differentmodes (two different equilibrium points).

4-1-4 Application: the three-phase VSI

The second application covered in this thesis is the three-phase VSI connected to a PMSM.This system has 3 states and 2 inputs which is more than the buck-boost converter. Thismakes three-phase VSI more complicated and, therefore, computationally heavier. Also, weknow that the motor will not reach the target speed after only a few steps as that would resultin a very large acceleration. The initial state of this system is chosen to be 0 (the origin of theuntranslated system) which is the situation where the motor is not rotating and no currentis flowing through the stator windings. The form of the objective function is comparable tothe one used for the buck-boost converter which means that it is also quadratic with respectto the states. Only the size of the states and inputs, and therefore the size of the weightingmatrices, differ from the one in (4-7). These weighting matrices are given by:

Q =

1 0 00 1 00 0 10

, R =[0.1 00 0.1

](4-9)

The same reason applies here for the lower weights on the inputs of the system as for thebuck-boost converter. Besides that, the larger weight on the rotational frequency of thissystem is chosen because of the fact that this is the slowest state of the system. With ahigher weight, we try to minimize the amount of control steps (N) needed to enter the DOAof the local controller. The choice for the control horizon (Nc) is set at 5 which is the sameas for the buck-boost converter.

R. Koch Master of Science Thesis

Page 101: Masters Thesis: Nonlinear control of electronic converters

4-2 Successive linearization 81

The resulting initial sequence is plotted in Figure 4-3. It can be seen that this sequence isindeed much longer than the initial sequences of the buck-boost converter. This will definitelyinfluence the computational time of the SD-NMPC controller in the next chapter as thenumber of control steps determined at each iteration of the SD-NMPC algorithm has to be ofsuch size that the DOA of the local controller is entered at the end of the sequence. The longhorizon can be explained by the time needed to approach the final speed in order to enter thelocal DOA of the system, because the rotor velocity is by far the slowest state of this system.Contrariwise, the currents through the stator windings are already close to their equilibriumvalues after only a few iterations.

(a) State evolution of the system

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4

time [s]

-50

-40

-30

-20

-10

0

10

u(1)

u(2)

(b) Control inputs of the system

Figure 4-3: Initial sequence of the three-phase VSI connected to a PMSM computed using SQP.

4-2 Successive linearization

The second method that we will elaborate is the use of successive linearization in order to findan initial sequence. This method has been introduced in [15], [25] and [29] among others andit has already been implemented in applications in the field of chemical reactors and robotics.Now, we are going to find out whether it can be implemented for power converters. We willdo this using two different approaches. The first approach only uses the linearized model ofthe converter at the current time step and determines the future control inputs based on thislinearized model. This implementation is the easiest out of the two as only linear optimizationis used. The second approach is based on the linearization of the nonlinear model at everytime step in the control horizon based on either its current state (first step in the horizon) ora state that it might enter (all the other states in the horizon). For this second approach wehave to find an initial sequence of states of the control horizon that is a (local) solution tothe optimization problem using the nonlinear model of the system. This means that the firststep will be executed using SQP which has been elaborated in the previous section.

4-2-1 Successive linearization based on the current state only

The first approach that we will elaborate is the one that uses only one linearization of thenonlinear model at every time step of the system in the control horizon. The linearization of

Master of Science Thesis R. Koch

Page 102: Masters Thesis: Nonlinear control of electronic converters

82 Initial control sequence

the model is performed with respect to the current state of the system. This is mathematicallydescribed by the following equations:

~xk+1 = A~xk + B~uk (4-10a)

A =[∂ ~f(~x, ~u)∂~x

]~x=~xk,~u=~uk−1

(4-10b)

B =[∂ ~f(~x, ~u)∂~u

]~x=~xk,~u=~uk−1

(4-10c)

Note that the matrices A and B are dependent on the previous control input. In case theprevious input is not given, which means that ~xk is the initial state of the system, we needto guess its value. For the system covered in this thesis, this would not be an issue as we willshow later in this section.After we have derived the linearized model, we have to solve the control problem of thesystem. But before we can solve this problem, we have to define its objective function. Thisobjective function must be linear in order to make the optimization problem linear. Thereason why we want a linear optimization problem is that it will make it easier and faster tosolve than other convex optimization problems such as a quadratic problem. The objectivefunction is constructed such that the states are steered towards the equilibrium (the origin)of the system. This results in the following expression of the objective function:

f(~uk, ..., ~uk+Nc−1) =Nc−1∑i=0‖Q~xk+1+i‖1 (4-11)

where Nc is the control horizon of the control problem and Q the weighting matrix on thestates of the system. We have chosen not to include terms on the control input of the systemalthough these will also be steered towards an equilibrium. The reason is that it is not neededto find the initial sequence as it is not represented in the construction of the DOA of the localcontroller. We have also chosen to use the 1-norm for constructing the objective function. Thereason for this is that it will make the following optimization problem linear. Besides that,it also ensures that every state of the system has a certain contribution to the optimizationproblem which is not the case when the infinity norm is used instead. The constraints of thiscontrol problem are the same as in (4-1) as the initial sequence has to satisfy these conditions.Note that the control horizon is usually much lower than N from (4-1). This means that thefinal state in the control horizon does not necessarily have to be inside D. Instead, we willcontinue solving this control problem for multiple consecutive states until we enter a statethat is inside D. The mathematical description of this control problem is given by:

min~uk,...,~uk+Nc−1

Nc−1∑i=0‖Q~xk+1+i‖1 (4-12a)

s.t. ~xk+1+i = A~xk+i + B~uk+i, ∀i ∈ Z[1,Nc] (4-12b)~xk+1, ..., ~xk+Nc ∈ X (4-12c)~uk, ..., ~uk+Nc−1 ∈ U (4-12d)

R. Koch Master of Science Thesis

Page 103: Masters Thesis: Nonlinear control of electronic converters

4-2 Successive linearization 83

4-2-2 Successive linearization based on a sequence of states and inputs

The second approach uses a sequence of states and inputs for the linearization of the system.At every state of the control horizon, the linearized model is derived around this estimatedstate of the system. This is described by the following equation:

~xk+1+i = Ai~xk+i + Bi~uk+i, i ∈ Z[0,Nc−1] (4-13a)

Ai =[∂ ~f(~x, ~u)∂~x

]~x=~xk+i,~u=~uk−1+i

(4-13b)

Bi =[∂ ~f(~x, ~u)∂~u

]~x=~xk+i,~u=~uk−1+i

(4-13c)

where ~xk+i and ~uk−1+i are the estimated states and control inputs after the kth iteration ofthe controller. The estimations are obtained based on the previous solutions of the controlproblem. Namely, the control problem does not only give the next control input of thesystem but the firstNc consecutive control inputs (~uk, ~uk+1, ..., ~uk+Nc−1). These control inputsform the estimated control inputs for the linearization of the system in the next iteration.Also, these control inputs will be used to determine the corresponding state estimates usingthe nonlinear model which will be used to linearize the system in the next iteration. Thisprocedure will work for every iteration except the first one. In the first iteration, we donot have a sequence of estimated control inputs. Therefore, we have to solve the nonlinearoptimization problem defined in (4-2) using SQP for the first iteration. This takes more timeto solve than a linear programming problem, but it is only for the first iteration which is stillmuch less than every iteration as done in the previous section. Alternatively, we can also solvethe first iteration using the first approach (without an estimated control input sequence).The formulation of the control problem is pretty much equal to the one defined in (4-12)except for the fact that the system matrices are different for every step in the control horizon.

4-2-3 Application: the buck-boost converter

The first application is the buck-boost converter in buck mode (Vo = 10 V). In previouschapters, we have seen that the buck-boost converter is linear with respect to the input of thesystem and linear with respect to the state of the system. The only nonlinear term in thissystem is the multiplication of the state and the input. The expression of the bilinear modelis described by:

~x+ = A0~x+ (B0 +B(~x))u (4-14)

Note that the input of this bilinear model is a scalar, which is specifically the case for thebuck-boost converter (see Chapter 2). The form of the bilinear model makes it unnecessaryto linearize the model using the method described in (4-10) and (4-13). Instead, we canlinearize this model by filling in the current state of the system in the nonlinear term (B(~x))using the first method of successive linearization or by filling in the estimated states in thisnonlinear term using the second method. In these cases, knowledge of the previous controlinput or estimations of the control input are not necessary as the linearization is independent

Master of Science Thesis R. Koch

Page 104: Masters Thesis: Nonlinear control of electronic converters

84 Initial control sequence

on these control input predictions. Still, the linearization is a valid estimation of the behaviorof the system. We will apply both methods of successive linearization to the system of thebuck-boost converter in buck mode for a horizon of 5. The weighting matrix Q of the controlproblem in (4-12) is equal to the identity matrix which means that the weight on both statesis equal. The results are shown in Figure 4-4. We can see from these results that successive

(a) Using only the current state and the estimationDOA determined in Section 3-2

(b) Using only the current state and the estimationDOA determined in Section 3-4

(c) Using an estimation of the successive states andthe estimation DOA determined in Section 3-2

(d) Using an estimation of the successive states andthe estimation DOA determined in Section 3-4

Figure 4-4: Plot of the states of the buck-boost converter in buck mode using the two differentmethods of successive linearization. Two different methods to determine the DOA are used asderived in Chapter 3.

linearization of the buck-boost converter results in both approaches to an initial sequencethat satisfies the constraints set in (4-1) as the states of this system will eventually reachthe DOA of the local controller. The difference between these two approaches is the lengthof the sequence needed to reach the DOA. From these figures, we can conclude that thesecond approach leads to a faster system than the first approach which means that the initialsequence is shorter. However, if we look at the same buck-boost converter in boost mode(Vo = 40 V) in Figure 4-5, the length of the initial sequence is equal (55). So, the reason thatthe first approach is faster in case of the buck-boost converter in buck mode is not the resultof the more realistic approach of successive linearization, but the result of finding a localsolution to the first iteration of the control problem using SQP from the previous section.

R. Koch Master of Science Thesis

Page 105: Masters Thesis: Nonlinear control of electronic converters

4-2 Successive linearization 85

Therefore, when the system is large, or DOA is further away from the initial state, the secondapproach is not beneficial as it will only take more time to solve the control problem.The control inputs are plotted in Figure 4-6. These plots show that, besides the first couple

(a) Based on only the current state(b) Based on the estimation of the states within thehorizon

Figure 4-5: Initial sequence of the buck-boost converter in boost mode using two approaches ofsuccessive linearization. The DOA of the local controller is determined as in Section 3-4

of control inputs, the control input is slightly changing in time which validates the large sizeof the initial sequence. The main advantage of such a small deviation is that the linearizationof the model is a better approximation of the real system as the states (and control input) ofthe horizon are closer to the current state.

0 0.5 1 1.5 2 2.5 3 3.5

time [s] 10-4

-0.32

-0.3

-0.28

-0.26

-0.24

-0.22

-0.2

-0.18

-0.16

-0.14

u

(a) The buck-boost converter in buck mode

0 0.2 0.4 0.6 0.8 1 1.2 1.4

time [s] 10-3

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

u

(b) The buck-boost converter in boost mode

Figure 4-6: Initial control sequence of the buck-boost converter for two modes. The DOAof the local controller is determined as in Section 3-4 and the first approach of the successivelinearization control problem is used.

4-2-4 Application: the three-phase VSI

The second application is the three-phase VSI connected to a PMSM. This system has 3 statesand 2 inputs which makes it somewhat more complicated than the buck-boost converter.

Master of Science Thesis R. Koch

Page 106: Masters Thesis: Nonlinear control of electronic converters

86 Initial control sequence

The successive linearization controller is applied to this system with a horizon of 5 and theweighting matrix Q is given by:

Q =

1 0 00 1 00 0 10

(4-15)

The weight on the rotational speed is set larger than the weight on the other states (whichrepresent the stator current), because the behavior of the rotational speed is much slowerthan that of the stator currents due to the dynamics of the system. Moreover, this is thesame weight as we used for the determination of the initial sequence using SQP.The resulting initial sequence is plotted in Figure 4-7 for the two different approaches of

(a) Based on only the current state of the systemin the control problem

(b) Based on a estimation of the successive statesin the control horizon

Figure 4-7: State evolution of the initial control sequence of the VSI connected to a PMSM loadusing two approaches of the successive linearization control method.

the successive linearization control problem. We can see from these plots that indeed thedifferent approaches do not have much influence on the size of the initial sequence which wehave already concluded in the example of the buck-boost converter. Therefore, it is better touse the first approach, which is only dependent on the current state, as this approach doesnot include one iteration of a nonlinear control problem. Furthermore, we see that the statorcurrent on the q-axis (state ~x(2)) reaches its equilibrium point after only one control step.This is not surprising as it will directly minimize the objective function of this system. Notethat this huge step in the stator current is caused by a finite step in the input voltage shownin Figure 4-8 which is within the limits set on the input. The reason why such a large stepin the stator current is possible is due to the relatively low sampling frequency comparedwith the buck-boost converter. If we would have chosen to increase the sampling frequency,such that it is in the same order of magnitude as the sampling frequency of the buck-boostconverter, such a large step would not be possible as it would require a very large voltagewhich would not satisfy the constraints on the input of the inverter.After this large step, the states of this system, or actually only the third state, are slowly

moving towards the DOA of the local controller. This is confirmed with the inputs of thesystem which are also slowly changing in the direction of the equilibrium. The main reasonthat also this system is guaranteed to be stabilizing is that it is stable by itself, just like

R. Koch Master of Science Thesis

Page 107: Masters Thesis: Nonlinear control of electronic converters

4-3 Linear parameter varying MPC 87

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45

time [s]

-50

-40

-30

-20

-10

0

10

u(1)

u(2)

(a) Based on only the current state of the systemin the control problem

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45

time [s]

-50

-40

-30

-20

-10

0

10

20

u(1)

u(2)

(b) Based on a estimation of the successive statesin the control horizon

Figure 4-8: Initial control sequence of the VSI connected to a PMSM load using two approachesof the successive linearization control method corresponding to the state evolution in Figure 4-7.

the buck-boost converter. The only reason why we need a controller is to ensure that it isapproaching the equilibrium point (asymptotically stability).

4-3 Linear parameter varying MPC

The third method to find an initial sequence for the SD-NMPC controller in this thesis isLPV-MPC. The use of LPV-MPC has grown over the past decade in the design of MPCcontrollers for complex dynamical systems. Numerous papers have been written about MPCfor LPV systems, like [5], [16], [20], [28] among others. LPV-MPC uses an unknown parameterto make the model of the system linear with respect to the states and inputs. This parameter,for which the variable ~θ is used throughout this section, can be dependent on the time (time-varying), the states of the system and the inputs of the system. Because the inputs and statesare generally not known a priori, ~θ is not known either. However, in most cases, the statesand inputs are bounded. This causes ~θ to be bounded as well. Consequently, the worst casevalues of ~θ can be used to determine the control inputs of the control problem, in which thisproblem becomes linear. LPV-MPC is very suitable for the quadratic systems covered in thisthesis.

4-3-1 General form of the LPV model

The systems that we are covering in this thesis are quadratic as shown in Chapter 2. Thesesystems are given by the following expression:

~xk+1 = (A0 +A(~xk))~xk + (B0 +B(~xk))~uk (4-16)

Note that this is the translated model of these systems (with the origin as the equilibriumpoint). We can see that the system matrices are linearly dependent on the state of the system.This makes these models quadratic and, thus, nonlinear. Introducing the parameter ~θk will

Master of Science Thesis R. Koch

Page 108: Masters Thesis: Nonlinear control of electronic converters

88 Initial control sequence

transform this nonlinear model into a linear model with respect to the states and inputs givenby the following expression:

~xk+1 = A(~θk)~xk + B(~θk)~uk (4-17)

This type of model is called a linear parameter varying model, because it is linear with respectto the system parameters (~xk and ~uk) and linear with respect to parameter ~θ.In many cases, it is preferable to control the change in the input variable instead of the inputvariable itself, because it increases the possibility to put limitations on the change of theinput and penalize zero steady state errors of the system. The disadvantage is the increase incomplexity of the system due to the increased number of states. This results in the followingexpression of the model of the system:[

~xk+1~uk+1

]=[A(~θk) B(~θk)

0 Im

] [~xk~uk

]+[

0Im

]∆~uk (4-18)

where ∆~uk = ~uk+1 − ~uk. In the preceding of this section, this equation will be written as~yk+1 = Ψ(~θk)~yk +Γ~sk, where ~yk is the new state variable and ~sk the new input variable of thesystem. The next step in the design of the LPV-MPC controller is the determination of anexpression of the variable ~θk, which relates the states of the system to this parameter. Thereare two methods to determine this parameter ~θk. In the first method, the state ~xk is replacedby a function which is dependent on ~θk. This function ~θk is allowed to vary between zero andone (~θk ∈ Rn[0,1]) for simplicity. The boundaries of ~θk have to correspond to the boundaries of~xk. These bounds are given by the state space of the system (X). In general, the bounds onthe state can be described by:

~x(j) = z ∈ R|~x(j)min ≤ z ≤ ~x

(j)max, j ∈ Z[1,n] (4-19)

Using these bounds, we can derive an affine function of A(~xk) and B(~xk) with respect to ~θk,which in their turn leads to an affine function of Ψ with respect to ~θk. The relation betweenthe state and this parameter is described by the following affine function:

~x(j) = ~x(j)min + (~x(j)

max − ~x(j)min)~θ(j), ∀j ∈ Z[1,n] (4-20)

where ~θ(j) can be any value between 0 and 1. Note that this method will only work when thestate space is bounded by constant bounds, which means that the state space has a rectan-gular shape.

The second way of writing Ψ as function of ~θk instead of ~xk is by using barycentric coor-dinates. In this case, the matrix Ψ is evaluated for all the bounds of ~xk which results in Ψ(j)

with j ∈ Z[1,p] where q is the number of vertices of X. The actual value of Ψ(~θk) can bedetermined by multiplying these Ψ(j) with ~θ(j)

k which can be written by:

Ψ(~θk) =q∑j=1

Ψj~θ

(j)k (4-21)

where ~θ(j)k is larger or equal to zero and the sum of ~θ(j)

k is equal to one. The barycentric coor-dinate system is designed for simplices and not for all types of polytopes. However, the same

R. Koch Master of Science Thesis

Page 109: Masters Thesis: Nonlinear control of electronic converters

4-3 Linear parameter varying MPC 89

principle can be used for any type of polytope as long as it is convex, which is a requirementof the state space for the systems covered in this thesis.If we compare these two methods, we see that the second method, using barycentric coor-dinates, is a more general method since it can be used for any convex polytope while thefirst method is limited to sets with states bounded by constant values. The disadvantageof the second method is that the size of ~θ is dependent on the number of vertices of thepolytope while the size of ~θ is equal to the size of the states when using the first method.This means that the size of ~θ is equal to n when the first options is used while the size of ~θ isequal to 2n when using the second method for the same set X. Eventually, it does not makeany difference when using either the first or the second method for the design of the controlproblem, because the number of inequality constraints will still be the same. This is why wewill use the second method in the examples of the buck-boost converter and the three-phaseVSI connected to a PMSM. We could have chosen the first method as well, because the statespace of these systems can also be written in the form of (4-19).

4-3-2 Constructing the LPV-MPC problem

After the model has been written into the model of the form of (4-17), the LPV-MPC problemcan be constructed. The objective function of the LPV-MPC problem has to be designedsuch that the constraints in (4-1) are satisfied, especially the constraint on the N th step ofthe horizon. This can be achieved by adding terms for reference tracking (of the desiredequilibrium point) to the objective function. This gives the following expression for theobjective function:

J =∥∥∥P~yk+N

∥∥∥p

+N−1∑i=0‖Q~yk+j‖p + ‖R~sk+j‖p (4-22)

where p = 1 to indicate the 1-norm and p = ∞ to indicate the infinity norm. The 2-normcannot be used in the objective function as will be made clear in the precedence. N is thehorizon of the LPV-MPC problem which does not necessarily have to be equal to N . In theLPV-MPC problem, the control input sequence is determined by calculating the minimumof this objective function with respect to the control input while maximizing the objectivefunction with respect the parameter ~θ. This results in the following optimization problem:

~sk(~yk, ~θk) = argmin~sk

min~sk+1

max~θk+1

· · · min~sk+N−1

max~θk+N−1

J (4-23a)

s.t. ~yk+j = Ψ(~θk+j−1)~yk+j−1 + Γ~sk+j−1 ∀j ∈ Z[1,N ] (4-23b)

~yk+j ∈ Y ∀j ∈ Z[1,N ] (4-23c)

This optimization problem is not linear when both the input and the parameter θ are usedas optimization variables. So, the optimization problem has to be rewritten such that itresults in a linear programming problem. For simplicity, this optimization problem will bewritten into a dynamic programming problem first which is described in [4]. The dynamicprogramming algorithm starts at the last step in the horizon and goes backwards to the firststep in the horizon. The first step of the dynamic programming algorithm of this optimizationproblem is given by:

J∗N

(yk+N ) =∥∥∥Pyk+N

∥∥∥p

(4-24)

Master of Science Thesis R. Koch

Page 110: Masters Thesis: Nonlinear control of electronic converters

90 Initial control sequence

There is no optimization in this function, because it is neither dependent on the control inputnor the parameter ~θ. In the successive steps of the dynamic programming algorithm, we haveto solve an optimization problem in order to find the functions J∗

N−1 to J∗0 . These functionsall have the same structure which is given by the following equation:

J∗i (~yk+i) = min~sk+i

max~θk+i

‖Q~yk+i‖p + ‖R~vk+i‖p + J∗i+1(~yk+i+1) (4-25a)

s.t. ~yk+i+1 = Ψ(θk+i)~yk+i + Γ~sk+i ∈ Y (4-25b)

where, of course, J∗0 is equal to the objective function in (4-22). The next step in the designof the LPV-MPC control problem involves removing the maximization with respect to ~θk+iin this optimization problem. This can be done by adding an auxiliary variable ti to theoptimization problem which is only dependent on ~sk+N−1 and independent on the parameter~θk+N−1. ~θk+i is removed from the optimization problem by changing the matrix Ψ(~θk+i) bythe four matrices Ψ(j). The reason why this is a valid operation is that the auxiliary variablegives an upper bound on this part of the objective function (Ji(~yk+i)). Because Ψ(~θk+i) is anaffine function with respect to ~θk+i, it can be shown that if for all Ψ(j) the objective functionJi(~yk+i) is bounded by ti, the objective function is bounded by ti for all Ψ(~θk+i). The proveis given as follows. The optimization problem ensures that the following constraint will besatisfied:

‖Q~yk+i‖p + ‖R~sk+i‖p + J∗i+1(Ψj~yk+i + Γ~sk+i) ≤ ti, ∀ j ∈ Z[1,q] (4-26)

which is valid for every i ∈ Z[0,N−1]. Multiplying both sides with ~θ(j)k+i and summing all these

constraints results in the following expression:q∑j=1

(‖Q~yk+i‖p + ‖R~sk+i‖p + J∗i+1(Ψj~yk+i + Γ~sk+i)

)~θ

(j)k+i ≤

q∑j=1

ti~θ(j)k+i (4-27)

Noting that∑qj=1

~θ(j)k+i = 1 and that Ji+1(·) is linear with respect to Ψj (p = 1 or ∞), we can

rewrite this equation as:

‖Q~yk+i‖p + ‖R~sk+i‖p + J∗i+1(Ψ(~θk+i)~yk+i + Γ~sk+i) ≤ ti (4-28)

which concludes the proof.We can now see why only the 1-norm and the ∞-norm are allowed in the objective functionof (4-22). These norms will lead to linear constraints of the control problem, while theconstraints would be quadratic when the 2-norm is used. This will result in a control problemthat is not linear (or quadratic) and maybe not even convex. Using the expressions derivedabove, we can now formulate the control problem that is independent of the parameter ~θk+iby the following equation:

J∗i (~yk+i) = minSk+i

ti (4-29a)

s.t. ∀ j ∈ Z[1,q] (4-29b)‖Q~yk+i‖p + ‖R~sk+i,j‖p + J∗i+1(Ψj~yk+i + Γ~sk+i,j) ≤ ti (4-29c)

Ψj~yk+i + Γ~sk+i,j ∈ Y (4-29d)

R. Koch Master of Science Thesis

Page 111: Masters Thesis: Nonlinear control of electronic converters

4-3 Linear parameter varying MPC 91

where Sk+i is a set representing all ~sk+i,j for which∑qj=1 ~sk+i,j = ~sk+i. This addition gives

more freedom to the optimization problem while still satisfying the constraint on the param-eter ~θ. The series of optimization problems of the dynamic programming problem can becombined into one big optimization problem by filling in the part of the objective function(J∗i (·)). There is a difference in the construction of the constraints in case of the one norm(p = 1) and the infinity norm (p = ∞). That is because recasting these norms such that alinear programming problem can be constructed, result in two different expressions which aregiven by:

‖~x‖1 ≤ t→

~x ≤ ~τ−~x ≤ ~τ∑ni=1 ~τ

(i) ≤ t(4-30a)

‖~x‖∞ ≤ t→~x ≤ 1nt−~x ≤ 1nt

(4-30b)

The∞-norm is less demanding than the 1-norm which is the reason that it has less constraints.Therefore, we have chosen to construct the following linear programming problem based onthe 1-norm instead of the ∞-norm, although they can both be applied to the quadraticsystems. The resulting linear programming problem for solving the LPV-MPC problem is

Master of Science Thesis R. Koch

Page 112: Masters Thesis: Nonlinear control of electronic converters

92 Initial control sequence

given by the following equations:

J∗0 (~yk, ~θk) = min~sk,Sk+1,...,Sk+Nt0 (4-31a)

s.t. ∀ jm ∈ Z[1,4], m ∈ Z[1,N−1] (4-31b)[Q~ykR~sk

]≤ ~τN (4-31c)

−[Q~ykR~sk

]≤ ~τN (4-31d)[

Q(Φ(~θk)~yk + Γ~sk)R~s

(j1)k+1

]≤ ~τN−1 (4-31e)

−[Q(Φ(~θk)~yk + Γ~sk)

R~s(j1)k+1

]≤ ~τN−1 (4-31f)

... (4-31g)Q(∏N−2

l=1 Φ(jl)(Φ(~θk)~yk + Γ~sk) +[∏N−2

l=2 Φ(jl)Γ∏N−2l=3 Φ(jl)Γ · · · Φ(jN−2)Γ Γ

]SN−2

1 (k))

R~s(jk+N−1)N−1

≤ ~τ1

(4-31h)

Q(∏N−2

l=1 Φ(jl)(Φ(~θk)~yk + Γ~sk) +[∏N−2

l=2 Φ(jl)Γ∏N−2l=3 Φ(jl)Γ · · · Φ(jN−2)Γ Γ

]SN−2

1 (k))

R~s(jk+N−1)N−1

≤ ~τ1

(4-31i)

P

(∏N−1l=1 Φ(jl)(Φ(~θk)~yk + Γ~sk) +

[∏N−1l=2 Φ(jl)Γ

∏N−1l=3 Φ(jl)Γ · · · Φ(jN−1)Γ Γ

]SN−1

1 (k))≤ ~τ0

(4-31j)

−P(∏N−1

l=1 Φ(jl)(Φ(~θk)~yk + Γ~sk) +[∏N−1

l=2 Φ(jl)Γ∏N−1l=1 Φ(jl)Γ · · · Φ(jN−1)Γ Γ

]SN−1

1 (k))≤ ~τ0

(4-31k)∑Ni=1 1T

n+m~τi + 1Tn~τ0 ≤ t0 (4-31l)

Φ(~θk)~yk + Γ~sk ∈ Y (4-31m)∏il=1 Φ(jl)(Φ(~θk)~yk + Γ~sk) +

[∏il=2 Φ(jl)Γ

∏il=1 Φ(jl)Γ · · · Φ(ji)Γ Γ

]Si1(k) ∈ Y, ∀i ∈ Z[1,N−1]

(4-31n)

Si1(k) =

~s

(j1)1~s

(j2)2...

~s(ji)i

, ~s(ji)i ∈ Sk+i (4-31o)

Note that if we would have chosen p =∞ instead of p = 1, all the vectors ~τi would have beenchanged by the scalar t0 and (4-31l) would not be part of the optimization problem. Basedon the number of vertices of the state space and the length of the horizon, the number ofinequalities can become very large, because the number of inequalities increases exponentiallywhen the horizon increases. Although this directly affects the computational time of theLPV-MPC problem, it is still much faster than the nonlinear programming problem becauseof the linearity.After the LPV-MPC control problem has been constructed, it can be applied to the systems.This linear programming problem needs to be solved for every control step of the system

R. Koch Master of Science Thesis

Page 113: Masters Thesis: Nonlinear control of electronic converters

4-3 Linear parameter varying MPC 93

until the system has entered the DOA of the local controller determined in Chapter 3. Notethat this has to be the case for the first consecutive state of the system, which is ~yk+1 andnot ~yk+N . The reason is that all the computed states ~yk+2 until ~yk+N are not determinedexactly but are estimated using the worst case values of the system matrices. This meansthat, in reality, these states might be closer to the equilibrium point than computed usingthe optimization problem in (4-31).Before we are able to apply the LPV-MPC controller to the system, we have to initialize itsinput. This is needed because of the model used in the design of the LPV-MPC problem in(4-17). In this model, there is a delay in the control of the input of the system, which meansthat not the current input is controlled but the input of the next step of the system. Thechoice of the initial value of the input is not important for the stability of the system, theLPV-MPC controller has to be able to stabilize the system from any point within the statespace, but it has to ensure that the consecutive state is still within X. We will determine theinitial value of the input using the LPV-MPC controller with one horizon. This results in theoptimization problem formulated as follows:

~u∗0 = argmin~u0

‖P~x1‖p (4-32a)

s.t. ~x1 = A~x0 + B(~θ0)~u0 ∈ X (4-32b)~u0 ∈ U (4-32c)

where ~x1 is the first consecutive state of the system which will not change during the applica-tion of the LPV-MPC controller. Note that the LPV parameter ~θ0 is only dependent on theinitial state ~x0 and, therefore, known. Now, we are able to apply the LPV-MPC controller in(4-31).

4-3-3 Application: The buck-boost converter

The next step is applying LPV-MPC to the buck-boost converter in section 2-1. The initialstate is chosen to be the origin for the actual states of the buck-boost converter (not translated)and the initial input is determined using (4-32). The output voltage (or reference voltage) isset to 10 V for the buck-boost converter in buck mode and 40 V for the buck-boost converterin boost mode. The weighting matrices of the LPV-MPC objective function in (4-22) are setto the following values:

P = Q =

3 0 00 1 00 0 1

, R = 0.1 (4-33)

Note that the size of P and Q is m + n = 3 due to the description of the model in (4-17).The choice for these weights is based on the existence of a solution of the control problem.Choosing a larger weight for the inductor current (first state), the controller tries to minimizethis value which gives a higher change that it will satisfy the state constraint. The choice fora relatively low weight on the control input of the LPV-MPC problem is based on the factthat the value of this parameter is not important for reaching the DOA of the local controllerof the system determined in Chapter 3. The horizon of the system is set to 5, equal to thetwo other methods for determining the initial sequence described in the previous sections.

Master of Science Thesis R. Koch

Page 114: Masters Thesis: Nonlinear control of electronic converters

94 Initial control sequence

(a) Converter in buck mode and local controller andDOA from Section 3-2

(b) Converter in buck mode and local controller andDOA from Section 3-4

(c) Converter in boost mode and local controllerand DOA from Section 3-2

(d) Converter in boost mode and local controllerand DOA from Section 3-4

Figure 4-9: State evaluation of the initial sequence of the buck-boost converter in buck and boostmode for two different local controllers and their corresponding DOA determined in Chapter 3.

The resulting state evolution of the buck-boost converter in both modes (buck and boost) forthe LPV-MPC controller is given in Figure 4-9. The size of the initial sequence is dependenton the size of the DOA of the local controller but also on the distance between the initialstate and the equilibrium point. If the equilibrium point is closer to the initial state, which isthe case when the system operates in buck mode and the initial state is set at the minimumoutput voltage and inductor current, less steps are needed to enter the DOA (depending onthe size of the DOA of course). But in case of the buck-boost converter, this difference canbe extreme large when we compare the initial sequence of the system plotted in Figure 4-9b and Figure 4-9d. This large difference is due to the fact that the control input barelychanges after the first few steps as shown in Figure 4-10b. This is caused by the method ofLPV-MPC. As shown in Figure 4-2b, the control input is constantly changing between itsminimum and its maximum (or at least very close to these extrema). This will minimize thenumber of steps needed to enter the DOA of the local controller. However, this is not possiblefor the LPV-MPC controller as it is not based on the exact value of the consecutive state, butbased on the worst case value of the state, in other words the consecutive state based on theworst case value of the state might violate the constraints and, therefore, leads to an invalid

R. Koch Master of Science Thesis

Page 115: Masters Thesis: Nonlinear control of electronic converters

4-3 Linear parameter varying MPC 95

solution. It does not mean that the solution is invalid for the real value of the states, but itis invalid for the worst case value of the states.Figure 4-10 shows the control input of the buck-boost converter corresponding to the state

0 0.5 1 1.5 2 2.5 3 3.5

time [s] 10-4

-0.35

-0.3

-0.25

-0.2

-0.15

-0.1

-0.05

0

u

(a) Converter in buck mode

0 0.2 0.4 0.6 0.8 1 1.2 1.4

time [s] 10-3

-0.5

-0.4

-0.3

-0.2

-0.1

0

0.1

0.2

0.3

0.4

u

(b) Converter in boost mode

Figure 4-10: Initial sequence of the control input of the buck-boost converter in the two modesbased on the DOA determined in Section 3-4

evolution shown in Figure 4-9b and Figure 4-9d. Note that the values of the control input ofthe other two state evaluations shown in Figure 4-9 are equal but the size of the sequencesare shorter. From the plot of the control input of the buck-boost converter in buck mode,we can see that the control input is constant for the first couple of steps (except the firststep) and equal to its equilibrium value. Thereafter, the control input jumps to a lower value.This is exactly at the point of the bend in the plot of the state evolution in Figure 4-9a andFigure 4-9b. This change in the control input ensures that the inductor current stays withinits limits and ensures that the overshoot of the inductor current is limited. The reason thatthe inductor current tends to have a large overshoot is because that will make the system asa whole faster. When the inductor current is large, the current flowing through the capacitorwill be large as well which means the the ramp of the output voltage is large. Namely, therate of change of the voltage of the capacitor is proportional to the current flowing throughthe capacitor. If the limit on the inductor current would be larger, which means that themaximum current flowing through the inductor is larger, the bend in this plot would be causedby the objective function due to the large cost of the inductor current state.

4-3-4 Application: The three-phase inverter

LPV-MPC can also be applied for the three-phase VSI connected to a PMSM, because of thequadratic structure of the model. The same norm is used for the description of the objectivefunction, namely the 1-norm (p = 1). The weighting matrices are determined such that theslowest state gets the highest priority, which is the rotational speed (third state). This leads

Master of Science Thesis R. Koch

Page 116: Masters Thesis: Nonlinear control of electronic converters

96 Initial control sequence

to the following representation of the weighting matrices:

P = Q =

1 0 0 0 00 1 0 0 00 0 10 0 00 0 0 1 00 0 0 0 1

, R =[0.1 00 0.1

](4-34)

Note that we have chosen a lower weight on the control inputs of this control problem for thesame reason as we have chosen this in the example of the buck-boost converter. The horizon ofthis system is set at 4 instead of 5, which has been used in the previous methods described inthis chapter. The reason is that the constraints of the linear programming problem becomestoo large to be computed by Matlab. This is usually the main drawback of using LPV-MPCwhich already occurs for a system with 3 states, 2 inputs and a state space consisting of 8vertices. The initial state is based on no current flowing though the windings at the statorand the motor not rotating (zero rotational speed). The results of applying LPV-MPC areshown in Figure 4-11. As we have already seen with the other methods is that the size of theinitial sequence is large (more than 4000 steps) due to the slowly changing rotational speed,while the stator currents reach their equilibrium values already after applying the first controlinput of the initial sequence. This can also be seen in the plot of the control input which hasa large change in the first steps of the initial sequence and, thereafter the differences betweenthe control inputs are much smaller.

(a) State evolution of the system

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45

time [s]

-50

-40

-30

-20

-10

0

10

u(1)

u(2)

(b) Control inputs of the system

Figure 4-11: Initial sequence of the three-phase inverter connected to a PMSM in order to reachthe DOA of the local controller determined in Chapter 3.

4-4 Comparison

In this section, we will compare the methods described in this section to determine the initialcontrol sequence of the SD-NMPC controller and conclude which of these methods shows thebest results. This is based on two main criteria, the computational time of the initial controlsequence and the length of the initial sequence. It is clear that we want the computationaltime as low as possible. Although the determination of the initial sequence takes place offline,

R. Koch Master of Science Thesis

Page 117: Masters Thesis: Nonlinear control of electronic converters

4-4 Comparison 97

it is still desirable because we can only start controlling when the initial sequence is deter-mined. Besides the computational time, we also want the length of the sequence to be asshort as possible. A shorter size means that less computations have to be executed online inorder to reach the DOA of the local controller. This leads directly to a shorter computationaltime of the online control actions which is even more favorable than a low computational timeof the initial sequence because there is a limit on this time set by the sampling frequency ofthe system. So, it is not only desirable to have a short length of the initial control sequence,it is necessary to keep it short in order to limit the online computational time which is limitedby the sampling period of the system.The first system that we will analyze is the buck-boost converter. Figure 4-12 shows theobtained size of the initial control sequence determined using the methods described in thischapter. Besides the size of the control sequence, this figure also shows the total compu-tational time of the determination of the initial sequence. Note that this time includes thedetermination of the local controller with corresponding DOA as elaborated in Chapter 3.This figure does not show the exact times but the time relative to the maximum time neededto compute the initial sequence using the methods described in this chapter. The length ofthe initial sequence is very different when we compare the results based on the two differentmethods of determining the DOA of the local controller as described in Chapter 3. This iscaused by the large difference in the size of the DOA. In boost mode, the size of the DOAobtained using a linear Lyapunov function and a linear feedback controller (Section 3-2) ismuch larger than the size of the DOA obtained using a quadratic Lyapunov function andnonlinear feedback controller (Section 3-4). However, we have also seen in Chapter 3 that thecomputational time for the first controller (and DOA) is much larger. Nevertheless, it leadsto a better solution than the latter method in terms of the size of the initial sequence andeven the computational time is in some cases lower. Therefore, our final choice of the localcontroller is set to the method described in Section 3-2 for the buck-boost converter. Based

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

rela

tive tim

e

LPV-MPC nonlinear MPC (SQP) successive lin. MPC0

5

10

15

20

25

30

length

initia

l sequence

size init. seq.

size init. seq.

relative time

(a) Converter in buck mode (Vo = 10 V)

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

rela

tive tim

e

LPV-MPC nonlinear MPC (SQP) successive lin. MPC0

10

20

30

40

50

60

length

initia

l sequence

size init. seq.

size init. seq.

relative time

(b) Converter in boost mode (Vo = 40 V)

Figure 4-12: Comparing the different methods described in this chapter to determine the initialcontrol sequence based on the length of this sequence and the time needed to obtained it. Twodifferent methods of determining the DOA of the local controller are used, the method describedin Section 3-2 (blue bar) and the method described in Section 3-4 (red bar).

on the choice of this method for the local controller, we see barely no difference between themethods for determining the initial sequences described in this chapter. However, for thebuck-boost converter in buck mode, the differences are clearer. First of all, the method of

Master of Science Thesis R. Koch

Page 118: Masters Thesis: Nonlinear control of electronic converters

98 Initial control sequence

LPV-MPC nonlinear MPC (SQP) successive lin. MPC0

500

1000

1500

2000

2500

3000

3500

4000

4500

len

gth

in

itia

l se

qu

en

ce

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

rela

tive

tim

e

size init. seq.

relative time

Figure 4-13: Comparison between the three methods determining the initial control sequence ofthe three-phase VSI controlling a PMSM which are described in this chapter. The comparison ismade based on the size of the sequence and the corresponding time needed to obtain it.

successive linearization shows the worst performances out of the three with the largest initialcontrol sequence and the corresponding computational time is also relatively large. The othertwo methods are closer to each other based on these criteria, whereby the nonlinear MPCmethod performs slightly better than the method using LPV-MPC. However, we will stilluse the method of LPV-MPC for the determination of the initial sequence of the buck-boostconverter in the remainder of this thesis. The reason is the fact that this method only useslinear optimization to solve the problem without estimating the system while the nonlinearMPC method uses a quadratic approximation in order to find the solution iteratively. Forthe specific examples, model parameters and reference values, the nonlinear method is able tofind a solution to the feasibility problem of (4-1) after only a couple of iterations which resultsin a low computational time. However, when the buck-boost converter has different systemparameters, i.e. other inductors and capacitors, the process of finding a feasible control se-quence might take more iterations and, therefore, the computational time might be larger aswell.The second application covered in this thesis is the three-phase VSI connected to a PMSMfor which we will also make this comparison based on the size of the initial sequence andthe corresponding computational time. Figure 4-13 shows the values corresponding to thesecriteria of the different methods described in this chapter. Note that the computational timeis the sum of the time needed to derive the local controller with its corresponding DOA fromSection 3-3 plus the time needed to find the initial control sequence. Moreover, the relativetime is used here (based on the method that results in the longest time) instead of the abso-lute time. The results are very clear. The computational time of the method using successivelinearization outperforms the other two methods. Compared with the nonlinear MPC methodit is understandable, but also the LPV-MPC method is taking much more time to obtain theinitial sequence than the successive linearization method. The reason that LPV-MPC has alarge computational time compared with the successive linearization method because of thelarge number of inequality constraints of the control problem. For a horizon of 5, it was eventhat large that Matlab was not able to solve this problem due to a maximum array size error.The difference between the size of the initial control sequence is much smaller. The size ofthe initial control sequence obtained using the LPV-MPC method is almost equal to the sizeof this sequence obtained using the successive linearization method. Only the nonlinear MPCmethod has a noticeable lower initial control sequence. Based on these results, we can clearly

R. Koch Master of Science Thesis

Page 119: Masters Thesis: Nonlinear control of electronic converters

4-5 Summary 99

conclude that the successive linearization method is the best method among these three and,therefore, it will be used to determine the initial sequence of this system in the sequel of thisthesis.

4-5 Summary

This chapter has described three methods in order to find the initial control sequence ofnonlinear systems for the design of a SD-NMPC controller that should satisfy the feasibilityconstraints in (4-1). The first method is based on the nonlinear MPC problem of the non-linear system. It converted the nonlinear control problem into a quadratic control problemwhich can be solved using quadratic programming. This is called SQP. A solution of thecontrol problem can be found by iteratively applying this conversion until the local minimumhas been reached. The advantage of this method is that if a local optimum has been found,this can be very close to the solutions of the SD-NMPC problem which we will formulatein the next chapter because any objective function can be used. The main disadvantage isthat a warm sequence is needed in order to solve this problem. Although this warm sequencedoes not have to satisfy the constraints, it still must lead to a local minimum that has tosatisfy the constraints otherwise we would not have found a valid solution. We can solve thisissue by using multiple warm sequences but this will also lead to a much more complicatedoptimization problem. This is the main reason why this method is computationally heavy.The second method uses the linearization of the model at the current state in order to con-struct a convex optimization problem. This methods is, therefore, called successive lineariza-tion MPC. The advantage of this method is that it is computationally very light, especiallywhen a linear objective function is used. The main disadvantage is that the linearizationmight not be very good representation of the system, which makes the obtained sequencelong as the optimum deviates a lot from the real optimum.The third and last method discussed in this chapter is called LPV-MPC. It converts thenonlinear model into a linear parameter varying model and solves this problem based on theworst case values of the LPV parameter. The control problem is constructed using dynamicprogramming. The main advantage of this method is that if the optimization problem issolvable, it will always lead to a stabilizing solution. Moreover, the control problem is linearwhich makes this problem computationally light compared with other programming problems.The main disadvantage of this method is that the number of constraints is large which makesthis method more complicated than, for example, the method using successive linearization.Another disadvantage of this method is that the control sequence is based on worst case val-ues of the state parameters. This can make the computed control inputs deviate from theoptimal control inputs of the system. This will lead to a longer initial control sequence thannecessary although it is usually still shorter than the initial control sequence obtained usingsuccessive linearization.The initial sequence is obtained from these methods by taking the control sequence until thesystem reaches the DOA of the local controller. After comparing the results of these threemethods, we have concluded LPV-MPC is the most suitable method for the buck-boost con-verter and successive linearization the most suitable method for the three-phase VSI connectedto a PMSM. These choices for the method to determine the initial control sequence combinedwith the chosen methods for the determination of the local controller with corresponding

Master of Science Thesis R. Koch

Page 120: Masters Thesis: Nonlinear control of electronic converters

100 Initial control sequence

DOA will be used in the next chapter to apply the third step of the SD-NMPC controller tothese power converter systems, which is the online part of the SD-NMPC algorithm.

R. Koch Master of Science Thesis

Page 121: Masters Thesis: Nonlinear control of electronic converters

Chapter 5

Sampling-driven nonlinear MPC

In the previous chapters, we have determined a local controller with corresponding domain ofattraction (DOA) and an initial control sequence that steers the state of the system into thisDOA. These computations have all been performed offline, which means before controllingthe system. But now, we have to control the system online based on the results in the previouschapters. This is explained in this chapter. We will first elaborate the algorithm in orderto apply the online part of the sampling-driven nonlinear model predictive control (MPC)(SD-NMPC) method for nonlinear systems before we will apply it to the converters coveredin Chapter 2. Besides the application of SD-NMPC to these systems, we will also comparethe results to other used methods for these type of systems.

5-1 The online SD-NMPC algorithm

SD-NMPC is a suboptimal MPC strategy that determines the suboptimal control input basedon (random) sampling of the input space. Suboptimal MPC differs from other MPC strategiesin the fact that the control input determined using suboptimal MPC is not guaranteed theoptimal control input with respect to the objective function, but it is the optimal control inputamong the control inputs considered in each iteration of the MPC problem. For SD-NMPC,this is the optimal control input among the samples taken from the input space. Although theoptimal control input can not be guaranteed, the difference between the value of the objectivefunction with the suboptimal control input and the value of the objective function for optimalcontrol decreases in time as shown in [8]. This means that as time progresses, the solution ofthe control problem for suboptimal control approaches the solution for optimal control. Themain advantage of a suboptimal control strategy, such as SD-NMPC, compared with optimalcontrol strategies is the computational complexity. A low computational complexity is essen-tial for electric converters where the computational time is limited by the short sampling timeof the system. Therefore, SD-NMPC is a promising control strategy for electronic converters.The implementation of the SD-NMPC method is based on the local controller determinedin Chapter 3 and the initial control sequence determined in Chapter 4. Because the ini-tial control sequence steers the system into the DOA of the local asymptotically stabilizing

Master of Science Thesis R. Koch

Page 122: Masters Thesis: Nonlinear control of electronic converters

102 Sampling-driven nonlinear MPC

controller, there is already a stabilizing solution to the control problem. If we now set anobjective function J that has its minimum value at the equilibrium point of the system andno other point within the DOA of the local controller has the same value of the objective func-tion as this equilibrium point, then the SD-NMPC controller will always control the systemtowards its desired equilibrium point. The prove is given by the following. The value of theobjective function at time step k based on the warm sequence, which is a combination of theinitial control sequence determined in Chapter 4 and the updates performed using previousiterations of the SD-NMPC method, is given by J(~xk,Uw(k)). The set Uw(k) consists of Nccontrol inputs (~uwk , ~uwk+1, · · · , ~uwk+Nc−1) of the control horizon. Note that the control horizondoes not have to be equal to the size of the initial control sequence (N). It can be eitherlonger, which means that some control inputs of the first iteration (at the initial state) haveto be computed using the local controller, or smaller than the size of the initial sequence.In case the control horizon is smaller, which is usually the case when the initial sequence islong, the system must still reach the DOA of the local controller after N time steps. Thismeans that the evolution of the system has to be computed until this DOA has been reached.Within the control horizon, control inputs can be updated if they lead to a lower value of theobjective function. This means that after every iteration of the SD-NMPC method, the valueof the objective function is always lower or equal to its value at the beginning of the iteration.The number of samples drawn from the input set (Ns) determines the possibility of a moreoptimal solution to the control problem (the value of the objective function) as a larger Nsleads to more possibilities of a lower objective function of the system. The disadvantage of alarger value of Ns is that it will increase the online computational time because the numberof executions of the model and objective function increases. Eventually, the online computa-tions of the SD-NMPC method will lead to a more optimal control sequence than the initialsequence but it is still not guaranteed to be the optimal control. This is the reason why theSD-NMPC method is called a suboptimal control method.An important consideration in the application of the SD-NMPC method is the distribution ofthe samples drawn from the input space. In most cases, the uniform distribution is the bestchoice for this method as it gives an equal probability to all possible control inputs of the sys-tem. However, there are systems where not every control input might be valuable to considerwhen finding a more optimal control sequence. In these cases, other probability distributionscan be used which gives some control inputs a higher probability than others. Examples ofthose distributions are the truncated normal distribution, the trapezoidal distribution andthe beta distribution which all operate with finite domains. This is necessary since the inputspace is always bounded.The operation of SD-NMPC is given in Algorithm 4. The function in Algorithm 4 determinesthe next input of the system using the SD-NMPC strategy. This algorithm determines thefirst control inputs of the horizon first. Thereafter, the second control input is determined.This continues until the (N − 1)th control input is determined using the SD-NMPC method.This is different from the algorithm in [8] which describes the backward SD-NMPC algorithm.Algorithm 4 is called the forward SD-NMPC algorithm. In line 5, Ns samples are drawn fromthe input set U using the Halton sequence. The Halton sequence consists of an infinite num-ber of samples between 0 and 1 which can be assumed to be quasi-random. It has a betterdistribution of samples than the rand function (uniform distribution) in Matlab which is apseudo-random number generator. The reason is that quasi-random number generators aremore uniformly distributed than pseudo-random number generators, because pseudo-randomnumber generators tend to show clustering behavior as explained in [13]. We can show this by

R. Koch Master of Science Thesis

Page 123: Masters Thesis: Nonlinear control of electronic converters

5-1 The online SD-NMPC algorithm 103

(a) Pseudo-random number generator (rand function inMatlab) (b) Quasi-random number generator (Halton sequence)

Figure 5-1: Histograms of the pseudo-random number generator and the quasi-random numbergenerator based on 10,000 sample values. The interval is set to 0.01.

plotting the histograms corresponding to values generated by these random number genera-tors in Matlab. The results are shown in Figure 5-1. We can clearly see that the quasi-randomnumber generator generates more uniformly distributed values as the number of elements ineach interval is almost equal. This in contrast with the pseudo-random number generator forwhich the number of values with each interval is more divergent. Besides the Halton sequence,there are more quasi-random number generators such as the Sobol sequence. This sequenceshows even better performance than the Halton sequence when the dimension is large. Asthe dimension in the applications described in this thesis are relatively low (one in case of thebuck-boost converter and two in case of the three-phase inverter), we will stick to the Haltonsequence in this thesis.After Ns samples are drawn from U, a sequence Uq is constructed which consists of the warminput sequence (Uw(k)) and a sampled input (~uqk+j) at the jth position of this sequence.The system is evaluated using this input sequence and the corresponding value of the objec-tive function (Jnew) is determined. This value is compared with Jsub which is the objectivefunction corresponding to the warm input sequence resulting in the lowest value of the ob-jective function so far. If Jnew is lower than Jsub and the sequence satisfy the constraints(~xk+j ∈ X, ~xk+N ∈ D ∀j ∈ Z[1,N−1]), the input sequence Uq will become the new warm se-quence. The same procedure is repeated for all the other sampled points and for the wholecontrol horizon (Nc). After the algorithm has been applied, the objective function is alwayslower or equal to its value before the algorithm has been carried out. Moreover, the systemalways reaches the equilibrium as the DOA will be entered after at least N steps. Finally,the algorithm returns the next control input and the new warm sequence which can be usedfor the next execution of the algorithm. Note that the last input in the warm sequence iscomputed using the linear feedback law determined in Chapter 3 for the DOA D. This is avalid input value because the state ~xk+N−1 is inside this DOA, which is always true when theprevious warm sequence satisfies the constraints.

Master of Science Thesis R. Koch

Page 124: Masters Thesis: Nonlinear control of electronic converters

104 Sampling-driven nonlinear MPC

Algorithm 4 The modified sampling-driven nonlinear model predictive control algorithmbased on the algorithm proposed in [8] (differences are indicated in blue)

1: function sdnmpc(N ,Nc,ns,~xk,X,U,D,f(·),J(·),K,Uw(k)) . size of Uw must bemaxN,Nc

2: Jsub ← J(~xk,Uw(k))3: ~xfinal ← ~xk+N4: for j ← 0 : 1 : Nc − 1 do5: ~uqk+j ∈ U ∀q ∈ Z[1,Ns] . sampling of the input set from the Halton sequence using

a predefined distribution6: for q ← 1 : 1 : ns do7: Uq ← ~uwk , . . . , ~uwk+j−1, ~u

qk+j , ~u

wk+j+1, . . . , ~u

wk+N−1

8: ~xk+i ← f(~xk+i−1, ~uqk+i−1) ∀i ∈ Z[j+1,N ]

9: if ~xk+i ∈ X ∀i ∈ Z[j+1,N−1] and ~xk+N ∈ D then10: Jnew ← J(~xk,Uq(k))11: if Jnew < Jsub then12: Jsub ← Jnew13: Uw(k)← Uq14: ~xfinal ← ~xk+N15: end if16: end if17: end for18: end for19: ~uk ← ~uwk20: if N > Nc then21: Uw(k + 1)← ~uwk+1, ~u

wk+2, . . . , ~u

wk+N−1

22: else23: Uw(k + 1)← ~uwk+1, ~u

wk+2, . . . , ~u

wk+N−1, K(~xfinal − ~xe) + ~ue

24: end if25: return ~uk, Uw(k + 1)26: end function

R. Koch Master of Science Thesis

Page 125: Masters Thesis: Nonlinear control of electronic converters

5-2 The buck-boost converter 105

5-2 The buck-boost converter

The SD-NMPC control method is applied to the buck-boost converter described in Section 2-1. The local controller with corresponding DOA that are used to apply this method isdescribed in Section 3-2 and the initial sequence as described in Section 4-3. This givesalready a stabilizing solution to the control problem but it is not necessarily optimal withrespect to the objective function of the SD-NMPC controller. This is because we have chosenthe objective function differently from the objective function used in the design of the localcontroller and the initial sequence. Namely, the objective function of the SD-NMPC controlleris quadratic instead of linear and given by the following equation:

J(·) =Nc−1∑i=0

(~xk+i+1 − ~xe)TQobj(~xk+1+i − ~xe) +Robj(uk+i − ue)2 (5-1a)

Qobj =[1 00 4

], Robj = 1 (5-1b)

where Nc is the length of the control horizon which we have set at 5 (equal to the length of thehorizon in the determination of the initial sequence). The number of samples taken at eachiteration of the SD-NMPC algorithm is set at Ns = 5. The results are given in Figure 5-2for the buck-boost converter in buck mode (output voltage reference set to 10 V). It canbe seen from this figure that the controller is stabilizing the system as the references of thesignals are tracked. This means that the main goal of the control problem has successfullybeen achieved. This would already have been achieved if we would not apply the SD-NMPCalgorithm, but the voltage reference is tracked faster after the SD-NMPC algorithm has beenapplied. Besides the plot of the output voltage, this can also clearly be seen in the plot of theobjective function as the cost of the system after applying the SD-NMPC algorithm is muchlower than the cost before applying the SD-NMPC algorithm. Besides the improvement in theoutput voltage of the buck-boost converter, the inductor current also improves with respectto the initial sequence and local controller. This can be seen in the maximum current flowingthrough the inductor. This has been decreased with around 0.1 A. A lower current meansthat less power is needed from the input source which makes this system more efficient.The SD-NMPC algorithm is also applied to the buck-boost converter is boost mode. The

results are shown in Figure 5-3. We can clearly see that the rise time of the system is muchshorter after applying the SD-NMPC algorithm than based on the initial sequence and thelocal controller. This results in faster tracking of the reference values of the system and alsoa faster decrease in the objective function. Besides the faster tracking, the response of thesystem after applying the SD-NMPC algorithm is showing a more rough behavior. This can beexplained by the nature of the algorithm. The algorithm does not give an optimal solution tothe control problem but a suboptimal solution based on random sampling in the input space.This means that at some iteration a more optimal solution has been found than at anotheriteration. If we would have taken more samples at every step in the control horizon, the resultwill probably be more optimal because the system will deviate less from the optimal solution.Moreover, as we have seen in the previous chapters, the computed DOA is relatively largewith respect to the state space compared with the buck-boost converter in buck mode (Vo =10 V). This will usually make the obtained controller less optimal with respect to trackingthe reference value (slower response). Therefore, the SD-NMPC algorithm will lead to more

Master of Science Thesis R. Koch

Page 126: Masters Thesis: Nonlinear control of electronic converters

106 Sampling-driven nonlinear MPC

0 0.5 1 1.5

time [s] 10-3

0

0.2

0.4

0.6

0.8

1

1.2

1.4

i L [A

]

after SD-NMPC

before SD-NMPC

current reference

(a)

0 0.5 1 1.5 2 2.5

time [s] 10-3

0

1

2

3

4

5

6

7

8

9

10

11

vo [V

]

after SD-NMPC

before SD-NMPC

voltage reference

(b)

0 0.2 0.4 0.6 0.8 1

time [s] 10-3

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

d

duty cycle of the switch

reference duty cycle

(c)

0 1 2 3 4 5

time [s] 10-4

0

50

100

150

200

250

300

350

400

450

J

after SD-NMPC

before SD-NMPC

(d)

Figure 5-2: Results of the buck-boost converter in buck mode after applying the SD-NMPCalgorithm. (a) shows the evolution of the inductor current and (b) the evolution of the outputvoltage. The corresponding control inputs are shown in (c). These results are compared with theinitial sequence based on their values of the objective function in (d).

updates of the control input sequence and also a much better behavior of the system. Thisgives a higher probability of a rough behavior of the state parameters based on this approachas explained before. From the two states of the buck-boost converter, the inductor currentis the most affected by this behavior which we would also expect, because the duty cycledirectly influences the current flowing through the inductor. From Figure 5-3a it seems thatthe inductor current is changing really fast which means that the voltage over the inductorbecomes very large. However, this is not the case as shown in Figure 5-4. The voltage overthe inductor is always equal to the input source voltage (Vin) when the switch is closed andequal to the sum of the voltage over the diode (Vd) and the capacitor (vo) when the switchis open. This limits the voltage as shown in this figure. Therefore, there is no issue with thefast changing inductor current as shown in Figure 5-3a. Moreover, this figure only shows theaverage current over one switching period (Ts) while the actual current is increasing duringthe first dTs time of the period and decreasing in the remaining time of the period. So, theinductor current is even changing more than shown in this figure.The main advantage of using the SD-NMPC control method for nonlinear systems is that

this method is computational light compared with other nonlinear control methods. However,

R. Koch Master of Science Thesis

Page 127: Masters Thesis: Nonlinear control of electronic converters

5-2 The buck-boost converter 107

0 1 2 3 4 5

time [s] 10-3

0

0.5

1

1.5

2

2.5

i L [A

]

after SD-NMPC

before SD-NMPC

current reference

(a)

0 0.002 0.004 0.006 0.008 0.01

time [s]

0

5

10

15

20

25

30

35

40

vo [V

]

after SD-NMPC

before SD-NMPC

voltage reference

(b)

0 0.5 1 1.5 2 2.5 3 3.5 4

time [s] 10-3

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

d

duty cycle of the switch

reference duty cycle

(c)

0 0.5 1 1.5 2 2.5 3 3.5 4

time [s] 10-3

0

1000

2000

3000

4000

5000

6000

7000

8000

J

after SD-NMPC

before SD-NMPC

(d)

Figure 5-3: Results of the buck-boost converter in boost mode after applying the SD-NMPCalgorithm. (a) shows the evolution of the inductor current and (b) the evolution of the outputvoltage. The corresponding control inputs are shown in (c). These results are compared with theinitial sequence based on their values of the objective function in (d).

the computational effort is still dependent on the size of the control horizon and the numberof samples drawn for each control step in the horizon. We have already fixed the size of thecontrol horizon in the determination of the initial sequence in Chapter 4, so we will not changethis parameter in this chapter. But we can vary the number of samples drawn from the controlinput space which we have done for the buck-boost converter in boost mode (Vo = 40 V). Theresults are shown in Table 5-1. The different number of drawn samples are compared basedon the time needed to reach 1% of the objective function of the initial control sequence andthe maximum number of computations (Ncom) needed. The number of computations is thesum of the number of evaluations of the model of the buck-boost converter and the numberof control inputs computed using the local feedback control law. Obviously, the maximum

Table 5-1: Comparison between different number of samples in step of horizon for the buck-boostconverter in boost mode.

Ns 0 5 10 20 50J1% [ms] 3.2 1.35 1.525 1.65 1.65maxNcom 1 233 450 901 2221

Master of Science Thesis R. Koch

Page 128: Masters Thesis: Nonlinear control of electronic converters

108 Sampling-driven nonlinear MPC

0 0.5 1 1.5 2 2.5 3

time [s] 10-3

-50

-40

-30

-20

-10

0

10

20

30

vL [

V]

inductor voltage

average inductor voltage

Figure 5-4: Inductor voltage of the buck-boost converter in boost mode (Vo = 40 V)

number of computations doubles when Ns doubles. However, the objective function does noteven improve when Ns doubles. It only shows improvement between the initial sequence andNs = 5. Therefore, we will stick to 5 samples of the input space per step in the control horizonfor the buck-boost converter.

5-3 Comparing the SD-NMPC control method with a PID con-troller for the buck-boost converter

We will compare the results of the SD-NMPC controller applied to the buck-boost converterwith a proportional-integral-derivative (PID) controller. The PID controller is designed totrack the output voltage of the buck-boost converter specifically and not the inductor currentnor the duty cycle. Eventually, this will come down to the same principle as the equilibriumpoint of the system will not be different.We will design the PID controller based on the frequency response of the system. For linearsystems, the frequency response can be obtained by transforming the states space model intothe Laplace domain. However, for nonlinear systems, this is not as trivial. Therefore, we willuse a more empirical method to approximate the nonlinear system around the equilibriumpoint. This will result in a frequency response function that is a valid approximation ofthe system around this particular equilibrium point. The frequency response function isdetermined by applying a sine stream signal on the input of the buck-boost converter aroundthe equilibrium point. The results are shown in Figure 5-5 for the buck-boost converter inboth modes covered in this thesis. It can be seen that the responses differ in the frequencyof the resonance peak. The reason is that the poles of this system are dependent on itsinput. The resonance frequency decreases when the input of the system becomes larger.Note that it is still possible to design a PID controller that will stabilize both modes of thesystem. Nevertheless, we will design a separate controller for the buck-boost converter inbuck mode (Vo = 10 V) and the buck-boost converter in boost mode (Vo = 40 V) because wewant a controller that fits best for this system when we compare the PID controller with the

R. Koch Master of Science Thesis

Page 129: Masters Thesis: Nonlinear control of electronic converters

5-3 Comparing the SD-NMPC control method with a PID controller for the buck-boost converter 109

SD-NMPC controller.In order to design a PID controller, we will look at the DC-gain of this system. The DC-gain

-20

0

20

40

60

Magnitude (

dB

)

From: d To: vo

101

102

103

104

105

-225

-180

-135

-90

-45

0

45

Phase (

deg)

Bode Diagram

Frequency (rad/s)

(a) In buck mode (Vo = 10 V)

0

20

40

60

Magnitude (

dB

)

From: d To: vo

101

102

103

104

105

-270

-180

-90

0

90

Phase (

deg)

Bode Diagram

Frequency (rad/s)

(b) In boost mode (Vo = 40 V)

Figure 5-5: Frequency response of the buck-boost converter in two different modes.

of the buck-boost converter is around the 40 dB which means that it is finite. When we wanttracking of a reference value, the DC-gain of the open loop system must be infinite. Therefore,we need to add an integrator to the design of the controller. This is given by the followingexpression in the Laplace domain:

Cint(s) = 1s

(5-2)

This results in the frequency response of the open loop system shown in Figure 5-6.We can see from this figure that both systems are stable as the gain margin and phase margin

(a) In buck mode (Vo = 10 V) (b) In boost mode (Vo = 40 V)

Figure 5-6: Frequency response of the open loop system consisting of the buck-boost converterand an integrator in two different modes.

are positive for both systems. However, the bandwidth of both systems are relatively smallwhich will result in a very slowly responding system. In order to increase the bandwidth of

Master of Science Thesis R. Koch

Page 130: Masters Thesis: Nonlinear control of electronic converters

110 Sampling-driven nonlinear MPC

both systems, we have to increase the open loop gain of the system by adding a proportionalgain higher than 1. The consequence of increasing the proportional gain is that both systemsbecome less stable or even unstable. Therefore, we have to add a lead compensator to thesystem to make the system stable when increasing the bandwidth using a proportional gain.The lead compensator is used to increase the phase at a certain frequency. When we placethe lead compensator in the vicinity of the 180° phase drop, the bandwidth can be extendedto frequencies larger than the resonance frequency. In order to increase the phase at thedesired bandwidth (frequency at which the magnitude of the open loop system equals 1), thefollowing formulas are applied:

Clead(s) =sωL

+ 1s

αωL+ 1 (5-3a)

α = 1 + sin (φmax)1− sin (φmax) (5-3b)

ωL = ωmax√α

(5-3c)

where φmax is the maximum phase lead of the lead compensator at ωmax. The maximumphase lead this compensator can achieve is 90° for which α has to be infinite. However, forthe systems plotted in Figure 5-6, we need a phase lead of more than 90° in order to makethe system stable. This can only be done by using a double lead compensator instead of asingle one. This boils down to the square of Clead. Now, φmax only needs to be half of thedesired phase lead. For the design of the PID controller, we want at least 45° phase marginand 6 dB gain margin in order to ensure sufficient stability margins of the system. The valuesof the parameters for the design of the lead compensator are shown in Table 5-2 for bothmodes of the buck-boost converter. We have chosen to set the bandwidth of the buck-boostconverter in buck mode (Vo = 10 V) to 20 krad/s and in boost mode (Vo = 40 V) to 10krad/s. The reason for this difference is that the control input is larger at some time stepswhen the system has to respond faster (result of a larger bandwidth). Because the controlinput is limited between 0 and 1, this can lead to an unstable system although the frequencyresponse indicates stability.Besides, both values of the bandwidth are smaller than half the sampling frequency of the

Table 5-2: Values of the parameters used to design the PID controller for the buck-boostconverter in buck mode (Vo = 10V) and boost mode (Vo = 40V).

Kp ωmax [krad/s] φmax [°] α ωL [krad/s]buck mode 104 20 70 32.16 3.53boost mode 7 10 75 57.7 1.32

system (ωs = 251 krad/s) which means that no aliasing takes place.The final part of the PID controller is the proportional gain (Kp). This gain is determinedsuch that the frequency response plot of the open loop system crosses the 0 dB gain at thedesired bandwidth (ωmax in Table 5-2). These gains are also shown in this table. The resultingfrequency response plots are shown in Figure 5-7.The final controller of the buck-boost converter is obtained by multiplying the proportionalgain with the integrator and the double lead compensator. This results in a controller with3 poles and 2 zeros. Because this controller is proper, we can apply it to the buck-boost

R. Koch Master of Science Thesis

Page 131: Masters Thesis: Nonlinear control of electronic converters

5-3 Comparing the SD-NMPC control method with a PID controller for the buck-boost converter 111

(a) In buck mode (Vo = 10 V) (b) In boost mode (Vo = 40 V)

Figure 5-7: Frequency response of the open loop system consisting of the buck-boost converterand the PID controller designed in this section.

converter. However, this is a continuous time controller which we first have to discretize inorder to use it as a digital controller. There are multiple ways to discretize a continuouscontroller. Among them, Tustin’s method, which is also called the bilinear transformation, isprobably the best way to discretize the controller. Namely, this method maps the jω-axis ofthe Laplace domain to the unit circle in the z-plane. All the coordinates in the left half planeof the Laplace domain (Res) are mapped inside the unit circle of the z-plane and all thecoordinates in the right half plane of the Laplace domain outside this unit circle. This resultsin a controller that is guaranteed to be stable in both domains. The bilinear transformationis given by the following expression:

s = 2Ts

1− z−1

1 + z−1 (5-4)

where Ts is the sampling period used for the system of the buck-boost converter. The resultingdiscrete model of the controller is given by:

CBBC(z−1) = α2KpTs2

4+4ωLTs+ω2LT

2s +(−4+4ωLTs+3ω2

LT2s )z−1+(−4−4ωLTs+3ω2

LT2s )z−2+(4−4ωLTs+ω2

LT2s )z−3

4+4αωLTs+α2ω2LT

2s +(−12−4αωLTs+α2ω2

LT2s )z−1+(12−4αωLTs−α2ω2

LT2s )z−2+(−4+4αωLTs−α2ω2

LT2s )z−3

(5-5)

Now, we can compare the results of the SD-NMPC controller in the previous section with thebuck-boost converter controller with a PID controller. The responses of the inductor currentand the output voltage are plotted in Figure 5-8 for both modes of the buck-boost converter.In both cases, it can be seen that the SD-NMPC converter shows better performance than thePID controller. The reason is the limits set on the control input and the states of the system.The limit on the control input can easily be taken into account by lowering the bandwidth ofthe system as we have done for the PID controller, but it is more difficult to take the limit onthe current and voltage into account. In both cases, the inductor current of the buck-boostconverter controlled by the PID controller violates the maximum allowable current of 2.5 A.Besides, the inductor current is also equal to zero for a quite long time, which results in adip in the output voltage of the converter. This makes the settling time of this system longer

Master of Science Thesis R. Koch

Page 132: Masters Thesis: Nonlinear control of electronic converters

112 Sampling-driven nonlinear MPC

which affects the performance of the controller. This altogether shows the benefits of MPCcontrol on systems with constraints on states and inputs regarding performance and stability.

0 0.5 1 1.5 2 2.5

time [s] 10-3

0

0.5

1

1.5

2

2.5

i L [A

]

PID controller

SD-NMPC controller

0 0.5 1 1.5 2 2.5

time [s] 10-3

0

1

2

3

4

5

6

7

8

9

10

11

vo [V

]

PID controller

SD-NMPC controller

(a) In buck mode (Vo = 10 V)

0 0.002 0.004 0.006 0.008 0.01

time [s]

0

0.5

1

1.5

2

2.5

3

3.5

i L [A

]

PID controller

SD-NMPC controller

0 0.002 0.004 0.006 0.008 0.01 0.012 0.014

time [s]

0

5

10

15

20

25

30

35

40

vo [V

]

PID controller

SD-NMPC controller

(b) In boost mode (Vo = 40 V)

Figure 5-8: Responses of the inductor current and the output voltage of the buck-boost converterwhen using the PID controller and the SD-NMPC controller.

5-4 The three-phase VSI

After we have applied the SD-NMPC algorithm to the model of the buck-boost converter,we will apply it to the three-phase voltage source inverter (VSI) connected to a permanent-magnet synchronous motor (PMSM) as described in Section 2-2. The local controller withcorresponding DOA used for this system are computed as described in Section 3-3 and theinitial control sequence as in Section 4-2. The obtained data is used to apply Algorithm 4 forthis system. The objective function is chosen such that the most important parameters get

R. Koch Master of Science Thesis

Page 133: Masters Thesis: Nonlinear control of electronic converters

5-4 The three-phase VSI 113

the highest weight. This results in the following expression of the objective function:

J(·) =Nc−1∑i=0

(~xk+i+1 − ~xe)TQobj(~xk+1+i − ~xe) + (~uk+i − ~ue)TRobj(~uk+i − ~ue) (5-6a)

Qobj =

1 0 00 1 00 0 10

, Robj =[1 00 1

](5-6b)

Note that this objective function is comparable to the one used for the initial sequence ofthe three-phase VSI except for the control input term. The highest weight is placed on therotational velocity of the motor. The reason is that the whole control system is designed totrack this velocity.Also for this system, we set the value of the control horizon to 5 which is equal to its valueused to compute the initial sequence. The number of samples drawn each control step is alsoset to 5 (Ns = 5) which is equal to this value for the buck-boost converter. In contrary tothe buck-boost converter, the control inputs do not change much at every iteration as can beseen from the results of the initial sequence. This means that besides the uniform distribu-tion, other distribution can result in more optimal control inputs of the three-phase VSI thanthe initial sequence. Among them are the trapezoidal distribution and the truncated normaldistribution. The main difference between these distributions is the probability of a sample inthe input space. In case of the uniform distribution, there is an equal probability of a sampledcontrol input over the whole input space. This is in contrary with the two other distribution,where the probability of a sampled control input in the vicinity of the control input from theinitial sequence or determined using the local control law is larger than a sampled controlinput further away from the initial control input. This difference in probability is biggerin case of the truncated normal distribution than the trapezoidal distribution. The effect ofchoosing either the uniform distribution or one of the other distributions is that more samplesare drawn closer to the initial control input in case of the trapezoidal and truncated normaldistribution. In case of the three-phase VSI, this results in more updates of the control inputusing the SD-NMPC algorithm and also a better performing control of the system because ofa faster decreasing objective function. We have obtained the best results using the truncatednormal distribution by setting the standard deviation to 0.1 · Vin√

3 for the magnitude of thecontrol input and 0.01 · 2π for the angle. More information about these distributions can befound in Appendix B.The results of the application of the SD-NMPC algorithm to the three-phase VSI connectedto a PMSM are shown in Figure 5-9. The first thing that stands out in these plots is therough behavior of the control inputs and the stator currents. This behavior can be explainedin the same way as for the buck-boost converter. The SD-NMPC controller is a suboptimalcontrol method, which means that the solution is closer to the real optimum than the initialcontrol sequence but it cannot be guaranteed to be the optimal. Random sampling causesthe rough behavior because sometimes a sample results in a control input that is closer tothe real optimum and sometimes it does not. Increasing the number of samples drawn percontrol step (Ns) will mitigate this rough behavior but it will also increase the number ofcomputations per iteration which results in a larger computational time. This does not seempossible, because already a very large number of computations are needed to compute thecontrol input because of the long initial sequence (more than 4000 steps). Moreover, whenwe look at the phase current as we measure them in real life (in the abc-frame), it is much

Master of Science Thesis R. Koch

Page 134: Masters Thesis: Nonlinear control of electronic converters

114 Sampling-driven nonlinear MPC

(a)

0 0.2 0.4 0.6 0.8 1

time [s]

20

40

60

80

100

120

140

r [A

]

after SD-NMPC

before SD-NMPC

reference speed

(b)

(c)

0 0.1 0.2 0.3 0.4 0.5

time [s]

0

1

2

3

4

5

6

7

8

9

10

J

105

after SD-NMPC

before SD-NMPC

(d)

Figure 5-9: Results of the three-phase VSI with a PMSM as load after applying the SD-NMPCalgorithm. (a) shows the evolution of the stator currents in the dq-frame and (b) the evolutionof the rotational velocity of the motor. The corresponding control inputs are shown in (c) inthe dq-frame. These results are compared with the initial sequence based on their values of theobjective function in (d).

smoother as shown in Figure 5-10. This is also the reason that we do not see any roughbehavior in plot of the rotational velocity of the motor.As we have seen in the previous chapter, the size of the initial control sequence is very large(more than 4000). This results in a large number of computations needed to be done for thedetermination of the next control input in the online part of the SD-NMPC algorithm. Thiswill even become problematic because of the limited computational time of this system. Inorder to solve this problem, we can add intermediate equilibrium points to this system. Thiswill decrease the size of the initial sequence, and therefore also the number of computationsper iteration, but it will increase the settling time of the controller. Moreover, multiple localcontrollers with corresponding DOA have to be found in order to apply the SD-NMPC con-troller. We have applied this approach to the system which results in the responses shownin Figure 5-11. Before the system reaches its equilibrium point, there have been 5 differentequilibria used for the construction of the initial sequence. These are shown in Table 5-3.Note that the system never reaches these equilibria. This is due to two reasons. First of all,we change the equilibrium to one which is closer to the actual equilibrium point when the

R. Koch Master of Science Thesis

Page 135: Masters Thesis: Nonlinear control of electronic converters

5-4 The three-phase VSI 115

0 0.05 0.1 0.15 0.2 0.25

time [s]

-200

0

200

i a [

A]

0 0.05 0.1 0.15 0.2 0.25

time [s]

-200

0

200

i b [

A]

0 0.05 0.1 0.15 0.2 0.25

time [s]

-200

0

200

i c [

A]

Figure 5-10: Phase currents in the abc-frame.

rotational velocity (the slowest state of this system) has reached a certain boundary value.These boundary values are chosen such that the next computed initial sequence is not toolong, but not too close to the corresponding equilibrium point that it takes too much timeto reach the actual equilibrium point. These boundary values are also shown in Table 5-3.The second reason that the system never reaches an intermediate equilibrium point is be-cause the objective function used in the SD-NMPC algorithm, is still based on the actualequilibrium point. This means that this objective function is minimal when this equilibriumpoint is reached. So, although the initial sequence is constructed such that the system movestowards an intermediate equilibrium point, the SD-NMPC algorithm will always improve thissequence such that it moves toward the actual equilibrium point.When we compare the results shown in Figure 5-11 with the results in Figure 5-9 we see

Table 5-3: Intermediate equilibrium points and boundary values of the three-phase VSI connectedto a PMSM with reference speed of 140 rad/s.

(intermediate) reference speed 75 100 115 125 135 140boundary speed 50 80 100 120 132 -size of initial sequence 73 67 66 66 67 1

that the response after applying the SD-NMPC algorithm for the control approach with in-termediate equilibria is much more improved than using this approach without intermediateequilibria. This is of course the cause of the difference between the objective of the initialsequence and the SD-NMPC algorithm. When we compare the responses of the states afterapplying SD-NMPC, we see barely any differences. The settling time has slightly increased,from 0.65 seconds to 0.66 seconds, but the response of the stator current states are almostequal. The main advantage of the approach with intermediate equilibria is the number ofonline computations needed to determine the next control input. Because the size of the ini-

Master of Science Thesis R. Koch

Page 136: Masters Thesis: Nonlinear control of electronic converters

116 Sampling-driven nonlinear MPC

(a) (b)

(c)

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8

time [s]

0

1

2

3

4

5

6

7

8

9

10

J

105

after SD-NMPC

before SD-NMPC

(d)

Figure 5-11: Results of the three-phase VSI with a PMSM as load after applying the SD-NMPCalgorithm using intermediate equilibrium points. (a) shows the evolution of the stator currentsin the dq-frame and (b) the evolution of the rotational velocity of the motor. The correspondingcontrol inputs are shown in (c) in the dq-frame. These results are compared with the initialsequence based on their values of the objective function in (d).

tial sequence has been reduced significantly, the computational time has been reduced muchas well. However, the initial sequence must now be computed online instead of offline whichmeans that at certain time steps, the computational time is much larger. This should notbe an issue since successive linearization is a relatively fast method to determine the initialcontrol sequence. Therefore, the approach including the intermediate equilibria is preferredwhen applying the SD-NMPC algorithm for the system of the three-phase VSI with a PMSMload when the size of the initial sequence is large.

5-5 Comparing the SD-NMPC control method with PI controllersfor the three-phase VSI connected to a PMSM

In this section, we will compare the results of the previous section with the response ofthe three-phase VSI connected to a PMSM when it is controlled using three proportional-

R. Koch Master of Science Thesis

Page 137: Masters Thesis: Nonlinear control of electronic converters

5-5 Comparing the SD-NMPC control method with PI controllers for the three-phase VSI connected to aPMSM 117

integral (PI) controllers. The three PI controllers are designed for the three states of thissystem which are the d-component of the stator current, the q-component of the stator currentand the rotational velocity. The locations of the PI controllers are shown in Figure 5-12. Two

Figure 5-12: Schematic overview of the PMSM system controlled by three PI controllers.

of the three PI controllers are designed to control the input voltages of the system directlybased on the measured stator currents. The third PI controller is an additional controllerthat controls the current reference of the q-phase based on measurements of the rotationalvelocity of the motor. This third PI controller is added in order to make the control systemtracking a reference speed. If we remove this third controller, the control system will nottrack the reference speed but the reference current which replaces this PI controller. In thatcase, the system is torque controlled instead of speed controlled.The PI controllers are given by the following expression:

CPI(s) = Kp(1 + ωi

s

)(5-7)

where Kp is the proportional gain of the controller and ωi the location of the zero. This PIcontroller will be applied to all of the three controllers of this system. The first two controllersare those which directly control the input voltage of the three-phase VSI. They are basedon the stator currents of the motor and, therefore, are the two fast responding states of thissystem. The frequency response of these states with respect to their corresponding controlinput (vd corresponds to id and vq to iq) can simply be determined based on the modelderived in Section 2-2, because there is a linear relationship between these parameters. Thisresults in the frequency response as shown in Figure 5-13 which we also determined usinga sine stream signal. We can see that the frequency response of both systems consists of asingle pole at −Rs

Ldfor the transfer function of the d-component of the stator and −Rs

Lqfor the

q-component. So, the systems themselves are stable because their pole is located in the lefthalf plane of the Laplace domain. However, in both cases, the DC-gain is finite. This meansthat the system is not able to track a reference value which is the reason why we want to usethe PI controller to control this system. From these bode plots, we can also see that theseare the fast responding states based on the bandwidth of the systems. Besides of trackinga reference value, we also want these systems to respond as fast as possible. Therefore, wehave to increase the bandwidth by increasing the proportional gain of the controller. Theresulting values of the tuning parameters of these controllers are shown in Table 5-4 and theircorresponding open loop gain is shown in Figure 5-14. Note that the bandwidth of bothsystems has increased, but it is not too large in order to prevent aliasing due to sampling ofthe stator currents. Another reason why the proportional gain cannot be too large is thatthe stator voltages are limited by the voltage supply of the inverter. Therefore, we have tomake sure that these voltages are not clipped by the input voltage because that might affect

Master of Science Thesis R. Koch

Page 138: Masters Thesis: Nonlinear control of electronic converters

118 Sampling-driven nonlinear MPC

(a) d-component of the stator (b) q-component of the stator

Figure 5-13: Frequency response of the stator currents with respect to the stator voltages indq-frame.

the stability of the system.After the PI controllers of the stator voltages have been designed, we can design the PI

(a) d-component of the stator (b) q-component of the stator

Figure 5-14: Frequency response of the open loop responses of the stator system with PIcontroller in dq-frame

Table 5-4: Tuning parameters of the PI controllers used for the control of the three-phase VSIconnected to a PMSM.

d component stator q component stator rotational velocityKp 1.2 0.58 1ωi [rad/s] 4 · 103 4 · 103 8

controller for the rotational velocity of the motor. Also this transfer function can easily bederived from the model elaborated in Section 2-2. Assuming that the d-component of the

R. Koch Master of Science Thesis

Page 139: Masters Thesis: Nonlinear control of electronic converters

5-5 Comparing the SD-NMPC control method with PI controllers for the three-phase VSI connected to aPMSM 119

stator current is zero, this transfer function is even linear. The resulting frequency responseis shown in Figure 5-15a, where we can see that also this system has only one pole. This poleis located in the half-left plane of the Laplace domain (at −DL

JL) which makes also this system

stable. The only reason to apply the PI controller is to ensure reference tracking (by makingthe DC-gain infinite) and make the system respond faster (by increasing the bandwidth).The resulting open loop gain is shown in Figure 5-15b. Note that the bandwidth is still muchsmaller than that of the other two open loop frequency responses. This is the reason why thisstate is much slower than the other two. We cannot make this state respond much faster,because that will directly result in a much higher peak current though the stators of themotor. This can destroy the motor which is the reason why we have limited this current. Thetuning parameters of the PI controller ensuring fast reference speed tracking are also shownin Table 5-4.Before we can apply this controller to the system, we have to discretize the controller. This

(a) Transfer function of the plant(b) Open loop frequency response of the plant with PIcontroller

Figure 5-15: Frequency response of the open loop responses of the rotational velocity of themotor with respect to the q component of the stator current with and without PI controller.

is done using the same method as we used for the buck-boost converter, the Tustin method.The resulting expression of each PI controller is given by:

Kp2Tsωi + 2 + (Tsωi − 2)z−1

1− z−1 (5-8)

Now we can apply this controller to the system of the PMSM. This results in the responsesshown in Figure 5-16. The system controlled by the PI controllers has a lower maximumtorque than the system controlled by the SD-NMPC controller which can be seen at theq-component of the stator current. This results in a lower increase of the rotational speed.However, the settling time of the system controlled by the PI controllers is 17% smaller thanthe settling time of the system controlled by the SD-NMPC controller. The reason for thisis that the q component of the stator current is from around 0.33 seconds somewhat largerthan its equilibrium value while this current has already reached its equilibrium value for theSD-NMPC controller after 0.33 seconds. A larger q component of the stator current means alarger torque and, therefore, also a larger increase in the rotational velocity.

Master of Science Thesis R. Koch

Page 140: Masters Thesis: Nonlinear control of electronic converters

120 Sampling-driven nonlinear MPC

(a) Stator currents in dq-frame

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8

time [s]

20

40

60

80

100

120

140

r [ra

d/s

]

SD-NMPC controller

PI controllers

(b) Rotational velocity of the motor

Figure 5-16: Comparison of the states of the PMSM between using PI controllers or the SD-NMPC controller.

Based on only this reference speed, the response using the PI controllers seems better than theresponse using the SD-NMPC controller. However, when we change the reference speed to 80rad/s, the response of the system controlled by the PI controllers show non-minimum phasebehavior as shown in Figure 5-17. This behavior can be explained based on the fact that thesystem itself is nonlinear. Although the transfer functions determined for the design of thePI controllers are linear, the system itself is not. The deviation from the nonlinear modelis more visible at the beginning when the stator current are not close to their equilibriumpoints. Note that, despite of the negative rotational velocity at the beginning of the response,the settling time of the system controlled by the PI controller is still shorter than the settlingtime of the the system controlled by the SD-NMPC controller.In contrary to the buck-boost converter, it is not easy to determine which controller shows

(a) Stator currents in dq-frame

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8

time [s]

-10

0

10

20

30

40

50

60

70

80

r [ra

d/s

]

SD-NMPC controller

PI controllers

(b) Rotational velocity of the motor

Figure 5-17: Comparison of the states of the PMSM between using PI controllers or the SD-NMPC controller when the reference speed is set at 80 rad/s.

the best performance. That is because it is dependent on what you assume as the best

R. Koch Master of Science Thesis

Page 141: Masters Thesis: Nonlinear control of electronic converters

5-6 Summary 121

performance. In case a shorter settling time results in a better performance, the PI controlleris better. However, when we use a different objective function for the SD-NMPC controller,the settling time can be shorter than shown for the case used in this chapter.In general, we can conclude that the PI controller outperforms the SD-NMPC controller whenit comes down to the computational complexity. Although the SD-NMPC controller has a lowcomputational complexity for an MPC controller, it cannot compete against a PI controllerwhich only needs one simple computation to determine the next control input. On the otherhand, the SD-NMPC controller will always satisfy the limitations on states and inputs of thesystem as long as the control problem is solvable which this cannot be guaranteed for the PIcontroller. Especially for non-linear systems, the behavior of the system is sometimes difficultto predict and can deviate from the linearized model.

5-6 Summary

In this chapter, we have constructed the algorithm of the SD-NMPC controller and appliedto the system of the buck-boost converter and the three-phase VSI with a PMSM motor asload based on the local controller and initial sequence determined in the previous chapters.Thereafter, we have compared the results of this controller with a standard PID controller.The main benefits of the SD-NMPC controller with respect of the PID controller is theguarantees regarding limitations on states and inputs. The main drawback of the SD-NMPCcontroller is the computational complexity. Although it is better than other MPC controllers,it cannot compete with the PID controller based on this aspect.

Master of Science Thesis R. Koch

Page 142: Masters Thesis: Nonlinear control of electronic converters

122 Sampling-driven nonlinear MPC

R. Koch Master of Science Thesis

Page 143: Masters Thesis: Nonlinear control of electronic converters

Chapter 6

Conclusions and recommendations

The aim of the thesis is to apply sampling-driven nonlinear model predictive control (MPC)(SD-NMPC) to power electronic converters and in particular the buck-boost converter con-nected to a resistive load and a three-phase voltage source inverter (VSI) connected to apermanent-magnet synchronous motor (PMSM). The results are compared to a proportional-integral-derivative (PID) controller in order to draw conclusions about the SD-NMPC con-troller.

6-1 Conclusions

In order to apply the SD-NMPC controller to the buck-boost converter and the three-phaseVSI connected to a PMSM, we had to determine a local controller with corresponding domainof attraction (DOA) and an initial sequence steering the states of these systems into this DOA.We have seen that different systems may result in different choices for the determination ofthe local controller and initial sequence. This is mainly due to the size of the system. Forthe buck-boost converter, which is a two state system with single input, the best option isto determine a linear controller based on a linear Lyapunov function for the local controller(Section 3-2). The reason is that this results in the largest possible DOA which will makethe initial sequence shorter. For the three-phase VSI connected to a PMSM, which is a threestate system with two inputs, this method has not been possible because of the large numberof constraints for the linear control problem. This is caused by the large number of vertices ofthe proposed DOA. Instead, the local controller is determined based on a quadratic Lyapunovfunction, which also results in a linear controller (Section 3-3). This method gives the bestperformance for this system regarding computational time and size of the obtained DOA.Besides the DOA, also the best option for the determination of the initial sequence of theSD-NMPC controller differs between the two systems. For the buck-boost converter, thelinear parameter varying MPC (LPV-MPC) algorithm shows the best performance regardingcomputational time and obtained size of the initial sequence. Although successive linearizationis a faster method, the size of the initial sequence is much longer than when using LPV-MPC.

Master of Science Thesis R. Koch

Page 144: Masters Thesis: Nonlinear control of electronic converters

124 Conclusions and recommendations

For the three-phase VSI connected to a PMSM, this is different. The size of the initialsequence when using LPV-MPC is not significantly smaller than using successive linearization.Moreover, because of the fact that the VSI has three states and two inputs, the amount ofconstraints for the LPV-MPC control problem is much larger than that of the buck-boostconverter. This will also make the computational time much longer. Therefore, successivelinearization is preferred over LPV-MPC.Using these controllers and initial sequences, we have applied the SD-NMPC controller. Alsoin the application of this controller, this has resulted in differences between the two systems.The buck-boost converter uses a uniform distribution to sample control inputs from the inputspace in order to obtain a more optimal control sequence. The reason is that the change incontrol inputs is large in the beginning of the control sequence. Therefore, a more optimalcontrol sequence can be obtained when more variation in the control inputs is possible. Thisis in contrast with the VSI connected to a PMSM where the truncated normal distributionresults in a more optimal control sequence. In this application, the difference between thecontrol inputs is much smaller for which this distribution is more favorable. Besides thedifference in the probability distribution, the initial control sequence of the VSI system ismuch larger than the initial sequence of the buck-boost converter. Therefore, the systemis divided into several intermediate equilibrium points which will decrease the size of theindividual initial control sequences but will increase the number of local controllers needed todesign the SD-NMPC controller. Eventually, the resulting behavior of the system does notdiffer much from the method without intermediate equilibria while the online computationaltime is much shorter.Thereafter, we compared the SD-NMPC controller applied to the buck-boost converter andthe three-phase VSI connected to a PMSM with a PID controller. One of the advantagesof the SD-NMPC controller is the ability to construct a (sub)optimal controller that cansatisfy the desired constraints on input and states and achieve almost optimal control withrespect to a chosen objective function. This is much harder for a PID controller, especiallywhen the model of the system is nonlinear. Another advantage of the SD-NMPC controller isthe ability to perform all its online computations within the limited time set by the samplingperiod. However, it cannot compete with the PID controller based on the computational time,especially when we also consider the offline part of the SD-NMPC controller. It is possibleto design one PID controller to control a power converter from any initial state to a widerange of equilibrium points. However, if we want to apply the online part of the SD-NMPCcontroller, we always have to perform the offline part whenever we set a different initial stateof equilibrium point. Therefore, it always takes some time before we can apply the online partof the SD-NMPC controller although we have accomplished to diminish the computationaltime of the offline part of the SD-NMPC controller. In conclusion, the application of theSD-NMPC controller to power electronic converters will result in a fast controller. The offlineas well as the online computational time is short. Moreover, the resulting control sequencesatisfies the constraints set on the states and inputs and it is close to the optimal controlsequence of the system. Therefore, the SD-NMPC controller is a great way to apply a MPCcontroller to power electronic systems and to nonlinear systems with limited computationaltime in general.

R. Koch Master of Science Thesis

Page 145: Masters Thesis: Nonlinear control of electronic converters

6-2 Future work 125

6-2 Future work

This thesis has elaborated the theoretical design of the SD-NMPC controller for power con-verters. In order to apply these controller to real life systems, several steps are needed tobe done. Take for example the buck-boost converter. It is not always possible to measurethe current flowing through the induction of the buck-boost converter, especially when anoff-the-shelf converter is used. Therefore, a nonlinear observer has to be designed in order todetermine this current. Moreover, the measured or observed values of the inductor currentand the output voltage are based on the real system which behaves slightly different withrespect to the model derived in Section 2-1. This is due to several assumptions we havemade in the derivation of this model. We have assumed that the inductor and capacitordo not dissipate energy, while in reality some of the stored energy in these components isdissipated. Besides this, also the approximation of the diode is not fully accurate. We haveapproximated the diode by a constant voltage drop (Vd) while in reality the voltage over thediode in forward direction of the diode is dependent on the current flowing though it. Also,the behavior of the switch is slightly different from the assumption made in Section 2-1 inorder to derive the model. Therefore, the real system will operate different compared withthe model of the buck-boost converter in Section 2-1. In order to compensate for this modeland ensure that the systems states will still satisfy the constraints and reach the referencevalues, research has to be done to determine the robustness of this controller or adaptationsare needed to be performed to make this controller robust. Another method is to incorporatethe real behavior of these components in the design of the model, but that will eventuallylead to a much more complicated model and maybe even an unnecessary difficult model forthe SD-NMPC controller. The imperfection of the model will also affect the design of theSD-NMPC controller for other converters like the VSI.Another research topic for the implementation of the SD-NMPC controller for power electronicconverters is the physical implementation in a microcontroller or microprocessor. Althoughthis seems a trivial task, there are still challenges that have to be overcome. One of them isthe actual implementation of the algorithms used to design the SD-NMPC controller. Howcan the controller be implemented such that it is as fast as possible, or at least fast enough,and ensure that it operates as efficient as possible. Moreover, the hardware implementationalso entails other implications. Among them is delays between sensing and actuating. Thismight be large especially when the sampling time is very small. In order to deal with delays,it has to be incorporate in the design of the model and the SD-NMPC controller.

6-3 Contributions

As SD-NMPC is a relative new concept in the design of MPC for nonlinear systems introducedin [8], the application of this controller to the power electronic converters covered in thisthesis is already a new concept in the control of power electronic converters. But besides theapplication itself, we have also contributed to various concepts of the SD-NMPC algorithm.These contributions are related to the three steps needed to apply the SD-NMPC algorithm:

1. Determination of the local controller with corresponding DOA

Master of Science Thesis R. Koch

Page 146: Masters Thesis: Nonlinear control of electronic converters

126 Conclusions and recommendations

2. Determination of an initial control sequence steering the system from its initial statetowards the DOA computed in the first step

3. Applying the online SD-NMPC algorithm in order to obtain a suboptimal control se-quence

For the first step, we have applied four different methods to these power electronic converters.Three out of the four methods have already been applied to either quadratic or bilinear sys-tems or other type of nonlinear systems and one of these methods (Section 3-3) is introducedin this thesis. This method uses a quadratic Lyapunov function to determine a linear localfeedback controller with corresponding DOA for a quadratic system. It gives more possibili-ties to choose from when applying the SD-NMPC controller to these type of systems. In caseof the three-phase VSI connected to a PMSM this method turned out the be the best choiceamong the methods described in this thesis.In the determination of the initial sequence, [8] lacks in possible methods that can be usedfor real life applications. In this thesis, we have elaborated three different methods which allhave been used before in controlling nonlinear systems but never in scope of the SD-NMPCcontroller.The third step of the SD-NMPC controller has been based on the online SD-NMPC algo-rithm described in [8]. Based on the application, we have modified this algorithm in order toguarantee a low online computational time. This has led to the use of intermediate equilibriaand a control horizon which is smaller than the size of the initial control sequence.

R. Koch Master of Science Thesis

Page 147: Masters Thesis: Nonlinear control of electronic converters

Appendix A

Additional data and results

A-1 Domain of attraction

A-1-1 The set P needed to apply Algorithm 2 to the buck-boost converter inbuck mode

P = ~x ∈ R2|~aTP,i~x ≤ 1, i ∈ Z[1,12] (A-1a)

AP =[1.3965 1.3965 3.8152 3.8152 5.2117 5.2117 −1.3965 −1.3965 −3.8152 −3.8152 −5.2117 −5.2117

0.1 −0.1 −0.0732 0.0732 0.0268 −0.0268 0.1 −0.1 0.0732 −0.0732 0.0268 −0.0268

](A-1b)

where aP,i is the ith column of AP.

A-1-2 The set P needed to apply Algorithm 2 to the buck-boost converter inbuck mode based on a voltage range of 5 V to 15 V

P = ~x ∈ R2|~aTP,i~x ≤ 1, i ∈ Z[1, 12] (A-2a)

AP =[1.3965 1.3965 3.8152 3.8152 5.2117 5.2117 −1.3965 −1.3965 −3.8152 −3.8152 −5.2117 −5.2117−0.2 0.2 0.1464 −0.1464 0.0536 −0.0536 0.2 −0.2 0.1464 −0.1464 0.0536 −0.0536

](A-2b)

where aP,i is the ith column of AP. The results of applying Algorithm 3 to the system of thebuck-boost converter with edited voltage range resulted in a value of ρ equal to 0.9886 whichis smaller than 1.

Master of Science Thesis R. Koch

Page 148: Masters Thesis: Nonlinear control of electronic converters

128 Additional data and results

A-1-3 The set P needed to apply Algorithm 2 to the buck-boost converter inboost mode

P = ~x ∈ R2|~aTP,i~x ≤ 1, i ∈ Z[1, 12] (A-3a)

AP =[

0.2727 1.0178 1.0178 −0.2727 −1.0178 −1.0178 0.2727 0.7451 0.7451 −0.2727 −0.7451 −0.7451−0.1000 0.0268 −0.0268 0.1 −0.0268 0.0268 0.1 −0.0732 0.0732 −0.1000 0.0732 −0.0732

](A-3b)

where aP,i is the ith column of AP.

A-1-4 Model of the buck-boost converter for the determination of the localcontroller in Section 3-4

~xk+1 = A0~xk +B(~xk)uk (A-4a)

B(~xk) = B0 +n∑i=1

~x(i)k Bi (A-4b)

In case the buck-boost converter operates in buck mode (Vo = 10 V), these matrices are givenby:

A0 =[

1 −0.03790.7403 0.9858

], B0 =

[1.7849−0.218

], (A-5a)

B1 =[

0−1.1364

], B2 =

[0.0581

0

](A-5b)

and when the buck-boost converter operates in boost mode (Vo = 40 V), these matrices aregiven by:

A0 =[

1 −0.01920.3744 0.9858

], B0 =

[3.5291−1.7244

], (A-6a)

B1 =[

0−1.1364

], B2 =

[0.0581

0

](A-6b)

A-1-5 Results of applying the control problem of Theorem 4 to the system ofthe buck-boost converter in boost mode

P =[1.3919 0

0 0.0134

](A-7)

F0 =[−0.2499 0.617

], F1 =

[0.0036 0.038

], F2 =

[0.0028 −0.0094

](A-8a)

F =[−1.0526 · 10−4 −1.3649 · 10−3 −9.5718 · 10−5 5.8052 · 10−4

−9.6582 · 10−5 −2.2125 · 10−3 −1.9174 · 10−4 6.05 · 10−4

](A-8b)

R. Koch Master of Science Thesis

Page 149: Masters Thesis: Nonlinear control of electronic converters

A-1 Domain of attraction 129

A-1-6 Model of the three-phase VSI connected to a PMSM for the determina-tion of the local controller in Section 3-4

~xk+1 = A0(~xk)~xk +B0~uk (A-9a)

A(~xk) = A0 +n∑i=1

~x(i)k Ai (A-9b)

A0 =

0.5714 0.0264 0.034−0.2673 −0.3636 −0.47240.0007 0.0014 0.9994

, B0 =

0.8571 00 2.72730 0

, (A-9c)

A1 =

0 0 00 0 00 3.7895 · 10−6 0

, A2 =

0 0 00 0 00 0 0

, A3 =

0 1.8857 · 10−4 0−1.9091 · 10−3 0 0

0 0 0

(A-9d)

A-1-7 Results of applying the control problem of Theorem 4 to the system ofthe three-phase VSI connected to a PMSM

F0 =[−11074 205.98 −21.3822115.9 288.88 17.075

], F1 =

[−1.4154 · 10−2 −3.3468 · 10−2 9.2707 · 10−4

6.0814 · 10−4 −4.1314 · 10−3 −1.3343 · 10−3

],

(A-10a)

F2 =[1.0259 1.0724 −5.1769 · 10−2

0.3816 0.23 −5.2208 · 10−4

], F3 =

[3.6496 2.0616 −0.142214.1955 0.8403 −1.3512 · 10−3

](A-10b)

F =

−1.649 · 10−2 −4.9620 · 10−3 8.8126 · 10−5 −3.6441 · 10−5 9.7932 · 10−6 9.8151 · 10−6 8.5721 · 10−5 −2.7721 · 10−4 1.9626 · 10−6

−8.6694 · 10−4 −6.7814 · 10−4 1.1386 · 10−6 5.1243 · 10−6 −1.4614 · 10−5 −2.3491 · 10−6 −2.1939 · 10−6 −1.8556 · 10−5 7.5572 · 10−8

−1.0179 · 10−5 8.8215 · 10−6 −6.2413 · 10−6 −1.0167 · 10−2 1.8081 · 10−3 −2.9267 · 10−5 9.7631 · 10−3 2.8592 · 10−3 −1.8801 · 10−5

1.6303 · 10−6 1.2932 · 10−6 −8.0668 · 10−7 1.4671 · 10−4 −5.0943 · 10−4 1.0688 · 10−7 3.7281 · 10−4 4.675 · 10−4 4.164 · 10−5

−5.7787 · 10−5 1.4378 · 10−4 7.003 · 10−6 3.168 · 10−2 9.5639 · 10−3 −3.0089 · 10−4 −7.5746 · 10−2 7.9795 · 10−3 −2.3084 · 10−4

−3.8597 · 10−6 −1.3161 · 10−5 −8.2389 · 10−6 2.2308 · 10−3 −2.4963 · 10−3 −3.8625 · 10−5 −5.7335 · 10−2 −1.9185 · 10−3 1.6522 · 10−6

(A-10c)

Master of Science Thesis R. Koch

Page 150: Masters Thesis: Nonlinear control of electronic converters

130 Additional data and results

R. Koch Master of Science Thesis

Page 151: Masters Thesis: Nonlinear control of electronic converters

Appendix B

Used distributions for the applicationof the SD-NMPC controller to the

system of the three-phase VSIconnected to a PMSM

In this chapter, we will describe the three probability distributions covered in the applica-tion of the sampling-driven nonlinear model predictive control (MPC) (SD-NMPC) methodto the system of the three-phase voltage source inverter (VSI) connected to a PMSM. Wewill start with the most general used distribution in sampling-driven control, the uniformdistributions. Thereafter, we will also consider the trapezoidal distribution and the truncatednormal distribution.

B-1 Uniform distribution

The most common distribution used for SD-NMPC is the uniform distribution. This dis-tribution ensures that all outcomes within the closed interval is equally likely. This resultsin the fact that the mode of the uniform distribution is any value within the interval. Theprobability density function is of the uniform distribution is given by:

p(x) = 1b− a

, x ∈ R[a,b] (B-1)

Note that the Halton set is a uniform distributions within the interval of 0 and 1. So, in orderto use the uniform distribution, no transformation between distributions has to be takenplace when sampling with the Halton sequence. However, the domain of the input space ofthe three-phase VSI connected to a permanent-magnet synchronous motor (PMSM) is a circlewhich means that we have to use polar coordinates in order to sample uniform within this set.

Master of Science Thesis R. Koch

Page 152: Masters Thesis: Nonlinear control of electronic converters

132Used distributions for the application of the SD-NMPC controller to the system of the three-phase VSI

connected to a PMSM

This transformation can be done by using (3-10). This results in the following expressionsfor the control inputs:

~u(1) = Vin√3

√~ς(1) cos

(2π~ς(2)

)(B-2a)

~u(2) = Vin√3

√~ς(1) sin

(2π~ς(2)

)(B-2b)

where ~ς ∈ R2[0,1]. We have plotted two possible uses of the uniform distribution in Figure B-

1. The first option has already been highlighted in this section. The second options usessmaller bounds on the samples of the uniform distribution. These samples (ε) are scaled with

σ =[0.10.1

]and shifted with µ =

[0.72530.0997

]such that all samples are drawn within a small

region around the initial control input(~u =

[100 V10 V

]).

-150 -100 -50 0 50 100 150

u(1)

[V]

-150

-100

-50

0

50

100

150

u(2

) [V

]

(a) Uniform distribution over the whole input space

-150 -100 -50 0 50 100 150

u(1)

[V]

-150

-100

-50

0

50

100

150

u(2

) [V

]

(b) Uniform distribution over a part of the input space

Figure B-1: Two possible implementations of the uniform distribution when sampling from theinput space.

B-2 Trapezoidal distribution

Another distribution that can be covered for the application of the SD-NMPC controllerfor the three-phase VSI connected to a PMSM is the trapezoidal distribution. Also thisdistribution is bounded between two values (a and b). However, not all outcomes are equallylikely. So, the mode is not given by every value within this interval, but by the values withinthe interval of c and d where c ≥ a and d ≤ b. The probability density function between c andd is constant and outside this interval the probability density function is linearly increasingor decreasing such that the value of the probability density function is 0 in a and b. This

R. Koch Master of Science Thesis

Page 153: Masters Thesis: Nonlinear control of electronic converters

B-3 Truncated normal distribution 133

results in the following expression of the probability density function:

p(x) =

2

b+d−a−cx−ac−a , if a ≤ x < c

2b+d−a−c , if c ≤ x < d

2b+d−a−c

b−xb−d , if d ≤ x ≤ b

(B-3)

Note that if a = c and b = d, the trapezoidal distribution equals the uniform distribution.In order to use the trapezoidal distribution for the SD-NMPC controller, the uniform dis-tributed samples drawn from the Halton sequence must be transformed into the trapezoidaldistributions. This can be done by equalizing the two cumulative distribution functions. Thisresults in the following equation:

x =

√(1 + σ)(µ− σ

2 )ς , if 0 ≤ ς < µ−σ21+σ

12

((1 + σ)ς + µ− σ

2

), if µ−

σ2

1+σ ≤ ς <µ+ 3

2σ1+σ

1−√

(1 + σ)(1− µ− σ2 )(1− ς), if µ+ 3

2σ1+σ ≤ ς ≤ 1

(B-4)

where a = 0, b = 1, c = µ− σ2 , d = µ+ σ

2 and ς = √ς. Using this equation, we can derive theexpressions of the control inputs of the system, which are given by:

~u(1) = Vin√3~x(1) cos

(2π~x(2) + ~µ(2) − π

)(B-5a)

~u(2) = Vin√3~x(1) sin

(2π~x(2) + ~µ(2) − π

)(B-5b)

Note that µ in (B-4) is set to 0.5 for the angular component of the polar coordinate system.This is done to ensure equal scatter of the samples (~x(2)) around ~µ(2). This is also the reasonfor the shift within the sine and cosine functions. An example of the trapezoidal distributionis shown in Figure B-2 for a specific initial control input of the three-phase VSI connected toa PMSM.

B-3 Truncated normal distribution

The last distribution covered in this chapter, is the truncated normal distribution. Thisdistribution is derived from the standard normal distribution and distinguishes from thisdistribution by the fact that it is bounded by the interval between a and b. The probabilitydensity function of the truncated normal distribution is given by:

p(x) =φ(x−µσ

(Φ(b−µσ

)− Φ

(b−µσ

)) (B-6)

Master of Science Thesis R. Koch

Page 154: Masters Thesis: Nonlinear control of electronic converters

134Used distributions for the application of the SD-NMPC controller to the system of the three-phase VSI

connected to a PMSM

-150 -100 -50 0 50 100 150

u(1)

[V]

-150

-100

-50

0

50

100

150

u(2

) [V

]

(a) Trapezoidal distribution around an initial control input(b) Probability density function of a trapezoidal distribu-tion (µ = 0.7253 and σ = 0.05)

Figure B-2: Trapezoidal distribution around an initial control input with µ =[0.72530.0997

]and

σ =[0.050.01

]

where φ(·) is the probability density function of the standard normal distribution and Φ(·)the cumulative distribution function of the standard normal distribution given by:

φ(ξ) = 1√2πe−

12 ξ

2 (B-7a)

Φ(ξ) = 12(1 + erf

( ξ√2

)(B-7b)

erf(ζ) = 2√π

∫ ζ

0e−x

2dx (B-7c)

where erf(·) is called the error function. In this equation, we have set a to 0 and b to 1.Comparable to the trapezoidal distribution, we have to transform the sampled values fromthe Halton, which is a uniform distribution, to the truncated normal distribution. This resultsin the following expression:

x = µ+√

2σ erf−1(

2(

Φ(1− µ

σ

)− Φ

(µσ

))ς + 2Φ

(− µ

σ

)− 1

)(B-8)

where erf−1(·) is the inverse error function and ς = √ς. This transformed samples can thenbe filled in (B-5) to determined the corresponding control input values.Also for the truncated normal distribution, we have plotted an example based on a possibleinitial control input. These plots are shown in Figure B-3.

B-4 Comparing the distributions

In this section, we will compare the distributions discussed in this chapter based on a runof the SD-NMPC controller for the three-phase VSI connected to a PMSM. Note that the

R. Koch Master of Science Thesis

Page 155: Masters Thesis: Nonlinear control of electronic converters

B-4 Comparing the distributions 135

-150 -100 -50 0 50 100 150

u(1)

[V]

-150

-100

-50

0

50

100

150

u(2

) [V

]

(a) Truncated normal distribution around an initial con-trol input

(b) Probability density function of a truncated normaldistribution (µ = 0.7253 and σ = 0.05)

Figure B-3: Truncated normal distribution around an initial control input with µ =[0.72530.0997

]and σ =

[0.050.01

]

speed reference is set at 140 rad/s and there are no intermediate equilibrium points used. Theresulting plot of the objective function is shown in Figure B-4. We can clearly see from thisfigure that when we apply the sampling method whereby we sample uniformly over the wholeinput space or when we use the trapezoidal distribution, the number of updates of the controlinputs are so low that the objective function has barely improved. This is in contrast withthe bounded uniform sampling method and the truncated normal sampling method whichboth shown much more improvement. In conclusion, the best sampling methods that can beapplied to this particular system are those that have a distribution with a low variance. Inthis thesis, we have used the truncated normal distribution instead of the bounded version ofthe uniform distribution but also the bounded uniform distribution could have been used aslong as the mode or mean and variance are chosen correctly.

0 0.2 0.4 0.6 0.8 1

time [s]

0

1

2

3

4

5

6

7

8

9

10

J

105

without SD-NMPC

uniform sampling

uniform bounded sampling

trapezoidal sampling

truncated normal sampling

Figure B-4: Evolution of the value of the objective function of the three-phase VSI connectedto a PMSM when controlled with SD-NMPC using different sampling methods

Master of Science Thesis R. Koch

Page 156: Masters Thesis: Nonlinear control of electronic converters

136Used distributions for the application of the SD-NMPC controller to the system of the three-phase VSI

connected to a PMSM

R. Koch Master of Science Thesis

Page 157: Masters Thesis: Nonlinear control of electronic converters

Bibliography

[1] Francesco Amato, Roberto Ambrosino, Marco Ariola, Carlo Cosentino, and AlessioMerola. State feedback control of nonlinear quadratic systems. In 46th Conferenceon Decision and Control, pages 1699–1703. IEEE, 2007.

[2] Francesco Amato, Carlo Cosentino, and Alessio Merola. On the region of attraction ofnonlinear quadratic systems. Automatica, 43(12):2119–2123, 2007.

[3] Francesco Amato, Carlo Cosentino, and Alessio Merola. Sufficient conditions for finite-time stability and stabilization of nonlinear quadratic systems. IEEE Transactions onAutomatic Control, 55(2):430–434, 2009.

[4] Dimitri P Bertsekas. Dynamic programming and optimal control, volume 1. Athenascientific Belmont, MA, 1995.

[5] Thomas Besselmann, Johan Lofberg, and Manfred Morari. Explicit model predictive con-trol for linear parameter-varying systems. In 47th Conference on Decision and Control,pages 3848–3853. IEEE, 2008.

[6] Bassem Bhiri, C Delatre, Michel Zasadzinski, and Kamel Abderrahim. Finite-time stabil-ity via polynomial lyapunov function of nonlinear quadratic systems. In 2016 AmericanControl Conference (ACC), pages 1142–1147. IEEE, 2016.

[7] George Bitsoris and Nikolaos Athanasopoulos. Constrained stabilization of bilineardiscrete-time systems using polyhedral lyapunov functions. IFAC Proceedings Volumes,41(2):2502–2507, 2008.

[8] Ruxandra Valentina Bobiti. Sampling-driven stability domains computation and pre-dictive control of constrained nonlinear systems. PhD thesis, Technische UniversiteitEindhoven, 2017.

[9] Stephen Boyd, Laurent El Ghaoui, Eric Feron, and Venkataramanan Balakrishnan. Lin-ear matrix inequalities in system and control theory. SIAM, 1994.

Master of Science Thesis R. Koch

Page 158: Masters Thesis: Nonlinear control of electronic converters

138 Bibliography

[10] Giuseppe Calafiore, Fabrizio Dabbene, and Roberto Tempo. A survey of randomizedalgorithms for control synthesis and performance verification. Journal of Complexity,23(3):301–316, 2007.

[11] DF Coutinho, M Fu, A Trofino, and P Danes. L2-gain analysis and control of uncertainnonlinear systems with bounded disturbance inputs. International Journal of Robust andNonlinear Control: IFAC-Affiliated Journal, 18(1):88–110, 2008.

[12] Carlos E de Souza and Daniel Coutinho. Nonlinear control design for open-loop un-stable quadratic discrete-time systems. In 9th International Conference on Control andAutomation (ICCA), pages 710–715. IEEE, 2011.

[13] Silvio Galanti and Alan Jung. Low-discrepancy sequences: Monte carlo simulation ofoption prices. Journal of derivatives, 5(1):63–83, 1997.

[14] Jean-Claude Hennet. Discrete time constrained linear systems. Control and DynamicSystems, 71:157–214, 1995.

[15] Michael A Henson. Nonlinear model predictive control: current status and future direc-tions. Computers & Chemical Engineering, 23(2):187–202, 1998.

[16] Christian Hoffmann and Herbert Werner. A survey of linear parameter-varying controlapplications validated by experiments or high-fidelity simulations. IEEE Transactionson Control Systems Technology, 23(2):416–433, 2014.

[17] R.E. Kalman and J.E. Bertram. Control system analysis and design via the secondmethod of Lyapunov, Part II: Discrete-time systems. J. Basic Engr. Trans. ASME,82:394–399, 1960.

[18] Paul C Krause, Oleg Wasynczuk, Scott D Sudhoff, and Steven Pekarek. Analysis ofelectric machinery and drive systems, volume 2. Wiley Online Library, 2002.

[19] Mircea Lazar. On infinity norms as lyapunov functions: Alternative necessary and suffi-cient conditions. In 49th Conference on Decision and Control (CDC), pages 5936–5942.IEEE, 2010.

[20] Marcelo M Morato, Julio E Normey-Rico, and Olivier Sename. Model predictive controldesign for linear parameter varying systems: A survey. Annual Reviews in Control, 2020.

[21] Ronggang Ni, Xianguo Gui, Gaolin Wang, Guoqiang Zhang, and Dianguo Xu. Im-provements in permanent magnet synchronous machines with delta-connected winding.In 40th Annual Conference of the IEEE Industrial Electronics Society (IECON 2014),pages 3837–3842. IEEE, 2014.

[22] Matt Pharr, Wenzel Jakob, and Greg Humphreys. Physically based rendering: Fromtheory to implementation. Morgan Kaufmann, 2016.

[23] Muhammad H Rashid. Power electronics handbook. Butterworth-Heinemann, 2017.

[24] Michael Salcone and Joe Bond. Selecting film bus link capacitors for high performanceinverter applications. In International Electric Machines and Drives Conference, pages1692–1699. IEEE, 2009.

R. Koch Master of Science Thesis

Page 159: Masters Thesis: Nonlinear control of electronic converters

139

[25] Hiroya Seki, Satoshi Ooyama, and Morimasa Ogawa. Nonlinear model predictive controlusing successive linearization. Transactions of the Society of Instrument and ControlEngineers, 38(1):61–66, 2002.

[26] Veaceslav Spînu. Constrained control of power converters. PhD thesis, Ph. D. disserta-tion, TU Eindhoven, 2014.

[27] Roberto Tempo, Er-Wei Bai, and Fabrizio Dabbene. Probabilistic robustness analysis:Explicit bounds for the minimum number of samples. In Proceedings of 35th IEEEConference on Decision and Control, volume 3, pages 3424–3428. IEEE, 1996.

[28] Roland Tóth, Jan C Willems, Peter SC Heuberger, and Paul MJ Van den Hof. The be-havioral approach to linear parameter-varying systems. IEEE Transactions on AutomaticControl, 56(11):2499–2514, 2011.

[29] Altay Zhakatayev, Bexultan Rakhim, Olzhas Adiyatov, Almaskhan Baimyshev, andHuseyin Atakan Varol. Successive linearization based model predictive control of variablestiffness actuated robots. In International Conference on Advanced Intelligent Mecha-tronics (AIM), pages 1774–1779. IEEE, 2017.

Master of Science Thesis R. Koch

Page 160: Masters Thesis: Nonlinear control of electronic converters

140 Bibliography

R. Koch Master of Science Thesis

Page 161: Masters Thesis: Nonlinear control of electronic converters

Glossary

List of Acronyms

AC alternating currentDC direct currentDOA domain of attractionFOC field oriented controlLMI linear matrix inequalityLPV-MPC linear parameter varying MPCMPC model predictive controlPI proportional-integralPID proportional-integral-derivativePMSM permanent-magnet synchronous motorPWM pulse-width modulatedSD-NMPC sampling-driven nonlinear MPCSQP sequential quadratic programmingSVPWM space vector pulse width modulationVSI voltage source inverter

List of Symbols

D Domain of attractionU Set of allowable inputs (U ⊂ Rm)X Set of allowable states (X ⊂ Rn)ς Sample from a low-discrepancy sequenceTs Sampling period

Master of Science Thesis R. Koch

Page 162: Masters Thesis: Nonlinear control of electronic converters

142 Glossary

P A setRn[a,b] The set of real numbers of dimension n bounded between a and bZn[a,b] The set of integers of dimension n bounded between a and b~u An input variable in vector form (control)~x A state variable in vector form (control)I A constant current (electronics)i A varying current (electronics)J An objective function (control)V A constant voltage (electronics)v A varying voltage (electronics)

R. Koch Master of Science Thesis