master s thesis - diva portal696747/fulltext01.pdf · abstract this thesis comprises modeling and...

86
Master’s Thesis Modeling and Simulation of a Three-Phase AC-DC Converter where the Impedances of the Feeding Lines are considered Faculty of Technology Author: Behnood Lotfalizadeh Supervisor: Matz Lenells Semester: Autumn 2013 Course Code: 5ED06E Subject: Master's Thesis in Electrical Engineering Department Of Physics and Electrical Engineering

Upload: others

Post on 30-Apr-2020

11 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

Master’s Thesis

Modeling and Simulation of a Three-Phase AC-DC Converter where the Impedances of the Feeding Lines are considered Faculty of Technology

Author: Behnood Lotfalizadeh Supervisor: Matz Lenells Semester: Autumn 2013 Course Code: 5ED06E Subject: Master's Thesis in Electrical Engineering Department Of Physics and Electrical Engineering

Page 2: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

Modeling and Simulation of a Three-phase AC-DC Converterwhere the Impedances of the Feeding Lines are considered

Behnood LotfalizadehDepartment Of Physics and Electrical Engineering

Linnaeus UniversityVäxjö, Sweden

i

Page 3: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

Abstract

This thesis comprises modeling and simulation of an AC-DC converter (Battery charger).An AC-DC converter may cause a high frequency distortion in the electrical power network oraugment the existing distortion caused by other devices connected to the network. The goal isto design a controller for suppressing this noise at a reasonable level. We hope the thesis canbe considered as a step forward to solve the original problem. One needs an accurate model ofthe AC-DC converter, to design such a controller. This study tries to clarify the effects of theline inductance on the performance of the converter by modeling and simulating the converterduring the commutation time. The idea is to model and simulate the converter for two differentconditions; first in the Normal condition by neglecting the effect of line impedance, second inthe Commutation condition by considering the effect of the line impedance on commutationof the diodes. One can perform a complete simulation of the converter with combining thesetwo models. The thesis deals with AC-DC converters, Hamiltonian-port modeling, simulationand MATLAB programming using the functionality of the S-function and SIMULINK.

ii

Page 4: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

Acknowledgments

I gratefully acknowledge the support and generosity of my supervisor Matz Lenells, with-out his help and support the present study could not have been completed. I also would like toexpress my very great appreciation to my family for their support and encouragement through-out my study.

iii

Page 5: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

Contents

1 Introduction 11.1 Introduction to DC converters . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.1.1 Switching mode converters . . . . . . . . . . . . . . . . . . . . . . . . . 21.1.2 LC filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

1.2 Problem definitions and aims . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2 Literature Review 42.1 Effects of line impedance on performance of the converters . . . . . . . . . . . . 42.2 Simulation of the power electronics circuits . . . . . . . . . . . . . . . . . . . . 6

3 Modeling and simulating the three-phase battery charger 73.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73.2 Modeling of the converter in the Normal condition . . . . . . . . . . . . . . . . 73.3 Conducting states of the diode bridge . . . . . . . . . . . . . . . . . . . . . . . 9

3.3.1 Current and voltage equations (KCL and KVL) . . . . . . . . . . . . . . 103.4 Elimination of the effect of switch S . . . . . . . . . . . . . . . . . . . . . . . . 12

3.4.1 A generic equation for the KVL and KCL of all the six cases . . . . . . . 143.5 Hamiltonian Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

3.5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1719subsection.3.63.7 Linearization of the Hamiltonian system . . . . . . . . . . . . . . . . . . . . . . 203.8 State-Space version of the equations of the system for using in the MATLAB®

simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213.8.1 Symbolic Matlab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213.8.2 States and Outputs of the system . . . . . . . . . . . . . . . . . . . . . . 22

3.9 Introduction to simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233.9.1 Steps in a simulation study: . . . . . . . . . . . . . . . . . . . . . . . . 23

3.10 Simulation with MATLAB® Simulink: . . . . . . . . . . . . . . . . . . . . . . . 243.10.1 Level-2 MATLAB® S-Functions . . . . . . . . . . . . . . . . . . . . . . 243.10.2 Simulation of the three-phase battery charger in Normal condition . . . . 243.10.3 Running the simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . 243.10.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

4 Study the behavior of the converter with considering the line inductance 284.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284.2 Study the behavior of the rectifier at 90 . . . . . . . . . . . . . . . . . . . . . . 29

4.2.1 Piecewise Linear model of diode . . . . . . . . . . . . . . . . . . . . . . 314.3 Forward Recovery of Diode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324.4 Reverse Recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324.5 Equivalent circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334.6 Modeling the converter in the commutation condition at 90 . . . . . . . . . . . 354.7 Elimination of the effect of switch S . . . . . . . . . . . . . . . . . . . . . . . . 38

4.7.1 Model the circuit as a Hamiltonian-Port system . . . . . . . . . . . . . . 394.8 State-Space version of the equations of the system for using in the MATLAB®

simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414.8.1 Derive System of Differential Equations for MATLAB® simulation . . . 424.8.2 Voltage equations for inductors and diodes . . . . . . . . . . . . . . . . 43

4.9 Simulation of the converter in the commutation condition at 90 . . . . . . . . . 454.9.1 Interpretation of the simulation . . . . . . . . . . . . . . . . . . . . . . . 45

4.10 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

iv

Page 6: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

5 Conclusion and summary 495.1 Simulation of the converter without considering the effect of line impedance . . . 495.2 Simulation of the converter during commutation time . . . . . . . . . . . . . . . 495.3 Simulation of the battery charger before, during and after the commutations of the

diodes at 90 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505.4 Suggestion for the future studies . . . . . . . . . . . . . . . . . . . . . . . . . . 565.5 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

Appendices 58

A Park’s Transformation 58A.1 Implementing Park’s Transformation for an ideal synchronous machine . . . . . 60

B MATLAB® codes 63B.1 m-file Run_Normal that runs the simulation in the normal condition . . . . . . . 63B.2 The MATLAB® S-function SF_Normal for simulation the converter in the normal

condition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64B.3 Embeded MATLAB function fcn used in SIMULINK model (figure 14 on page 25) 66B.4 m-file Run_Overlap_90 that runs the simulation in commutation condition . . . 67B.5 The MATLAB® S-function SF_Overlap_90 for commutation condition . . . . . 68

v

Page 7: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

List of Figures

1 Some devices that use DC-DC converter. . . . . . . . . . . . . . . . . . . . . . . 12 A basic buck converter circuit. . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 A basic buck converter circuit with LC filter. . . . . . . . . . . . . . . . . . . . . 34 Before 30 the dominant voltages are V2 and V3, V1 and V2 intersect at 30 then the

dominant voltages are V1 and V3. . . . . . . . . . . . . . . . . . . . . . . . . . . 75 Schematic diagram of the battery charger’s circuit with connected line impedance.(The

effect of the line impedance in the red boxes on the commutations in the diodes isneglected in the calculations of this chapter.) . . . . . . . . . . . . . . . . . . . . 8

6 Conducting states of the diode bridge for 30°≤ θ ≤ 390 °. . . . . . . . . . . . . 97 Conducting state of the diode bridge for 30°≤ θ ≤ 90 °. . . . . . . . . . . . . . . 118 Conducting state of diode bridge for 90 °≤ θ ≤ 150 °. . . . . . . . . . . . . . . 139 Conducting state of diode bridge for 150 °≤ θ ≤ 210 °. . . . . . . . . . . . . . . 1510 Conducting state of diode bridge for 210 °≤ θ ≤ 270 °. . . . . . . . . . . . . . . 1611 Conducting state of diode bridge for 270 °≤ θ ≤ 330 °. . . . . . . . . . . . . . . 1612 Conducting state of diode bridge for 330 °≤ θ ≤ 390 °. . . . . . . . . . . . . . . 1713 Simulation parameters of the SIMULINK model in figure 14. . . . . . . . . . . . 2514 Simulink block for the simulation of the three-phase battery charger in the normal

condition. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2515 Plot of the voltage across the capacitor C f . . . . . . . . . . . . . . . . . . . . . . 2616 Plot of the currents of the three phases iRsi or iLsi. . . . . . . . . . . . . . . . . . 2617 Plot of the current in battery branch. . . . . . . . . . . . . . . . . . . . . . . . . 2718 Commutation of the diodes at 90 (This figure is similar to figure 4.16 of [19]). . 2919 Line inductance causes six new states in conducting of the diodes. (The even states

represent the overlap (commutation) times) . . . . . . . . . . . . . . . . . . . . 3020 Equivalent circuit of a diode according to the PieceWise Linear Model. . . . . . . 3121 Real curve (Solid line) and approximated by the PWL model curve of diode (Dashed

line). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3122 Real curve (Solid line) and approximated by the PWL model curve of diode (Dashed

line) after removing the voltage source. . . . . . . . . . . . . . . . . . . . . . . 3223 Forward recovery process in a diode. (Figure 17.9(a) on page 485 of [10]) . . . . 3224 Hypothetical circuit for understanding the reverse recovery process. (Figure 17.10(a)

on page 487 of [10]) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3325 Reverse recovery process in a diode. (Figure 17.10(c) on page 487 of [10]) . . . . 3326 Equivalent circuit of converter in secondary side of transformer. . . . . . . . . . 3427 The impedance shown in (b) is equivalent to the impedance shown in (a). . . . . 3428 Complete equivalent circuit of the converter for studying the commutation condi-

tion at 90 (Diodes are replaced by their equivalent resistors). . . . . . . . . . . . 3529 Graph of the circuit in the commutation condition when switch S is ON. . . . . . 3530 Graph of the circuit in the commutation condition at 90 when switch S is OFF. . 3731 Simulink blocks of the converter in the commutation condition. . . . . . . . . . . 4532 Configuration of the simulation parameters in SIMULINK. . . . . . . . . . . . . 4633 Currents of the inductors in three phases. . . . . . . . . . . . . . . . . . . . . . . 4634 Currents of i1, iL2 and iC1 during the commutation at 90. . . . . . . . . . . . . . 4735 Currents of inductors in every three phases and real-time conduction condition of

the diodes Condition 7 means phases 1 and 3 are in forward direction and phase2 is in reverse direction, condition 8 means that all three phases are in forwarddirection (Temporary status which causes a short circuit between phase 2 and 3)and finally condition 5 means phase 1 and 2 are in the forward direction and phase3 is in reverse direction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

36 Voltage in the capacitor C1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4837 Voltages of the three-phase source in the vicinity of 90. . . . . . . . . . . . . . 50

vi

Page 8: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

38 Currents in the three line branches before, during and after the commutation of thediodes at 90. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

39 Voltage across the capacitor C1 before, during and after the commutation of thediodes at 90. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

40 Current in the line inductance Ls1 in four periods. . . . . . . . . . . . . . . . . . 5241 Voltage across the capacitor C1 during four periods. . . . . . . . . . . . . . . . . 5242 Current in the line inductance Ls1 in two periods (The initial values of the simula-

tion are taken from the final values of the states in 390 of the previous simulation.) 5343 Voltage across the capacitor C1 during two periods (The initial values of the simu-

lation are taken from the final values of the states in 390 of the previous simulation). 5344 Currents in the line inductances before, during and after commutation at 90 (The

values of currents before and after the commutation are taken from correspondingvalues at 150.). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

45 Voltage across the capacitor C1 before, during and after commutation at 90 (Thevalues of the voltages before and after the commutation are taken from corre-sponding values at 150.). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

46 Currents in the line inductances before, during and after the commutation at 90

with considering the resistance of the diodes in forward direction conducting ofthe normal mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

47 The voltage across the capacitor C1 before, during and after commutation at 90

with considering the resistance of the diodes in forward direction conducting ofthe normal mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

48 Park’s transformation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5849 Equivalent circuit for an ideal synchronous machine. . . . . . . . . . . . . . . . 6050 Park’s Transformation (The direct axis can consider as real axis). . . . . . . . . . 62

vii

Page 9: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

1 Introduction

Electrical power converters may cause harmonic distortion in the distribution system network(mains). This waveform distortion in current and voltage of the connected network may causeproblem for other devices (for example sophisticated communication devices) that are connectedto the same network. An efficient approach to diminish this effect is by an accurate design ofthe converters. One can design a controller for the converter to prevent it to produce waveformdistortion of the mains current and voltage and minimize the bad effects on other devices in thenetwork.

One needs a precise information about the performance of the converter under different situ-ations to be able to design an appropriate controller. The impetus behind the present thesis is tomathematically model a three-phase battery charger and simulate the linearized model. The studyplaces emphasis on the behavior of primary side of the converter in commutation of the diodes.

This paper first presents a quick overview of the DC-DC converters and then analyzes the bat-tery charger without considering the effects of the line impedance, then investigates the behaviorof the converter with considering the line inductance. Chapter four is the most important part ofthis thesis as, it took a lot of time for literature study and also programming in the S-functionmode of the MATLAB. A summary of previous chapters and also some experiments to examinethe accuracy of the Normal model and Commutation model are presented in chapter five. Themodel of three-phase converter which is based on the Hamiltonian-port model can use for designof the controller of the converter in future studies.

1.1 Introduction to DC converters

The need to convert a fixed-voltage DC to a variable-voltage DC is increasing in many industrialfields, even in our daily using devices or gadgets like laptops, desktop computers or mobile phoneswe need to have a DC voltage conversion. A DC-DC converter converts a DC voltage directly andit is simply called DC converter. It can be used to step down or step up a DC voltage.

DC converters are used widely in traction motor control in electrical automobiles, forklifts,marine cranes and new electric cars. They can provide smooth acceleration, high efficiency andquick dynamic response. DC-DC converters are used in battery chargers. Figure 1 shows somedevices that use DC-DC converters to control the traction motors.

Figure 1: Some devices that use DC-DC converter.

A battery charger can be seen as an AC to DC converter (Rectifier) plus a DC-DC converter.

1

Page 10: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

The AC-DC converter delivers an unregulated voltage Vmain to the DC-DC converter. The DC-DCconverter delivers a regulated voltage that differs from Vmain to the load. In our case the outputvoltage of the DC-DC converter is used to charge a battery.

1.1.1 Switching mode converters

A switching mode DC converters is used as a regulator to convert a non-regulated DC voltage toregulated one. This process can be achieved by use of PWM, where the switching frequency ishigh, in our case about 50 kHz. The switching devices are usually transistors of the types BJT,MOSFET or IGBT. The ripple can be reduced by an LC filter. The frequency of the PWM islimited by two factors; transistor switching time and core loss of the inductor. The losses in theswitches and in the inductors increase with the frequency [15]. A basic DC-DC converter circuitknown as the buck converter is illustrated in figure 2. A switch is connected to the DC input volt-age Vmain as shown.

Figure 2: A basic buck converter circuit.

When the switch is in position 1 for the duration DT1, the output voltage is equal to Vmain .In this case we have VL=Vmain-Vo, and this voltage causes a linear increase in the current throughthe inductor IL. The inductor L reduces the ripple current which causes the ripple voltage at theoutput to be less. When the switch is in position 1, the inductor current increases and causing moreenergy to be stored in the inductor.

When the switch is in position 0, because of the energy that is stored in the inductor, it actsas a source and maintains current through the load resistor and VL=-Vo for the duration of (1-D)Tuntil the switch is turned to position 1. It is important to note that there is continuous conductionthrough the load of this circuit. If the time constant due to the inductor and load resistor is rela-tively large compared to the period for which the switch is in position 1 or 0, then the rise and fallof current through the inductor is fairly linear, as shown in figure 2.

1.1.2 LC filter

The next step in the development of the buck converter is to add a capacitor across the load andthis circuit is shown in figure 3. The capacitor brings down the ripple content in voltage acrossit, since an inductor smooths the current passing through it. The co-operation of LC filter reduces

1D is the duty ratio and T = ton + to f f .

2

Page 11: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

the ripple in output to a low level [15].

Figure 3: A basic buck converter circuit with LC filter.

Equating the integral of the inductor voltage over one time period to zero yields:

∫ T

0VL dt =

∫ ton

0VL dt +

∫ to f f

0VL dt = 0 (1.1)

(Vmain−Vo)×DT +−(V0)× (1−D)T = 0 (1.2)

Where T = ton + to f f , Vmain is source voltage, Vo is voltage across the resistor R and VL is voltageacross the inductor L.

Vo = DVmain (1.3)

Vo

Vmain=

ton

T= D (1.4)

Where D is the duty ratio [15].

1.2 Problem definitions and aims

There is a discussion in [11] about oscillations in the feeding voltage. A battery charger mayamplify such oscillations or even cause unstable ones. It may be possible to control the batterycharger in a way that such oscillations are eliminated or reduced. There is a study about this issuein [21] that the authors have tried to solve this problem in a single-phase AC-DC converter.

This thesis wants to contribute to a study about how a DC-DC converter interacts with themains. Therefore a system is studied, where the system, called an AC-DC converter, comprisesof three feeding power lines, the rectifier and the DC-DC converter. The main problems of thethesis are how to make a model of the system and how to simulate the system for a typical case.Another aim of the thesis is to present a clear image of the behavior of the currents and voltagesin this particular time. We hope the thesis can be considered as a step forward to solve the originalproblem.

3

Page 12: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

2 Literature Review

There are several books and articles that have investigated the effects of the power converters onthe power line. These effects are originated from semiconductor switches in power converters.Distortion in the voltage waveform and high amount of harmonics on the current are some of theunacceptable effects of the converters. The components of the power line (transformers and ca-bles) can also cause these problems. Transformers have high value of inductance that in additionwith the inductance of the cables may cause problem for the semiconductor switches in the cur-rent commutation time. In this section the most related books and articles that have investigatedthe effect of the line inductance on the performance of the converters in commutation time, arecollected.

2.1 Effects of line impedance on performance of the converters

Source inductance2 slightly changes the performance of the rectifiers. In addition to 6 known con-ducting states (see figure 6 on page 9.) in a rectifier which a pair of diodes are conducting duringa period of time, the source inductance creates a new state; commutation state (see figure 19 onpage30.). The load current is being transferred or commutated from one diode to the another diodeduring this state. The inductance that produces this state is called commutating inductance (in thisthesis Ls) and the commutating reactance is Xs = ωLs[15].

One can find an explanation about “AC side reactance and current commutation” in section(3.3) of [10]. In subsection 4.3.2 of [10], there is a thorough theoretical explanation of the com-mutation state of a 6-pulse bridge rectifier. The three-phase voltage source is ∆-connected to afull-wave rectifier bridge with 6 diodes. A complete formulation for calculating of DC current3,µ4 and the DC voltage of a rectifier is also presented.

In section 4.2 of [19] there is a well-organized explanation for the commutation state of thephase-controlled rectifiers5. One can find the formulation of the instantaneous value of the com-mutation current and output DC current for the phase-controlled converters. The author of thebook explains this complicated state with the help of a graph and formulates also equations anduses these ones to give a clear image of the complicated state to the reader. Figure 4.16 of [19]is used in this report, see figure 18 on page 29, where some changes have been applied to thenotations according to the notations of the circuit of the battery charger in present thesis.

The operation of the converter in commutation state not only causes deformation of the DCoutput voltage, but also influences the mains (the AC terminal) voltage waveform. In subsection4.6.3 of [19] there is a study about this distortion and a possible solution to overcome this problem.The commutation between valves in a converter with AC side inductance (including line and trans-former’s inductance) causes notches on every voltage phase. The author of the book suggested twosolutions for this problem:1-Using phase inductors in series with AC side inductance. (Increase the line inductance)2-Inserting high pass capacitors.Figures 4.40 and 4.42 in [19] show the effects of the phase inductor on the waveform of the linevoltages. The authors claim that, “phase inductors prolong the commutation interval and at thesame time will be a reduction in the amplitude of the notches, because of the voltage divisionbetween the inductance of the phase inductor and the total inductance, the notches therefore willbe lower and wider.”(page 149 of the [19]). The electronic devices are more sensitive to the deepand steep notches of the voltage, so making these notches wider and lower can improve the power

2Inductance of transformer and cables that are connected to the converter (also is called line inductance).3DC output current of the rectifier.4The commutation interval.5Converters that use thyristor or other controllable valves instead of diodes.

4

Page 13: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

quality of the power network and provides more reliable voltage for the sensitive loads.

One of the first studies about the effects of the line inductance on the performance of therectifiers is [26]. The methods for calculating the voltage regulation had some limitations in theapplication due to the line inductance. The authors of this article tried to find a new formulation forthe voltage regulation of a three-phase full-wave rectifier (with 6 diodes) with considering the linereactance. Their article introduces the term “reactance factor”, which is commutated DC currentmultiply by commutating reactance, divided by transformer secondary line-to-neutral rms voltageat no load condition. They categorize the rectifiers in three main groups according to their “reac-tance factor”. The article ends up with a new formulation for voltage regulation and comparisonof laboratory and theoretical wave shapes, using the analog computer Anacom.

A recent study about the effects of the line inductance on a single-phase AC power supply [18]is also appropriate to mention. The authors use the HSPICE for simulation purpose. The articlestudies the voltage fluctuations of DC output by using resistors and compares the results with re-placing the resistors by inductors. The method of modeling of the power supply by splitting it intoan AC-DC converter and a DC-DC converter is interesting. They also considered three differentvoltage smoothing types (capacitor input, inductor input and PFC6 type) for DC output voltageof an AC-DC converter. They conclude about the capacitor type method (which is similar to thecase that is studied in this thesis): ”When the capacitance was large (5,10µF/W ) there was nosharp rise in voltage fluctuation. When capacitance is small (1,2µF/W ), a sharp rise in voltagefluctuations occurred changing the power line inductance.” The battery charger that is studied inthis thesis uses a 12.7µF capacitor.

Article [8] has investigated the operation of a three-phase bridge rectifier with complex sourceimpedance7. It concentrates on the effects of the source resistance ratio to the source reactanceon the behavior of rectifiers. It explains the important impact of the source resistor on the op-eration of the rectifier, when the source reactance is at least in order of magnitude smaller thanthe resistance of the source. The source resistance influences the high voltage/low voltage currentportion of the load characteristics. The authors have studied the operation of the uncontrolled(Rectifiers with diodes) and also controlled (Rectifiers with thyristors) converters in three differ-ent modes of conduction and formulated all three modes considering a complex source impedance.The most important conclusion of the article is that, when one deals with rectifiers with complexsource impedance, one cannot simply use the equations of the controlled converters by setting the“controlled-bridge firing angle” to zero, a new formulation for this situation is needed.

[2] presents a method to calculate exact values of voltage and current harmonics (waveformdistortion) produced by AC-DC converters. The article studies an AC-DC converter with con-sidering the line impedance. The purpose of this article is to ensure the level of harmonics in aconverter will not exceed the specify limits by regulations. It investigates this case by dividing aperiod of time T8, into twelve different states and explains which of diodes are conducting in everystate. The table that shows these states is also available in this thesis (table 4 on page 31). Theauthor suggests to analyze the currents, it is sufficient to calculate the currents in two consecutivestates due to the symmetry. The voltage of the three phases in the point Pcc (Pcc is the part of theconverter that is connected to the power line.) is calculated. This formulation is advantageous topredict the notches that are caused by a converter to the waveform of the AC line voltage.

6Power factor Correction.7Resistive and inductive source impedance.8T = 1/ f , f is the frequency of the power system.

5

Page 14: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

2.2 Simulation of the power electronics circuits

In chapter 4 of [13] which is a comprehensive book about Power Electronics, there is a completechapter about “Computer simulation of power electronic converters and systems”. This chapterdiscusses challenges in simulation of the power electronics circuits and then explains differenttechniques for simulation of the power electronics circuits. The power electronics circuits com-prise elements like; diodes, thyristors, MOS-FET and other solid state switches. Each combinationof the ON and OFF states of the switches corresponds to a special network and each such networkhas its own set of current and voltage equations. This makes the simulation process complicated.The challenges in simulation of these kinds of circuits can be caused by; nonlinearity of the solidstate switches, small time constant9, the lack of accurate model for switches and unknown initialvalues for states of the circuit. The book considers two main simulators; Circuit-oriented simu-lators and Equation solvers and compares the differences of these two simulators. SimPowerSys-tems™(A library of the Simulink) from MathWorks® and SPICE are well-known circuit-orientedsimulators and programming languages like MATLAB and Fortran can be considered as the equa-tion solver simulators. Modeling of the circuits with circuit-oriented software is easy and everychange in a circuit can be corrected easily, but a simulation of the power electronics circuit in thesekinds of simulators takes more time than equation solver programs. The equation solver programsare faster but one needs to convert a circuit to the mathematical equations (write current and volt-age equation (KCL and KVL)) to simulate a circuit. Every tiny change in the circuit causes somechanges in the KVL and KCL and as a result, new mathematical equations are needed. This thesisuses an equation solver program (MATLAB) for the simulation purpose.

9Small time constant needs a small time step for accurate resolution and results in a long time of simulation.

6

Page 15: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

3 Modeling and simulating the three-phase battery charger

3.1 Introduction

The effects of line impedance which will be discussed in chapter 4 in detail, make the simulationof a converter complicated. This thesis proposes a method to overcome this complication. Theidea is to divide the simulation into a normal and a commutation condition. Normal conditionmeans the time before and after intersection of two source voltages (See the area with label of“Normal 1” in figure 6 on page 9)and the commutation condition happens in vicinity of the inter-section of two source voltages (See figure 4 on page 7 for clarification.). This chapter focuses onthe normal condition and models and simulates the converter without considering the effect of theline impedance on the commutation of the diodes. In other words the assumption in this chapteris that the commutation of the currents in the diodes is instantaneous. Chapter 4 will analyze theconverter in the commutation condition. One can perform a full period simulation with combiningthese two conditions. In chapter 5 this idea will be discussed and the corresponding simulationwill perform.

Figure 4: Before 30 the dominant voltages are V2 and V3, V1 and V2 intersect at 30 then thedominant voltages are V1 and V3.

3.2 Modeling of the converter in the Normal condition

A battery charger can be considered as a combination of an AC-DC converter and a DC-DCconverter. Figure 5 illustrates a schematic circuit of this battery charger with the connected lineimpedance (The red boxes show the line impedance). The charger is fed by three conductors andwe idealize the situation and assume that these conductors come from a transformer and at thattransformer the voltages, V1, V2 and V3, are perfect sinusoidal and that they are mutually shifted120 degrees. In figures 4 and 6 we denote time in degrees instead of seconds because it is easier(360 corresponds to 20 ms). Figure 6 shows that during the time 30 and 90 degrees point A

′has

the highest voltage and that C′

has the lowest voltage. In this chapter we will simplify the modelof the system by assuming that during this time interval the diodes D1u and D3l are conducting,the other four diodes do not conduct. During the time interval 90 to 150 degrees we assume thediodes D1u and D2l conducts. From these two examples it should be clear how we assume thediodes are conducting (See also table 1). Because of resistances R1, R2 and R3 and inductancesLs1, Ls2 and Ls3 we know that the commutation will be much more complicated but we postpone

7

Page 16: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

this problem to chapter 4. The idea is, a model that assumes an instantaneous commutation in thediodes is valid for the time before and after the commutation (See the area with label of “Normal1” in figure 6 on page 9). The other function of the normal condition model is to find the initialvalues for the commutation condition model of converter.A schematic diagram of the battery charger is shown in figure 5.

Figure 5: Schematic diagram of the battery charger’s circuit with connected line impedance.(Theeffect of the line impedance in the red boxes on the commutations in the diodes is neglected in thecalculations of this chapter.)

Voltages in the points A, B and C in figure 5 decide how the diode bridge conducts. The equa-tions for the voltages in A, B and C points are:

VA =V1− (R1i1 +Ls1di1dt

) (3.1)

and we have:

i1 =φL1

Ls1(3.2)

So we will have:

VA =V1− (R1i1 +dφLs1

dt) (3.3)

And similarly:

VB =V2− (R2i2 +dφLs2

dt) (3.4)

VC =V3− (R3i3 +dφLs3

dt) (3.5)

Since for calculating the VA, VB and VC, one needs to know the currents through the lineresistors and line inductors (derivative of φLsi), so the process of voltage calculation in these threepoints seems very difficult. There is an explanation of how one can calculate these voltages insubsection 3.8.2.

Voltages VA,VB and VC will decide the switching time of the diodes in the MATLAB code. Onecan extract this vector from the S-Function, in SIMULINK and use it in voltage equations. For thecurrents of the three phases, one can use the second row of the ZaD, which represents the iRs1, thatis exactly the current through the line resistor Rs.

8

Page 17: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

3.3 Conducting states of the diode bridge

Figure 6 shows how one can consider six different conducting states for the diode bridge:

Figure 6: Conducting states of the diode bridge for 30°≤ θ ≤ 390 °.

Table 1 shows these six cases in more details:

Case number Angle Dominant Voltages Conducted Diodes1 30-90 VA, VC D1u, D3l

2 90-150 VA, VB D1u, D2l

3 150-210 VC, VB D3u, D2l

4 210-270 VC, VA D3u, D1l

5 270-330 VB, VA D2u, D1l

6 330-390 VB, VC D2u, D3l

Table 1: Six cases of conducting of the diodes.

One can assume the start point of the conduction of the diode bridge at the angle of 30 andthe end of the conducting 390 for one period. This period of time can be divided into the sixequal parts, which in every part, two of the three-phase voltages are dominant (Vmax and Vmin).

Vmax = max(VA,VB,VC)Vmin = min(VA,VB,VC) (3.6)

(For example in part 30°to 90°the dominant voltage with a positive sign (Vmax) is VA and the dom-inant voltage with a negative sign(Vmin) is VC.)

9

Page 18: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

3.3.1 Current and voltage equations (KCL and KVL)

One needs to derive the current equations (KCL) and the voltage equations (KVL) of the circuit ofthe converter to be able to model the converter. Table 2 shows the tree branches and table 3 showsthe link branches of the circuit in figure 5. The line impedance is also considered in the equationsof the current and voltage to have a complete model.

Tree branches number Branches1 bv1

2 bv3

3 bEB

4 bC

5 bC f

6 bLs1

7 bRc

8 bRs1

9 bRs3

Table 2: Branches of the circuit.

Number of Links Links10 bRB

11 bL,1

12 bLs3

Table 3: Links of the circuit.

Graphs 7a and 7b illustrate the conducting states of the diodes when 30°≤ θ ≤ 90°:

10

Page 19: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

1

0

bL,1

bRc

bRB

bCf

bC

bEB

bRs1

bLs1

bLs3

bRs3

bV1

bV3

(a) Switch is ON.1

0

bV3

bRc

bRB

bCf

bC

bEB

bL,0

bV1

bRs1

bLs1

bRs3b

Ls3

(b) Switch is OFF.

Figure 7: Conducting state of the diode bridge for 30°≤ θ ≤ 90 °.

The current and voltage equations for the graphs of figure 7 when Switch S is On are:

iv1iv3iEB

iCiC f

iLs1iRc

iRs1iRs3

=−

0 0 10 0 −1−1 0 01 −1 00 1 −10 0 11 −1 00 0 10 0 −1

iRB

iL,1iLs3

(3.7)

uRB

uL,1uLs3

=

0 0 −1 1 0 0 1 0 00 0 0 −1 1 0 −1 0 01 −1 0 0 −1 1 0 1 −1

uv1uv3uEB

uC

uC f

uLs1uRc

uRs1uRs3

(3.8)

The current and voltage equations for the graphs of figure 7 when Switch S is Off:

11

Page 20: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

iv1iv3iEB

iCiC f

iLs1iRc

iRs1iRs3

=−

0 0 10 0 −1−1 0 01 −1 00 0 −10 0 11 −1 00 0 10 0 −1

iRB

iL,0iLs3

(3.9)

uRB

uL,0uLs3

=

0 0 −1 1 0 0 1 0 00 0 0 −1 0 0 −1 0 01 −1 0 0 −1 1 0 1 −1

uv1uv3uEB

uC

uC f

uLs1uRc

uRs1uRs3

(3.10)

3.4 Elimination of the effect of switch S

The on and off states of the switch S make two different conditions for current and voltage equa-tions. As this thesis concentrates on the primary side of the converter, one can define the functionS(t) to combine On and off states of the circuit and eliminate more complication in the equations.According to this function, S(t)=1, implies the ’on’ state of the switch ’S’ and , S(t)=0, implies the’off’ state of the switch S. The duty cycle (the ratio of the duration of the event to the total periodof a signal) of this periodic event is dnT

T+dnT = 11+dn

. The value of the duty cycle is determined by thecontroller.

S(t) =

1 if nT < t ≤ nT +dnT0 if nT +dnT ≤ t < nT +T

(3.11)

After applying the function S(t), the equations of the currents will change to:

iv1iv3iEB

iCiC f

iLs1iRc

iRs1iRs3

=−

0 0 10 0 −1−1 0 01 −1 00 S(t) −10 0 11 −1 00 0 10 0 −1

iRB

iL,1iLs3

(3.12)

12

Page 21: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

And voltage equations will change to:

uRB

uL,1uLs3

=

0 0 −1 1 0 0 1 0 00 0 0 −1 S(t) 0 −1 0 01 −1 0 0 −1 1 0 1 −1

uv1uv3uEB

uC

uC f

uLs1uRc

uRs1uRs3

(3.13)

There are two combined equations (One KVL and one KCL with S(t) variable) for every con-ducting state of the diodes. For the sake of simplicity, one can write the integrated PWM equationsfor KVL and KCL for the rest of the cases.Case 2-ON, when 90 °≤ θ ≤ 150 °:The graphs of this case are illustrated in figure 8:

1

0

bL,1

bRc

bRB

bCf

bC

bEB

bV1

bLs1 b

Rs1

bV2

bLs2

bRs2

(a) ON.

1

0

bV2

bLs2

bRc

bRB

bCf

bC

bEB

bL,0

bRs2

bV1

bLs1

bRs1

(b) OFF.

Figure 8: Conducting state of diode bridge for 90 °≤ θ ≤ 150 °.

One can integrate the on and off states of this case by considering the PWM model. The com-bined equations are as follows:

13

Page 22: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

iv1iv2iEB

iCiC f

iLs1iRc

iRs1iRs2

=−

0 0 −10 0 −1−1 0 01 −1 00 S(t) −10 0 −11 −1 00 0 −10 0 −1

iRB

iL,1iLs2

(3.14)

uRB

uL,1uLs2

=

0 0 −1 1 0 0 1 0 00 0 0 −1 S(t) 0 −1 0 0−1 −1 0 0 −1 −1 0 −1 −1

uv1uv2uEB

uC

uC f

uLs1uRc

uRs1uRs2

(3.15)

The variable S(t) depends on the state of the switch.

3.4.1 A generic equation for the KVL and KCL of all the six cases

To have a complete model for a period of 30°to 390°, one should derive the equations of the currentand voltage for the four other conducting states of the diodes. As one can see from the two firstcases, the corresponding KCL and KVL matrices are the same and the only difference betweenthe two cases are the two dominant voltages. One can write a generic equation for the KVL andKCL which are valid for all the six phases of the diodes conducting. According to this idea oneshould choose two general variables V1(θ) and V2(θ) for two dominant voltages which depend onthe conducting times of the diodes.

iV1(θ)

iV2(θ)

iEB

iCiC f

iLs1iRc

iRs1iRs2

=−

0 0 −10 0 −1−1 0 01 −1 00 S(t) −10 0 −11 −1 00 0 −10 0 −1

iRB

iL,1iLs2

(3.16)

uRB

uL,1uLs2

=

0 0 −1 1 0 0 1 0 00 0 0 −1 S(t) 0 −1 0 0−1 −1 0 0 −1 −1 0 −1 −1

uV1(θ)

uV2(θ)

uEB

uC

uC f

uLs1uRc

uRs1uRs2

(3.17)

14

Page 23: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

The dominant voltages are defined as follows:

V1(θ) =

v1 30 ≤ θ < 90

v1 90 ≤ θ < 150

v2 150 ≤ θ < 210

v1 210 ≤ θ < 270

v1 270 ≤ θ < 330

v2 330 ≤ θ < 390

(3.18)

V2(θ) =

v3 30 ≤ θ < 90

v2 90 ≤ θ < 150

v3 150 ≤ θ < 210

v3 210 ≤ θ < 270

v2 270 ≤ θ < 330

v3 330 ≤ θ < 390

(3.19)

Graphs of the four remaining cases are shown respectively:

1

0

bL,1

bRc

bRB

bC

bEB

bV2

bV3

bLs2 b

Rs2

bCf

bRs3

bLs3

(a) ON.

1

0

bV2

bV3

bLs2

bRs2

bRc

bRB

bC

bEB

bCf

bL,0

bRs3

bLs3

(b) OFF.

Figure 9: Conducting state of diode bridge for 150 °≤ θ ≤ 210 °.

15

Page 24: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

1

0

bL,1

bRc

bRB

bC

bEB

bV1

bV3

bLs1 b

Rs1

bCf

bRs3

bLs3

(a) ON.

1

0

bV1

bV3

bLs1 b

Rs1

bRc

bRB

bC

bEB

bCf b

L,0

bRs3

bLs3

(b) OFF.

Figure 10: Conducting state of diode bridge for 210 °≤ θ ≤ 270 °.

1

0

bL,1

bRc

bRB

bC

bEB

bV1

bV2

bLs1

bRs1

bCf

bRs2

bLs2

(a) ON.

1

0

bV1

bV2

bLs1 b

Rs1

bRc

bRB

bC

bEB

bCf

bL,0

bRs2

bLs2

(b) OFF.

Figure 11: Conducting state of diode bridge for 270 °≤ θ ≤ 330 °.

16

Page 25: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

1

0

bL,1

bRc

bRB

bC

bEB

bV3

bV2

bLs3

bRs3

bCf

bRs2

bLs2

(a) ON.1

0

bV3

bV2

bLs3 b

Rs3

bRc

bRB

bC

bEB

bCf b

L,0

bRs2

bLs2

(b) OFF.

Figure 12: Conducting state of diode bridge for 330 °≤ θ ≤ 390 °.

3.5 Hamiltonian Systems

3.5.1 Introduction

This subsection recalls first the definition and assumptions on the Port-Hamiltonian systems. Thenthe dynamic equations are formulated in terms of the energy variables of elements (Charges ofcapacitors and the magnetic flux of the inductors), as a Hamiltonian system, see [25]. One of themain advantages of bond graph modeling is that it allows the modeler to really focus on the physicsof the object to be modeled, without being distracted by issues, which are related to the solutionprocess, see [5]. In Port-Controlled Hamiltonian (PCH), we use energy shaping techniques of anonlinear finite dimensional system. This method provides a simple procedure with high accuracyfor stabilization of nonlinear systems, see [22]

The Hamiltonian equations for a mechanical system are given as:

q =∂H∂ p

(q, p)

p = −∂H∂q

(q, p)+F(3.20)

The Hamiltonian H(q,p) is the total energy of the system, q=q(t) is generalized coordinatesand p=p(t) is generalized momenta. So we can write the equation 3.20 equivalently:

ddt

q(t) =∂

∂ pH(q(t), p(t), t),

ddt

p(t) = − ∂

∂qH(q(t), p(t), t)+F

(3.21)

One immediately derives the following energy balance:

ddt

H =∂ T H∂q

(q, p)q+∂ T H∂ p

(q, p)p =∂ T H∂ p

(q, p)F = qT F (3.22)

17

Page 26: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

We define e = q as output of the system:Equations 3.20 are given more generally in following form:

q =∂H∂ p

(q, p),(q, p) = (q1, ...,qk, p1, ..., pk)

p =−∂H∂q

(q, p)+B(q)F,F ∈ℜm

e = BT (q)∂H∂ p

(q, p),(= BT (q)q),e ∈ℜm

(3.23)

We obtained the energy balance of the system as:

∂H∂ t

(q(t), p(t)) = eT (t)F(t) (3.24)

Now, we come a step further and generalize the systems which we describe in local coordi-nates as:

x = J(x)∂H∂x

+g(x)F,x ∈ X ,F ∈ℜm

e = gT (x)∂H∂x

,e ∈ℜm(3.25)

Where J(x) is an n× n matrix that its entries depending on x, and also assume that J(x) is askew-symmetric matrix, J(x) = −J(x)T , and x=(x1,...,xn) are local coordinates. The system 3.25is called a Port-Hamiltonian system with structure matrix g(x) and Hamiltonian H, see [23] and[24].

In the Hamiltonian modeling, we go back to physics quantities, see [9], and use the physicalquantities, q the charge of the capacitors and φ the magnetic flux in the inductors.

q =Cuc,φ = LiL (3.26)

In appendix A of [11], a systematic step by step approach to model the electrical networks asa Hamiltonian system is presented.Kirchhoff’s current law implies that the sum of the currents through the branches of each funda-mental cut-set C j is zero. This implies:

iUiCilix

=−

QUY 0 QUL QUI

QCY QCc QCL QCI

0 0 QlL 0QXY 0 QXL QXI

iYiciLiI

=−Qlinks

iyiciLiI

(3.27)

Kirchhoff’s voltage law implies that the sum of the voltages across the branches along each loopLk is zero. This implies:

uY

uc

uL

uI

=−

QT

UY QTCY 0 QT

XY0 QT

Cc 0 0QT

UL QTCL QT

lL QTXL

QTUI QT

CI 0 QTXI

uU

uC

ui

uX

=−CTree

uU

uC

uluX

(3.28)

Now we can extract the matrices above by comparing the equations 3.16 and 3.17 and also 3.28and 3.27:

QCY =

(10

)(3.29)

QCL =

(−1 0S(t) −1

)(3.30)

18

Page 27: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

QuL =

0 10 −10 0

(3.31)

QUY =

00−1

(3.32)

QxY =

100

(3.33)

QxL =

−1 00 10 −1

(3.34)

With the chosen tree of the graph, Ls1, is an excessive inductance and we know that QlL, so wehave:

QlL =(0 1

)(3.35)

So according to [11] we have:

L = L+QTlLlQlL =

(L 00 Ls3

)+

(01

)Ls1(0 1

)=

(L 00 Ls3 +Ls1

)(3.36)

Mx = diag(C,L) (3.37)

Mx = diag(C, L) (3.38)

Mx =

C 0 0 00 C f 0 00 0 L 00 0 0 Ls3 +Ls1

(3.39)

3.6 Modeling the converter circuit as a DAE-System10:

In this section the procedure of making the Differential Algebraic Equations (DAE) of the sys-tem is presented. According to the appendix A in [11] one can make the variables which form theDifferential Algebraic Equations of the system, with the help of Q-matrices 3.29 to 3.39 as follows:

Mz = diag(R−1x ,RY ) =

1/RC 0 0 0

0 1/Rs1 0 00 0 1/Rs3 00 0 0 RB

(3.40)

Jx(S) =(

0CC −QCL(S)QT

CL 0LL

)=

0 0 1 00 0 −S(t) 1−1 S(t) 0 00 −1 0 0

(3.41)

N =−(

0CX −QCY

QTXL 0LY

)=−

0 0 0 −10 0 0 0−1 0 0 00 1 −1 0

(3.42)

10Differential-Algebraic Equation system

19

Page 28: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

Jz =

(0XX −QXY

QTXY 0YY

)=

0 0 0 −10 0 0 00 0 0 01 0 0 0

(3.43)

Bx =

(0CY −QCI

QTUL 0LI

)=

0 0 00 0 00 0 01 −1 0

(3.44)

Bz =

(0XU −QX IQT

UY 0Y I

)=

0 0 00 0 00 0 00 0 −1

(3.45)

JD =

(0UU −QUI

QTUI 0II

)=

0 0 00 0 00 0 0

(3.46)

Mz =

1/RC 0 0 0

0 1/Rs1 0 00 0 1/Rs3 00 0 0 RB

(3.47)

x = Jx(s)∂H(x)

∂x+(−N Bx

)(Mz−1zu

)(3.48)

(−zw

)=(−N Bx

)T ∂H(x)∂x

+

(−Jz −Bz

BTz −JD

)(Mz−1zu

)(3.49)

3.7 Linearization of the Hamiltonian system

Because of the switch ’S’, the equations (3.48) and (3.49) are not linear. For simulation purposesand also for finding a control law for the system, we need to linearize these equations.By the method that is proposed by [11], one can linearize the equations (3.48) and (3.49) aroundthe solution XaD:

xaD = Jx(D)M−1x xaD +

(−N Bx

)(Mz−1zaD

uD

)(3.50)

(−zaD

waD

)=(−N Bx

)T M−1x xaD +

(−Jz −Bz

BTz −JD

)(Mz−1zaD

uD

)(3.51)

Consider that we need to assume that the xaD is constant (xaD = 0).

20

Page 29: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

3.8 State-Space version of the equations of the system for using in the MATLAB®

simulation

To derive the State-Space version of the equations of this system one can define the matrices [11]:

Fx,x = (Jx(D)−NM−1z (I− JzM−1

z )−1NT )M−1x , (3.52)

Fx,u = (Bx−NM−1z (I− JzM−1

z )−1Bz), (3.53)

Fz,x = (I− JzM−1z )−1NT M−1

x , (3.54)

Fz,u = (I− JzM−1z )−1Bz. (3.55)

And for xaD, zaD and waD we have:

xaD = Fx,xxaD +Fx,uuaD (3.56)

zaD = Fz,xxaD +Fz,uuaD (3.57)

waD = BTx MxxaD +BT

z Mz−1zaD− JDuaD (3.58)

3.8.1 Symbolic Matlab

The Symbolic functionality of Matlab is utilized to manage the complex equations in this section.This feature is beneficial when one does not want to compute answer of equation numerically. Onecan define symbolic variables with syms command. Note that in this method there is no need todefine initial values for variables.

>> syms a b ;%defines symbolic variables a and b.

These symbolic objects (variables) can be used as ordinary variables to create vectors and ma-trices. One can also take advantage of Pretty command to have a mathematical typesetting viewof the symbolic expressions.

>> syms a b>> f=1/2*(a^2+b/2)

f =

a^2/2 + b/4

>> pretty(f)

2a b-- + -2 4

The other reason to choose this method in the MATLAB is the ability of MATLAB to convertthe symbolic expressions to the Latex codes, which has been very time-saving when this reportwas written.

21

Page 30: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

>> latex(f)

ans =

\fraca^22 + \fracb4

This command makes it very easy to write very long equations or formulas in the LATEX.The symbolic method of the MATLAB is used to derive the equations below:

xaD =

EBRB+Rc

− x1C(RB+Rc)

− x3Rc

Rc+RB−1

L

x4Ls1+Ls3

−S x3L

Sx2C f− EBRc

RB+Rc+

x1(Rc

RB+Rc−1)

C − RBRcx3L(RB+Rc)

V1(θ)−V2(θ)− x2C f− x4(Rs1+Rs3)

Ls1+Ls3

(3.59)

zaD =

EBRB+Rc

− x1C(RB+Rc)

+ RBx3L(RB+Rc)

− x4Ls1+Ls3

x4Ls1+Ls3

RBx1C(RB+Rc)

− EBRBRB+Rc

+ RBRcx3L(RB+Rc)

(3.60)

waD =

x4Ls1+Ls2

− x4Ls1+Ls2

RBx1C(RB+Rc)

− EBRBRB+Rc

+RBRcx3

L(RB+Rc)

RB

(3.61)

So xaD is the derivative of the state vector of the system, zaD is the output of the system, waD

demonstrates the currents of the main voltage source and the current of the battery, and finally, uis the vector that consists of three source voltages and the battery voltage.

3.8.2 States and Outputs of the system

The states matrix represents the charges of capacitors QC and the magnetic fluxes of inductors φL

as follows:

XaD =

x1x2x3x4

=

QC

QC f

φL

φLsi

=

CuC

C f uC f

LiLLsiiLsi

(3.62)

The matrix ZaD represents the output of the State-Space equation of the system:

22

Page 31: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

ZaD =

z1z2z3z4

=

iRc

iRs1iRs3

uRB

(3.63)

WaD =

iv1(θ)

iv2(θ)

iEB

(3.64)

uaD =

v1(θ)v2(θ)EB

(3.65)

One can use the equation 3.59 to calculate voltages VA, VB and VC (see equations 3.3-3.5 onpage 8). Equation 3.62 shows the states of the system, the forth state represents the magnetic fluxof the line inductor φLsi (i=1, 2, 3). The derivative of φLsi indicates the voltage across the inductorand φLsi

Lsiis the current through the inductor. This current is used as current of the line resistor when

the voltages VA, VB and VC are calculated.

3.9 Introduction to simulation

Simulation is a powerful tool to study the behavior of a system or can apply to the complex sys-tems that are impossible to solve mathematically. Simulation, according to [16], is "the processof designing a model of a real system and conducting experiments on this model for the purposeeither of understanding the behavior within the system or of evaluating various strategies (withinthe limits imposed by a criterion or set of criteria) for the operation of the system."In the other words, simulation is the imitation of the operation for a real-world process or systemover time, see [7] and [3].

3.9.1 Steps in a simulation study:

For every simulation process, we can consider the following steps, see [12]:

Step 1. Indicate the problem: Make a list of problems with an existing system. Produce require-ments for a proposed system. In my case, modeling of a three-phase battery charger is desired.

Step 2. Convert the problem into a mathematical formula for study: First we should select aboundary for the system or for the problem to be studied. Define and identify the configurationof interest and formulate hypotheses about system performance. Decide the time duration for thesimulation.

Step 3. Provide a model for system: Build a graph of the system and then translate this model toa simulation program. In this stage, the battery charger circuit is modeled as a Hamiltonian-portsystem. The steps to approach to the Hamiltonian-port system is presented in chapter 3 of thisthesis.

Step 4. Certify the model: Test the model’s behaviors under known conditions with the behav-iors of the real system. For example, if the system is modeled before by other methods, we cancompare the outputs of this model with the new one and investigate the results.

Step 5. Document the model for future study: One should write an accurate documentation indetail about objectives, assumptions and input variables of the model.

Step 6. Provide applicable conditions for runs: Select the simulation run length and chooseappropriate starting conditions.

Step 7. Run simulation: Finally run the simulation based on the steps 5-6 above.

23

Page 32: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

Step 8. Present the results: Calculate numerical estimates of the desired performance measurefor each configuration.

Step 9. Recommend for the future study: At the end of a successful simulation, one can includefurther comments for future study.

I have followed the mentioned steps in this chapter to simulate the converter.

3.10 Simulation with MATLAB® Simulink:

Simulink is a software package for modeling, simulating, and analyzing dynamical systems. Itprovides an interactive graphical environment and a customizable set of block libraries that letusers design, simulate, implement, and test a variety of time-varying systems, including commu-nications, controls, signal processing, video processing, and image processing, see [1].

3.10.1 Level-2 MATLAB® S-Functions

The Level-2 MATLAB® S-function API allows users to use the MATLAB® language to createcustom blocks with multiple input and output ports and capable of handling any type of signalproduced by a Simulink model, including matrix and frame signals of any data type. A Level-2 MATLAB® S-function is MATLAB® function that defines the properties and behavior of aninstance of a Level-2 MATLAB® S-Function block that references the MATLAB® function in aSimulink model. The MATLAB® function itself comprises of a set of callback methods that theSimulink engine invokes when updating or simulating the model. The callback methods performthe actual work of initializing and computing the outputs of the block defined by the S-function,see [1].

3.10.2 Simulation of the three-phase battery charger in Normal condition

This section demonstrates the simulation results of the linearized Hamiltonian model of a three-phase converter. To simulate the model, one can use the Matlab® SIMULINK blocks as is illus-trated in figure 14 and also used Level-2 MATLAB® S-Functions M-file to solve the state-spaceequations. The whole simulation process will run with the M-file Run_Normal.

3.10.3 Running the simulation

The M-file Run_Normal runs the SIMULINK model in figure 14, the level-2 S-function M-fileSF_Normal describes the states and outputs for the system and provides an LTI dynamic systemand the embedded function fcn defines the switching times of the diodes according to the dominantvoltage sources. The details of these three files are available in the appendix B.1, B.2 and B.3.The simulation starts at 0.016667 seconds which is the time corresponding to 30 and ends at0.0217 seconds which is the time corresponding to 390. Figure 13 indicates the parameters of thesimulation in the SIMULINK.

24

Page 33: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

Figure 13: Simulation parameters of the SIMULINK model in figure 14.

The voltage across the main capacitor C f , currents of the three phases and the current of thebattery are of interest. The voltage across the capacitor C f , can be calculated by dividing the totalcharge QC f (second state) of capacitor by its capacitance in Farad.

Scope1

Scope

Output1

z_aD

Level-2 M-fileS-Function1

SF_Normal

EmbeddedMATLAB Function

time

I

dI

y

r

fcn

Demux

Clock

0

Figure 14: Simulink block for the simulation of the three-phase battery charger in the normalcondition.

25

Page 34: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

Figure 15: Plot of the voltage across the capacitor C f .

The currents of the three phases can be calculated by dividing the magnetic flux φLs of inductorby its inductance.

Figure 16: Plot of the currents of the three phases iRsi or iLsi.

And finally the current in the battery is:

26

Page 35: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

Figure 17: Plot of the current in battery branch.

3.10.4 Summary

A three-phase AC-DC converter with the connected line impedance has been modeled and sim-ulated in this chapter. The simulation results in this chapter were according to the theoreticalcalculations. One can observe a fluctuation in the voltage and currents before the time correspond-ing to 90 (5 ms). This distortion will remain even in the next two periods of time in the simulation(every period of time is equal to 20 ms). One can find several approaches to find the origin of thesedistortions in more details in chapter 5. The waveform of the currents and the voltage across thecapacitor C f cannot be like figures 15 and 16 during the commutation time (When two dominantvoltages are about to change), due to the effect of the line impedance on the commutation time ofthe diodes. This issue will be studied in chapter 4 in more details for commutation of the diodes at90 and in chapter 5 there is a more realistic simulation for the converter before, during and afterthe time corresponding to 90.

27

Page 36: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

4 Study the behavior of the converter with considering the line in-ductance

In chapter 3 a successful simulation of a three-phase battery charger in the normal condition ispresented. In reality the line impedance can affect the performance of the converter. The lineimpedance can shift the commutation time of the diodes. It means that when two of source voltagesintersect, the currents of the lines cannot commutate instantaneously. This effect of line impedanceis discussed in this chapter. The battery charger that is discussed in chapter 3 will be modeled andsimulated again with the difference that, this time concentration is on a particular short time thatis called overlap time or commutation time. The main goal in this section is to model and simulatethe converter in the commutation condition to investigate the behavior of the line currents andrectified voltage across the capacitor C1.

4.1 Introduction

Source inductance11 slightly changes the performance of the rectifiers. Due to these inductances, acurrent of a diode cannot fall immediately, when two phase voltages intersect and the load currentis being transferred or commutated from one diode to another. This phenomenon adds six newstates to the six known states (see figure 6 on page 9 and compare it to figure 19 on page 30) inconverters which a pair of diodes conduct for a period of time, this new state is called commutationor overlap state. The inductance that produces this state is called commutating inductance (in thiscase Li (i=1, 2, 3)) and the commutating reactance is Xi = ωLi.

In the previous chapter, the assumption was the commutation of the diodes is immediate. Inreality the commutation is not instantaneous, it takes a certain time. This time depends on twofactors; the line inductances Li (i=1, 2, 3), which are located between the source voltages and therectifier, and the phase-to-phase voltage across the diodes that are active during the commutation.When the overlap happens, two diodes conduct at the same time and the phase-to-phase voltagedrops completely on the line inductance Li. In subsection 3.12 of [15] there is an explanation forthis phenomenon. This line inductance and its effect on the commutations of the valves (in thisthesis diodes) causes a voltage reduction in the DC output voltage of the rectifier. The voltage overL2 is (See the circuit in figure 18.):

VL2 = L2didt

(4.1)

With assumption of linear rise of current i from 0 to iDC we have:

didt

=∆i∆t

(4.2)

From 4.1 and 4.2 we can write:VL2∆t = L2∆i (4.3)

This commutation is repeated six times for a three-phase bridge with 6 diodes, so the averagevoltage reduction in the DC output voltage, Vx due to the commutating inductance is:

Vx =1T

2(VL1 +VL2 +VL3)∆t = 2 f (L1 +L2 +L3)iDC (4.4)

And in a symmetric three-phase system all the source inductances are equal, so:

Vx = 6 f LsiDC (4.5)

Vx is the reduction of the output voltage of the rectifier due to the commutation in the diodes, f isthe frequency of the line voltage (in our case f = 50Hz), see [15].

11Inductance of the transformers and conductors between the voltage source and the converter.

28

Page 37: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

This chapter studies the commutation when the effect of the line impedance is taken into con-sideration. We only study the commutation which happens at time 90 (5 ms), the commutationsat the other times, 90+(n ∗ 60) should be analogous. One can simulate a complete period ofperformance of the converter by implementing the procedure of this chapter for the other fivestates and run a simulation for a whole period of time. The step-by-step procedure for modelingthe circuit as a Hamiltonian-port system, which is used in this chapter is available in appendix Aof [11]. Subsection 4.2.1 describes the function of a diode and a useful method to approximatethis function. The nonlinear behavior of a diode during switching times is also discussed in thissubsection. The modeled circuit is simulated with the help of the S-function and SIMULINKfunctionality of the Matlab. The results of the simulation are in line with the theory and clearlyshows the effects of the line inductance on the line currents.

4.2 Study the behavior of the rectifier at 90

Before the time corresponding to 9012, the current i(t) (output current of the rectifier) is carriedby diode D3l . During the commutation time, the current i(t) has a non-zero value, the current iD3l

decreases and produces a voltage across the L3 (+Vo3) and output voltage will be : V1−3 +Vo3.Vi− j is the line to line voltage and defines as: Vi-Vj. The current iD2l trough D2l , increases fromzero, produces an analogous voltage across L2 of −Vo2; the output voltage will be V2−3−Vo2. Theresult is that the cathode voltage of diode D3l and D2l are equal; and both diodes conduct for acertain period which is called Commutation (or Overlap) angle µ .

Figure 18: Commutation of the diodes at 90 (This figure is similar to figure 4.16 of [19]).

In figure 19 one can observe the effects of the line inductance on the output voltage waveform.

12The time corresponding to a degree is calculated as follows:Frequency f=50 Hz, T = 1

f ,T=0.02.

Every period consist of 360 degrees, so every degree is equal to T360 = 0.02

360 =5.5×10−5 Seconds.For example time corresponding to 90 is 5.5×10−5×90 = 5×10−3 (5 ms).

29

Page 38: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

Figure 19: Line inductance causes six new states in conducting of the diodes. (The even statesrepresent the overlap (commutation) times)

During the commutation, two diodes conduct simultaneously and cause a short circuit betweenthe two voltages participating in the process for a short time. For example in figure 19, diodes D3land D2l conduct simultaneously and connect points B and C. D2l conducts in forward direction anddue to the effect of reverse recovery D3l conducts in reverse direction. This causes a short circuitbetween V2 and V3. Because we assume the inductance of the every line is equal (L1 = L2 = L3),the current isc (short circuit current) generates the same voltage drop across each inductor. Thisvoltage has the opposite sign of the voltage source, because the current isc flows in the reversedirection in each inductor. The phase with higher voltage (in this case V2) will have a voltage drop−∆V , and the phase with the lower voltage (in this case V3) will have a voltage rise +∆V .

(L2 +L3)disc

dt=√

2Vp−p sinωt =V2−V3 (4.6)

Where, vp−p is phase to phase voltage and isc is short circuit current. As, L1 = L2 = L3 and byintegrating isc with respect to time, we will have:

isc =−√

22L1

Vp−pcosωt

ω+C (4.7)

When isc reaches the value i(t) Diode D3l switches off, because diode cannot conduct in reversedirection. This “overlap” cause a reduction in the DC output voltage, see figure 4.16 of [19].

30

Page 39: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

State θ Diodes are conducting1 30°≤ θ ≤ 30°+ µ D1u, D2u, D3l

2 30°+ µ≤ θ ≤ 90° D1u, D3l

3 90°≤ θ ≤ 90°+ α D1u, D2l , D3l

4 90°+ µ≤ θ ≤ 150° D1u, D2l

5 150°≤ θ ≤ 150°+ µ D1u, D2u, D3l

6 150°+ µ≤ θ ≤ 210° D3u, D2l

7 210°≤ θ ≤ 210°+ µ D3u, D1i, D2l

8 210°+ µ≤ θ ≤ 270° D3u, D1l

9 270°≤ θ ≤ 270°+ µ D2u, D3u, D1l

10 270°+ µ≤ θ ≤ 330° D2u, D1l

11 330°≤ θ ≤ 330°+ µ D2u, D1l , D3l

12 330°+ µ≤ θ ≤ 390° D2u, D3l

Table 4: States of the diode conduction(µ is the angle of overlap).

4.2.1 Piecewise Linear model of diode

In practice to make the complicated nonlinear behavior of the diode simpler to study, one can usePieceWise Linear (PWL) model of a diode. In chapter 7 of [17] there are more interpretationsabout this model. One can approximate the exponential I-V characteristic curve of the diode withlinear segments. As the result the diode can be modeled as a voltage source,VD0, in series with aresistor.

Figure 20: Equivalent circuit of a diode according to the PieceWise Linear Model.

This model approximates a diode as a DC voltage source in series with a negligible resistorin forward direction and as a DC voltage source in series with a large value resistor in reversedirection. For the sake of simplicity, the PieceWise model of diode without DC voltage source isused in this thesis. Graphs 21 and 22 show how this approximation works.

Figure 21: Real curve (Solid line) and approximated by the PWL model curve of diode (Dashedline).

31

Page 40: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

Figure 22: Real curve (Solid line) and approximated by the PWL model curve of diode (Dashedline) after removing the voltage source.

4.3 Forward Recovery of Diode

Consider the ON state of the diode which the current of the diode rises instantly from zero to I f .As one can see from figure 23, the voltage across the diode first increases to a value Vf p whichis much higher than the steady-state forward voltage drop across the diode. This voltage then de-creases to the steady-state value Vf , which is determined by the forward current I f . This processis called forward recovery and Vp f is called forward recovery voltage.

Figure 23: Forward recovery process in a diode. (Figure 17.9(a) on page 485 of [10])

In section 17.3 of [10] there is a theoretical explanation for the forward recovery and reverserecovery of the diode. The explanation is based on the carrier concentration in the neutral regionof the diode.

4.4 Reverse Recovery

Consider the hypothetical circuit in figure 24, in t<0 a forward current VfR f

crosses the diode andthere is a voltage drop VD across the diode.

32

Page 41: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

Figure 24: Hypothetical circuit for understanding the reverse recovery process. (Figure 17.10(a)on page 487 of [10])

In time t=0 where switch S changes from state 0 to state 1, a negative voltage VR will fall acrossthe diode. In this situation diode will conduct in reverse condition and after a certain time (Reverserecovery time) it will block the channel. “Because the excess charge in the i region and diffusionregions of the diode cannot change instantaneously, the P+− i and i−n+ junction remain forwardbiased for some time after t=0.”, see Chapter 17 [10].

Figure 25: Reverse recovery process in a diode. (Figure 17.10(c) on page 487 of [10])

During this time (See also image 25), the voltage across the diode is almost zero, so the cur-rent of the diode is negative and equals −VR

RR. “This reverse (negative) current aids the removal

of excess charge, until the concentration at the SCL edge become negative and the junction canbegin to support a reverse voltage.” This process is called Reverse Recovery, see Chapter 17 [10].

4.5 Equivalent circuit

As the circuit is placed after a transformer with a voltage ratio of 13/3, one should use the equiva-lent values of the circuit components to achieve realistic results. The circuit in figure 26 is designed

33

Page 42: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

by Magnus Pihl in 2009, and Matz Lenells suggested to use its component values in my calcula-tion and simulation. The three-phase voltage source and its line inductance are replaced by V1 andL1.

Figure 26: Equivalent circuit of converter in secondary side of transformer.

Figure 27 explains how to calculate the equivalent impedance that can be seen from the pri-mary side of a transformer in the secondary side. If the voltage ratio of the transformer is N1/N2then the equivalent impedance Zeq of the primary side is seen in secondary side can be calculatedas:

Zeq = [N1

N2]2Z (4.8)

(a)

(b)

Figure 27: The impedance shown in (b) is equivalent to the impedance shown in (a).

The circuit in figure 28 illustrates the equivalent values of components of the circuit in sec-ondary side of the transformer. Note that the diodes are modeled as the piecewise linear model.

34

Page 43: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

+

+

+

....

0

1

..

S

Controller

V1

V2

V3

L11

L12

L13

C1

L2

R2

C2

E B

i(t) iL(t)

vo(t)

+

vc(t)

+-

-

-

R11

R12

R13

N

i1

RD2RD3

i2

i3

..

..

RD1

R1

Title

Author

File

Revision DateHES~1\Graphs\Circuit\LTSPIC~1\3PHASE~1.DSN

1.0

Figure 28: Complete equivalent circuit of the converter for studying the commutation condition at90 (Diodes are replaced by their equivalent resistors).

4.6 Modeling the converter in the commutation condition at 90

One needs to derive the current equations (KCL) and the voltage equations (KVL) of the circuitof the converter to be able to model the converter. The on and off states of the switch S maketwo different conditions for current and voltage equations. For each condition, there is a graph forwhich one can derive the equations based on Kirchhoffís law separately. Then one can derive anaverage conducting mode for the circuit. The graph 28 shows the circuit of the converter whenthe switch S is conducting. The procedure is same as discussed in section 3.3 for modeling thethree-phase converter in the normal condition. One can determine a new current direction in graph30 in compare to graphs of chapter 3 (for instance graphs in figure 7). I found the new currentdirection more practical for study the converter in commutation mode.

0

1 bL2,1

bR2

bC2

bEB

bC1

bR11

bL11

bL13

bL12

bV3

bV1

bV2

bR12

bRD3

bR13

bRD1

bRD2

bR1

Figure 29: Graph of the circuit in the commutation condition when switch S is ON.

35

Page 44: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

Name of theedge in thegraph

Name in schematiccircuit of the con-verter

Description

bv1 V1 V1 =Vm sin(2π f t)bv2 V2 V2 =Vm sin(2π f t− 2

3 π)

bv3 V3 V3 =Vm sin(2π f t− 43 π)

bL11 , bL12 , bL13 L11, L12,L13 Line inductancebR11 , bR12 , bR13 R11, R12, R13 Line resistancebRD1 , bRD2 , bRD3 RD1, RD2, RD3 Resistance of the diodes (In For-

ward bias RD = 0.05Ω, in Reversebias RD = 10kΩ)

bC1 C1 Bulk capacitorbL2,0 , bL2,1 L2 1:Switch S is ON, 0:Switch S is

OFFbC2 C2 Capacitor in parallel with the bat-

terybR1 R1 Resistor in series with the batterybEB EB BatterybR2 R2 Resistor in series with the battery

Table 5: Connection between schematic circuit (figure 28) of the converter and the graph 30 in thecommutation condition.

One can understand the connection between the circuit and the corresponding graph with the helpof table 5. The equations of currents for the graph 28 according to the Kirchhoff’s current law are:

iv1iv2iv3iEB

iC2iC1iL12

iR1iR11

iR12

iR13

iRD1

iRD2

iRD3

=−

0 0 −1 00 0 1 10 0 0 −1−1 0 0 01 −1 0 00 1 1 00 0 1 1−1 0 0 00 0 −1 00 0 1 10 0 0 −10 0 −1 00 0 1 10 0 0 −1

iR2iL2iL11

iL13

(4.9)

36

Page 45: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

According to the Kirchhoff’s voltage law for the graph 28:

uR2uL2uL11

uL13

=

0 0 0 −1 1 0 0 −1 0 0 0 0 0 00 0 0 0 −1 1 0 0 0 0 0 0 0 0−1 1 0 0 0 1 1 0 −1 1 0 −1 1 00 1 −1 0 0 0 1 0 0 1 −1 0 1 −1

uv1uv2uv3uEB

uC2uC1uL12

uR1uR11

uR12

uR13

uRD1

uRD2

uRD3

(4.10)

The graph 30 shows the circuit of the converter when the switch S is not conducting,

1

0

bR2

bC1

bC2

bEB

bL2,0

bR11

bL11

bL13

bL12

bV3

bV1

bV2

bR12

bRD3

bR13

bRD1

bRD2

bR1

Figure 30: Graph of the circuit in the commutation condition at 90 when switch S is OFF.

According to the Kirchhoff’s current law for the graph 30:

iv1iv2iv3iEB

iC2iC1iL12

iR1iR11

iR12

iR13

iRD1

iRD2

iRD3

=−

0 0 −1 00 0 1 10 0 0 −1−1 0 0 01 −1 0 00 0 1 00 0 1 1−1 0 0 00 0 −1 00 0 1 10 0 0 −10 0 −1 00 0 1 10 0 0 −1

iR2iL2iL11

iL13

(4.11)

37

Page 46: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

According to the Kirchhoff’s voltage law for the graph 30:

uR2uL2uL11

uL13

=

0 0 0 −1 1 0 0 −1 0 0 0 0 0 00 0 0 0 −1 0 0 0 0 0 0 0 0 0−1 1 0 0 0 1 1 0 −1 1 0 −1 1 00 1 −1 0 0 0 1 0 0 1 −1 0 1 −1

uv1uv2uv3uEB

uC2uC1uL12

uR1uR11

uR12

uR13

uRD1

uRD2

uRD3

(4.12)

4.7 Elimination of the effect of switch S

In section 3.4 of this thesis, there is an explanation of how to combine the equations of the voltageand currents for two conditions of the switch S by using the function S(t):

S(t) =

1 if nT < t ≤ nT +dnT0 if nT +dnT ≤ t < nT +T

(4.13)

After applying the function S(t), the current equations (4.9) and (4.11) will change to:

iv1iv2iv3iEB

iC2iC1iL12

iR1iR11

iR12

iR13

iRD1

iRD2

iRD3

=−

0 0 −1 00 0 1 10 0 0 −1−1 0 0 01 −1 0 00 S(t) 1 00 0 1 1−1 0 0 00 0 −1 00 0 1 10 0 0 −10 0 −1 00 0 1 10 0 0 −1

iR2iL2iL11

iL13

(4.14)

And voltage equations (4.10) and (4.12) will change to:

38

Page 47: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

uR2uL2uL11

uL13

=

0 0 0 −1 1 0 0 −1 0 0 0 0 0 00 0 0 0 −1 S(t) 0 0 0 0 0 0 0 0−1 1 0 0 0 1 1 0 −1 1 0 −1 1 00 1 −1 0 0 0 1 0 0 1 −1 0 1 −1

uv1uv2uv3uEB

uC2uC1uL12

uR1uR11

uR12

uR13

uRD1

uRD2

uRD3

(4.15)

4.7.1 Model the circuit as a Hamiltonian-Port system

For simulating the behavior of the circuit in commutation time, one can take advantage of theHamiltonian-Port model of the circuit. As mentioned before in section 3.5, one can use the sys-tematic and very well-structured procedure in appendix A of [11] to create a Hamiltonian-portmodel for an electrical circuit.

iUiCilix

=−

QUY 0 QUL QUI

QCY QCc QCL QCI

0 0 QlL 0QXY 0 QXL QXI

iYiciLiI

=−Qlinks

iYiciLiI

(4.16)

One can extract the Q matrices, by comparing the current equation of the converter (4.14), withequation (4.16). These matrices will be used to form the Hamiltonian equations of the system.

QCY =

(10

),QCL(S) =

(−1 0 0S(t) 1 0

),QUL =

0 −1 00 1 10 0 −10 0 0

,QUY =

000−1

,QXY =

−1000000

,QXL =

0 0 00 −1 00 1 10 0 −10 −1 00 1 10 0 −1

(4.17)

One can form the following matrices by help of extracting the Q matrices. These matrices will beused to produce the differential algebraic equations that, can be used in MATLAB codes.

Jx(S) =(

0CC −QCL

QTCL 0LL

)=

0 0 1 0 00 0 −S(t) −1 0−1 S(t) 0 0 00 1 0 0 00 0 0 0 0

(4.18)

N =−(

0CX −QCY

QTXL 0LY

)=−

0 0 0 0 0 0 0 −10 0 0 0 0 0 0 00 0 0 0 0 0 0 00 −1 1 0 −1 1 0 00 0 1 −1 0 1 −1 0

(4.19)

39

Page 48: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

Jz =

(0XX −QXY

QTXY 0YY

)=

0 0 0 0 0 0 10 0 0 0 0 0 00 0 0 0 0 0 00 0 0 0 0 0 00 0 0 0 0 0 00 0 0 0 0 0 00 0 0 0 0 0 0−1 0 0 0 0 0 0

(4.20)

Bx =

(0CU −QCI

QTUL 0LI

)=

0 0 0 00 0 0 00 0 0 0−1 1 0 00 1 −1 0

(4.21)

Bz =

(0XU −QXI

QTUY 0Y I

)=

0 0 0 00 0 0 00 0 0 00 0 0 00 0 0 00 0 0 00 0 0 00 0 0 −1

(4.22)

JD =

(0UU −QUI

QTUI 0II

)=

0 0 0 00 0 0 00 0 0 00 0 0 0

(4.23)

Mz = diag(R−1x ,RY ) =

1/R1 0 0 0 0 0 0 00 1/R11 0 0 0 0 0 00 0 1/R12 0 0 0 0 00 0 0 1/R13 0 0 0 00 0 0 0 1/RD1 0 0 00 0 0 0 0 1/RD2 0 00 0 0 0 0 0 1/RD2 00 0 0 0 0 0 0 R2

(4.24)

With the chosen tree of the graph, Ls2 is an excessive inductance and we know that QlL, so we have:

QlL =(1 1

)(4.25)

So according to [11]:

L = L+QTlLlQlL =

(L11 00 L13

)+

(11

)L12(1 1

)=

(L11 +L12 L12

L12 L13 +L12

)(4.26)

Mx = diag(C,L) (4.27)

Mx = diag(C, L) (4.28)

Mx =

C2 0 0 00 C1 0 00 0 L11 +L12 L120 0 L12 L13 +L12

(4.29)

40

Page 49: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

4.8 State-Space version of the equations of the system for using in the MATLAB®

simulation

In chapters two and seven of [6], there are comprehensive resources about the State-Variable andState-Space model of a dynamic system. There is a method to form a State-Variable system ofthis converter with the help of matrices which has been made previously in the appendix of [11].The equations can be written in special form to use in S-function of MATLAB. It is convenientto write a program in the form of the S-function with using the state-space version of the system.Equations (4.30) to (4.32) show how one can obtain the state-space version of the system withexisting matrices.

xaD = Fx,xxaD +Fx,uuaD (4.30)

zaD = Fz,xxaD +Fz,uuaD (4.31)

waD = BTx MxxaD +BT

z Mz−1zaD− JDuaD (4.32)

xaD is the derivative of the states and zaD is the output of the state-space system and uaD is the in-put of the system which in this case includes the input three-phase voltage and the battery voltage.Fx,x is called the system matrix, Fx,u is called the input matrix, Fz,x is called the output matrix andfinally Fz,u is called the direct forward matrix [6]. Charges of capacitor C2 and C1 and magneticflux of the inductors L2, L11 and L13 represent the states of the system (XaD):

XaD =

x1x2x3x4x5

=

QC2

QC1

φLs2φL11

φL13

=

C2uC2

C1uC1

L2iL2

L11iL11

L13iL13

(4.33)

The matrix ZaD represents the output of the State-Space equation of the system:

ZaD =

z1z2z3z4z5z6z7z8

=

iR1

iR11

iR12

iR13

iRD1

iRD2

iRD3

uR2

(4.34)

The matrix WaD represents a different form of the output of the State-Space equation of the system:

WaD =

iv1iv2iv3iEB

(4.35)

The matrix uaD represents the input of the State-Space equation of the system:

uaD =

V1V2V3

VEB

(4.36)

Define the matrices [11] and assume that R11 = R12 = R13 = Rs(line resistance) and L11 =L12 = L13 = Ls(line inductance):

41

Page 50: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

By using equations (4.18)-(4.28), one can obtain the equations which we need to form the State-Variable equation of the system.

Fx,x = (Jx(D)−NM−1z (I− JzM−1

z )−1NT )M−1x =

− 1C2(R1+R2) 0 1

L2 0 0

0 0 − SL2 − 2

3Ls1

3Ls

− 1C2

SC1 0 0 0

0 1C1 0 RD2+Rs

3Ls − 2(RD1+RD2+2Rs)3Ls

RD1+RD2+2Rs3Ls − 2(RD2+Rs)

3Ls

0 0 0 RD2+RD3+2Rs3Ls − 2(RD2+Rs)

3LsRD2+Rs

3Ls − 2(RD2+RD3+2Rs)3Ls

(4.37)

Fx,u = (Bx−NM−1z (I− JzM−1

z )−1Bz) =

0 0 0 1

R1+R20 0 0 00 0 0 0−1 1 0 00 1 −1 0

(4.38)

Fz,x = (I− JzM−1z )−1NT M−1

x =

1C2(R1+R2) 0 0 0 0

0 0 0 23Ls − 1

3Ls0 0 0 − 1

3Ls − 13Ls

0 0 0 − 13Ls

23Ls

0 0 0 23Ls − 1

3Ls0 0 0 − 1

3Ls − 13Ls

0 0 0 − 13Ls

23Ls

R2C2(R1+R2) 0 0 0 0

(4.39)

Fz,u = (I− JzM−1z )−1Bz =

0 0 0 − 1R1+R2

0 0 0 00 0 0 00 0 0 00 0 0 00 0 0 00 0 0 00 0 0 − R2

R1+R2

(4.40)

4.8.1 Derive System of Differential Equations for MATLAB® simulation

By replacing the equations (4.8)-(4.40) into equations (4.30)-(4.32):

42

Page 51: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

xaD =

EBR1+R2 +

x3L2 −

x1C2(R1+R2)

x53Ls −

2x43Ls −

Sx3L2

Sx2C1 −

x1C2

v2−v1+x4(

RD2+Rs3Ls − 2(RD1+RD2+2Rs)

3Ls

)−x5

(2(RD2+Rs)

3Ls − RD1+RD2+2Rs3Ls

)+ x2

C1

v2−v3−x4(

2(RD2+Rs)3Ls − RD2+RD3+2Rs

3Ls

)+x5

(RD2+Rs

3Ls − 2(RD2+RD3+2Rs)3Ls

)

(4.41)

zaD =

x1C2(R1+R2) −

EBR1+R2

2x43Ls −

x53Ls

− x43Ls −

x53Ls

2x53Ls −

x43Ls

2x43Ls −

x53Ls

− x43Ls −

x53Ls

2x53Ls −

x43Ls

R2x1C2(R1+R2) −

EBR2R1+R2

(4.42)

waD =

x53Ls −

2x43Ls

x43Ls +

x53Ls

x43Ls −

2x53Ls

EBR2R1+R2−

R2x1C2(R1+R2)

R2

(4.43)

Equations 4.8.1 to 4.43 are the final equations and they are used in the S-function code.

4.8.2 Voltage equations for inductors and diodes

The voltage across the diodes decides whether the diode should conduct or should block. Theprocedure of calculation of voltage across the diode is explained. One needs first to calculate thevoltage of the line inductances. According to equation 4.8.1, the voltages across the inductors L11and L13 can be written:

VL11 = v2−v1 +x2C1

+x4

(RD2+Rs

3Ls− 2RD1+2RD2+4Rs

3Ls

)+x5

(RD1+RD2+2Rs

3Ls− 2RD2+2Rs

3Ls

)(4.44)

VL13 = v2−v3 +x4

(RD2+RD3+2Rs

3Ls− 2RD2+2Rs

3Ls

)+x5

(RD2+Rs

3Ls− 2RD2+2RD3+4Rs

3Ls

)(4.45)

And from (4.15), voltage across the inductor L12 is:

VL12 =V1−V2−VC1 +VL12−VR11 +VR12−VRD1 +VRD2 (4.46)

43

Page 52: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

The diodes are modeled as the PieceWise Linear model and the DC voltage source is ignored, forthe sake of simplicity, the voltage across the RDi (i=1, 2, 3) for every diode represents the voltageof the diode. These voltages (V D1, V D2 and V D3) in the MATLAB code decide when a diodeshould conduct or go to the reverse mode.The KVL has been applied to obtain the voltages across the diodes. From equation (4.15):

V D1 =VRD1 =−V1 +V2 +VC1−VL11 +VL12−VR11 +VR12 +VRD2 (4.47)

V D2 =VRD2 =V1−V2−VC1 +VL11−VL12 +VR11−VR12 +VRD1 (4.48)

V D3 =VRD3 =V2−V3−VL13 +VL12−VR13 +VR12 +VRD2 (4.49)

44

Page 53: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

4.9 Simulation of the converter in the commutation condition at 90

This section presents the simulation of the converter with an AC side inductance at the commuta-tion time of the diodes. As discussed before, one expects a non-instantaneous shifting in currentsof the three phases. The inductance between the voltage source and the diodes (inductance intransformer and connected cables) has caused this phenomenon. The purpose of this study is toprove this theory by performing the simulation. The simulation is performed by MATLAB andthe equations of the commutation model of the converter are used in S-function file of MATLAB.

4.9.1 Interpretation of the simulation

The MATLAB code consists of three main parts; the first part is SIMULINK blocks, the secondpart is a Level-2 S-function and the last part is a m-file for defining the initial values, the periodand the method of the simulation. (See appendices B.4 and B.5 for MATLAB codes.)SIMULINK blocks:

Figure 31: Simulink blocks of the converter in the commutation condition.

The inputs (1, 2 and 3) represent the three-phase source voltage of the converter, which areused as inputs in S-function. The S-function (SF_Overlap_90) which is used in “Level-2 M-fileS-function” is shown in Appendix B.5. The output blocks (2 and 3) represent the conductionstate of the diodes during the simulation time. One can start the simulation by running the M-file“Run_Overlap_90” which contains the initial values for components of the circuit. One needs toconfigure the simulation parameters in the SIMULINK. The configuration in figure 32 is used forthe simulation parameters to obtain the maximum precision. The start time is the correspondingtime for 85 and stop time is the time corresponding to 95. The ode15s (stiff/NDF) is chosenas the equation solving method as this method is faster than ordinary ode45 which is used as thedefault equation solver by SIMULINK. For other important parameters, the Max step time is setto 0.000005 and Absolute tolerance is set to 1e-6.

45

Page 54: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

Figure 32: Configuration of the simulation parameters in SIMULINK.

The plot in figure 33 depicts the behavior of currents of the three phases. Observe that thesimulation runs between 85 to 95.

Figure 33: Currents of the inductors in three phases.

There is a sharp increase in the currents i2 and i1 at time 0.0052 (second), in this moment thereis a change in the conduction state of the diodes (See figure 35 in 5.2 ms.). This sudden change inthe switching of diodes from conduction mode to the blocking mode, may cause this immediaterise in the currents. However, I am not certain about the reason for this rise in the currents (seesubsection 5.5). An error in the model could be one reason. A simple check is done to see if oneof the nodes satisfies a basic assumption. Figure 34 illustrates the currents of phase one i1, currentof capacitor C1, and current of the inductor L2. This graph shows that the currents of our model atleast in one case follow Kirchhoff’s current law. We do believe that our model of the electrical netin this case satisfies the basic assumptions of Kirchhoff’s law but to be sure we should need to domuch more work.

46

Page 55: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

Figure 34: Currents of i1, iL2 and iC1 during the commutation at 90.

Figure 35 represents the conducting condition of diodes during the simulation time togetherwith the currents of the inductors of the three phases. The objective of this subplot is to investigatethe behavior of the currents in different conducting conditions of the diodes.

Figure 35: Currents of inductors in every three phases and real-time conduction condition of thediodesCondition 7 means phases 1 and 3 are in forward direction and phase 2 is in reverse direction,condition 8 means that all three phases are in forward direction (Temporary status which causes ashort circuit between phase 2 and 3) and finally condition 5 means phase 1 and 2 are in the forwarddirection and phase 3 is in reverse direction.

47

Page 56: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

Figure 36 shows the fluctuation of the voltage in the capacitor C1.

Figure 36: Voltage in the capacitor C1.

4.10 Summary

The effect of the line impedance on the commutation of the diodes in an AC-DC converter hasbeen studied in this chapter. One can consider six commutation states in a period of time (Seefigure 19 on page 30.). The commutation of the diodes in the time corresponding to 90 is chosento be studied in this chapter. The circuit of the converter in commutation time (When a shortcircuit happens between two source voltages) is modeled and simulated. Figures 33 and 36 showthe behavior of the currents of the three phases and the voltage across the capacitor C1 respectively.The pattern of the currents and the behavior of the voltage support the theory. One can performthe same procedure for the five other states of the commutation. In chapter 5 there is a successfulsimulation of the converter before, during and after the time corresponding to 90. One can run acomplete simulation of the converter by combining the six normal and six commutation models.

48

Page 57: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

5 Conclusion and summary

This chapter is a review of the previous chapters. It consists a general view to the main problem,the approach of the thesis for the solution, a conclusion and some suggestions for a future study.The subsection 5.3 is a study to examine the normal and commutation conditions models of theconverter.

5.1 Simulation of the converter without considering the effect of line impedance

The intention of chapter 3 is to simulate a three-phase battery charger to study the waveform ofthe voltages and currents of the three phases and also the behavior of the rectified voltage acrossthe capacitor C f . One needs a mathematical model of the converter to be able to simulate it. Theconverter is modeled as a Hamiltonian-Port model with the help of a systematic and step-by-stepmethod in the [11]. The main focus of this study is on the primary side of the converter, so foreliminating the complication of the switch net on the secondary side, this net is substituted by a lin-ear net which in average influences the primary side equal to the influence caused by the switchednet. The nonlinear model of the converter is replaced by a linear one which has an acceptableaccuracy in comparison with a nonlinear model of the converter. The equations of a State-Spaceversion of the linear model are derived. The symbolic functionality of MATLAB is used to handlethe complexity of the large equations. The model is simulated by Simulink and with the help ofS-Function in the MATLAB.

The results of the simulation are acceptable. The voltage across the capacitor C f and thecurrents of the three phases are acceptable according to the theoretical calculations. The effect ofthe line impedance on the commutation of the diodes is not taken into account in the modeling ofthe converter, therefore, one should be aware that values of currents and voltages in three phasescannot be true during commutation time. Although these results are not realistic, they can givegeneral information about the performance of the converter. One can use the values of the statesbefore the commutation time, as the initial values of the states during the commutation. There aresome distortions in the waveform of the outputs which may be caused by the use of numericalmethod of solving the differential equation or inaccurate initial values of the states. There is aninvestigation for finding the origin of this distortion in 5.3. (Figure 15 shows this distortion in theneighborhood of the time corresponding to 90 (5 milliseconds).)

5.2 Simulation of the converter during commutation time

Chapter 4 starts with a theoretical explanation of the effects of line impedance on the commuta-tions of the currents in the diodes. The line impedance reduces the value of the rectified voltage,the amount of this reduction is calculated. The phenomenon of the commutation (overlap) is alsoexplained by help of graphs of the waveforms. To have a better understanding of the behaviorof the diodes during their conducting and blocking states, the function of a diode is described,phenomena like Forward recovery and Reverse recovery are explained. Based on this descriptionthe Piecewise linear model of the diode is used to model the diodes of the converter. This approx-imation is accurate enough, while it makes the complicated model of diode simple.

The equivalent values of the circuit components after the transformer are used to have a real-istic result in the simulation. The procedure of modeling the converter is similar to the one usedin chapter 3. As has already been said in 3.4 the average effect caused by switch S is used whenthe process is modeled. The circuit is modeled as a Hamiltonian-Port system and the differentialequations of the model in the State-Variable form are derived. The voltages across the diodes de-cide when the diode should conduct and when it should block the branch, so the voltages acrossthe diodes are calculated and are used by the MATLAB code.

49

Page 58: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

The simulation process runs between 85-95, and during this time the commutation betweenthe diodes D3l and D2l occurs. During this time, we expect that the current in the branch of phase3 starts to decrease and reaches its final zero value in neighborhood of 90. According to figure 33,we can observe that i3 (the current in the branch of the phase 3) decreases gradually and reachesits final value after 90. This result supports the theory behind the converter with line inductance.As theoretically discussed previously, commutation in the diode D3l is not instantaneous and ittakes a certain time to turn off. The same result for currents in phases 1 and 2 (i1 and i2) can beconsidered. The current i2 starts to rise a moment after 90, but i2 stays almost constant during thecommutation.

5.3 Simulation of the battery charger before, during and after the commutationsof the diodes at 90

The intention of this section is to investigate the accuracy of the models that are used in thenormal and commutation states of the battery charger. The idea is to run the simulation before thecommutation at 90 with the normal condition model. The values of the states at 85 is used asthe initial values of the commutation model. We assume that the commutation condition will endat 95. The final values of the states in commutation condition will use as the initial values of thestates in the normal condition model to perform the simulation between 95 to 140. Figure 37illustrates the voltages of the three phases in the vicinity of 90. One can observe the normal andthe commutation conditions at 90.

Figure 37: Voltages of the three-phase source in the vicinity of 90.

One expects the currents in the diode do not commutate exactly at 90 because of the lineimpedance. Figure 38 shows how the currents commutate before, during and after the commuta-tion. The results during the commutation time confirm that the line impedances cause a delay intransferring the currents in the diodes. This delay is called commutation or overlap angle.

50

Page 59: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

Figure 38: Currents in the three line branches before, during and after the commutation of thediodes at 90.

The effect of the line impedance on the voltage of the capacitor that is located right after thediode bridge is also important to study. Figure 39 depicts this effect on the voltage across thecapacitor C1.

Figure 39: Voltage across the capacitor C1 before, during and after the commutation of the diodesat 90.

One observes a dip in the currents, see graph 38, and voltage, see graph 39, before 90.A longer simulation (for four periods) has been run to investigate how the current of the lineimpedance and voltage across the capacitor C1 will behave after one period of time.

51

Page 60: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

Figure 40: Current in the line inductance Ls1 in four periods.

Figure 41: Voltage across the capacitor C1 during four periods.

Figures 40 and 41 show that these dips in current and voltage waveform remain in the nextperiods. As the simulation in the normal mode starts with zero initial values for states, the wrongchoice of the initial values may cause these dips in the current and voltage. A simulation withinitial values for states equal to the final values of the states in 390 has performed. The reasonthat the values of the states in 390 are chosen is that the simulation in the normal mode starts at

52

Page 61: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

30 and after one period (360) it will repeat the values of the states at 30.

Figure 42: Current in the line inductance Ls1 in two periods (The initial values of the simulationare taken from the final values of the states in 390 of the previous simulation.)

Figure 43: Voltage across the capacitor C1 during two periods (The initial values of the simulationare taken from the final values of the states in 390 of the previous simulation).

53

Page 62: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

The results of the simulation in figures 42 and 43 depict the fact that the dips still remain inthe waveform even with the reasonable initial values of the states. I could not find a reason forthese dips and decided to use the values of the current and voltage at 150 instead of 90 to obtaina simulation result which seems to be more probable.

Figure 44: Currents in the line inductances before, during and after commutation at 90 (Thevalues of currents before and after the commutation are taken from corresponding values at 150.).

Figure 45: Voltage across the capacitor C1 before, during and after commutation at 90 (The valuesof the voltages before and after the commutation are taken from corresponding values at 150.).

One can see a smooth decrease in the current i3 and smooth increase in the current i1 beforethe commutation at 90 in figure 44. The voltage across the capacitor C1 also changes smoother infigure 45.

One can observe in figure 44 that the current at the beginning of the commutation mode doesnot follow the final value of the normal mode. This abrupt changes of the currents i1 and i3corresponds to a rapid change of the voltage across capacitor C1, see figure 45. The reason ofthese differences is that in the normal mode simulation the diodes are assumed to be ideal (without

54

Page 63: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

resistance in the forward conducting mode) but in commutation mode simulation value of 0.05 Ω isconsidered for the resistance of the forward conducting of the diodes. A new simulation in normalmode has been run to investigate the effect of resistance of the diodes on the discontinuity ofcurrent and voltage when it switches from the normal mode to the commutation mode. The valueof resistance in diodes in forward conduction (0.05 Ω) is added to the values of line resistance andthe simulation runs one more time.

Figure 46: Currents in the line inductances before, during and after the commutation at 90 withconsidering the resistance of the diodes in forward direction conducting of the normal mode.

55

Page 64: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

Figure 47: The voltage across the capacitor C1 before, during and after commutation at 90 withconsidering the resistance of the diodes in forward direction conducting of the normal mode.

One can observe the notches in currents and voltages before 5 ms in figures 44 and 45 do notexist in figures 46 and 47. The currents of the three phases and the voltage over capacitor C1 followtheir previous value in commutation mode.

5.4 Suggestion for the future studies

One can find an approach to simulate the converter in a period of the time in subsection 5.3. Themethod of extraction of data from one simulation and substitution to the next simulation is man-ual. I believe a program that automatically can extract data from normal condition simulation andsubstitute them in the commutation condition simulation would be complicated. One needs strongprogramming skills to write such a code.

The MATLAB code that performs the simulation for the normal condition is rather slow andneeds more optimized code to run faster. One with solid knowledge of the optimization of the al-gorithms of programs can help to rewrite a more efficient code. One can also write the S-functionsin the C or C++ language to accelerate the running time of the program.

In this thesis the converter is modeled by the help of a Hamiltonian-port modeling method.One can take advantage of the Park’s transformation method to convert a three-phase system to atwo-phase one. I tried to understand the concept of the Park’s transformation at the beginning ofthe thesis for simplifying the complicated three-phase system but did not succeed to implement theconcept of the Park’s transformation in my work. In Appendix A, one can find a short introduc-tion to this theory, that would be helpful for modeling the three-phase systems in the future studies.

5.5 Conclusion

Modeling and simulation of a three-phase AC-DC converter has been studied in this thesis. Thereis a study about modeling an AC-DC converter [21] with the same method for modeling the elec-

56

Page 65: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

trical circuit as is used in the current study, but in present thesis a three-phase converter with theconnected line impedance has been modeled. The method of modeling the converter is basedon a step-by-step procedure in appendix A of [11]. This procedure makes an energy-base Port-Hamiltonian model of the electrical circuit where the charges of the capacitors and the magneticflux of the inductors form the states of the system. A simulation of one period (20 ms) and a simu-lation in a certain range of time have been performed to investigate the certainty of the model. Thesimulation in one period (see chapter 3) has acceptable results except for a short transient beforetime corresponding to 90. A longer simulation (in four periods) and a simulation with initial val-ues from the end of a period have been performed, but these dips appeared in both simulations (seesubsection 5.3.). I consider this issue as one of the unsolved problems of this thesis. In chapter 4 asimulation has been performed in a very special range of the time to investigate the accuracy of themodel of converter during the commutation time. The outcomes of this simulation are supportedby the theory behind the commutation of the currents in the diodes. There is a sudden rise incurrents and voltages at a certain time in this simulation that may be caused by a sudden change ofconduction of the diodes from blocking mode to conducting mode. I consider this issue as anotherunsolved problems of this thesis. One can use the model of the converter in the future studiesto investigate the behavior of the converter, effect of external distortion on the application of theconverter and to find a controller that provides a better performance for the converter.

57

Page 66: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

AppendicesA Park’s Transformation

The dynamic performance of an AC machine is complex to analyze, because the three-phase wind-ings in the rotor rotate with respect to the three-phase windings in the stator. It can consider asa transformer with moving secondary side. So the coupling coefficient13 of the transformer willchange with the move of the rotor θr.

The model of such a machine can be described by differential equations with time-varyingmutual inductances. This model is so complicated and hard to study.R. H. Park introduced a method in 1920s to ease the equations by reducing the phases to twophases. He formulated a change of variable that, replaces the variables of the stator windings14

with variables associated with hypothetical windings rotating with the rotor at the synchronousspeed. In other words, he transformed the stator variables to a synchronously rotating referenceframe fixed to the rotor. From the rotor point of view, all the variables can be observed as constantvalues.

Although changes of variables are used for the analysis of AC machines to eliminate time-varying inductances, changes of variables are also employed for the analysis of various static andconstant parameters in power system components. With such a transformation, he showed that allthe time-varying inductances that occur due to an electrical circuit in relative motion and electricalcircuits with varying magnetic reluctance can be eliminated.Park’s transform or dq0 transform is projection of the phase quantities onto a rotating two-axisreference frame [4]. In three-phase systems it means that one can transfer three-phase stationaryreference frame (a-b-c) to the dq rotating coordinate system.

Figure 48: Park’s transformation.

Assume three-phase system: Xa = Xm sin(ωt)Xb = Xm sin(ωt− 2π

3 )

Xc = Xm sin(ωt + 2π

3 )

(A.1)

Park’s transformation defines:13The coefficient of coupling of a transformer depends on the portion of the total flux lines that cuts both primary

and secondary windings.14Voltage, current and flux linkage.

58

Page 67: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

[Xqd0

]= Tqd0(θ).

[Xabc

](A.2)

Where, [Xqd0

]=[xq xd x0

]T (A.3)

And, [Xabc

]=[Xa Xb Xc

]T (A.4)

Tqd0(θ) =23

cosθ cos(θ − 2π

3 ) cos(θ + 2π

3 )

sinθ sin(θ − 2π

3 ) sin(θ + 2π

3 )1/2 1/2 1/2

(A.5)

Where Xa, Xb and Xc are the variables of the three-phase stationary coordinate system, Xq, Xd andX0 are variables of the dq rotating coordinate system and θ is the angular displacement of Park’sreference frame and can be calculated by:

θ =∫ t

0ω(ζ )dζ +θ(0). (A.6)

where ζ is the dummy variable of integration. It can be shown that for the inverse transformation,we can write: [

Xabc]= T−1

qd0(θ).[Xqd0

](A.7)

Where:

T−1qd0(θ) =

cosθ −sinθ 1cos(θ − 2π

3 ) −sin(θ − 2π

3 ) 1cos(θ + 2π

3 ) −sin(θ + 2π

3 ) 1

(A.8)

The change of variables may be applied to variables of any waveform and time sequence; how-ever, we will find that the transformation given above is particularly appropriate for an a-b-csequence.[20]x0S is added as the zero sequence component, which may or may not be presented. It is convenientto set θ=0, so that the q-axis is aligned with the a-axis.So for Tqd0(θ) and T−1

qd0(θ) we will have:

Tqd0(θ) =23

1 −12 −1

20

√3

2 −√

32

12

12

12

(A.9)

T−1qd0(θ) =

1 0 1−1

2

√3

2 1−1

2 −√

32 1

(A.10)

Ignoring the zero sequence component, the transformation relation can be simplified as:Xa = Xqs

Xb =−1/2Xqs−√

3/2XdsXc =−1/2Xqs−

√3/2Xds

(A.11)

59

Page 68: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

And; Xqs = 2/3Xa− 1/3Xb− 1/3Xc = Xa

Xds =−1/√

3Xb + 1/√

3Xc(A.12)

A.1 Implementing Park’s Transformation for an ideal synchronous machine

In this section, the application of the Park’s Transformation [14], is presented by converting athree-phase system to a two-phase one.Figure 49 shows an equivalent circuit for an ideal synchronous machine, we define the followingquantities of the figure as:

• ia, ib, ic =Per unit instantaneous phase current.

• ea,eb,ec =Per unit instantaneous phase voltage.

• ψa,ψb,ψc=Per unit instantaneous phase linkage.

Figure 49: Equivalent circuit for an ideal synchronous machine.

Then the equations for the voltages of the phase are:ea =

ddt ψa− ria

eb =ddt ψb− rib

ec =ddt ψc− ric

(A.13)

Let the definition of the Park’s Transformation for the current, voltage and linkage be:

• id = 23 [ia cos(θ)+ ib cos(θ −120)+ ic cos(θ +120)]

• iq =−23 [ia sin(θ)+ ib sin(θ −120)+ ic sin(θ +120)]

• i0 = 13 (ia + ib + ic)

• ed = 23 [ea cos(θ)+ eb cos(θ −120)+ ec cos(θ +120)]

60

Page 69: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

• eq =−23 [ea sin(θ)+ eb sin(θ −120)+ ec sin(θ +120)]

• e0 =13 (ea + eb + ec)

• ψd = 23

[ψ a cos(θ)+ψb cos(θ −120)+ψc cos(θ +120)

]• ψq =−2

3 [ψa sin(θ)+ψb sin(θ −120)+ψc sin(θ +120)]

• ψ0 =13 (ψa +ψb +ψc)

Consider that θ is position of the axis of the rotor in electrical degree measured from the axisof phase a,From equation A.13 and implementing the Park’s Transformation:

ed = 2

3

[Cos(θ) d

dt ψa +Cos(θ −120) ddt ψb +Cos(θ +120) d

dt ψc]− rid

eq =−23

[Sin(θ) d

dt ψa +Sin(θ −120) ddt ψb +Sin(θ +120) d

dt ψc]− riq

e0 =ddt ψ0− ri0

(A.14)

But;

(A.15)

ddt

ψd =23

[Cos(θ)

ddt

ψa +Cos(θ − 120)ddt

ψb +Cos(θ + 120)ddt

ψc

]− 2

3[Sin(θ)ψa + Sin(θ − 120)ψb + Sin(θ + 120)ψc]

ddt

θ

= ed + rid + ψqddt

θ

(A.16)

ddt

ψq = −23

[Sin(θ)

ddt

ψa + Sin(θ − 120)ddt

ψb + Sin(θ + 120)ddt

ψc

]− 2

3[Cos(θ)ψa +Cos(θ − 120)ψb +Cos(θ + 120)ψc]

ddt

θ

= eq + riq − ψdddt

θ

Hence there is: ed = d

dt ψd− rid−ψqddt θ

eq =qdt ψq− riq−ψq

ddt θ

e0 =ddt ψ0− ri0

(A.17)

After the Direct(d), Quadrature(q) and Zero(0) quantities are known, the phase quantities may bedetermined from the identical relations:

ia = idCos(θ)− iqSin(θ)+ i0ib = idCos(θ −120)− iqSin(θ −120)+ i0ic = idCos(θ +120)− iqSin(θ +120)+ i0

(A.18)

ψa = ψdCos(θ)−ψqSin(θ)+ψ0ψb = ψdCos(θ −120)−ψqSin(θ −120)+ψ0ψc = ψdCos(θ +120)−ψqSin(θ +120)+ψ0

(A.19)

61

Page 70: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

ea = edCos(θ)− eqSin(θ)+ e0eb = edCos(θ −120)− eqSin(θ −120)+ e0ec = edCos(θ +120)− eqSin(θ +120)+ e0

(A.20)

According to figure 50 it can be seen that when, one ignores the zero quantities, e0 = i0 =ψ0 =0, the phase quantities can be regarded as the projection of vectors , and on axis lagging the directaxis by angles θ , (θ−120) and (θ +120). Where taking the direct axis as the axis of real, we have:

• e = ed + jeq

• ψ = ψd + jψq

• i = id + jiq

Figure 50: Park’s Transformation (The direct axis can consider as real axis).

So for equation A.17 we will have:

e =ddt

ψ− ri+[

ddt

]jψ (A.21)

62

Page 71: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

B MATLAB® codes

B.1 m-file Run_Normal that runs the simulation in the normal condition

%Runs a c o m p l e t e t h r e e phase c o n v e r t e r i n Normal c o n d i t i o n .c l e a r ;c l c ;C=45e 6 ;Cf =225e 6 ;L=18e 6 ;Ls1 =0 .2 e 6 ;Ls2 =0 .2 e 6 ;Ls3 =0 .2 e 6 ;RB=5.94 e 3 ;Rc =0;Rs1 =2.38 e 1 ;Rs2 =2.38 e 1 ;Rs3 =2.38 e 1 ;S = 0 . 5 ;EB=80;f =50;T=1/ f ;Tang=T / 3 6 0 ;i n t e r v a l = [30* Tang 390* Tang ] ;o p t i o n v e c = s i m s e t ( ’ maxstep ’ , 0 . 0 0 0 0 1 , ’ Re lTo l ’ ,1 e 6 , ’ AbsTol ’ ,1 e 6 ) ;[ t i x ]= sim ( ’ mdl_normal ’ , i n t e r v a l , o p t i o n v e c ) ;

%______________________________________________________________f i g u r e ( 1 ) ;p l o t ( t i , x ( : , 2 ) / Cf , ’ r ’ ) ;gr id on ;t i t l e ( ’ V o l t a g e ove r t h e main c a p a c i t o r ’ ) ;x l a b e l ( ’ Seconds ’ ) ;y l a b e l ( ’ V o l t s ’ ) ;l egend ( ’$V_ Cf $ ’ ) ;h = l egend ;s e t ( h , ’ i n t e r p r e t e r ’ , ’ l a t e x ’ ) ;

%%f i g u r e ( 2 )p l o t ( t i , x ( : , 4 ) / Ls1 , ’ b ’ ) ;gr id on ;t i t l e ( ’ C u r r e n t t h r o u g h t h e l i n e i n d u c t o r L_ s i ’ ) ;x l a b e l ( ’ Seconds ’ ) ;y l a b e l ( ’Amp( s ) ’ )l egend ( ’ $ \ ph i_ L s i $ ’ ) ;h = l egend ;s e t ( h , ’ i n t e r p r e t e r ’ , ’ l a t e x ’ ) ;

%%f i g u r e ( 3 )p l o t ( t i , x ( : , 3 ) ) ;gr id on ;t i t l e ( ’ F lux ove r i n d u c t o r L ’ ) ;x l a b e l ( ’ Seconds ’ ) ;l egend ( ’ $ \ ph i_ L$ ’ ) ;

63

Page 72: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

h = l egend ;s e t ( h , ’ i n t e r p r e t e r ’ , ’ l a t e x ’ ) ;

%%f i g u r e ( 4 )p l o t ( t i , z_aD ( : , 2 ) , ’ k ’ ) ;gr id on ;t i t l e ( ’ C u r r e n t i n e v e r y phase ’ )x l a b e l ( ’ Seconds ’ ) ;y l a b e l ( ’ Ampere ( s ) ’ ) ;l egend ( ’ $ i _ Rs i $ ’ ) ;h = l egend ;s e t ( h , ’ i n t e r p r e t e r ’ , ’ l a t e x ’ ) ;

%%W_ad = [ x ( : , 4 ) / ( Ls1+Ls3 ) x ( : , 4 ) / ( Ls1+Ls3 ) ( ( RB*x ( : , 1 ) ) / ( C*(RB

+ Rc ) ) (EB*RB) / ( RB + Rc ) + (RB*Rc*x ( : , 3 ) ) / ( L*(RB + Rc ) ) ) /RB x ( : , 1 ) * 0 ] ;

%%f i g u r e ( 5 )p l o t ( t i , W_ad ( : , 3 ) , ’ r ’ ) ;a x i s ( [ 0 . 0 0 4 0 .0217 5 0 1 0 ] ) ;gr id on ;t i t l e ( ’ C u r r e n t i n B a t t e r y ’ ) ;x l a b e l ( ’ Seconds ’ ) ;y l a b e l ( ’ Ampere ( s ) ’ ) ;l egend ( ’ $ \ i _ EB$ ’ ) ;h = l egend ;s e t ( h , ’ i n t e r p r e t e r ’ , ’ l a t e x ’ ) ;

%__________________________________________________________f i g u r e ( 7 )p l o t ( t i , x ) ;gr id on ;t i t l e ( ’ s t a t e s ’ )x l a b e l ( ’ Seconds ’ ) ;l egend ( ’ x1 ’ , ’ x2 ’ , ’ x3 ’ , ’ x4 ’ ) ;

B.2 The MATLAB® S-function SF_Normal for simulation the converter in the nor-mal condition

%L e v e l 2 _ S f u n c t i o n _ 3 p h a s e _ N o r m a l _ C o n d i t i o nf u n c t i o n SF_Normal ( b l o c k )s e t u p ( b l o c k )f u n c t i o n s e t u p ( b l o c k )b l o c k . NumDialogPrms =11;b l o c k . NumInpu tPor t s =1 ; %I n p u t p o r t ( Three phase v o l t a g e )b l o c k . NumOutputPor ts =1 ;%o u t p u t p o r tb l o c k . Se tPreCompInpPor t InfoToDynamic ;b l o c k . SetPreCompOutPor t InfoToDynamic ;b l o c k . I n p u t P o r t ( 1 ) . Dimens ions =1;b l o c k . I n p u t P o r t ( 1 ) . D i r e c t F e e d t h r o u g h = f a l s e ;

b l o c k . O u t p u t P o r t ( 1 ) . Dimens ions =5;b l o c k . SampleTimes =[0 0 ] ;% R e g i s t e r t h e sample t i m e s .

64

Page 73: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

b l o c k . NumContSta tes =4;% S e t up t h e c o n t i n u o u s s t a t e s X1 X4 .b l o c k . RegBlockMethod ( ’ I n i t i a l i z e C o n d i t i o n s ’ , @ I n i t C o n d i t i o n s ) ;b l o c k . RegBlockMethod ( ’ O u t p u t s ’ , @Output ) ;b l o c k . RegBlockMethod ( ’ D e r i v a t i v e s ’ , @Der iva t ive ) ;f u n c t i o n I n i t C o n d i t i o n s ( b l o c k )b l o c k . C o n t S t a t e s . Data ( 1 ) =0 ;b l o c k . C o n t S t a t e s . Data ( 2 ) =0 ;b l o c k . C o n t S t a t e s . Data ( 3 ) =0 ;b l o c k . C o n t S t a t e s . Data ( 4 ) =0 ;%D e f i n e t h e o u t p u t sf u n c t i o n Outpu t ( b l o c k )Rc = b l o c k . DialogPrm ( 1 ) . Data ;C = b l o c k . DialogPrm ( 2 ) . Data ;L = b l o c k . DialogPrm ( 3 ) . Data ;Ls1 = b l o c k . DialogPrm ( 4 ) . Data ;RB = b l o c k . DialogPrm ( 5 ) . Data ;Ls3 = b l o c k . DialogPrm ( 6 ) . Data ;EB = b l o c k . DialogPrm ( 7 ) . Data ;Rs1 = b l o c k . DialogPrm ( 8 ) . Data ;Rs3 = b l o c k . DialogPrm ( 9 ) . Data ;Cf = b l o c k . DialogPrm ( 1 0 ) . Data ;S = b l o c k . DialogPrm ( 1 1 ) . Data ;%S t a t e sx1= b l o c k . C o n t S t a t e s . Data ( 1 ) ;x2= b l o c k . C o n t S t a t e s . Data ( 2 ) ;x3= b l o c k . C o n t S t a t e s . Data ( 3 ) ;x4= b l o c k . C o n t S t a t e s . Data ( 4 ) ;

b l o c k . O u t p u t P o r t ( 1 ) . Data ( 1 ) =EB / ( RB + Rc ) x1 / ( C*(RB + Rc ) ) + (RB*x3 ) / ( L*(RB + Rc ) ) ;

b l o c k . O u t p u t P o r t ( 1 ) . Data ( 2 ) =x4 / ( Ls1 + Ls3 ) ;b l o c k . O u t p u t P o r t ( 1 ) . Data ( 3 ) =x4 / ( Ls1 + Ls3 ) ;b l o c k . O u t p u t P o r t ( 1 ) . Data ( 4 ) =(RB*x1 ) / ( C*(RB + Rc ) ) (EB*RB) / ( RB

+ Rc ) + (RB*Rc*x3 ) / ( L*(RB + Rc ) ) ;b l o c k . O u t p u t P o r t ( 1 ) . Data ( 5 ) =(S*x2 ) / Cf (EB*Rc ) / ( RB + Rc ) + ( x1

*( Rc / ( RB + Rc ) 1 ) ) / C (RB*Rc*x3 ) / ( L*(RB + Rc ) ) ;%3 rdd e r i v a t i v e

f u n c t i o n D e r i v a t i v e ( b l o c k )Rc = b l o c k . DialogPrm ( 1 ) . Data ;C = b l o c k . DialogPrm ( 2 ) . Data ;L = b l o c k . DialogPrm ( 3 ) . Data ;Ls1 = b l o c k . DialogPrm ( 4 ) . Data ;RB = b l o c k . DialogPrm ( 5 ) . Data ;Ls3 = b l o c k . DialogPrm ( 6 ) . Data ;EB = b l o c k . DialogPrm ( 7 ) . Data ;Rs1 = b l o c k . DialogPrm ( 8 ) . Data ;Rs3 = b l o c k . DialogPrm ( 9 ) . Data ;Cf = b l o c k . DialogPrm ( 1 0 ) . Data ;S = b l o c k . DialogPrm ( 1 1 ) . Data ;

y= b l o c k . I n p u t P o r t ( 1 ) . Data ;

65

Page 74: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

x1= b l o c k . C o n t S t a t e s . Data ( 1 ) ;x2= b l o c k . C o n t S t a t e s . Data ( 2 ) ;x3= b l o c k . C o n t S t a t e s . Data ( 3 ) ;x4= b l o c k . C o n t S t a t e s . Data ( 4 ) ;

b l o c k . D e r i v a t i v e s . Data ( 1 ) =EB / ( RB + Rc ) x1 / ( C*(RB + Rc ) ) ( x3* ( Rc / ( RB + Rc ) 1 ) ) / L ;

b l o c k . D e r i v a t i v e s . Data ( 2 ) =x4 / ( Ls1 + Ls3 ) S*x3 / L ;b l o c k . D e r i v a t i v e s . Data ( 3 ) =(S*x2 ) / Cf (EB*Rc ) / ( RB + Rc ) + ( x1 *(

Rc / ( RB + Rc ) 1 ) ) / C (RB*Rc*x3 ) / ( L*(RB + Rc ) ) ;b l o c k . D e r i v a t i v e s . Data ( 4 ) = y x2 / Cf ( x4 *( Rs1 + Rs3 ) ) / ( Ls1 +

Ls3 ) ;

B.3 Embeded MATLAB function fcn used in SIMULINK model (figure 14 on page25)

f u n c t i o n [ y , r ]= f c n ( t ime , I , d I )

Rs1=50e 3 ;

V1=380* s i n (100* pi * t ime +0) ;V2=380* s i n (100* pi * t ime +2*( pi / 3 ) ) ;V3=380* s i n (100* pi * t ime 2 * ( pi / 3 ) ) ;

max1=max ( V1 , V2 ) ;V_max=max ( max1 , V3 ) ;min1=min ( V1 , V2 ) ;V_min=min ( min1 , 3 ) ;

i f V1==V_max && V3==V_min %1

V_A=V1 ( Rs1* I + dI ) ;V_B=V2 ;V_C=V3 ( Rs1* I + dI ) ;

e l s e i f V1==V_max && V2==V_min %2

V_A=V1 ( Rs1* I + dI ) ;V_B=V2 ( Rs1* I + dI ) ;V_C=V3 ;

e l s e i f V3==V_max && V2==V_min %3

V_A=V1 ;V_B=V2 ( Rs1* I + dI ) ;V_C=V3 ( Rs1* I + dI ) ;

e l s e i f V3==V_max && V1==V_min %4

V_A=V1 ( Rs1* I + dI ) ;V_B=V2 ;V_C=V3 ( Rs1* I + dI ) ;

66

Page 75: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

e l s e i f V2==V_max && V1==V_min %5

V_A=V1 ( Rs1* I + dI ) ;V_B=V2 ( Rs1* I + dI ) ;V_C=V3 ;

e l s e V2==V_max && V3==V_min ; %6

V_A=V1 ;V_B=V2 ( Rs1* I + dI ) ;V_C=V3 ( Rs1* I + dI ) ;

end

MAX1=max (V_A, V_B) ;V_MAX=max (MAX1, V_C) ;MIN1=min (V_A, V_B) ;V_MIN=min ( MIN1 , V_C) ;y=V_MAX V_MIN ;

r =V_A;

B.4 m-file Run_Overlap_90 that runs the simulation in commutation condition

The MATLAB® m-file Run_Overlap_90 that runs the first simulation:

%Run_Overlap_90c l e a r ;c l c ;

%%C2=45e 6 ;C1=225e 6 ;L2=18e 6 ;Ls =0 .2 e 6 ;R2=5.44 e 3 ;R1 =0 .5 e 3 ;Rs=188e 3 ;RD1= 0 . 0 5 ;RDr1=1 e4 ;RD2= 0 . 0 5 ;RDr2=1 e4 ;RD3= 0 . 0 5 ;RDr3=1 e4 ;EB=80;T = 1 / 5 0 ;Tang=T / 3 6 0 ;V_D1=0;V_D2=0;V_D3=0;V_Ls1 =0;V_Ls2 =0;V_Ls3 =0;i n t e r v a l = [85* Tang 95* Tang ] ;

67

Page 76: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

S = 0 . 5 ;%%o p t i o n v e c = s i m s e t ( ’ maxstep ’ , ’ a u t o ’ , ’ Re lTo l ’ , ’ a u t o ’ ) ;[ t x ]= sim ( ’ Over lap_90 ’ , i n t e r v a l , o p t i o n v e c ) ;%__________________________________________f i g u r e ( 1 )s u b p l o t ( 2 , 1 , 1 )p l o t ( t , z_aD ( : , 2 ) , t , z_aD ( : , 3 ) , t , z_aD ( : , 4 ) ) ;t i t l e ( ’ C u r r e n t s i n t h e commuta t ion t ime a t 90 d e g r e e ’ )x l a b e l ( ’ Seconds ’ ) ;y l a b e l ( ’Amp( s ) ’ ) ;gr id onl egend ( ’ $ i _ 1 $ ’ , ’ $ i _ 2 $ ’ , ’ $ i _ 3 $ ’ ) ;h= l egend ;s e t ( h , ’ i n t e r p r e t e r ’ , ’ l a t e x ’ ) ;s u b p l o t ( 2 , 1 , 2 )p l o t ( t , C) ;t i t l e ( ’ Conduc t ion s t a t e s o f t h e d i o d e s ’ ) ;x l a b e l ( ’ Seconds ’ ) ;gr id on%__________________________________________

f i g u r e ( 2 )p l o t ( t , x ( : , 3 ) / L2 ) ;gr id onl egend ( ’ $ i _ L_2 $ ’ ) ;h= l egend ;s e t ( h , ’ i n t e r p r e t e r ’ , ’ l a t e x ’ ) ;

%__________________________________________f i g u r e ( 3 )p l o t ( t , x ( : , 2 ) / C1 ) ;t i t l e ( ’ V o l t a g e a c r o s s t h e c a p a c i t o r ’ ) ;x l a b e l ( ’ Seconds ’ ) ;y l a b e l ( ’ Vo l t ( s ) ’ ) ;gr id onl egend ( ’$V_C1$ ’ ) ;h= l egend ;s e t ( h , ’ i n t e r p r e t e r ’ , ’ l a t e x ’ ) ;

%______________________________________________f i g u r e ( 4 )p l o t ( t , ( ( ( EB*R2 ) / ( R1 + R2 ) ( R2*x ( : , 1 ) ) / ( C2 *( R1 + R2 ) ) ) / R2 ) ) ;gr id onl egend ( ’ $ i _ EB$ ’ ) ;h= l egend ;s e t ( h , ’ i n t e r p r e t e r ’ , ’ l a t e x ’ ) ;

B.5 The MATLAB® S-function SF_Overlap_90 for commutation condition

%L e v e l 2 _ S f u n c t i o n For 90 ’ o v e r l a p _ C o m p l e t ef u n c t i o n SF_Over lap_90 ( b l o c k )s e t u p ( b l o c k )f u n c t i o n s e t u p ( b l o c k )

% R e g i s t e r p a r a m e t e r s

68

Page 77: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

b l o c k . NumDialogPrms =21;b l o c k . NumInpu tPor t s =3 ; %I n p u t p o r tb l o c k . NumOutputPor ts =3 ;%o u t p u t p o r tb l o c k . Se tPreCompInpPor t InfoToDynamic ;b l o c k . SetPreCompOutPor t InfoToDynamic ;%_______________________________________________

b l o c k . RegBlockMethod ( ’ S e t I n p u t P o r t S a m p l i n g M o d e ’ ,@SetInputPor tSampl ingMode ) ;

b l o c k . RegBlockMethod ( ’ S e t I n p u t P o r t D i m e n s i o n s ’ , @SetInpPortDims) ;

b l o c k . RegBlockMethod ( ’ O u t p u t s ’ , @Output ) ;f u n c t i o n S e t I n p u t P o r t S a m p l i n g M o d e ( b lock , idx , fd )b l o c k . I n p u t P o r t ( i d x ) . SamplingMode = fd ;b l o c k . O u t p u t P o r t ( 1 ) . SamplingMode = fd ;b l o c k . O u t p u t P o r t ( 2 ) . SamplingMode = fd ;b l o c k . O u t p u t P o r t ( 3 ) . SamplingMode = fd ;

f u n c t i o n S e t I n p P o r t D i m s ( b lock , idx , d i )b l o c k . I n p u t P o r t ( i d x ) . Dimens ions = d i ;

%______________________________________________________b l o c k . I n p u t P o r t ( 1 ) . Dimens ions =1;b l o c k . I n p u t P o r t ( 1 ) . D i r e c t F e e d t h r o u g h = f a l s e ;b l o c k . I n p u t P o r t ( 2 ) . Dimens ions =1;b l o c k . I n p u t P o r t ( 2 ) . D i r e c t F e e d t h r o u g h = f a l s e ;b l o c k . I n p u t P o r t ( 3 ) . Dimens ions =1;b l o c k . I n p u t P o r t ( 3 ) . D i r e c t F e e d t h r o u g h = f a l s e ;b l o c k . O u t p u t P o r t ( 1 ) . Dimens ions =8;b l o c k . O u t p u t P o r t ( 2 ) . Dimens ions =1;b l o c k . O u t p u t P o r t ( 3 ) . Dimens ions =1;b l o c k . SampleTimes =[0 0 ] ;% R e g i s t e r t h e sample t i m e s .b l o c k . NumContSta tes =5;% S e t up t h e c o n t i n u o u s s t a t e s X1 X5b l o c k . RegBlockMethod ( ’ I n i t i a l i z e C o n d i t i o n s ’ , @ I n i t C o n d i t i o n s ) ;b l o c k . RegBlockMethod ( ’ O u t p u t s ’ , @Output ) ;b l o c k . RegBlockMethod ( ’ D e r i v a t i v e s ’ , @Der iva t ive ) ;%I n i t i a l v a l u e s f o r t e t a =85 d eg r eef u n c t i o n I n i t C o n d i t i o n s ( b l o c k )b l o c k . C o n t S t a t e s . Data ( 1 ) =3 .6173 e 0 0 3 ; %V_C2;% I n i t i a l charge f o r

C2 8 0 vb l o c k . C o n t S t a t e s . Data ( 2 ) =3 .5438 e 0 0 2 ; %V_C1;% I n i t i a l charge f o r

C1 1 5 0 vb l o c k . C o n t S t a t e s . Data ( 3 ) =1 .1765 e 0 0 3 ; %i n i t i a l m a g n e t i c

f i e l d f o r L2 0 Ab l o c k . C o n t S t a t e s . Data ( 4 ) = 6 . 3 7 4 6 e 0 0 6 ; %i n i t i a l m a g n e t i c f i e l d

f o r L_S11 1 0 Ab l o c k . C o n t S t a t e s . Data ( 5 ) =6 .3746 e 0 0 6 ; %i n i t i a l m a g n e t i c f i e l d

f o r L_S13 1 0 A%

__________________________________________________________________________

%D e f i n e t h e o u t p u t s [ z_aD ]f u n c t i o n Outpu t ( b l o c k )R1 = b l o c k . DialogPrm ( 1 ) . Data ;R2= b l o c k . DialogPrm ( 2 ) . Data ;

69

Page 78: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

Rs= b l o c k . DialogPrm ( 3 ) . Data ;RD1 = b l o c k . DialogPrm ( 4 ) . Data ;RD2 = b l o c k . DialogPrm ( 5 ) . Data ;RD3 = b l o c k . DialogPrm ( 6 ) . Data ;RDr1= b l o c k . DialogPrm ( 7 ) . Data ;RDr2= b l o c k . DialogPrm ( 8 ) . Data ;RDr3= b l o c k . DialogPrm ( 9 ) . Data ;C1= b l o c k . DialogPrm ( 1 0 ) . Data ;C2 = b l o c k . DialogPrm ( 1 1 ) . Data ;Ls = b l o c k . DialogPrm ( 1 2 ) . Data ;L2= b l o c k . DialogPrm ( 1 3 ) . Data ;EB= b l o c k . DialogPrm ( 1 4 ) . Data ;V_D1= b l o c k . DialogPrm ( 1 5 ) . Data ;V_D2= b l o c k . DialogPrm ( 1 6 ) . Data ;V_D3= b l o c k . DialogPrm ( 1 7 ) . Data ;V_Ls1= b l o c k . DialogPrm ( 1 8 ) . Data ;V_Ls2= b l o c k . DialogPrm ( 1 9 ) . Data ;V_Ls3= b l o c k . DialogPrm ( 2 0 ) . Data ;S= b l o c k . DialogPrm ( 2 1 ) . Data ;%___________________________________% S t a t e sx1= b l o c k . C o n t S t a t e s . Data ( 1 ) ;x2= b l o c k . C o n t S t a t e s . Data ( 2 ) ;x3= b l o c k . C o n t S t a t e s . Data ( 3 ) ;x4= b l o c k . C o n t S t a t e s . Data ( 4 ) ;x5= b l o c k . C o n t S t a t e s . Data ( 5 ) ;%___________________________________%Outpu t Z_aDb l o c k . O u t p u t P o r t ( 1 ) . Data ( 1 ) =x1 / ( C2 *( R1 + R2 ) ) EB / ( R1 + R2 ) ;b l o c k . O u t p u t P o r t ( 1 ) . Data ( 2 ) =(2* x4 ) / ( 3 * Ls ) x5 / ( 3 * Ls ) ;b l o c k . O u t p u t P o r t ( 1 ) . Data ( 3 ) = x4 / ( 3 * Ls ) x5 / ( 3 * Ls ) ;b l o c k . O u t p u t P o r t ( 1 ) . Data ( 4 ) =(2* x5 ) / ( 3 * Ls ) x4 / ( 3 * Ls ) ;b l o c k . O u t p u t P o r t ( 1 ) . Data ( 5 ) =(2* x4 ) / ( 3 * Ls ) x5 / ( 3 * Ls ) ;b l o c k . O u t p u t P o r t ( 1 ) . Data ( 6 ) = x4 / ( 3 * Ls ) x5 / ( 3 * Ls ) ;b l o c k . O u t p u t P o r t ( 1 ) . Data ( 7 ) =(2* x5 ) / ( 3 * Ls ) x4 / ( 3 * Ls ) ;b l o c k . O u t p u t P o r t ( 1 ) . Data ( 8 ) =(R2*x1 ) / ( C2 *( R1 + R2 ) ) (EB*R2 ) / ( R1

+ R2 ) ;b l o c k . O u t p u t P o r t ( 2 ) . Data ( 1 ) ;b l o c k . O u t p u t P o r t ( 3 ) . Data ( 1 ) ;%

__________________________________________________________________________

f u n c t i o n D e r i v a t i v e ( b l o c k )R1 = b l o c k . DialogPrm ( 1 ) . Data ;R2= b l o c k . DialogPrm ( 2 ) . Data ;Rs= b l o c k . DialogPrm ( 3 ) . Data ;RD1 = b l o c k . DialogPrm ( 4 ) . Data ;RD2 = b l o c k . DialogPrm ( 5 ) . Data ;RD3 = b l o c k . DialogPrm ( 6 ) . Data ;RDr1= b l o c k . DialogPrm ( 7 ) . Data ;RDr2= b l o c k . DialogPrm ( 8 ) . Data ;RDr3= b l o c k . DialogPrm ( 9 ) . Data ;

70

Page 79: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

C1= b l o c k . DialogPrm ( 1 0 ) . Data ;C2 = b l o c k . DialogPrm ( 1 1 ) . Data ;Ls = b l o c k . DialogPrm ( 1 2 ) . Data ;L2= b l o c k . DialogPrm ( 1 3 ) . Data ;EB= b l o c k . DialogPrm ( 1 4 ) . Data ;V_D1= b l o c k . DialogPrm ( 1 5 ) . Data ;V_D2= b l o c k . DialogPrm ( 1 6 ) . Data ;V_D3= b l o c k . DialogPrm ( 1 7 ) . Data ;V_Ls1= b l o c k . DialogPrm ( 1 8 ) . Data ;V_Ls2= b l o c k . DialogPrm ( 1 9 ) . Data ;V_Ls3= b l o c k . DialogPrm ( 2 0 ) . Data ;S= b l o c k . DialogPrm ( 2 1 ) . Data ;%_____________________________________%Three phase i n p u t v o l t a g ev1= b l o c k . I n p u t P o r t ( 1 ) . Data ;v2= b l o c k . I n p u t P o r t ( 2 ) . Data ;v3= b l o c k . I n p u t P o r t ( 3 ) . Data ;%_____________________________________%S t a t e sx1= b l o c k . C o n t S t a t e s . Data ( 1 ) ;x2= b l o c k . C o n t S t a t e s . Data ( 2 ) ;x3= b l o c k . C o n t S t a t e s . Data ( 3 ) ;x4= b l o c k . C o n t S t a t e s . Data ( 4 ) ;x5= b l o c k . C o n t S t a t e s . Data ( 5 ) ;%

__________________________________________________________________________

%C u r r e n t s i n e v e r y phaseI1 = b l o c k . O u t p u t P o r t ( 1 ) . Data ( 2 ) ;I3 = b l o c k . O u t p u t P o r t ( 1 ) . Data ( 4 ) ;I2 = b l o c k . O u t p u t P o r t ( 1 ) . Data ( 3 ) ;%

__________________________________________________________________________

%C o n d i t i o n s%1R , 2 F , 3 Ri f ( I1 >=0 && I2 >0 && I3 <=0)%F i r s tb l o c k . O u t p u t P o r t ( 3 ) . Data ( 1 ) =1 ;V_Ls1=v2 v1 + x4 * ( ( RD2 + Rs ) / ( 3 * Ls ) ( 2 * ( RDr1 + RD2 + 2*Rs ) )

/ ( 3 * Ls ) ) x5 * ( ( 2 * ( RD2 + Rs ) ) / ( 3 * Ls ) ( RDr1 + RD2 + 2*Rs )/ ( 3 * Ls ) ) + x2 / C1 ;

V_Ls3=v2 v3 x4 * ( ( 2 * ( RD2 + Rs ) ) / ( 3 * Ls ) (RD2 + RDr3 + 2*Rs )/ ( 3 * Ls ) ) + x5 * ( ( RD2 + Rs ) / ( 3 * Ls ) ( 2 * (RD2 + RDr3 + 2*Rs ) )/ ( 3 * Ls ) ) ;

V_Ls2=V_Ls1+v1 v2 ( x2 / C1 ) +( Rs* I1 ) ( Rs* I2 ) +( RDr1* I1 ) ( RD2* I2 ) ;V_D1=v2 v1+x2 / C1+V_Ls2 V_Ls1 +(RD2* I2 ) ( I1 *Rs ) +( I2 *Rs ) ;V_D2=v1 v2 +( RDr1* I1 ) +V_Ls1 V_Ls2 ( x2 / C1 ) +( Rs* I1 ) ( I2 *Rs ) ;V_D3=v2 v3+V_Ls2 +(RD2* I2 ) V_Ls3 +( I2 *Rs ) ( I3 *Rs ) ;%___________________________________%1R , 2 F , 3 Fe l s e i f ( I1 >=0 && I2 >0 && I3 >0)%Secondb l o c k . O u t p u t P o r t ( 3 ) . Data ( 1 ) =2 ;

71

Page 80: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

V_Ls1=v2 v1 + x4 * ( ( RD2 + Rs ) / ( 3 * Ls ) ( 2 * ( RDr1 + RD2 + 2*Rs ) )/ ( 3 * Ls ) ) x5 * ( ( 2 * ( RD2 + Rs ) ) / ( 3 * Ls ) ( RDr1 + RD2 + 2*Rs )/ ( 3 * Ls ) ) + x2 / C1 ;

V_Ls3=v2 v3 x4 * ( ( 2 * ( RD2 + Rs ) ) / ( 3 * Ls ) (RD2 + RD3 + 2*Rs )/ ( 3 * Ls ) ) + x5 * ( ( RD2 + Rs ) / ( 3 * Ls ) ( 2 * (RD2 + RD3 + 2*Rs ) ) / ( 3 *Ls ) ) ;

V_Ls2=V_Ls1+v1 v2 ( x2 / C1 ) +( Rs* I1 ) ( Rs* I2 ) +( RDr1* I1 ) ( RD2* I2 ) ;V_D1=v2 v1+x2 / C1+V_Ls2 V_Ls1 +(RD2* I2 ) ( I1 *Rs ) +( I2 *Rs ) ;V_D2=v1 v2 +( RDr1* I1 ) +V_Ls1 V_Ls2 ( x2 / C1 ) +( Rs* I1 ) ( I2 *Rs ) ;V_D3=v2 v3+V_Ls2 +(RD2* I2 ) V_Ls3 +( I2 *Rs ) ( I3 *Rs ) ;%___________________________________%1R , 2 R , 3 Fe l s e i f ( I1 >=0 && I2 <=0 && I3 >0)%3 t hb l o c k . O u t p u t P o r t ( 3 ) . Data ( 1 ) =3 ;V_Ls1=v2 v1 + x4 * ( ( RDr2 + Rs ) / ( 3 * Ls ) ( 2 * ( RDr1 + RDr2 + 2*Rs )

) / ( 3 * Ls ) ) x5 * ( ( 2 * ( RDr2 + Rs ) ) / ( 3 * Ls ) ( RDr1 + RDr2 + 2*Rs )/ ( 3 * Ls ) ) + x2 / C1 ;

V_Ls3=v2 v3 x4 * ( ( 2 * ( RDr2 + Rs ) ) / ( 3 * Ls ) ( RDr2 + RD3 + 2*Rs )/ ( 3 * Ls ) ) + x5 * ( ( RDr2 + Rs ) / ( 3 * Ls ) ( 2 * ( RDr2 + RD3 + 2*Rs ) )/ ( 3 * Ls ) ) ;

V_Ls2=V_Ls1+v1 v2 ( x2 / C1 ) +( Rs* I1 ) ( Rs* I2 ) +( RDr1* I1 ) ( RDr2* I2 ) ;V_D1=v2 v1+x2 / C1+V_Ls2 V_Ls1 +( RDr2* I2 ) ( I1 *Rs ) +( I2 *Rs ) ;V_D2=v1 v2 +( RDr1* I1 ) +V_Ls1 V_Ls2 ( x2 / C1 ) +( Rs* I1 ) ( I2 *Rs ) ;V_D3=v2 v3+V_Ls2 +( RDr2* I2 ) V_Ls3 +( I2 *Rs ) ( I3 *Rs ) ;%____________________________________%1R , 2 R , 3 Re l s e i f ( I1 >=0 && I2 <=0 && I3 <=0)%4 t hb l o c k . O u t p u t P o r t ( 3 ) . Data ( 1 ) =4 ;V_Ls1=v2 v1 + x4 * ( ( RDr2 + Rs ) / ( 3 * Ls ) ( 2 * ( RDr1 + RDr2 + 2*Rs )

) / ( 3 * Ls ) ) x5 * ( ( 2 * ( RDr2 + Rs ) ) / ( 3 * Ls ) ( RDr1 + RDr2 + 2*Rs )/ ( 3 * Ls ) ) + x2 / C1 ;

V_Ls3=v2 v3 x4 * ( ( 2 * ( RDr2 + Rs ) ) / ( 3 * Ls ) ( RDr2 + RDr3 + 2*Rs) / ( 3 * Ls ) ) + x5 * ( ( RDr2 + Rs ) / ( 3 * Ls ) ( 2 * ( RDr2 + RDr3 + 2*Rs ) )/ ( 3 * Ls ) ) ;

V_Ls2=V_Ls1+v1 v2 ( x2 / C1 ) +( Rs* I1 ) ( Rs* I2 ) +( RDr1* I1 ) ( RDr2* I2 ) ;V_D1=v2 v1+x2 / C1+V_Ls2 V_Ls1 +( RDr2* I2 ) ( I1 *Rs ) +( I2 *Rs ) ;V_D2=v1 v2 +( RDr1* I1 ) +V_Ls1 V_Ls2 ( x2 / C1 ) +( Rs* I1 ) ( I2 *Rs ) ;V_D3=v2 v3+V_Ls2 +( RDr2* I2 ) V_Ls3 +( I2 *Rs ) ( I3 *Rs ) ;%_____________________________________%1F , 2 F , 3 Re l s e i f ( I1 <0 && I2 >0 && I3 <=0)%5 t hb l o c k . O u t p u t P o r t ( 3 ) . Data ( 1 ) =5 ;V_Ls1=v2 v1 + x4 * ( ( RD2 + Rs ) / ( 3 * Ls ) ( 2 * (RD1 + RD2 + 2*Rs ) )

/ ( 3 * Ls ) ) x5 * ( ( 2 * ( RD2 + Rs ) ) / ( 3 * Ls ) (RD1 + RD2 + 2*Rs ) / ( 3 *Ls ) ) + x2 / C1 ;

V_Ls3=v2 v3 x4 * ( ( 2 * ( RD2 + Rs ) ) / ( 3 * Ls ) (RD2 + RDr3 + 2*Rs )/ ( 3 * Ls ) ) + x5 * ( ( RD2 + Rs ) / ( 3 * Ls ) ( 2 * (RD2 + RDr3 + 2*Rs ) )/ ( 3 * Ls ) ) ;

V_Ls2=V_Ls1+v1 v2 ( x2 / C1 ) +( Rs* I1 ) ( Rs* I2 ) +(RD1* I1 ) ( RD2* I2 ) ;V_D1=v2 v1+x2 / C1+V_Ls2 V_Ls1 +(RD2* I2 ) ( I1 *Rs ) +( I2 *Rs ) ;V_D2=v1 v2 +(RD1* I1 ) +V_Ls1 V_Ls2 ( x2 / C1 ) +( Rs* I1 ) ( I2 *Rs ) ;V_D3=v2 v3+V_Ls2 +(RD2* I2 ) V_Ls3 +( I2 *Rs ) ( I3 *Rs ) ;

72

Page 81: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

%______________________________________%1F , 2 R , 3 Re l s e i f ( I1 <0 && I2 <=0 && I3 <=0)%6 t hb l o c k . O u t p u t P o r t ( 3 ) . Data ( 1 ) =6 ;V_Ls1=v2 v1 + x4 * ( ( RDr2 + Rs ) / ( 3 * Ls ) ( 2 * (RD1 + RDr2 + 2*Rs ) )

/ ( 3 * Ls ) ) x5 * ( ( 2 * ( RDr2 + Rs ) ) / ( 3 * Ls ) (RD1 + RDr2 + 2*Rs )/ ( 3 * Ls ) ) + x2 / C1 ;

V_Ls3=v2 v3 x4 * ( ( 2 * ( RDr2 + Rs ) ) / ( 3 * Ls ) ( RDr2 + RDr3 + 2*Rs) / ( 3 * Ls ) ) + x5 * ( ( RDr2 + Rs ) / ( 3 * Ls ) ( 2 * ( RDr2 + RDr3 + 2*Rs ) )/ ( 3 * Ls ) ) ;

V_Ls2=V_Ls1+v1 v2 ( x2 / C1 ) +( Rs* I1 ) ( Rs* I2 ) +(RD1* I1 ) ( RDr2* I2 ) ;V_D1=v2 v1+x2 / C1+V_Ls2 V_Ls1 +( RDr2* I2 ) ( I1 *Rs ) +( I2 *Rs ) ;V_D2=v1 v2 +(RD1* I1 ) +V_Ls1 V_Ls2 ( x2 / C1 ) +( Rs* I1 ) ( I2 *Rs ) ;V_D3=v2 v3+V_Ls2 +( RDr2* I2 ) V_Ls3 +( I2 *Rs ) ( I3 *Rs ) ;%_______________________________________%1F , 2 R , 3 Fe l s e i f ( I1 <0 && I2 <=0 && I3 >0)%7 t hb l o c k . O u t p u t P o r t ( 3 ) . Data ( 1 ) =7 ;V_Ls1=v2 v1 + x4 * ( ( RDr2 + Rs ) / ( 3 * Ls ) ( 2 * (RD1 + RDr2 + 2*Rs ) )

/ ( 3 * Ls ) ) x5 * ( ( 2 * ( RDr2 + Rs ) ) / ( 3 * Ls ) (RD1 + RDr2 + 2*Rs )/ ( 3 * Ls ) ) + x2 / C1 ;

V_Ls3=v2 v3 x4 * ( ( 2 * ( RDr2 + Rs ) ) / ( 3 * Ls ) ( RDr2 + RD3 + 2*Rs )/ ( 3 * Ls ) ) + x5 * ( ( RDr2 + Rs ) / ( 3 * Ls ) ( 2 * ( RDr2 + RD3 + 2*Rs ) )/ ( 3 * Ls ) ) ;

V_Ls2=V_Ls1+v1 v2 ( x2 / C1 ) +( Rs* I1 ) ( Rs* I2 ) +(RD1* I1 ) ( RDr2* I2 ) ;V_D1=v2 v1+x2 / C1+V_Ls2 V_Ls1 +( RDr2* I2 ) ( I1 *Rs ) +( I2 *Rs ) ;V_D2=v1 v2 +(RD1* I1 ) +V_Ls1 V_Ls2 ( x2 / C1 ) +( Rs* I1 ) ( I2 *Rs ) ;V_D3=v2 v3+V_Ls2 +( RDr2* I2 ) V_Ls3 +( I2 *Rs ) ( I3 *Rs ) ;%________________________________________%1F , 2 F , 3 Fe l s eb l o c k . O u t p u t P o r t ( 3 ) . Data ( 1 ) =8 ;V_Ls1=v2 v1 + x4 * ( ( RD2 + Rs ) / ( 3 * Ls ) ( 2 * (RD1 + RD2 + 2*Rs ) )

/ ( 3 * Ls ) ) x5 * ( ( 2 * ( RD2 + Rs ) ) / ( 3 * Ls ) (RD1 + RD2 + 2*Rs ) / ( 3 *Ls ) ) + x2 / C1 ;

V_Ls3=v2 v3 x4 * ( ( 2 * ( RD2 + Rs ) ) / ( 3 * Ls ) (RD2 + RD3 + 2*Rs )/ ( 3 * Ls ) ) + x5 * ( ( RD2 + Rs ) / ( 3 * Ls ) ( 2 * (RD2 + RD3 + 2*Rs ) ) / ( 3 *Ls ) ) ;

V_Ls2=V_Ls1+v1 v2 ( x2 / C1 ) +( Rs* I1 ) ( Rs* I2 ) +(RD1* I1 ) ( RD2* I2 ) ;V_D1=v2 v1+x2 / C1+V_Ls2 V_Ls1 +(RD2* I2 ) ( I1 *Rs ) +( I2 *Rs ) ;V_D2=v1 v2 +(RD1* I1 ) +V_Ls1 V_Ls2 ( x2 / C1 ) +( Rs* I1 ) ( I2 *Rs ) ;V_D3=v2 v3+V_Ls2 +(RD2* I2 ) V_Ls3 +( I2 *Rs ) ( I3 *Rs ) ;end%

___________________________________________________________________________

b l o c k . D e r i v a t i v e s . Data ( 1 ) =EB / ( R1 + R2 ) + x3 / L2 x1 / ( C2 *( R1 + R2) ) ;

b l o c k . D e r i v a t i v e s . Data ( 2 ) =x5 / ( 3 * Ls ) (2* x4 ) / ( 3 * Ls ) ( S*x3 ) / L2 ;b l o c k . D e r i v a t i v e s . Data ( 3 ) =(S*x2 ) / C1 x1 / C2 ;%__________________________________%1R , 2 F , 3 R

73

Page 82: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

i f ( V_D1>0 && V_D2>0 && V_D3<=0)%1 s t ( I1 <0 && I2 <0 && I3 >0)b l o c k . O u t p u t P o r t ( 2 ) . Data ( 1 ) =1 ;b l o c k . D e r i v a t i v e s . Data ( 4 ) =v2 v1 + x4 * ( ( RD2 + Rs ) / ( 3 * Ls ) ( 2 * (

RDr1 + RD2 + 2*Rs ) ) / ( 3 * Ls ) ) x5 * ( ( 2 * ( RD2 + Rs ) ) / ( 3 * Ls ) (RDr1 + RD2 + 2*Rs ) / ( 3 * Ls ) ) + x2 / C1 ;

b l o c k . D e r i v a t i v e s . Data ( 5 ) =v2 v3 x4 * ( ( 2 * ( RD2 + Rs ) ) / ( 3 * Ls )(RD2 + RDr3 + 2*Rs ) / ( 3 * Ls ) ) + x5 * ( ( RD2 + Rs ) / ( 3 * Ls ) ( 2 * (RD2+ RDr3 + 2*Rs ) ) / ( 3 * Ls ) ) ;

%___________________________________%1R , 2 F , 3 Fe l s e i f ( V_D1>0 && V_D2>0 && V_D3>0)%2nd ( I1 <0 && I2 <0 && I3 <0)b l o c k . O u t p u t P o r t ( 2 ) . Data ( 1 ) =2 ;b l o c k . D e r i v a t i v e s . Data ( 4 ) =v2 v1 + x4 * ( ( RD2 + Rs ) / ( 3 * Ls ) ( 2 * (

RDr1 + RD2 + 2*Rs ) ) / ( 3 * Ls ) ) x5 * ( ( 2 * ( RD2 + Rs ) ) / ( 3 * Ls ) (RDr1 + RD2 + 2*Rs ) / ( 3 * Ls ) ) + x2 / C1 ;

b l o c k . D e r i v a t i v e s . Data ( 5 ) =v2 v3 x4 * ( ( 2 * ( RD2 + Rs ) ) / ( 3 * Ls )(RD2 + RD3 + 2*Rs ) / ( 3 * Ls ) ) + x5 * ( ( RD2 + Rs ) / ( 3 * Ls ) ( 2 * (RD2+ RD3 + 2*Rs ) ) / ( 3 * Ls ) ) ;

%___________________________________%1R , 2 R , 3 Fe l s e i f ( V_D1>0 && V_D2<=0 && V_D3>0)%3 rd ( I1 <0 && I2 >0 && I3 <0)b l o c k . O u t p u t P o r t ( 2 ) . Data ( 1 ) =3 ;b l o c k . D e r i v a t i v e s . Data ( 4 ) =v2 v1 + x4 * ( ( RDr2 + Rs ) / ( 3 * Ls )

( 2 * ( RDr1 + RDr2 + 2*Rs ) ) / ( 3 * Ls ) ) x5 * ( ( 2 * ( RDr2 + Rs ) ) / ( 3 * Ls )( RDr1 + RDr2 + 2*Rs ) / ( 3 * Ls ) ) + x2 / C1 ;

b l o c k . D e r i v a t i v e s . Data ( 5 ) =v2 v3 x4 * ( ( 2 * ( RDr2 + Rs ) ) / ( 3 * Ls )( RDr2 + RD3 + 2*Rs ) / ( 3 * Ls ) ) + x5 * ( ( RDr2 + Rs ) / ( 3 * Ls ) ( 2 * (

RDr2 + RD3 + 2*Rs ) ) / ( 3 * Ls ) ) ;%____________________________________%1R , 2 R , 3 Re l s e i f ( V_D1>0 && V_D2<=0 && V_D3<=0)%4 t h ( I1 <0 && I2 >0 && I3

>0)b l o c k . O u t p u t P o r t ( 2 ) . Data ( 1 ) =4 ;b l o c k . D e r i v a t i v e s . Data ( 4 ) =v2 v1 + x4 * ( ( RDr2 + Rs ) / ( 3 * Ls )

( 2 * ( RDr1 + RDr2 + 2*Rs ) ) / ( 3 * Ls ) ) x5 * ( ( 2 * ( RDr2 + Rs ) ) / ( 3 * Ls )( RDr1 + RDr2 + 2*Rs ) / ( 3 * Ls ) ) + x2 / C1 ;

b l o c k . D e r i v a t i v e s . Data ( 5 ) =v2 v3 x4 * ( ( 2 * ( RDr2 + Rs ) ) / ( 3 * Ls )( RDr2 + RDr3 + 2*Rs ) / ( 3 * Ls ) ) + x5 * ( ( RDr2 + Rs ) / ( 3 * Ls ) ( 2 * (

RDr2 + RDr3 + 2*Rs ) ) / ( 3 * Ls ) ) ;%_____________________________________%1F , 2 F , 3 Re l s e i f ( V_D1<=0 && V_D2>0 && V_D3<=0)%5 t h ( I1 >0 && I2 <0 && I3

>0)b l o c k . O u t p u t P o r t ( 2 ) . Data ( 1 ) =5 ;b l o c k . D e r i v a t i v e s . Data ( 4 ) =v2 v1 + x4 * ( ( RD2 + Rs ) / ( 3 * Ls ) ( 2 * (

RD1 + RD2 + 2*Rs ) ) / ( 3 * Ls ) ) x5 * ( ( 2 * ( RD2 + Rs ) ) / ( 3 * Ls ) (RD1+ RD2 + 2*Rs ) / ( 3 * Ls ) ) + x2 / C1 ;

b l o c k . D e r i v a t i v e s . Data ( 5 ) =v2 v3 x4 * ( ( 2 * ( RD2 + Rs ) ) / ( 3 * Ls )(RD2 + RDr3 + 2*Rs ) / ( 3 * Ls ) ) + x5 * ( ( RD2 + Rs ) / ( 3 * Ls ) ( 2 * (RD2+ RDr3 + 2*Rs ) ) / ( 3 * Ls ) ) ;

%______________________________________%1F , 2 R , 3 R

74

Page 83: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

e l s e i f ( V_D1<=0 && V_D2<=0 && V_D3<=0)%6 t h ( I1 >0 && I2 >0 && I3>0)

b l o c k . O u t p u t P o r t ( 2 ) . Data ( 1 ) =6 ;b l o c k . D e r i v a t i v e s . Data ( 4 ) =v2 v1 + x4 * ( ( RDr2 + Rs ) / ( 3 * Ls )

( 2 * (RD1 + RDr2 + 2*Rs ) ) / ( 3 * Ls ) ) x5 * ( ( 2 * ( RDr2 + Rs ) ) / ( 3 * Ls )(RD1 + RDr2 + 2*Rs ) / ( 3 * Ls ) ) + x2 / C1 ;

b l o c k . D e r i v a t i v e s . Data ( 5 ) =v2 v3 x4 * ( ( 2 * ( RDr2 + Rs ) ) / ( 3 * Ls )( RDr2 + RDr3 + 2*Rs ) / ( 3 * Ls ) ) + x5 * ( ( RDr2 + Rs ) / ( 3 * Ls ) ( 2 * (

RDr2 + RDr3 + 2*Rs ) ) / ( 3 * Ls ) ) ;%_______________________________________%1F , 2 R , 3 Fe l s e i f ( V_D1<=0 && V_D2<=0 && V_D3>=0)%7 t h ( I1 >0 && I2 >0 && I3

<0)b l o c k . O u t p u t P o r t ( 2 ) . Data ( 1 ) =7 ;b l o c k . D e r i v a t i v e s . Data ( 4 ) =v2 v1 + x4 * ( ( RDr2 + Rs ) / ( 3 * Ls )

( 2 * (RD1 + RDr2 + 2*Rs ) ) / ( 3 * Ls ) ) x5 * ( ( 2 * ( RDr2 + Rs ) ) / ( 3 * Ls )(RD1 + RDr2 + 2*Rs ) / ( 3 * Ls ) ) + x2 / C1 ;

b l o c k . D e r i v a t i v e s . Data ( 5 ) =v2 v3 x4 * ( ( 2 * ( RDr2 + Rs ) ) / ( 3 * Ls )( RDr2 + RD3 + 2*Rs ) / ( 3 * Ls ) ) + x5 * ( ( RDr2 + Rs ) / ( 3 * Ls ) ( 2 * (

RDr2 + RD3 + 2*Rs ) ) / ( 3 * Ls ) ) ;%________________________________________%1F , 2 F , 3 Fe l s e %8 t hb l o c k . O u t p u t P o r t ( 2 ) . Data ( 1 ) =8 ;b l o c k . D e r i v a t i v e s . Data ( 4 ) =v2 v1 + x4 * ( ( RD2 + Rs ) / ( 3 * Ls ) ( 2 * (

RD1 + RD2 + 2*Rs ) ) / ( 3 * Ls ) ) x5 * ( ( 2 * ( RD2 + Rs ) ) / ( 3 * Ls ) (RD1+ RD2 + 2*Rs ) / ( 3 * Ls ) ) + x2 / C1 ;

b l o c k . D e r i v a t i v e s . Data ( 5 ) =v2 v3 x4 * ( ( 2 * ( RD2 + Rs ) ) / ( 3 * Ls )(RD2 + RD3 + 2*Rs ) / ( 3 * Ls ) ) + x5 * ( ( RD2 + Rs ) / ( 3 * Ls ) ( 2 * (RD2+ RD3 + 2*Rs ) ) / ( 3 * Ls ) ) ;

end

75

Page 84: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

References

[1] Inc © 1994-2012 The MathWorks. Matlab manuals.

[2] Yahia Baghzouz. An accurate solution to line harmonic distortion produced by ac/dc convert-ers with overlap and dc ripple. Industry Applications, IEEE Transactions on, 29(3):536–540,1993.

[3] Jerry Banks. Handbook of simulation : principles, methodology, advances, applications, andpractice. Wiley Co-published by Engineering and Management Press, New York Norcross,Ga, 1998.

[4] Bimal Bose. Modern power electronics and AC drives. Prentice Hall, Upper Saddle River,NJ, 2002.

[5] P. C. Breedveld. Computer-aids for modeling and conceptual design. pages 209–215. Pro-ceedings of the 1993 International Conference on Systems, Man and Cybernetics, SystemsEngineering in the Service of Humans, 1993.

[6] Gene F Franklin, J David Powell, and Abbas Emami-Naeini. Feedback control of dynamicssystems. 1986.

[7] Ricki G. Ingalls. Introduction to simulation. Proceedings of the Simulation Conference, 2002Winter.

[8] VH Jones and WJ Bonwick. Three-phase bridge rectifiers with complex source impedance.Proceedings of the Institution of Electrical Engineers, 122(6):630–636, 1975.

[9] Magnus Karlsson, Torbjorn Holmberg, Andres Hultgren, and Matz Lenells. A structuralmodeling flow for switched electrical network. a preliminary version, 2011.

[10] John G Kassakian, Martin F Schlecht, and George C Verghese. Principles of power electron-ics, volume 46. Addison-Wesley Reading, USA, 1991.

[11] Matz Lenells. A proposal of a controller for a three-phase ac to dc converter such thatoscillations of the input voltage are suppressed. private communication, (unpublished).

[12] Anu Maria. Introduction to modeling and simulation. Proceedings of the Simulation Con-ference, 1997 Winter.

[13] Ned Mohan, Tore M Undeland, and P. Robbins William. Power electronics: converters,applications, and design (2nd Edition). Wiley. com, 1995.

[14] R.H. Park. Two-reaction theory of synchronous machines generalized method of analysis-part i. American Institute of Electrical Engineers, Transactions of the, 48(3):716–727, 1929.

[15] Muhammad H Rashid. Power Electronics circuits, devices, and applications, 3rd Edition.Prentice Hall, 2004.

[16] Robert E Shannon. Systems simulation: the art and science, volume 975. Prentice-HallEnglewood Cliffs, NJ, 1975.

[17] K. C. A. Smith. Electrical circuits : an introduction. Cambridge University Press, CambridgeEngland New York, 1992.

[18] Toru TANAKA and Mikio YAMASAKI. Simulation analysis of ac power supply systemstability. IEICE transactions on communications, 87(12):3465–3470, 2004.

[19] Kjeld Thorborg. Power electronics: in theory and practice. Chartwell-Bratt, 1993.

76

Page 85: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

[20] Hamid Toliyat. DSP-Based electromechanical motion control. CRC Press, Boca Raton Fla,2004.

[21] M. Tuffaha and D. Y. Saleh. Control strategy for a dc/dc buck converter based on a hamil-tonian model to suppress the ripples at the input stage. Master’s thesis, Linnaeus University,School of Computer Science, Physics and Mathematics, Sweden, 2011.

[22] Arjan Schaft van der. Port-hamiltonian systems: an introductory survey. In M. Sanz-Sole,J. Soria, J.L. Varona, and J. Verdera, editors, Proceedings of the International Congress ofMathematicians Vol. III: Invited Lectures, pages 1339–1365, Madrid, Spain, 2006. EuropeanMathematical Society Publishing House (EMS Ph).

[23] A. J. van der Schaft and Maschke. System-theoretic properties of port-controlled hamiltoniansystems. in systems and networks: Mathematical theory and applications. Akademie-Verlag,pages 349–352, Berlin 1994.

[24] A. J. van der Schaft, Maschke, and Breedveld. An intrinsic hamiltonian formulation ofnetwork dynamics: non-standard poisson structures and gyrators. J. Franklin Inst., pages923–966, 1992.

[25] A. J. van der Schaft, B. M. J. Maschke, and P. C. Breedveld. An intrinsic hamiltonianformulation of the dynamics of lc-circuits. IEEE Trans. Circuits and Systems-I: FundamentalTheory and Applications, Vol. 42, No. 2, pages 73–82, 1995.

[26] RL Witzke, JV Kresser, and JK Dillard. Influence of ac reactance on voltage regulation of6-phase rectifiers. American Institute of Electrical Engineers, Part I: Communication andElectronics, Transactions of the, 72(3):244–253, 1953.

77

Page 86: Master s Thesis - DiVA portal696747/FULLTEXT01.pdf · Abstract This thesis comprises modeling and simulation of an AC-DC converter (Battery charger). An AC-DC converter may cause

Faculty of Technology SE-391 82 Kalmar | SE-351 95 Växjö Phone +46 (0)772-28 80 00 [email protected] Lnu.se/faculty-of-technology?l=en