선정목록으로
Data-based approximation of model predictive controllers for electrical machines
수소연료전지 · (5) 연료전지용 수분제어장치(가습기)
기본 정보
- 저자
- DOI
- 10.34726/hss.2024.111644
- 저널
- reposiTUm (TU Wien)
- 발행년도
- 2024
- 발행기관
- TU Wien
- 피인용수
- 0
- 라이선스
- 0
- 논문 유형
- –
- 언어
- –
- 원문 페이지
- https://doi.org/10.34726/hss.2024.111644
- 토픽
- Electric and Hybrid Vehicle Technologies
- OpenAlex ID
- W6890073980
평가 내용
- 관련도
- 사업분야
- 수소연료전지 · (5) 연료전지용 수분제어장치(가습기)
- 부 분야
- –
- R&D 측면
- –
- 확신도
- –
- 근거 용어
- –
- 판단 근거
- 임베딩 유사도 기반 평가로 '수소연료전지 > 연료전지용 수분제어장치(가습기)' 분야에 선정된 논문입니다.
- R&D 활용 포인트
- –
- 평가 입력
- –
초록
Jüngste Trends in der Automobilindustrie erfordern eine dynamischere und effizientere Leistung elektrischer Maschinen, um den Kundenwünschen nach hoher Beschleunigung und großer Reichweite gerecht zu werden. Um diese Anforderungen zu erfüllen, müssen diese komplexen Maschinen optimal geregelt werden. Aufgrund dessen wird auf dem Gebiet der Regelung für Elektromotoren zunehmend die modellprädiktive Regelung erforscht. Es handelt sich hierbei um ein bekanntes optimales Regelungskonzept, welches ein Kostenfunktional über eine prädizierte Zustandstrajektorie minimiert, um auf diese Weise die optimalen Werte (in Bezug auf das Kostenfunktional) für den Reglereingang zu finden. Da das Optimierungsproblem in jedem Zeitschritt gelöst werden muss, muss die Lösung des Problems schnell genug sein, um innerhalb der Abtastzeit des Reglers abgeschlossen zu werden. Da die Abtastzeiten für die Stromregelung von Elektromotoren sehr gering sind, erfordert dies eine hohe Rechenleistung. Allerdings bietet das Motorsteuergerät, auf welchem die Regelung eingesetzt wird, nicht die erforderliche Rechenleistung und macht das Konzept für den Einsatz in elektrischen Maschinen unpraktikabel.Aus diesem Grund wird in dieser Arbeit ein neuartiger Ansatz zur Approximation von modellprädiktiven Reglern vorgestellt. Der Fokus liegt dabei auf der Regelung für die beiden in der Automobilindustrie am weitesten verbreiteten Elektromotoren, nämlich dem Permanentmagnet-Synchronmotor und dem Asynchronmotor. Der Ansatz für die Datengenerierung wird vorgestellt und der Rechenaufwand für die Durchführung der notwendigen Simulationen wird abgeschätzt. Die Auswahl der für die Anwendung relevanten Arbeitspunkte ist für die erzielte Regelgüte essenziell. Darüber hinaus wird der vorgeschlagene datengetriebene Ansatz für verschiedene MPC Formulierungen evaluiert und in Simulationen eingehend getestet. Außerdem wird die Approximationsgenauigkeit im Falle von Parameterabweichungen und hochdynamischen Arbeitspunktwechseln untersucht. Schließlich wird der vorgeschlagene Algorithmus auf einer SPACE Microlab Box Echtzeitplattform eingesetzt, seine Laufzeit gemessen und mit der modellprädiktiven Regelung verglichen. Dieser Vergleich zeigt, dass die vorgeschlagene Methode den größtenNachteil der modellprädiktiven Regelung, nämlich die Laufzeit, beseitigt.
본문 197,148자
본문 펼치기
## Data-based approximation of MPC for electrical machines
### DIPLOMA THESIS
Conducted in partial fulfillment of the requirements for the degree of a
Diplom-Ingenieur (Dipl.-Ing.)
supervised by
Dipl.-Ing. Georg Janisch BSc
Associate Prof. Dr.-Ing. Wolfgang Kemmetmüller
submitted at the
### TU Wien
Faculty of Electrical Engineering and Information Technology
Automation and Control Institute
by
Felix Heidegger
Matriculation number 01527191
Wien, May 2024
Complex Dynamical Systems Group
A-1040 Wien, Gußhausstr. 27–29, Internet: https://www.acin.tuwien.ac.at
# Preamble
First and foremost, I would like to express my deep gratitude to my supervisor Associate
Prof. Dr.-Ing. Wolfgang Kemmetmüller for the opportunity of conducting the Master
Thesis under his supervision and the continuous feedback throughout the conduction of the
thesis. I would also like to thank Dipl.-Ing. Georg Janisch BSc for his direct supervision,
the ideas and inspirations that he gave me and the availability to my questions at all
times. The completion of this Master Thesis would not have been possible without the
continuous input, the big support and all the theoretical knowledge that he provided me.
Furthermore I would like to thank MAGNA Powertrain GmbH & Co KG for the opportunity to work on this interesting and future oriented topic in a cooperation. My work
colleagues, especially Martin Böck, Bence Plenar, Erald Pjetri and Elias Pritzi, helped
me out with valuable insights about the model of the electrical machines, the data driven
approaches and moral support over the whole course of this thesis.
I am also very grateful for the encouragement and the help from my family over the whole
course of my studies. Their belief in my abilities and their support made the studies for
me possible at all and they helped me with their kind words in difficult times. I would
also like to thank my girlfriend for her constant support, her motivating words and her
patience with me over the whole course of the studies.
Finally, I would like to thank my university colleagues, which made the studying with
the fruitful discussions and their inputs much easier and more fun. Here I would like to
thank especially Georg Feiler, Elias Pritzi and Benjamin Gallauner, who are not only
study colleagues but have also become good friends on which I can count at any time.
Wien, May 2024
_I_
# Abstract
Recent trends in the automotive industry require more dynamic and more efficient
performance of electrical machines to satisfy the customer desire of fast acceleration and
a wide range. To deal with this requirement, these complex machines must be controlled
in an optimal way. For this purpose, M odel P redictive C ontrol (MPC) is increasingly
researched in the field of control for electrical motors. It is a well known optimal control
method, which minimizes a cost functional over a predicted state trajectory to find the
optimal values (with respect to the cost functional) for the control inputs. Since the
optimization problem must be solved in each timestep, solving the problem must be
fast enough to be finished within the sampling time of the control concept. As the
sampling times for current controllers in electrical machines are very low, this asks for
high computational power. However, the motor control unit on which the control concept
is deployed, offers limited performance and makes the method rather impractical.
For this purpose this work introduces a novel approach of approximating an MPC for
the control of electrical machines. It focuses on the control for the two most widespread
electrical machine types in the automotive industry, namely the permanent magnet
synchronous motor and the induction machine. The data generation step is presented
and the computational effort to perform the necessary simulations is estimated. Selecting
operating points relevant for the application is indispensable for the achieved control
performance. Furthermore, the proposed data-driven approach is evaluated on different
MPC formulations and tested thoroughly in simulations. Moreover, the approximation
accuracy in the case of parameter deviations and highly dynamical setpoint changes is
investigated. Finally, the proposed algorithm is deployed on a dSPACE Microlab Box
real-time platform and its runtime is measured and compared to the MPC showing that
the proposed method overcomes the biggest disadvantage of MPC control, the runtime.
_II_
# Kurzzusammenfassung
Jüngste Trends in der Automobilindustrie erfordern eine dynamischere und effizientere
Leistung elektrischer Maschinen, um den Kundenwünschen nach hoher Beschleunigung
und großer Reichweite gerecht zu werden. Um diese Anforderungen zu erfüllen, müssen
diese komplexen Maschinen optimal geregelt werden. Aufgrund dessen wird auf dem
Gebiet der Regelung für Elektromotoren zunehmend die modellprädiktive Regelung erforscht. Es handelt sich hierbei um ein bekanntes optimales Regelungskonzept, welches ein
Kostenfunktional über eine prädizierte Zustandstrajektorie minimiert, um auf diese Weise
die optimalen Werte (in Bezug auf das Kostenfunktional) für den Reglereingang zu finden.
Da das Optimierungsproblem in jedem Zeitschritt gelöst werden muss, muss die Lösung
des Problems schnell genug sein, um innerhalb der Abtastzeit des Reglers abgeschlossen
zu werden. Da die Abtastzeiten für die Stromregelung von Elektromotoren sehr gering
sind, erfordert dies eine hohe Rechenleistung. Allerdings bietet das Motorsteuergerät, auf
welchem die Regelung eingesetzt wird, nicht die erforderliche Rechenleistung und macht
das Konzept für den Einsatz in elektrischen Maschinen unpraktikabel.
Aus diesem Grund wird in dieser Arbeit ein neuartiger Ansatz zur Approximation von
modellprädiktiven Reglern vorgestellt. Der Fokus liegt dabei auf der Regelung für die
beiden in der Automobilindustrie am weitesten verbreiteten Elektromotoren, nämlich
dem Permanentmagnet-Synchronmotor und dem Asynchronmotor. Der Ansatz für die
Datengenerierung wird vorgestellt und der Rechenaufwand für die Durchführung der
notwendigen Simulationen wird abgeschätzt. Die Auswahl der für die Anwendung relevanten Arbeitspunkte ist für die erzielte Regelgüte essenziell. Darüber hinaus wird der
vorgeschlagene datengetriebene Ansatz für verschiedene MPC Formulierungen evaluiert
und in Simulationen eingehend getestet. Außerdem wird die Approximationsgenauigkeit
im Falle von Parameterabweichungen und hochdynamischen Arbeitspunktwechseln untersucht. Schließlich wird der vorgeschlagene Algorithmus auf einer SPACE Microlab
Box Echtzeitplattform eingesetzt, seine Laufzeit gemessen und mit der modellprädiktiven
Regelung verglichen. Dieser Vergleich zeigt, dass die vorgeschlagene Methode den größten
Nachteil der modellprädiktiven Regelung, nämlich die Laufzeit, beseitigt.
_III_
# Contents
1 Introduction 1
1.1 Control structures for electrical machines . . . . . . . . . . . . . . . . . . 1
1.2 Data driven approaches for MPC approximation . . . . . . . . . . . . . . 2
1.3 Aim of this work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.4 Structure of this work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2 Mathematical Model 6
2.1 Permanent magnet synchronous motor . . . . . . . . . . . . . . . . . . . . 6
2.2 Induction machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.3 Scaling of model parameters . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3 MPC Approximation for PMSM 13
3.1 Control Loop structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.2 Setpoint calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.3 MPC formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.3.1 MPC without regularization terms . . . . . . . . . . . . . . . . . . 14
3.3.2 MPC with regularization on the state . . . . . . . . . . . . . . . . 15
3.3.3 MPC with regularization on the state and on the input . . . . . . 16
3.4 Data generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.4.1 MPC without regularization and MPC with regularization on the
state . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.4.2 MPC with regularization on the state and on the input . . . . . . 22
3.5 Data driven approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.6 Simulation Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.6.1 Stationary simulations . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.6.2 Transient simulations . . . . . . . . . . . . . . . . . . . . . . . . . 30
MPC without regularization terms . . . . . . . . . . . . . . . . . . 30
4 MPC Approximation for IM 38
4.1 Control loop structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
4.2 Setpoint calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
4.3 MPC formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
4.4 Flux controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
4.5 Data generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
4.6 Data driven approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
4.7 Simulation results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
4.7.1 Stationary simulation results . . . . . . . . . . . . . . . . . . . . . 51
4.7.2 Dynamic simulation results . . . . . . . . . . . . . . . . . . . . . . 54
_IV_
_<u>Contents</u>_ _<u>V</u>_
4.7.3 Runtime evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
5 Discussion and further outlook 61
# List of Figures
1.1 Concept of data driven approximation for MPCs. . . . . . . . . . . . . . . 3
2.1 Equivalent circuit of the Γ - model. [21] . . . . . . . . . . . . . . . . . . . 8
3.1 Block diagram of the control structure of the PMSM. . . . . . . . . . . . . 13
3.2 Optimal operating strategy for the PMSM. . . . . . . . . . . . . . . . . . 19
3.3 Simulation grid for the optimal setpoint currents in the machine. . . . . . 20
3.4 Simulation grids for the actual currents and the integrator voltages in the
machine. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.5 Simulation grid for the optimal setpoint currents in the machine for the
MPC with regularization on the state. . . . . . . . . . . . . . . . . . . . . 22
3.6 Simulation grids for the actual currents and the voltages from the last
timestep. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.7 Correlation matrix for the input and output variables for the MPC without
regularization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.8 Correlation matrix for the input and output variables for MPC with regularization on input and state. . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.9 Structure of the feedforward neural net for the MPC without regularization
and the MPC with regularization on the state [26]. . . . . . . . . . . . . . 26
3.10 Q-Q plot for the approximation of the MPC without regularization. . . . 28
3.11 Absolute relative error for stationary simulations without parameter deviations for the MPC without regularization. . . . . . . . . . . . . . . . . . . 29
3.12 Transient simulations at _ω_ = 0 _._ 15 _ω_ N without parameter deviations for
MPC without regularization. . . . . . . . . . . . . . . . . . . . . . . . . . 32
3.13 Zoomed detail of sine signal for different operating ranges of the MPC
without regularization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
3.14 Transient simulations at _ω_ = 0 _._ 15 _ω_ N without parameter deviations for
MPC with regression on state. . . . . . . . . . . . . . . . . . . . . . . . . 34
3.15 Zoomed detail of sine signal for different operating ranges of the MPC with
regression on state. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
3.16 Transient simulations at _ω_ = 0 _._ 15 _ω_ N without parameter deviations for
MPC with regression on state and input . . . . . . . . . . . . . . . . . . . 36
3.17 Zoomed detail of sine signal for different operating ranges of the MPC with
regression on state and input. . . . . . . . . . . . . . . . . . . . . . . . . . 37
4.1 Block diagram of the control structure of the IM. . . . . . . . . . . . . . . 39
4.2 Sampling grid for the MPC and the subordinate flux controller. . . . . . . 42
4.3 Correlation matrix for the input and output variables for the IM. . . . . . 46
4.4 Histogram of the speed distribution in the original dataset. . . . . . . . . 47
_VI_
_<u>List</u>_ _<u>of</u>_ _<u>Figures</u>_ _<u>VII</u>_
4.5 Comparison of the sampling schemes. . . . . . . . . . . . . . . . . . . . . . 48
4.6 Q-Q plot for the approximation of the MPC for the IM. . . . . . . . . . . 50
4.7 Absolute error for the stationary simulations for the IM. . . . . . . . . . . 52
4.8 Absolute relative error for stationary simulations for the IM. . . . . . . . 53
4.9 Transient simulations at _ω_ = 0 _._ 15 _ω_ N without parameter deviations for the
IM. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
4.10 Zoomed detail of sine signal for different operating ranges of the MPC for
the IM. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
4.11 Zoomed detail of fast ramp and sine signal around 0Nm without parameter
deviations for the IM. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
# List of Tables
2.1 Normalization parameters of the electrical machines. . . . . . . . . . . . . 12
3.1 Input parameter space of the PMSM. . . . . . . . . . . . . . . . . . . . . . 18
3.2 Error measures for the approximation of the MPC without regularization
terms. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.1 Input parameter space for the IM. . . . . . . . . . . . . . . . . . . . . . . 44
4.2 Error measures for the approximation of the MPC. . . . . . . . . . . . . . 59
4.3 Runtime evaluation of the developed approximation approach. . . . . . . . 60
_VIII_
# 1 Introduction
In times of escalating climate change concerns, the automotive sector plays a pivotal role
in the reduction of its CO2 emissions. According to [1], road transportation creates 72.9%
of the transport emissions in the European Union. One of the main contributors to these
high emissions, is the classical internal combustion engine. Combustion engines are run
with petrol or diesel, which are fossil fuels that produce CO2 during their operation. With
the introduction of new climate goals stemming from the Paris Agreement, which state
that the long-term temperature rise of the global surface temperature should be kept
below 2 <sup>_◦_</sup> C compared to pre-industrial levels, the emissions of internal combustion engines
are no longer acceptable.
For this purpose, electrical machines in the automotive sector have been investigated over
the last decades. As the name suggests, electric vehicles are run with electrical energy,
which can be produced by renewable energies. Furthermore, these machines have higher
efficiencies than combustion engines, if utilized in the right way. Therefore, these machines
show a high potential of decreasing the emissions in the transport sector. There are many
different types of electrical machines used nowadays in the automotive industry, where two
of the most widespread machine types are the P ermanent M agnet S ynchronos M achine
(PMSM) and the I nduction M achine (IM) [2]. In the PMSM the rotor field is generated
by permanent magnets, which are part of the rotor. For the induction machine on the
other hand, the rotor field is generated via the stator field. Even if these machines differ
in their working principle and their constructional point of view, they have in common,
that they represent highly nonlinear systems. This is due to the saturation behavior of
the iron for the PMSM [3] and the saturation of the mutual inductance for the IM [4].
Furthermore, temperature is also a main influencing factor for these machines. In order
to utilize these highly efficient systems and achieve high dynamics, which are important
for the use in the automotive sector, well designed control concepts must be developed
which are capable of achieving the desired goals.
### 1.1 Control structures for electrical machines
The main task of the control for electrical machines in the automotive industry is to
achieve fast torque dynamics and a high torque accuracy, while still ensuring energy
efficiency. Furthermore, safe operation, especially at the voltage and current limit, are of
uttermost importance, since the automotive sector is a safety critical field [5].
The two most common used state of the art control strategies are F ield O riented C ontrol
(FOC) [6, 7] and D irect T orque C ontrol (DTC) [8]. For the field oriented control, cascaded
control loops are used, which consist of a setpoint calculation and a current controller. The
setpoint calculation computes the optimal current setpoints according to a cost functional
to achieve the desired torque values. The current controller takes these setpoints as input
_1_
_<u>1</u>_ _<u>Introduction</u>_ _<u>1.2</u>_ _<u>Data</u>_ _<u>driven</u>_ _<u>approaches</u>_ _<u>for</u>_ _<u>MPC</u>_ _<u>approximation</u>_ _<u>2</u>_
and outputs the voltages for the inverter. As a result of the high sampling frequencies
in automotive applications, the current controller must be evaluated quickly. For this
purpose, PI-controllers with a suitable anti-windup method are often used for this task [9].
For the direct torque control, the torque is estimated as a cross product of the estimated
stator flux linkage vector and the measured current vector. In this approach, the inverter
switches directly control the flux and torque of the motor based on a pre-defined switching
table. This method achieves a similar dynamic performance as the FOC, albeit with
an increased torque ripple [10]. However, the determination of controller parameters for
robust performance in the presence of magnetic saturation behavior, parameter variations
and system limits, while still achieving high dynamics, is a challenging task. Furthermore,
they only take the current timestep into account and are therefore limited in the performance of dynamical setpoint changes, since they are not able to plan suitable trajectories
beforehand. Finally, they struggle with system boundaries, since they are not able to
consider the system limits in a systematic way before hitting them. [11]
To counteract these disadvantages, M odel P redictive C ontrol (MPC) for electrical machines is a big research field [12]. MPC is an optimal control strategy, that optimizes
the input of the system over a prediction horizon into the future. To predict the state
trajectory into the future, the (non)linear model of the system is used. By doing so, system
boundaries can be considered in the optimization and thus MPCs do not violate the system
limits. However, the optimization problem has to be solved in each time step over the
whole prediction horizon. This is computationally expensive and due to the fast sampling
rates of control loops for electrical machines, often not real-time capable. To tackle this
problem, different MPC concepts are investigated in this work and approximated by data
driven approaches.
### 1.2 Data driven approaches for MPC approximation
To approximate an MPC using a data driven approach, the input output behavior of the
system must be learned. In other words, this can be interpreted as a stationary function
approximation of the MPC, since the MPC is only dependent on current inputs of the
system. Figure 1.1 shows a simplified schematic of this approximation concept. The MPC
and the data driven model get the current states x and the desired states x <sup>d</sup> as input
and both predict their outputs u ˜ and u <sup>_∗_</sup> . These outputs are compared with each other
and by some learning action, the data driven model is updated. This is repeated until
the MPC and the data driven model output the same values or some maximum number
of learning updates has been performed. This approach can be considered as a grey
box approach, since the underlying control concept is well known. The approximation
itself, however, is a black box model. This is important to mention, because in contrast
to reinforcement learning control [13], where the whole control strategy is learned from
scratch, the underlying controllers in this work were tested thoroughly and their well
known behavior should only be approximated. The advantage of reinforcement learning
control is, that no real expert knowledge is needed for the design of the controller, since the
whole control action is learned during simulations and testbench measurements. However,
this takes a lot of time and computational effort, since all the knowledge about the control
_<u>1</u>_ _<u>Introduction</u>_ _<u>1.2</u>_ _<u>Data</u>_ _<u>driven</u>_ _<u>approaches</u>_ _<u>for</u>_ _<u>MPC</u>_ _<u>approximation</u>_ _<u>3</u>_
x
x <sup>d</sup>
MPC
u <sup>_∗_</sup>
u ˜
Data driven model
_−_
∆ u
update
Learning control action
Figure 1.1: Concept of data driven approximation for MPCs.
must be built up by the controller. Furthermore, this is a purely black-box model, since
the user does not know anything about the control design in this case, as it is purely data
based.
For the approximation of the controller structure, neural networks are widely used. [14]
shows the approximation approach on the example of a chemical reactor using Sobolev
training. Doing so, the parametric sensitivities of the nonlinear optimization problem are
added as extra information for the training of the neural net. For small datasets, this
approach delivers better results than the classical neural network training [15]. For a very
high dimensional and fine sampled grid, however, this difference gets smaller. Since in
this work a lot of simulations have to be performed to cover the whole operating range,
the influence on the results might be negligible and therefore this work focuses on the
usage of classical fully connected feedforward neural nets.
A big problem arises for the approximation for the performance around the boundaries of
the system. Since the approach only approximates the true behavior of the MPC, it is not
guaranteed that the boundary conditions can be fulfilled for the approximation. [16] shows
an approach for the analytical consideration of boundary conditions with constrained
neural networks. However, the paper only shows the approach for explicit MPCs, where
the solution of the MPC is computed offline and stored for a certain number of polytopic
regions. During operation, it is only necessary to evaluate online in which polytopic region
the system state is in. Since in this work only implicit MPC are investigated, which solve
the whole optimization problem in each timestep separately, this approach is not further
followed. To check if the boundary conditions are met, different dynamic simulations at
the voltage and the current boundary are performed and evaluated.
One big caveat in the usage of MPCs is the proof of stability and therefore it is even more
difficult to prove the stability of the approximation. An approach to show the stability of
an approximated MPC is given by [17]. However, this paper only shows the performance
_<u>1</u>_ _<u>Introduction</u>_ _<u>1.3</u>_ _<u>Aim</u>_ _<u>of</u>_ _<u>this</u>_ _<u>work</u>_ _<u>4</u>_
on a rather simplified system. To prove the stability of the developed approach in this
work, the MPC is tested for many different use cases including parameter disturbances
and the results are evaluated.
### 1.3 Aim of this work
While the listed publications show different data driven approaches in the control field, they
rarely discuss the usage of the proposed concept on a real-world example. Furthermore,
many papers rather deal with the usage of reinforcement learning [13] as data driven
approach instead of the grey box approach used in this paper. Moreover, no paper
was found that deals with this problem in the field of the control of electrical machines.
Therefore, the aim of this work is to propose different model predictive control formulations
for the current control of PMSMs and the control of IMs and explain the steps that have to
be performed to approximate such MPCs. For the PMSM the main goal is to investigate
different formulations with different input spaces of the data driven approach to determine
the generality of the developed concept. For the IM, the primary objective is to show
the performance of the developed concept on a real world MPC, that has been tested
thoroughly in [18]. The developed control concepts are compared with the original MPC
in closed-loop simulations for steady-state and dynamic scenarios at different driving
speeds and their approximation accuracy is investigated. Furthermore, measurements on
a target hardware are performed to estimate the runtime of the developed concepts and
therefore check if the approach is real-time capable.
### 1.4 Structure of this work
The remainder of this work is structured as follows: In Chapter 2, mathematical models
for the field oriented control of the PMSM and the IM are derived. The MPCs are based
on these models and their approximations therefore as well.
Chapter 3 introduces the control concept for the PMSM together with the different
MPC formulations, that are investigated in detail in this work and their approximations.
The main goal herein is to explain the formulations and analyze their advantages and
disadvantages. In Section 3.4 the step of data generation is covered with estimates on the
computation time to perform the simulations. The data driven approach is introduced
with its necessary inputs and outputs and the performance of the prediction is shown for
open loop simulations. Finally, closed loop simulations are performed in Section 3.6 for
the developed concepts and the results are compared in detail.
Chapter 4 is structured similarly to Chapter 3, but deals with the IM. The control loop
structure is introduced first and the main parts that are approximated, are explained in
Section 4.2 and Section 4.3. The data generation is covered in detail in Section 4.5 and
an estimate on the computation time is given. 4.6 deals with the data driven approach
and the need for an ablation study. Finally, simulation results are shown in Section 4.7
and discussed. Furthermore, a runtime evaluation on a target hardware is performed and
the results are displayed.
_<u>1</u>_ _<u>Introduction</u>_ _<u>1.4</u>_ _<u>Structure</u>_ _<u>of</u>_ _<u>this</u>_ _<u>work</u>_ _<u>5</u>_
The work is concluded by summarizing the work and giving outlooks on further improvements and possible extensions in Chapter 5.
# 2 Mathematical Model
An accurate mathematical model is the prerequisite for model-based control. In this
chapter the mathematical models for the PMSM and the IM are derived.
### 2.1 Permanent magnet synchronous motor
To perform the model-based, field oriented control of the PMSM the description in the
dq-coordinate frame is chosen. This description is derived in more detail in [19].
The stator voltage equations of a PMSM in the dq-coordinate frame are given by
_u_ d = _R_ s _i_ d + <sup><u>dΨd</u></sup> (2.1a)
d _t_ <sup>_−_</sup> <sup>_ω_</sup> <sup>Ψq</sup>
_u_ q = _R_ s _i_ q + <sup><u>dΨq</u></sup> (2.1b)
d _t_ <sup>+</sup> <sup>_ω_</sup> <sup>Ψd</sup>
with the direct- and quadrature-voltages _u_ d and _u_ q, the direct- and quadrature currents
_i_ d and _i_ q, the direct- and quadrature fluxes Ψd and Ψq and the stator resistance _R_ s.
_ω_ = _Z_ p _ω_ m is the electrical rotor speed and it is computed via the measurable mechanical
angular speed _ω_ m and the number of pole pairs of the machine _Z_ p. The relationship
between the currents and the fluxes in the dq-coordinate frame is defined as
Ψd = _L_ d( _i_ d _, i_ q _, ϑ_ ) _i_ d + ΨPM( _i_ q _, ϑ_ ) (2.2a)
Ψq = _L_ q( _i_ d _, i_ q _, ϑ_ ) _i_ q, (2.2b)
with the permanent magnet flux ΨPM and the direct- and quadrature inductances _L_ d
and _L_ q. This relationship is nonlinear, since the inductances and the permanent magnet
flux can saturate with respect to the currents and the temperature _ϑ_ . In this work, the
influence of the temperature on the fluxes and inductances is neglected, since its influence
is small compared to the nonlinear saturation behavior. To account for the nonlinear
saturation relationship, L ook U p T ables (LUTs) for the inductances and the permanent
magnet flux are used. These LUTs are derived from Finite Element simulations. In order
to get an even better representation of the true behavior of the electrical machine, these
LUTs are further calibrated on the testbench.
By inserting (2.2) in (2.1) the continuous state space formulation
x ˙ SM = A SM x SM + B u _,_ SM u SM + b SM _,_ ΨΨSM _,_ PM =
_−ω_ _−_ <sup>_<u>R</u>_</sup> <sup><u>s</u></sup>
Ψd
Ψq
_−_ <sup>_<u>R</u>_</sup> <sup><u>s</u></sup>
_<u>R</u>_ <u>s</u>
_L_ d
0
+
_6_
1 0
0 1
��
_u_ d
_u_ q
ΨPM (2.3)
_ω_
=
_L_ d
+
_L_ q
_<u>2</u>_ _<u>Mathematical</u>_ _<u>Model</u>_ _<u>2.2</u>_ _<u>Induction</u>_ _<u>machine</u>_ _<u>7</u>_
with the state space vector x SM = [Ψd _,_ Ψq] <sup>T</sup> and the input vector u SM = [ _u_ d _, u_ q] <sup>T</sup> is
derived. Since in this work different machine models are introduced, the subscript ( _∗_ )SM
stands for S ynchronous M achine and refers to the variables for the PMSM. The system
(2.3) is nonlinear and thus difficult to discretize. By assuming constant inductances, a
linear system results. Since the model error of this approximation is minor due to the
high sampling frequency for the controller design, (2.3) is evaluated in each timestep at
the current operating point i SM _,m_ = [ _i_ d _,m, i_ q _,m_ ] <sup>T</sup> and the values for the inductances are
kept constant until the next timestep. The resulting time dependent linear system is then
discretized using the exact discretization method in each timestep, which yields
x SM _,m_ +1 = Φ SM _,m_ x SM _,m_ + Γ SM _,_ u _,m_ u SM _,m_ + Γ SM _,_ Ψ _,m_ ΨSM _,_ PM _,m_ (2.4)
with
Φ SM _,m_ = exp( A SM _,mT_ s) (2.5a)
Γ SM _,_ u _,m_ =
Γ SM _,_ Ψ _,m_ =
- _T_ s
exp( A SM _,mt_ ) d _t_ B SM _,_ u _,m_ (2.5b)
0
_T_ s
exp( A SM _,mt_ ) d _t_ b SM _,_ Ψ _,m_, (2.5c)
0
- _T_ s
where _T_ s describes the sampling time of the system and Φ SM _,m_, Γ SM _,_ u _,m_ and Γ SM _,_ Ψ _,m_
refer to the time discretized dynamic matrix, the time discretized input matrix for the
voltage and the time discretized input matrix for the permanent magnet flux respectively.
Furthermore, the torque of the PMSM can be computed as
_τ_ ( i SM) = <sup><u>3</u></sup> (2.6)
2 <sup>_Z_</sup> <sup>p(Ψd</sup> <sup>_i_</sup> <sup>q</sup> <sup>_−_</sup> <sup>Ψq</sup> <sup>_i_</sup> <sup>d)</sup> <sup>.</sup>
Under the assumption, that the ohmic copper losses are the dominating losses in the
machine, the stator losses are furthermore given as
_P_ s = <sup><u>3</u></sup> 2 <sup>_R_</sup> <sup>s</sup> <sup>i</sup> SM <sup>T</sup> <sup>i</sup> <sup>SM</sup> <sup>.</sup> (2.7)
These stator losses are later needed in the setpoint computation for the PMSM.
### 2.2 Induction machine
For the model based, field-oriented control of the IM the equations are derived for the
Γ-model, which is extended by stator flux saturation. This model is described in more
detail in [4, 20, 21].
According to Figure 2.1 the differential equations of a squirrel cage induction machine
in a stator-fixed reference frame (furthermore referenced to as _αβ_ -coordinate frame) are
given by
u s = _R_ s i s + <sup><u>d</u></sup> <sup><u>Ψ</u></sup> <sup><u>s</u></sup> (2.8a)
d _t_
0 = _R_ r i r + <sup><u>d</u></sup> <sup><u>Ψ</u></sup> <sup><u>r</u></sup> (2.8b)
d _t_ <sup>+</sup> <sup>_ω_</sup> <sup>JΨ</sup> <sup>r</sup> <sup>,</sup>
_<u>2</u>_ _<u>Mathematical</u>_ _<u>Model</u>_ _<u>2.2</u>_ _<u>Induction</u>_ _<u>machine</u>_ _<u>8</u>_
_R_ s
i s
_Lσ_ _R_ r
i r
<u>d</u> <u>Ψ</u> <u>r</u>
d _t_
u s
i _µ_
_M_ <u>d</u> <u>Ψ</u> <u>s</u>
d _t_
_−ω_ JΨ r
Figure 2.1: Equivalent circuit of the Γ - model. [21]
with the stator- and rotor-fluxes Ψ s = [Ψs _α,_ Ψs _β_ ] <sup>T</sup> and Ψ r = [Ψr _α,_ Ψr _β_ ] <sup>T</sup>, the stator
voltage u s = [ _u_ s _α, u_ s _β_ ] <sup>T</sup>, the stator- and rotor-resistances _R_ s and _R_ r and the stator- and
rotor-currents i s = [ _i_ s _α, i_ s _β_ ] <sup>T</sup> and i r = [ _i_ r _α, i_ r _β_ ] <sup>T</sup> . Herein, the rotation matrix J is defined
as -
J =
0 1
_−_ 1 0
. (2.9)
The flux linkage equations
Ψ s = _M_ ( _∥_ Ψ s _∥_ ) i _µ_ (2.10a)
Ψ r = _Lσ_ i r + Ψ s (2.10b)
relate the currents i _µ_ = i s + i r and i r, the mutual inductance _M_ ( _∥_ Ψ s _∥_ ) and the leakage
inductance _Lσ_ with the fluxes Ψ s and Ψ r. This relationship is nonlinear, since the mutual
inductance _M_ ( _∥_ Ψ s _∥_ ) saturates with respect to the stator flux Ψ s according to [20]
_<u>Lµ</u>_
_M_ ( _∥_ Ψ s _∥_ ) = 1 + ( _S∥_ Ψ s _∥_ ) <sup>_β_</sup> <sup>,</sup> (2.11)
with the constant parameters _Lµ_, _β_ and _S_ .
The continuous state space formulation for the equations in the stationary _αβ_ -coordinate
frame results from inserting (2.10) into (2.8)
x ˙ _αβ_ = A _αβ_ ( _∥_ Ψ s _∥_ ) x _αβ_ + B _αβ_ u s (2.12)
with
_<u>R</u>_ <u>r</u>
0
_Lσ_
_<u>R</u>_ <u>s</u>
0
_Lσ_
0
_−R_ s
_<u>M</u>_ <u>(</u> _<u>∥</u>_ <u>Ψ</u> <u>s</u> _<u>∥</u>_ <u>) +</u> _<u>Lσ</u>_
_M_ ( _∥_ Ψ s _∥_ ) _Lσ_
_<u>M</u>_ <u>(</u> _<u>∥</u>_ <u>Ψ</u> <u>s</u> _<u>∥</u>_ <u>) +</u> _<u>Lσ</u>_
1 0
0 1
0 0,
0 0
(2.13)
_M_ ( _∥_ Ψ s _∥_ ) _Lσ_
A _αβ_ =
_<u>M</u>_ <u>(</u> _<u>∥</u>_ <u>Ψ</u> <u>s</u> _<u>∥</u>_ <u>) +</u> _<u>Lσ</u>_ _<u>R</u>_ <u>s</u>
0 _−R_ s 0
_M_ ( _∥_ Ψ s _∥_ ) _Lσ_ _Lσ_
_<u>R</u>_ <u>r</u>
0 _−_ <sup>_<u>R</u>_</sup> <sup><u>r</u></sup> _−ω_
_Lσ_ _Lσ_
0 _−R_ s
0 _−_ <sup>_<u>R</u>_</sup> <sup><u>r</u></sup>
_,_ B _αβ_ =
_−ω_
_Lσ_
_ω_ _−_ <sup>_<u>R</u>_</sup> <sup><u>r</u></sup>
_Lσ_
_<u>2</u>_ _<u>Mathematical</u>_ _<u>Model</u>_ _<u>2.2</u>_ _<u>Induction</u>_ _<u>machine</u>_ _<u>9</u>_
and the state space vector x _αβ_ = [Ψs _α,_ Ψs _β,_ Ψr _α,_ Ψr _β_ ] <sup>T</sup> . According to [19] the torque for
the induction machine is derived as
_τ_ = <sup><u>3</u></sup> _<u>Z</u>_ <u>p</u>
2 _Lσ_
Ψ <sup>T</sup> r <sup>JΨ</sup> <sup>s</sup> <sup>.</sup> (2.14)
In order to obtain the differential equations of the induction machine in an arbitrary
coordinate system, the inverse Park-transformation x _αβ_ = R (Θl) <sup>_−_</sup> <sup>1</sup> x l with the rotation
matrix -
R (Θl) =
cos(Θl) sin(Θl)
_−_ sin(Θl) cos(Θl)
, (2.15)
is used [22]. Here, Θl describes an arbitrary angle between the stator-fixed coordinate
frame and an arbitrary coordinate system l. The replacement of the stationary variables
in (2.8) with the inverse Park transformed quantities from the rotating reference l yields
R (Θl) <sup>_−_</sup> <sup>1</sup> u s _,_ l = _R_ s R (Θl) <sup>_−_</sup> <sup>1</sup> i s _,_ l + <sup><u>d</u></sup> <sup><u>R</u></sup> <sup><u>(Θl)</u></sup> <sup>_−_</sup> <sup>1</sup> <sup><u>Ψ</u></sup> <sup><u>s</u></sup> <sup>_<u>,</u>_</sup> <sup><u>l</u></sup> (2.16a)
d _t_
0 = _R_ r R (Θl) <sup>_−_</sup> <sup>1</sup> i r _,_ l + <sup><u>d</u></sup> <sup><u>R</u></sup> <sup><u>(Θl)</u></sup> <sup>_−_</sup> <sup>1</sup> <sup><u>Ψ</u></sup> <sup><u>r</u></sup> <sup>_<u>,</u>_</sup> <sup><u>l</u></sup> + _ω_ JR (Θl) <sup>_−_</sup> <sup>1</sup> Ψ r _,_ l . (2.16b)
d _t_
The time derivative
d R (Θl) <sup>_−_</sup> <sup>1</sup> Ψ <u>s</u> _<u>/</u>_ <u>r</u> _<u>,</u>_ <u>l</u>
) <sup>_−_</sup> <sup>1</sup> Ψ <u>s</u> _<u>/</u>_ <u>r</u> _<u>,</u>_ <u>l</u> = <sup><u>dΘl</u></sup>
d _t_ d _t_
<u>d</u> <u>R</u> <u>(Θl)</u> <sup>_−_</sup> <sup>1</sup>
dΘl
Ψ s _/_ r _,_ l + R (Θl) <sup>_−_</sup> <sup>1 d</sup> <sup>Ψ</sup> <sup><u>s</u></sup> <sup>_<u>/</u>_</sup> <sup><u>r</u></sup> <sup>_<u>,</u>_</sup> <sup><u>l</u></sup> (2.17a)
d _t_
d _t_
<sup><u>dΘ</u></sup> d _t_ <sup><u>l</u></sup> <sup>R</sup> <sup>(Θl)</sup> <sup>_−_</sup> <sup>1</sup> <sup>JΨ</sup> <sup>s</sup> <sup>_/_</sup> <sup>r</sup> <sup>_,_</sup> <sup>l +</sup> <sup>R</sup> <sup>(Θl)</sup> <sup>_−_</sup> <sup>1</sup> <sup>d</sup> <sup>Ψ</sup> d <sup><u>s</u></sup> _t_ <sup>_<u>/</u>_</sup> <sup><u>r</u></sup> <sup>_<u>,</u>_</sup> <sup><u>l</u></sup>
= _−_ <sup><u>dΘ</u></sup> d _t_ <sup><u>l</u></sup>
(2.17b)
d <sup><u>s</u></sup> _t_ <sup>_<u>/</u>_</sup> <sup><u>r</u></sup> <sup>_<u>,</u>_</sup> <sup><u>l</u></sup>
and a multiplication by the rotation matrix (2.9) from the left side yields
u s _,_ l = _R_ s i s _,_ l + <sup><u>d</u></sup> <sup><u>Ψ</u></sup> <sup><u>s</u></sup> <sup>_<u>,</u>_</sup> <sup><u>l</u></sup> _−_ _ω_ l JΨ s _,_ l (2.18a)
d _t_
0 = _R_ r i r _,_ l + <sup><u>d</u></sup> <sup><u>Ψ</u></sup> <sup><u>r</u></sup> <sup>_<u>,</u>_</sup> <sup><u>l</u></sup> _−_ ( _ω_ l _−_ _ω_ ) JΨ r _,_ l (2.18b)
d _t_
with _ω_ l = <sup><u>dΘ</u></sup> d _t_ <sup><u>l</u></sup> <sup>.</sup> <sup>Eliminating</sup> <sup>the</sup> <sup>currents</sup> <sup>using</sup> <sup>(2.10)</sup> <sup>gives</sup>
_<u>Lσ</u>_ <u>+</u> _<u>M</u>_ <u>(</u> _<u>∥</u>_ <u>Ψ</u> <u>s</u> _<u>∥</u>_ <u>)</u>
u s _,_ l = _R_ s
_Lσ_ <u>+</u> _σM M_ ( _∥_ <u>(</u> Ψ _<u>∥</u>_ <u>Ψ</u> s _∥_ <u>s)</u> _<u>∥</u>_ <u>)</u> <sup>Ψ</sup> <sup>s</sup> <sup>_,_</sup> <sup>l</sup> <sup>_−_</sup> _L_ <sup>_<u>R</u>_</sup> _σ_ <sup><u>s</u></sup>
_Lσ_
Ψ r _,_ l + <sup><u>d</u></sup> <sup><u>Ψ</u></sup> <sup><u>s</u></sup> <sup>_<u>,</u>_</sup> <sup><u>l</u></sup> _−_ _ω_ l JΨ s _,_ l (2.19a)
d _t_
( Ψ r _,_ l _−_ Ψ s _,_ l) + <sup><u>d</u></sup> <sup><u>Ψ</u></sup> <sup><u>r</u></sup> <sup>_<u>,</u>_</sup> <sup><u>l</u></sup> _−_ ( _ω_ l _−_ _ω_ ) JΨ r _,_ l . (2.19b)
d _t_
( Ψ r _,_ l _−_ Ψ s _,_ l) + <sup><u>d</u></sup> <sup><u>Ψ</u></sup> <sup><u>r</u></sup> <sup>_<u>,</u>_</sup> <sup><u>l</u></sup>
0 = <sup>_<u>R</u>_</sup> <sup><u>r</u></sup>
_Lσ_
By rearranging (2.19) and evaluating it in the rotor fixed dq-coordinate system, the state
space formulation
x ˙ IM = A IM( _∥_ Ψ s _∥_ ) x IM + B IM u IM (2.20)
_<u>2</u>_ _<u>Mathematical</u>_ _<u>Model</u>_ _<u>2.2</u>_ _<u>Induction</u>_ _<u>machine</u>_ _<u>10</u>_
with
_<u>R</u>_ <u>r</u>
0
_Lσ_
_ω_ l
0
_−R_ s
_<u>M</u>_ <u>(</u> _<u>∥</u>_ <u>Ψ</u> <u>s</u> _<u>∥</u>_ <u>) +</u> _<u>Lσ</u>_
_M_ ( _∥_ Ψ s _∥_ ) _Lσ_
1 0
0 1
0 0
0 0
,
_<u>R</u>_ <u>s</u>
_Lσ_
_<u>M</u>_ <u>(</u> _<u>∥</u>_ <u>Ψ</u> <u>s</u> _<u>∥</u>_ <u>) +</u> _<u>Lσ</u>_
_M_ ( _∥_ Ψ s _∥_ ) _Lσ_
A IM =
_−ω_ l _−R_ s
_<u>M</u>_ <u>(</u> _<u>∥</u>_ <u>Ψ</u> <u>s</u> _<u>∥</u>_ <u>) +</u> _<u>Lσ</u>_ _<u>R</u>_ <u>s</u>
_−ω_ l _−R_ s 0
_M_ ( _∥_ Ψ s _∥_ ) _Lσ_ _Lσ_
_<u>R</u>_ <u>r</u>
0 _−_ <sup>_<u>R</u>_</sup> <sup><u>r</u></sup> _−ω_ +
_Lσ_ _Lσ_
0 _−_ <sup>_<u>R</u>_</sup> <sup><u>r</u></sup>
_,_ B IM =
_−ω_ + _ω_ l
_ω −_ _ω_ l _−_ <sup>_<u>R</u>_</sup> <sup><u>r</u></sup>
_Lσ_
_Lσ_
(2.21)
the state space vector x IM = [Ψsd _,_ Ψsq _,_ Ψrd _,_ Ψrq] <sup>T</sup> and the input vector u IM = [ _u_ sd _, u_ sq] <sup>T</sup> .
To differentiate between the state space system for the induction machine and the PMSM,
the subscript ( _∗_ )IM stands for I nduction M achine and refers to the variables for the IM.
These variables are derived in the dq-coordinate frame. To keep the nomenclature as
short and simple as possible, the extra subscript ( _∗_ )dq are herein omitted.
In this formulation, the rotational speed _ω_ l is completely arbitrary. By using a rotational
speed of
_ω_ l = _ω_ dq = _ω_ + <sup>_<u>R</u>_</sup> <sup><u>r</u></sup>
_Lσ_
<u>Ψsq</u>
Ψrd
(2.22)
and inserting it into (2.19), the differential equation for the rotor quadrature axis becomes
<u>dΨrq</u>
<u>dΨrq</u> = _−_ <sup>_<u>R</u>_</sup> <sup><u>r</u></sup>
d _t_ _Lσ_
Ψrq . (2.23)
_Lσ_
This formulation represents an autonomous system with the solution
Ψrq = e <sup>_−_</sup> _Lσ_ <sup>_<u>R</u>_</sup> <sup><u>r</u></sup> <sup>_t_</sup>, (2.24)
which is exponentially decaying with the time constant _τ_ = <sup>_<u>L</u>_</sup> _R_ <sup>_<u>σ</u>_</sup> r <sup>.</sup> <sup>By</sup> <sup>using</sup> <sup>this</sup> <sup>approach,</sup>
the arbitrary coordinate frame l is oriented into the direct axis of the rotor flux Ψrd. After
the insertion of (2.22) into (2.19), the differential equations of the Γ-model in the flux
fixed coordinate frame read as
_<u>Lσ</u>_ <u>+</u> _<u>M</u>_ <u>(</u> _<u>∥</u>_ <u>Ψ</u> <u>s</u> _<u>∥</u>_ <u>)</u>
Ψsq (2.25a)
_u_ sd = _R_ s
_u_ sq = _R_ s
_Lσ_ <u>+</u> _σM M_ ( _∥_ <u>(</u> Ψ _<u>∥</u>_ <u>Ψ</u> s _∥_ <u>s)</u> _<u>∥</u>_ <u>)</u> <sup>Ψsd</sup> <sup>_−_</sup> _L_ <sup>_<u>R</u>_</sup> _σ_ <sup><u>s</u></sup>
_<u>σ</u>_ <u>+</u> _<u>M</u>_ <u>(</u> _<u>∥</u>_ <u>Ψ</u> <u>s</u> _<u>∥</u>_ <u>)</u>
_LσM_ ( _∥_ Ψ s _∥_ ) <sup>Ψsq +</sup> <sup><u>dΨ</u></sup> d _t_ <sup><u>sq</u></sup>
_ω_ + <sup>_<u>R</u>_</sup> <sup><u>r</u></sup>
_Lσ_
_Lσ_
Ψrd + <sup><u>dΨsd</u></sup>
<sup><u>sd</u></sup> _−_
d _t_
<u>Ψsq</u>
Ψrd
_<u>Lσ</u>_ <u>+</u> _<u>M</u>_ <u>(</u> _<u>∥</u>_ <u>Ψ</u> <u>s</u> _<u>∥</u>_ <u>)</u>
+
d _t_ <sup><u>sq</u></sup>
Ψsd (2.25b)
_ω_ + <sup>_<u>R</u>_</sup> <sup><u>r</u></sup>
_Lσ_
<u>Ψsq</u>
Ψrd
0 = <sup>_<u>R</u>_</sup> <sup><u>r</u></sup>
_Lσ_
(Ψrd _−_ Ψsd) + <sup><u>dΨrd</u></sup> (2.25c)
d _t_
(Ψrd _−_ Ψsd) + <sup><u>dΨrd</u></sup>
_<u>2</u>_ _<u>Mathematical</u>_ _<u>Model</u>_ _<u>2.2</u>_ _<u>Induction</u>_ _<u>machine</u>_ _<u>11</u>_
and the currents are obtained by
_i_ sd = <sup>_<u>M</u>_</sup> <sup><u>(</u></sup> <sup>_<u>∥</u>_</sup> <sup><u>Ψ</u></sup> <sup><u>s</u></sup> <sup>_<u>∥</u>_</sup> <sup><u>)(</u></sup> <sup>_<u>−</u>_</sup> <sup><u>Ψrd + Ψsd) +</u></sup> <sup>_<u>Lσ</u>_</sup> <sup><u>Ψsd</u></sup>
_M_ ( _∥_ Ψ s _∥_ ) _Lσ_
(2.26a)
(2.26b)
(2.26c)
_i_ sq = Ψsq
_<u>M</u>_ <u>(</u> _<u>∥</u>_ <u>Ψ</u> <u>s</u> _<u>∥</u>_ <u>) +</u> _<u>Lσ</u>_
_M_ ( _∥_ Ψ s _∥_ ) _Lσ_
_i_ rd = <sup><u>Ψrd</u></sup> <sup>_<u>−</u>_</sup> <sup><u>Ψsd</u></sup>
_Lσ_
_i_ rq = _−_ <sup><u>Ψsq</u></sup>
_Lσ_
, (2.26d)
with the equation for the torque
_τ_ = <sup><u>3</u></sup> _<u>Z</u>_ <u>p</u>
2 _Lσ_
ΨrdΨsq . (2.27)
Since [20] uses the power-invariant space vector scaling and this work is based on amplitudeinvariant scaling, the factor <sup><u>3</u></sup> 2 <sup>extends</sup> <sup>(2.27)</sup> <sup>compared</sup> <sup>to</sup> <sup>the</sup> <sup>formulation</sup> <sup>in</sup> <sup>[20].</sup> <sup>The</sup>
ohmic power loss, that is later needed for the optimal steady-state setpoint calculation
and the MPC, is described by
_P_ l = <sup><u>3</u></sup>
2
<sup>T</sup> r <sup>i</sup> <sup>r)</sup> <sup>.</sup> (2.28)
<sup><u>3</u></sup> 2 <sup>(</sup> <sup>_R_</sup> <sup>s</sup> <sup>i</sup> s <sup>T</sup> <sup>i</sup> <sup>s</sup> <sup>+</sup> <sup>_R_</sup> <sup>r</sup> <sup>i</sup> <sup>T</sup> r
Furthermore, in the steady state, the time derivatives of the fluxes are set to zero and thus
the direct stator flux and the direct rotor flux assume the same value according to (2.25c).
By inserting this relation into (2.25a) and (2.25b), the steady-state stator voltages _u_ <sup>s</sup> sd
and _u_ <sup>s</sup> sq <sup>are</sup> <sup>computed</sup> <sup>as</sup>
+ <sup>_<u>R</u>_</sup> <sup><u>s</u></sup>
_M_
<sup>_<u>R</u>_</sup> <sup><u>s</u></sup>
_M_ <sup>Ψs</sup>
sd (2.29a)
<sup>s</sup>
_u_ <sup>s</sup>
<sup>s</sup> sd <sup>=</sup> <sup>_−ω_</sup> <sup>Ψs</sup>
<u>sq</u>
<sup>s</sup> sq <sup>_−_</sup> <sup>_R_</sup> <sup>r(Ψs</sup>
_Lσ_ Ψ <sup>s</sup>
_Lσ_ Ψ <sup>s</sup>
<u>sq</u> <sup>s</sup> <sup>)2</sup>
sd
<sup>s</sup> sq (2.29b)
_u_ <sup>s</sup>
<sup>s</sup> sq <sup>=</sup> <sup>_ω_</sup> <sup>Ψs</sup>
<sup>s</sup> sd <sup>+</sup> <sup>_<u>R</u>_</sup> <sup><u>r</u></sup>
_Lσ_
_Lσ_
Ψ <sup>s</sup> sq <sup>+</sup> <sup>_R_</sup> <sup>s</sup>
Ψ <sup>s</sup>
_<u>Lσ</u>_ <u>+</u> _<u>M</u>_
_<u>σ</u>_ <u>+</u> _<u>M</u>_
Ψ <sup>s</sup>
_LσM_
in which the mutual inductance is evaluated according to (2.11). Additionally, the steadystate currents _i_ <sup>s</sup> sd <sup>and</sup> <sup>_i_</sup> sq <sup>s</sup> <sup>are</sup> <sup>obtained</sup> <sup>by</sup> <sup>inserting</sup> <sup>the</sup> <sup>steady-state</sup> <sup>fluxes</sup> <sup>Ψs</sup> sd <sup>and</sup> <sup>Ψ</sup> sq <sup>s</sup>
into (2.10) and solving this relation for the currents according to
<sup>s</sup> sd <sup>and</sup> <sup>_i_</sup> <sup>s</sup>
<sup>s</sup> sd <sup>and</sup> <sup>Ψs</sup>
sq <sup>s</sup> <sup>are</sup> <sup>obtained</sup> <sup>by</sup> <sup>inserting</sup> <sup>the</sup> <sup>steady-state</sup> <sup>fluxes</sup> <sup>Ψs</sup>
<sup>s</sup> sd <sup>=</sup> <sup><u>Ψs</u></sup>
_i_ <sup>s</sup>
<u>sd</u> <sup>s</sup> (2.30a)
_M_
_i_ <sup>s</sup>
<sup>s</sup> sq <sup>= Ψ</sup> sq <sup>s</sup>
sq
_<u>M</u>_ <u>+</u> _<u>Lσ</u>_
_MLσ_
(2.30b)
_i_ <sup>s</sup> rd <sup>= 0</sup> (2.30c)
<sup>s</sup> rq <sup>=</sup> <sup>_−_</sup> <sup>Ψs</sup>
_L_
_i_ <sup>s</sup>
<u>sq</u>
<sup>Ψs</sup>
_Lσ_
, (2.30d)
in which the mutual inductance is again evaluated according to (2.11).
_<u>2</u>_ _<u>Mathematical</u>_ _<u>Model</u>_ _<u>2.3</u>_ _<u>Scaling</u>_ _<u>of</u>_ _<u>model</u>_ _<u>parameters</u>_ _<u>12</u>_
### 2.3 Scaling of model parameters
To make the simulations, which are performed in Section 3.6 and Section 4.7, comparable,
the machine data and the simulation results in this work are depicted as normalized
quantity. To keep the nomenclature as simple as possible, the same variable set of
normalization parameters is used for the PMSM and the IM. However it is important
to mention, that these parameters do not need to have the same value for the specific
machine. The normalization parameters are summarized in Table 2.1.
Normalization Parameter Description
_ω_ N Maximum electrical rotational speed
_I_ N Maximum stator current
_τ_ N Maximum torque
_U_ N Maximum stator voltage
ΨN
_<u>U</u>_ <u>N</u>
_ω_ N
Table 2.1: Normalization parameters of the electrical machines.
# 3 MPC Approximation for PMSM
This chapter deals with the formulation and the approximation of different MPC types
for the PMSM. First, the different types of MPCs that are investigated are introduced. In
a second step, the data generation and the approximation is explained in more detail and
some simulation results are shown.
### 3.1 Control Loop structure
As already mentioned in Section 1.1, an MPC is a model based control strategy, which
optimizes the inputs of the plant over a prediction horizon into the future in order to
minimize a certain cost functional [23]. Based on this optimization, the first input value
is then applied to the system and the optimization loop starts in the next timestep again.
In this work, three different MPC types are investigated:
- MPC without regularization terms
- MPC with a regularization term on the state
- MPC with a regularization term on the state and the input
By choosing these three formulations, the capabilities of the approximation on a set of
different input variables of the MPC are shown. This shows the generalizability of the
proposed approach to different input variables and formulations.
The control structure for the field-oriented control of the PMSM is shown in Figure 3.1.
It consists of a setpoint calculation, which computes the steady-state optimal setpoints
with respect to the copper losses, an integrator, which reduces the steady-state error and
the MPC itself, which applies finally the computed voltages to the inverter and the motor.
_<u>ω</u>_
Setpoint
calculation
i <sup>s</sup>
<u>SM</u>
LUT <u>SM</u> u <u>SM</u> <u>i</u> <u>SM</u>
Ψ <sup>s</sup>
<u>SM</u>
u <u>SM</u>
MPC Plant
LUT
_<u>τ</u>_ <sup>d</sup> calculation
u SM _,_ i
_K_ i
Ψ SM
Ψ e
_~~−~~_
LUT
Figure 3.1: Block diagram of the control structure of the PMSM.
_13_
_<u>3</u>_ _<u>MPC</u>_ _<u>Approximation</u>_ _<u>for</u>_ _<u>PMSM</u>_ _<u>3.2</u>_ _<u>Setpoint</u>_ _<u>calculation</u>_ _<u>14</u>_
In the following the optimal setpoint calculation and the three MPC formulations are
introduced and compared to each other in terms of complexity, dynamical characteristics
and noise behavior.
### 3.2 Setpoint calculation
The main task of the setpoint calculation lies in the determination of steady-state, energy
optimal setpoints Ψ <sup>s</sup> SM <sup>= [Ψ</sup> d <sup>s</sup> <sup>_,_</sup> <sup>Ψ</sup> q <sup>s</sup> <sup>]T,</sup> <sup>while</sup> <sup>still</sup> <sup>achieving</sup> <sup>the</sup> <sup>desired</sup> <sup>torque.</sup> <sup>To</sup> <sup>compute</sup>
optimal setpoints Ψ <sup>s</sup> SM <sup>= [Ψ</sup> d <sup>s</sup> <sup>_,_</sup> <sup>Ψ</sup> q <sup>s</sup> <sup>]T,</sup> <sup>while</sup> <sup>still</sup> <sup>achieving</sup> <sup>the</sup> <sup>desired</sup> <sup>torque.</sup> <sup>To</sup> <sup>compute</sup>
the optimal setpoints, the losses in the machine must be minimized. Since the factor <sup><u>3</u></sup> 2 <sup>_R_</sup> <sup>s</sup>
<sup>s</sup> SM <sup>= [Ψ</sup> d <sup>s</sup>
d <sup>s</sup> <sup>_,_</sup> <sup>Ψ</sup> q <sup>s</sup>
the optimal setpoints, the losses in the machine must be minimized. Since the factor <sup><u>3</u></sup> 2 <sup>_R_</sup> <sup>s</sup>
only scales the absolute value of the minimum of the stator losses in (2.7), but does not
change the location of the minimum, the nonlinear optimization problem is formulated as
i <sup>_∗_</sup>
<sup>_∗_</sup> SM <sup>= argmin</sup>
i <sup>T</sup> SM <sup>i</sup> <sup>SM</sup> (3.1a)
i SM
s.t. _τ_ ( i SM) _−_ _τ_ <sup>d</sup> = 0 (3.1b)
<sup>2</sup> d <sup>+</sup> <sup>_u_</sup> q <sup>2</sup>
_u_ <sup>2</sup> d
_i_ <sup>2</sup> d
q <sup>2</sup> <sup>_≤_</sup> <sup>_i_</sup> <sup>2</sup>
q <sup>2</sup> <sup>_≤_</sup> <sup>_u_</sup> <sup>2</sup>
HW <sup>2</sup> (3.1d)
HW <sup>2</sup> (3.1c)
<sup>2</sup> d <sup>+</sup> <sup>_i_</sup> q <sup>2</sup>
with the reference torque _τ_ <sup>d</sup> and the current torque from (2.6). In (3.1c) and (3.1d) _u_ HW
and _i_ HW refer to the constraints for the voltage and the current respectively. These are
the maximum values that can be applied to the hardware in the system. This optimization
problem with the optimization vector i SM = [ _i_ d _, i_ q] <sup>T</sup> yields the M aximum T orque P er
A mpere (MTPA) curve in the base speed range. For higher speeds, the voltage constraint
becomes active and thus the optimal solution is found on the voltage boundary curve. In
the literature this region is often referred to as fieldweakening range. In this equation
set, the superscript ( _∗_ ) <sup>_∗_</sup> refers to the optimal solution and the superscript ( _∗_ ) <sup>s</sup> refers to
the desired optimal steady state setpoints. Since the states for the MPC are fluxes, the
optimal current setpoints have to be transformed using the relationship (2.2) with LUTs
for the inductances.
### 3.3 MPC formulation
3.3.1 MPC without regularization terms
The main goal of the MPC without any regularization terms is to follow a given trajectory
over the time horizon _N_ ph as closely as possible while taking the current and voltage
constraints into account. For this purpose, the deviation between the predicted states
of the model and the optimal setpoints from (3.1a) are used. To improve the readability
of this work, the notation ( _∗_ ) _m|j_ is used, which indicates the predicted quantity on the
prediction horizon at the time _t_ = ( _m_ + _j_ ) _T_ s with the sampling time _T_ s for the MPC
evaluated at _t_ = _mT_ s. By taking these considerations into account, the optimization
_<u>3</u>_ _<u>MPC</u>_ _<u>Approximation</u>_ _<u>for</u>_ _<u>PMSM</u>_ _<u>3.3</u>_ _<u>MPC</u>_ _<u>formulation</u>_ _<u>15</u>_
problem and the MPC read as
u <sup>_∗_</sup>
u SM _,m|j_
SM <sup>_∗_</sup> _,m|j_ <sup>=</sup> <sup>argmin</sup>
_J_ ( u SM _,m|j_ ) =
_N_ ph
_j_ =1
(3.2a)
x SM _,m|j_ _−_ x SM <sup>s</sup> _,m|j_
�T
x SM _,m|j_ _−_ x SM <sup>s</sup> _,m|j_
= argmin
u SM _,m|j_
= argmin
s.t. x SM _,m|j_ +1 = F SM _,m|j_, _j_ = 0 _, ..., N_ ph _−_ 1 (3.2b)
<sup>2</sup> d _,m|j_ <sup>+</sup> <sup>_u_</sup> q <sup>2</sup>
_u_ <sup>2</sup> d
_i_ <sup>2</sup> d
<sup>2</sup> q _,m|j_ <sup>_≤_</sup> <sup>_i_</sup> <sup>2</sup>
q <sup>2</sup> _,m|j_ <sup>_≤_</sup> <sup>_u_</sup> <sup>2</sup>
HW <sup>2</sup> <sup>,</sup> _j_ = 1 _, ..., N_ ph, (3.2d)
mpc <sup>2</sup> _,_ HW <sup>,</sup> _j_ = 0 _, ..., N_ ph _−_ 1 (3.2c)
<sup>2</sup> d _,m|j_ <sup>+</sup> <sup>_i_</sup> <sup>2</sup> q
with the state x SM _,m|j_ = [Ψd _,m|j,_ Ψq _,m|j_ ] <sup>T</sup> and the input u SM _,m|j_ = [ _u_ d _,m|j, u_ q _,m|j_ ] <sup>T</sup>,
which represents also the optimization variable. The function F SM _,m|j_ stands here as an
abbreviation for the evaluation of the state space system in (2.4). The boundary value
_u_ mpc _,_ HW is defined as
_u_ mpc _,_ HW = _u_ HW _−∥_ u SM _,_ i _∥_ 2, (3.3)
where u SM _,_ i defines the voltage that comes from the integrator. This voltage is needed in
order to achieve steady state accuracy also in the case of parameter deviations.
The first state for the prediction of the future states is set to be the measured state
x SM _,m|_ 0 = x SM _,m_ . To save even more computation time for the evaluation of the MPC,
the dynamic matrix and the input matrix are only computed once at the current operating
point of the machine and kept constant over the prediction horizon. The predicted change
of the operating point over the prediction horizon is neglected in the evaluation of the
LUTs, since the influence of this effect is minor. This is due to the high sample rate of the
controller and thus the small length of the prediction horizon, during which the saturation
behavior of the state matrices does not change strongly.
3.3.2 MPC with regularization on the state
The main goal of the MPC with regularization on the state is similar to the MPC
without regularization terms- the losses in each optimization step should be reduced,
while achieving the desired torque. In contrast to the previous MPC, this MPC has an
extra term that penalizes the discrete time derivative (the difference of the state vector
between two subsequent states). By adding this term, the state trajectory should become
smoother, since its rate of change is penalized. This achieves a better noise suppression,
as the state vector can not react as fast to high frequency noise as for the MPC without
regularization. However, this comes at the cost of a slower dynamical behavior. Taking
_<u>3</u>_ _<u>MPC</u>_ _<u>Approximation</u>_ _<u>for</u>_ _<u>PMSM</u>_ _<u>3.3</u>_ _<u>MPC</u>_ _<u>formulation</u>_ _<u>16</u>_
these considerations into account, the optimization problem and the MPC read as
u <sup>_∗_</sup>
u SM _,m|j_
SM <sup>_∗_</sup> _,m|j_ <sup>=</sup> <sup>argmin</sup>
_J_ ( u SM _,m|j_ ) =
2
���
2
2 2
��� x SM _,m|j_ _−_ x SM _,m|j−_ 1���
2 <sup>+</sup> <sup>_K_</sup> <sup>∆x</sup> 2
(3.4a)
2
= argmin
u SM _,m|j_
_N_ ph
_K_ x
_j_ =1
��� x SM _,m|j_ _−_ x SMs _,m|j_
s.t. x SM _,m|j_ +1 = F SM _,m|j_, _j_ = 0 _, ..., N_ ph _−_ 1 (3.4b)
<sup>2</sup> d _,m|j_ <sup>+</sup> <sup>_u_</sup> q <sup>2</sup>
_u_ <sup>2</sup> d
_i_ <sup>2</sup> d
<sup>2</sup> q _,m|j_ <sup>_≤_</sup> <sup>_i_</sup> <sup>2</sup>
q <sup>2</sup> _,m|j_ <sup>_≤_</sup> <sup>_u_</sup> <sup>2</sup>
HW <sup>2</sup> <sup>,</sup> _j_ = 1 _, ..., N_ ph, (3.4d)
mpc <sup>2</sup> _,_ HW <sup>,</sup> _j_ = 0 _, ..., N_ ph _−_ 1 (3.4c)
<sup>2</sup> d _,m|j_ <sup>+</sup> <sup>_i_</sup> <sup>2</sup> q
with the positive weights _K_ x and _K_ ∆x. These weights are tuning parameters of the MPC.
If the ratio between the weight on the state _K_ x and the weight on the difference of the state
_K_ ∆x is high, the MPC will behave similarly as the MPC without regularization terms. For
a low value of this ratio on the other hand, the MPC will show a slow dynamic behavior
with a high noise suppression capability. For the usage on a real machine, these parameters
have to be tuned on the testbench to achieve a trade-off between high dynamical behavior
and smooth state trajectories. The rest of the MPC is the same as for the MPC without
regularization terms. One notable difference is, that the computation time to solve the
optimization problem for one timestep is significantly higher than for the MPC without
regularization terms. This can be explained by the fact, that the optimization problem
got more complex by the introduction of the extra term.
3.3.3 MPC with regularization on the state and on the input
The main goal of the MPC with regularization on the state and on the input is equivalent
to the MPC without regularization terms. For this MPC, the regularization is even
stronger than for the MPC with regularization on the state, since the input vector and
the state vector are penalized by the optimization problem. By adding the penalization
term on the discrete time derivative of the input, the input trajectory becomes smoother,
since its change rate is penalized. This achieves an even higher noise suppression than for
the MPC with regularization on the state. Taking these considerations into account, the
optimization problem and the MPC read as
u <sup>_∗_</sup>
u SM _,m|j_
_J_ ( u SM _,m|j_ ) =
SM <sup>_∗_</sup> _,m|j_ <sup>=</sup> <sup>argmin</sup>
_N_ ph
_K_ x
2 2
��� x SM _,m|j_ _−_ x SM _,m|j−_ 1���
2 <sup>+</sup> <sup>_K_</sup> <sup>∆x</sup> 2
2 <sup>+</sup>
= argmin
u SM _,m|j_
= argmin
��� x SM _,m|j_ _−_ x SMs _,m|j_
2
���
2
_j_ =1
2
��� u SM _,m|j_ _−_ u SM _,m|j−_ 1���
+ _K_ ∆u
(3.5a)
2
s.t. x SM _,m|j_ +1 = F SM _,m|j_, _j_ = 0 _, ..., N_ ph _−_ 1 (3.5b)
_u_ <sup>2</sup> d
_i_ <sup>2</sup> d
<sup>2</sup> q _,m|j_ <sup>_≤_</sup> <sup>_i_</sup> <sup>2</sup>
HW <sup>2</sup> <sup>,</sup> _j_ = 1 _, ..., N_ ph, (3.5d)
<sup>2</sup> d _,m|j_ <sup>+</sup> <sup>_u_</sup> <sup>2</sup> q
<sup>2</sup> q _,m|j_ <sup>_≤_</sup> <sup>_u_</sup> <sup>2</sup>
mpc <sup>2</sup> _,_ HW <sup>,</sup> _j_ = 0 _, ..., N_ ph _−_ 1 (3.5c)
<sup>2</sup> d _,m|j_ <sup>+</sup> <sup>_i_</sup> <sup>2</sup> q
_<u>3</u>_ _<u>MPC</u>_ _<u>Approximation</u>_ _<u>for</u>_ _<u>PMSM</u>_ _<u>3.4</u>_ _<u>Data</u>_ _<u>generation</u>_ _<u>17</u>_
with the positive weight _K_ ∆u. This weight is an additional tuning parameter of the MPC.
If this weight dominates the other weights, the input will become a smooth trajectory at
the cost of dynamical behavior. However, since the input has direct influence on the state
itself, the smoothing of the input will deliver also a smoother state at the end. For this
MPC, the tuning effort is even higher than for the MPC with regularization on the state,
since the weight on the state and the weight on the input are not completely independent
from each other. This extra term makes the optimization problem more complex and thus
its evaluation slower.
### 3.4 Data generation
3.4.1 MPC without regularization and MPC with regularization on the state
In order to perform an approximation of the control action of the MPC, simulations have
to be performed, which cover the whole operation space of the electrical machine. The
MPC formulation in (3.2) and (3.4) and the equation for the maximum voltage in (3.3)
show, that seven input variables are needed in order to evaluate these MPCs in a specific
operation point. The input variables for the evaluation of the MPCs are summarized in
_ζ_ mpc _,_ SM = [ _i_ d _, i_ q _, i_ d <sup>s</sup>
d <sup>s</sup> <sup>_, i_</sup> <sup>s</sup> q
<sup>s</sup> q <sup>_, u_</sup> <sup>d</sup> <sup>_,_</sup> <sup>i</sup> <sup>_, u_</sup> <sup>q</sup> <sup>_,_</sup> <sup>i</sup> <sup>_, ω_</sup> <sup>]T</sup> <sup>.</sup> (3.6)
From the seven variables in (3.6), the integrator voltages in the direct and quadrature
direction _u_ d _,_ i and _u_ q _,_ i are important to determine the true voltage boundary in (3.3). The
electrical speed is necessary to evaluate the dynamic matrix Φ SM in (2.5). The other four
variables are directly representing the optimization goal of the MPC in (3.2b), namely the
two true currents that represent the current state _i_ d, _i_ q and the two setpoint currents _i_ <sup>s</sup> d <sup>,</sup>
two true currents that represent the current state _i_ d, _i_ q and the two setpoint currents _i_ <sup>s</sup> d <sup>,</sup>
_i_ <sup>s</sup> q <sup>.</sup> <sup>Here</sup> <sup>the</sup> <sup>currents</sup> <sup>are</sup> <sup>used</sup> <sup>as</sup> <sup>inputs,</sup> <sup>since</sup> <sup>the</sup> <sup>definition</sup> <sup>of</sup> <sup>a</sup> <sup>maximum</sup> <sup>current</sup> <sup>for</sup>
_i_ <sup>s</sup> q <sup>.</sup> <sup>Here</sup> <sup>the</sup> <sup>currents</sup> <sup>are</sup> <sup>used</sup> <sup>as</sup> <sup>inputs,</sup> <sup>since</sup> <sup>the</sup> <sup>definition</sup> <sup>of</sup> <sup>a</sup> <sup>maximum</sup> <sup>current</sup> <sup>for</sup>
the machine is a safety boundary for the possible operation range. Therefore, the input
currents in the two respective coordinate system directions are used as inputs for the MPC
and its approximation in Section 3.5 instead of defining a simulation grid directly for the
fluxes. The corresponding fluxes to a set of input currents is obtained by evaluating the
LUTs according to (2.2). The advantage of this approach is, that the input grid for the
simulations of the MPC can be defined very easily. Furthermore, the computational effort
for the evaluation of the approximation in a later step is lower, since the LUT evaluation
has not to be performed for the approximation. The downside of this approach is, that
the LUTs can not be exchanged at a later stage, since they are part of the approximation
itself. Furthermore, the approximation of the nonlinearity of the LUTs adds another layer
of complexity for the approximation of the MPC behavior. Since the main goal of this
work is to decrease the computational effort, however, this approach yields the smallest
evaluation time, since only the data driven approach is evaluated and the additional
evaluation of a LUT is not needed.
In order to perform suitable simulations from which the behavior of the MPC can be
learned, the parameter space for the inputs has to be defined. For the usage in a
car, simulations for the motor and generator mode of the electrical machine are of big
importance for the approximation of the MPC. The reason for this is, that the voltage
_<u>3</u>_ _<u>MPC</u>_ _<u>Approximation</u>_ _<u>for</u>_ _<u>PMSM</u>_ _<u>3.4</u>_ _<u>Data</u>_ _<u>generation</u>_ _<u>18</u>_
drop over the stator resistance _R_ s in the quadrature direction changes its sign when the
current becomes negative. This behavior finally leads to different setpoints for the MTPA
calculation. In order to show a proof of concept in this work, only the motoric region is
Parameter Minimum Maximum
_i_ d - _I_ N 0
_i_ q 0 _I_ N
_i_ <sup>s</sup> d - _I_ N 0
_i_ <sup>s</sup> d - _I_ N 0
_i_ <sup>s</sup> q 0 _I_ N
_i_ <sup>s</sup> q 0 _I_ N
_u_ d _,_ i -0.04 _U_ N 0.04 _U_ N
_u_ q _,_ i -0.04 _U_ N 0.04 _U_ N
_ω_ 0 _ω_ N
Table 3.1: Input parameter space of the PMSM.
considered in the parameter ranges of this PMSM. For the following considerations, an
electrical machine with the input parameter space in Table 3.1 is chosen. The input space
for the electrical speed covers the entire positive speed range of this electrical machine.
Since this machine is symmetric, simulations over the positive and the negative speed
range would be redundant, since the same results are expected for positive and negative
speeds. Dynamic setpoint changes at different parameter deviations of the MPC define
the input parameter space for the integrator voltages by simulations. For this purpose,
the integrator weights are tuned in order to ensure less than 5% overshoot in the whole
operating range including parameter deviations in the flux LUTs of _±_ 30%.
To accomplish a high approximation accuracy, the parameter ranges from Table 3.1 have
to be covered by a fine grid, because the nonlinear nature of the control structure and the
system is sensible to big interpolation errors by the data driven approach. This need for a
fine simulation grid leads to a high number of simulations to be performed and thus to
a high computational effort. Since the input variable space is seven dimensional, the so
called curse of dimensionality has also to be considered. This concept was introduced first
by Richard E. Bellman in [24] and says, that with increasing dimensionality, the volume
of the space increases so fast, that the available points become sparse. If the parameter
ranges in Table 3.1 are for example sampled by a grid with _n_ i = 41 elements for _i_ d, _i_ q, _i_ <sup>s</sup> d
and _i_ <sup>s</sup> q <sup>respectively,</sup> <sup>a</sup> <sup>grid</sup> <sup>with</sup> <sup>_n_</sup> <sup>ui</sup> <sup>= 5</sup> <sup>elements</sup> <sup>for</sup> <sup>the</sup> <sup>integrator</sup> <sup>voltages</sup> <sup>in</sup> <sup>direct</sup> <sup>and</sup>
quadrature direction and a grid with _nω_ = 17 speedpoints for the electrical speed, this
would correspond to
_n_ sim = _n_ <sup>4</sup> i
<sup>4</sup> i <sup>_· n_</sup> <sup>2</sup> u
<sup>2</sup> u _,_ i <sup>_· nω_</sup> <sup>= 414</sup> <sup>_·_</sup> <sup>52</sup> <sup>_·_</sup> <sup>17</sup> <sup>_≈_</sup> <sup>1</sup> <sup>_._</sup> <sup>2</sup> <sup>_·_</sup> <sup>109</sup> (3.7)
simulations. The reason for this high number of simulations is, that every possible
permutation of inputs has to be simulated. By assuming an average simulation time
of 5ms for each simulation, this would finally lead for this 1.2 billion simulations to a
computation time of 6 million seconds or approximately 70 days on a single core. Since
_<u>3</u>_ _<u>MPC</u>_ _<u>Approximation</u>_ _<u>for</u>_ _<u>PMSM</u>_ _<u>3.4</u>_ _<u>Data</u>_ _<u>generation</u>_ _<u>19</u>_
the computations are independent from each other, this problem is very well parallelizable,
but even on 8 cores it would still take up to 9 days to perform all these simulations.
For this purpose a different sampling technique is chosen in this work. PMSMs are
_<u>ω</u>_
_ω_ N
0 _<u>.</u>_ <u>3</u> <u>0</u> _<u>.</u>_ <u>35</u> <u>0</u> _<u>.</u>_ <u>4</u> <u>0</u> _<u>.</u>_ <u>45</u> <u>0</u> _<u>.</u>_ <u>5</u> <u>0</u> _<u>.</u>_ <u>55</u> <u>0</u> _<u>.</u>_ <u>6</u> <u>0</u> _<u>.</u>_ <u>65</u> <u>0</u> _<u>.</u>_ <u>7</u> <u>0</u> _<u>.</u>_ <u>75</u> <u>0</u> _<u>.</u>_ <u>8</u> <u>0</u> _<u>.</u>_ <u>85</u> <u>0</u> _<u>.</u>_ <u>9</u> <u>0</u> _<u>.</u>_ <u>95</u> <u>1</u>
1
0 _._ 8
0 _._ 6
0 _._ 4
0 _._ 2
_~~τ~~_ ~~= 0~~ _~~.~~_ ~~64~~ _~~τ~~_ N _~~ω~~_ ~~= 0~~ _~~.~~_ ~~5~~ _~~ω~~_ N
0
_−_ 1 _−_ 0 _._ 8 _−_ 0 _._ 6 _−_ 0 _._ 4 _−_ 0 _._ 2 0
_−_ 1 _−_ 0 _._ 8 _−_ 0 _._ 6 _−_ 0 _._ 4 _−_ 0 _._ 2 0
_<u>i</u>_ <u>d</u> _<u>i</u>_ <u>d</u>
_i_ N _i_ N
(a) Operating strategy over speed. (b) Operating strategy for discrete speeds.
Figure 3.2: Optimal operating strategy for the PMSM.
usually driven in the base speed region along the MTPA curve, at higher speeds as soon as
the voltage boundary is active along the voltage boundary in the so called field weakening
region and at the highest speeds and high torques along the MTPV ( M aximum T orque
P er V olt) curve. The optimal operating strategy for an increasing speed is shown in
Figure 3.2a. This figure shows a torque sweep for the blue depicted MTPA curve for small
speeds. As soon as the machine reaches its maximum torque, the speed is increased. The
figure shows, that the machine is driven explicitly in the MTPA region until a speed of
0 _._ 3 _ω_ N is reached. For higher speeds however, the voltage boundary gets more restrictive,
since the Back EMF increases. This results in a lower maximal achievable torque in the
field weakening region, where the electrical machine is controlled at the voltage boundary
and the current boundary for the highest torques– this results in movement among the
current boundary curve, where the maximum achievable torque is decreased. By increasing
the speed above 0 _._ 6 _ω_ N it can be observed, that the operating strategy detaches from the
current boundary circle. This can be explained by the fact, that the voltage boundary has
an elliptical form in the plot over the direct and quadrature current. Since the isotorque
lines are hyperbolas in the second quadrant, one reaches the maximum achievable torque
in the high speed region by finding the point where the isotorque line is exactly tangent
to the elliptical voltage boundary constraint. This can only be the case, if the semimajor
_<u>3</u>_ _<u>MPC</u>_ _<u>Approximation</u>_ _<u>for</u>_ _<u>PMSM</u>_ _<u>3.4</u>_ _<u>Data</u>_ _<u>generation</u>_ _<u>20</u>_
of the ellipse lies on the right of the current boundary, since otherwise there is no tangent
point in the allowed region where the current and the voltage boundary are met. In
Figure 3.2a, an arbitrary isotorque line for a value of _τ_ = 0 _._ 64 _τ_ N and the voltage constraint
for an arbitrary speed of _ω_ = 0 _._ 5 _ω_ N are shown.
Figure 3.2b shows the operating strategy for some discrete electrical speeds, where the
torque is increased from 0Nm to the maximum achievable torque at each speed. Here
the transition between the MTPA controlled region and the fieldweakening region can be
observed by the fact, that for smaller torques the curves move along the MTPA curve and
for higher torques and higher speeds the elliptical voltage boundary gets active and the
curve changes to proceed on the path of the voltage boundary in order to achieve higher
torques. For speeds above 0 _._ 65 _ω_ N it can also be observed, that the machine can not be
controlled in the MTPA region for 0Nm anymore, since the voltage boundary is active at
all times. For this high speed region a negative direct current has to be set even at 0Nm
in order to weaken the field, since the Back EMF has become already so strong, that it
creates more counter voltage than the inverter can apply to the system.
By taking these considerations into account, the sampling can be adapted in such a way,
that the behavior of the electrical machine around these operation regions is sampled in
a fine fashion without an exploding computational time effort. Therefore the setpoint
currents and after the LUT evaluation the setpoint fluxes are sampled around the optimal
operating curves of the PMSM. This sampling is shown in Figure 3.3. In this figure
all simulation points for the different speeds are plotted. For a representative speed of
0 _._ 5 _ω_ N, the sampling is shown by the red dots. For the generation of this simulation
1
0 _._ 8
0 _._ 6
0 _._ 4
0 _._ 2
_<u>ω</u>_ _<u>∈</u>_ <u>[0</u> _<u>, ω</u>_ N]
0 _._ 5 _ω_ N
0
_−_ 1 _−_ 0 _._ 8 _−_ 0 _._ 6 _−_ 0 _._ 4 _−_ 0 _._ 2 0
_<u>i</u>_ <u>d</u>
_i_ N
Figure 3.3: Simulation grid for the optimal setpoint currents in the machine.
_<u>3</u>_ _<u>MPC</u>_ _<u>Approximation</u>_ _<u>for</u>_ _<u>PMSM</u>_ _<u>3.4</u>_ _<u>Data</u>_ _<u>generation</u>_ _<u>21</u>_
Current boundary
Grid points
1
0 _._ 5
0
_−_ 1 _−_ 0 _._ 8 _−_ 0 _._ 6 _−_ 0 _._ 4 _−_ 0 _._ 2 0
_<u>i</u>_ <u>d</u>
_i_ N
(a) Grid for the actual currents.
0 _._ 04
0 _._ 02
0 _._ 00
_−_ 0 _._ 02
_−_ 0 _._ 04
_−_ 0 _._ 04 _−_ 0 _._ 02 0 _._ 00 0 _._ 02 0 _._ 04
_<u>u</u>_ <u>d</u> _<u>,</u>_ <u>i</u>
_u_ N
(b) Grid for the integrator voltages.
Figure 3.4: Simulation grids for the actual currents and the integrator voltages in the
machine.
grid, each curve of Figure 3.2b is sampled by _n_ i _,_ SP = 150 points. For each point two
random values are picked from a uniform distribution with a maximum value of 0 _._ 05 _I_ N
and these values are then added to the direct and quadrature component of the current
respectively. By choosing this sampling, the optimal operating strategy for the ideal
system for each speed is contained in the dataset and furthermore the randomness can
help against parameter deviations, which would lead to slightly different curves. This
helps the data driven approach by making the dataset more representative and thus
potentially increasing the performance of the interpolation. In principle, every speed
interval is captured by the sampling seperately from all other speed intervals. Since
the region around i SM = [0 _._ 7 _I_ N _,_ 0 _._ 5 _I_ N] <sup>T</sup> is sparsely populated with simulation points by
this sampling scheme, another speed interval is added to the sampling to generate more
simulation points in this region and increase the interpolation capability of the approach
in this region. However, this increases the dimension of the speed vector by one element
and thus the computational simulation effort.
Figure 3.4 shows the sampling scheme in detail for the current states of the electrical
machine and the integrator voltages. For the currents in Figure 3.4a the uniform grid that
was described before was used, since the electrical machine can principally be operated in
each of these current combinations and therefore every combination should be resolved
by the sampling in a fine grid. The currents with a bigger magnitude than the current
boundary are omitted here, since the electrical machine should not be operated in these
points under normal conditions. This yields _n_ i _,_ states = 1297 points for the actual currents
in the machine. For the integrator voltages a uniform grid as shown in Figure 3.4b is used.
This finally results in a simulation effort of
_n_ SM = _n_ i _,_ states _· n_ i _,_ SP _· n_ <sup>2</sup> u _,_ i <sup>_· nω_</sup> <sup>= 1297</sup> <sup>_·_</sup> <sup>150</sup> <sup>_·_</sup> <sup>52</sup> <sup>_·_</sup> <sup>18</sup> <sup>_≈_</sup> <sup>8</sup> <sup>_._</sup> <sup>8</sup> <sup>_·_</sup> <sup>107</sup> (3.8)
_<u>3</u>_ _<u>MPC</u>_ _<u>Approximation</u>_ _<u>for</u>_ _<u>PMSM</u>_ _<u>3.4</u>_ _<u>Data</u>_ _<u>generation</u>_ _<u>22</u>_
points, which is by a factor _≈_ 13 smaller than the result that would be obtained by the
sampling in (3.7). The computation time could therefore also be brought down by a factor
of approximately 13 and therefore these simulation can be run over one day on 8 cores.
3.4.2 MPC with regularization on the state and on the input
For the MPC with regularization on the state and on the input, the input parameter
space increases by two, since the voltage vector in the first timestep is not known at
the beginning of the evaluation. To approximate the behavior in a meaningful way, the
starting voltages in the direct and quadrature direction must be provided as two extra
inputs to the system. Therefore the input vector for this MPC extends to
<sup>ext</sup> mpc _,_ SM <sup>= [</sup> <sup>_i_</sup> <sup>d</sup> <sup>_, i_</sup> <sup>q</sup> <sup>_, i_</sup> d <sup>s</sup>
q <sup>s</sup> <sup>_, u_</sup> <sup>d</sup> <sup>_,_</sup> <sup>i</sup> <sup>_, u_</sup> <sup>q</sup> <sup>_,_</sup> <sup>i</sup> <sup>_, ω, u_</sup> <sup>d</sup> <sup>_,_</sup> <sup>0</sup> <sup>_, u_</sup> <sup>q</sup> <sup>_,_</sup> <sup>0]T</sup> <sup>,</sup> (3.9)
_ζ_ <sup>ext</sup> mpc
d <sup>s</sup> <sup>_, i_</sup> q <sup>s</sup>
with the starting values for the voltage _u_ d _,_ 0 and _u_ q _,_ 0. By adding these two variables, the
machine is able to start in every dynamical operating point for the evaluation of the MPC
and the smoothing term can be evaluated accordingly.
As already mentioned in Section 3.4.1, the curse of dimensionality plays a pivotal role
1
0 _._ 8
0 _._ 6
0 _._ 4
0 _._ 2
_<u>ω</u>_ _<u>∈</u>_ <u>[0</u> _<u>, ω</u>_ N]
0 _._ 5 _ω_ N
0
_−_ 1 _−_ 0 _._ 8 _−_ 0 _._ 6 _−_ 0 _._ 4 _−_ 0 _._ 2 0
_<u>i</u>_ <u>d</u>
_i_ N
Figure 3.5: Simulation grid for the optimal setpoint currents in the machine for the MPC
with regularization on the state.
in the generation of the input data. For this MPC, the effect is even stronger, since the
input dimension increases by two. Furthermore the evaluation time of the MPC is longer
than for the other MPCs, which makes a sampling as in Section 3.4.1 not feasible.
For this purpose, the sampling is chosen differently and much coarser for this MPC. The
_<u>3</u>_ _<u>MPC</u>_ _<u>Approximation</u>_ _<u>for</u>_ _<u>PMSM</u>_ _<u>3.5</u>_ _<u>Data</u>_ _<u>driven</u>_ _<u>approach</u>_ _<u>23</u>_
Current boundary
Grid points
1
0 _._ 5
0
_−_ 1 _−_ 0 _._ 8 _−_ 0 _._ 6 _−_ 0 _._ 4 _−_ 0 _._ 2 0
_<u>i</u>_ <u>d</u>
_i_ N
(a) Grid for the actual currents.
Voltage boundary
Grid points
1
0 _._ 5
0
_−_ 0 _._ 5
_−_ 1
_−_ 1 _−_ 0 _._ 5 0 0 _._ 5 1
_<u>u</u>_ <u>d</u>
_u_ N
(b) Sampling grid for the voltages.
Figure 3.6: Simulation grids for the actual currents and the voltages from the last timestep.
actual currents in the machine and starting voltages are sampled according to Figure 3.6,
with _n_ i _,_ states = 90 points for the currents and _n_ u _,_ 0 = 81 points for the starting voltages.
Furthermore, only _n_ i _,_ SP = 45 instead of 150 points are used for each speed interval for the
current setpoint values. The integrator voltages are finally sampled in a grid with _n_ u _,_ i = 3
samples per dimension instead of 5 samples per dimension. For the speed grid the same
resolution as for the MPC without regularization on the input is used. The resolution of
these grids is kept this low to be able to perform the simulations on a normal hardware
on a short time frame. For the here defined parameter ranges
_n_ SM _,_ ext = _n_ i _,_ states _· n_ i _,_ SP _· n_ <sup>2</sup> u _,_ i <sup>_· nω_</sup> <sup>_· n_</sup> <sup>u</sup> <sup>_,_</sup> <sup>0</sup> <sup>= 90</sup> <sup>_·_</sup> <sup>45</sup> <sup>_·_</sup> <sup>32</sup> <sup>_·_</sup> <sup>18</sup> <sup>_·_</sup> <sup>81</sup> <sup>_≈_</sup> <sup>5</sup> <sup>_._</sup> <sup>3</sup> <sup>_·_</sup> <sup>107</sup> (3.10)
simulations have to be performed to evaluate every permutation of inputs. This shows the
curse of dimensionality, since the resolution of most of the input variables was decreased
drastically, while reducing the number of simulations only by a factor of 1.6. Since the
simulations take approximately six times as long ( _≈_ 30ms) as for the MPC without
regularization, the overall computation time for the generation of the simulation data
increases to 18 days on a single core or approximately 2.5 days on eight cores. This means,
that in total the simulations run 2.5 times as long as the before mentioned simulations for
the other MPCs. However, this coarse grid has also a benefit to it, since the approximation
accuracy on a smaller dataset can be evaluated and compared to the finer grids.
### 3.5 Data driven approach
After the simulations have been performed, the approximation of the MPC takes place.
For this purpose the _Python_ _Programming_ _Language_ was chosen, since it contains many
different powerful libraries in the field of machine learning.
_<u>3</u>_ _<u>MPC</u>_ _<u>Approximation</u>_ _<u>for</u>_ _<u>PMSM</u>_ _<u>3.5</u>_ _<u>Data</u>_ _<u>driven</u>_ _<u>approach</u>_ _<u>24</u>_
In order to check the correlations between the individual inputs and the outputs, the so
_u_ q
_u_ d
_ω_
_i_ <sup>s</sup> q
_i_ <sup>s</sup> d
_u_ q _,_ i
_i_ q
_u_ d _,_ i
_i_ d
_i_ d _u_ d _,_ i _i_ q _u_ q _,_ i _i_ <sup>s</sup> d
<sup>s</sup> q _ω_ _u_ d _u_ q
1
0 _._ 5
0
_−_ 0 _._ 5
_−_ 1
<sup>s</sup> d _i_ <sup>s</sup> q
Figure 3.7: Correlation matrix for the input and output variables for the MPC without
regularization.
called correlation matrix [25] is computed and shown in Figure 3.7. This matrix shows in
the diagonal the autocorrelation and in all the other elements the cross correlation between
the different inputs and outputs. This matrix gives a first indication about the capability
of learning the regression policy, since it shows the linear interconnections between the
different variables and especially if the output is correlated to the input. Figure 3.7 shows,
that the output variables _u_ d and _u_ q are correlated with all input variables (either by a
negative correlation or a positive correlation) except for the integrator voltages. This can
be explained by the fact, that the underlying differential equations show a direct connection
between the inputs and the outputs, but the integrator voltages are only there in order
to limit the maximum voltage and don’t correlate linearly with the output variables.
However through the capability of data driven approaches to find nonlinear correlations,
these variables have also an impact on the output and help to achieve stationary accuracy
in the case of parameter deviations.
For the MPC with regularization on the input and the state, the same correlations are
observed. The two extra inputs, namely the starting voltages, correlate only strongly with
the output. This behavior is expected, since the regularization on the input smoothens
the ouput trajectory and does not allow for steep changes. Therefore, these variables are
strongly positively correlated with the output voltages. The correlation matrix is shown
in Figure 3.8.
In order to perform the approximation of the input-output behavior of the neural net, a
fully connected feedforward neural net is chosen. The inputs for the data driven approach
are the variable inputs for the evaluation of the MPC _ζ_ mpc _,_ SM and _ζ_ <sup>ext</sup> mpc _,_ SM <sup>defined</sup> <sup>in</sup>
(3.6) and (3.9) respectively and the outputs are the two voltages u SM = [ _u_ d _, u_ q] <sup>T</sup> that are
_<u>3</u>_ _<u>MPC</u>_ _<u>Approximation</u>_ _<u>for</u>_ _<u>PMSM</u>_ _<u>3.5</u>_ _<u>Data</u>_ _<u>driven</u>_ _<u>approach</u>_ _<u>25</u>_
_u_ q
_u_ d
_ω_
_i_ <sup>s</sup> q
_i_ <sup>s</sup> d
_u_ q _,_ 0
_u_ d _,_ 0
_u_ q _,_ i
_i_ q
_u_ d _,_ i
_i_ d
_i_ d _u_ d _,_ i _i_ q _u_ q _,_ i _u_ d _,_ 0 _u_ q _,_ 0 _i_ <sup>s</sup> d _i_ <sup>s</sup> q _ω_ _u_ d _u_ q
1
0 _._ 5
0
_−_ 0 _._ 5
_−_ 1
_i_ d _u_ d _,_ i _i_ q _u_ q _,_ i _u_ d _,_ 0 _u_ q _,_ 0 _i_ <sup>s</sup> d
<sup>s</sup> d _i_ <sup>s</sup> q
Figure 3.8: Correlation matrix for the input and output variables for MPC with regular
ization on input and state.
applied to the inverter. The performed simulations are collected in the matrices
...
_ζ_ <sup>T</sup>
mpc _,_
...
u <sup>T</sup>
SM
_ζ_ <sup>T</sup>
u <sup>T</sup>
X SM =
mpc _,_ SM _,_ 1
_ζ_ <sup>T</sup> mpc _,_ SM _,_ 2
_ζ_ <sup>T</sup> mpc _,_ SM _,_ 3
_ζ_ <sup>T</sup> mpc _,_ SM _,_ 4
mpc _,_ SM _,_ 4
SM _,_ 1
u SM <sup>T</sup> _,_ 2
u SM <sup>T</sup> _,_ 3
u SM <sup>T</sup> _,_ 4
SM _,_ 4
, (3.11)
, Y SM =
mpc _,_ SM _,_ nSM
SM _,_ nSM
where X SM contains all the inputs and Y SM contains all the outputs. Here it is shown
only for the inputs and outputs of the MPC without regularization and the MPC with
regularization on the state. However, this transfers in the same way to the MPC with
regularization on the input and the state with the extra two inputs. To check the fitting
performance of the neural net, the inputs and the outputs are split up into a training set
consisting of X train and Y train, which contains 80% of the points, and a validation set
consisting of X test and Y test, which contains 20% of the points. Furthermore the two sets
are shuffled to minimize the correlation between two subsequent simulation sets.
The inputs show big differences in their respective magnitude. This can lead to numerical
problems for the fitting of the neural network and thus deteriorate the approximation.
Therefore the inputs were scaled by a minimum maximum scaler, given by
<u>X</u> <u>train</u> _<u>,m −</u>_ <u>min(</u> <u>X</u> <u>train</u> _<u>,m</u>_ <u>)</u>
X train _,m_ = max( X train _,m_ ) _−_ min( X train _,m_ ) <sup>,</sup> _m_ = 1 _,_ 2 _,_ 3 _, ...,_ 7, (3.12)
where each column is normalized into the range between zero and one. It is important to
mention, that the scaling is only performed on the training set, since for the training no
_<u>3</u>_ _<u>MPC</u>_ _<u>Approximation</u>_ _<u>for</u>_ _<u>PMSM</u>_ _<u>3.5</u>_ _<u>Data</u>_ _<u>driven</u>_ _<u>approach</u>_ _<u>26</u>_
information about the validation should be used in order to prevent overfitting.
input layer hidden layers output layer
_<u>i</u>_ <u>d</u>
_<u>i</u>_ <u>q</u>
_i_ <sup>s</sup> <u>d</u>
_i_ <sup>s</sup> <u>q</u>
_<u>ω</u>_
_<u>u</u>_ <u>d</u> _<u>,</u>_ <u>i</u>
_<u>u</u>_ <u>q</u> _<u>,</u>_ <u>i</u>
_u_ d
_u_ q
Figure 3.9: Structure of the feedforward neural net for the MPC without regularization
and the MPC with regularization on the state [26].
The net structure for the fitting is shown in Figure 3.9 and it consists of a seven (or
nine for the MPC with regularization on state and input) dimensional input layer, three
hidden layers with 100, 70 and 50 nodes respectively and a two dimensional output
layer. As activation function for the hidden layers ReLU ( Re ctified L inear U nit) is
chosen, because it introduces nonlinearity to the neural network and enables therefore the
network to learn more complex relationship in the dataset [27]. In contrast to the classical
activation functions, like sigmoid or tanh, it has no problem with vanishing gradients
since the gradient of the activation function is constant for positive values of the input
[28]. Furthermore it is often faster to compute, since the activation function
_h_ ( _x_ ) = max(0 _, x_ ) (3.13)
is easier to compute than the sigmoid function or the tanh function.
One drawback of the ReLU activation function is, that it can only predict positive values,
since the activation function clips all negative values to 0. If the neural network should be
able to predict positive and negative values, the output layer has therefore to be able to
predict values in the positive and negative range. Therefore, the linear activation function
was used for the output layer. It introduces no extra nonlinearity, since this is already
covered by the ReLU, but it extends the prediction range of the neural network to the
full operating range of the electrical machine.
_<u>3</u>_ _<u>MPC</u>_ _<u>Approximation</u>_ _<u>for</u>_ _<u>PMSM</u>_ _<u>3.6</u>_ _<u>Simulation</u>_ _<u>Results</u>_ _<u>27</u>_
The size of the input and the output is predefined by the simulation results of the MPC
itself. The size of the hidden layers on the other hand can be designed according to
the problem. The dimensions that are specified here show a good tradeoff between
approximation accuracy and computational effort. By making the neural network deeper
(adding extra hidden layers), the approximation quality improves marginally, however
the computation time increases since the last layer can only be evaluated after the other
layers. By increasing the width of the neural network and thus increasing the number
of nodes, no real benefit in the approximation accuracy can be identified. This means,
that the here shown neural network is wide enough in order to approximate the desired
behavior of the MPC. However, an ablation study could be performed in order to further
reduce the execution time of the neural net under the condition to keep the prediction
performance as it is [29]. The procedure of the ablation study is shown for the case of the
induction machine in Section 4.6.
For the optimizer of the neural network Adamax [30] is chosen, because it shows a faster
convergence for this problem than SGD ( S tochastic G radient D escent) [31]. For the
learning rate of the optimizer a learning rate scheduler was used, which starts at a value
of _λ_ = 0 _._ 01 and reduces its learning rate based on the evolution of the training loss. If the
training loss remains too long on a plateau and does not decrease further, the learning
rate might be too big and is thus divided by a preset factor of 10. This enables a faster
learning with bigger steps in the beginning and more precise results towards the end, when
the learning rate decreases. Furthermore _Early_ _Stopping_ was used in order to mitigate
the problem of overfitting on the training dataset. For the loss function itself the MSE
( M ean S quared E rror) loss was used, since it performs well if the dataset is in the same
order of magnitude, which is the case. Furthermore it penalizes outliers in the prediction
heavily, which is important for the approximation of a control scheme that should work in
all operating regions.
To check the approximation accuracy of the approach, Figure 3.10 shows a Q-Q plot (also
called 45 <sup>_◦_</sup> plot) of the prediction of the MPC without regularization [32]. For this plot,
the actual output values of the MPC u SM <sup>mpc</sup> <sup>are</sup> <sup>plotted</sup> <sup>dependent</sup> <sup>of</sup> <sup>the</sup> <sup>prediction</sup> <sup>values</sup>
the actual output values of the MPC u SM <sup>mpc</sup> <sup>are</sup> <sup>plotted</sup> <sup>dependent</sup> <sup>of</sup> <sup>the</sup> <sup>prediction</sup> <sup>values</sup>
u SM <sup>app.</sup> <sup>The</sup> <sup>prediction</sup> <sup>values</sup> <sup>are</sup> <sup>very</sup> <sup>close</sup> <sup>to</sup> <sup>the</sup> <sup>45</sup> <sup>_◦_</sup> <sup>line,</sup> <sup>which</sup> <sup>would</sup> <sup>correspond</sup> <sup>to</sup> <sup>a</sup>
u SM <sup>app.</sup> <sup>The</sup> <sup>prediction</sup> <sup>values</sup> <sup>are</sup> <sup>very</sup> <sup>close</sup> <sup>to</sup> <sup>the</sup> <sup>45</sup> <sup>_◦_</sup> <sup>line,</sup> <sup>which</sup> <sup>would</sup> <sup>correspond</sup> <sup>to</sup> <sup>a</sup>
perfect prediction of the true output values. Since for the other two approaches the plot
looks almost identical, they are not shown in this work. The maximum voltage error is
equal to 3% of the maximum voltage of the system, which indicates a good prediction
accuracy. The root mean squared error scaled by the maximum voltage for this prediction
is equal to 0.0041, which corresponds to 0.4% of the maximum voltage in the system.
Furthermore, approximately 97% of all points lie in a region of three times the standard
deviation between prediction and actual values around the 45 <sup>_◦_</sup> line. Therefore, this plot
shows the high approximation accuracy and that the approximation performs well in the
whole operating range of the prediction without outliers for higher or lower voltages.
### 3.6 Simulation Results
The developed approximation approach is checked on its feasibility for stationary and
dynamic simulations. These simulations are closed-loop simulations with an inverter
_<u>3</u>_ _<u>MPC</u>_ _<u>Approximation</u>_ _<u>for</u>_ _<u>PMSM</u>_ _<u>3.6</u>_ _<u>Simulation</u>_ _<u>Results</u>_ _<u>28</u>_
_<u>||</u>_ <u>u</u> <sup>mpc</sup> <u>SM</u>
<sup>mpc</sup> <u>SM</u> <sup>_<u>−</u>_</sup> <sup><u>u</u></sup> <u>SM</u> <sup>app</sup>
<sup>_<u>−</u>_</sup> <sup><u>u</u></sup> <u>SM</u> <sup>app</sup> <sup>_<u>||</u>_</sup>
_u_ N
0 _._ <u>000</u> <u>0</u> _<u>.</u>_ <u>005</u> <u>0</u> _<u>.</u>_ <u>010</u> <u>0</u> _<u>.</u>_ <u>015</u> <u>0</u> _<u>.</u>_ <u>020</u> <u>0</u> _<u>.</u>_ <u>025</u> <u>0</u> _<u>.</u>_ <u>030</u>
1
0 _._ 5
0
_−_ 0 _._ 5
_−_ 1
_−_ 1 _−_ 0 _._ 5 0 0 _._ 5 1
_<u>u</u>_ <sup>mpc</sup> <u>d</u>
_u_ N
1
0 _._ 5
0
_−_ 0 _._ 5
_−_ 1
_−_ 1 _−_ 0 _._ 5 0 0 _._ 5 1
_<u>u</u>_ <sup>mpc</sup> <u>q</u>
_u_ N
Figure 3.10: Q-Q plot for the approximation of the MPC without regularization.
model and an angle independent machine model. The loop is herein closed either by the
MPC or the approximation of the MPC. To identify the influence of parameter deviations,
the simulations were carried out for the nominal parameter set and a parameter set, where
the direct flux of the machine was increased by 10% modeling a parameter mismatch
between the simulated LUTs in the FEM and the true machine behavior or a temperature
error in the thermal model.
3.6.1 Stationary simulations
Figure 3.11 shows the results of the approximation on the torque accuracy for a steadystate torque speed map. In these simulations, different combinations of desired torques
and speeds over the whole operating region are set and the stationary results of the
comparison on these points are compared to the MPC results and the setpoint values.
The simulations are performed without the influence of measurement noise since it is
investigated in the following section. The figure shows, that the relative error is smaller
than 0.0001% normalized by the nominal torque _τ_ N over the whole operating region for
the nominal system. This means, that steady-state accuracy can be achieved with the
here proposed approximation of the MPC and that the approximation is able to reach
stationary endpoints. The reason for this is, that the integrator integrates the error until
stationary accuracy is achieved. It can be observed, that the steady-state accuracy is
slightly worse for the approximation. However, the error still remains very small and this
behavior does not influence the overall steady-state performance of the control algorithm.
These plots look very similar for all three approximation approaches. Therefore only this
_<u>3</u>_ _<u>MPC</u>_ _<u>Approximation</u>_ _<u>for</u>_ _<u>PMSM</u>_ _<u>3.6</u>_ _<u>Simulation</u>_ _<u>Results</u>_ _<u>29</u>_
_<u>||τ</u>_ _<u>−τ</u>_ <sup>d</sup> _<u>||</u>_
in %
_τ_ <sup><u>d</u></sup>
0 _._ 00000 <u>0</u> _<u>.</u>_ <u>00002</u> <u>0</u> _<u>.</u>_ <u>00004</u> <u>0</u> _<u>.</u>_ <u>00006</u> <u>0</u> _<u>.</u>_ <u>00008</u> <u>0</u> _<u>.</u>_ <u>00010</u>
1
0 _._ 5
0
0 0 _._ 2 0 _._ 4 0 _._ 6 0 _._ 8 1
_<u>ω</u>_
_ω_ N
1
0 _._ 5
0
0 0 _._ 2 0 _._ 4 0 _._ 6 0 _._ 8 1
_<u>ω</u>_
_ω_ N
(a) Error between MPC and setpoint. (b) Error between approximation and setpoint.
1
0 _._ 5
0
0 0 _._ 2 0 _._ 4 0 _._ 6 0 _._ 8 1
_<u>ω</u>_
_ω_ N
(c) Error between approximation and MPC.
Figure 3.11: Absolute relative error for stationary simulations without parameter devia
tions for the MPC without regularization.
_<u>3</u>_ _<u>MPC</u>_ _<u>Approximation</u>_ _<u>for</u>_ _<u>PMSM</u>_ _<u>3.6</u>_ _<u>Simulation</u>_ _<u>Results</u>_ _<u>30</u>_
plot is shown.
3.6.2 Transient simulations
MPC without regularization terms
A dynamic setpoint profile including steep (almost steplike) ramps, sinusoidal signals at
different torque levels and a slower ramp is simulated. Figure 3.12 to Figure 3.17 show the
results of the dynamic simulations for this dataset. For each MPC there exist two plotsone plot shows the overall transient for the given input signal and the other plot shows
a close-up of the first sinusoidal signal. White noise is applied to the currents to show
the noise surpressing capabilities of the developed approaches. The setpoint torque, the
torque controlled by the MPC and the torque controlled by the MPC approximation are
shown in the first subfigure. The absolute error, scaled by the maximum achievable torque
are shown in the second subfigure. The approximation error between the MPC and its
approximation is shown in the third subfigure. The last two subfigures show the voltages
and the currents for the MPC and the approximation with their respective boundaries.
All plots show, that the approximation accuracy of the approach is rather high, with
only some marginal exceptions. The robustness against noise of the two MPCs with
regularization is clearly visible in Figure 3.14 and Figure 3.16, especially at the steady
state points. However, the control error of the MPC is significantly higher than the
approximation error in all the scenarios. For the MPCs with the regularization terms, the
approximation behavior itself could be improved. This can be explained by the fact, that
the MPCs with regularization terms might be badly tuned. It seems like the weights on
the regularization terms are chosen too high. This is especially well shown in the close-up
sinusoidal signal at high speeds without parameter deviations when comparing the MPC
results without regularization and the MPC results with regularization term on the state in
the first subplot in Figure 3.13c and Figure 3.15c. The voltages for the regularized MPCs,
shown for example in the last subplot in Figure 3.15a and Figure 3.17a, are much smoother
than the voltage for the MPC without regularization shown in Figure 3.13a. However,
this leads to a slower dynamical behavior and for this fast change rate of the sinus, this
causes inaccuracies in the control. Nevertheless, the results of the approximation are in
good alignment with results of the MPC itself. The voltage and the current boundary are
respected at all times and the approximation error is pretty low compared to the error
of the MPC itself. For these dynamic changes, the parameter deviation on the direct
flux Ψ <sup>˜</sup> d = 1 _._ 1Ψd seems to have an influence on the approximation accuracy, especially
for the case of the MPC with regularization on the input shown in Figure 3.17b and
Figure 3.17d. The results for the parameter deviation show here a much bigger deviation
than for the simulations for the nominal case. The reason for this is, that for the MPC
with regularization on the state and the input, the grid for the integrator voltages is
chosen pretty coarse in order to save computation time. By refining this grid, a higher
approximation accuracy is achievable also for the case of parameter deviations. However,
these results show overall, that even for high deviations from the nominal value for the
direct flux Ψd, the approach works still well in most of the cases. Furthermore, it is pretty
impressive, that the MPC with regularization on the input and the state approximates
_<u>3</u>_ _<u>MPC</u>_ _<u>Approximation</u>_ _<u>for</u>_ _<u>PMSM</u>_ _<u>3.6</u>_ _<u>Simulation</u>_ _<u>Results</u>_ _<u>31</u>_
the MPC in such a fine manner, especially for the nominal case, given the limited size of
the dataset.
To quantify the prediction performance of the MPC, the root mean squared error, the mean
absolute error and the maximum absolute error between the MPC without regularization
terms, its approximation and the setpoint values for the simulations are exemplary
summarized in Table 3.2 for the simulation without parameter deviations at 0 _._ 15 _ω_ N. This
table shows, that the approximation is following the MPC closely also in dynamic setpoint
changes, and that the approximation error is by an order of magnitude smaller than the
control error of the MPC itself.
error RMSE MAE Max
_<u>τ</u>_ <sup>mpc</sup> _<u>−</u>_ _<u>τ</u>_ <sup>d</sup>
_τ_ N
_<u>τ</u>_ <sup>app</sup> _<u>−</u>_ _<u>τ</u>_ <sup>d</sup>
_τ_ N
_<u>τ</u>_ <sup>mpc</sup> _<u>−</u>_ _<u>τ</u>_ <sup>app</sup>
_τ_ N
0.0177 0.0104 0.0794
0.0179 0.0106 0.0776
0.0025 0.0019 0.0071
Table 3.2: Error measures for the approximation of the MPC without regularization terms.
In this chapter, the basic idea of the approximation was demonstrated for the case of
current control using MPC for a PMSM. The next chapter discusses a practical example of
a complex nonlinear MPC for the flux control of an IM and the feasibility of the developed
approach is examined using this example.
_<u>3</u>_ _<u>MPC</u>_ _<u>Approximation</u>_ _<u>for</u>_ _<u>PMSM</u>_ _<u>3.6</u>_ _<u>Simulation</u>_ _<u>Results</u>_ _<u>32</u>_
1
0 _._ 5
0
0 _._ 050
0 _._ 000
_−_ 0 _._ 050
0 _._ 008
0 _._ 006
0 _._ 004
0 _._ 002
0 _._ 000
_−_ 0 _._ 002
1
0 _._ 5
0
1
0 _._ 5
_||_ u SM <sup>mpc</sup> <sup>_||_</sup>
_~~||~~_ ~~u~~ SM <sup>~~app~~</sup> <sup>_~~||~~_</sup>
SM <sup>~~app~~</sup> <sup>_~~||~~_</sup>
_τ_ <sup>d</sup>
_τ_ <sup>mpc</sup>
_<u>τ</u>_ <sup>~~app~~</sup>
_~~τ~~_ <sup>~~mpc~~</sup> _~~−~~_ _~~τ~~_ <sup>~~d~~</sup>
_<u>τ</u>_ <sup>app</sup> _<u>−</u>_ _<u>τ</u>_ <sup>d</sup>
_<u>τ</u>_ <sup>app</sup> _<u>−</u>_ _<u>τ</u>_ <sup>mpc</sup>
_<u>i</u>_ HW
_||_ i <sup>mpc</sup> <u>SM</u>
_||_ i <sup>mpc</sup> <u>SM</u> <sup>_||_</sup>
_<u>||</u>_ <u>i</u> <sup>~~app~~</sup> SM <sup>_<u>||</u>_</sup>
<sup>~~app~~</sup> SM <sup>_<u>||</u>_</sup>
_~~u~~_ HW
_||_ u SM <sup>mpc</sup>
0
0 0 _._ 2 0 _._ 4 0 _._ 6 0 _._ 8 1 1 _._ 2 1 _._ 4 1 _._ 6 1 _._ 8 2
time in s
Figure 3.12: Transient simulations at _ω_ = 0 _._ 15 _ω_ N without parameter deviations for MPC
without regularization.
_<u>3</u>_ _<u>MPC</u>_ _<u>Approximation</u>_ _<u>for</u>_ _<u>PMSM</u>_ _<u>3.6</u>_ _<u>Simulation</u>_ _<u>Results</u>_ _<u>33</u>_
1
0 _._ 8
0 _._ 6
0 _._ 4
0 _._ 2
0
0 _._ 05
0 _._ 00
_−_ 0 _._ 05
0 _._ 004
0 _._ 002
0 _._ 000
_−_ 0 _._ 002
1
0 _._ 5
0
1
0 _._ 5
_<u>||</u>_ <u>u</u> ~~SM~~ <sup>mpc</sup> <sup>_<u>||</u>_</sup>
_||_ u SM <sup>app</sup> <sup>_||_</sup>
SM <sup>app</sup> <sup>_||_</sup>
_~~τ~~_ <sup><u>d</u></sup>
_~~<u>τ</u>~~_ <sup>~~mpc~~</sup>
_~~τ~~_ <sup><u>app</u></sup>
_~~τ~~_ <sup><u>mpc</u></sup> _~~−~~_ _~~τ~~_ <sup><u>d</u></sup>
_<u>τ</u>_ <sup>app</sup> _<u>−</u>_ _<u>τ</u>_ <sup>d</sup>
_~~τ~~_ <sup><u>d</u></sup>
_~~<u>τ</u>~~_ <sup>~~mpc~~</sup>
_~~τ~~_ <sup><u>app</u></sup>
_~~τ~~_ <sup><u>mpc</u></sup> _~~−~~_ _~~τ~~_ <sup><u>d</u></sup>
_<u>τ</u>_ <sup>app</sup> _<u>−</u>_ _<u>τ</u>_ <sup>d</sup>
_~~τ~~_ <sup>~~app~~</sup> _~~−~~_ _~~τ~~_ <sup>~~mpc~~</sup> _~~τ~~_ <sup>~~app~~</sup> _~~−~~_ _~~τ~~_ <sup>~~mpc~~</sup>
_i_ HW
_~~||~~_ ~~i~~ <sup>mpc</sup> ~~SM~~
_~~||~~_ ~~i~~ <sup>mpc</sup> ~~SM~~ <sup>_~~||~~_</sup>
_||_ i <sup>app</sup> SM <sup>_||_</sup>
_i_ HW
_~~||~~_ ~~i~~ <sup>mpc</sup> ~~SM~~
<sup>app</sup> SM <sup>_||_</sup>
_~~||~~_ ~~i~~ <sup>mpc</sup> ~~SM~~ <sup>_~~||~~_</sup>
_||_ i <sup>app</sup> SM <sup>_||_</sup>
<sup>app</sup> SM <sup>_||_</sup>
_~~u~~_ HW
_<u>||</u>_ <u>u</u> ~~SM~~ <sup>mpc</sup>
_~~u~~_ HW
_<u>||</u>_ <u>u</u> ~~SM~~ <sup>mpc</sup>
_<u>||</u>_ <u>u</u> ~~SM~~ <sup>mpc</sup> <sup>_<u>||</u>_</sup>
_||_ u SM <sup>app</sup> <sup>_||_</sup>
SM <sup>app</sup> <sup>_||_</sup>
0
0.395 0.4 0.405 0.410
0.395 0.4 0.405 0.410
time in s
time in s
(a) _ω_ = 0 _._ 15 _ω_ N, no parameter deviations. (b) _ω_ = 0 _._ 15 _ω_ N, Ψ <sup>˜</sup> d = 1 _._ 1Ψd.
0 _._ 3
0 _._ 2
0 _._ 1
0
0 _._ 040
0 _._ 020
0 _._ 000
_−_ 0 _._ 020
_−_ 0 _._ 040
0 _._ 005
0 _._ 000
_−_ 0 _._ 005
1
0 _._ 5
0
_<u>τ</u>_ <sup>d</sup>
_<u>τ</u>_ <sup>mpc</sup>
_<u>τ</u>_ <sup>app</sup>
_<u>τ</u>_ <sup>~~mpc~~</sup> _<u>−</u>_ _<u>τ</u>_ <sup>~~d~~</sup>
_~~τ~~_ <sup>~~app~~</sup> _~~−~~_ _~~τ~~_ <sup>~~d~~</sup>
_<u>τ</u>_ <sup>d</sup>
_<u>τ</u>_ <sup>mpc</sup>
_<u>τ</u>_ <sup>app</sup>
_<u>τ</u>_ <sup>~~mpc~~</sup> _<u>−</u>_ _<u>τ</u>_ <sup>~~d~~</sup>
_~~τ~~_ <sup>~~app~~</sup> _~~−~~_ _~~τ~~_ <sup>~~d~~</sup>
_~~τ~~_ <sup>app</sup> _~~−~~_ _~~τ~~_ <sup>mpc</sup> _~~τ~~_ <sup>app</sup> _~~−~~_ _~~τ~~_ <sup>mpc</sup>
_i_ HW
_~~||~~_ ~~i~~ <sup>mpc</sup> ~~SM~~
_~~||~~_ ~~i~~ <sup>mpc</sup> ~~SM~~ <sup>_~~||~~_</sup>
_||_ i <sup>app</sup> SM <sup>_||_</sup>
_i_ HW
_~~||~~_ ~~i~~ <sup>mpc</sup> ~~SM~~
<sup>app</sup> SM <sup>_||_</sup>
_~~||~~_ ~~i~~ <sup>mpc</sup> ~~SM~~ <sup>_~~||~~_</sup>
_||_ i <sup>app</sup> SM <sup>_||_</sup>
<sup>app</sup> SM <sup>_||_</sup>
_~~u~~_ ~~HW~~
_~~||~~_ ~~u~~ <u>SM</u> <sup><u>mpc</u></sup>
1 _~~u~~_
0 _._ 9 _~~||~~_ ~~u~~
0 _._ 8 _~~||~~_ ~~u~~
0 _._ 7
0.395 0.4 0.405 0.410
0.395 0.4 0.405 0.410
time in s
_~~||~~_ ~~u~~ <u>SM</u> <sup><u>mpc</u></sup> <sup>_~~||~~_</sup>
_~~||~~_ ~~u~~ <u>SM</u> <sup><u>app</u></sup> <sup>_~~||~~_</sup>
_~~u~~_ ~~HW~~
_~~||~~_ ~~u~~ <u>SM</u> <sup><u>mpc</u></sup>
<u>SM</u> <sup><u>app</u></sup> <sup>_~~||~~_</sup>
_~~||~~_ ~~u~~ <u>SM</u> <sup><u>mpc</u></sup> <sup>_~~||~~_</sup>
_~~||~~_ ~~u~~ <u>SM</u> <sup><u>app</u></sup> <sup>_~~||~~_</sup>
<u>SM</u> <sup><u>app</u></sup> <sup>_~~||~~_</sup>
time in s
(c) _ω_ = 0 _._ 85 _ω_ N, no parameter deviations. (d) _ω_ = 0 _._ 85 _ω_ N, Ψ <sup>˜</sup> d = 1 _._ 1Ψd.
Figure 3.13: Zoomed detail of sine signal for different operating ranges of the MPC without
regularization.
_<u>3</u>_ _<u>MPC</u>_ _<u>Approximation</u>_ _<u>for</u>_ _<u>PMSM</u>_ _<u>3.6</u>_ _<u>Simulation</u>_ _<u>Results</u>_ _<u>34</u>_
1
0 _._ 5
0
0 _._ 100
0 _._ 000
_−_ 0 _._ 100
0 _._ 005
0 _._ 000
1
0 _._ 5
0
1
0 _._ 5
_||_ u SM <sup>mpc</sup> <sup>_||_</sup>
_~~||~~_ ~~u~~ SM <sup>~~app~~</sup> <sup>_~~||~~_</sup>
SM <sup>~~app~~</sup> <sup>_~~||~~_</sup>
_τ_ <sup>d</sup>
_τ_ <sup>mpc</sup>
_<u>τ</u>_ <sup>~~app~~</sup>
_<u>τ</u>_ <sup>~~mpc~~</sup> _<u>−</u>_ _<u>τ</u>_ <sup>~~d~~</sup>
_<u>τ</u>_ <sup>app</sup> _<u>−</u>_ _<u>τ</u>_ <sup>d</sup>
_τ_ <sup>app</sup> _−_ _τ_ <sup>mpc</sup>
_<u>i</u>_ HW
_||_ i <sup>mpc</sup> <u>SM</u>
_||_ i <sup>mpc</sup> <u>SM</u> <sup>_||_</sup>
_<u>||</u>_ <u>i</u> <sup>~~app~~</sup> SM <sup>_<u>||</u>_</sup>
<sup>~~app~~</sup> SM <sup>_<u>||</u>_</sup>
_~~u~~_ HW
_||_ u SM <sup>mpc</sup>
0
0 0 _._ 2 0 _._ 4 0 _._ 6 0 _._ 8 1 1 _._ 2 1 _._ 4 1 _._ 6 1 _._ 8 2
time in s
Figure 3.14: Transient simulations at _ω_ = 0 _._ 15 _ω_ N without parameter deviations for MPC
with regularization on state.
_<u>3</u>_ _<u>MPC</u>_ _<u>Approximation</u>_ _<u>for</u>_ _<u>PMSM</u>_ _<u>3.6</u>_ _<u>Simulation</u>_ _<u>Results</u>_ _<u>35</u>_
1
0 _._ 8
0 _._ 6
0 _._ 4
0 _._ 2
0
0 _._ 10
0 _._ 05
0 _._ 00
_~~τ~~_ <sup><u>d</u></sup>
_~~<u>τ</u>~~_ <sup>~~mpc~~</sup>
_~~τ~~_ <sup><u>app</u></sup>
_<u>τ</u>_ <sup>~~mpc~~</sup> _<u>−</u>_ _<u>τ</u>_ <sup>~~d~~</sup>
_~~τ~~_ <sup><u>app</u></sup> _~~−~~_ _~~τ~~_ <sup><u>d</u></sup>
_~~τ~~_ <sup><u>d</u></sup>
_~~<u>τ</u>~~_ <sup>~~mpc~~</sup>
_~~τ~~_ <sup><u>app</u></sup>
_<u>τ</u>_ <sup>~~mpc~~</sup> _<u>−</u>_ _<u>τ</u>_ <sup>~~d~~</sup>
_~~τ~~_ <sup><u>app</u></sup> _~~−~~_ _~~τ~~_ <sup><u>d</u></sup>
_−_ 0 _._ 05
0 _._ 004
0 _._ 002
0 _._ 000
_−_ 0 _._ 002
1
0 _._ 5
0
1
0 _._ 5
_<u>||</u>_ <u>u</u> ~~SM~~ <sup>mpc</sup> <sup>_<u>||</u>_</sup>
_||_ u SM <sup>app</sup> <sup>_||_</sup>
SM <sup>app</sup> <sup>_||_</sup>
_~~τ~~_ <sup>~~app~~</sup> _~~−~~_ _~~τ~~_ <sup>~~mpc~~</sup> _~~τ~~_ <sup>~~app~~</sup> _~~−~~_ _~~τ~~_ <sup>~~mpc~~</sup>
_i_ HW
_~~||~~_ ~~i~~ <sup>mpc</sup> ~~SM~~
_~~||~~_ ~~i~~ <sup>mpc</sup> ~~SM~~ <sup>_~~||~~_</sup>
_||_ i <sup>app</sup> SM <sup>_||_</sup>
_i_ HW
_~~||~~_ ~~i~~ <sup>mpc</sup> ~~SM~~
<sup>app</sup> SM <sup>_||_</sup>
_~~||~~_ ~~i~~ <sup>mpc</sup> ~~SM~~ <sup>_~~||~~_</sup>
_||_ i <sup>app</sup> SM <sup>_||_</sup>
<sup>app</sup> SM <sup>_||_</sup>
_~~u~~_ HW
_<u>||</u>_ <u>u</u> ~~SM~~ <sup>mpc</sup>
_~~u~~_ HW
_<u>||</u>_ <u>u</u> ~~SM~~ <sup>mpc</sup>
_<u>||</u>_ <u>u</u> ~~SM~~ <sup>mpc</sup> <sup>_<u>||</u>_</sup>
_||_ u SM <sup>app</sup> <sup>_||_</sup>
SM <sup>app</sup> <sup>_||_</sup>
0
0.395 0.4 0.405 0.410
0.395 0.4 0.405 0.410
time in s
time in s
(a) _ω_ = 0 _._ 15 _ω_ N, no parameter deviations. (b) _ω_ = 0 _._ 15 _ω_ N, Ψ <sup>˜</sup> d = 1 _._ 1Ψd.
0 _._ 3
0 _._ 2
0 _._ 1
0
0 _._ 050
0 _._ 000
_−_ 0 _._ 050
0 _._ 005
0 _._ 000
_−_ 0 _._ 005
1
0 _._ 5
0
_<u>τ</u>_ <sup>d</sup>
_<u>τ</u>_ <sup>mpc</sup>
_<u>τ</u>_ <sup>app</sup>
_τ_ <sup>mpc</sup> _−_ _τ_ <sup>d</sup>
_~~τ~~_ <sup>~~app~~</sup> _~~−~~_ _~~τ~~_ <sup>~~d~~</sup>
_<u>τ</u>_ <sup>d</sup>
_<u>τ</u>_ <sup>mpc</sup>
_<u>τ</u>_ <sup>app</sup>
_τ_ <sup>mpc</sup> _−_ _τ_ <sup>d</sup>
_~~τ~~_ <sup>~~app~~</sup> _~~−~~_ _~~τ~~_ <sup>~~d~~</sup>
_~~τ~~_ <sup>~~app~~</sup> _~~−~~_ _~~τ~~_ <sup>~~mpc~~</sup> _~~τ~~_ <sup>~~app~~</sup> _~~−~~_ _~~τ~~_ <sup>~~mpc~~</sup>
_i_ HW
_~~||~~_ ~~i~~ <sup>mpc</sup> ~~SM~~
_~~||~~_ ~~i~~ <sup>mpc</sup> ~~SM~~ <sup>_~~||~~_</sup>
_||_ i <sup>app</sup> SM <sup>_||_</sup>
_i_ HW
_~~||~~_ ~~i~~ <sup>mpc</sup> ~~SM~~
<sup>app</sup> SM <sup>_||_</sup>
_~~||~~_ ~~i~~ <sup>mpc</sup> ~~SM~~ <sup>_~~||~~_</sup>
_||_ i <sup>app</sup> SM <sup>_||_</sup>
<sup>app</sup> SM <sup>_||_</sup>
_~~u~~_ ~~HW~~
_~~||~~_ ~~u~~ <u>SM</u> <sup><u>mpc</u></sup>
1 _~~u~~_
0 _._ 9 _~~||~~_ ~~u~~
0 _._ 8 _~~||~~_ ~~u~~
0 _._ 7
0.395 0.4 0.405 0.410
0.395 0.4 0.405 0.410
time in s
_~~||~~_ ~~u~~ <u>SM</u> <sup><u>mpc</u></sup> <sup>_~~||~~_</sup>
_~~||~~_ ~~u~~ <u>SM</u> <sup><u>app</u></sup> <sup>_~~||~~_</sup>
_~~u~~_ ~~HW~~
_~~||~~_ ~~u~~ <u>SM</u> <sup><u>mpc</u></sup>
<u>SM</u> <sup><u>app</u></sup> <sup>_~~||~~_</sup>
_~~||~~_ ~~u~~ <u>SM</u> <sup><u>mpc</u></sup> <sup>_~~||~~_</sup>
_~~||~~_ ~~u~~ <u>SM</u> <sup><u>app</u></sup> <sup>_~~||~~_</sup>
<u>SM</u> <sup><u>app</u></sup> <sup>_~~||~~_</sup>
time in s
(c) _ω_ = 0 _._ 85 _ω_ N, no parameter deviations. (d) _ω_ = 0 _._ 85 _ω_ N, Ψ <sup>˜</sup> d = 1 _._ 1Ψd.
Figure 3.15: Zoomed detail of sine signal for different operating ranges of the MPC with
regularization on state.
_<u>3</u>_ _<u>MPC</u>_ _<u>Approximation</u>_ _<u>for</u>_ _<u>PMSM</u>_ _<u>3.6</u>_ _<u>Simulation</u>_ _<u>Results</u>_ _<u>36</u>_
1
0 _._ 5
0
0 _._ 100
0 _._ 000
_−_ 0 _._ 100
0 _._ 000
_−_ 0 _._ 005
_−_ 0 _._ 010
_−_ 0 _._ 015
1
0 _._ 5
0
1
0 _._ 5
_||_ u SM <sup>mpc</sup> <sup>_||_</sup>
_~~||~~_ ~~u~~ SM <sup>~~app~~</sup> <sup>_~~||~~_</sup>
SM <sup>~~app~~</sup> <sup>_~~||~~_</sup>
_τ_ <sup>d</sup>
_τ_ <sup>mpc</sup>
_<u>τ</u>_ <sup>~~app~~</sup>
_<u>τ</u>_ <sup>~~mpc~~</sup> _<u>−</u>_ _<u>τ</u>_ <sup>~~d~~</sup>
_<u>τ</u>_ <sup>app</sup> _<u>−</u>_ _<u>τ</u>_ <sup>d</sup>
_<u>τ</u>_ <sup>app</sup> _<u>−</u>_ _<u>τ</u>_ <sup>mpc</sup>
_<u>i</u>_ HW
_||_ i <sup>mpc</sup> <u>SM</u>
_||_ i <sup>mpc</sup> <u>SM</u> <sup>_||_</sup>
_<u>||</u>_ <u>i</u> <sup>~~app~~</sup> SM <sup>_<u>||</u>_</sup>
<sup>~~app~~</sup> SM <sup>_<u>||</u>_</sup>
_~~u~~_ HW
_||_ u SM <sup>mpc</sup>
0
0 0 _._ 2 0 _._ 4 0 _._ 6 0 _._ 8 1 1 _._ 2 1 _._ 4 1 _._ 6 1 _._ 8 2
time in s
Figure 3.16: Transient simulations at _ω_ = 0 _._ 15 _ω_ N without parameter deviations for MPC
with regularization on state and input
_<u>3</u>_ _<u>MPC</u>_ _<u>Approximation</u>_ _<u>for</u>_ _<u>PMSM</u>_ _<u>3.6</u>_ _<u>Simulation</u>_ _<u>Results</u>_ _<u>37</u>_
1
0 _._ 8
0 _._ 6
0 _._ 4
0 _._ 2
0
_~~τ~~_ <sup><u>d</u></sup>
_~~<u>τ</u>~~_ <sup>~~mpc~~</sup>
_~~τ~~_ <sup><u>app</u></sup>
_<u>τ</u>_ <sup><u>mpc</u></sup> _<u>−</u>_ _<u>τ</u>_ <sup><u>d</u></sup>
_~~τ~~_ <sup><u>app</u></sup> _~~−~~_ _~~τ~~_ <sup><u>d</u></sup>
_~~τ~~_ <sup><u>d</u></sup>
_~~<u>τ</u>~~_ <sup>~~mpc~~</sup>
_~~τ~~_ <sup><u>app</u></sup>
_<u>τ</u>_ <sup><u>mpc</u></sup> _<u>−</u>_ _<u>τ</u>_ <sup><u>d</u></sup>
_~~τ~~_ <sup><u>app</u></sup> _~~−~~_ _~~τ~~_ <sup><u>d</u></sup>
0 _._ 10
0 _._ 05
0 _._ 00
_−_ 0 _._ 05
_−_ 0 _._ 10
_<u>τ</u>_ <sup>~~app~~</sup> _<u>−</u>_ _<u>τ</u>_ <sup>~~mpc~~</sup> _<u>τ</u>_ <sup>~~app~~</sup> _<u>−</u>_ _<u>τ</u>_ <sup>~~mpc~~</sup>
0 _._ 010
0 _._ 000
_−_ 0 _._ 010
_−_ 0 _._ 020
1
0 _._ 5
0
1
0 _._ 5
_<u>||</u>_ <u>u</u> ~~SM~~ <sup>mpc</sup> <sup>_<u>||</u>_</sup>
_||_ u SM <sup>app</sup> <sup>_||_</sup>
SM <sup>app</sup> <sup>_||_</sup>
_i_ HW
_~~||~~_ ~~i~~ <sup>mpc</sup> ~~SM~~
_~~||~~_ ~~i~~ <sup>mpc</sup> ~~SM~~ <sup>_~~||~~_</sup>
_||_ i <sup>app</sup> SM <sup>_||_</sup>
_i_ HW
_~~||~~_ ~~i~~ <sup>mpc</sup> ~~SM~~
<sup>app</sup> SM <sup>_||_</sup>
_~~||~~_ ~~i~~ <sup>mpc</sup> ~~SM~~ <sup>_~~||~~_</sup>
_||_ i <sup>app</sup> SM <sup>_||_</sup>
<sup>app</sup> SM <sup>_||_</sup>
_~~u~~_ HW
_<u>||</u>_ <u>u</u> ~~SM~~ <sup>mpc</sup>
_~~u~~_ HW
_<u>||</u>_ <u>u</u> ~~SM~~ <sup>mpc</sup>
_<u>||</u>_ <u>u</u> ~~SM~~ <sup>mpc</sup> <sup>_<u>||</u>_</sup>
_||_ u SM <sup>app</sup> <sup>_||_</sup>
SM <sup>app</sup> <sup>_||_</sup>
0
0.395 0.4 0.405 0.410
0.395 0.4 0.405 0.410
time in s
time in s
(a) _ω_ = 0 _._ 15 _ω_ N, no parameter deviations. (b) _ω_ = 0 _._ 15 _ω_ N, Ψ <sup>˜</sup> d = 1 _._ 1Ψd.
0 _._ 3
0 _._ 2
0 _._ 1
0
0 _._ 040
0 _._ 020
0 _._ 000
_−_ 0 _._ 020
_−_ 0 _._ 040
0 _._ 010
0 _._ 000
_−_ 0 _._ 010
_−_ 0 _._ 020
1
0 _._ 5
0
_<u>τ</u>_ <sup>d</sup>
_<u>τ</u>_ <sup>mpc</sup>
_<u>τ</u>_ <sup>app</sup>
_<u>τ</u>_ <sup>~~mpc~~</sup> _<u>−</u>_ _<u>τ</u>_ <sup>~~d~~</sup>
_~~τ~~_ <sup>~~app~~</sup> _~~−~~_ _~~τ~~_ <sup>~~d~~</sup>
_<u>τ</u>_ <sup>d</sup>
_<u>τ</u>_ <sup>mpc</sup>
_<u>τ</u>_ <sup>app</sup>
_<u>τ</u>_ <sup>~~mpc~~</sup> _<u>−</u>_ _<u>τ</u>_ <sup>~~d~~</sup>
_~~τ~~_ <sup>~~app~~</sup> _~~−~~_ _~~τ~~_ <sup>~~d~~</sup>
_<u>τ</u>_ <sup>~~app~~</sup> _<u>−</u>_ _<u>τ</u>_ <sup>~~mpc~~</sup> _<u>τ</u>_ <sup>~~app~~</sup> _<u>−</u>_ _<u>τ</u>_ <sup>~~mpc~~</sup>
_i_ HW
_~~||~~_ ~~i~~ <sup>mpc</sup> ~~SM~~
_~~||~~_ ~~i~~ <sup>mpc</sup> ~~SM~~ <sup>_~~||~~_</sup>
_||_ i <sup>app</sup> SM <sup>_||_</sup>
_i_ HW
_~~||~~_ ~~i~~ <sup>mpc</sup> ~~SM~~
<sup>app</sup> SM <sup>_||_</sup>
_~~||~~_ ~~i~~ <sup>mpc</sup> ~~SM~~ <sup>_~~||~~_</sup>
_||_ i <sup>app</sup> SM <sup>_||_</sup>
<sup>app</sup> SM <sup>_||_</sup>
_~~u~~_ ~~HW~~
_~~||~~_ ~~u~~ <u>SM</u> <sup><u>mpc</u></sup>
1 _~~u~~_
0 _._ 9 _~~||~~_ ~~u~~
0 _._ 8 _~~||~~_ ~~u~~
0 _._ 7
0.395 0.4 0.405 0.410
0.395 0.4 0.405 0.410
time in s
_~~||~~_ ~~u~~ <u>SM</u> <sup><u>mpc</u></sup> <sup>_~~||~~_</sup>
_~~||~~_ ~~u~~ <u>SM</u> <sup><u>app</u></sup> <sup>_~~||~~_</sup>
_~~u~~_ ~~HW~~
_~~||~~_ ~~u~~ <u>SM</u> <sup><u>mpc</u></sup>
<u>SM</u> <sup><u>app</u></sup> <sup>_~~||~~_</sup>
_~~||~~_ ~~u~~ <u>SM</u> <sup><u>mpc</u></sup> <sup>_~~||~~_</sup>
_~~||~~_ ~~u~~ <u>SM</u> <sup><u>app</u></sup> <sup>_~~||~~_</sup>
<u>SM</u> <sup><u>app</u></sup> <sup>_~~||~~_</sup>
time in s
(c) _ω_ = 0 _._ 85 _ω_ N, no parameter deviations. (d) _ω_ = 0 _._ 85 _ω_ N, Ψ <sup>˜</sup> d = 1 _._ 1Ψd.
Figure 3.17: Zoomed detail of sine signal for different operating ranges of the MPC with
regularization on state and input.
# 4 MPC Approximation for IM
This chapter discusses the formulation and the approximation of an MPC for an induction
machine. First, the investigated MPC is introduced. In a second step, the data generation
and the approximation is explained in more detail and some simulation results are shown.
Lastly a runtime analysis on a dSPACE Microlab Box real-time platform is performed.
### 4.1 Control loop structure
The control structure for the control of the IM is shown in Figure 4.1. It consists of
a setpoint calculation, which computes the energy-optimal steady-state setpoints, an
observer, which estimates the states and the not well known parameters of the system,
the MPC itself, which acts as a dynamic trajectory generator and finally the flux state
controller, which applies the voltages to the system. The usage of the subordinate flux
controller is necessary due to the low sampling times in the control of electrical machines
and the rather high computation time for the MPC. Therefore, the MPC and the steadystate optimal point calculation act in a slower task with a higher sampling time, while the
observer and the flux controller run in a faster task. This is also indicated by the colors
in Figure 4.1, where red indicates the higher sampling time of the signals and the blocks,
and blue indicates the slower sampling time. The green background shows the parts of
the control loop that are approximated.
In the following the setpoint calculation, the MPC and the state-space controller are
introduced and analyzed on a high level, as these two are the most crucial parts for the
approximation of the MPC. Furthermore the necessity of the flux controller is described.
More details about the single components of the control structure are given in [18].
### 4.2 Setpoint calculation
The main task of the setpoint calculation consists of computing steady-state energyoptimal setpoints for the operation of the IM. It takes as inputs the desired torque _τ_ <sup>d</sup> and
the electrical speed _ω_ and outputs the energy-optimal setpoints Ψ <sup>s</sup> IM <sup>= [Ψ</sup> sd <sup>s</sup> <sup>_,_</sup> <sup>Ψ</sup> sq <sup>s</sup> <sup>_,_</sup> <sup>Ψs</sup> rd <sup>]T.</sup>
the electrical speed _ω_ and outputs the energy-optimal setpoints Ψ <sup>s</sup> IM <sup>= [Ψ</sup> sd <sup>s</sup> <sup>_,_</sup> <sup>Ψ</sup> sq <sup>s</sup> <sup>_,_</sup> <sup>Ψs</sup> rd <sup>]T.</sup>
These stationary optimal setpoints form three inputs for the MPC, since the MPC should
be able to follow the generated setpoints under steady-state conditions.
For the steady-state setpoint calculation the main goal is to achieve a desired stationary
torque _τ_ <sup>d</sup> while minimizing the power losses _P_ l given by (2.28). Furthermore, the stator
current and stator voltage constraints
<sup>s</sup> IM <sup>= [Ψs</sup>
sd <sup>s</sup> <sup>_,_</sup> <sup>Ψs</sup>
sq <sup>s</sup> <sup>_,_</sup> <sup>Ψs</sup>
��� i ss _,_ dq Ψ <sup>s</sup> s _,_ dq���� max (4.1a)
2 <sup>_≤_</sup> <sup>_i_</sup> <sup>s</sup>
��� u ss _,_ dq Ψ <sup>s</sup> s _,_ dq���� max (4.1b)
2 <sup>_≤_</sup> <sup>_u_</sup> <sup>s</sup>
��� i ss _,_ dq
Ψ <sup>s</sup> s
Ψ <sup>s</sup> s
s _,_ dq
s _,_ dq
���� max (4.1b)
2 <sup>_≤_</sup> <sup>_u_</sup> <sup>s</sup>
_38_
_<u>4</u>_ _<u>MPC</u>_ _<u>Approximation</u>_ _<u>for</u>_ _<u>IM</u>_ _<u>4.3</u>_ _<u>MPC</u>_ _<u>formulation</u>_ _<u>39</u>_
_u_ <sup>s</sup>
<sup>s</sup> max _u_ <sup>mpc</sup> max
<sup>s</sup> max _i_ <sup>s</sup>
<sup>mpc</sup> max _i_ <sup>mpc</sup> max
max
_<u>τ</u>_ <sup>d</sup>
_<u>ω</u>_
<u>Ψ</u> <sup>s</sup> <u>IM</u>
_<u>τ</u>_ <sup>s</sup>
_<u>P</u>_ <u>l</u> <sup>s</sup>
<u>u</u> <u>IM</u> <sup>s</sup>
_<u>ω</u>_
<u>p</u>
<u>x</u> <u>IM</u>
<u>p</u>
_<u>ϑ</u>_ <u>s</u>
Steady state
optimal point
calculation
State and parameter
observer
MPC
i abc
_χ_ abc
p
Inverter Flux control
x IM <sup>d</sup>
IM
Figure 4.1: Block diagram of the control structure of the IM.
with the steady-state stator current vector i <sup>s</sup> s
with the steady-state stator current vector i <sup>s</sup> s _,_ dq <sup>= [</sup> <sup>_i_</sup> sd <sup>s</sup> <sup>_, i_</sup> sq <sup>s</sup> <sup>]T,</sup> <sup>the</sup> <sup>steady-state</sup> <sup>stator</sup> <sup>flux</sup>
vector Ψ <sup>s</sup> s _,_ dq <sup>= [Ψ</sup> sd <sup>s</sup> <sup>_,_</sup> <sup>Ψ</sup> sq <sup>s</sup> <sup>]T,</sup> <sup>the</sup> <sup>steady-state</sup> <sup>stator</sup> <sup>voltage</sup> <sup>vector</sup> <sup>u</sup> s <sup>s</sup> _,_ dq <sup>= [</sup> <sup>_u_</sup> sd <sup>s</sup> <sup>_, u_</sup> sq <sup>s</sup> <sup>]T</sup> <sup>and</sup>
sd <sup>s</sup> <sup>_, i_</sup> <sup>s</sup>
vector Ψ <sup>s</sup> s _,_ dq <sup>= [Ψ</sup> sd <sup>s</sup> <sup>_,_</sup> <sup>Ψ</sup> sq <sup>s</sup> <sup>]T,</sup> <sup>the</sup> <sup>steady-state</sup> <sup>stator</sup> <sup>voltage</sup> <sup>vector</sup> <sup>u</sup> s <sup>s</sup> _,_ dq <sup>= [</sup> <sup>_u_</sup> sd <sup>s</sup> <sup>_, u_</sup> sq <sup>s</sup> <sup>]T</sup> <sup>and</sup>
the respective current and voltage limits _i_ <sup>s</sup> max <sup>and</sup> <sup>_u_</sup> <sup>s</sup> max <sup>must</sup> <sup>be</sup> <sup>met</sup> <sup>at</sup> <sup>all</sup> <sup>times.</sup> <sup>The</sup>
<sup>s</sup> s _,_ dq <sup>= [Ψs</sup>
sd <sup>s</sup> <sup>_,_</sup> <sup>Ψs</sup>
sq <sup>s</sup> <sup>]T,</sup> <sup>the</sup> <sup>steady-state</sup> <sup>stator</sup> <sup>voltage</sup> <sup>vector</sup> <sup>u</sup> s <sup>s</sup>
<sup>s</sup> max <sup>and</sup> <sup>_u_</sup> <sup>s</sup>
<sup>s</sup> s _,_ dq <sup>= [</sup> <sup>_i_</sup> sd <sup>s</sup>
sd <sup>s</sup> <sup>_, u_</sup> <sup>s</sup>
s <sup>s</sup> _,_ dq <sup>= [</sup> <sup>_u_</sup> <sup>s</sup>
the respective current and voltage limits _i_ <sup>s</sup> max <sup>and</sup> <sup>_u_</sup> <sup>s</sup> max <sup>must</sup> <sup>be</sup> <sup>met</sup> <sup>at</sup> <sup>all</sup> <sup>times.</sup> <sup>The</sup>
relationship between the flux linkages and the steady state voltages and currents is given
in (2.29) and (2.30). In case that the desired torque is not reachable due to the constraints,
the maximum achievable torque should be achieved (MTPA).
To compute the optimal steady state setpoints, a nonlinear constrained optimization
problem has to be solved in real time. Since the solution of this nonlinear optimization
problem is computationally demanding, [18] describes a more efficient method to solve
this optimization problem by splitting it up in smaller sub-problems, which makes the
solution computationally more efficient.
### 4.3 MPC formulation
Based on the steady-state setpoints from Section 4.2, the main goal of this MPC is to
derive dynamic trajectories that enable an optimal dynamic operation of the motor. In
contrast to the MPC from Section 3.3, this MPC does not directly output the control
action itself, but acts as a dynamic trajectory generator for the subordinate flux controller.
_<u>4</u>_ _<u>MPC</u>_ _<u>Approximation</u>_ _<u>for</u>_ _<u>IM</u>_ _<u>4.3</u>_ _<u>MPC</u>_ _<u>formulation</u>_ _<u>40</u>_
These trajectories should ensure two factors- on the one hand a loss-optimal operation
of the motor in stationary or quasi-stationary operating points and on the other hand
guarantee that during high dynamic setpoint changes the system constraints are met at
any time. During these high dynamic setpoint changes the loss optimality plays therefore
a subordinate role. For this purpose, the cost functional must be designed properly in
order to enable this operation [18].
The input variables for the MPC are the optimal steady-state setpoints Ψ <sup>s</sup> sd _,m_ <sup>,</sup> <sup>Ψs</sup> sq _,m_ <sup>and</sup>
The input variables for the MPC are the optimal steady-state setpoints Ψ <sup>s</sup> sd _,m_ <sup>,</sup> <sup>Ψs</sup> sq _,m_ <sup>and</sup>
Ψ <sup>s</sup> rd _,m_ <sup>,</sup> <sup>the</sup> <sup>steady-state</sup> <sup>voltages</sup> <sup>_u_</sup> <sup>s</sup> sd _,m_ <sup>and</sup> <sup>_u_</sup> sq <sup>s</sup> _,m_ <sup>and</sup> <sup>the</sup> <sup>stationary</sup> <sup>torque</sup> <sup>_τ_</sup> <sup>s</sup> <sup>defined</sup> <sup>at</sup>
Ψ <sup>s</sup> rd _,m_ <sup>,</sup> <sup>the</sup> <sup>steady-state</sup> <sup>voltages</sup> <sup>_u_</sup> <sup>s</sup> sd _,m_ <sup>and</sup> <sup>_u_</sup> sq <sup>s</sup> _,m_ <sup>and</sup> <sup>the</sup> <sup>stationary</sup> <sup>torque</sup> <sup>_τ_</sup> <sup>s</sup> <sup>defined</sup> <sup>at</sup>
the time _t_ = _mT_ mpc with the sampling time _T_ mpc of the MPC. The prediction horizon of
the MPC is discretized in _N_ ph _−_ 1 steps with non-uniform time intervals ∆ _T_ ph _,j_ with a time
increment over the horizon of ∆ _T_ ph _,j_ = _T_ mpc _·_ 1 _._ 151 <sup>_j−_</sup> <sup>1</sup> . The usage of a non-uniform time
grid achieves a longer prediction horizon, since the size of the time intervals is growing
with increasing _j_ while still obtaining the solution for the next time step directly as the
length of the first time interval is _T_ mpc. For example, for a prediction horizon of _N_ ph = 5
timesteps this would yield a prediction length of 6 _._ 755 _T_ mpc, which is a 35% increase
of the horizon length compared to a uniform spaced sampling grid with _T_ mpc. Similar
to Section 3.3 the nomenclature ( _∗_ ) _m|j_ is used in the formulation of the MPC, which
indicates the predicted quantity on the prediction horizon at time _t_ = _mT_ mpc + _T_ ph _,j_, with
_T_ ph _,j_ = <sup>�</sup> <sup>_j_</sup> k=1 <sup>_−_</sup> <sup>1</sup> <sup>∆</sup> <sup>_T_</sup> <sup>ph</sup> <sup>_,k_</sup> <sup>[18].</sup>
<sup>s</sup> rd _,m_ <sup>,</sup> <sup>the</sup> <sup>steady-state</sup> <sup>voltages</sup> <sup>_u_</sup> <sup>s</sup> sd
<sup>s</sup> sd _,m_ <sup>and</sup> <sup>_u_</sup> <sup>s</sup>
<sup>s</sup> sd _,m_ <sup>,</sup> <sup>Ψs</sup>
_T_ ph _,j_ = <sup>�</sup> <sup>_j_</sup> k=1 <sup>_−_</sup> <sup>1</sup> <sup>∆</sup> <sup>_T_</sup> <sup>ph</sup> <sup>_,k_</sup> <sup>[18].</sup>
To achieve the loss-optimal operation of the MPC, deviations from the stationary optimal
values for the rotor flux setpoint Ψ <sup>s</sup> rd <sup>,</sup> <sup>the</sup> <sup>torque</sup> <sup>_τ_</sup> <sup>s</sup> <sup>and</sup> <sup>the</sup> <sup>power</sup> <sup>losses</sup> <sup>_P_</sup> <sup>s</sup> l <sup>are</sup> <sup>penalized</sup>
<sup>s</sup> rd <sup>,</sup> <sup>the</sup> <sup>torque</sup> <sup>_τ_</sup> <sup>s</sup> <sup>and</sup> <sup>the</sup> <sup>power</sup> <sup>losses</sup> <sup>_P_</sup> <sup>s</sup> l
values for the rotor flux setpoint Ψ <sup>s</sup> rd <sup>,</sup> <sup>the</sup> <sup>torque</sup> <sup>_τ_</sup> <sup>s</sup> <sup>and</sup> <sup>the</sup> <sup>power</sup> <sup>losses</sup> <sup>_P_</sup> <sup>s</sup> l <sup>are</sup> <sup>penalized</sup>
in the cost function. Furthermore, the trajectories of the stator currents should be as
smooth as possible. This results in the cost function of the MPC [18]
<sup>s</sup> l _,m_ <sup>)2+</sup>
_J_ ( w m) =
_N_ ph
_j_ =1
_Wτ_ ( _τ_ ( x IM _,m|j_ ) _−_ _τm_ <sup>s</sup>
_m_ <sup>s</sup> <sup>)2 +</sup> <sup>_W_</sup> <sup>P(</sup> <sup>_P_</sup> <sup>l(</sup> <sup>x</sup> IM _,m|j_ <sup>)</sup> <sup>_−_</sup> <sup>_P_</sup> <sup>s</sup> l
+ _W_ Ψ(Ψrd( x IM _,m|j_ ) _−_ Ψ <sup>s</sup> rd _,m_ <sup>)2 +</sup> <sup>_W_</sup> ∆
2
��� i s _,m|j_ ( x IM _,m|j_ ) _−_ i s _,m|j−_ 1( x IM _,m|j−_ 1)���
2 <sup>,</sup> <sup>(4.2)</sup>
with the state vector x IM _,m|j_ = [Ψsd _,m|j,_ Ψsq _,m|j,_ Ψrd _,m|j_ ] <sup>T</sup> and the (positive) optimization
weights _Wτ_, _W_ P, _W_ Ψ and _W_ ∆. The prediction horizon and the optimization weights are
the tuning factors of the MPC. By increasing the prediction horizon, the trajectory is
predicted over a longer time and has thus a higher capability of dealing with system
boundaries. However, with an increasing prediction horizon, the number of optimization
variables increases as well, which in turn increases the computational effort and decreases
the potential of real time capability. The weights on the other hand are important to
define the main optimization goal of the cost function. By changing these, more focus can
be given to the fast torque dynamics or on robust operation at high efficiency. Therefore,
it is important to find a good trade-off between the optimization goals by tuning these
parameters in simulations and on the testbench [18].
The optimization variables are summarized in
w m <sup>T</sup>
m <sup>T</sup> <sup>= [</sup> <sup>u</sup> IM <sup>T</sup>
IM <sup>T</sup> _,m|_ 1 <sup>_,_</sup> <sup>x</sup> IM <sup>T</sup>
IM <sup>T</sup> _,m|_ 2 <sup>_,_</sup> <sup>u</sup> IM <sup>T</sup>
IM <sup>T</sup> _,m|_ 2 <sup>_, ...,_</sup> <sup>x</sup> IM <sup>T</sup>
IM <sup>T</sup> _,m|Nph−_ 1 <sup>_,_</sup> <sup>u</sup> IM <sup>T</sup>
IM <sup>T</sup> _,m|Nph−_ 1 <sup>_,_</sup> <sup>x</sup> IM <sup>T</sup>
IM <sup>T</sup> _,m|Nph_ <sup>]</sup> (4.3)
with the voltage vector u IM _,m|j_ = [ _u_ sd _,m|j, u_ sq _,m|j_ ] <sup>T</sup> . To predict the state evolution over
the prediction horizon into the future, (2.25) is discretized by an implicit Euler method.
_<u>4</u>_ _<u>MPC</u>_ _<u>Approximation</u>_ _<u>for</u>_ _<u>IM</u>_ _<u>4.4</u>_ _<u>Flux</u>_ _<u>controller</u>_ _<u>41</u>_
The current and the voltage constraints are finally given as
_h_ v _,m|j_ ( u IM _,m|j_ ) =
_h_ i _,m|j_ ( x IM _,m|j_ ) =
��� u IM _,m|j_ ��� _−_ _u_ mpcmax <sup>_≤_</sup> <sup>0</sup> (4.4a)
��� i IM _,m|j_ ��� _−_ _i_ mpcmax <sup>_≤_</sup> <sup>0</sup> <sup>,</sup> (4.4b)
with the respective maximum current _i_ <sup>mpc</sup> max
<sup>mpc</sup> max <sup>and</sup> <sup>the</sup> <sup>maximum</sup> <sup>voltage</sup> <sup>_u_</sup> <sup>mpc</sup> max
with the respective maximum current _i_ <sup>mpc</sup> max <sup>and</sup> <sup>the</sup> <sup>maximum</sup> <sup>voltage</sup> <sup>_u_</sup> <sup>mpc</sup> max <sup>of</sup> <sup>the</sup> <sup>MPC.</sup>
These limits can be set different from the limits for the steady state setpoint calculation in
(4.1). By setting the current limit _i_ <sup>mpc</sup> max <sup>to</sup> <sup>higher</sup> <sup>values</sup> <sup>than</sup> <sup>_i_</sup> max <sup>s</sup> <sup>,</sup> <sup>the</sup> <sup>short</sup> <sup>time</sup> <sup>thermal</sup>
<sup>mpc</sup> max <sup>to</sup> <sup>higher</sup> <sup>values</sup> <sup>than</sup> <sup>_i_</sup> <sup>s</sup>
(4.1). By setting the current limit _i_ <sup>mpc</sup> max <sup>to</sup> <sup>higher</sup> <sup>values</sup> <sup>than</sup> <sup>_i_</sup> max <sup>s</sup> <sup>,</sup> <sup>the</sup> <sup>short</sup> <sup>time</sup> <sup>thermal</sup>
overload capability of the machine can be utilized in order to achieve higher dynamical
behavior [18]. However, for stationary points the maximum current of the MPC must
be consistent with the maximum steady-state current to meet the thermal limits of the
motor. Furthermore, _u_ <sup>mpc</sup> max <sup>should</sup> <sup>be</sup> <sup>set</sup> <sup>to</sup> <sup>a</sup> <sup>slightly</sup> <sup>higher</sup> <sup>value</sup> <sup>than</sup> <sup>_u_</sup> <sup>s</sup> max <sup>to</sup> <sup>allow</sup> <sup>the</sup>
<sup>mpc</sup> max <sup>should</sup> <sup>be</sup> <sup>set</sup> <sup>to</sup> <sup>a</sup> <sup>slightly</sup> <sup>higher</sup> <sup>value</sup> <sup>than</sup> <sup>_u_</sup> <sup>s</sup>
motor. Furthermore, _u_ <sup>mpc</sup> max <sup>should</sup> <sup>be</sup> <sup>set</sup> <sup>to</sup> <sup>a</sup> <sup>slightly</sup> <sup>higher</sup> <sup>value</sup> <sup>than</sup> <sup>_u_</sup> <sup>s</sup> max <sup>to</sup> <sup>allow</sup> <sup>the</sup>
MPC and the subordinate controller to compensate for model-plant mismatch [18].
By combining (4.2) and (4.4) and adding the implicit Euler prediction, the optimization
problem for the MPC is formulated as [18]
w <sup>_∗_</sup>
w _m_
_m_ <sup>_∗_</sup> <sup>= argmin</sup>
_J_ ( w _m_ ) (4.5a)
s.t. x IM _,m|j_ +1 = F IM _,m|j_ +1, _j_ = 1 _, ..., N_ ph _−_ 1 (4.5b)
_h_ v _,m|j_ ( u IM _,m|j_ ) _≤_ 0, _j_ = 1 _, ..., N_ ph _−_ 1 (4.5c)
_h_ i _,m|j_ ( x IM _,m|j_ ) _≤_ 0, _j_ = 2 _, ..., N_ ph _,_ (4.5d)
where F IM _,m|j_ +1 stands for the implicit Euler step [18].
This discretization approach of the optimal control problem of the MPC is known in
the literature as direct method. By using this method, the infinite-dimensional optimal
control problem is discretized on a specific timegrid and solved by using a numerical
solver which can deal with constrained optimization problems. The chosen discretization
approach is known as full discretization, since the optimization vector w _m_ consists of
the state variables x IM _,m|j_ and the input variables u IM _,m|j_, both of which are discretized
[33]. Using the discretized system dynamics using the implicit Euler, the optimal states
could be computed by using the initial point and the input vector only– this approach is
known as subordinate time integration [34]. The usage of the full discretization results in a
higher dimensional optimization vector. However, for this small dimensional optimization
problem the chosen approach is fast to compute and delivers directly the discretized state
space vectors together with the voltages [33].
To approximately compensate for the calculation time of the MPC, the first state _x_ IM _,m|_ 1
is computed by the optimal stator voltage of the last optimization step _u_ IM _,m|j−_ 1 and
the actual (estimated) state x IM _,m_ . To solve the optimization problem in real time, it is
reformulated and approximated by a quadratic program. This enables to reach very fast
computation times. For more details regarding the implementation, see [18].
### 4.4 Flux controller
The MPC in the previous section computes optimal trajectories for the dynamic operation
of the IM. It optimizes the flux linkages Ψ <sup>d</sup> IM <sup>and</sup> <sup>the</sup> <sup>stator</sup> <sup>voltages</sup> <sup>u</sup> <sup>IM,</sup> <sup>which</sup> <sup>are</sup> <sup>the</sup>
_<u>4</u>_ _<u>MPC</u>_ _<u>Approximation</u>_ _<u>for</u>_ _<u>IM</u>_ _<u>4.4</u>_ _<u>Flux</u>_ _<u>controller</u>_ _<u>42</u>_
_x_
_x_ <sup>d</sup> _m_ +1
_x_ <sup>d</sup> _k_
_x_ <sup>d</sup> _k_ +1
_x_ <sup>d</sup> _m_
_T_ s
_tm_ _tk_ _tk_ +1 _tm_ +1
_T_ <u>mpc</u>
Figure 4.2: Sampling grid for the MPC and the subordinate flux controller.
_t_
inputs for the inverter. This computation is performed at the sampling time of the MPC
_T_ mpc, which is bigger than the sampling time of the control loop _T_ s. The reason for this is
the high computational effort for the evaluation of the optimization problem of the MPC.
Therefore, a subordinate state control scheme is utilized, which runs at the fast sampling
time _T_ s. Figure 4.2 shows the timescale for the MPC updates (labeled with the subscript
_m_ ) and the timescale on which the flux controller runs (labeled with the subscript _k_ ).
Since the state space controller runs in this short sampling time, the trajectory between
the desired points x IM <sup>d</sup> _,m_ <sup>and</sup> <sup>x</sup> IM <sup>d</sup> _,m_ +1 <sup>must</sup> <sup>be</sup> <sup>interpolated</sup> <sup>onto</sup> <sup>the</sup> <sup>finer</sup> <sup>grid</sup> <sup>x</sup> _k_ <sup>d</sup> +1 <sup>to</sup> <sup>get</sup>
IM <sup>d</sup> _,m_ <sup>and</sup> <sup>x</sup> <sup>d</sup>
IM <sup>d</sup> _,m_ +1 <sup>must</sup> <sup>be</sup> <sup>interpolated</sup> <sup>onto</sup> <sup>the</sup> <sup>finer</sup> <sup>grid</sup> <sup>x</sup> _k_ <sup>d</sup>
the desired points x IM <sup>d</sup> _,m_ <sup>and</sup> <sup>x</sup> IM <sup>d</sup> _,m_ +1 <sup>must</sup> <sup>be</sup> <sup>interpolated</sup> <sup>onto</sup> <sup>the</sup> <sup>finer</sup> <sup>grid</sup> <sup>x</sup> _k_ <sup>d</sup> +1 <sup>to</sup> <sup>get</sup>
the next desired setpoint. Herein _k_ stands for the current timestep for the flux controller
inside the timegrid of the MPC [18].
This flux controller consists of a feedforward and a feedback part. More details on the
implementation is found in [18]. The main goal of the flux controller is to follow the given
interpolated trajectory as fast and as smooth as possible. Furthermore, the noise behavior
of the control loop is strongly influenced by the tuning of this controller. As the MPC
acts as trajectory planning algorithm and does not apply the optimized voltages directly,
the controller itself is mainly responsible for the noise suppression. Since the goal of this
work is to approximate the setpoint calculation and the MPC, but does not replace the
flux controller, the simulations in Section 4.7 are performed without noise, as this noise
would mainly arise from the controller performance and tuning.
_<u>4</u>_ _<u>MPC</u>_ _<u>Approximation</u>_ _<u>for</u>_ _<u>IM</u>_ _<u>4.5</u>_ _<u>Data</u>_ _<u>generation</u>_ _<u>43</u>_
### 4.5 Data generation
As already discussed in Section 3.4, simulations have to be performed that cover the whole
operation space of the IM. The block diagram of the control loop in Figure 4.1 shows, that
ten input variables are necessary to evaluate the MPC in an arbitrary operating point.
These variables can be divided into the following categories:
- Three variables define the current state of the machine x IM _,m_ = [Ψsd _,m,_ Ψsq _,m,_ Ψrd _,m_ ] <sup>T</sup>,
which come from the observer.
- Three variables define the computed optimal steady state setpoints of the machine
x IM <sup>s</sup> _,m_ <sup>= [Ψ</sup> sd <sup>s</sup> _,m_ <sup>_,_</sup> <sup>Ψ</sup> sq <sup>s</sup> _,m_ <sup>_,_</sup> <sup>Ψs</sup> rd _,m_ <sup>]T,</sup> <sup>which</sup> <sup>come</sup> <sup>from</sup> <sup>the</sup> <sup>steady</sup> <sup>state</sup> <sup>optimal</sup> <sup>setpoint</sup>
x IM <sup>s</sup> _,m_ <sup>= [Ψ</sup> sd <sup>s</sup> _,m_ <sup>_,_</sup> <sup>Ψ</sup> sq <sup>s</sup> _,m_ <sup>_,_</sup> <sup>Ψs</sup> rd _,m_ <sup>]T,</sup> <sup>which</sup> <sup>come</sup> <sup>from</sup> <sup>the</sup> <sup>steady</sup> <sup>state</sup> <sup>optimal</sup> <sup>setpoint</sup>
calculation.
IM <sup>s</sup> _,m_ <sup>= [Ψs</sup>
sd <sup>s</sup> _,m_ <sup>_,_</sup> <sup>Ψs</sup>
sq <sup>s</sup> _,m_ <sup>_,_</sup> <sup>Ψs</sup>
- Three variables define the varying parameters of the machine p = [ _R_ s _, R_ r _, Lµ_ ] <sup>T</sup>,
which can either change during operation because of temperature changes (stator and
rotor resistance) or are not accurately known in the modeling phase (the saturation
of the machine) and come thus from the state space observer.
- One variable defines the current electrical speed of the machine _ω_, which comes
from the resolver measurement in the operation of the electrical machine.
The other three outputs of the steady-state optimal point calculation _τ_ <sup>s</sup>, _P_ l <sup>s</sup>
l <sup>s</sup> <sup>and</sup> <sup>u</sup> <sup>s</sup>
l <sup>and</sup> <sup>u</sup> IM <sup>s</sup>
are dependent on the steady-state flux vector Ψ <sup>s</sup> IM <sup>and</sup> <sup>therefore</sup> <sup>do</sup> <sup>not</sup> <sup>represent</sup> <sup>extra</sup>
are dependent on the steady-state flux vector Ψ <sup>s</sup> IM <sup>and</sup> <sup>therefore</sup> <sup>do</sup> <sup>not</sup> <sup>represent</sup> <sup>extra</sup>
independent inputs of the system. This input space must be resolved in high resolution in
order to achieve high approximation accuracy. However, as discussed already in Section 3.4,
this input space is very high dimensional and thus the curse of dimensionality is even
more prominent than in the case of the PMSM.
Since the approximation of this input space and the performance of the necessary simulations would need a lot of computational effort, the system boundary of the approximation
was changed by including the steady state optimal point calculation into the approximation. This approach decreases the input dimension, because the three optimal steady
state setpoints can be computed by the desired torque of the machine _τ_ <sup>d</sup> and the current
electrical speed _ω_ . Since the electrical speed is also already an input for the MPC, the
input dimension for the simulations can be reduced by two. This further reduces the
computational effort for the evaluation of this approach, since the steady state optimal
point calculation is now also part of the approximation and does not need to be evaluated
separately in each time step during the operation. This approach finally yields
_ζ_ mpc _,_ IM = [Ψsd _,_ Ψsq _,_ Ψrd _, τ_ <sup>d</sup> _, ω, R_ s _, R_ r _, Lµ_ ] <sup>T</sup> (4.6)
with the input vector _ξ_ mpc _,_ IM _∈_ IR <sup>8</sup> of the simulation and the approximation. The
parameter ranges for the variables in the input vector are summarized in Table 4.1. The
three flux inputs are herein set to cover the whole operating range of the electrical machine.
For this purpose, multiple dynamic simulations (e.g. torque ramps with different torque
rates between different positive and negative values, sinusoidal torque trajectories, speed
ramps with different speed rates,...) were performed on the MPC and the maximum and
_<u>4</u>_ _<u>MPC</u>_ _<u>Approximation</u>_ _<u>for</u>_ _<u>IM</u>_ _<u>4.5</u>_ _<u>Data</u>_ _<u>generation</u>_ _<u>44</u>_
minimum values of the states was captured. The torque range corresponds to the whole
operating range of the electrical machine, such that the machine can be operated in motoric
and generatoric points. The speed range corresponds to the forward driving operating
range of the machine and since the machine is symmetrical, its behavior for positive and
negative speeds is the same. Therefore, only simulations for positive speeds are performed.
For the machine parameters, values were used from testbench measurements with the
MPC. In these measurements the stator resistance value was never around its nominal
value at 20 <sup>_◦_</sup> because the machine was operated at a different stator temperature, which
is the main influencing factor for the stator resistance. This parameter range could be
extended easily by changing the minimum and maximum values for the resistances and
the inductance. However, for a proof of concept and a comparison with the measurement
results of the electrical machine, these parameter ranges are sufficient.
To achieve a high approximation accuracy for this approach, the eight input variables must
Parameter Minimum Maximum
Ψsd _−_ 0 _._ 25ΨN ΨN
Ψsq _−_ 0 _._ 5ΨN 0 _._ 5ΨN
Ψrd 0 _._ 03ΨN ΨN
_τ_ <sup>d</sup> _−τ_ N _τ_ N
_ω_ 0 _ω_ N
_R_ s 1 _._ 12 _R_ s _,_ 20 1 _._ 22 _R_ s _,_ 20
_R_ r 0 _._ 85 _R_ r _,_ 20 1 _._ 48 _R_ r _,_ 20
_Lµ_ 0 _._ 74 _Lµ,_ 0 1 _._ 2 _Lµ,_ 0
Table 4.1: Input parameter space for the IM.
be sampled on fine grids. Therefore, the fluxes are sampled with a resolution of 0 _._ 025ΨN,
the torque with a resolution of 0 _._ 025 _τ_ N and the speed with a resolution of 0 _._ 0625 _ω_ N. For
the parameters, 3 uniformly sampled points for the stator resistance, 4 uniformly sampled
points for the rotor resistance and 5 uniformly sampled points for the main inductance
are used. This results in a total number of
_n_ Ψsd _· n_ Ψsq _· n_ Ψrd _· nτ_ _· nω_ _· n_ Rs _· n_ Rr _· n_ L _µ_ = 51 _·_ 41 _·_ 39 _·_ 41 _·_ 17 _·_ 3 _·_ 4 _·_ 5 _≈_ 3 _._ 4 _·_ 10 <sup>9</sup> (4.7)
simulations. Herein _n_ Ψsd, _n_ Ψsq, _n_ Ψrd, _nτ_, _nω_, _n_ Rs, _n_ Rr and _n_ L _µ_ describe the number
of simulation points per parameter. The simulations are performed on the real time
implementation of the MPC. The optimization is executed until it converges to the
optimal points. By doing so, only fully converged points are used for the approximation
itself. By assuming a computation time of approximately 5ms on average per simulation,
this would correspond to an overall simulation time of approximately 195 days on a single
core or approximately 25 days on 8 cores.
As discussed already in Section 3.4, this sampling is not feasible for the approximation.
Therefore, some restrictions are used in the sampling to increase the efficiency and make
_<u>4</u>_ _<u>MPC</u>_ _<u>Approximation</u>_ _<u>for</u>_ _<u>IM</u>_ _<u>4.5</u>_ _<u>Data</u>_ _<u>generation</u>_ _<u>45</u>_
the simulation effort feasible. To begin, only points are considered, for which the torque
according to (2.27) differs less than a factor of 1.5 of the maximum torque rate ∆ _τ_ max
times the sampling time of the MPC _T_ mpc from the desired torque _τ_ <sup>d</sup>
_|τ_ <sup>d</sup> _−_ _τ_ (Ψrd _,_ Ψsq) _| ≤_ 1 _._ 5∆ _τ_ max _T_ mpc . (4.8)
This assumption holds as long as the control is able to follow the desired torque limited by
the maximum torque rate with a deviation smaller than one and a half of the maximum
torque rate multiplied by the sampling time. Since the sampling time of the MPC has
a rather high value compared to the sampling time of the subordinate controller, the
machine can follow the planned trajectory from the MPC quite well and thus this approach
is feasible.
Secondly, only points are used in the sampling scheme, which do not violate the system
boundaries. This means, that the stationary stator currents i <sup>s</sup> s _,_ dq <sup>from</sup> <sup>(2.30)</sup> <sup>and</sup> <sup>the</sup>
boundaries. This means, that the stationary stator currents i <sup>s</sup> s _,_ dq <sup>from</sup> <sup>(2.30)</sup> <sup>and</sup> <sup>the</sup>
stationary stator voltages u s <sup>s</sup> _,_ dq <sup>from</sup> <sup>(2.29)</sup> <sup>for</sup> <sup>the</sup> <sup>current</sup> <sup>simulation</sup> <sup>are</sup> <sup>limited</sup> <sup>by</sup> <sup>the</sup>
stationary stator voltages u s <sup>s</sup> _,_ dq <sup>from</sup> <sup>(2.29)</sup> <sup>for</sup> <sup>the</sup> <sup>current</sup> <sup>simulation</sup> <sup>are</sup> <sup>limited</sup> <sup>by</sup> <sup>the</sup>
current and the voltage boundary given by (4.1). This relationship is evaluated for each
permutation of the uniformly sampled input grid and only the points that fulfill this
relationship are kept.
By the application of these two assumptions on the dataset, the number of necessary
simulations decreases from 3.4 billion to approximately 7 _._ 5 _·_ 10 <sup>7</sup> necessary simulations,
which is by a factor of 45 smaller than the initial dataset would have been. Therefore, the
simulations can be performed in the span of approximately 4.5 days on a single core or in
approximately half a day on eight cores.
The evaluation of a training on this dataset, which is described in Section 4.7, showed,
that the approximation worked well under dynamic and stationary scenarios, however, a
large mismatch in the region around 0Nm was observed. The root cause for this behavior
is, that the machine is not controllable, if the rotor direct flux gets to a value of 0Wb.
The reason for this is, that in this scenario there is no field in the machine’s rotor and
thus no torque is generated by the stator field. In this condition, a rotor field is first built
up by the control and only afterwards the machine is controlled to follow the desired
torque trajectory. In this region, the IM is very sensitive to state changes. This effect was
mainly observed in the predicted quadrature flux of the electrical machine. Therefore,
the simulation grid is refined in this region by having a resolution of 0 _._ 0125ΨN in the
region between _−_ 0 _._ 025ΨN and 0 _._ 025ΨN for the quadrature flux. Furthermore, extra
desired torque points at the lowest torques are introduced in order to achieve a finer
resolution and a better approximation accuracy. The torque grid is refined in the region
between _−_ 0 _._ 025 _τ_ N and 0 _._ 025 _τ_ N by adding six extra grid points at _±_ 0 _._ 0175 _τ_ N, _±_ 0 _._ 01 _τ_ N and
_±_ 0 _._ 005 _τ_ N.
By using these extra points, the simulation effort increases again to _n_ IM = 1 _._ 1 _·_ 10 <sup>8</sup>
simulations, which is by a factor of approximately 31 smaller than the initial dataset.
These simulations correspond to a time of approximately 6.5 days on a single core or one
day on eight cores.
This approach helps to perform the simulations and confirm the proof of concept in a
fast and pragmatic way. However, for the application in a safety critical control regime
all points should be simulated in a fine fashion and then be used for the training on a
powerful hardware.
_<u>4</u>_ _<u>MPC</u>_ _<u>Approximation</u>_ _<u>for</u>_ _<u>IM</u>_ _<u>4.6</u>_ _<u>Data</u>_ _<u>driven</u>_ _<u>approach</u>_ _<u>46</u>_
### 4.6 Data driven approach
The data driven approach to approximate the MPC for the IM is very similar to the
approach described in Section 3.5. For the approximation, the _Python_ _Programming_
_Language_ is also chosen here.
Ψ <sup>d</sup> rd
Ψ <sup>d</sup> sq
Ψ <sup>d</sup> sd
_ω_
_Lµ_
_R_ r
_R_ s
_τ_ <sup>d</sup>
Ψrd
Ψsq
Ψsd
Ψsd Ψsq Ψrd _τ_ <sup>d</sup> _R_ s _R_ r _Lµ_ _ω_ Ψ <sup>d</sup>
<sup>d</sup> sq Ψ <sup>d</sup> rd
<sup>d</sup> sd Ψ <sup>d</sup> sq
rd
1
0 _._ 8
0 _._ 6
0 _._ 4
0 _._ 2
0
_−_ 0 _._ 2
_−_ 0 _._ 4
_−_ 0 _._ 6
_−_ 0 _._ 8
_−_ 1
Figure 4.3: Correlation matrix for the input and output variables for the IM.
The correlation matrix between the individual inputs and outputs is shown in Figure 4.3.
The correlation between the input states Ψsd, Ψsq and Ψrd and the output states of the
MPC Ψ <sup>d</sup> sd <sup>,</sup> <sup>Ψd</sup> sq <sup>and</sup> <sup>Ψd</sup> rd <sup>show</sup> <sup>highly</sup> <sup>positive</sup> <sup>correlation</sup> <sup>coefficients,</sup> <sup>since</sup> <sup>the</sup> <sup>output</sup> <sup>of</sup>
<sup>d</sup> sd <sup>,</sup> <sup>Ψd</sup> sq
<sup>d</sup> sq <sup>and</sup> <sup>Ψd</sup> rd
MPC Ψ <sup>d</sup> sd <sup>,</sup> <sup>Ψd</sup> sq <sup>and</sup> <sup>Ψd</sup> rd <sup>show</sup> <sup>highly</sup> <sup>positive</sup> <sup>correlation</sup> <sup>coefficients,</sup> <sup>since</sup> <sup>the</sup> <sup>output</sup> <sup>of</sup>
the MPC is strongly coupled to the current state. Furthermore, the cross-correlation
between the stator direct flux Ψsd and the rotor direct flux Ψrd is high for the input state
and the output state. This is because the rotor direct flux is built up by the stator direct
flux according to (2.25c). For stationary points, the two flux values have identical values.
The torque and the stator quadrature flux Ψsd correlate strongly as well, since the torque
is directly proportional to the q-component of the stator flux, which can be changed by
the input voltage in a fast manner because of the low time constant of the stator. The
rotor d-component of the flux does not correlate as strongly linear with the torque, since
the relationship herein is more complex, due to the high time constant of the rotor and
the time that it takes to build up the field in the rotor. Furthermore, the speed correlates
negatively with the direct component of the stator flux and the rotor flux. The reason
for this is that, similar to the PMSM, the direct stator flux has to be reduced for highly
dynamical setpoint changes, when the machine hits the voltage boundary. Since the rotor
_<u>4</u>_ _<u>MPC</u>_ _<u>Approximation</u>_ _<u>for</u>_ _<u>IM</u>_ _<u>4.6</u>_ _<u>Data</u>_ _<u>driven</u>_ _<u>approach</u>_ _<u>47</u>_
direct flux is strongly correlated with the stator direct flux, the correlation with the speed
is high as well. The parameter values of the observer are not correlated with the other
variables. For the stator and the rotor resistance, this behavior is explained by the fact
that these parameters are mainly dependent on the temperature and not by the other
quantities. The mutual inductance is not correlated in a linear fashion with the other
parameters, since its saturation behavior is strongly nonlinear. However, this nonlinear
behavior is captured by the neural network and the parameters are important for the
control in the case of parameter mismatch and changing environmental conditions (e.g.
when the rotor or the stator heats up).
_×_ 10 <sup>6</sup>
7
6
5
4
3
2
1
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 60.8 0.9 1
_<u>ω</u>_
_ω_ N
Figure 4.4: Histogram of the speed distribution in the original dataset.
The usage of the dataset described in Section 4.5 for the training and the prediction
yields good results for dynamic setpoint changes, however, it performs rather poorly on
stationary setpoints. This behavior is explained by the fact, that the dataset contains
a lot of dynamic setpoint changes and is thus overfitting in this region. Furthermore, it
performs better for smaller speeds than for high speeds. The reason for this is, that the
dataset is limited by the voltage constraint of the system, which gets more restrictive for
higher speeds. This behavior is shown in Figure 4.4. Therefore, another sampling step is
performed on this dataset to counter these problems.
To mitigate the problem of the high speed approximation accuracy, the maximum number
of sample points per speed _n_ max _,ω_ N is limited by the number of simulation points at the
highest speed _ω_ N. This maximum number of sample points is used in the next step as
_<u>4</u>_ _<u>MPC</u>_ _<u>Approximation</u>_ _<u>for</u>_ _<u>IM</u>_ _<u>4.6</u>_ _<u>Data</u>_ _<u>driven</u>_ _<u>approach</u>_ _<u>48</u>_
_×_ 10 <sup>6</sup>
3
2
1
0
-0.4 -0.2 0 0.2 0.4
-0.4 -0.2 0 0.2 0.4
<u>Ψ</u> <sup>d</sup>
<sup>d</sup> <u>sd</u> <sup>_<u>−</u>_</sup> <sup><u>Ψd</u></sup> <u>rd</u>
<sup>_<u>−</u>_</sup> <sup><u>Ψd</u></sup> <u>rd</u>
ΨN
<u>sd</u> <sup>_<u>−</u>_</sup> <sup><u>Ψd</u></sup> <u>rd</u> <u>sd</u> <sup>_<u>−</u>_</sup> <sup><u>Ψd</u></sup> <u>rd</u>
ΨN ΨN
(a) Uniform sampling. (b) Steady-state focused sampling.
<u>Ψ</u> <sup>d</sup>
<sup>d</sup> <u>sd</u> <sup>_<u>−</u>_</sup> <sup><u>Ψd</u></sup> <u>rd</u>
Figure 4.5: Comparison of the sampling schemes.
an upper boundary of sampling points per speed interval. To mitigate the problem of
the stationary accuracy, the difference _e_ Ψd between the stator direct flux and the rotor
direct flux is computed and the number of samples with a specific error is displayed as a
histogram in Figure 4.5a. This shows, that a large amount of the dataset is not close to
zero, where the stationary setpoints of the induction machine lie (Ψ <sup>s</sup> sd <sup>= Ψ</sup> rd <sup>s</sup> <sup>).</sup> <sup>For</sup> <sup>this</sup>
<sup>s</sup> sd <sup>= Ψs</sup>
zero, where the stationary setpoints of the induction machine lie (Ψ <sup>s</sup> sd <sup>= Ψ</sup> rd <sup>s</sup> <sup>).</sup> <sup>For</sup> <sup>this</sup>
purpose, a threshold of 3% around the stationary point is applied and all points that lie in
this region are used for the dataset (if this number is smaller than _n_ max _,ω_ N). These points
should represent the stationary points in the dataset. Additionally, for each simulated
speed from all the other simulation points with more than _±_ 2% difference from the
stationary point, 10% of _n_ max _,ω_ N is used to randomly pick simulation points. This finally
results in approximately twice as many points outside the 2% threshold compared to the
points inside this threshold. These adapted sampling points are shown as a histogram in
Figure 4.5b. By performing this, the number of points in the dataset decreases drastically
by still achieving good results. This is a further advantage of this approach, since the
neural network is able to be trained faster.
Similar to (4.9) the inputs and the outputs of the system that are approximated are
summarized in
...
Ψ <sup>T</sup>
IM
...
_ζ_ <sup>T</sup>
mpc _,_
_ζ_ <sup>T</sup>
Ψ <sup>T</sup>
X IM =
mpc _,_ IM _,_ 1
_ζ_ <sup>T</sup> mpc _,_ IM _,_ 2
_ζ_ <sup>T</sup> mpc _,_ IM _,_ 3
_ζ_ <sup>T</sup> mpc _,_ IM _,_ 4
mpc _,_ IM _,_ 4
IM _,_ 1
Ψ <sup>T</sup> IM _,_ 2
Ψ <sup>T</sup> IM _,_ 3
Ψ <sup>T</sup> IM _,_ 4
IM _,_ 4
, (4.9)
, Y IM =
mpc _,_ IM _,_ nIM
IM _,_ nIM
_<u>4</u>_ _<u>MPC</u>_ _<u>Approximation</u>_ _<u>for</u>_ _<u>IM</u>_ _<u>4.6</u>_ _<u>Data</u>_ _<u>driven</u>_ _<u>approach</u>_ _<u>49</u>_
with the input matrix X IM and the output matrix Y IM of the neural network and the flux
vector Ψ IM _,_ j = [Ψ <sup>d</sup> sd _,_ j <sup>_,_</sup> <sup>Ψ</sup> sq <sup>d</sup> _,_ j <sup>_,_</sup> <sup>Ψd</sup> rd _,_ j <sup>]T,</sup> <sup>which</sup> <sup>summarizes</sup> <sup>the</sup> <sup>three</sup> <sup>output</sup> <sup>states</sup> <sup>of</sup> <sup>the</sup> <sup>MPC.</sup>
vector Ψ IM _,_ j = [Ψ <sup>d</sup> sd _,_ j <sup>_,_</sup> <sup>Ψ</sup> sq <sup>d</sup> _,_ j <sup>_,_</sup> <sup>Ψd</sup> rd _,_ j <sup>]T,</sup> <sup>which</sup> <sup>summarizes</sup> <sup>the</sup> <sup>three</sup> <sup>output</sup> <sup>states</sup> <sup>of</sup> <sup>the</sup> <sup>MPC.</sup>
These matrices are split up in a training and a test set, where the training set consists of
85% of the data and the validation set consists of 15% of the data. These sets are shuffled
in order to minimize the correlation between subsequent simulations.
The input scaler is the same minimum maximum scaler as described in (3.12) with 8
inputs. The fully connected neural network used for the approximation consists of an
eight dimensional input layer, four hidden layers with 70, 60, 50 and 50 nodes respectively
and a three dimensional output layer. The activation function of the hidden layers is set
to ReLU and for the output layer to linear. All the other parameters of the neural net are
set equivalent to the net in Section 3.5. The shape of the hidden layers is chosen after
an ablation study is performed. In this ablation study, the size of the neural network
is reduced in width and depth to save computational effort. To perform the ablation
study, first a high dimensional neural network with 300, 150, 75 and 50 nodes is trained.
After the training of this network, it creates the baseline (BL) for the ablation study.
Subsequently, the number of hidden layers and the width of the hidden layers is varied
and the performance of the networks is checked against the baseline network by using the
Q-Q plot and a dynamic simulation environment, described in more detail in Section 4.7.
Based on these simulations, the network size is reduced until the performance of the
ablation study (AS) network is significantly worse than the baseline performance. This
approach represents a tradeoff between approximation accuracy and computational effort.
By doing so, the number of weights _n_ w and biases _n_ b is reduced from
<sup>d</sup> sd _,_ j <sup>_,_</sup> <sup>Ψ</sup> sq <sup>d</sup>
sq <sup>d</sup> _,_ j <sup>_,_</sup> <sup>Ψd</sup> rd
to
_n_ w _,_ BL = 8 _·_ 300 + 300 _·_ 150 + 150 _·_ 75 + 75 _·_ 50 + 50 _·_ 3 = 62550 (4.10a)
_n_ b _,_ BL = 300 + 150 + 75 + 50 + 3 = 578 (4.10b)
_n_ w _,_ AS = 8 _·_ 70 + 70 _·_ 60 + 60 _·_ 50 + 50 _·_ 50 + 50 _·_ 3 = 10410 (4.11a)
_n_ b _,_ AS = 70 + 60 + 50 + 50 + 3 = 233, (4.11b)
so by a factor of _≈_ 6 for the weights and by a factor of _≈_ 2 _._ 5 for the biases. This approach
saves computation time, since less multiplication and addition operations have to be
performed. Furthermore, it also saves memory on the hardware, since less parameters
have to be saved. Both factors are crucial for the usage in the automotive control field,
since the reduction of computation time enables the real time capability and the reduction
of memory, which is crucial for the limited storage on the hardware.
The Q-Q plot shows the approximation accuracy of the neural network after the ablation
study for each of the outputs. The approximation shows herein a high accuracy for all
three output variables except for a few outliers. The root mean square error scaled by
the nominal flux ΨN for the three approximations is equal to 0.0066 for the stator direct
flux, 0.0047 for the stator quadrature flux and 0.0018 for the rotor direct flux. For the
approximation, 97% of all datapoints for the stator direct flux, 97% of all datapoints for
the stator quadrature flux and 99.5% of all datapoints for the rotor direct flux lie in the
region of three times the standard deviation between prediction and actual values. This
shows a high approximation accuracy for all three parameters over the whole operating
range of the IM.
_<u>4</u>_ _<u>MPC</u>_ _<u>Approximation</u>_ _<u>for</u>_ _<u>IM</u>_ _<u>4.6</u>_ _<u>Data</u>_ _<u>driven</u>_ _<u>approach</u>_ _<u>50</u>_
_<u>||</u>_ <u>Ψ</u> <sup>mpc</sup> <u>IM</u>
<sup>mpc</sup> <u>IM</u> <sup>_<u>−</u>_</sup> <sup><u>Ψapp</u></sup> <u>IM</u>
<sup>_<u>−</u>_</sup> <sup><u>Ψapp</u></sup> <u>IM</u> <sup>_<u>||</u>_</sup>
ΨN
0 _._ <u>000</u> <u>0</u> _<u>.</u>_ <u>005</u> <u>0</u> _<u>.</u>_ <u>010</u> <u>0</u> _<u>.</u>_ <u>015</u> <u>0</u> _<u>.</u>_ <u>020</u> <u>0</u> _<u>.</u>_ <u>025</u> <u>0</u> _<u>.</u>_ <u>030</u>
1
0 _._ 5
0
0 _._ 4
0 _._ 2
0
_−_ 0 _._ 2
_−_ 0 _._ 4
_−_ 0 _._ 2 0 0 _._ 2 0 _._ 4 0 _._ 6 0 _._ 8 1
<u>Ψ</u> <sup>mpc</sup> <u>sd</u>
ΨN
_−_ 0 _._ 4 _−_ 0 _._ 2 0 0 _._ 2 0 _._ 4
<u>Ψ</u> <sup>mpc</sup> <u>sq</u>
ΨN
1
0 _._ 5
0
0 0 _._ 2 0 _._ 4 0 _._ 6 0 _._ 8 1
<u>Ψ</u> <sup>mpc</sup> <u>rd</u>
ΨN
Figure 4.6: Q-Q plot for the approximation of the MPC for the IM.
_<u>4</u>_ _<u>MPC</u>_ _<u>Approximation</u>_ _<u>for</u>_ _<u>IM</u>_ _<u>4.7</u>_ _<u>Simulation</u>_ _<u>results</u>_ _<u>51</u>_
### 4.7 Simulation results
Similar to Section 3.6, the developed approximation approach is checked on its feasibility
for stationary and dynamic simulations. These simulations are closed-loop simulations with
the observer, the flux state space controller, an inverter model and an angle independent
machine model. To compare the two approaches, the loop is closed either by the MPC
or by its approximation. Both control concepts are fed with the same input parameters
and their outputs are compared. All shown simulations are performed at a constant
temperature of 60 <sup>_◦_</sup> C. At this temperature, the stator and rotor resistance _R_ s, _R_ r are
inside their ranges from Table 4.1 for their nominal and the disturbed values.
To identify the performance and the robustness of the newly developed concept, the
following simulations are performed on the nominal dataset and a disturbed dataset,
where the rotor resistance is increased by 30%. This error in the input parameter space
of the approximation could come from a parameter mismatch because of component
tolerances or from an error in the thermal model.
4.7.1 Stationary simulation results
One main performance indicator of a control scheme is the stationary accuracy. For this
purpose, Figure 4.7 and Figure 4.8 show the accuracy of the MPC and its approximation
over steady-state torque speed maps for the nominal (with the blue background) and the
disturbed (with the red background) case. It is important to mention, that compared to
the stationary results in Figure 3.11, the mean absolute error is significantly higher. The
reason for this is, that for this control loop, no integrator is used, which should achieve
the stationary accuracy. However, this does not affect the evaluation of the performance
of the approximation, since the main goal in this section is to compare the results between
the control with the MPC and the control with its approximation.
Figure 4.7 shows the absolute error for all points in the torque speed map including 0Nm.
This region is crucial for dynamic setpoint changes and yields the biggest error in the
approximation of the MPC. However, for the stationary simulations this behavior is not
observed. The error between the MPC and the desired torque value in Figure 4.7a and
Figure 4.7c show low errors for the small speeds. The nominal system and the disturbed
system with the increased rotor resistance yield similar results. This means, that the
disturbance on this system parameter does not influence its performance. Especially
in the motoric range the MPC yields good results. For higher speeds above the corner
point and higher torque values (generatoric and motoric), the performance of the MPC
on the stationary map falls off. The reason for this is, that with increasing speed the
voltage boundary gets active, and this influences the performance of the MPC, since the
machine is driven at the voltage boundary. Since this is a restriction on the input value
of the dynamic system (the voltage u IM), the trajectory generation and the solution of
the optimization problem gets more complex. Therefore, bigger differences are expected
here than in the base speed range. However, these absolute error values are still small
compared to the maximum achievable torque of this machine.
Figure 4.7b and Figure 4.7d show the results for the approximation of the MPC. A similar
behavior as for the MPC is found, since it performs better for smaller speeds than for
_<u>4</u>_ _<u>MPC</u>_ _<u>Approximation</u>_ _<u>for</u>_ _<u>IM</u>_ _<u>4.7</u>_ _<u>Simulation</u>_ _<u>results</u>_ _<u>52</u>_
_<u>||τ</u>_ _<u>−τ</u>_ <sup>d</sup> _<u>||</u>_
_τ_ N
0 _._ <u>000</u> <u>0</u> _<u>.</u>_ <u>001</u> <u>0</u> _<u>.</u>_ <u>002</u> <u>0</u> _<u>.</u>_ <u>003</u> <u>0</u> _<u>.</u>_ <u>004</u> <u>0</u> _<u>.</u>_ <u>005</u> <u>0</u> _<u>.</u>_ <u>006</u> <u>0</u> _<u>.</u>_ <u>007</u>
1
0 _._ 5
0
_−_ 0 _._ 5
_−_ 1
0 0 _._ 2 0 _._ 4 0 _._ 6 0 _._ 8 1
_<u>ω</u>_
_ω_ N
0 0 _._ 2 0 _._ 4 0 _._ 6 0 _._ 8 1
_<u>ω</u>_
_ω_ N
(a) MPC error, nominal. (b) Approximation error, nominal.
1
0 _._ 5
0
_−_ 0 _._ 5
_−_ 1
0 0 _._ 2 0 _._ 4 0 _._ 6 0 _._ 8 1
_<u>ω</u>_
_ω_ N
0 0 _._ 2 0 _._ 4 0 _._ 6 0 _._ 8 1
_<u>ω</u>_
_ω_ N
(c) MPC error, disturbed. (d) Approximation error, disturbed.
Figure 4.7: Absolute error for the stationary simulations for the IM.
_<u>4</u>_ _<u>MPC</u>_ _<u>Approximation</u>_ _<u>for</u>_ _<u>IM</u>_ _<u>4.7</u>_ _<u>Simulation</u>_ _<u>results</u>_ _<u>53</u>_
_<u>||τ</u>_ _<u>−τ</u>_ <sup>d</sup> _<u>||</u>_
in %
_τ_ <sup><u>d</u></sup>
_<u>−</u>_ <u>3</u> _<u>−</u>_ <u>2</u> _<u>−</u>_ <u>1</u> <u>0</u> <u>1</u> <u>2</u> <u>3</u>
1
0 _._ 5
0
_−_ 0 _._ 5
_−_ 1
0 0 _._ 2 0 _._ 4 0 _._ 6 0 _._ 8 1
_<u>ω</u>_
_ω_ N
0 0 _._ 2 0 _._ 4 0 _._ 6 0 _._ 8 1
_<u>ω</u>_
_ω_ N
(a) MPC error, nominal. (b) Approximation error, nominal.
1
0 _._ 5
0
_−_ 0 _._ 5
_−_ 1
0 0 _._ 2 0 _._ 4 0 _._ 6 0 _._ 8 1
_<u>ω</u>_
_ω_ N
0 0 _._ 2 0 _._ 4 0 _._ 6 0 _._ 8 1
_<u>ω</u>_
_ω_ N
(c) MPC error, disturbed. (d) Approximation error, disturbed.
Figure 4.8: Absolute relative error for stationary simulations for the IM.
_<u>4</u>_ _<u>MPC</u>_ _<u>Approximation</u>_ _<u>for</u>_ _<u>IM</u>_ _<u>4.7</u>_ _<u>Simulation</u>_ _<u>results</u>_ _<u>54</u>_
higher speeds. The approximation also deals well with the parameter disturbance, since
the two maps deliver similar results. The approximation behavior is not as smooth as
for the MPC, since there are no clusters where many points have the same errors. This
is explained by the nature of the approximation itself. Since the approximation does
not know anything about the system that it should approximate, it tries to fit the data
driven approach as well as possible to the datapoints. The evaluation on the input vector
yields finally the interpolated behavior by the neural net of the training dataset. If there
were error clusters in this map, this would mean, that there is some systematic error
in the approximation which is not captured by the input parameters. Furthermore, the
error is in general bigger than for the MPC itself. This is an expected behavior, since
the approximation tries to approach the MPC as closely as possible, but it is still an
approximation. However, the maximum error that is found in the torque speed maps is
again small for the machine and shows a good result, taking the nonlinear behavior of
the system into account. It is necessary to mention, that by increasing the dataset or by
using a more complex neural network, the approximation accuracy can still be increased.
However, for the usage on a target hardware, the neural net from Section 4.6 after the
ablation study is used, since it is a good tradeoff between accuracy and computational
performance.
To put the things into perspective of the currently driven torque, Figure 4.8 shows the
relative errors of the two control approaches. For this comparison, the values around 0Nm
are removed from the plot to compute the relative error for each point in the dataset.
Compared to the absolute error, a different picture emerges, which shows very small
relative errors for the approaches for high torques and high relative errors for small torques.
This is explained by the fact, that small deviations from the setpoint cause for small
torques bigger relative errors. The performance of the approximation shows also here
good results with a relative error in the range of _±_ 3%. The approximation shows a similar
error distribution as the MPC for high speeds. For low speeds and low torques, the
approach shows the biggest differences. The reason for this is that the induction machine
is difficult to control at these low torque values and the approximation has still problems
in this region, even after the addition of the extra torque points in the sampling scheme
in Section 4.5. To improve the performance, the parameter sensitivity in this region could
be increased even further, which might lead to a higher approximation. Overall, these
results show, that for the stationary case, the approximation performs very well in the
whole operating range.
4.7.2 Dynamic simulation results
In order to evaluate the dynamic behavior of the proposed control concept, transient
closed-loop simulations are performed. For this purpose, a dynamic profile including
steps limited by the torque rate, sinusoidal signals at different torque levels and a slower
torque ramp is used as input for the control loop. The result of this simulation is shown
in Figure 4.9 for a low speed of _ω_ = 0 _._ 15 _ω_ N. The first subplot shows herein the torque
setpoint, the torque of the MPC and the torque of the approximation. The evaluation
of the errors between the MPC, the approximation and the desired torque are shown
in the second and the third subplot. The second subfigure shows in detail, that the
_<u>4</u>_ _<u>MPC</u>_ _<u>Approximation</u>_ _<u>for</u>_ _<u>IM</u>_ _<u>4.7</u>_ _<u>Simulation</u>_ _<u>results</u>_ _<u>55</u>_
error to the desired torque setpoint is small during steady-state and slowly changing
operation, however it increases under fast dynamic operation. This behaviour is mainly
caused by two factors: On the one hand, the control needs some time to settle during fast
dynamical setpoint changes. On the other hand, the desired setpoint and the response
of the system are not synchronized, since the evaluation of the control concept needs
some time and is thus always time delayed with respect to the setpoint change. The third
subplot shows, that the error of the approximation is by approximately a factor 10 smaller
during the whole simulation. This means, that the approximation performs well and that
the performance of the developed control scheme is mainly dependent on the underlying
MPC that needs to be approximated. In the fourth and fifth subplot, the currents and
the voltages are shown during these transients together with their boundary values. This
plots show, that the approximation is able to fulfill the boundary conditions at low speeds.
In the last subfigure the direct rotor flux, that the MPC and the approximation output as
dynamic setpoint, is plotted. This shows, that the approximation and the MPC yield the
same states as outputs of the system, since they are almost on top of each other.
In addition to this, a close-up view of the first sinusoidal signal at around six seconds is
shown in Figure 4.10 for low and high speed and for the case of parameter deviations and
no parameter deviations. For the case of parameter deviations, the rotor resistance _R_ r is
increased by 30%. The first row shows the comparison for low speeds. This zoomed view
shows, that the error of the approximation is very small. The error curves lie almost on
top of each other and it makes no difference if the parameters are disturbed or not. The
second row shows the results at high speeds. The overall error of the MPC decreases for
both cases. However, the difference between the MPC and the approximation increases.
The reason for this is, that the voltage constraint is active in this region. This makes
the solution of the optimization problem more complex and also the approximation via
the Neural Network gets more complex, since this introduces an extra nonlinear behavior
into the system. Nevertheless, the resulting error between the approaches remains still
small compared to the error of the error between the MPC and the desired setpoints. The
voltage in the fourth plot shows, that for this operating range the system boundaries are
met. The maximum stationary voltage is exceeded for this fast transient, since additional
voltage helps in this dynamic scenarios to build the flux faster up. Anyhow, the voltage
boundary is still met for this operating range. The fluxes are also again very close to
each other with a small error between them. The non-smooth trajectory of the fluxes is
explained by the voltage trajectory- since it is very difficult for a neural net to incorporate
boundaries in a smooth way, the voltage is less smooth than for the MPC and this is
directly also visible in the flux. On the overall torque approximation accuracy this effect
plays however a minor role.
Figure 4.11 shows the behaviour on two additional transient signals at a speed of _ω_ =
0 _._ 85 _ωN_ without any parameter deviations. Figure 4.11a shows the response on a very
fast (almost steplike) ramp from a positive torque setpoint to a negative torque setpoint.
The resulting torque profile shows some oscillations in the region around 0Nm, where the
MPC has its biggest problems. However, for this torque ramp, the approximation can
follow the behavior of the MPC very well with only little difference in the rotor direct
flux. Figure 4.11b shows on the other hand a fast sinusoidal signal around 0Nm. Here
the approximation around 0Nm shows bigger deviations from the MPC and the setpoint.
_<u>4</u>_ _<u>MPC</u>_ _<u>Approximation</u>_ _<u>for</u>_ _<u>IM</u>_ _<u>4.7</u>_ _<u>Simulation</u>_ _<u>results</u>_ _<u>56</u>_
1
0 _._ 5
0
_−_ 0 _._ 5
_−_ 1
0 _._ 10
0 _._ 00
_−_ 0 _._ 10
0 _._ 01
0 _._ 00
_−_ 0 _._ 01
1
0 _._ 5
0
1
0 _._ 5
0
1
0 _._ 8
0 _._ 6
0 _._ 4
0 _._ 2
_τ_ <sup>d</sup>
_~~τ~~_ <sup>~~mpc~~</sup>
_<u>τ</u>_ <sup>app</sup>
_<u>τ</u>_ <sup>mpc</sup> _<u>−</u>_ _<u>τ</u>_ <sup>d</sup>
_τ_ <sup>app</sup> _−_ _τ_ <sup>d</sup>
_<u>τ</u>_ <sup>app</sup> _<u>−</u>_ _<u>τ</u>_ <sup>mpc</sup>
_~~i~~_ <sup>~~s~~</sup>
max
_i_ <sup>mpc</sup> max
max
_<u>||</u>_ <u>i</u> <sup>mpc</sup> <u>IM</u>
_<u>||</u>_ <u>i</u> <sup>mpc</sup> <u>IM</u> <sup>_<u>||</u>_</sup>
_||_ i <sup>~~app~~</sup> IM <sup>_||_</sup>
i <sup>~~app~~</sup> IM <sup>_||_</sup>
_~~u~~_ <sup>~~s~~</sup>
max
_u_ <sup>mpc</sup> max
max
_<u>||</u>_ <u>u</u> <u>IM</u> <sup>mpc</sup>
_<u>||</u>_ <u>u</u> <u>IM</u> <sup>mpc</sup> <sup>_<u>||</u>_</sup>
_||_ u IM <sup>~~app~~</sup> <sup>_||_</sup>
IM <sup>~~app~~</sup> <sup>_||_</sup>
<u>Ψ</u> <sup>mpc</sup> <u>rd</u>
Ψ <sup><u>app</u></sup> <u>rd</u>
0
0 2 4 6 8 10 12 14 16 18 20 22 24 26
time in s
Figure 4.9: Transient simulations at _ω_ = 0 _._ 15 _ω_ N without parameter deviations for the IM.
_<u>4</u>_ _<u>MPC</u>_ _<u>Approximation</u>_ _<u>for</u>_ _<u>IM</u>_ _<u>4.7</u>_ _<u>Simulation</u>_ _<u>results</u>_ _<u>57</u>_
0 _._ 65
0 _._ 55
0 _._ 45
0 _._ 35
0 _._ 04
0 _._ 00
_−_ 0 _._ 04
0 _._ 65
0 _._ 55
0 _._ 45
0 _._ 35
0 _._ 32
0 _._ 29
0 _._ 26
0 _._ 23
_<u>τ</u>_ <sup>~~d~~</sup>
_<u>τ</u>_ <sup><u>mpc</u></sup>
_<u>τ</u>_ <sup>app</sup>
_~~τ~~_ <sup><u>mpc</u></sup> _~~−~~_ _~~τ~~_ <sup><u>d</u></sup>
_~~τ~~_ <sup><u>app</u></sup> _~~−~~_ _~~τ~~_ <sup><u>d</u></sup>
_<u>τ</u>_ <sup>~~d~~</sup>
_<u>τ</u>_ <sup><u>mpc</u></sup>
_<u>τ</u>_ <sup>app</sup>
_~~τ~~_ <sup>~~mpc~~</sup> _~~−~~_ _~~τ~~_ <sup>~~d~~</sup>
_~~τ~~_ <sup><u>app</u></sup> _~~−~~_ _~~τ~~_ <sup><u>d</u></sup>
_<u>||</u>_ <u>i</u> <sup>~~mpc~~</sup> <u>IM</u>
_<u>||</u>_ <u>i</u> <sup>~~mpc~~</sup> <u>IM</u> <sup>_<u>||</u>_</sup>
_<u>||</u>_ <u>i</u> <sup>~~app~~</sup> ~~IM~~ <sup>_<u>||</u>_</sup>
_<u>||</u>_ <u>i</u> <sup>~~mpc~~</sup> <u>IM</u>
<u>i</u> <sup>~~app~~</sup> ~~IM~~ <sup>_<u>||</u>_</sup>
_<u>||</u>_ <u>i</u> <sup>~~mpc~~</sup> <u>IM</u> <sup>_<u>||</u>_</sup>
_<u>||</u>_ <u>i</u> <sup>~~app~~</sup> ~~IM~~ <sup>_<u>||</u>_</sup>
<u>i</u> <sup>~~app~~</sup> ~~IM~~ <sup>_<u>||</u>_</sup>
_~~||~~_ ~~u~~ <u>IM</u> <sup><u>mpc</u></sup>
_~~||~~_ ~~u~~ <u>IM</u> <sup><u>mpc</u></sup> <sup>_~~||~~_</sup>
_<u>||</u>_ <u>u</u> ~~IM~~ <sup>~~app~~</sup> <sup>_<u>||</u>_</sup>
_~~||~~_ ~~u~~ <u>IM</u> <sup><u>mpc</u></sup>
~~IM~~ <sup>~~app~~</sup> <sup>_<u>||</u>_</sup>
_~~||~~_ ~~u~~ <u>IM</u> <sup><u>mpc</u></sup> <sup>_~~||~~_</sup>
_<u>||</u>_ <u>u</u> ~~IM~~ <sup>~~app~~</sup> <sup>_<u>||</u>_</sup>
~~IM~~ <sup>~~app~~</sup> <sup>_<u>||</u>_</sup>
~~Ψ~~ <sup><u>mpc</u></sup> <u>rd</u>
~~Ψ~~ <sup><u>app</u></sup> <u>rd</u>
~~Ψ~~ <sup><u>mpc</u></sup> <u>rd</u>
~~Ψ~~ <sup><u>app</u></sup> <u>rd</u>
0 _._ 8
0 _._ 75 ~~Ψ~~
0 _._ 7
5.95 5.98 6.01 6.04 6.07
5.95 5.98 6.01 6.04 6.07
time in s
<u>rd</u>
time in s
0 _._ 25
0 _._ 2
0 _._ 15
0 _._ 02
0 _._ 00
_−_ 0 _._ 02
0 _._ 4
0 _._ 3
0 _._ 2
0 _._ 92
0 _._ 91
0 _._ 9
0 _._ 89
(a) _ω_ = 0 _._ 15 _ω_ N, nominal. (b) _ω_ = 0 _._ 15 _ω_ N, _R_ <sup>˜</sup> r = 1 _._ 3 _R_ r.
_~~τ~~_ <sup><u>d</u></sup> _~~τ~~_ <sup><u>d</u></sup>
_~~τ~~_ <sup><u>mpc</u></sup> _~~τ~~_ <sup><u>mpc</u></sup>
_~~τ~~_ <sup>~~app~~</sup> _~~τ~~_ <sup>~~app~~</sup>
IM <sup><u>app</u></sup> <sup>_~~||~~_</sup>
<u>Ψ</u> <sup>mpc</sup> ~~rd~~
<u>Ψ</u> <sup>app</sup> <u>rd</u>
_~~τ~~_ <sup><u>mpc</u></sup> _~~−~~_ _~~τ~~_ <sup><u>d</u></sup>
_~~τ~~_ <sup><u>app</u></sup> _~~−~~_ _~~τ~~_ <sup><u>d</u></sup>
_~~τ~~_ <sup><u>mpc</u></sup> _~~−~~_ _~~τ~~_ <sup><u>d</u></sup>
_~~τ~~_ <sup><u>app</u></sup> _~~−~~_ _~~τ~~_ <sup><u>d</u></sup>
_~~||~~_ ~~i~~ <sup><u>mpc</u></sup> IM
_~~||~~_ ~~i~~ <sup><u>mpc</u></sup> IM <sup>_~~||~~_</sup>
_~~||~~_ ~~i~~ <sup><u>app</u></sup> IM <sup>_~~||~~_</sup>
_~~||~~_ ~~i~~ <sup><u>mpc</u></sup> IM
~~i~~ <sup><u>app</u></sup> IM <sup>_~~||~~_</sup>
_~~||~~_ ~~i~~ <sup><u>mpc</u></sup> IM <sup>_~~||~~_</sup>
_~~||~~_ ~~i~~ <sup><u>app</u></sup> IM <sup>_~~||~~_</sup>
~~i~~ <sup><u>app</u></sup> IM <sup>_~~||~~_</sup>
_~~u~~_ <sup><u>s</u></sup>
~~max~~
_<u>||</u>_ <u>u</u> ~~IM~~ <sup>~~mpc~~</sup>
_~~u~~_ <sup><u>s</u></sup>
_<u>||</u>_ <u>u</u> ~~IM~~ <sup>~~mpc~~</sup> <sup>_<u>||</u>_</sup>
_~~||~~_ ~~u~~ IM <sup><u>app</u></sup> <sup>_~~||~~_</sup>
~~max~~
_<u>||</u>_ <u>u</u> ~~IM~~ <sup>~~mpc~~</sup>
_<u>||</u>_ <u>u</u> ~~IM~~ <sup>~~mpc~~</sup> <sup>_<u>||</u>_</sup>
_~~||~~_ ~~u~~ IM <sup><u>app</u></sup> <sup>_~~||~~_</sup>
IM <sup><u>app</u></sup> <sup>_~~||~~_</sup>
<u>Ψ</u> <sup>mpc</sup> ~~rd~~
<u>Ψ</u> <sup>app</sup> <u>rd</u>
<u>rd</u>
0 _._ 48
<u>Ψ</u>
0 _._ 47
<u>Ψ</u>
0 _._ 46
0 _._ 45
5 _._ 95 5 _._ 98 6 _._ 01 6 _._ 04 6 _._ 07
5 _._ 95 5 _._ 98 6 _._ 01 6 _._ 04 6 _._ 07
time in s
<u>rd</u>
time in s
(c) _ω_ = 0 _._ 85 _ω_ N, nominal. (d) _ω_ = 0 _._ 85 _ω_ N, _R_ <sup>˜</sup> r = 1 _._ 3 _R_ r.
Figure 4.10: Zoomed detail of sine signal for different operating ranges of the MPC for
the IM.
_<u>4</u>_ _<u>MPC</u>_ _<u>Approximation</u>_ _<u>for</u>_ _<u>IM</u>_ _<u>4.7</u>_ _<u>Simulation</u>_ _<u>results</u>_ _<u>58</u>_
0 _._ 2
0 _._ 1
0
_−_ 0 _._ 1
_−_ 0 _._ 2
0 _._ 12
0 _._ 08
0 _._ 04
0 _._ 00
0 _._ 5
0 _._ 4
0 _._ 3
0 _._ 2
0 _._ 1
0 _._ 9
0 _._ 75
0 _._ 6
0 _._ 45
0 _._ 49
0 _._ 46
0 _._ 43
0 _._ 4
Ψ <sup>mpc</sup> <u>rd</u>
Ψ <sup>~~app~~</sup> rd
_τ_ <sup>d</sup>
_<u>τ</u>_ <sup>~~mpc~~</sup>
0.06
0.03
0
-0.03
_~~τ~~_ <sup><u>app</u></sup> -0.06
0.02
0.01
0
_τ_ <sup>mpc</sup> _−_ _τ_ <sup>d</sup> -0.01
_~~τ~~_ <sup><u>app</u></sup> _~~−~~_ _~~τ~~_ <sup><u>d</u></sup> -0.02
0.9
_i_ <sup>~~s~~</sup>
max
_~~i~~_ <sup>~~mpc~~</sup> max
max
_~~||~~_ ~~i~~ <sup><u>mpc</u></sup> IM
_~~||~~_ ~~i~~ <sup><u>mpc</u></sup> IM <sup>_~~||~~_</sup>
_~~||~~_ ~~i~~ <sup><u>app</u></sup> <u>IM</u> <sup>_~~||~~_</sup>
0.7
0.5
0.3
~~i~~ <sup><u>app</u></sup> <u>IM</u> <sup>_~~||~~_</sup> 0.1
_<u>u</u>_ <sup>~~s~~</sup>
max
_<u>u</u>_ <sup>mpc</sup> ~~max~~
~~max~~
_||_ u <u>IM</u> <sup>mpc</sup>
_||_ u <u>IM</u> <sup>mpc</sup> <sup>_||_</sup>
_<u>||</u>_ <u>u</u> IM <sup>~~app~~</sup> <sup>_<u>||</u>_</sup>
0.9
0.7
0.5
0.3
IM <sup>~~app~~</sup> <sup>_<u>||</u>_</sup> 0.1
0.5
0.4
0.3
0.2
0.1
12 _._ 55 12 _._ 58 12 _._ 61 12 _._ 64
7 _._ 69 7 _._ 71 7 _._ 73 7 _._ 75 7 _._ 77
time in s time in s
(a) Step response at _ω_ = 0 _._ 85 _ω_ N. (b) Sine around 0Nm at _ω_ = 0 _._ 85 _ω_ N.
Figure 4.11: Zoomed detail of fast ramp and sine signal around 0Nm without parameter
deviations for the IM.
_<u>4</u>_ _<u>MPC</u>_ _<u>Approximation</u>_ _<u>for</u>_ _<u>IM</u>_ _<u>4.7</u>_ _<u>Simulation</u>_ _<u>results</u>_ _<u>59</u>_
Since this behavior was seen in an amplified form for the original dataset, the dataset was
changed as described in Section 4.5. This improved the torque error between the MPC
and its approximation around 0Nm by a factor of 5. It is important to mention, that this
behavior is not seen in the direct rotor flux, but it seems to come from the approximation
of the stator quadrature flux. However, after adding the points and the retraining, the
performance for this sinusoidal signal is acceptable also in this region. It is important to
mention, that the MPC and its approximation meet the current and the voltage boundary
in both of these transient scenarios. For the highly dynamic change it can furthermore be
observed, that both approaches utilize the transient voltage constraint _u_ <sup>mpc</sup> max <sup>in</sup> <sup>order</sup> <sup>to</sup>
observed, that both approaches utilize the transient voltage constraint _u_ <sup>mpc</sup> max <sup>in</sup> <sup>order</sup> <sup>to</sup>
achieve the highest possible dynamics before settling on the stationary voltage constraint
_u_ <sup>s</sup> max <sup>.</sup>
_u_ <sup>s</sup> max <sup>.</sup>
Finally, the prediction performance of the approximation on this dynamic trajectory for a
low speed of 0.15 _ω_ N is quantified by the means of the root mean squared error, the mean
absolute error and the maximum absolute error between the MPC, its prediction and the
setpoint values. These results are summarized in Table 4.2. All the values in this table
were scaled by the nominal torque value _τ_ N. The table shows, that the error between the
MPC and its approximation is by a factor of _≈_ 10 smaller than the approximation error
of the MPC to the setpoint. The performance of the MPC and its approximation is herein
similar.
error RMSE MAE Max
_<u>τ</u>_ <sup>mpc</sup> _<u>−</u>_ _<u>τ</u>_ <sup>d</sup>
_τ_ N
_<u>τ</u>_ <sup>app</sup> _<u>−</u>_ _<u>τ</u>_ <sup>d</sup>
_τ_ N
_<u>τ</u>_ <sup>mpc</sup> _<u>−</u>_ _<u>τ</u>_ <sup>app</sup>
_τ_ N
0.0107 0.0033 0.1626
0.0110 0.0039 0.1690
0.0014 0.0010 0.0141
Table 4.2: Error measures for the approximation of the MPC.
4.7.3 Runtime evaluation
A runtime evaluation was performed on a dSPACE Microlab Box real-time platform. For
this runtime evaluation, different neural net structures are compared with each other with
respect to the computation time. The compared nets have the following structures:
- Net 1: 4 hidden layers, with 300, 150, 75, 50 nodes respectively
- Net 2: 4 hidden layers, with 50, 40, 30, 20 nodes respectively
- Net 3: 3 hidden layers, with 70, 50, 30 nodes respectively
The results of this measurement are summarized in Table 4.3. The runtime for the MPC
in this table is given as a range, since the time duration of the optimal setpoint calculation
_<u>4</u>_ _<u>MPC</u>_ _<u>Approximation</u>_ _<u>for</u>_ _<u>IM</u>_ _<u>4.7</u>_ _<u>Simulation</u>_ _<u>results</u>_ _<u>60</u>_
MPC Net 1 Net 2 Net 3
Runtime in _µ_ s 240-360 60 8 7
Table 4.3: Runtime evaluation of the developed approximation approach.
is dependent on the setpoint. The cascaded calculation of the optimal setpoint values
yields thus for points in the voltage boundary the highest values, while the lowest runtime
is achieved for the unconstrained case. This behavior is more thoroughly analyzed in
[18]. However, this behavior is not seen for the approximation of the MPC, since for the
approximation the neural network is evaluated for each setpoint in the same way.
The shown nets were all trained on the dataset from Section 4.5. Net 1 is the neural net
structure before the ablation study was performed. Net 2 and Net 3 are two minimal
examples of neural nets, which achieved an acceptable approximation accuracy. For the
presented evaluations, however, a slightly more complex net than Net 2 was used. This
means, that the runtime of this neural net should be in the range of 10 to 15 _µ_ s. This
means, that by the approximation of the MPC the runtime could be decreased on this
hardware by a factor of approximately 20 (depending on the setpoint). However, if a
more specific hardware is used, which is able to perform matrix multiplications in a fast
manner as for example a GPU or a TPU, this factor could be increased drastically, since
the necessary operations are not complex and no optimization problem has to be solved
online. Therefore, this approach shows high potential to make MPCs real time capable in
systems with high sampling frequencies.
# 5 Discussion and further outlook
In this work, three different MPCs for the PMSM and one complex MPC for the IM
are approximated via data driven methods. The overall approach is introduced and
explained in detail, from the data generation up to the evaluation in simulation. The
reduction of simulation time by choosing a suitable simulation dataset is presented, as
well as the used data driven approach using a feedforward neural net. It could be shown,
that the approximation accuracy is high over the whole operating range, even in the
case of parameter deviations. The MPCs performance is evaluated in simulations on
steady-state and dynamic test cycles and performs overall very similar to the true MPC.
Furthermore, the runtime evaluation shows a big potential to save computational time on
a target hardware and make the approximation thus real-time capable. This would be a
big breakthrough in the field of MPCs, since the real-time capability of different MPCs is
often a hard task to achieve, especially if the sampling frequencies are as high as in the
here discussed case.
Even if the shown approximation accuracy is very good over large areas, there are still
some open topics to be further analyzed. The approximation of the MPC for the IM in
the region of 0Nm should be investigated in more detail in order to ensure a smooth and
safe operation of the electrical machine. Furthermore, simulations could be performed on
a finer grid with a higher resolution in order to get an even better approximation accuracy.
For the IM, the setpoint calculation and the MPC approximation could be split up in two
different neural networks and trained separately. By doing so, the setpoint calculation
method could be exchanged without the need of a retraining of the MPC approximation.
Furthermore, as the runtime evaluation shows, the approximation of the MPC is fast
enough to ensure real-time capability for the sampling time of the state space controller.
Therefore it could be examined, how the performance of the overall control concept would
change by omitting the state space controller and using directly the optimized voltage
from the MPC output. Another topic that could be investigated, is the analysis of a
different data driven approach. This work focuses only on the usage of neural networks
for the approximation. However, a regression technique as for example XGBoost or a
Random Forest Regressor might work in a similar fashion with even lower computation
times or higher accuracies. Furthermore, the operating range of the MPC for the PMSM
could be extended to the generator region and there the behavior could be examined.
Finally, the developed concept could be used for measurements on the testbench and the
performance could be evaluated against the MPC.
Overall, this work creates the basis for many other interesting projects. It shows that the
field of control and the machine learning field can go hand in hand to achieve the highest
performances after which the industry strives. The approximation concepts that are here
presented, are only shown for the usecase of flux control. However, the developed data
driven approach can be easily used on another dataset for a completely different task, as
_61_
_<u>5</u>_ _<u>Discussion</u>_ _<u>and</u>_ _<u>further</u>_ _<u>outlook</u>_ _<u>62</u>_
long as the input-output behavior is only stationary and not dependent on other time
series data.
# Bibliography
[1] Y. Van Fan, S. Perry, J. J. Klemeš, and C. T. Lee, “A review on air emissions
assessment: Transportation,” _Journal_ _of_ _cleaner_ _production_, vol. 194, pp. 673–684,
2018. doi: `[10.1016/j.jclepro.2018.05.151](https://doi.org/10.1016/j.jclepro.2018.05.151)` .
[2] E. Agamloh, A. von Jouanne, and A. Yokochi, “An overview of electric machine
trends in modern electric vehicles,” _Machines_, vol. 8, no. 2, 2020. doi: `[10.3390/](https://doi.org/10.3390/machines8020020)`
`[machines8020020](https://doi.org/10.3390/machines8020020)` .
[3] C. Lai, G. Feng, K. Mukherjee, V. Loukanov, and N. C. Kar, “Torque ripple
modeling and minimization for interior pmsm considering magnetic saturation,”
_IEEE_ _Transactions_ _on_ _Power_ _Electronics_, vol. 33, no. 3, pp. 2417–2429, 2017. doi:
`[10.1109/TPEL.2017.2695440](https://doi.org/10.1109/TPEL.2017.2695440)` .
[4] T. Tuovinen, M. Hinkkanen, and J. Luomi, “Modeling of saturation due to main
and leakage flux interaction in induction machines,” _IEEE_ _Transactions_ _on_ _industry_
_applications_, vol. 46, no. 3, pp. 937–945, 2010. doi: `[10.1109/TIA.2010.2045210](https://doi.org/10.1109/TIA.2010.2045210)` .
[5] P. Mauborgne, S. Deniaud, E. Levrat, E. Bonjour, J.-P. Micaëlli, and D. Loise,
“Operational and system hazard analysis in a safe systems requirement engineering
process–application to automotive industry,” _Safety_ _science_, vol. 87, pp. 256–268,
2016. doi: `[10.1016/j.ssci.2016.04.011](https://doi.org/10.1016/j.ssci.2016.04.011)` .
[6] R. Marino, P. Tomei, and C. M. Verrelli, _Induction_ _motor_ _control_ _design_ . Heidelberg:
Springer Science & Business Media, 2010.
[7] D. Schröder and J. Böcker, _Elektrische_ _Antriebe-Regelung_ _von_ _Antriebssystemen_ .
Heidelberg: Springer, 2009.
[8] G. Buja and M. Kazmierkowski, “Direct torque control of pwm inverter-fed ac
motors - a survey,” _IEEE_ _Transactions_ _on_ _Industrial_ _Electronics_, vol. 51, no. 4,
pp. 744–757, 2004. doi: `[10.1109/TIE.2004.831717](https://doi.org/10.1109/TIE.2004.831717)` .
[9] L. Harnefors and H.-P. Nee, “Model-based current control of ac machines using
the internal model control method,” _IEEE_ _Transactions_ _on_ _Industry_ _Applications_,
vol. 34, no. 1, pp. 133–141, 1998. doi: `[10.1109/28.658735](https://doi.org/10.1109/28.658735)` .
[10] M. Merzoug and F. Naceri, “Comparison of field-oriented control and direct torque
control for permanent magnet synchronous motor (pmsm),” _International_ _Journal_
_of_ _Electrical_ _and_ _Computer_ _Engineering_, vol. 2, no. 9, pp. 1797–1802, 2008. doi:
`[10.36227/techrxiv.171332371.13141782/v1](https://doi.org/10.36227/techrxiv.171332371.13141782/v1)` .
[11] J. Rodriguez _et_ _al._, “Latest advances of model predictive control in electrical
drives—part ii: Applications and benchmarking with classical control methods,”
_IEEE_ _Transactions_ _on_ _Power_ _Electronics_, vol. 37, no. 5, pp. 5047–5061, 2021. doi:
`[10.1109/TPEL.2021.3121589](https://doi.org/10.1109/TPEL.2021.3121589)` .
_63_
_<u>Bibliography</u>_ _<u>64</u>_
[12] F. Wang, X. Mei, J. Rodriguez, and R. Kennel, “Model predictive control for
electrical drive systems-an overview,” _CES_ _Transactions_ _on_ _Electrical_ _Machines_ _and_
_Systems_, vol. 1, no. 3, pp. 219–230, 2017. doi: `[10.23919/TEMS.2017.8086100](https://doi.org/10.23919/TEMS.2017.8086100)` .
[13] M. Schenke, W. Kirchgässner, and O. Wallscheid, “Controller design for electrical
drives by deep reinforcement learning: A proof of concept,” _IEEE_ _Transactions_ _on_
_Industrial_ _Informatics_, vol. 16, no. 7, pp. 4650–4658, 2019. doi: `[10.1109/TII.2019.](https://doi.org/10.1109/TII.2019.2948387)`
`[2948387](https://doi.org/10.1109/TII.2019.2948387)` .
[14] L. Lüken, D. Brandner, and S. Lucia, “Sobolev training for data-efficient approximate
nonlinear mpc,” _IFAC-PapersOnLine_, vol. 56, no. 2, pp. 5765–5772, 2023. doi:
`[10.1016/j.ifacol.2023.10.545](https://doi.org/10.1016/j.ifacol.2023.10.545)` .
[15] W. M. Czarnecki, S. Osindero, M. Jaderberg, G. Swirszcz, and R. Pascanu, “Sobolev
training for neural networks,” _Advances_ _in_ _neural_ _information_ _processing_ _systems_,
vol. 30, 2017. doi: `[10.48550/arXiv.1706.04859](https://doi.org/10.48550/arXiv.1706.04859)` .
[16] S. Chen _et_ _al._, “Approximating explicit model predictive control using constrained
neural networks,” in _2018_ _Annual_ _American_ _control_ _conference_ _(ACC)_, IEEE, Milwaukee, 2018, pp. 1520–1527. doi: `[10.23919/ACC.2018.8431275](https://doi.org/10.23919/ACC.2018.8431275)` .
[17] M. Hertneck, J. Köhler, S. Trimpe, and F. Allgöwer, “Learning an approximate
model predictive controller with guarantees,” _IEEE_ _Control_ _Systems_ _Letters_, vol. 2,
no. 3, pp. 543–548, 2018. doi: `[10.1109/LCSYS.2018.2843682](https://doi.org/10.1109/LCSYS.2018.2843682)` .
[18] G. Janisch, W. Kemmetmüller, and A. Kugi, “A high-performance model predictive
torque control concept for induction machines for electric vehicle applications,”
_Control_ _Engineering_ _Practice_, vol. submitted, 2024.
[19] D. Schröder, _Elektrische_ _Antriebe:_ _Grundlagen_ . Heidelberg: Springer, 1994.
[20] G. Janisch, A. Kugi, and W. Kemmetmüller, “Model calibration strategy for energyefficient operation of induction machines,” _IFAC-PapersOnLine_, vol. 55, no. 20,
pp. 307–312, 2022. doi: `[10.1016/j.ifacol.2022.09.113](https://doi.org/10.1016/j.ifacol.2022.09.113)` .
[21] S. Fligl, J. Bauer, M. Vlcek, and J. Lettl, “Analysis of induction machine T and Γ
circuit coequality for use in electric drive controllers,” in _2012_ _13th_ _International_
_Conference_ _on_ _Optimization_ _of_ _Electrical_ _and_ _Electronic_ _Equipment_ _(OPTIM)_, 2012,
pp. 659–664. doi: `[10.1109/OPTIM.2012.6231923](https://doi.org/10.1109/OPTIM.2012.6231923)` .
[22] R. H. Park, “Two-reaction theory of synchronous machines generalized method
of analysis-part i,” _Transactions_ _of_ _the_ _American_ _Institute_ _of_ _Electrical_ _Engineers_,
vol. 48, no. 3, pp. 716–727, 1929. doi: `[10.1109/T-AIEE.1929.5055275](https://doi.org/10.1109/T-AIEE.1929.5055275)` .
[23] C. E. García, D. M. Prett, and M. Morari, “Model predictive control: Theory and
practice—a survey,” _Automatica_, vol. 25, no. 3, pp. 335–348, 1989, issn: 0005-1098.
doi: `[10.1016/0005-1098(89)90002-2](https://doi.org/10.1016/0005-1098%0x2889%0x2990002-2)` .
[24] R. Bellman, “Dynamic programming,” _Science_, vol. 153, no. 3731, pp. 34–37, 1966.
doi: `[10.1126/science.153.3731.34](https://doi.org/10.1126/science.153.3731.34)` .
[25] A. Sen and M. Srivastava, _Regression_ _analysis:_ _theory,_ _methods,_ _and_ _applications_ .
Heidelberg: Springer Science & Business Media, 2012.
_<u>Bibliography</u>_ _<u>65</u>_
[26] R. Dastres and M. Soori, “Artificial neural network systems,” _International_ _Journal_
_of_ _Imaging_ _and_ _Robotics_ _(IJIR)_, vol. 21, no. 2, pp. 13–25, 2021.
[27] A. F. Agarap, “Deep learning using rectified linear units (relu),” _CoRR_, vol.
abs/1803.08375, 2018. doi: `[10.48550/arXiv.1803.08375](https://doi.org/10.48550/arXiv.1803.08375)` .
[28] S. Hochreiter, “The vanishing gradient problem during learning recurrent neural nets and problem solutions,” _International_ _Journal_ _of_ _Uncertainty,_ _Fuzziness_
_and_ _Knowledge-Based_ _Systems_, vol. 6, no. 02, pp. 107–116, 1998. doi: `[10.1142/](https://doi.org/10.1142/S0218488598000094)`
`[S0218488598000094](https://doi.org/10.1142/S0218488598000094)` .
[29] R. Meyes, M. Lu, C. W. de Puiseau, and T. Meisen, “Ablation studies in artificial
neural networks,” _CoRR_, vol. abs/1901.08644, 2019. doi: `[10.48550/arXiv.1901.](https://doi.org/10.48550/arXiv.1901.08644)`
`[08644](https://doi.org/10.48550/arXiv.1901.08644)` .
[30] R. Llugsi, S. El Yacoubi, A. Fontaine, and P. Lupera, “Comparison between adam,
adamax and adam w optimizers to implement a weather forecast based on neural
networks for the andean city of quito,” in _2021_ _IEEE_ _Fifth_ _Ecuador_ _Technical_
_Chapters_ _Meeting_ _(ETCM)_, IEEE, 2021, pp. 1–6. doi: `[10.1109/ETCM53643.2021.](https://doi.org/10.1109/ETCM53643.2021.9590681)`
`[9590681](https://doi.org/10.1109/ETCM53643.2021.9590681)` .
[31] S.-I. Amari, “Backpropagation and stochastic gradient descent method,” _Neurocom-_
_puting_, vol. 5, no. 4, pp. 185–196, 1993, issn: 0925-2312. doi: `[https://doi.org/](https://doi.org/https://doi.org/10.1016/0925-2312%0x2893%0x2990006-O)`
`[10.1016/0925-2312(93)90006-O](https://doi.org/https://doi.org/10.1016/0925-2312%0x2893%0x2990006-O)` .
[32] M. B. Wilk and R. Gnanadesikan, “Probability plotting methods for the analysis
for the analysis of data,” _Biometrika_, vol. 55, no. 1, pp. 1–17, 1968. doi: `[10.2307/](https://doi.org/10.2307/2334448)`
`[2334448](https://doi.org/10.2307/2334448)` .
[33] L. Grüne, J. Pannek, L. Grüne, and J. Pannek, _Nonlinear_ _model_ _predictive_ _control_ .
Heidelberg: Springer, 2017.
[34] M. Gerdts, _Optimal_ _control_ _of_ _ODEs_ _and_ _DAEs_ . Berlin: Walter de Gruyter GmbH
& Co KG, 2023.
# Eidesstattliche Erklärung
Hiermit erkläre ich, dass die vorliegende Arbeit gemäß dem Code of Conduct - Regeln
zur Sicherung guter wissenschaftlicher Praxis (in der aktuellen Fassung des jeweiligen
Mitteilungsblattes der TU Wien), insbesondere ohne unzulässige Hilfe Dritter und ohne
Benutzung anderer als der angegebenen Hilfsmittel, angefertigt wurde. Die aus anderen
Quellen direkt oder indirekt übernommenen Daten und Konzepte sind unter Angabe der
Quelle gekennzeichnet. Die Arbeit wurde bisher weder im In- noch im Ausland in gleicher
oder in ähnlicher Form in anderen Prüfungsverfahren vorgelegt.
Wien, im Mai 2024
Felix Heidegger
섹션 본문
섹션 본문이 없습니다.
참고문헌
참고문헌 정보가 없습니다.