Prototype of magnetic resolver with Hall effect sensors by Marta Arbas Cantero

Submitted to the Department of Electrical Engineering, Electronics, Computers and Systems in partial fulfillment of the requirements for the degree of Electrical Energy Conversion and Power Systems MASTER DEGREE at the UNIVERSIDAD DE OVIEDO July 2020 c Universidad de Oviedo 2020. All rights reserved.

Author......

Certified by...... David D´ıazReigosa Associate Professor Thesis Supervisor Certified by...... Daniel Fern´andezAlonso Assistant Professor Thesis Supervisor 2 Prototype of magnetic resolver with Hall effect sensors by Marta Arbas Cantero

Submitted to the Department of Electrical Engineering, Electronics, Computers and Systems on July 22, 2020, in partial fulfillment of the requirements for the degree of Electrical Energy Conversion and Power Systems MASTER DEGREE

Abstract The position sensors play a crucial role in the control of electric machines as they provide position feedback. In addition, in recent years the attention over them has grown due to the deployment of the electric vehicles. It is well known that there are two types of position sensors which are more widely used than others: the optical encoder and the resolver (brushless or variable reluctance). The optical encoders could provide incremental or absolute position with high accuracy. However, they have a limited range of operation temperature and low withstand of shocks and vibrations compared to the resolvers. On the other hand, the resolvers inherently provide absolute position. They also properly withstand both thermal and vibration shocks. However, the accuracy of the resolver is lower than the optical encoder one as the latter generates less noise and it does not require an ADC converter at its output. Nevertheless, these types of sensors have the same drawback: their price. There- fore, for overcoming this disadvantage, during this Master Thesis it will be developed a prototype of magnetic resolver with Hall effect sensors. The cost reduction is caused by the fact that it does not require stator/rotor lamination or winding. Moreover, this design will maintain the resolver’s properties, it will be electronically compatible with them and it can also be mounted directly on the without the need of a coupling device.

Thesis Supervisor: David D´ıazReigosa Title: Associate Professor

Thesis Supervisor: Daniel Fern´andez Alonso Title: Assistant Professor

3 4 Acknowledgments

I would like to thank the AECP research group of the University of Oviedo, and its supervisor Fernando Briz, for offering me the opportunity to participate in this project. I would like to specially express my gratitude to my advisors Daniel and David for always being available and to Ye-gu for his help offered and his interest during the whole development of this MTh.

5 6 Contents

1 Introduction and objectives of this Master Thesis 17

2 State of the art 19 2.1 Introduction ...... 19 2.2 Position sensors ...... 19 2.3 ...... 21 2.3.1 Transmitter ...... 22 2.3.2 Receiver ...... 23 2.3.3 Differential ...... 24 2.3.4 Control ...... 25 2.3.5 Transolver ...... 26 2.3.6 Differential resolver ...... 27 2.3.7 Resolvers ...... 27 2.3.8 Linear transformer ...... 27 2.3.9 Brushless ...... 27 2.4 Tacho dynamo ...... 30 2.4.1 DC tachometer generator ...... 30 2.4.2 AC tachometer generator ...... 31 2.5 Resolvers ...... 31 2.5.1 Resolver operation principle ...... 32 2.5.2 Brushless wound field resolvers ...... 34 2.5.3 Variable reluctance resolvers ...... 35 2.6 Encoders ...... 36

7 2.6.1 Classification according to the way the position is established 36 2.6.2 Classification according to the way the pulses are generated . 38 2.7 Comparison between position sensors ...... 43

3 Magnetic resolver using Hall-Effect Sensors 45 3.1 Introduction ...... 45 3.2 Magnetic resolver architecture ...... 46 3.2.1 Hall-effect sensors ...... 46 3.3 Principle of operation ...... 48 3.3.1 Design optimization ...... 50 3.3.2 Design optimization software ...... 57

4 Mechanical assembly of the magnetic resolver using Hall effect sen- sors 65 4.1 Introduction ...... 65 4.2 Mechanical assembly ...... 65 4.2.1 Shaft-type resolver model ...... 66 4.2.2 In-shaft resolver mounted model ...... 67 4.3 PCB ...... 68 4.3.1 Mechanical model ...... 69 4.3.2 Electrical model ...... 70 4.4 PCB simulation ...... 76 4.4.1 PCB without voltage divider ...... 76 4.4.2 PCB with voltage divider ...... 77

5 Demodulation techniques 79 5.1 Introduction ...... 79 5.2 Amplitude demodulation techniques ...... 79 5.2.1 Diode rectifier envelope detector ...... 80 5.2.2 Product detector ...... 81 5.2.3 Synchronous detection ...... 84

8 5.3 Demodulation techniques simulation ...... 85 5.3.1 Diode rectifier envelope detector without low-pass filter . . . . 88 5.3.2 Product detector ...... 95 5.3.3 Comparison between both methods ...... 95

6 Electric motor position measurement 99 6.1 Introduction ...... 99 6.2 Techniques for determining the position of the electric motor . . . . . 99 6.2.1 Arctangent calculation ...... 100 6.2.2 Phase-locked loop (PLL) ...... 100 6.3 Simulation of both ’Product detector’ demodulation technique and PLL103 6.3.1 Microcontroller implementation ...... 105 6.3.2 Comparison between the magnetic resolver error and that of the commercial encoders and resolvers ...... 106

7 Conclusions 109

8 Future developments 111

A Drawing plan: Shaft-type model 113

B Drawing plan: In-shaft mounted model 119

C Drawing plan: PCB schematic and views without voltage divider 123

D Drawing plan: PCB schematic and views with voltage divider 127

9 10 List of Figures

2-1 Position closed-loop feedback [3]...... 20 2-2 Synchro transmitter [8]...... 22 2-3 Back-to-back transmitter and receiver connection [7]...... 23 2-4 Differential connection with the transmitter and the receiver [7]. . . . 24 2-5 Differential connection with two transmitters [7]...... 25 2-6 Transmitter and control transformer connection [7]...... 25 2-7 Transmitter and control transformer control [7]...... 26 2-8 Schematic view of the brushless synchro design [9]...... 29 2-9 DC tachometer generator [10]...... 31 2-10 AC tachometer generator [10]...... 31 2-11 Resolver operation principle...... 33 2-12 Brushless wound field resolver scheme [17]...... 34 2-13 Variable reluctance resolver scheme [19]...... 35 2-14 Variable reluctance resolver scheme 3D [19]...... 35 2-15 Incremental encoder output [23]...... 37 2-16 Absolute encoder output [23]...... 37 2-17 Optical encoder scheme [24]...... 38 2-18 Magnetic encoder scheme[25]...... 40 2-19 Capacitive encoder simplification [26]...... 41 2-20 Capacitive encoder scheme [24]...... 41 2-21 Inductive encoder scheme[26]...... 42

3-1 Schematic representation of the proposed magnetic resolver...... 46

11 3-2 Operating principle of the Hall-effect sensor[31]...... 47

3-3 Input and output voltages of the proposed magnetic resolver. ωex =

2 · π · 500 rad/s. ωr = 2 · π · 50 rad/s...... 50 3-4 Interior permanent magnet rotor...... 51 3-5 Dimensions of the magnetic resolver prototype [30]...... 52 3-6 Magnetic resolver geometry in FEMM...... 60 3-7 Flux amplitude calculation in FEMM...... 62 3-8 Resolver performance...... 63

4-1 Complete exploded view: Shaft-type...... 66 4-2 Complete exploded view: In-shaft...... 67 4-3 3D total model assembled...... 68 4-4 PCB mechanical scheme...... 69 4-5 Electronic circuit scheme of the PCB...... 74 4-6 Electronic scheme of the PCB with adaptation...... 75 4-7 Inputs to the PCB...... 76 4-8 PCB outputs: Without voltage divider...... 77

4-9 Vcc+ and Vcc- for supplying the instrumentation amplifiers...... 77 4-10 Voltage used for power the Hall effect sensors HG0815...... 78 4-11 PCB outputs: With voltage divider...... 78

5-1 Output signal of each Hall effect sensor: The original signal is shown in blue and the demodulated one in red...... 80 5-2 Diode rectifier envelope detector [44]...... 81 5-3 Synchronous demodulation: SIN Hall effect sensor...... 83 5-4 Torque disturbance introduced into the asynchronous electric machine. 86 5-5 Rotor speed and rotor position when the input to the asynchronous machine is the torque shown in Fig. 5-4...... 87 5-6 Excitation voltage and AM output signals of the magnetic resolver. . 88 5-7 Circuit diagram of the ’Diode rectifier envelope detector without low- pass filter’ method...... 88

12 5-8 Description of the elements in Fig. 5-7 [47]...... 89

5-9 Comparators [Zoom 0.487-0.5075 sec.]: a) Vex and φC1, b) VHS and

φC3 and c) VHC and φC2...... 90

5-10 First part of the control signal generator [Zoom 0.487-0.49 sec.]: a)φC1,

b)φJK , c)φ1 and d) φ2...... 91 5-11 Second part of the control signal generator [Zoom 0.487-0.537 sec.]:

a)φC1, b)φ3, c)φC2 and d) φ4...... 91

5-12 SIN full wave rectifier [Zoom 0.487-0.58 sec.]: a)VHS and b)|VHS|... 92

5-13 Amplitude detection [Zoom 0.487-0.4974 sec.]: a)VHS, b)φ1, c)Va1, d)

φ2 and e)VA1...... 93

5-14 ± unity gain amplifier [Zoom 0.487-0.58 sec.]: a)VA1, b)φ3 and c)VS.. 94 5-15 Demodulated signals achieved with the method ’Diode rectifier enve- lope detector without low-pass filter’...... 94 5-16 Demodulated signals achieved with the method ’Product detector’. . 95 5-17 Comparison of the demulation techniques simulated. ’1’ is the ’Diode rectifier envelope detector without low-pass filter’ method and ’2’ is the ’Product detector’ one. a)SIN Hall effect sensor and b)COSINE Hall effect sensor...... 96

6-1 Basic structure of a PLL [51]...... 100 6-2 PLL for phase detection with the LF on the q-axis of the QSG [51]. . 101 6-3 PLL for phase detection with the LF on the q-axis, adapted to be used in the magnetic resolver...... 102 6-4 ’Product detector’ demodulation technique and PLL implementation. 102 6-5 Park transformation...... 103

6-6 Comparison between the ωm given by the PLL and the real one of the electric motor...... 104

6-7 Comparison between the θm given by the PLL and the real one of the electric motor: a) No wrap and b) Wrap from 0 to 2·π...... 105 6-8 C-caller function of SIMULINK...... 105

13 6-9 C-caller signals...... 106

6-10 Study of the magnetic resolver error: a) Comparison between the θm given by the PLL and the real one and b) Error between both signals. 107

14 List of Tables

2.1 Optical encoder and resolver comparison...... 43

3.1 Constraints of the magnetic resolver prototype ...... 51 3.2 Geometric parameters description...... 52 3.3 Parameters of the multi-objective function...... 57 3.4 Geometric parameters result (mm)...... 63

4.1 List of parts: shaft-type...... 66 4.2 List of parts: In-shaft...... 67 4.3 Variables description of the Hall effect sensors and maximum sensitivity

calculation [36]. S is the sensitivity, Vc is the supplied voltage, Ri is

the internal resistance and Pi the internal power...... 72 4.4 Market study: The prices of the Hall effect sensors are given by GWM Associates [36], and the resistors ones by RS components [39]. . . . . 73

5.1 Asynchronous electric machine parameters...... 86

6.1 Position error of the commercial encoders and resolvers given by [52], [53],[54] ...... 108

15 16 Chapter 1

Introduction and objectives of this Master Thesis

The climate change, as well as the possible depletion of fossil fuels, has led to the fast deployment of the electric vehicles. This has increased interest in electric machines and their control. As for controlling the AC electric machines, knowing the rotor position is a key point, the position sensors have also been researched [1]. The early technology of electric vehicles has used optical encoders as position sensors. However, as they do not work properly in dusty environments with a wide temperature range, and they are also fragile and expensive, it was realized that their use was not suitable for this application This leaves two other options: using resolvers or sensor-less control methods. [1]. This MThs is focused on resolvers, specifically on presenting an alternative that is cheaper than those available on the market, keeping electrical compatibility with them and the possibility to be frameless mounted on the electric machine. This alternative is the prototype of magnetic resolver with Hall effect sensors, and both its design optimization and its electrical and mechanical assembly are the main objectives of this MThs.

17 The milestones of this MThs are:

1. Research the types of position sensors and make a comparison between the most used ones.

2. Once the comparison between the most used position sensors is performed, show the advantages that the prototype developed in this MThs presents over them.

3. Gain a deeper understanding of resolvers and Hall effect sensors.

4. Perform the optimization of the magnetic resolver prototype in order to obtain its final geometry.

5. Design and development of the mechanical assembly of the prototype to an electric motor. Here, two models were done: ’in shaft’ and ’shaft type’.

6. Development of the electronic circuit of the prototype and its implementation on a PCB. In this part it is also done a study for finding the most suitable Hall effect sensors for this task.

7. Research about the demodulation techniques used in resolvers and implement them using SIMULINK.

8. Research about the methods used to reach the rotor position from the demod- ulated signals, and implement them using SIMULINK.

9. Select which is the best demodulation technique, as well as the best method for reaching the electric motor position for this prototype, and perform its implementation using C-code.

10. Calculate the error between both the rotor position reached with this prototype and the real one for compering it with that of the commercial encoders and resolvers.

18 Chapter 2

State of the art

2.1 Introduction

This chapter is focused on analyzing the state-of-the-art of position sensors. In the final section, a comparison between the most used ones are performed for illustrating the advantages that the magnetic resolver prototype developed during this MThs has over them.

2.2 Position sensors

Rotary position sensors are crucial in motor control applications as close loop perfor- mance relies on the rotor position measurement (Fig.2-1). Moreover, a correct choice of the position sensor means a better functioning of the electrical system [2], [3]. In practise, position sensors are used in [4]:

• Gear position.

• Automotive position sensing as throttle position or steering wheel position.

• Industrial control.

• Valve control.

• HVAC damper control.

19 Figure 2-1: Position closed-loop feedback [3].

The main types of position sensors, which will be deeply explained during this chapter, are synchros, tacho dymanos (this is actually a speed sensor), resolvers and encoders. The choice between them depends on the application and how the position sensor interfaces to the controller’s circuitry. However, in industrial applications the most used are resolvers and optical or capacitive encoders [2], [3]. The features that define a position sensor are [5]:

• Resolution: the smallest change in angle that can be measured.

• Accuracy: how close a reported measurement is to the actual value being mea- sured.

• Size.

• Weight.

• Temperature range.

• Condensation issues.

• Vibration tolerance.

• Contamination tolerance: dust, dirt...

• Electromagnetic immunity.

20 • Installation: how the position sensor is mounted on the electric motor (in shaft, shaft-type...).

• Cost.

Moreover, although it seems that choosing the sensor with the highest resolution is the best option, it may not be so. This is because a higher resolution also implies a slowdown of the system since more information has to be processed, and this may not be necessary. Besides, the higher the resolution of a sensor, the higher its cost. [3].

2.3 Synchro

A synchro is a type of rotary position sensor. It can be defined as a transformer whose mutual inductance is variable. It is used when accuracy is not the major requirement of the application [6]. The working principle of a synchro is that the coupling inductance between the pri- mary and the secondary side of the transformer varies according to the rotor position. This fact also produces that the magnitude of the output voltage varies according to it [7]. Synchos are divided into two groups depending on what elements are composed [7]:

• Torque synchros: transmitters (CG), differentials (CD) and receivers (CR).

• Control synchros: transmitters, differentials, control (CT), re- solvers (CS), linear transformers (LT) and two hybrid units: transolvers (CSD) and differential resolvers(CDS).

Torque synchros are used for light loads as dials or pointers. For larger loads, the control synchros drive the elements that can provide the desired torque level. In this section, based on [7], it is explained the different parts that constitute both the torque and control synchros.

21 2.3.1 Transmitter

The transmitter consists of a salient-pole rotor and a stator. The rotor contains a single-phase winding excited by an AC voltage source and the stator contains three windings in Y-connection (Fig. 2-2).

Figure 2-2: Synchro transmitter [8].

The field produced by the excited winding induces a voltage in each of the stator winding according to the equations:

VS1−3 = K · VR2−1 sin θ (2.1) 2π V = K · V sin(θ + ) (2.2) S3−2 R2−1 3 2π V = K · V sin(θ − ) (2.3) S2−1 R2−1 3

Where K is the maximum coupling transformation ratio (TR = Vout max ), θ is the Vin rotor position and VS1-3 is the voltage from terminal S1 to terminal S3. As these equations (2.1-2.3) show, the transmitter gives the rotor position through the three different output voltages. The stator voltages are in phase, or 180 deg. shifted, with the AC voltage applied

22 to the rotor winding. Therefore, the phase shift of a synchro is given by the difference between the stator voltage and the exact 0 or 180 deg. of the voltage applied to the rotor winding.

2.3.2 Receiver

The receiver is needed for analyzing the time-phase stator voltages and return them to a rotor position. Electrically, the connection of the receiver is the same as the transmitter one. The transmitter and the receiver are connected in back-to-back configuration (Fig. 2-3).

Figure 2-3: Back-to-back transmitter and receiver connection [7].

The working principle of the receiver consists of the following steps:

1. The system is energized.

2. If the relative angle between the rotor and the stator in each system (transmitter and receiver) are not the same, a voltage mismatch between the stator voltages will appear.

3. As a consequence, current flows between the two stators and torque is applied in each rotor.

4. As the transmitter rotor is constrained, the torque will be only applied to the receiver one and in the direction that produces the alignment between both the transmitter and receiver rotor.

23 5. Once the alignment is achieved, the voltage in each stator is equal and opposite, hence no current flows.

6. Finally, each time the transmitter rotor position changes, the receiver rotor will track it.

The synchronization time is defined as the time that the receiver rotor lasts to be stabilized in its new position.

2.3.3 Differential

The differential is another type of synchro that can be added to the basic one. It is composed of a stator with three Y-connection windings and of a cylindrical rotor with also three Y-connection windings. There are two possible connections for a dif- ferential:

Figure 2-4: Differential connection with the transmitter and the receiver [7].

Fig. 2-4 shows the connection of a differential with both a receiver and a transmit- ter: the differential stator is excited from the transmitter stator and the differential rotor is connected to the receiver stator. As a result, the output differential voltage depends on the transmitter rotor position and its own rotor position. The receiver rotor position is defined with the expression θCR = θCG ± θCD, depending on the transmitter and the differential stator connection.

24 Figure 2-5: Differential connection with two transmitters [7].

Fig. 2-5 shows the connection of a differential between two transmitters. As the position of both transmitters are set, the rotor differential position can be either the addition or subtraction of θ1 and θ2.

2.3.4 Control transformer

The primary side of the control transformer is a three-phase stator, with Y-connection windings, and the secondary side is a single-phase drum cylindrical rotor. Its connec- tion with the transmitter is shown in Fig. 2-6.

Figure 2-6: Transmitter and control transformer connection [7].

The operation of the control transformer is summarized in the following steps:

1. The transmitter rotor turns and it induces a voltage in its stator. The control transformer rotor remains stopped.

2. The field induced in the control transformer stator is constant and it maintains the direction of the stator transmitter one.

3. The field of the control transformer stator induces a voltage in its rotor. This voltage depends on the sine of the angle between the control transformer rotor

25 winding and the control transformer stator flux vector. As it was seen in step 2, the control transformer stator flux vector also depends on the transmitter rotor angle.

4. Finally, the control transformer output voltage contains information about the transmitter rotor position.

In Fig. 2-7 it is considered that if the control transformer rotor angle is different from the transmitter one, a voltage proportional to the sine of that angle difference will appear in the control transformer rotor. This voltage is applied to a servo ampli- fier, which is connected to the control phase of the servomotor. As the motor shaft and the control transformer rotor shaft are mechanically joined, the motor will rotate until the angle of the rotor transmitter and the one of the control transformer rotor match. At this point, the output control transformer rotor voltage is zero, hence the motor stops. The motor is the element in charge of moving high torque loads.

Figure 2-7: Transmitter and control transformer control [7].

2.3.5 Transolver

It is a control transformer with an additional wound winding on the rotor. This winding is located in quadrature with the main one.

• Transolver working as a control transformer: The second rotor winding is dummy-loaded in the same way as the main one in order to avoid unbalancing.

• Transolver working as a transmitter: The unused rotor winding is shorted to ground.

26 2.3.6 Differential resolver

The differential resolver is the inverse of the transolver: the rotor is the three-phase element and the stator the two-phase one. The transolvers and the differential resolvers have the same function, which is transforming the three-phase data to four-phase data. They are the link between the three phase devices explained before (transmitters, receivers, differentials and control transformers) and the resolvers.

2.3.7 Resolvers

They are going to be deeply explained in section 2.5.

2.3.8 Linear transformer

It consists of a single-phase salient pole rotor and a single-phase stator. Its output

voltage is proportional to the rotor position angle following the expression Vout = K·θ. The linear transformer only works for rotor angles from -50 deg to 50 deg. Out of this range, it performs a sinusoidal wave behaviour.

2.3.9 Brushless synchros

With the aim of avoiding commutation with slip rings and brushes, several brushless synchos were developed and this section is devoted to explaining them. Against standard synchro, the brushless ones perform [7]:

• Higher power consumption.

• Lower impedance angle.

• Higher phase shift.

• Lower unit torque gradient.

• Lower noise in the output signal.

27 Electromagnetic type

This type of synchro is constructed with a rotary transformer that transfers energy from/to the rotor, mounted in tandem with the synchro. The main advantage of these types of synchros is that physical connection to the rotor is avoided, so the lifetime is increased. On the other hand, the main disadvantage is that using these type of syncrhos does not mean that the parameters of a standard synchro are doubled, hence it will give problems if it is used to replace a synchro in an existing application.

Hairspring type

In this case, the energy is transferred from/to the rotor using wound conductors. Their main disadvantage is that they only work from -165 deg. to 165 deg. from the zero electrical position. However, apart from eliminating the sliding contacts, they also have as an advantage that the electrical parameters can be doubled, therefore they can be used to replace a synchro in an existing application.

Flex lead type

These types of synchros are designed with thin flexible lead wires and they are used to transfer energy from/to the rotor. They have the same advantages as the hairspring ones, but the rotor position only goes from -90 deg. to 90 deg. They are mainly used for applications where short length unit and low friction is demanded.

Other brushless syncrho design

In the article [9] it is explained another design for a brushless synchro based on the electromagnetic type one. The main design is shown in Fig. 2-8: This design consists of two windings (primary and secondary) mounted on the stator. The rotor is a non-wounded one. This implies that its fabrication cost is lower than the one of a standard synchro, as it has not slip rings or brushes, and it is also lower than the one of a electromagnetic brushless synchro as it has not a rotary transformer.

28 Figure 2-8: Schematic view of the brushless synchro design [9].

The working principle of this design is the following one:

1. A three-phase AC voltage is applied to the primary winding.

2. A magnetic field is induced in the E-shape core of the stator. This E-shape is necessary for allowing the flux to go through the two upper/lower stator teeth.

3. The flux passes through the air gap to the rotor. The rotor is made of two magnetic parts isolated with a non-magnetic medium.

4. The flux returns to the stator following the direction up to down in the rotor core.

5. As the secondary windings are mounted on the stator, the flux crosses them in- ducing a voltage on them. For inducing this voltage on the secondary windings, one of the magnetic rotor core should be placed in front of the two upper teeth of the stator and the other one in front of the two lower tooh.

6. When the upper and lower portions of the secondary winding are connected, the polarity of the induced voltage in each portion should be taken into account.

29 2.4 Tacho dynamo

Tacho dynamos, also known as tachometers, are rotational speed sensors. Therefore, the electric motor position could be reached by integrating the speed measured by these sensors. According to [10], the tachometer is a sensor able to convert rotational speed into voltage. It is based on the working principle that when a coil turns freely in a magnetic field, in the extremes of the coil appears a voltage that is proportional to the intensity of the magnetic field, the area of the coil and the rotational speed. Depending on the type of voltage that is produced between the extreme of the coils (AC or DC), there are two different types of tachometers:

• DC tachometer generator.

• AC tachometer generator.

2.4.1 DC tachometer generator

The DC tachometer generator is shown in Fig. 2-9. As it can be observed, it consists of two permanent magnets (North and South) placed opposite each other and an armature with a coil, which rotates in solidarity with the shaft of the engine to which it is attached, between them. Hence, following the principle explained above, a voltage is induced at the corners of the armature coil. This voltage is proportional to the rotational speed and its polarity gives the rotational direction of the motor shaft. On the other hand, the commutator and brushes are used to transform the AC current of the coil to DC current, the moving coil voltmeter measures the voltage induced in the coil and the resistance is used to control the high currents of the armature. The main advantage of this type of tachometers is that the rotational direction of the shaft is known. However, its main disadvantage has to do with the maintenance of the commutator and brushes. Besides, if the resistance is not large enough, large currents in the armature coil could distort the constant magnetic field produced by the permanent magnets.

30 2.4.2 AC tachometer generator

The AC tachometer generator is shown in Fig. 2-10. This AC tachometer was developed to avoid the use of the commutator and brushes. Therefore, the armature is stationary and it is the magnetic field that rotates. For reaching that, the stator is made of two windings (’reference’ and ’quadrature’) shifted between them 90 deg. and the rotor is made of ferromagnetic material surrounded by a thin cup of Aluminium. Its operating principle is the following one: the rotating magnetic field induces a voltage in the quadrature coil of the armature, when the reference one is supplied, with a frequency and amplitude proportional to the rotational speed of the shaft. In the case of the image, it is measured the amplitude of the induced voltage. Afterwards, this voltage is rectified and filtered with a capacitor for reducing the ripple caused by the rectification stage. Apart from avoiding the use of commutators and brushes, this model is also cheaper than the one described in the previous section. On the other hand, its main disadvantage is that the linearity between the induced voltage and the rotational speed is lost when the shaft rotates at high speed.

Figure 2-10: AC tachometer generator Figure 2-9: DC tachometer generator [10]. [10].

2.5 Resolvers

Resolvers are position sensors widely used in industrial applications. They are pop- ular because they operate in a robust and accurate way in unfriendly environments

31 (dust, oil, contaminants, radiation). In addition, they also withstand vibrations, wide temperatures (-50oC to 150oC) and high rotational speeds (1000 to 10000 rpm) [11]. The main disadvantages of resolvers are their need of an AC power supply, their volume, their limited capability of enhancing their reliability and the fact that they provide analog outputs. However, nowadays this last inconvenience is solved due to the low cost of the analog-to-digital (ADC) converters [11], [12]. Resolvers provide by default absolute position [12]. Theoretically, their resolution is infinite as they provide analog outputs. Nevertheless, in practise it is given by the ADC converter, the signal to noise ration, the assembling tolerances... [13] According to [12], resolvers are classified into three types, each of them is named below:

• Brushed resolvers: They have brushes and slip-rings. They are in disused.

• Brushless resolvers: Instead of brushes they use a coupling transformer.

• Variable-reluctance (VR) resolver: Good precision is reached by means of the number of poles the rotor.

2.5.1 Resolver operation principle

A resolver is formed by one primary winding (reference winding) and two secondary windings (signal windings). The signal windings are electrically shifted 90 deg. and they are usually named as SIN and COS, respectively [14],[15]. Its working principle, based on [14] and [15], is shown in Fig. 2-11:

1. An AC excitation voltage (Esource) is applied to the reference winding. This

signal has an amplitude E0 and a frequency ω, therefore it is defined by the expression:

Esource = E0 · sin ωt (2.4)

The frequency of the signal applied to the reference winding is normally between 1 and 20 kHz.

32 2. In the signal windings, it is induced a voltage equals to the multiplication of the reference winding voltage by the sine or cosine of the shaft angle (θ), measured from a zero position, and the transformation ratio (K ):

Eout 1 = K · E0 · sin(ωt) · cos(Xθ) (2.5)

Eout 2 = K · E0 · sin(ωt) · sin(Xθ) (2.6)

X is the multiplication factor of the angle (X= 2, 3, 4...)

3. When the output signals given by the equations (2.5) and (2.6) pass through the resolver-to-digital converter (R/D), two signals proportional to the cosine or sine of the angle position are obtained:

EAD 1 = k · cos θ (2.7)

EAD 2 = k · sin θ (2.8)

4. Once EAD 1 and EAD 2 are achieved, there are numerical methods such as [16] that provides the absolute shaft position.

This is the working principle for both brushless and VR resolvers.

Figure 2-11: Resolver operation principle.

33 2.5.2 Brushless wound field resolvers

These types of resolvers are a special type of rotary transformers. The energy trans- ferred between their windings varies in a sinusoidal way, according to the shaft position [14].

In this case, the reference winding is wound in the rotor and the signal ones in the stator. This is shown in Fig. 2-12.

Figure 2-12: Brushless wound field resolver scheme [17].

In order to avoid brushes and slip rings, the reference winding voltage is supplied by means of a rotary transformer [15]. A rotary transformer is a single-phase one with axial symmetry. Between both the primary and the secondary sides there is an air gap. In that way, whereas the primary side is connected to the power supply and stand still, the secondary side rotates in solidarity with the rotor shaft. Therefore, the rotation of the secondary side does not affect the flux lines and inductive power transfer between both sides [18].

The brushless resolver is the most accurate one. Its reliability is also enhanced due to the absence of brushes and slip rings. On the other hand, its structure is more complex and its size cannot be further reduced due to the addition of the rotary transformer [15].

34 2.5.3 Variable reluctance resolvers

In the case of variable reluctance resolvers, all the windings (reference and signal windings) are wound around the stator. The rotor is a non-wound salient-pole one, and non coupling transformer is needed [15]. These types of resolvers are based on the fact that due to the salient-pole effect of the rotor, a electromotive force with shaft position information is induced in the signal windings [12]. This happens as follows: When the rotor rotates in solidarity with the motor shaft, the reluctance air gap between both the stator and rotor teeth varies. Therefore, a modulated sinusoidal voltage is induced in the signal windings when an AC voltage is applied in the reference winding [15]. This procedure was explained in section 2.5.1. Dealing with the accuracy of the VR resolver, without considering resolution, it is determined by the period number of the output signals. When the VR resolver performs one revolution, the period number of the output signals is given by the number of rotor salient-poles. As higher is the number of rotor poles, the higher is the accuracy of the VR resolver. However, the number of rotor salient-poles are determined by factors as size constraints, winding area requirements, magnetic circuit design, lamination design and manufactured accuracy [13], [15].

Figure 2-13: Variable reluctance re- Figure 2-14: Variable reluctance re- solver scheme [19]. solver scheme 3D [19].

Performing a comparison between resolvers, the VR ones have the simplest struc- ture and smallest axial direction as it has not slip-rings, bearings or coupling trans-

35 formers [15]. Due to these issues they are used in hybrid electric vehicles (HEV) and electric vehicles (EV). On the other hand, they are expensive [13].

2.6 Encoders

The encoders are another type of position sensors mainly used to provide position feedback for a motor. They are normally linked to the machine shaft by a coupling [20]. According to [21], the rotary encoders can be classified depending on:

• The way to establish the position: absolute or incremental encoders.

• The way the pulses are generated: magnetic, optical, inductive or capacitive encoders.

The optical encoder is the one that dominates the market. They are character- ized by their high accuracy and resolution. However, they are highly influenced by temperature changes, vibrations and the presence of contaminants [20], [22].

2.6.1 Classification according to the way the position is es- tablished

Incremental encoders

The output of an incremental encoder, which is shown in Fig. 2-15, is a pulse string. These pulses are counted by a separate counter in order to determinate the shaft position [23]. The encoder has a zero electrical position. If the current initial position does not correspond to the zero electrical one, the shaft reaches it by means of the external counter. This external counter also reads these pulses and add them in a cumulative way [23]. In order to increase the encoder resolution, an external circuit can be added. In that way, the pulses are multiplied by two or four times in a single period [23].

36 Although the resolution of the incremental encoder may change, its number of output phases do not. Its output signals are called A, B and Z. The rotation direction is reached by observing the phase shift between phases A and B. The phase Z is generated once a revolution, so it can be used as an origin [23]. Incremental encoders are preferred for AC induction motors if the principal re- quirement of an application is the cost and it is only needed the relative position [3].

Figure 2-15: Incremental encoder output [23].

Absolute encoders

The output of an absolute encoder, which is the shaft position expressed in Gray code, is shown in Fig. 2-16. Therefore, the shaft position can be obtained by directly reading this code [23].

Figure 2-16: Absolute encoder output [23].

In the case of absolute encoders, the number of outputs varies with their resolution. This is because the higher the resolution the higher the number of bits, and each bit corresponds to one output channel [23]. Regarding the zero electrical position, as all the electrical positions are marked by the Grey code, there is no need of a start-up in order to return the shaft to the zero electrical position if it does not correspond to the current one [23]. Another advantage of these types of encoders is that data is never lost, even if

37 there is a restart after a power supply failure, or if it is impossible to visualize in the software all the changes in the Grey code due to the high rotational speed [23]. The rotation direction is reached by observing the increase or decrease of the absolute encoder code [23]. These types of encoders are preferred for permanent-magnet brushless motors in servo applications, as they require absolute position reading [3].

2.6.2 Classification according to the way the pulses are gen- erated

Optical encoders

These types of encoders are designed to capture the optical field. They are constructed using light emitting diodes (LEDs), photodetectos and a notched rotating disk (Fig. 2-17). In addition, they also contain a transimpedance amplifier and an analog-to- digital converter [24].

Figure 2-17: Optical encoder scheme [24].

The procedure for getting the shaft position is described as follows: The notched disk is collocated in the rotor shaft, both rotating in solidarity. The LEDs are emit- ting light continuously, therefore they require a high constant current during their operation. The photodetectors are only able to read this light when it passes through the notches of the disk, hence these photodetectors receive a pulse signal. The analog- to-digital converter is in charge of converting these pulse signals to the mechanical

38 rotor shaft position [24]. As it can be deduced, the resolution of the optical encoders can be increased by increasing the number of notches in the disk. On the other hand, the disadvantages that may be considered are [24]:

• They are heavily affected by dust, dirt and other contaminants.

• They work correctly in a limited temperature range.

• They do not withstand well vibrations as the disk is made of glass or plastic.

• They are influenced by electromagnetic interference (EMI) if they are not prop- erly shielding.

• The lifetime of a LED is between 10k to 20k hours.

These types of encoders are the most popular due to their high resolution [24].

Magnetic encoders

These types of encoders are intended to capture the electromagnetic field variations. They consist of a large magnetized wheel and Hall effect sensors, which are in charge of detecting the electromagnetic field changes and generating the output data [24]. As in the case of optical encoders, the disk of the magnetic encoders rotates in solidarity with the rotor shaft. The magnetic encoder disk contains North and South magnets in its outer part as it is shown in Fig. 2-18. In this figure it can be also seen that the wheel is surrounded by Hall-effect sensors (these sensors can be substituted by magnetoresistive ones). These sensors detect the shifts in the magnets position: North-South, South-North. Finally, a signal-conditioning circuit translates this magnetic field variation in a position signal [24]. The main advantages of the magnetic encoders are their ruggedness and robust- ness. This is due to the fact that they do not have elements as LEDs and that they are not affected by dust, dirt, vibration or bearings failures. They also have a high immunity to electric field interference. On the other hand, compared to an optical

39 encoder, they have less resolution as it is given by the number of magnetized pole pairs in the wheel and the number of Hall-effect sensors. They have not immunity against external magnetic field due to the use of permanent magnets [24].

Figure 2-18: Magnetic encoder scheme[25].

Capacitive encoders

The capacitive encoders capture the electric field using capacitance and electrical signals [24]. It is based on the principle that the capacitance is proportional to the dielectric between two charged plates (Fig.2-19) [26] . Fig. 2-20 shows the scheme of a capacitive encoder. As it may be observed, it consists of a stationary transmitter, a stationary receiver and a rotor (disk) between them. In this case, the disk that rotates in solidarity with the shaft is a PCB with a sinusoidal pattern on it [24]. The shaft position is calculated by measuring the capacitance changes between both the stationary transmitter and the stationary receiver. In order to do so, a high frequency reference signal is sent from the transmitter to the receiver, changing the dielectric between them in a predictive way due to the PCB pattern. In that manner, the capacitance change is achieved and it modulates the voltage difference that appears between the two stationary plates [26]. The on-board elements process this voltage signal and transform it into DC sine and cosine outputs, which are proportional to the rotation angle. For reaching that

40 DC signals two synchronous-modulators followed by two low-pass filters are used. The receiver translates these signals into increments of the rotary shaft motion [24]. The cut-off frequency of the low-pass filters is calculated in order to mitigate the noise generated by the encoder, being that noise proportional to the square root of the cut-off frequency. Finally, it is the noise generated by the encoder which sets the resolution of it [24].

Figure 2-19: Capacitive en- coder simplification [26]. Figure 2-20: Capacitive encoder scheme [24].

Although the market is dominated by optical and magnetic encoders, the capaci- tive ones are entering into that pool as they match the performance of both of them [24],[27]:

• They have the lowest power consumption.

• High accuracy: the shaft position is available through programming techniques and they also use a high resolution ADC converter.

• High ruggedness: The stationary and rotatory plates shielding perform a barrier against external noise and contaminants.

• High lifetime: LEDs are not used.

• High reliability: The rotor of the encoder is hollow and flat. There are not bearings.

41 • Its resolution can be changed by modifying the line count of the electronics. There is no need to change any component.

• Less sensitive to temperature variations and vibrations.

• Immunity to electric and magnetic interference.

On the other hand, these types of encoders may have a bad reading of the shaft position due to condensation or a buildup of electromagnetic charge effect [28].

Inductive encoder

These types of encoders are based on the traditional inductive sensors, which are resolvers (section 2.5.2), although in this case instead of using windings it is used PCB tracks. Therefore, they have lower cost, size and weight. In addition, if multi- layer circuit boards are used, there could be more than one sensor in the same place. They are also environmentally stable [26].

Figure 2-21: Inductive encoder scheme[26].

The working principle of an inductive encoder is [26]:

1. The TX track of the stator is excited by an specific frequency.

2. By means of an LC resonant circuit this signal is inductively coupled with the target.

3. These magnetic field target induces a sinusoidal current in the RX track of the stator. The amplitude of this RX track modulates the induced signal.

4. There is another RX track shift by 90 deg. from the original one (sine and cosine signals). These RX tracks avoid the external magnetic interference.

42 5. As the RX tracks are like a twisted pair wire, the dipole effect cancels the electric field produced in these tracks due to the changing magnetic field on the TX track.

6. The sine and cosine waves define the absolute position of the shaft.

7. The resolution can be increased using a secondary track with various cycles.

Furthermore, by studying phase and frequency, undesirable induced stator cur- rents are rejected [26]. These types of encoders are used as an alternative to capacitive ones in applications for the aerospace, defence, medical, oil and gas [28].

2.7 Comparison between position sensors

From all the position sensors described during this chapter, the most widely used in the industry are absolute optical encoders and resolvers. This is due to their high accuracy and resolution and also for being a mature technology. Therefore, these are the position sensors that will be compared in this section (Table 2.1) [12], [15],[29].

Table 2.1: Optical encoder and resolver comparison.

Resolver Optical encoder Angle measurement Absolute Absolute or incremental Absolute resolution 16 bits 13 bits Accuracy (arc minutes) 4 to 40 0.25 to 6 Electronic interface ADC converter Direct Construction materials Robust Fragile Shock 200G 100G Vibration 40G 10 G Temperature ∼ 220oC ∼120oC In-shaft installation Yes Only on small electric machines with hollow shaft Price Brushless: ∼ 500e/ud ∼ 200e/ ud VR: ∼ 160e/ud

Table 2.1 is deeply explained in the following lines [12], [15],[29]:

43 • The resolution of a resolver is higher than the optical encoder one as it is given by the ADC converter. Theoretically, the resolver resolution is infinite as its outputs are analog.

• The accuracy of the optical encoder is higher than the resolver one as it generates less noise and it does not need an ADC converter at its output.

• As the disk of an optical encoder is made of glass or plastic, it does not withstand properly vibrations and shocks.

• Resolvers work properly in harsh environments (dust, contaminants) whereas optical encoders do not.

• Resolvers are easier to integrate in the rotor shaft, and its electronics can be placed in a less hostile electric area.

• Resolvers can be ’in-shaft’ mounted, so they may be integrated into the electric machine design avoiding the use of flexible couplings and reducing the space required by the sensor. In the end this means reducing the probability of failure. On the other hand, encoders can only be ’in shaft’ mounted in small electric machines with hollow shaft.

• However, both position sensors have a great disadvantage: their price.

From this comparison, it is reached that resolvers are the best option for being integrated into an electric vehicle as a position sensor. This is because they withstand thermal and vibration shocks better than optical encoders, work properly in harsh environments and can be integrated ’in-shaft’ mounted. Among the resolvers on the market, the one that best fits in an electric vehicle is the VR since its structure is simpler and its axial length is smaller than that of the brushless resolvers. This Master Thesis is devoted to explain the design of a novel magnetic resolver in order to tackle the price problem. The next chapter will focus on its basic principles.

44 Chapter 3

Magnetic resolver using Hall-Effect Sensors

3.1 Introduction

In this section it is explained the basics of the magnetic resolver using Hall-Effect sensor prototype developed during this MThs. This prototype is done with the aim of reducing the cost of the VR resolvers. In addition, it is also more compact and simpler than the VR resolver as no stator/rotor laminations or windings are required. Furthermore, this prototype keeps the advantages of the VR resolvers, being elec- trically compatible with them and also being able to be frameless mounted on the electric machine [30].

During this chapter it is also explained the design optimization of this magnetic resolver: First, the initial idea of the resolver geometry is proposed. Second, the optimization algorithm that was used in this MThs is summarized. Third, it is explained how this algorithm is applied to this magnetic resolver prototype and the software that were used to it. Finally, the results obtained are shown.

45 3.2 Magnetic resolver architecture

Fig. 3-1 shows the scheme of the magnetic resolver prototype proposed. As it can be seen, it is composed of [30]:

• Rotor: It is done with ferromagnetic material and it has permanent magnets (PMs) embedded in it.

• Stator: It consists of two Hall-effect sensors electrically shifted 90 deg.

Figure 3-1: Schematic representation of the proposed magnetic resolver.

3.2.1 Hall-effect sensors

The Hall-effect sensor is a type of magnetic sensor, therefore it converts magnetic information into electric signals [31]. They are commonly used for sensing position, velocity and direction movement. They basically consist of a rectangular piece of P-type semiconductor made of gallium arsenide (GaAs), indium antimonide (InSb) or indium arsenide (InAs). Their principle operation is shown in Fig. 3-2, and it is summarized in the following lines [31]:

1. A magnet is used for creating an external magnetic field (B).

46 2. A current (I) pass through the P-type semiconductor Hall Element.

3. The principle applied is that whenever an external magnetic field is placed perpendicular to a current flowing through a conductor, a magnetic force (F) is applied to the semiconductor following the Fleming’s right-hand rule.

4. Due to this force, the electrons (e-) and holes (h+) of the current deflect in the transverse direction of the current flow, being each type of the particle (e- or h+) on each side of the P-type semiconductor.

5. This placement of electrons and holes generates a potential difference between

both sides of the P-type semiconductor, which is called Hall voltage (VH).

6. Finally, the Hall Sensor is able to calculate both the type of magnetic pole and the magnetic field magnitude. They are able to calculate the type of magnetic

pole as a South pole generates VH while a North pole has no effect.

Figure 3-2: Operating principle of the Hall-effect sensor[31].

There are two types of Hall-effect sensor: Linear (analogue) or digital.

• The analogue sensor output is directly the output voltage of the sensor (VH).

VH is proportional to the magnetic field that passes though the Hall effect sensor

47 following the equation:

I  V = R × B (3.1) H H t

Being RH the Hall Effect co-efficient, I the current applied to the semiconductor (A), t the thickness of the sensor (mm) and B the magnitude flux density (T).

It should be taken into account, that as B increases VH also increases until the saturation of the power supply. The Hall sensor used for this magnetic resolver prototype is an analogue one.

• The digital sensors have a comparator circuit, with hysteresis implemented, connected to the output of the Hall effect sensors. Therefore, these types of sensors have two states: ”on” when a magnetic flux passes through the sensor and ”off” when it does not.

Hall-effect sensors are becoming more popular due to [31]:

• Their non-contact operation.

• Their low maintenance requirement.

• Their robustness.

• Their immunity to vibration, dust and water.

3.3 Principle of operation

Depending on the excitation of the Hall-effect sensors, the outputs of this magnetic resolver prototype change.

• If the sensors are excited with DC voltage/current (Fig. 3-3a), the outputs of the Hall-effect sensors are modulated by the rotor position (Fig. 3-3c and Fig. 3-3e). However, these outputs are different from the conventional ones of a

48 resolver. Equation (3.2) represents the DC voltage excitation, and the equations (3.3)-(3.4) the corresponding sine and cosine outputs.

VE(t) = E0 (3.2)

VHS(t) = k sin(θr) (3.3)

VHC (t) = k cos(θr) (3.4)

• If the sensors are excited with AC voltage (Fig. 3-3b), the sensor outputs are similar to the ones of a conventional resolver (Fig. 3-3d and Fig.3-3e). The AC excitation is represented through equation (3.5) and the outputs through equations (3.6) and (3.7).

VE(t) = E0 sin(ωst) (3.5)

VHS(t) = E0 sin(ωst)k sin(θr) (3.6)

VHC (t) = E0 sin(ωst)k cos(θr) (3.7)

In both cases, it is considered that the rotor speed is constant. It must be contemplated that these equations are correct if the flux distribution in the rotor surface is sinusoidal, and this implies that the VHx is also sinusoidal due to the use of analogue Hall-effect sensors.

49 (a) DC excitation. (b) AC excitation.

(c) Sin output for DC excitation. (d) Sin output for AC excitation.

(e) Cos output for DC excitation. (f) Cos output for AC excitation.

Figure 3-3: Input and output voltages of the proposed magnetic resolver. ωex = 2 · π · 500 rad/s. ωr = 2 · π · 50 rad/s.

3.3.1 Design optimization

The design of this magnetic resolver prototype lies on the premise that its design is similar to the rotor of an interior permanent magnet machine. Besides, it is also subject to the constraints in Table 3.1.

50 An example of an interior permanent magnet machine rotor is shown in Fig. 3-4. In this image it is highlighted the main parts of this type of rotor that is advantageous for the magnetic resolver prototype: The interior PMs with rectangular shape are easy to manufacture and cheap. They also avoid the use of a containing ring for them. The uneven airgap reduces the THD of the magnetic field. Finally, the flux barrier allows a more effective path for the PMs flux, allowing the reduction of the PM size.

Figure 3-4: Interior permanent magnet rotor.

Table 3.1: Constraints of the magnetic resolver prototype

Number of poles 6 Minimum magnetic flux amplitude 80-100 mT measured by Hall effect sensors Maximum magnetic flux THD 0.5% measured by Hall effect sensors PMs material Sintered NdFeB

Once the design of the magnetic resolver is sketched, all its geometric parameters are named as it is shown in Fig. 3-5. Table 3.2 includes the definition of these geometric parameters.

51 (a) General view. (b) Detailed view.

Figure 3-5: Dimensions of the magnetic resolver prototype [30].

Table 3.2: Geometric parameters description.

Darc1 Rotor d-axis outer diameter Darc2 Rotor q-axis outer diameter φ Dhall Hall sensor distance from center φ Din Rotor inner diameter φ Dring Ring ourter diameter Ring th Ring thickness Rarc1 Rotor d-axis outer arc Rarc2 Rotor q-axis outer arc mth Magnet thickness Min1 Magnet distance from φDarc1 mgap Magnet gap in slot SW Slot width Bth1 Outer bridge thickness Bth2 Inner bridge thickness

The final values of these parameters are reached by using an optimization function and evaluating it with a 2D finite element analysis (FEA) program. For this purpose, MATLAB and FEMM are used together. The optimization function has the aim of:

• Maximize the magnetic flux amplitude, with a sinusoidal distribution, in the

52 airgap.

• Minimize the THD of the magnetic flux density.

• Minimize the PM volume in order to reduce the cost of the prototype.

In this case, the algorithm used in the optimization process is the Differential Evolution one, and it is explained in the following section.

Differential Evolution (DE) optimization technique

This subsection is based on [32]. According to it, this optimization process was devel- oped in 1995 by Rainer Storn and Kennedth Price in order to minimize the nonlinear and non differentiable continuous space functions. DE optimization technique has the same basics as other optimization techniques: The final aim is achieving an ob- jective function that defines the properties of a system, and then using it to perform a minimization task. The input of this objective function is the parameters on which the system properties depend, these being updated on each iteration. Each time the parameters are updated, the properties of the system are re-calculated again. If this parameter variation implies an improvement in the minimization task, it is accepted, otherwise it is not. The difference with other optimization techniques is that in this case the parameter variation vector is calculated by subtracting randomly two differ- ent random parameter vectors. This means that this technique is inherently parallel, avoiding local minimum. The problem formulation is:

1. The real value properties (P) of the system that are going to be optimized are defined as:

gm; m = 0, 10, ..., P − 1 (3.8)

There are also properties subject to some constraints (C ) that they are not

53 going to be optimized, but they have to be considered, therefore:

gm; m = P,P + 1, ..., P + C + 1 (3.9)

2. The parameters of the system are defined in a D-dimension parameter vector, and they are dependant on the system properties:

xj; j = 0, 1, ..., D − 1 (3.10)

In most of the cases, the resolution of the algorithm implies that each system property has to be between a maximum and a minimum value. Normally, these

restrictions are incorporated as constraints of gm, m ≥ P .

3. The optimization process consists of varying the parameter vector (x) until the

properties gm are optimized and constraints are met:

x = x0, x1, ..., xD−1 (3.11)

4. As it was said in the previous lines, any optimization process could be defined as a minimization problem:

min fm(x) (3.12)

Being fm(x) the mathematical expression that calculates each property gm. Calculate its minimum means that each expression is optimized, complaining with its constraints.

5. All the fm(x) functions can be combined into a single objective function z(x), that could be calculated by two ways:

54 Performing the weighted sum:

P +C−1 X z(x) = wm · fm(x) (3.13) m=0

or:

z(x) = max(wm · fm(x)), wm > 0 (3.14)

wm are the weighting factors. They define the importance of each of the opti- mization functions and also normalize the different physical units.

6. Finally, all the optimization task is re-formulated as:

min z(x) (3.15)

This problem formulation could be applied to other optimization methods. How- ever, as it was mentioned above, the difference between this optimization method and others lies in the way the parameter vector is calculated. This will be explained in the following lines: Considering that the population for the optimization function is NP parameters vectors for each generation G, it is defined that:

xi,G; i = 0, 1, 2, ..., NP − 1 (3.16)

There are two ways in order to decide the initial population:

• Randomly, if there is no data about the population.

• If the initial values are known (xnom,0), it is added to them normally distributed random deviations.

NP does not change during the minimization process. In addition, all the random decisions taken in this formulation are done using a uniform probability distribution, unless another premise is stated.

55 The parameter vectors are calculated in two steps:

• Subtracting the vector of two population members.

• Weighting this difference and adding it to a third population member.

Being that the key point of this DE optimization method. Afterwards, in the case that this resulting vector allows reaching a better result, this vector replaces the one being compared. Furthermore, the best parameter vector

(xbest,G) is evaluated in each generation G in order to follow the minimization process. To sum up, this way of generating random deviation results in a process with excellent convergence properties. In addition, the general process is robust and easy to use.

Objective function of the magnetic resolver prototype

Once the optimization algorithm used in this MThs is defined in a generic way, in this section it is explained how it is applicable to this magnetic resolver prototype. In this MThs, the objective function is defined following the expression (3.13):

3 X z(x) = P enalty + wm · fm(x) (3.17) m=1

Table 3.3 described the parameters of this multi-objective function.

56 Table 3.3: Parameters of the multi-objective function.

Symbol Function Definition f1(x) THD Harmonic distortion in flux (%) 2 f2(x) ((BHall − 0.08) Fundamental flux amplitude in Tesla with target amplitude of 0.08. 2 f3(x) PM volume Magnet volume in mm w1 20 Weighting factor of f1(x) w2 20000 Weighting factor of f2(x) w3 10 Weighting factor of f3(x) Penalty 0 if it withing the boundary Penalty given when a system property is not 100 if outside the boundary between its lower and upper limit.

3.3.2 Design optimization software

In order to carry out this optimization algorithm, both MATLAB and FEMM are used. In this case, FEMM is handled through MATLAB commands. The steps followed for performing this optimization task are:

1. Define the initialization parameters, in vector form:

• Initial value of the geometry parameters, as well as their lower and upper limits.

• Weights of the objective function.

2. Call the DE optimization function. This function is already done in MATLAB and it has the following structure:

function [bestmem,bestval,nfeval] = devec3(fname,VTR,D,XVmin,XVmax, y,NP,itermax,F,CR,strategy,refresh);

The input and output parameters of this function are defined in [33]. From these parameters, it is highlighted that fname is the function to minimize, bestmem

57 is the parameter vector with the best solution, bestval is the best objective function value and nfeval is the number of function iterations.

3. Generate the minimization function that defines the magnetic resolver. This function has as inputs the parameter vector and the iteration number and it has as output the cost function. In order to do so, the following steps are followed:

• Check that each parameter complains with its limit, if not, add 100.

• Calculate the cost function. For that, both the THD and the fundamental flux amplitude at the both Hall effect sensors’ position are calculated, in addition to the PMs volume. How these values are found is explained in the next step. The final cost function is the weighted sum of these functions.

4. Build the function that calculates the THD, the fundamental flux amplitude and the PMs volume. This function has as inputs the parameter vector and the iteration number.

It is in this function where the parameter vector is checked in the 2D FEA model of the magnetic resolver. For that, MATLAB calls FEMM with the following instructions:

global HandleToFEMM openfemm assignin(’base’,join([’handle’,num2str(nfeval)]), HandleToFEMM) newdocument(0)

Then, using MATLAB code the geometry of the magnetic resolver is build in FEMM.

The user’s manual of FEMM is [34], and some of its main commands are:

• The command mi getmaterial is used to charge a material property from

58 the FEMM library. In this case, it is used for charging both air and M- 19 Steel properties. The command mi addmaterial is used for defining a material that is not in the FEMM library. In this case is used for defining the magnet material, which is sintered NdFeB.

mi getmaterial(’materialname’); mi addmaterial(’matname’, mu x, mu y, H c, J, Cduct, Lam d, Phi hmax, lam fill, LamType, Phi hx, Phi hy, nstr, dwire);

• Then, these materials have to be placed in its corresponding space of the FEMM resolver model. For that, the command mi addblocklabel adds a label in the coordinates where each material is wanted to be defined. Then, the command mi selectlabel returns the coordinates of the selected label and mi setblockprop sets the property material to the block that includes the specified coordinates. The command mi setgroup is used for assigning a group number of the different parts of the resolver.

mi addblocklabel(x,y); mi selectlabel(x,y); mi setgroup(n); mi setblockprop(’blockname’, automesh, meshsize, ’incircuit’, magdir, group, turns);

Once this is done, the magnetic resolver is perfectly defined in FEMM, as it is shown in Fig. 3-6.

Afterwards, in the same function, it is begun an iterative process which con- sists of rotating the resolver 360 electrical degrees in order to obtain the flux amplitude and THD at the Hall effect sensor’s position during one period. For doing that the following commands are needed:

59 Figure 3-6: Magnetic resolver geometry in FEMM.

mi analyze(1); mi loadsolution();

The command mi loadsolution loads and displays the solution corresponding to the current geometry.

In each iteration it is calculated the PMs volume though the following com- mands, being 2 the group number of the PMs:

mo groupselectblock(2); mag volume=mo blockintegral(10);

60 In order to calculate the flux amplitude it is used the following code:

xpoint=0; ypoint=HS; pv = mo getpointvalues(xpoint,ypoint); B sin(k)=pv(2)+j*pv(3); xpoint=real(HP*exp(j*(pi/2-pi/p))); ypoint=imag(HP*exp(j*(pi/2-pi/p))); pv = mo getpointvalues(xpoint,ypoint); B cos(k)=((pv(2)+j*pv(3))*exp(j*(pi/p)));

First, it is getting all the values associated with the SINE Hall effect sensor position (0, HS). Then, from all these values, it is chosen the flux amplitude in the X-direction (pv (2)) and the one in the Y-direction (pv (3)). In the following lines of code, it has done the same procedure, but in the COSINE Hall effect sensor position. In this latter case, it is also needed to change the orientation of the coordinates.

The appearance of the FEMM software during the iteration process for reaching the flux amplitude is shown in Fig. 3-7.

Finally, when this iterative process finishes, the flux values in both X and Y- direction are used for calculating both the fundamental amplitude and the THD of the magnetic flux density at each position sensor.

5. This process is repeated until the DE optimization function reaches the maxi- mum number of iterations programmed or the best parameter vector bestmem is found.

61 Figure 3-7: Flux amplitude calculation in FEMM.

Once this optimization process finishes, the optimal geometry parameters of this magnetic resolver prototype are shown in Table 3.4. In addition, it was also concluded that this design fulfills its constraints, which were discussed in Table 3.1, as the Hall effect sensors read a magnetic flux density amplitude of 95 mT with a THD of 0.27%. Besides, the total PMs volume is 35.7 mm3. In Fig. 3-8a it is shown the magnetic flux density measured at the position of the Hall effect sensors SIN and COS, and in Fig. 3-8b their FFT. Once the magnetic resolver geometry is defined, in the following chapters it is explained its mechanical assembly, as well as its electronics.

62 Table 3.4: Geometric parameters result (mm).

Darc1 21 Darc2 20 φ Dhall 11 φ Din 15 φ Dring 30 Ring th 1.8 Rarc1 3.5 Rarc2 3.5 mth 0.7 Min1 2.4 mgap 1.5 SW 6.5 Bth1 0.7 Bth2 0.9

(a) B measured in each Hall effect sensor. (b) FFT of the B measured (THD = 0.27%).

Figure 3-8: Resolver performance.

63 64 Chapter 4

Mechanical assembly of the magnetic resolver using Hall effect sensors

4.1 Introduction

In this chapter it is explained the mechanical assembly of the magnetic resolver. It includes how the magnetic resolver is coupled to the electric motor as well as how the Hall effect sensors are placed in the prototype, which is through a PCB. This chapter also contains simulations related to the PCB.

4.2 Mechanical assembly

Two models have been developed to perform the assembly of the magnetic resolver to the electric motor:

• Shaft-type resolver.

• In-shaft mounted resolver.

65 4.2.1 Shaft-type resolver model

In the shaft-type resolver model, the magnetic resolver and the PCB are integrated inside a closed cage as it is shown in Fig. 4-1. In Table 4.1 the different parts of this model are named.

Number Part 1 Screws M2 2 Cover 3 PCB 4 PCB connector 5 Hall effect sensors 6 Shaft 7 Magnetic resolver 8 PMs 9 Circlip 17 10 Circlip 28 11 Bearing 51200 12 Base Figure 4-1: Complete exploded view: Table 4.1: List of parts: shaft- Shaft-type. type.

As it is observed, the magnetic resolver is placed on the shaft between a salience in it and a circlip. This method is also used to fix the bearing to the base of the cage. Finally, the PCB is held by pressure between the cover and the base. Besides, so that the PCB is always in the same position, a base salience matches a PCB guide.

This shaft-type model is attached to the electric motor shaft by means of a me- chanical coupling. Both the shaft and the end of the base are designed for this purpose.

The drawings of the base, the cover and the shaft, as well as the total mechanical assembly and the exploded view, are defined in Appendix A. There, the screws, circlips and bearings used are also specified. This step was done using AUTODESK INVENTOR.

66 4.2.2 In-shaft resolver mounted model

In this model, the resolver is integrated directly in the electric motor shaft through a machining process. In Fig. 4-2 this in-shaft model is shown, and in Table 4.2 its parts are named.

Fig. 4-2 shows that a cage is designed for placing the PCB. Finally, the PCB and the cage are assembled to the electric motor through screws and washers. Therefore, in this case, the PCB has 5 holes symmetrically distributed on its edges instead of a guide as in the case above.

The drawings of the cage, as well as the total mechanical assembly and the ex- ploded view, are defined in Appendix B. There, the screws and washers used are also specified. This step was also done using AUTODESK INVENTOR.

Number Part 1 Electric motor 2 Motor shaft 3 Cage 4 Magnetic resolver 5 PMs 6 PCB connector 7 PCB 8 Hall effect sensors 9 Screws M4 10 Washer M4

Figure 4-2: Complete exploded view: In- Table 4.2: List of parts: In-shaft. shaft.

Finally, in Fig. 4-3a it is shown the 3D view of the shaft-type model and in Fig. 4-3b the in-shaft mounted one.

Between these two mechanical assembly models, the in-shaft mounted one is the best choice. This is because it avoids the use of flexible couplings and bearings. Fur- thermore, using this model also means that the axial length of the magnetic resolver is reduced.

67 (b) In-shaft mounted model. (a) Shaft-type model.

Figure 4-3: 3D total model assembled.

4.3 PCB

This section is committed to the description of the PCB. The main aim of the PCB is supporting the Hall effect sensors. As this magnetic resolver has 6 poles, the difference between both the SIN Hall effect sensor and the COSINE Hall effect sensor are 30 mechanical deg. This is shown in Fig. 4-4.

During this MThs, four PCBs are going to be designed. Depending on whether the PCB is implemented in the shaft-type or in-shaft mounted model, two types of PCBs will be developed. However, the difference between those two models is just the shape, being the electronic circuit the same. On the other hand, depending on whether the power supplies of the Hall effect sensors need to be adapted or not, two other PCB models will be made. In this latter case, the electronic circuit changes.

The two different mechanical models are described in Section 4.3.1, whereas Sec- tion 4.3.2 is devoted to the two different electronic models.

68 4.3.1 Mechanical model

In Fig. 4-4 it is represented the two different PCB models depending on the me- chanical model in which they are going to be implemented (shaft-type or in-shaft mounted).

(a) Shaft-type model. (b) In-shaft mounted model.

Figure 4-4: PCB mechanical scheme.

The the electronic circuit, which is inside the white circle, is the same for both of them. On the other hand, the difference between them are the following ones:

1. PCB located in the shaft-type model (Fig.4-4a):

• The Hall effect sensors and the PCB connector are located in the same side of the PCB as the connector wires are pulled out through the side hole in the base of the model.

• This PCB has an indentation to match the salience made at the shaft-type model base. In this way, the PCB is always placed in the same position, with the sensors facing the magnetic resolver.

2. PCB located in the in-shaft mounted model (Fig. 4-4b):

• The Hall effect sensors and the PCB connector are located in different

69 sides of the PCB. The Hall effect sensors are facing the resolver, while the connector is located in the other side for making easier the wire connection.

• This PCB has 5 symmetrically distributed holes on its edge, so that it can be screwed to the electric motor cover.

4.3.2 Electrical model

For building the electronic circuit of the PCB, it is considered that this magnetic resolver is going to be fully compatible with other resolvers. Therefore, the PCB has

6 connection pins: Vex+ and Vex− as differential input and VOUT 1+, VOUT 1−, VOUT 2+ and VOUT 2− as differential outputs. In Fig. 4-5 it is represented the PCB electronic circuit scheme:

• The differential input to the PCB is Vex+ and Vex−. This signal has 7 Vrms of amplitude and its frequency goes from 1KHz to 10 KHz.

• These signals are also the inputs to the Hall effect sensors.

• Each Hall effect sensor produces a differential signal following the procedure explained in Sections 3.2.1 and 3.3. These differential signals are adapted in or-

der to be compatible with a microcontroller [0-3.3V]. Finally, VOUT 1+, VOUT 1−,

VOUT 2+ and VOUT 2− are the outputs of the PCB.

• This adaptation stage is fed with DC voltage, hence an AC to symmetrical DC voltage conversion stage is needed on the PCB.

• The AC to symmetrical DC voltage stage is a half bridge rectifier where the diodes are placed in antiparallel. For getting the capacitor value it is used the formula:

1 C = ∆V (4.1) 2π · f · R · V m

70 In this case, it is supposed that f = 1 KHz and that ∆V = 0.01. Vm is the average output voltage of the half bridge rectifier and it is calculated as: √ V · 2 V = exrms (4.2) m π

Finally, the value of the capacitor needed per diode is 1.3µF . For having more

stable Vcc+ and Vcc− voltages, this capacitance is divided into several parallel capacitors. In this case, 9 capacitors of 150nF per diode are used.

• For the adaptation stage, it is used the instrumental amplifier INA 828 as it allows a dual supply from ±2.25 V to ±18 V (see [35]). Its gain (G) equation,

which calculates the value of the Rg resistance needed, is also given on its datasheet:

50KΩ G = 1 + (4.3) Rg

The input impedance of this instrumental amplifier is 40 kΩ, and it is the value named as R in (4.1).

Selection of the Hall effect sensors

This section explains the selection process of the Hall effect sensors. In order to do so, the catalogue provided by the GWM Group (see [36]) is studied and of all the Hall effect sensors available, the one with the highest sensitivity is chosen. The study that has been carried out is shown in Table 4.3.

71 Table 4.3: Variables description of the Hall effect sensors and maximum sensitivity calculation [36]. S is the sensitivity, Vc is the supplied voltage, Ri is the internal resistance and Pi the internal power.

mV Name S( mT ) Vc(V) Vcmax(V) Rimax(Ω) Pimax(mW) Vcmax(V) SSmax (25oC) (25oC) (25oC) (50oC) (50oC) (50oC) (p.u.) HG0811 1.30 6 10 800 120 9.7980 0.2167 2.1229 HG0815 1.90 6 8 2800 120 18.3303 0.3167 5.8046 HG106A 1.70 6 8 625 120 8.6603 0.2833 2.4537 HG106C2U 1.30 6 10 800 120 9.7980 0.2167 2.1229 HG166A2U 1.80 6 12 1350 120 12.7279 0.3000 3.8184 HG302A 1.70 6 8 625 120 8.6603 0.2833 2.4537 HG372A 1.80 6 8 2200 120 16.2481 0.3000 4.8744 HQ8220 2.20 3 5 800 31.3 5.0000 0.7333 3.6667 HW101A 3.70 1 2 200 20.0 2.0000 3.7000 7.4000 HW108A 3.70 1 1.70 200 14.5 1.7000 3.7000 6.2900 HW300B 3.20 1 2 200 20.0 2.0000 3.2000 6.4000 HW322B 5.00 1 2 200 20.0 2.0000 5.0000 10.000 HZ116C 1.10 3 6 280 128.6 6,0000 0.3667 2.2000 HZ312C 1.10 3 6 280 128.6 6.0000 0.3667 2.2000

The values S, Vc, Vcmax, Rimax and Pimax in this table are given in the datasheets available in [36]. With these values it is calculated the maximum supply voltage

o (Vcmax) at 50 C as:

o p o o Vcmax(50 C) = Pimax(50 C) · 1000 · Rimax(50 C) (4.4)

The sensitivity p.u. is calculated as:

S(25oC) S(p.u.) = o (4.5) Vc(25 C)

And finally, the total sensitivity of the Hall effect sensors is given by:

o Smax = S(p.u.) · Vcmax(50 C) (4.6)

72 From Table 4.3 it is clear that the Hall effect sensor with the highest sensitivity is HW322B (see [37]). However, as its nominal supplied voltage is 1V, and Vex is 7

Vrms, it needs an adaptive stage. If this adaptive stage wants to be avoided the Hall effect sensor selected is HG0815 (see [38]). Therefore, if the Hall effect sensor selected is HW322B, the electronic scheme of the PCB changes to the one shown in Fig. 4-6. As it can be seen there, the voltage feeding the Hall effect sensors is decreased by 1/7 using a voltage divider (R1 = 100Ω and R2 = 600Ω).

Although for academic reasons both PCBs are designed, the cheapest option would actually be chosen. Hence, both PCBs are designed with ALTIUM DESIGNER. In Appendix C there is the schematic and the top and bottom views of the PCB without voltage divider. On the other hand, those of the PCB with voltage divider are in Appendix D. As these appendixes are focused on the electronic circuit, only one of the mechanical models was attached. After completing this stage, a market study will be done to determine the cheapest electronic circuit option. The only elements that differ between both PCBs are the Hall effect sensors and the voltage divider, therefore:

Table 4.4: Market study: The prices of the Hall effect sensors are given by GWM Associates [36], and the resistors ones by RS components [39].

Element Price Price/ud Ud Total Option 1: HW322B 5.04e/10ud 0.504e 2 1.008e Without voltage divider Option 2: HG0815 9.7e/10ud 0.97e 2 With voltage divider Resistance 100Ω 2.3e/5ud 0.46e 1 2.714e Resistance 600Ω 1.57e/5ud 0.314e 1

From Table 4.4 it is deduced that the cheapest option is the one without voltage divider, as it costs less than half of Option 2. Therefore, for an excitation voltage of

7Vrms of amplitude and a frequency of 1-10 kHz this model will be the one selected.

73 Figure 4-5: Electronic circuit scheme of the PCB.

74 Figure 4-6: Electronic scheme of the PCB with adaptation.

75 4.4 PCB simulation

In this section it is studied both PCB electric models in SIMULINK. In both cases

it is assumed that the excitation voltage has an amplitude of 7 Vrms and a frequency of 1kHz. This is shown in Fig.4-7a. On the other hand, the flux density measured by the Hall effect sensors has an amplitude of 80 mTmax and a frequency of 180 rad/s, as it is the assumed motor rotational speed. This is shown in Fig.4-7b.

(a) Excitation voltage of the PCB. (b) B measured by each Hall effect sensor.

Figure 4-7: Inputs to the PCB.

4.4.1 PCB without voltage divider

For simulating this model, Fig. 4-5 is represented in SIMULINK. The Hall effect sensors are done in SIMULINK following the equations (3.6) and (3.7). For doing that, the flux density measured by the Hall effect sensor is multiplied by the Hall effect sensor gain to reach a voltage magnitude. Finally, this value is multiplied by the excitation voltage. In Fig. 4-8a it is shown the voltage measurement provided by the HW322B Hall effect sensors. Then, this voltage measurement passes through the instrumentation amplifier to be adapted from 0 to 3.3V, and thus be readable by the microcontroller. This result is shown in Fig. 4-8b.

76 (a) Output signal of each Hall effect sensors. (b) Output signals of the PCB.

Figure 4-8: PCB outputs: Without voltage divider.

In Fig. 4-9 it is shown the output voltages of the half wave rectifier. As it is observed, the two voltages (+Vcc and -Vcc) needed to power the instrumentation amplifiers are reached correctly.

Figure 4-9: Vcc+ and Vcc- for supplying the instrumentation amplifiers.

4.4.2 PCB with voltage divider

In this case, Fig. 4-6 is implemented in SIMULINK. As in this case the voltage feeding the Hall effect sensors is 1/7 of Vex, a voltage divider is needed. Once this is implemented, the voltage that feeds the Hall effect sensors is shown in Fig. 4-10.

77 Figure 4-10: Voltage used for power the Hall effect sensors HG0815.

Due to this fact, the output voltages of the Hall effect sensors are different from the ones of the above case. However, to adapt this voltage to that allowed by a microcontroller, the instrumentation amplifier INA828 is also used, the only differ- ence being the value of Rg. As it was said before, this value is calculated using the expression (4.3). In Fig. 4-11a it is shown the output voltage of the Hall effect sensors. On the other hand, Fig. 4-11b shows the same signal but adapted from 0 to 3.3 V.

(a) Output signal of each Hall effect sensor. (b) Output signals of the PCB.

Figure 4-11: PCB outputs: With voltage divider.

Finally, both the rectifier and the capacitors are the same as those used in the previous case, therefore Fig. 4-9 remains valid. In the following chapter it is explained how to demodulate the output signals of the PCB to calculate the motor position with them.

78 Chapter 5

Demodulation techniques

5.1 Introduction

This chapter explains the different amplitude demodulation techniques, which are ’Diode rectifier envelope detector’, ’Product detector’ and ’Synchronous detection’. These methods are the ones that could be used to extract the original information from the amplitude modulated (AM) output signals of the Hall effect sensors. Finally, a section containing simulations of both a modification of the ’Diode rectifier envelope detector’ technique and the ’Product detector’ technique is included.

5.2 Amplitude demodulation techniques

The output signals of a resolver are signals modulated in amplitude, as the carrier signal (Vex) varies depending on the amplitude of the message signal. In the case of the magnetic resolver prototype, the output signals of the resolver are the output signals of the Hall effect sensors and the message signal is the magnetic field measured by them [40], [41]. This chapter is focused on the demodulation process, which consists of extracting the original information from the AM output signals of the Hall effect sensors. In Fig. 5-1 it is shown the output of each Hall effect sensor in blue. On the other hand, in red it is shown the output of each Hall effect sensor once it has been demodulated.

79 Obtaining this latter waveform is the purpose of this chapter.

(a) SIN Hall effect sensor. (b) COSINE Hall effect sensor.

Figure 5-1: Output signal of each Hall effect sensor: The original signal is shown in blue and the demodulated one in red.

As it was said in the chapter introduction, there are three amplitude demodulation techniques [42]:

1. Diode rectifier envelope detector.

2. Product detector.

3. Synchronous detection.

The ’Diode rectifier envelope detector’ method has an analogue implementation while the ’Product detector’ method has a digital one . The case of the ’Synchronous detection’ method has both digital and analogical implementations. In the following subsections, these methods are explained in more detail based on [42],[43].

5.2.1 Diode rectifier envelope detector

This method is the simplest one, as it only is consists of a diode and other passive components. As its name indicates, it detects the envelope of the AM signal. Its composition, as well as its functioning, is shown in Fig. 5-2. As it is observed in this figure, the diode allows half of the AM signal to pass through depending on the direction of the diode. In the case of the image, the positive

80 half-wave passes. Afterwards, the high-frequency components of this signal are filtered using a low-pass filter, which consists of an RC filter. Finally, the demodulated signal is reached. Regarding the value of the capacitor, it has to be large enough to hold the peak of the rectified signal, but not so large so as to attenuate it.

Figure 5-2: Diode rectifier envelope detector [44].

The main advantages of this method are its simplicity and its low cost. On the other hand, its main disadvantages are its high distortion levels and its low sensitivity. The distortion is caused by the non-linearity of the method, the selective fading and/or a poor tuning of the low pass filter, whereas the low sensitivity is caused by the turn on voltage required by the diodes. Selective fading is an anomaly in a signal due to a partial cancellation of it. In this case, it is the diode that causes the partial elimination of the AM input signal.

5.2.2 Product detector

In this method, a mixer is used to demodulate the AM signals. In this mixer, the AM signal is mixed with a local oscillator. This local oscillator signal has the same

81 frequency and phase as the original carrier (Vex). For having a better understanding of this method, a spectrum study is conducted [45]:

• The spectrum of an AM signal consists of two sidebands at fc+fm and at fc-fm Hz. Besides, the amplitude of each sideband is half the amplitude of the AM

signal. fc is the carrier frequency and fm is the message signal frequency. This is demonstrated by the analogy between the definition of an AM signal (5.1) and the trigonometric property (5.2).

Vmodulated = Ac · sin (ωct) · Am · sin (ωmt) (5.1) 1 sin A · sin B = · (cos (A − B) − cos (A + B)) (5.2) 2

• This AM signal is mixed with a local oscillator carrier and its product is per- formed in order to obtain the demodulated signal. This local oscillator has the same frequency and phase as the original carrier waveform.

• This mixing produces that the original carrier waveform is transformed into a 0 Hz signal. Its amplitude depends on the phase shift between the original carrier and the local oscillator.

• In addition, the sidebands are referred relatively to the zero frequency, therefore the demodulated signal is reached.

In fact, as the output signals of a resolver are described following the same ex- pression as (5.1), this process can be applied directly to them. Its implementation to the SIN Hall effect sensor is shown in Fig. 5-3. Considering the same data as the once used in Section 4.4:

√ Vex = 7 2 · sin (2π1000 · t) (5.3)

−3 VB = 80 · 10 · sin (2π28 · t) (5.4)

Vmodulated = 3.3104 · sin (2π1000 · t) · sin (2π28 · t) (5.5)

82 Figure 5-3: Synchronous demodulation: SIN Hall effect sensor.

In Fig. 5-3 it is checked that the AM signal has its sidebands at fc − fm =

1000 − 28 = 972 Hz and at fc + fm = 1000 + 28 = 1025 Hz and that its amplitude 3.3104 is 2 = 1.6252. This signal has no component in fc because the AM signal has no DC component. Besides, once this signal is mixed with the local oscillator one, it is also checked that the demodulated signal has only one component at the message signal frequency. In this demodulated signal spectrum, it is also appreciated that the original carrier signal and the local oscillator one are in phase since there is no component at 0 Hz. The case of the COSINE Hall effect sensor is done by direct analogy since:

Vmodulated = Ac · sin (ωct) · Am · cos (ωmt) (5.6) 1 sin A · cos B = · (sin (A + B) + sin (A − B)) (5.7) 2

This method has a great drawback: It only works correctly if the phase shift between both the AM signal carrier and the local oscillator carrier is zero.

83 5.2.3 Synchronous detection

This method was developed to overcome the main drawback of the ’Product detector’ method: it performs synchronization between the AM signal carrier and the local oscillator carrier (Vex). Although all synchronous detection methods are based on mixing the AM signal with a local oscillator carrier, which has the same frequency and phase as the original carrier, there are several methods for achieving this:

Filter method

It consists of applying a narrow band filter to the AM signal to extract its carrier. Afterwards, this extracted carrier is used to be mixed with the AM signal. The narrow band filter belongs to the group of band pass filters, which means that it allows a certain frequency (the carrier frequency) to pass through, while rejecting the rest of them. As it could be deduced, the most difficult part of this method is to correctly tune the narrow band filter. According to the literature, this fact normally is not very successful.

Phase locked loop (PLL)

In this method a PLL, which contains a narrow loop filter, is used to track the carrier frequency. Afterwards, a signal with this same frequency is replicated and mixed with the AM signal. This synchronous detection method works well and is widely used.

Limiting amplifier

In this case, the incoming AM signal is passed through a limiting amplifier to generate the local oscillator carrier. This carrier is then mixed with the original AM signal to perform demodulation.

84 This limiting amplifier is a high gain amplifier that removes all amplitude varia- tions from the AM signal, leaving only the carrier signal. An example of a limiting amplifier is given in [46]. This method, besides being simple and effective, avoids the use of complex filters and PLLs.

All ’Synchronous detection’ methods have several advantages over the ’Diode rec- tifier envelope detector’ method:

• Selective fading effects are reduced as there is no cancellation of the incoming signal.

• Distortion is reduced since no diodes or low-pass filters are used and selective fading is reduced.

• In these methods there is no minimum amplitude level of the AM signal as no diode forward bias has to be overcome.

• All this results in an increase in the sensitivity of the system.

In the following section some of these methods are simulated using SIMULINK.

5.3 Demodulation techniques simulation

In this section, two demodulation techniques will be simulated, and then compared. The first technique is a variation of the ’Diode rectifier envelope detector’ method that eliminates the low-pass filter. The second technique is the ’Product detector’ method. No synchronization method will be simulated, as no magnetic resolver element will cause a delay between the AM output signals of the Hall effect sensors (VHS or VHC) and the excitation signal (Vex). For performing a proper comparison between the two methods, both will demod- ulate the same signals (VHS and VHC). Therefore, Vex is also the same for both.

85 In the following lines it is explained how these signals are going to be achieved in SIMULINK.

The amplitude of Vex is 1 pu and its frequency is 2000 Hz, therefore:

Vex = sin (2π · 2000 · t) (5.8)

For simulating the AM output signals of the magnetic resolver, the asynchronous electric machine model of SIMULINK is used. Its parameters are in Table 5.1.

Table 5.1: Asynchronous electric machine parameters.

Rotor type Squirrel cage Rating power (HP) 5 Phase-to-phase voltage (V) 460 Frequency (Hz) 60 Rated speed (rpm) 1750 Mechanical input Torque

When the mechanical input of the asynchronous machine is the torque shown in

Fig. 5-4, the rotor speed (ωm) and rotor position (θm) are shown in Fig. 5-5a and Fig. 5-5b respectively.

Figure 5-4: Torque disturbance introduced into the asynchronous electric machine.

86 (a) Rotor speed (rad/s). (b) Rotor position (rad).

Figure 5-5: Rotor speed and rotor position when the input to the asynchronous machine is the torque shown in Fig. 5-4.

Therefore, VHS and VHC, which are the AM output signals of the Hall effect sensors, are calculated as:

VHS = sin (2π · 2000 · t) · sin (ωm · t) (5.9)

VHC = sin (2π · 2000 · t) · cos (ωm · t) (5.10)

For simulating a more realistic model, a noise signal is added to Vex,VHS and

VHC using the SIMULINK block ’awgn’.

Finally, the resolver excitation voltage is shown in Fig. 5-6a and the signals to be demodulated are shown in Fig. 5-6b.

The fact that the electric machine starts operating at 100 ms is related to the obtaining of the final electric motor position. This will be explained in Chapter 6.

Since the signals to be demodulated (VHS and VHC) by both demodulation meth- ods have already been defined, the simulation of these methods is explained in the following subsections.

87 (a) Excitation voltage. (b) Magnetic resolver outputs.

Figure 5-6: Excitation voltage and AM output signals of the magnetic resolver.

5.3.1 Diode rectifier envelope detector without low-pass fil- ter

This analogue demodulation method, which is described in [47], was developed to avoid the use of the low-pass filter in the ’Diode rectifier envelope detector’ method, as it introduces a time delay of the sensed information. The circuit diagram of this method is shown in Fig. 5-7, and its analogical imple- mentation in Fig. 5-8.

Figure 5-7: Circuit diagram of the ’Diode rectifier envelope detector without low-pass filter’ method.

88 (a) Control signal generator. (b) Full wave rectifier.

(c) Amplitude detector. (d) ± unity gain amplifier.

Figure 5-8: Description of the elements in Fig. 5-7 [47].

Although as it is an analogue method it should be implemented in a PCB, in this MThs it is simulated in SIMULINK according to the following steps:

1. As it was said before, the signals to be demodulated are those shown in Fig. 5-6b.

2. The first stage of this method is performing the comparison between Vex and

ground, VHS and ground and VHC and ground through three different compara- tors. This is done to transform the resolver analog signals into digital ones for driving the control signal generator. In that way:

 > 0; φC1 = 1 Vex (5.11) ≤ 0; φC1 = 0

 > 0; φC3 = 1 VHS (5.12) ≤ 0; φC3 = 0

89  > 0; φC2 = 1 VHC (5.13) ≤ 0; φC2 = 0

This is checked in Fig. 5-9. In this figure, and in the rest of the figures in this section, different zooms will be made on the X-axis in order to highlight what is wanted to be shown since there are high frequency components.

Figure 5-9: Comparators [Zoom 0.487-0.5075 sec.]: a) Vex and φC1, b) VHS and φC3 and c) VHC and φC2.

3. Once the signals that drive the control circuit (φC1, φC1 and φC1) are defined,

they are applied to that circuit. As it is shown in Fig. 5-8a, the signal φC1 is

applied to a JK flip-flop. Therefore, its output (φJK ) changes its state every

time a rising edge appears in φC1. Afterwards, φJK is compared to φC1 through

a NOR logic gate and φ1 is achieved. φ2 is the output of the AND logic gate

that compares φJK and NOT φC1. This sequence is explained more clearly in Fig. 5-10.

Finally, φ3 is obtained by comparing φC1 and φC3 with an XOR logic gate, and

similarly, φ4 is obtained by comparing φC1 and φC2 on another XOR logic gate. This latter sequence is explained more clearly in Fig. 5-11.

90 Figure 5-10: First part of the control signal generator [Zoom 0.487-0.49 sec.]: a)φC1, b)φJK , c)φ1 and d) φ2.

Figure 5-11: Second part of the control signal generator [Zoom 0.487-0.537 sec.]: a)φC1, b)φ3, c)φC2 and d) φ4.

91 4. Once the digital signals that controls the switches that appear in Fig. 5-8 are described, the verification of the correct functioning of the analog circuit is done below. Only the circuit related to the SIN Hall effect sensor will be studied, since the COSINE Hall effect sensor circuit is the same but shifted by 90 electrical deg. In Fig. 5-12 it is shown that the full wave rectifier works

correctly as the signal |VHS| is the absolute value of the incoming signal VHS.

Figure 5-12: SIN full wave rectifier [Zoom 0.487-0.58 sec.]: a)VHS and b)|VHS|.

5. The rectified signal of VHS is introduced into the amplitude detector (Fig. 5- 8c), which consists of a peak detector and a sample-and-hold stage. This is summarized in Fig. 5-13:

• Peak detector: As it can be seen, Va1 measures the voltage at capacitor

C11. Therefore, when SW1 is off, C11 is charged to the value of the input

signal (|VHS|), whereas if SW1 is on, C11 is discharged.

• Sample-and-hold: In this part, the value of Va1 is sampled and sent to the

output node (VA1). This sample is held until SW2 is turned on again.

92 Figure 5-13: Amplitude detection [Zoom 0.487-0.4974 sec.]: a)VHS, b)φ1, c)Va1, d) φ2 and e)VA1.

6. As VA1 is the absolute value of VHS without high frequency components, the last stage (see Fig. 5-14) has to do with the ± unit gain amplifier. In this case,

if φ3 is 0, VA1 is multiplied by -1, while if φ3 is 1, VA1 is multiplied by 1. In that

way, the demodulation of VHS is reached. This demodulated signal is named as

Vs.

Finally, the demodulated signals (Vc and Vs) achieved with this method are shown in Fig. 5-15.

93 Figure 5-14: ± unity gain amplifier [Zoom 0.487-0.58 sec.]: a)VA1, b)φ3 and c)VS.

Figure 5-15: Demodulated signals achieved with the method ’Diode rectifier envelope detector without low-pass filter’.

94 5.3.2 Product detector

Since the ’Product detector’ method is digital, it is implemented in SIMULINK fol- lowing the scheme in Fig. 5-3. In this case the mixer is a division. Considering, as in the previous case, that the signals to be demodulated are those shown in Fig. 5-6b, the result obtained is in Fig. 5-16. This figure also shows that, as previously stated, the resolver does not introduce a delay between the original carrier and the local oscillator one as the demodulation is performed correctly.

Figure 5-16: Demodulated signals achieved with the method ’Product detector’.

5.3.3 Comparison between both methods

In order to perform an accurate comparison, both Fig. 5-15 and Fig. 5-16 will be plotted together in Fig. 5-17.

95 Figure 5-17: Comparison of the demulation techniques simulated. ’1’ is the ’Diode rectifier envelope detector without low-pass filter’ method and ’2’ is the ’Product detector’ one. a)SIN Hall effect sensor and b)COSINE Hall effect sensor.

Besides that nowadays it is easier to program a microcontroller than to build a PCB with several elements, the ’Product detector’ method also has the following advantages over the ’Diode rectifier envelope detector without low-pass filter’ one:

1. As the AM signals are divided by the carrier, much of the noise from the input signals is removed.

2. The noise that the operational amplifiers and the rest of the elements in the PCB of the ’Diode rectifier envelope detector without low-pass filter’ method could introduce, is also avoided.

3. As there are no opening and closing of switches, there are no high peaks in the demodulated signals.

4. This system is more robust as it has less electronic components.

5. This method is always valid. In the other case, each passive element of the

96 PCB should be adjusted depending on the waveform that they are going to demodulate.

Due to these reasons, for reaching the electric motor position, the demodulation method chosen for this MThs is the ’Product detector’ one. The method for obtaining the electric motor position, as well as its implementation, is explained in the next chapter.

97 98 Chapter 6

Electric motor position measurement

6.1 Introduction

In this chapter it is developed the final part of this MThs, which consists of obtaining the electric motor position from the demodulated output signals of the magnetic resolver. The first section describes the two methods that could be used to achieve this objective. These methods are the arctangent (arctan) calculation and the use of a Phase-Locked Loop (PLL). In the second section, the PLL method is simulated. Afterwards, the error between the position obtained with the PLL and the real electric motor position is calculated and compared with the error of some commercial encoders and resolvers.

6.2 Techniques for determining the position of the electric motor

According to [48], there are two main techniques for obtaining the electric motor position from the demodulated SIN and COSINE output signals of the magnetic resolver (Vs and Vc), which are:

99 1. Calculation of the ’arctan’.

2. Using a PLL.

In the following subsections both methods are explained in more detail:

6.2.1 Arctangent calculation

In this method, for reaching the electric motor position (θm), the ’arctan’ of Vs over

Vc is calculated at each sample time (n). As the application of this function is ambiguous, the sign of the demodulated signals should be taken into account [49]:

  VS (n)  arctan if VC (n) ≥ 1  VC (n) θm = (6.1)  VS (n)  π + arctan if VC (n) < 1 VC (n)

6.2.2 Phase-locked loop (PLL)

The PLL is a closed control loop that generates a local signal for matching its fre- quency/phase with the frequency/phase of the input signal [50]. The basic structure of a PLL is shown in Fig. 6-1.

Figure 6-1: Basic structure of a PLL [51].

• The aim of the phase detector (PD) is to generate a signal that is proportional to the phase difference between the input signal and the one generated by the internal oscillator of the PLL.

100 • The loop filter (LF) is normally a proportional integral (PI) controller or a first order system. Its main objective is to attenuate the high frequency components

of εPD.

• The voltage controller oscillator (VCO) has as output v’. This is an AC signal whose frequency is shifted from the frequency of the internal PLL oscillator

according to the value of VLF.

Once the foundations of the PLL are defined, this section is focused on its use as a phase detector since phase is the variable that will determine the electric motor position. This method is called ’PLL for phase detection based In-Quadrature signals’, and its diagram is shown in Fig. 6-2 [51].

Figure 6-2: PLL for phase detection with the LF on the q-axis of the QSG [51].

In the scheme shown in Fig. 6-2 it should be considered that if it is applied to a

resolver, the quadrature signal generation (QSG) is eliminated since Vα and Vβ are

directly Vs and Vc.

Then, Vα and Vβ are transformed using the Park transformation to Vd and Vq. In this case, the Park transformation is done using the phase angle provided by the PLL 0 ~ (θ ) and aligning the d-axis with the input voltage vector (V = Vα +j ·Vβ). Therefore,

Vd shows the magnitude of the input vector and the LF, which in this case is a PI, ~ is tuned to make Vq = 0 in steady state. Aligning V with the d-axis also means that the phase given by the PLL is lagging 90 deg. from that of the input vector (V~ ). Besides, in this scheme the VCO is replaced by a frequency/phase-angle generator (FPG) which has the function of finding the phase of the input signal (V~ ). For the resolver case, ωc = 0 as the electric motor starts stopped. Finally, how the PLL scheme shown in Fig. 6-2 is adapted to be used in the magnetic resolver, is shown in Fig. 6-3.

101 Figure 6-3: PLL for phase detection with the LF on the q-axis, adapted to be used in the magnetic resolver.

Comparing both methods, the PLL is the best option as it is less sensitive to noise and to voltage and frequency changes, so its phase calculation is more accurate. Besides, programming the arctangent function in a microcontroller often causes trou- bles. For all these reasons, the method used to obtain the electric motor position in this MThs is the PLL. Finally, the total software implementation of this MThs (’Product detector’ de- modulation technique + PLL) is shown in Fig. 6-4, and its performance is simulated in the next section.

Figure 6-4: ’Product detector’ demodulation technique and PLL implementation.

102 6.3 Simulation of both ’Product detector’ demod- ulation technique and PLL

For performing this section, the scheme shown in Fig. 6-4 is simulated in SIMULINK. Therefore, the electric motor conditions established in Section 5.3, as well as the demodulation method described in Section 5.3.2, remain valid. This also means that

the input to the PLL are the Vs and Vc signals shown in Fig. 5-16. Regarding the simulation results, when the input signals to the PLL are those of

Fig. 6-5a, as mentioned above, the output signals of the Park transformation are Vd

and Vq, which are represented in Fig. 6-5b. In this latter figure it is appreciated that

Vd gives the amplitude of both Vs and Vc signals and that Vq is 0 in steady state, as

expected. The first deviation of Vq from 0 is due to the electric motor start-up and the second one to the change in the applied input torque. Here it is also noticed that the electric motor takes 100 ms to start. This is done so that during this time the PLL tracks the 0 position. In this way, the PLL does not miss the electric motor position during the start-up transient of it.

(a) PLL inputs (Vs and Vc). (b) Park transformation outputs (Vd and Vq).

Figure 6-5: Park transformation.

Once the Park transformation has taken place, the difference between zero and

Vq is entered into a PI and the electric motor rotational speed is reached. This speed is plotted together with the real one in Fig. 6-6. Here it may be checked that the PI

103 is correctly tuned as both rotational speeds match perfectly.

Figure 6-6: Comparison between the ωm given by the PLL and the real one of the electric motor.

Afterwards, the electric motor rotational speed is introduced into an integrator to achieve the electric motor position. This angle position is also used to perform the Park transformation. Besides, in Fig. 6-7 it is compared the position given by the PLL with the real one. In this figure it is also represented the same electric motor position, but wrapped from 0 to 2·π for being more representative. Although in this image it can be deduced that both positions match, the error between them will be analyzed later to be able to compare it with that of the commercial encoders and resolvers.

104 Figure 6-7: Comparison between the θm given by the PLL and the real one of the electric motor: a) No wrap and b) Wrap from 0 to 2·π.

6.3.1 Microcontroller implementation

Up to this point, the optimization of the resolver, its mechanical assembly, the de- modulation of its output signals and the obtaining of the electric motor position from them has been carried out. Therefore, most of this MThs has been completed. The following step consists of taking into account that the demodulation technique and the PLL implementation are going to be done in a microcontroller. Because of this, the function ’C-caller’ of SIMULINK is used as it employs C-code. The inputs to this function are the AM output signals of the magnetic resolver

(VHS and VHC), and its output is the electric motor position (θm). The scheme of the C-caller function is shown in Fig. 6-8.

Figure 6-8: C-caller function of SIMULINK.

On the other hand, Fig. 6-9a shows the input signals to the C-caller (VHS and

105 VHC) and Fig. 6-9b shows its output signal (θm). In addition, in this latter figure is also included the comparison between the electric motor position given by the SIMULINK blocks and the one given by the C-caller, reaching that the error between them is less than 0.015 rad. Therefore, it may be concluded that the C-caller was done correctly.

(b) C-caller output: a) Comparison between (a) C-caller inputs (VHS and VHC). the θm given by the SIMULINK blocks and the one given by the C-caller and b) Error between both signals.

Figure 6-9: C-caller signals.

6.3.2 Comparison between the magnetic resolver error and that of the commercial encoders and resolvers

This is the last part of this MThs. It consists of comparing the position error achieved with this magnetic resolver and those of commercial encoders and resolvers. For doing that, the real electric motor position as well as the one reached with the PLL are plotted together in Fig. 6-10a. On the other hand, in Fig. 6-10b these signals are subtracted for measuring the magnetic resolver position error. Here it is seen that the maximum error occurs during the start-up of the electric motor, which is 0.2161 rad (12.3 deg). However, once this transient occurs, the maximum error performed by this magnetic resolver is 0.0508 rad (2.9 deg), and it is caused by the change in the input torque.

106 Figure 6-10: Study of the magnetic resolver error: a) Comparison between the θm given by the PLL and the real one and b) Error between both signals.

This error will be compared to that of the following commercial encoders and resolvers:

• The optical absolute encoders characteristics are given in the catalog shown in [52], which belongs to the HOHNER AUTOMATICOS company.

• The VR resolvers characteristics are given in the catalog shown in [53], which belongs to the TAMAGAWA SEIKI. LTD company.

• The brushless resolvers characteristics are given in the catalog shown in [54], which belongs to the TAMAGAWA SEIKI. LTD company.

Table 6.1 shows from each catalogue the models that have the maximum and minimum position error. As it was expected, the absolute optical encoders have more accuracy than both VR and brushless resolvers. On the other hand, the position error of the magnetic resolver prototype proposed in this MThs is comparable to that of commercial VR resolvers, since it has the same order of magnitude.

107 Table 6.1: Position error of the commercial encoders and resolvers given by [52], [53],[54]

Absolute optical VR resolvers Brushless resolvers encoders Max. Min. Max. Min. Max. Min. Model Serie E36HS Serie S10/CM10 TS2763N202 TS2225N1014E199 TS2603N21E64 TS2640N321E64 Error (deg.) ± 0.35 ± 0.022 ± 1.2 ± 0.5 ± 0.3 ± 0.16

Therefore, at this point it is determined that this magnetic resolver based on Hall effect sensor prototype, besides reducing the cost of the VR resolvers available on the market, it could also be compared to them in terms of error position.

108 Chapter 7

Conclusions

During this MThs it was developed a prototype of a magnetic resolver with Hall effect sensors. This magnetic resolver prototype was done with the aim of lowering the price of the existing resolvers. Furthermore, this prototype maintains the properties of the VR resolvers, still being electrically compatible with them and it can also be mounted directly on the electric motor. The price reduction has been achieved since inserting PMs in the resolver and using Hall effect sensors is cheaper than winding, as in the case of both brushless and VR resolvers. In this prototype, the quadrature output signals given by any resolver are provided by the Hall effect sensors. Hence, two Hall effect sensors displaced from each other 90 electrical deg. are used. As the principle of operation of a Hall effect sensor consists of reading the magnetic flux density generated by an external magnet (in this case the PMs of the magnetic resolver prototype) and converting this magnitude into voltage, they have to be able to read a sinusoidal magnetic flux density between 80 and 100 mT of amplitude with a THD lower than 0.5%. With this aim, in Chapter 3 the optimization of this magnetic resolver is done. The result obtained, which is the geometry parameters that define this magnetic resolver prototype, is shown in the last section of this chapter. In addition, there it is also checked that, as expected, the Hall effect sensors read a sinusoidal magnetic flux density with 95 mT of amplitude and a THD of 0.27%.

109 For complying with the fact that this magnetic resolver prototype must be electri- cally compatible with all resolvers, in Chapter 4 it is developed an electronic circuit with 6 pins: two for the differential input and two for each differential output (SIN and COSINE). In this chapter it is also designed the ’In-shaft’ mechanical assembly that can be mounted directly on the electric motor, without the need of a coupling device. Finally, to verify that this magnetic resolver prototype has the same accuracy as that of the VR resolvers, Chapters 5 and 6 have been conducted. In Chapter 5, after researching the different demodulation techniques for the resolver output signals, it was concluded that the most suitable one for this prototype is the ’Product detector’. This is because the resolver does not introduce a delay between the original carrier and the one used to demodulate its output signals. In Chapter 6 these demodulated signals were introduced into a PLL for reaching the electric motor position. In this same chapter, it was also calculated the difference between the rotor position given by the PLL and the real one. Afterwards, this error was compared to that of the commercial encoders and resolvers, concluding that it is indeed similar to the error of the commercial VR resolvers.

110 Chapter 8

Future developments

Ending with this MThs, this chapter proposes the future work of this prototype:

1. Manufacture the mechanical assemblies shown in Appendices A and B.

2. Build the PCB and weld its elements.

3. Finally, assemble the final prototype and test it on a 75 kW engine to confirm that the simulations are valid.

111 112 Appendix A

Drawing plan: Shaft-type model

113 6 5 4 3 2 1

D AC-AC ( 2 : 1 ) D

4 2 2

AC 4x P2 Pasante X P4

45ƒ

C C

3 8 0

7 5 5 68 ‘ ‘ ‘ P

B B

AC

A Disexo de Revisado por Aprobado por Fecha Fecha A Marta Arbas 09/03/2020

Ediciyn Hoja Cover 1 / 4 6 5 4 3 2 1 6 5 4 3 2 1

D D

5 1 2 30 15

C C

7

1

0

‘

1

6

‘

B 9 B 54 ‘18

‘20

A Disexo de Revisado por Aprobado por Fecha Fecha A Marta Arbas 09/03/2020

Ediciyn Hoja Shaft 2 / 4 6 5 4 3 2 1 6 5 4 3 2 1

BA-BA ( 2 : 1 )

D D

H 2 11 2 2 14 2 3 4

6

BA -

4

.

0

x

2

M

x

4

4xP2 -4 Profundidad 5 , 2 R

C C 8 P6

6 8 6 1

3 2 2 1

‘ ‘ ‘ ‘

B B

BA 10 11 ‘10 ‘53 ‘58

‘73 A Disexo de Revisado por Aprobado por Fecha Fecha A Marta Arbas 09/03/2020

Ediciyn Hoja Base 3 / 4 6 5 4 3 2 1 6 5 4 3 2 1

D D

AT-AT ( 2 : 1 ) AT

C C

B B

AT

A Disexo de Revisado por Aprobado por Fecha Fecha A Marta Arbas 09/03/2020

Ediciyn Hoja Complete assembly 4 / 4 6 5 4 3 2 1 8 7 6 5 4 3 2 1

4

D D

2

C C

3

B B

5

LISTA DE PIEZAS 1 ELEMENTO CTDAD Nž DE PIEZA DESCRIPCIÏN 1 1 Base 2 1 Bearing 51200 BD1_001_BDC_001-Thrust ball bearings, single direction 3 4 din_912-m2x0_4-6-8_8 4 1 Cover 5 1 Shaft DRAWN Marta Arbas 24/06/2020 CHECKED TITLE A QA A

MFG

APPROVED SIZE DWG NO REV D Exploded view SCALE 3 : 1 SHEET 1 OF 1 8 7 6 5 4 3 2 1 Appendix B

Drawing plan: In-shaft mounted model

119 6 5 4 3 2 1

D D

B B-B ( 2 : 1 )

2 R

10ƒ

ƒ 52 C C 2 3 R 9 R3 5x P4 Pasante ƒ 0 1

P74 8 4

5 8

‘ ‘

B B

6 B

A Disexo de Revisado por Aprobado por Fecha Fecha A Marta Arbas 10/03/2020

Ediciyn Hoja Cage 1 / 1 6 5 4 3 2 1 8 7 6 5 4 3 2 1

D 1 D

C C

2

3 B B

LISTA DE PIEZAS ELEMENTO CTDAD Nž DE PIEZA DESCRIPCIÏN 1 1 Cage

2 5 din_912-m4x0_7- 16-8_8 3 5 din125-1-a_4_3-1 40_hv DRAWN Marta Arbas 10/03/2020 CHECKED TITLE A QA A

MFG

APPROVED SIZE DWG NO REV D Exploded view SCALE 2 : 1 SHEET 1 OF 1 8 7 6 5 4 3 2 1 122 Appendix C

Drawing plan: PCB schematic and views without voltage divider

123 DA D A CB C B Header6 P1 6 5 4 3 2 1 OUT1- OUT1+ OUT2- OUT2+ 1 1 IN+ C1210X475K5RACAUTO 2 1 4.7u GND 1 2 C1 4.7u SOD3716X135N D2 2 1 D1 C2 2 4.7u 2 1 1 C3 2 1 4.7u C4 2 1 4.7u Vcc+ C5 2 1 4.7u C6 2 1 4.7u C7 2 1 4.7u C8 2 1 4.7u C9 SIN+ 1 2 2 2 C1210X475K5RACAUTO 4.7u

2 1 Hall1 HG0815 C10 2 1 4.7u C11 2 1 4.7u C12 2 1 4.7u C13 4 3 2 1 4.7u Vcc- C14 SIN- 2 1 4.7u C15 2 1 4.7u C16 2 1 4.7u C17 4.7u COS+ 2 1 C18 1 2 Hall2 HG0815 Vcc- SIN+ SIN- 4 3 2 1 4 3 INA828ID U1 -VS +IN -IN RG@1 42.2K R1 COS- 3 3 RG@2 OUT +VS REF 5 6 7 8 OUT1- OUT1+ Vcc+ GND File:Date: C:\Users\..\PCB_Schematic.SchDoc 21/07/2020Size Drawn By: Title Sheet of A4 Number Revision Vcc- COS+ COS- 4 3 2 1 INA828ID U2 -VS +IN -IN RG@1 42.2K R2 RG@2 OUT REF +VS 5 6 7 8 OUT2- OUT2+ Vcc+ GND 4 4

Appendix D

Drawing plan: PCB schematic and views with voltage divider

127 DA D A CB C B Header6 P1 6 5 4 3 2 1 OUT1- OUT1+ OUT2- OUT2+ IN+ 1 1 C1210X475K5RACAUTO 2 1 4.7u GND 1 2 C1 4.7u SOD3716X135N D2 2 1 D1 C2 2 4.7u 2 1 1 C3 2 1 4.7u C4 2 1 4.7u Vcc+ C5 100 R1 600 R2 2 1 4.7u C6 2 1 4.7u C7 2 1 4.7u C8 2 1 4.7u C9 C1210X475K5RACAUTO 2 1 4.7u C10 INA+ 2 1 4.7u C11 2 2 2 1 4.7u C12 2 1 4.7u C13 2 1 4.7u Vcc- C14 2 1 4.7u C15 SIN+ 2 1 4.7u C16 4.7u

2 1 1 2 C17 HW322B HGAdap1 4.7u 2 1 C18 3 3 4 3 Vcc- SIN+ SIN- 4 3 2 1 INA828ID U1 SIN- -VS +IN -IN RG@1 10.2K R3 File:Date: By: C:\Users\..\PCB_Adapt_Schematic.SchDocDrawn 21/07/2020Size Title Sheet of RG@2 A4 OUT REF +VS COS+ 5 6 7 8 Number Revision 1 2 GND HW322B HGAdap2 OUT1- OUT1+ Vcc+ Vcc- COS+ COS- 4 3 2 1 INA828ID U2 -VS +IN -IN RG@1 10.2K R4 RG@2 OUT REF +VS 4 4 4 3 5 6 7 8 GND OUT2- OUT2+ Vcc+ COS-

Bibliography

[1] Yee-Pien Yang ; Yi-Yuan Ting. Improved angular displacement estimation based on hall-effect sensors for driving a brushless permanent-magnet motor. IEEE Transactions on Industrial Electronics Journal, 61(1), March 2014.

[2] Steve Meyer The robot report, editor. Position sensors enhance motion sys- tem accuracy. Available in https://www.therobotreport.com/position-sensors- enhance-motion-system-accuracy/ accessed on April 12, 2020.

[3] Bill Schweber Mouser electronics, editor. Options Abound when Selecting a Sensor for Motor Feedback. Available in https://www.mouser.es/applications/selecting-sensors-for-motor-feedback/ accessed on April 12, 2020.

[4] Engineering 360, editor. Rotary Position Sensors Information. Available in https://www.globalspec.com/learnmore/sensors transducers detectors/rotary position sensing/rotary position sensors accessed on April 12, 2020.

[5] Celera motion, editor. Position Sensors – Key Terms. Available in https://www.celeramotion.com/zettlex/support/technical-papers/position- sensors-choosing-the-right-sensor/ accessed on April 8, 2020.

[6] R. A. Heartz and R. M. Saunders. Design of high-precision synchros and resolvers. Transactions of the American Institute of Electrical Engineers, Part II: Applications and Industry Journal, 74(6):5, January 1956.

[7] Mong component group, editor. Synchro and resolver engineering handbook. Available in www.mong.com, downloaded at April 1, 2020.

[8] Circuitglobe, editor. Synchro. Available in https://circuitglobe.com/synchro.html, downloaded at April 4, 2020.

[9] Davood Pazouki ; Mahdi Ghafarzadeh ; Rezvan Abedini ; Ali- akbar Damaki Aliabad and E. Ali Kamali. A novel brush- less synchro: Operation principle and experimental results. 2013 21st Iranian Conference on Electrical Engineering (ICEE) Conference, September 2013.

131 [10] Circuit globe, editor. Electrical Tachometer. Available in https://circuitglobe.com/electrical-tachometer.html accessed on July 20, 2020.

[11] Jo˜ao Figueiredo. Resolver models for manufacturing. IEEE Transactions on Industrial Electronics Journal, 58(8):3693 – 3700, September 2010.

[12] L.Z. Sun ; J.B. Zou and Y.P. Lu. New variable-reluctance resolver for rotor- position sensing. 2004 IEEE Region 10 Conference TENCON 2004 Conference, May 2015.

[13] Chang-Sung Jin ; Ik-Sang Jang ; Jae-Nam Bae ; Ju Lee and Won- Ho Kim. Proposal of improved winding method for vr resolver. IEEE Transactions on Magnetics Journal, 51(3), April 2015.

[14] RoboteQ, editor. How Resolvers Work. Available in https://www.roboteq.com/index.php/applications/applications- blog/entry/how-resolvers-work accessed on April 11, 2020.

[15] Lizhi Sun. Analysis and improvement on the structure of variable reluctance re- solvers. IEEE Transactions on Magnetics Journal, 44(8):2002 – 2008, Septem- ber 2008.

[16] Leonam Pecly ; Ryan Schindeler ; Daniel Cleveland and Key- van Hashtrudi-Zaad. High-precision resolver-to-velocity converter. IEEE Transactions on Instrumentation and Measurement Journal, 66(11):2917 – 2928, July 2017.

[17] Learnchannel, editor. C´omofunciona un Resolver - Animaci´ont´ecnica. Available in https://www.youtube.com/watch?v=7PKJ52b1Qvs accessed on April 9, 2020.

[18] Mattia Tosi. Rotary transformer design for brushless electrically excited syn- chronous machines. Master’s project, Universit‘a degli Studi di Padova, Dipar- timento di Ingegneria Industriale, 2013. This is a full MASTERSTHESIS entry.

[19] X. Ge ; Z. Q. Zhu ; R. Ren and J. T. Chen. Analysis of windings in variable reluctance resolver. IEEE Transactions on Magnetics Journal, 51(5), May 2015.

[20] Chao-Yi Wu ; Chin-Wei Chang and Ming-Tzu Ho. A sub- division method for improving resolution of analog encoders. 2017 International Automatic Control Conference (CACS), November 2017.

[21] ComoFunciona, editor. Como funciona un encoder. Available in https://como- funciona.co/un-encoder/, downloaded at April 6, 2020.

[22] ROUNDSS, editor. The advantages and disadvantages of an encoder. Available in https://www.roundssencoder.com/info list.asp?id=1265 accessed on April 9, 2020.

132 [23] OMROM Industrial Automotion, editor. Technical Explana- tion for Rotary Encoders. Available in http://www.omron- ap.com/service support/technical guide/rotary encoder/further information.asp, downloaded at April 6, 2020. [24] ElectronicDesign, editor. Capacitive Sensing: A Paradigm Shift for Encoders. Available in https://cdn.baseplatform.io/files/base/ebm/electronicdesign/document/2019/04 / electronicdesign 21398 dk capencoders pdflayout.pdf, downloaded at April 7, 2020. [25] Jonathan Seybold ; Andr´eB¨ulau; Karl-Peter Fritz ; Alexander Frank ; Cor Scherjon ; Joachim Burghartz and Andr´eZimmermann. Miniaturized optical encoder with micro structured encoder disc. MDPI open acces Journal, 9(3):452, January 2019. [26] Celera motion, editor. A Comparison of Inductive and Capacitive Position Sensors. Available in https://www.celeramotion.com/zettlex/support/technical- papers/a-comparison-of-inductive-and-capacitive-position-sensors/ accessed on April 8, 2020. [27] CUI devices, editor. The advantages of capacitive vs optical encoders. Avail- able in https://www.cuidevices.com/catalog/resource/capacitive-vs-optical.pdf, downloaded at April 8, 2020. [28] Celera motion, editor. Zettlex Inductive Encoders. Available in https://www.celeramotion.com/zettlex/what-is-a-capacitive-encoder/ accessed on April 8, 2020. [29] Feng Jiang ; Dezhang Lou ; Huan Zhang ; Lixun Tang ; Songjun Sun and Kai Yang. Design of a gmr-based magnetic encoder using tle5012b. 20th International Conference on Electrical Machines and Systems(ICEMS) Conference, October 2017. [30] DF Alonso; DD Reigosa. Magneic resolver using hall-effect sensors. Paper at University of Oviedo (this is a full UNPUBLISHED entry), 2020. [31] Electronics tutorial, editor. Hall Effect Sensor. Available in https://www.electronics-tutorials.ws/electromagnetism/hall-effect.html ac- cessed on June 14, 2020. [32] Rainer Storn; Kenneth Price. Differential evolution - a simple and efficient adap- tive scheme for global optimization over continuous spaces. TR-95-012, March 1995. [33] MATLAB, editor. devec3function. Avail- able in https://www.mathworks.com/matlabcentral/mlc- downloads/downloads/submissions/24759/versions/1/previews/deeld/devec3.m /index.html accessed on July 1, 2020.

133 [34] David Meeker. Finite Element Method Magnetics: pyFEMM. FEMM, March 2018. This is a full MANUAL entry.

[35] Texas instruments, editor. INA28x High-Accuracy, Wide Common-Mode Range, Bidirectional Current Shunt Monitors, Zero-Drift Series. This is a datasheet entry.

[36] GMW Associates, editor. AKM Hall Element Magnetic Sensors. https://gmw.com/product/hall-element/ accessed on April 8, 2020.

[37] GMW Associates, editor. HW-322B. This is a datasheet entry.

[38] GMW Associates, editor. HG-0815. This is a datasheet entry.

[39] RS components, editor. Resistencias fijas para montaje en superficie.

[40] Akira Ota; Wandee Petchmaneelumka; Apinai Rerkratn; Vanchai Riewruja. Sim- ple resolver demodulation. Semantic scholar Journal, 2013.

[41] Physics and radio-electronics: A journey of ideas, editors. Amplitude modulation. Available in https://www.physics-and-radio-electronics.com/blog/amplitude- modulation/ accessed on July 8, 2020.

[42] Electronic notes, editor. AM Demodulation: Amplitude Modulation Detection. Available in https://www.electronics- notes.com/articles/radio/modulation/amplitude-modulation-am-demodulation- detection.php# ˜ text=Demodulation%20is%20a%20key%20process,the%20inco ming%20overall%20received%20signal. accessed on July 9, 2020.

[43] All about circuits, editor. Understanding Quadrature Demod- ulation Chapter 5 - Radio Frequency Demodulation. Avail- able in https://www.allaboutcircuits.com/textbook/radio-frequency- analysis-design/radio-frequency-demodulation/understanding-quadrature- demodulation/ accessed on July 9, 2020.

[44] M. Fink;S. Abouelkaram; C. Soufflet; D. Beudon. A new ultrasonic probe for scat- tering medium: the random phase transducer. Non-Destructive Testing Journal, 1:699 – 704, April 1985.

[45] Rumah Belajar, editor. Amplitude modulation. https://www.slideshare.net/rumahbelajar/amplitude-modulation-10748046 accessed on July 9, 2020.

[46] Analog devices, editor. Balanced Modulator/Demodulator: AD630. This is a datasheet entry.

[47] Anucha Kaewpoonsuk ; Ratchanoo Katman ; Thawatchai Kamsri ; Apinai Rerkratn ; Vanchai Riewruja. A simple amplitude detector-based demodulator for resolver converters. ICCAS 2010 Conference, October 2010.

134 [48] Irati ´I Iba˜nezHidalgo. Conversor resolver-to-digital en fpga para plataforma de prototipado r´apidode control. Final degree’s project, Escuela de Ingenier´ıade Bilbao, Tecnolog´ıaElectr´onica,May 1018. This is a full FINAL DEGREE entry.

[49] Texas instruments, editor. TMS320F240 DSP Solution for Obtaining Resolver Angular Position and Speed. This is an Application Report entry.

[50] Intel, editor. Phase-Locked Loop (PLL) Definition. https://www.intel.com/content/www/us/en/programmable/quartushelp/17.0/ reference/glossary/def pll.htm accessed on July 12, 2020.

[51] Remus Teodorescu; Marco Liserre and Pedro Rodr´ıguez. Grid converters for photovoltaic and wind power systems, chapter 4. John Wiley and Sons, 2011.

[52] Hohner autom´aticos, editor. Full Hohner catalog. http://docs.encoderhohner.com/Full Hohner Catalogue EN.pdf accessed on July 14, 2020.

[53] Tamagawa Seiki.LTD, editor. VR type resolver Singlsyn. https://www.tamagawa-seiki.com/assets/img/downloads/pdf/resolver- synchro/1570N17EJ.pdf accessed on July 14, 2020.

[54] Tamagawa Seiki.LTD, editor. Brushless type resolver Smartyn. https://www.tamagawa-seiki.com/assets/img/downloads/pdf/resolver- synchro/1507N9EJ.pdf accessed on July 14, 2020.

135