• Non ci sono risultati.

Modelling and co-simulation of advanced control techniques for electric engines with real-time constraints

N/A
N/A
Protected

Academic year: 2021

Condividi "Modelling and co-simulation of advanced control techniques for electric engines with real-time constraints"

Copied!
112
0
0

Testo completo

(1)

SCUOLA DI INGEGNERIA

DIPARTIMENTO DI INGEGNERIA DELL’INFORMAZIONE Corso di Laurea Magistrale in Ingegneria Robotica e dell’Automazione

Modelling and Co-Simulation of

Advanced Control Techniques for Electric

Engines with Real-Time Constraints

Candidato:

Matteo Genovese

Matricola 492916

Relatori:

Prof. Giorgio C. BUTTAZZO Prof. Marco DI NATALE Ing. Paolo PAZZAGLIA

Controrelatore:

Prof. Alberto LANDI

(2)

The increasing complexity of embedded software in modern cars, the transi-tion to multi-core platforms and the introductransi-tion of safety-critical functransi-tions in automotive systems, are posing new problems to both control and software engineers. Developers need high levels of predictability, testability, and ulti-mately determinism in the execution of their code, while control engineers must be aware of possible delays and scheduling issues due to real-time events or sporadic overload conditions on undersized CPUs. Thus, the development of the control part of such applications cannot be separated from the timing analysis of the scheduling effects introduced by the computing platform in the execution of the code. Although classical control design methods and off-line studies can help, they cannot be used to describe complex interactions between control and software timing in the design control phase.

In order to fill this gap, this thesis presents a co-simulation environment aimed to take into account, simultaneously, the scheduling part, the control part and the physical components of an Internal Permanent Magnet Syn-chronous Motor (IPMSM) for an Electric Vehicle (EV). The co-simulation tool, entirely based on Simulink, comprehends a behavioural model of a CPU in order to manage, with a high timing precision, the entire task control chain for an IPMSM. In addition, also mechanical and electrical components of the system (e.g., IPMSM and the EV itself) have been included in the model. In this context, we address the control problem of an IPMSM for EVs, carry out a deep analysis of field weakening technique for IPMSM and present the development of an enhanced control scheme in order to improve the perfor-mance of the system.

The model allows also a designer to test different intra-core communi-cation and control paradigms, and see how they interact with the entire system. More in details, in this thesis we tested how the Logical Execution Time (LET) paradigm, which is used to increase predictability in multicores by trading jitter for latency, impacts the performance of control. On the other hand, we also tested the system performance when using the Periodic Event Triggered Control (PETC) paradigm, which can selectively “switch off” the control execution when its is not needed, in order to save computational and communication resources.

Finally, an extensive set of experiments for a case study built with real-istic data given by BOSCH is presented, in order to show the interactions presented in our work and prove the effectiveness of this approach. The per-formance of the system has been tested also in CPU overload conditions, looking for the sequence of scheduling delays that leads to the worst-case performance.

(3)

Sommario

La crescente complessità del software embedded presente nelle auto moderne, il passaggio a piattaforme multi-core e l’introduzione di funzioni safety-critical nei sistemi automotive, stanno ponendo gli ingegneri del controllo e gli ingegneri del software di fronte a nuovi problemi. Gli sviluppatori hanno bisogno di alti livelli di predicibilità, testabilità e determinismo nell’esecuzione del loro codice, mentre gli ingegneri del controllo devono essere consapevoli dei possibili ritardi dovuti allo scheduling di processi real-time o a sporadiche condizioni di sovraccarico di CPU sottodimensionate. Pertanto, lo sviluppo della parte di controllo di tali applicazioni non può essere separato dall’analisi delle tempistiche e degli effetti dello scheduling introdotti dalla piattaforma informatica nell’esecuzione del codice. Sebbene i metodi classici di progettazione del controllo possano essere di aiuto, essi non possono essere utilizzati, durante la fase di progettazione, per descrivere complesse interazioni tra logica di controllo e temporizzazione del software.

Per colmare questa lacuna, la presente tesi propone un ambiente di co-simulazione che mira a prendere in considerazione, simultaneamente, la parte di scheduling, la logica di controllo e le componenti fisiche di un motore sincrono a magneti per-manenti interni (IPMSM) per un veicolo elettrico (EV). Il tool di co-simulazione, interamente realizzato in Simulink, comprende un modello comportamentale di una CPU per gestire, con elevata precisione temporale, l’intera catena dei task di con-trollo di un IPMSM. All’interno del suddetto modello sono state incluse anche le componenti meccaniche ed elettriche del sistema. In questo contesto vengono af-frontati: il problema del controllo di un IPMSM per EV, un’analisi approfondita della tecnica di field weakening per IPMSM e lo sviluppo di uno schema di controllo avanzato al fine di migliorare le prestazioni del sistema.

Il modello realizzato permette al progettista di testare diversi paradigmi di co-municazione intra-core tra i vari task e paradigmi di controllo, al fine di studiare la loro interazione con l’intero sistema. Più nel dettaglio, in questa tesi è stato esami-nato l’ impatto che il paradigma Logical Execution Time (LET) ha sulle prestazione del controllo. Esso viene, in genere, utilizzato per aumentare la predicibilità in am-bienti multicore, introducendo ritardi di scheduling maggiori ma azzerando l’output jitter del task. Sono state, inoltre, esaminate le prestazioni del sistema con il para-digma Periodic Event Triggered Control (PETC). Quest’ultimo viene utilizzato per risparmiare risorse computazionali e di comunicazione, permettendo selettivamen-te l’esecuzione del task di controllo soltanto quando questa risulti effettivamenselettivamen-te necessaria.

Infine, viene presentato un ampio set di esperimenti per un caso di studio realiz-zato con dati realistici forniti da BOSCH, al fine di mostrare le interazioni presentate nel nostro lavoro e dimostrare l’efficacia di questo approccio. Le prestazioni del si-stema sono state testate anche in condizioni di sovraccarico della CPU, esaminando la sequenza di ritardi di scheduling peggiore dal punto di vista delle prestazioni del sistema.

(4)

1 Introduction 8

1.1 Motivations and interests . . . 9

1.2 Co-simulation model and tests . . . 10

1.3 Thesis structure. . . 12

1.4 Acknowledgements . . . 13

2 Permanent Magnet Synchronous Motor 14 2.1 PMSM classification . . . 15

2.2 PMSMs versus induction machines . . . 16

2.3 Mathematical model of IPMSM . . . 17

3 Control of IPMSM 20 3.1 Field Oriented Control . . . 20

3.2 Maximum torque per ampere control . . . 22

3.3 Linearized system plant . . . 23

3.4 PI current control . . . 24

3.4.1 Tuning of the PI current controllers . . . 25

3.4.2 State-space representation . . . 27

3.4.3 Anti-windup structure for the PI controllers . . . 28

3.4.4 Discrete PI controller . . . 28

3.5 Parameters mismatch and delays . . . 29

3.5.1 Robust PI tuning with IMC approach . . . 30

3.6 Generation of PWM . . . 33

3.7 Voltage saturation strategy . . . 36

3.8 Field Weakening . . . 37

3.8.1 Maximum Torque Per Voltage (MTPV) . . . 38

3.8.2 Field Weakening trajectories . . . 38

3.8.3 MTPA and MTPV derivation . . . 39

3.8.4 The state of the art field weakening algorithm. . . 41

3.9 The proposed field weakening algorithm . . . 42

4 Vehicle model 45 4.1 Modelling of an electric vehicle powertrain . . . 45

4.1.1 Powertrain’s equations . . . 46

4.2 Vehicle dynamics modelling . . . 47

4.2.1 Velocity controller . . . 49

(5)

5 Task model 52

5.1 Task and Scheduling: an overview. . . 53

5.1.1 Scheduling policy . . . 53

5.1.2 Timing constraints . . . 53

5.1.3 Scheduling algorithm and schedulability . . . 55

5.2 Logical Execution Time (LET) . . . 56

5.3 Dealing with deadline misses: the weakly hard model . . . 57

5.3.1 A brief outline of the m-K model . . . 58

5.4 System model for weakly hard constraints . . . 58

5.4.1 Update freshness . . . 59

5.5 Periodic Event Triggered Control (PETC) . . . 61

6 Co-simulation model 64 6.1 Simulating the CPU behaviour . . . 64

6.1.1 LET implementation . . . 66

6.1.2 PETC implementation . . . 66

6.1.3 Imposing deadline misses . . . 67

6.2 Task set . . . 68

6.2.1 Task structure . . . 68

6.2.2 List of tasks. . . 71

6.3 Battery pack . . . 72

6.4 Electric motor and converter . . . 73

6.5 Vehicle model implementation. . . 74

7 Experiments 76 7.1 Model parameters . . . 76

7.2 Performance analysis with m-K model . . . 78

7.2.1 State trajectories . . . 79

7.2.2 Assigning performance values to H/M sequences . . . 80

7.3 Step response . . . 80

7.3.1 Ideal case: no deadline misses . . . 81

7.3.2 Control performance variations with PETC . . . 84

7.3.3 Considering overload conditions. . . 88

7.3.4 Mitigating overload conditions with PETC . . . 90

7.3.5 More complex tests with voltage actuation non-linearities . . 93

7.4 Speed profiles . . . 95

7.4.1 Velocity step . . . 95

7.4.2 Drive cycles . . . 98

8 Conclusions 105 8.1 Future works . . . 107

(6)

1.1 An overview of the Simulink model . . . 11

2.1 Permanent magnet machines classification [9] . . . 15

2.2 Rotor structure of a surface PM machine (a) and interior PM ma-chine (b) [4] . . . 15

2.3 Vector representation of the abc to dq frame transformation [8] . . . 18

2.4 Torque as a function of rotor angle for IPM machine with fixed stator current [4] . . . 19

3.1 Block diagram of IPMSM controller with transformations [4] . . . . 21

3.2 Phasor diagram illustrating the dq control reference frame [8] . . . . 22

3.3 Vector representation of the minimum stator current vector at a given torque level for and IPMSM (here the direction of d-axis is considered negative) [8] . . . 23

3.4 Structure of the PI current controllers [8] . . . 24

3.5 Bode plot of d axis current open-loop with kid= 16.67 . . . 26

3.6 Step response of d axis current closed-loop with kid = 16.67 . . . 27

3.7 PI current regulator with anti-windup [8] . . . 28

3.8 Three-phase inverter [9] . . . 33

3.9 Voltage space vectors correspond to the eight switching states of the three-phase inverter [9] . . . 34

3.10 Representation of the commanded voltage vector from two adjacent voltage space vectors [9] . . . 34

3.11 Switching signals produced by SVM for the three legs of the three-phase inverter, assuming the command voltage vector in [0,π3] sector [9] . . . 35

3.12 Circle that limits the d-q voltage vector . . . 36

3.13 Working area made from the intersection of the circle and the ellipse [11]. . . 38

3.14 MTPA curve, current limit circle, MPTV curve, voltage limit ellipse and constant torque curve [10] . . . 39

3.15 Trajectories of operating points [10] . . . 40

3.16 FW control structure [8] . . . 42

3.17 FW action [8] . . . 42

3.18 Simulink implementation of the proposed field weakening algorithm. 44 4.1 One-motor based EV powertrains with no trasmission and fixed gear-box [1] . . . 46

(7)

4.2 Two-wheel vehicle model [1] . . . 48

4.3 Structure of a discrete PI controller with Balestrino integrator. . . . 50

5.1 Queue of ready tasks waiting for execution [13] . . . 53

5.2 Typical parameters of a real-time task [13]. . . 54

5.3 Behaviour pattern of a task under LET paradigm [5] . . . 56

5.4 Example of actuation behaviour. . . 59

5.5 State machines expressing the evolution of the update freshness pair (∆p,∆c) [15] . . . 60

5.6 Event-triggered control schematic [14] . . . 61

6.1 CPU model implemented in Simulink. . . 65

6.2 Task set interaction scheme, step response scenarios. For other tests involving the speed controller, this should be connected to the drive controller block.. . . 69

6.3 Inner structure of drive controller block . . . 70

6.4 Task organizational structure. Note that the check block performs some activities only when PETC is used, otherwise it is shortcutted. 71 6.5 (a): Pattern of execution and block activation with direct communi-cation paradigm. (b): Pattern of execution and block activation with LET paradigm . . . 71

6.6 Battery model implemented in Simulink . . . 73

6.7 Vehicle model implemented in Simulink . . . 75

7.1 Step response of the torque with T3 = 100µs, classic comunication paradigm and periodic control. . . 82

7.2 Step response of the torque with T3= 200µs, classic communication paradigm and periodic control. . . 82

7.3 Step response of the torque with T3 = 100µs, LET paradigm and periodic control . . . 83

7.4 Step response of the torque with T3 = 200µs, LET paradigm and periodic control . . . 84

7.5 % of activation of τ3in different scenarios for different values of σ. . 86

7.6 Step response variation of the torque in various scenarios with PETC and σ= 0.005 . . . 87

7.7 How the PETC is influenced by the control gains . . . 87

7.8 Step response of the torque with T3 = 100µs, LET paradigm and periodic control, with different patterns of deadline misses . . . 89

7.9 Step response of the torque with T3 = 200µs, LET paradigm and periodic control, with different patterns of deadline misses . . . 89

7.10 Step response of the torque with T3 = 100µs, LET paradigm and periodic control, with different patterns of deadline misses . . . 90

7.11 Step response of the torque with T3 = 200µs, LET paradigm and periodic control, with different patterns of deadline misses . . . 90

7.12 Percentage of activation of τ3, with T3= 100µs, LET paradigm and periodic control, with different patterns of deadline misses . . . 91

7.13 Number of deadline misses for low priority task for 0.5 seconds of simulation, with T3 = 100µs, LET paradigm and periodic control, with different patterns of deadline misses . . . 92

(8)

7.14 Percentage of activation of τ3, with T3= 100µs, LET paradigm and

PETC, with different patterns of deadline misses . . . 92

7.15 Step response of the torque with T3 = 100µs, LET paradigm and PETC, with different patterns of deadline misses . . . 93

7.16 Percentage of activation of τ3, with T3 = 100µs, LET paradigm, PETC and voltage non-idealities, with different threshold value . . . 94

7.17 Step response perturbation with T3= 100µs, LET paradigm, PETC and voltage non-idealities . . . 94

7.18 Step response perturbation with T3= 100µs, LET paradigm, PETC and voltage non-idealities, with different pattern of deadline misses . 95 7.19 Percentage of activation of τ3 with T3 = 100µs, LET paradigm, PETC and voltage non-idealities, with different pattern of deadline misses . . . 96

7.20 Linear velocity of the vehicle with T3= 100µs, LET paradigm, peri-odic control and converter non-linearities . . . 96

7.21 Torque provided to the vehicle with T3 = 100µs, LET paradigm, periodic control and converter non-linearities . . . 97

7.22 Field weakening trajectory with T3= 100µs, LET paradigm, periodic control and converter non-linearities . . . 98

7.23 Linear velocity of the vehicle with T3= 100µs, LET paradigm, peri-odic control and converter non-linearities . . . 99

7.24 Torque provided to the vehicle with T3 = 100µs, LET paradigm, periodic control and converter non-linearities . . . 99

7.25 Linear velocity of the vehicle for UDC . . . 100

7.26 Torque provided by the motor for UDC . . . 100

7.27 SOC of the battery for UDC . . . 101

7.28 Linear velocity of the vehicle for WLTP class 3 cycle . . . 101

7.29 Torque provided by the motor for WLTP class 3 cycle . . . 102

7.30 SOC of the battery for WLTP class 3 cycle . . . 102

7.31 Linear velocity of the vehicle for WLTP class 3 cycle with (1,4) con-straint and PETC . . . 103

7.32 Torque provided by the motor for WLTP class 3 cycle with (1,4) constraint and PETC . . . 103

(9)

Introduction

Global warming to a large extent caused by emissions of increasing amounts of greenhouse gases into the Earth’s atmosphere, together with the search for alternative energy sources to fossil fuels which are by their nature non-renewable, has led, in recent years, to considerable efforts to develop elec-tric vehicles (EVs) as environmentally friendly vehicles using elecelec-tric energy sources. In this scenario, Permanent Magnet Synchronous Motors (PMSMs) applied to EVs has recently become more common, due to their various ad-vantages, such as light weight, high power factor, and high torque density. In particular, interior PMSMs of compact size, high efficiency and with small torque ripples, have been commonly used for EVs [1].

On the other hand, with the technical innovations introduced in almost two last decades in the automotive area, the number of electronic devices in the cars has increased sharply. The increasing complexity of such modern cars and the introduction of safety-critical functions in automotive systems, bring the need to rethink the development and execution paradigms for embedded functionality. Developers need high levels of predictability, testability, and ultimately determinism in the execution of their code [7]; while control engi-neers must be aware of possible delays and scheduling issue due to real-time events or sporadic overload on undersized CPUs within the entire system pattern.

However, nowadays the development of most control applications is still based on the assumption that the design, definition and analysis of the con-trols functionality can be separated from the development and analysis of the software code implementing it. In a real scenario, instead, each task reads the data, performs its operations and writes the results at different time instants, which greatly depend on the operations performed actually by the CPU. This means that the performance of control may vary with the CPU behaviour. Moreover, also the system’s evolution and performance itself can influence the tasks behaviour in a complex way (e.g. in Periodic Event Triggered Control, Sec.5.5). The effects are that the control algorithm may

(10)

experiment some undesirable and unpredictable delays that may also change in time and lead to undesirable consequences to the system’s behaviour.

Typically, complex interactions between control and software timing are faced only in late stage of the engine control production. This leads often to delays in the production or high costs. For this reasons, it would be useful having more insight of possible conflicts between those two worlds directly in the design phase.

In order to meet all these requirements in design phase, it should be helpful to have a development environment in which physical and mechan-ical components of an electric vehicle, the control logic of the electric trac-tion motor and the scheduler of the task set, performed within the system itself, coexist. In this thesis a simulation environment (Simulink-based) that achieves a precise simulation in the timing of interactions between scheduler, control logic and physical system has been created. This work, as well as ad-dressing the control problem of an internal permanent magnet synchronous electric motor, shows how the introduction of real-time scheduling in the sim-ulation, especially in CPU overload situations, affects control performance and in general the performance of the entire system.

1.1

Motivations and interests

This section illustrates the importance to have a co-simulation model, in order to obtain better insight of the behaviour of the system, instead of using just the classical control theory. We refer to co-simulation because within this model there is a strong interaction between the control part and the tasks behaviour (scheduling algorithm, communication paradigm and so on). Simulating these components together in the same model represents one of the most innovative part of this thesis: with this strategy, it is possible to test complex interactions between those two worlds that could be impossible to analyse otherwise. Furthermore, in this thesis we are not facing a “real” linear system because of many factors:

• unideal feedforward compensation of coupling terms between d and q axis,

• errors that may be introduced by an unideal estimation of the angular position in Park transform operation,

• voltage generation non-linearities (introduced by PWM generation strat-egy and inverter non-linearities)

and so on.

All this aspects are not taken into account in classical control theory of IPMSM and also in other control tools for linear system. Even in the “base

(11)

case” without any special communication paradigm and with classical peri-odic control, the timing of the entire tasks chain involving the Field Oriented Control (FOC) is simulated with high level detail.

Having a co-simulation model involving each part (software and hard-ware) of the control loop can enhance our design phase prediction of the system behaviour under realistic assumption. Moreover, using this compre-hensive model, it is possible to carry out tests and analysis about how the performance of the system changes in different operative conditions. Partic-ular effort will be spent in Section7.2 about testing the performance when some real-time constraint are violated. This can give us an idea of “robust-ness” of the system when timing non-idealities happen.

Finally, taking advantages of the strong interaction between the schedul-ing part and the control part, another control paradigm (presented in Sec.5.5) is introduced in order to reduce - when possible - the computational load on the CPU. The drawback of this approach is the insertion of small oscilla-tions in steady state operaoscilla-tions in the system behaviour. The effects and the amplitude of these oscillations depend on a settable parameter that leads a variable threshold value for the condition that checks when the control job has to be executed. So, also the control part and the physic of the system (e.g. disturbances or external resistance force) can influence the scheduling part.

1.2

Co-simulation model and tests

The obtained tool, created in Simulink, was used to test the behaviour of an electric engine, which is based on realistic data of motor components and task set provided by BOSCH. The CPU, simulated by using SimEvent li-brary blocks, schedulates and executes each task according to its properties (priority, period, execution time, and so on) using a fixed priority scheduling policy called Deadline Monotonic (DM). Each task implements a function-ality of the system. The execution of each task has been divided into 5 main phases: read, check, run, finish and write. The reason why they are sepa-rated comes from implementation choices aimed at correctly realizing the behaviour of the scheduler and the various communication paradigms and control paradigms adopted. The order of activations of the various phases also depend on the communication paradigm used.

These phases are implemented as simulator blocks triggered by function calls from the CPU: they work as “latches” that sample the inputs at the time instant of the function call and calculate the result of the outputs in zero sim-ulation time. In this manner, the timing of the CPU events coincides with the timing of the operations made by each part of the task code. Fig.1.1

shows an high level view of the co-simulation model.

(12)

Figure 1.1: An ov erview of the Sim ul ink mo del

(13)

in order to characterize how the performance varies with different design choices and different timing conditions.

Firstly, we considered the classic step response test for the torque pro-vided by the engine, and compared the results by varying the sampling time (equivalent to the period of the control task). Other tests have been per-formed by varying the communication paradigm, studying how it may influ-ence the output jitter of each task and the end-to-end latency of the control loop. Finally, using different control paradigms, it is possible to observe ef-fects on system stability and CPU utilization.

Then, a set of tests have been performed by considering non-idealities in the timing, in particular when the control task may miss some deadlines, thus not being able to produce the correct output in time. This may happen for different causes, but generally it is an abnormal condition which is restricted to small time intervals. For this reason, typically the frequency of these events can be described with a set of constraints, of the form of “at most m deadline misses every K iterations”. Thanks to the theory presented in Sec.7.2 (enlarged in [15]), we can limit the number of tests to a worst case sequence of events satisfying the given specification. This sequence will define the worst-case performance of the system, as an index of robustness from timing non-idealities.

Finally, introducing a velocity controller, we can be able to test also some typical speed profiles with a longer time span.

1.3

Thesis structure

This thesis is divided in the following way.

• Chapter 2 presents a quick overview of the operating principle and classification of PMSM; in addition, also the basic equations used in the classic modelling of the PM of electric machine will be given there. • Chapter3introduces all the main parts of the general control theory for an IPMSM. The general control scheme will be analysed in details: the current reference generation strategy and the classic tuning methods for Proportional-Integral (PI) controller will be addressed. The physical limitations of the voltage regulator system will be treated in a classical way and, then, a novel control scheme will be presented in order to increase system’s performance.

• Chapter 4 contains the main concepts and equations for modelling an electric vehicle powertrain and its dynamics, taking into account external force acting on the vehicle, are presented.

• Chapter 5 introduces a short summary of the basic real-time notions. Then, two important paradigm used in this thesis are presented: a

(14)

paradigm to handle the intra-core communication and assure predictabil-ity of the system, the so-called Logical Execution Time paradigm (LET); and a particular control paradigm that allows to be executed “only when needed” (thus reducing the CPU load), the so-called Periodic Event Triggered Control (PETC).

• Chapter6presents the structure and the composition of all parts within the co-simulation model .

• Chapter 7 exhibits the experimental tests carried out and the results obtained from them in term of stability, performance and CPU load. • Chapter 8 presents the conclusions obtained by the analysis made in

this thesis.

1.4

Acknowledgements

This thesis is been realised at The Real-Time Systems Laboratory (ReTiS Lab) at the Scuola Superiore Sant’Anna of Pisa. Some data used for the experimental part are provided by BOSCH, which showed a strong interest in this topic.

(15)

Permanent Magnet

Synchronous Motor

The operating principle of any electric motor is based on the Lorentz law (Eq.2.1) for which a straight conductor, of length l, traveled by a current i and immersed in a uniform magnetic field B, is stimulated by an orthogonally directed magneto-electric force F with respect to the magnetic field and the direction of the current.

F = il × B (2.1)

In this thesis, we are interested in a particular type of electric machine, called “Permanent Magnet Synchronous Motor” (PMSM). PMSMs are at-tracting growing attention during last years for industrial and automotive applications; this is due to their main characteristics:

• high power density;

• high torque to inertia ratio; • high efficiency.

PMSMs present two sources of excitation: the first one is the magnetic field of the permanent magnet situated in the rotor; the second one is the mag-netic field produced by the stator winding when supplied with a 3-phased voltage system. There are no wires in the rotor, therefore the magnetic field is produced by the permanent magnets thus reducing the copper losses and achieving a higher efficiency and smaller size, for a given power, with respect to conventional synchronous machine.

In this chapter a quick overview of the operating principle and classifica-tion of Permanent Magnet Synchronous Motor (PMSM) will be given. Also a brief comparison between PMSM and induction machine will be carried out and the basic equations used in the classic modelling of the PM of electric machine will be given below. The topics presented in this chapter are mainly based on [2], [4].

(16)

2.1

PMSM classification

The Permanent Magnet (PM) machines can be classified as in the diagram presented in Fig.2.1[9]. Depending on the nature of field excitation, the PM machines can be classified as PM with D.C. excitation (PMDC) or PM with A.C. excitation (PMAC): the first one has the same configuration as the con-ventional DC machine except for the rotor, where the windings are replaced with permanent magnets; the PMAC machines is a synchronous machine, with no brushes or commutator. Further, the PMAC machines can be split up taking into account the type of back-EMF (ElectroMotive Force) volt-age induced in the stator winding. The BrushLess DC Machines (BLDCM) has a trapezoidal-type back-EMF; whereas the sinusoidal-type PMAC, also known as PM synchronous machines (PMSM), has a sinusoidal-type back-EMF. The latter can be classified depending on the position of the magnets in the rotor of the machine. For the Surface PMSM (SPMSM) the magnets are placed on the surface of the rotor core Fig.2.2(a), while for the Internal

Figure 2.1: Permanent magnet machines classification [9]

Figure 2.2: Rotor structure of a surface PM machine (a) and interior PM machine (b) [4]

(17)

PMSM (IPMSM) the magnets are buried in the rotor core Fig.2.2(b). The magnetic flux induced by the magnets defines the rotor direct axis d (mag-netization axis) through the center line of the magnets; the rotor quadrature q axis is situated at 90 electrical degree from the d axis. Figure2.2[4] shows that for the case of the SPM, the reluctance path for the d-and q-axes is the same; both axes have a flux path that flows from the stator magnetic steel, throught a small air gap, throught the PMs, and then throught rotor magnetic steel before following a similar path back to the stator magnetic steel. Since the reluctance of both paths is identical (or nearly identical), the d-axis and q-axis inductances are equal (or nearly equal). For the case of the IPM, the reluctance path for the d-axis and q-axis is not the same; the d-axis flux path crosses two sets of magnets in the rotor that presents significantly higher reluctance than q-axis flux path that travels only throught magnetic steel in the rotor [4]. Therefore, the d-axis inductance is, by constructional design, lower than the q-axis inductance leading the possibility to weaken the field using negative d-axis current command. The focus on this thesis will be on IPMSM.

2.2

PMSMs versus induction machines

In this subsection a brief comparison between PM and induction machine is presented. With respect to the induction machines, the lack of magnetizing component of stator current in PMSMs (since the excitation is provided by magnets) causes a reduction in stator copper loss. This loss reduction in sta-tor and rosta-tor significantly improves the efficiency in PMSMs compared to the induction machines [9]. However, it should be mentioned that the construc-tive components of the rotor of a PM machine are more expensive than those of a synchronous machine. Anyway, during flux weakening operation, both types of machines suffer of less efficiency characteristics in that regime oper-ation. Also the control part is quite different: synchronous machines need an additional control loop for rotor’s currents too. Another attractive feature of PMSMs over the induction machines is the possibility of design them with a significant reduction of weight and volume having also high torque to iner-tia ratio, which is a good point for applications that demand fast dynamic response [9].

It is worth noting that, despite the general validity of the assertions made above, the “better” choice of motor type depends on the application for which it should be chosen. Also other factors as battery consumption, com-putational resources and mechanical component characteristics of the system should be taken into account.

However, in this thesis we will focus on PMSM and in particular on those in which the magnets are buried in the rotor core (IPMSM).

(18)

2.3

Mathematical model of IPMSM

Considering three-phase stator windings as identical and symmetrically dis-placed by 120°, the voltage stator-phase equation, in stator cordinates, of the IPMSM are as follows [8]

                 va= Rsia+ dλa dt vb = Rsib+ dλb dt vc= Rsic+ dλc dt (2.2) where

va, vb and vcare the stator phase voltages expressed in Volt

ia, ib and icare the stator phase currents expressed in Ampere

Rs is the stator resistance expressed in Ohm

λa, λb and λc are the phase flux linkage expressed in Weber ( equal to V · s)

In order to avoid uncomfortable phasorial notations for working with three-phase currents, it is possible to obtain an equivalent model by trans-forming the above equations into a two-phase model. The voltage equations (Eq.2.2) are transformed from a three-phase fixed frame to a two-phase ro-tating frame using a coordinate system transformation from abc to dq [8].

     vd vq v0      = 2 3     

cos θe cos(θe−2π3 ) cos(θe+2π3 )

− sin θe − sin(θe−2π3 ) − sin(θe+2π3 ) 1 2 1 2 1 2           va vb vc      (2.3) where

vdand vq are the d and q components of the stator voltage vector expressed

in rotor frame

θe is the angle between the stator fixed a axis and the rotor rotating d axis

This particular matrix is also known as Park transform. The angle θe is

chosen so that the d axis is aligned with the flux linkage of PM vector ~ψm;

and his derivative ωe is called synchronous electrical speed.

ωe =

dθe

dt (2.4)

The vector representation of the transformation is presented in Fig.2.3 [8]. Now, considering the rotating dq reference frame, the voltage equations of

(19)

IPMSM are [8]                      vd= Rsid+ dλds dt − ωeλqs vq= Rsiq+ dλqs dt + ωeλds λds = Ldid+ λm λqs= Lqiq (2.5) where

λds and λqs are the d-q components of the stator flux expressed in rotor frame

λm is the flux due to permanent magnets

Ld and Lq are the d-q component of the stator inductance expressed in Henry

The produced electromagnetic torque Teof the IPMSM, expressed in the

dq reference frame has the following expression Te =

3

2p[λmiq+ (Ld− Lq)idiq] (2.6) where

p is the number of pole pairs

It can be seen from Eq.2.6, the electromagnetic torque has two components: the torque produced by the interaction of the q axis component of stator current with the permanent magnet flux (called permanent magnet torque) and the so-called reluctance torque caused by the saliency of the motor, i.e. the difference between Ld and Lq inductances. It should be noticed that for

(20)

SPMSM the reluctance torque component does not exist due to the same recluctance paths in rotor d and q axes [9]. Fig.2.4highlights a typical pat-tern of the resultant torque component (Eq.2.6) and sum of PM torque and reluctance torque for an IPMSM.

The mechanical equation of the machine is as follows [4] Jm

dωm

dt = Te− Tl− Bmωm (2.7) where

Jm is the moment of inertia

Bm is the viscous friction coeffiecient

Tl is the load torque applied to the shaft of the motor

ωm=

ωe

p is the shaft rotating speed

It should be noticed that Eq.2.7is only a general expression for the angular velocity dynamic. The torque load Tlas well as the viscous friction coefficient

Bm, can have complicated expressions depending on the mechanical part of

the system in which the motor is acting.

Lastly, the need for an inverter should be stressed immediately. Although the equations of the motor are now expressed in a two-phase model with respect to a frame integral with the rotor, the motor still needs equivalent three-phase currents for its operation. In our case, the motor is powered by a battery that supplies a direct voltage; this must be converted to alternating voltage (or current) by a device called “converter” (the name “inverter” may also be used). More details on this topic will be explained in the Sec.3.6

Figure 2.4: Torque as a function of rotor angle for IPM machine with fixed stator current [4]

(21)

Control of IPMSM

This chapter presents the main concepts of the state of the art for the control of an IPMSM. The most common approach to PM torque (current) control is known as field-oriented control (FOC). The basic principle of FOC is to transform quantities (voltages, fluxes and currents) from their three-phase fixed coordinates (a, b and c) to two-phase orthogonal coordinates that ro-tates with the rotor (d and q), thanks to the Park transform, and then apply a control feedback on these quantities.

After an overview of the general control scheme (Sec.3.1), the current reference generation strategy will be presented in Sec.3.2. Moreover the lin-earized form of the system and its state-space representation is shown in order to apply classical PI approach and tuning method. Another tuning technique involving the "Internal Model Control " is presented in Sec.3.5.1. Finally an overview of the voltage actuation and limitation is presented in Sec.3.6 and Sec.3.7 respectively. In the last section of this chapter a new control scheme is proposed for dynamic generation of current references, ob-tained as an extension of pre-existing schemes and concepts.

3.1

Field Oriented Control

The Field Oriented Control (FOC) is an indirect closed loop method for adjusting the torque produced by a PM machine by regulating the stator current vector. More in details, the three-phase AC currents are measured and converted into two-phase AC currents (expressed in a fixed frame); then, using the rotor flux angular position (that could be measured or only esti-mated), the two-phase currents are transformed into the “synchronous” ref-erence frame. Thanks to this crucial step, the steady-state AC variables can appear as DC quantities in the rotor reference frame. These synchronous frame feedback currents are compared to the synchronous frame commands (various generation strategies will be explained later) and the error is fed into PI current regulators, one for each of the two phases. Further, the control

(22)

Figure 3.1: Block diagram of IPMSM controller with transformations [4] output gets transformed back into AC quantities by an inverse transforma-tion and a gating signal is generated for a converter that provides AC three phase currents to the motor by a DC link powered by a battery using a SVPWM (Space Vector Pulse Width Modulation) strategy. Fig.3.1 shows a block diagram of the approach described above.

The FOC is a closed loop control method in which the rotational speed of motor needs to be measured (or at least estimated) and fed as feedback, in order to perform this algorithm. The torque produced is controlled indirectly by controlling the stator current is. The control algorithm is expressed in the

rotating dq rotor reference frame, that has its d axis aligned with the flux linkage of permanent magnet vector ~ψm. A phasor diagram representing the

dq frame chosen is presented in Fig.3.2. The angle α in Fig.3.2is called torque angle.

In addition to the inner control current loop, there could be an outer control loop regulating the speed of the motor. In any case, a desired torque value is given as input for generating the reference currents in dq frame. Many strategies could be applied for the current references generation, the most famous of them are:

• Constant torque angle control (α = π

2) (CTA)

• Maximum torque per ampere control (MTPA)

The error between the reference dq currents and the measured feedback dq currents is fed to the current regulators; their output is the corresponding dq reference stator voltage. Based on these stator voltages, space vector modulation is used to control the switches of the inverter [8].

(23)

One of the easiest control strategy for IPMSMs is to control the torque angle α in order to maintain it π

2. CTA control can be achieved by setting

the rotor d-axis current component to zero leaving the current vector on the rotor q-axis; for this reason, this control strategies is also known as zero d-axis current control (ZDAC). Although this strategy seems to be very simple, it should be noted that the benefit of the IPMSM produced reluctance torque cannot be utilized. In case of SPMSM, instead, it is very common and suitable control strategy.

For this latter reason, in this thesis the MTPA strategy is been used; it will be presented in the next section.

3.2

Maximum torque per ampere control

The MTPA control strategy ensures that for a required torque level the min-imum stator current magnitude is applied. Therefore, for a given operating point, the copper losses can be minimized in the machine and the overall efficiency of the motor can be increased. As it could be seen in Fig.3.3, for a given torque, there are many possibilities of stator current vector (eg. ~is1 and ~is2) that can produce the desired torque level, but only one of them has minimum magnitude (~is). All the points given by the intersection of the minimum current vectors and the corresponding torque levels give the MTPA curve.

The MTPA curve equations is derived below. Taking Eq.2.6and express-ing the dq current components as a function of stator current is and torque

angle α, can be obtained Te= 3 2p[λmissin α + (Ld− Lq) 2 i 2 ssin(2α)] (3.1)

(24)

Figure 3.3: Vector representation of the minimum stator current vector at a given torque level for and IPMSM (here the direction of d-axis is considered negative) [8]

To obtain fast transient response and maximize torque with the smallest possible stator current, let

dTe dα = 3 2p[λmiscos α + (Ld− Lq)(i 2 scos(2α)] = 0 (3.2)

From the previous, it follows that

(Ld− Lq)(i2d+ λmid+ (Ld− Lq)i2q) = 0 (3.3)

Then, solving it for id, we obtain

id(iq) = λm 2(Lq− Ld) − s λ2 m 4(Lq− Ld)2 + i2 q (3.4)

that represents the MTPA curve equation [4].

Substituting the previous in Eq.2.6for a desired torque level T∗

e, follows

9p2(L

d− Lq)2(i∗q)4+ 6Te∗pλmi∗q− 4(Te∗)2 = 0 (3.5)

Finally, solving Eq.3.5and substituting in Eq.3.4, the reference current values for a given torque level are found with MTPA strategy.

3.3

Linearized system plant

The system plant for both d and q axis (or channels, from a control point of view), can be obtained from Eq.2.5by subtracting the coupling term (back-emf) with a feedforward operation; the two current loops id and iq can now

(25)

be controlled independently.      vd= Rsid+ dλd dt = Rsid+ d(Ldid+ λm) dt vq= Rsiq+ dλq dt = Rsiq+ d(Lqid) dt (3.6) Applying the Laplace transform, the voltage expressions expressed in the s plane are

(

vd(s) = Rsid(s) + s · Ldid(s)

vq(s) = Rsiq(s) + s · Ldiq(s)

(3.7) This gives the following transfer function of the IPMSM for the d and q current loop [8]        Gd(s) = id(s) vd(s) = 1 s · Ld+ Rs = 1 Rs(s · Tsd+ 1) Gq(s) = iq(s) vq(s) = 1 s · Lq+ Rs = 1 Rs(s · Tsq+ 1) (3.8) where Tsd = Ld

Rs is the d-axis electrical time constant

Tsq=

Lq

Rs is the q-axis electrical time constant

3.4

PI current control

The diagram representation of the PI current controllers structure is pre-sented in Fig.3.4.

(26)

It should be noticed that this control scheme suppose an ideal voltage regu-lator, i.e. the desired voltage values (outputs of the controller) are also the real voltage values applied on the motor.

In practice, this assumption is not exactly true. Inverter nonlinearities such as voltage drops in devices, inverter deadtime effects and saturation and differ-ent PWM strategies cause the inverter to deviate from an ideal amplifier[4]. However, these effects can be compensated for (from a stability point of view) during the design phase, choosing the control gains in order to have suitable stability margin.

3.4.1 Tuning of the PI current controllers

In this subsection the classical tuning method for a PI controller for a IPMSM is presented. More complex tuning criteria involving scheduling delays, task communication paradigm and control paradigm will be the objectives of this thesis and will be presented later in Chap.7.

The following analysis involves a single current loop (d channel), but the same conclusions obviously hold for both d and q current loop.

The electrical plant of d (q) axis current loop has a pole at the electrical time constant Tsd (Tsq). The controller zero is simply the ratio of the proportional

to integral gains and can be set arbitrarily: setting its value equal to the electrical pole, there is a pole zero cancellation.

The transfer function of the PI controller is given P Id(s) = kpd 1 + Tsd· s Tsd· s (3.9) setting kpd kid = Ld Rs = Tsd (3.10)

The open-loop transfer function for current loop becomes Gold(s) =

kid

Rs· s (3.11)

that is an integrator with a tunable gain. Therefore, setting any positive value to kid, the control loop remains stable. Setting an high value of gain

will produce a fast dynamic (small rise time and settling time) but also it reduces the delay margin.

In real time system is better to avoid situation in which the system has a small delay margin since some delays can occur due to many reason (ex. sample time, scheduling delay, computational time jitter, deadline miss...). So a good tuning method should take into account the maximum (estimated) delay. More details involving real time delays due to scheduling and control algorithm will be seen in Chap.5.

(27)

obtain the crossover frequency ωcf; i.e. the frequency at which the modulus

of Gold is equal to 0 dB.

ωcf =

kid

Rs (3.12)

Since the Bode phase plot is constant for all frequencies and equal to −π 2, the system has a phase margin of 90 and an infinite gain margin.

The delay margin can be computed as follows delay margin [sec] = P M

ωcf

· π

180 (3.13)

Substituting Eq.3.12 into Eq.3.13, it could be obtain a sort of “tuning rule” that ensures the stability of the closed-loop system w.r.t. delays smaller than a maximum value chosen during the design phase.

kid=

π 2 ·

Rs

maximum delay (3.14)

The value of kpd will be chosen using the Eq.3.10. Fig.3.5 show a typical

Bode plot of Eq.3.11with kid= 16.67.

-20 -10 0 10 20 30 Magnitude (dB) 102 103 104 -91 -90.5 -90 -89.5 -89 Phase (deg) Bode Diagram Frequency (rad/s)

Figure 3.5: Bode plot of d axis current open-loop with kid= 16.67

The closed-loop transfer function for the current loop is simply: Gcld(s) =

kid

Rs· s + kid

(3.15) The system bandwidth is typically defined as a -3 dB crossing of the fre-quency response magnitude. Solving for gain that produces -3 dB response, the desired bandwidth is trivial [4]. It should be noticed that the bandwidth

(28)

frequency should been also calculated from Eq.3.12 applying only a simple conversion between rad/s and Hz

fbw=

ωcf

2π (3.16)

Fig.3.6show a typical step response of Eq.3.15with kid= 16.67.

0 1 2 3 4 5 6 7 8 9 10-3 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Step Response Time (seconds) Amplitude

Figure 3.6: Step response of d axis current closed-loop with kid= 16.67

3.4.2 State-space representation

In this section the state space representation of the linear time invariant (LTI) continuous system will be presented. Once again we will take as exam-ple only the d-axis component of the stator current. Using Eq.3.8, we want to rewrite the system in the form

( ˙x = Ax + Bu y= Cx + Du (3.17) with A= −Rs Ld , B = 1 Ld , C= 1 D = 0 (3.18) x= id, u= vd

Using a PI controller in the form of Eq.3.8, we want to express it in the form u= Ke = K(r − x) (3.19) Without loss of generality, let r = 0. We must enhance the previous state of the system. The new matrices and states of Eq.3.17become

x= 

id

−R e 

(29)

and A=   −Rs Ld 0 1 0  , B=   1 Ld 0 0 0  , C =1 0 , D = 0 (3.20) with u= Kx, K =−Kp −Ki 0 0  (3.21) Now rewriting the Eq.3.17with the augmented state in closed loop form, we obtain the classical formulation for state-feedback linear system.

˙x = (A + BK)x =   −Rs+ Kp Ld −Ki Ld 1 0  x (3.22) This formulation will be useful later to work with the theory of LTI systems and some extension of it.

3.4.3 Anti-windup structure for the PI controllers

Due to the physical limitation given by the maximum DC link voltage, the dq reference voltages given by the output of PI controllers must be limited too. The PI controllers need to have an anti-windup loop. When the reference voltage values are saturated, the anti-windup prevents delays in the responses of the PI controllers by discharging the integral. The structure of the PI with anti-windup for the current loops is presented in Fig.3.7, where kais the

anti-windup gain.

Figure 3.7: PI current regulator with anti-windup [8]

In section3.7 the saturation strategy for the d-axis and q-axis components of the commanded voltage vector will be examined in more detail.

3.4.4 Discrete PI controller

Although the tuning method presented in Sec.3.4.1 deals with continuous system representation, the real controller should be implemented in discrete

(30)

time and also the sampling time choice has an important role in system’s behaviour. In our case the sampling time is forced to be the control task period, given as a task set specification. Typically an interval of possible sampling times is chosen following multiple constraints, e.g. the CPU clock, load on CPU, plant stability, performance specification (rise time, settling time...) etc. Clearly, this poses major limitations in the design of the control, for example limiting the gain values. These aspects are faced in detail in this thesis and will be discussed properly in the following chapters.

The discretization technique utilized in this thesis is the sample and hold technique (a.k.a. forward Eulero). The PI controller expression in discrete time becomes: U(z) = Kp  1 +Ts· Ki Kp · 1 z −1  E(z) (3.23)

where Ts is the sampling time.

3.5

Parameters mismatch and delays

This section aims to clarify how the performance and stability of the most internal control loop (current control) vary if errors occur in the estimates of the motor electrical parameters or if there are delays in the loop. Such an analysis is fundamental to ensure the robustness of the system to para-metric variations that can occur even during ordinary machine operation: in particular, we are interested to see how estimation errors in the resistance or inductance of the stator circuit affect the stability and performance of the system. It is known from the literature that the stator resistance increases as the temperature rises, while the inductance varies according to the work-ing point (in the id, iq plane). Although these considerations are important from a theoretical point of view, it is good to remember that in real systems there are always mechanisms for estimating parameters at run-time. These not only aim to maintain the performance of the system even when the pa-rameters are different from their nominal value, but also allow more external control loops to carry out controls in the most efficient way. For example, it is important to keep in mind that knowledge of parameters is required when generating current references from the torque reference or in the field weakening strategy. Finally, it is worth noting that with parameter errors we have an imperfect decoupling between the two components of the stator current.

Using the classical theory about stability margin, it is possible to deal with parameter estimation errors. For smplicity, in our work we will assume that the values for resistance and inductance are perfectly estimated and constant. However, it is possible to guarantee robustness of the system at design time by considering the maximum possible variations of those values.

(31)

As an example, in [4] is shown that, even with errors in estimation of the plant electrical pole of ±50%, the PI controller is robust and moreover, that the system is well behaved, even with ±10% error in estimate of back EMF (the decoupling term). Of course, even external loops involved in the control could be affected by those variations. However, studying the possible effects of such variations go beyond the scope of this work and will not be addressed here.

3.5.1 Robust PI tuning with IMC approach

It is possible to take into consideration, directly in the design phase, some specifications on the robustness of the control both with regard to the mis-match on the parameters and for any delays due to electronics (computing time and communication paradigms of the tasks) and to the physics of the actuators. The theory of Internal Model Control (IMC) provides a procedure that allows tuning the parameters of a PI controller from a not exact model of the real system. The main steps of the synthesis procedure are shown below;

Taking into account a single current component, define the real process as

P(s) = P = 1 L · s+ R· e

−sθ (3.24)

with the delay term which may also be approximated by a first order ap-proximation of Padé as e−sθ≈ 1 − s θ 2 1 + sθ 2 (3.25) The model of the nominal process is

e

P(s) = eP = 1 e

L · s+ eR (3.26) where the superscripte•indicates the nominal (or estimated values). It should be noted that there is no delay term in order to preserve the final structure of the PI controller. The aim of the synthesis is the design of a controller that makes the closed-loop system of type 1 (asymptotic zero step error) and that is “robust” to parametric variations.

Splitting the modelPe into a stable (Pe−) and an unstable part (Pe+). e P = eP+· eP− (3.27) with e P+= 1 (3.28) and e P−= 1 e L · s+ eR, (3.29)

(32)

the IMC synthesis leads to a controller Q expressed as e

Q= ( eP−· ν−)−1·n( eP+)−1· ν−o

∗ (3.30)

where ν represents the stable part of the input signal of the system (step in our case of study) and the operator in staple brackets means that, after having expanded (Pe+)−1· ν− in partial fractions, all terms that originate instability or non-causal elements must be deleted.

Substituting Eq.3.28and Eq.3.29 into the previous, the following holds e

Q= ( eP−)−1 (3.31) In general the controller in Eq.3.31is not causal, but this is not particularly important, as it will suffice to add a low-pass filter F later on in the IMC controller synthesis procedure.

Q= eQ · F = ( eP−)−1· F (3.32) In the case of step input, the set of filters such as to set the steady state error zero is given by

F = 1

1 + s · λ (3.33)

Finally, the equivalent feedback controller C is given by C= Q

1 − Q eP (3.34)

The λ parameter of the filter can be used to make a robustness detuning by meeting the specifications of nominal performance and robust stability. First, define a multiplicative uncertainty lm(ω) such that

| P (jω) − eP(jω) |

| eP(jω) | ≤| lm(ω) | (3.35) then define, also, the sensibility function as

e

S= 1

1 + C · eP (3.36)

and the complementary sensitivity function e

T = eP · eQ · F (3.37) To meet the nominal performance specification, impose

(33)

with

W(s) = s+ γ

s ·√2γ (3.39)

The selected weight function W (s) is such as, for an input step V (s) = 1 s,

the following holds V = ( ν: kν0k2 2 = ν w 2 2 = 1 2π Z ∞ −∞ V(jω) W(jω) 2 · dω ≤ 1 ) (3.40) for a vast family of inputs that generate outputs similar to the step [4]. To meet the robust stability specification, impose

|| eT(jω)lm(ω)||∞<1 (3.41)

Robust performance is achieved simply by meeting both nominal perfor-mance (Eq.3.39) and robust stability (Eq.3.41). It holds

( | eS(jω)W (jω)| < 1 − α(ω) | eT(jω)lm(ω)| < α(ω) (3.42) where α(ω) < 1, ∀ω

Finding a value of λ that satisfies Eq.3.42 equals making a detuning of robustness. The feedback equivalent controller will be

C = L λ · (1 +

1

T s) (3.43)

with the equivalent PI gains        Kp = L λ Ki = R λ (3.44) What we have obtained is that the gains should be tuned on both physical parameters (L and R, as in the classic approach), and on the weight of the uncertain components of the plant. As a practical explanation, we will need a bigger value of λ if the system model has more uncertainties (i.e. we need “more robustness”), while lower values of lambda lead to better performance (but only if the model is sufficiently reliable). This type of analysis, although it is important from a theoretical point of view, is taken as the base step for our gains choice. The effects of different gains choices are presented in Chap.7.

(34)

3.6

Generation of PWM

The voltage vector, generated by the control part of the system, is applied to the stator of the machine through a six-step inverter commanded by a gate signal generated by Pulse Width Modulation (PWM) strategy. There are several approaches to generate inverter control signals to achieve PWM and space vector modulation (SVM) approach is one of the most used in FOC digital drive system. The SVM approach generates fixed voltage space vectors from a three-phase inverter, which is shown in Fig.3.8.

Figure 3.8: Three-phase inverter [9]

This type of inverter can provide six non-zero voltage space vectors and two zero voltage vectors, corresponding to the 8 switching states of the inverter; a phasorial diagram is shown in Fig.3.9.

The notation vabc denotes the state of the switches in binary pattern: the

first value of the subscript indicates the state of the leg ‘a’ of the inverter, the second one stands for the state of leg ‘b’ and the last one for leg ‘c’. The binary representation of the state is ‘1’ where the top switch is closed and the bottom switch is opened for a particular leg of the inverter and is ‘0’ for the opposite. The magnitude of each of those voltage space vectors is 2·vDC

3

[9].

In the following, the generation of inverter control signals from SVM is discussed assuming the commanded voltage v∗

s, expressed in stationary

frame, in the first sector of the space vector diagram shown in Fig.3.10. The adjacent two voltage space vectors are, in this example, v100 and v110. The

change in flux over one switching period can be written as Z Tsw 0 v∗sdt= Z T1 0 v100dt+ Z T1+T2 T1 v110dt+ Z Tsw T1+T2 v0dt (3.45)

(35)

Figure 3.9: Voltage space vectors correspond to the eight switching states of the three-phase inverter [9]

where

Tsw is the switching period

T1 is the amount of time during which the vector v100 is provided

T2 is the amount of time during which the vector v110 is provided

v0 is the zero vector, either v000 or v111

Figure 3.10: Representation of the commanded voltage vector from two ad-jacent voltage space vectors [9]

(36)

The swicthing times for the adjacent two vectors are [9] T1= √ 3Tswv∗s vDC · sin(π 3 − β) (3.46) T2 = √ 3Tswvs∗ vDC · sin(β) (3.47)

where β is the angle between v100 and v∗s. During the remaining time in the

switching period, the zero vectors should be applied. So, it stands

T0= Tsw− T1− T2 (3.48)

For implementation reasons, during each swicthing period, each leg of the in-verter is switched twice and switching signals are symmetric around 1

2Tsw[9].

The Fig.3.11shows the switching signals produced by SVM for the example presented before.

The magnitude of the maximum voltage, which can be obtained by SVM approach, depends on the angular position β of the commanded voltage vec-tor. It can be found using Eq.3.48when T0 is equal to zero and substituting

T1 and T2 from Eq.3.46and Eq.3.47. After some manipulations vmax(β)can

be obtained as vmax(β) = vDC √ 3 cos(π 6 − β) , 0 ≤ β ≤ π 3 (3.49)

The previous stands only for commanded vector voltage in first sector; if it is considered the other sectors also, therefore vmax(β)constitutes the hexagon

shown in Fig.3.9.

There is a simpler solution to limit the maximum required voltage without having to rely on beta angle dependency: considering the circle inscribed

Figure 3.11: Switching signals produced by SVM for the three legs of the three-phase inverter, assuming the command voltage vector in [0, π

3] sector

(37)

inside the hexagon of Fig.3.9 as the voltage limit, the maximum voltage vmax becomes a constant value equal to the radius of the circle

vmax =

vDC

3 (3.50)

3.7

Voltage saturation strategy

There are several ways to saturate the commanded voltage vector. Thinking of the physical limit for which

q v2d+ v2

q ≤ Vph_max (3.51)

it is possible to represent the voltage the previous equation as a circle on a plane, having axis vd and vq, with radius equal to Vph_maxas in Fig.3.12.

Figure 3.12: Circle that limits the d-q voltage vector

The approach used and presented below is a non-prioritization strategy for saturation, also called “D-Q equivalence”. The projections of the vector with module equal to Vph_maxand angle equal to φ on the axes d and q are

to be obtained as

vsatd = Vph_max· cos(ϕ) =

Vph_max vunsat d |Vunsat s | (3.52) vsatq = Vph_max· sin(ϕ) =

Vph_max vqunsat |Vunsat s | (3.53) where ϕ= arctan2(vq, vd) (3.54)

While the static saturations presented in Equations 3.52 and 3.53 are fundamental in practice for cutting transient peaks, it is important that

(38)

the operating point of the system stays inside the boundaries for the vast majority of its evolution. Thus, a more advanced technique is needed to manage current references evolution in order to respect current and voltage limitations.

3.8

Field Weakening

The maximum current and voltage are usually set by the maximum current of the inverter, and maximum available voltage from DC link. These two constraints can be expressed as

i2d+ i2q ≤ Imax2 (3.55)

vd2+ vq2≤ Vmax2 (3.56) where

Imax is the maximum inverter phase-current amplitude

Vmax is the maximum phase-voltage amplitude from the inverter

Substituting Eq.2.5in Eq.3.56and neglecting the stator resistance term, the following expression is obtained for the voltage limitation

 Vmax ωe 2 ≤ L2d· λm Ld + id 2 + (Lq· iq)2 = Vs (3.57)

The previous equation represents an ellipse in id, iq plane, whose center is

situated at Iinf = (λLm

d,0). This point is the so called “infinite speed point”,

and it represents the value of the stator current at which the speed is teo-retichal infinite [8]. When the electrical angular speed of the motor ωe is

increasing, the radius of the ellipse is decreasing, shrinking towards the cen-ter point. The ellipse equation together with Eq.3.55, representing a circle with constant radius, are shown in Fig.3.13.

The goal of field weakening strategy is to make the working point lie always in the grey region of Fig.3.13. The term “field weakening” comes from the fact that it aims to decrease the resulting magnetic field of the stator to work at higher electrical angular speeds.

In order to achieve this goal, we will need to define two curves that de-scribe the operating points of the system: the MTPA curve (dede-scribed before in Sec.3.2) and the Maximum Torque Per Voltage (that will be introduced in the following subsection).

(39)

Figure 3.13: Working area made from the intersection of the circle and the ellipse [11]

3.8.1 Maximum Torque Per Voltage (MTPV)

The MTPV curve is the geometric location of the point which connected the voltage limit ellipse and the tangent point of the torque hyperbolic [11]. Recalling Eq.3.57and Eq.2.6, the condition expressed above can be expressed as ∂Tm ∂id ·∂Vs ∂iq − ∂Tm ∂iq ·∂Vs ∂id = 0 (3.58)

Solving the above equation or, alternatively, solving a constrained optimiza-tion problem [10], the expression of the MTPV curve follows

id= − λm Ld + −Lqλm+ q (Lqλm)2+ 4L2q(Ld− Lq)2i2q 2Ld(Ld− Lq) (3.59)

It is worth remembering that this result has been obtained from the hy-pothesis of neglecting the contributions given by the resistive term in the equations of vd and vq. More information on the validity of this assumption

will be given in subsection3.8.3.

3.8.2 Field Weakening trajectories

In order to get better performance of the motor control, the idand iq should

locate in the shadow region in the Fig.3.14 encircled by the MTPA curve (red line), current limit circle (purple line), MTPV curve (green line) and

(40)

the d-axis [10].

Figure 3.14: MTPA curve, current limit circle, MPTV curve, voltage limit ellipse and constant torque curve [10]

The properties and the equation of MTPA curve have been dealt with in sec-tion3.2. However, it is worth noting that the MTPA curve are the tangency points of the constant torque curves and the current round circles.

The best field weakening operating trajectories are proposed in Fig.3.15. Let us take, for example, trajectory O-D-E-B-C: when the speed is low and the command torque increases, the operating points move from O to D along the MTPA curve so as to minimize the stator current (and thus also the copper losses). The voltage ellipse curves starts shrinking as the speed starts increasing, and when the voltage ellipse curve meet the point D, the operating points have to move from D to E along the constant torque T1 curve to

keep the torque constant at the same previous value. If the speed continues increasing, the voltage ellipse curves continues shrinking and meet the point E and the operating points move from E to B along the current limit circle. The output torque of the motor is now no longer constant but decreases as the velocity increases. As the ellipse reduces still further,the operating point move from B to C along the MTPV curve, further decreasing the electromagnetic torque. The two other similar trajectories in the Fig.3.15

are OA-B-C and O-F-G-C.

3.8.3 MTPA and MTPV derivation

This subsection will show how it is possible to derive the expression of the MTPA and MTPV curves, differently from the common approach, from the resolution of Eq.3.58, also considering the contribution of resistive terms in the calculation of the stator voltage. Considering Eq.3.56 and Eq.2.5, we

(41)

Figure 3.15: Trajectories of operating points [10] have

Vmax =

q

(idRs− iqLqωe)2+ (iqRs+ (idLd+ λm)ωe)2 (3.60)

representing the voltage limit ellipse equation. Solving Eq.3.58, now, we ob-tain −3p(Ldλ 2 mωe2+ i2d(Ld− Lq)(R2s+ L2dω2e) + idλm(R2s+ Ld(2Ld− Lq)ωe2) 2p(idRs− iqLqωe)2+ (iqRs+ (idLd+ λm)ωe)2 + − 3p(i 2 q(Ld− Lq)(R2s+ L2qω2e)) 2p(idRs− iqLqωe)2+ (iqRs+ (idLd+ λm)ωe)2 = 0 (3.61) We have therefore obtained a general solution to a constrained optimization problem. Placing ωe = 0, follows −3p(i2d(Ld− Lq)R2s+ idλmR2s− i2qR2s(Ld− Lq)) = 0 (Ld− Lq)i2d+ λmid− (Ld− Lq)i2q = 0 id= λm 2(Lq− Ld) − s λ2 m 4(Lq− Ld)2 + i2 q (3.62)

corresponding to Eq.3.4of MTPA curve. This means that the MTPV curve overlaps with the MTPA curve for small ωevalues. The reason for this

(42)

zero, the value of the stator voltage is given entirely by the resistive contri-bution which is directly proportional to the stator current. It follows that it is equivalent to minimize the stator voltage or the stator current for values of ωe close to zero.

Instead, for high ωevalues, it is possible to neglect all the terms of Eq.3.61

which do not have this term to multiply; thus obtaining

L2d(Ld− Lq)i2d+ λmLd(2Ld− Lq) + Ldλ2m− L2q(Ld− Lq)i2q= 0 id= − λm Ld + −Lqλm+ q (Lqλm)2+ 4L2q(Ld− Lq)2i2q 2Ld(Ld− Lq) (3.63)

corresponding to the Eq.3.59 of MTPV curve. It is important to note that the error that is made using Eq.3.63 instead of Eq.3.61 decreases with the increase of the ωe value and reaches values to be considered acceptable also

for values of ωe below the base speed of the machine.

3.8.4 The state of the art field weakening algorithm

Currently, the most used algorithm for field weakening, also present in Simulink, is the one proposed by J.Way and T.Jahns in [12]. The structure of the con-trol is presented in Fig.3.16 where

M is the calculated modulation index

M∗ is the threshold value of the modulation index βc is a coefficient between 0 and 1

Udc is the DC-link voltage of the inverter

kf w is the gain of the FW integrator

kaw is the anti-windup gain

The control’s structure is a pure integrator with anti-windup. The error signal input to the control system is represented by the difference between a reference value M∗ (chosen less than 1) and a modulation index calculated

as follows M = √ 3 ·qUsd_meas2 + U2 sq_meas Udc (3.64)

The scalar√3 in the above equation is derived from the type of modulation used for PWM (in our case SVM, see Eq.3.50); Usd_meas and Usq_meas are

the measured dq voltages. The error between M and M∗, is fed to an

integra-tor with anti-windup and it’s output βcis limited between 0 and 1 and then

(43)

Figure 3.16: FW control structure [8]

difference between the measured and the threshold value of the modulation index is negative, the output of the integrator will decrease below 1, thus also decreasing the angle of the stator current, and the motor will go into field weakening. The graphical representation of the FW action, is presented in Fig.3.17.

Figure 3.17: FW action [8]

An advantage of this approach is that no motor parameters have been di-rectly used within the control scheme: it is thus made independent of the exact knowledge of the parameters. A disadvantage is that it does not allow to follow the optimal trajectory presented in subsection 3.8.2; this leads to a strong degradation of performance compared to the optimal case.

3.9

The proposed field weakening algorithm

In order to exceed the performance limits of the previous scheme, a new control scheme for field weakening is proposed below, which will allow the trajectories presented in the subsection 3.8.2 to be followed. The idea is to

Riferimenti

Documenti correlati

Here we have pharmacologically modulated the activation of eNOS, at different post-translational levels, to assess the role of eNOS- derived NO and of these regulatory mechanisms

Renal replacement therapy is an independent risk factor for mortality in critically ill patients with acute kidney injury. Clec'h C, Gonzalez F, Lautrette A, Nguile-Makao

More than ten years ago, Ross Balzaretti published a highly interpretive article that discussed in partic- ular northern Italy’s economy between the eighth and the ninth centuries; 7

Let us consider the problem of heating steel bars which pass through a oven segmented in n = 5 zones.. , 4,

 The hdfs command can be executed in a Linux shell to read/write/modify/delete the content of the distributed file system..  The parameters/arguments of hdfs command are used

The second part has been involves with the analysis and modelling of the ATV braking system, starting from the quarter of car model to describe the wheel’s dynamic during

Comet-tail artifacts, long and without fading, arising from superficial layers located above the pleural line, with the particular- ity of being aligned, indicating a thin air