Download Philippe Proost electrically adjustable hydraulic valve Sensorless

Document related concepts

Giant magnetoresistance wikipedia , lookup

Josephson voltage standard wikipedia , lookup

Operational amplifier wikipedia , lookup

Switched-mode power supply wikipedia , lookup

Superconductivity wikipedia , lookup

Power MOSFET wikipedia , lookup

TRIAC wikipedia , lookup

Power electronics wikipedia , lookup

Surge protector wikipedia , lookup

Galvanometer wikipedia , lookup

Valve RF amplifier wikipedia , lookup

Index of electronics articles wikipedia , lookup

Multimeter wikipedia , lookup

Spark-gap transmitter wikipedia , lookup

Current source wikipedia , lookup

Opto-isolator wikipedia , lookup

Magnetic core wikipedia , lookup

Resistive opto-isolator wikipedia , lookup

Ohm's law wikipedia , lookup

Rectiverter wikipedia , lookup

Current mirror wikipedia , lookup

Transcript
Sensorless position estimation on a proportional
electrically adjustable hydraulic valve
Philippe Proost
Supervisors: Prof. dr. ir. Jan Melkebeek, Dr. ir. Frederik De Belie
Master's dissertation submitted in order to obtain the academic degree of
Master of Science in Electromechanical Engineering
Department of Electrical Energy, Systems and Automation
Chairman: Prof. dr. ir. Jan Melkebeek
Faculty of Engineering and Architecture
Academic year 2014-2015
The author gives permission to make this master dissertation available for consultation and
to copy parts of this master dissertation for personal use. In the case of any other use, the
copyright terms have to be respected, in particular with regard to the obligation to state
expressly the source when quoting results from this master dissertation.
January 19, 2015
ii
Sensorless position estimation on a proportional
electrically adjustable hydraulic valve
Philippe Proost
Supervisors: Prof. dr. ir. Jan Melkebeek, Dr. ir. Frederik De Belie
Master's dissertation submitted in order to obtain the academic degree of
Master of Science in Electromechanical Engineering
Department of Electrical Energy, Systems and Automation
Chairman: Prof. dr. ir. Jan Melkebeek
Faculty of Engineering and Architecture
Academic year 2014-2015
Preface
I would firstly like to thank supervisor Dr. ir. Frederik De Belie for the continuing support
and guidance throughout the entire thesis period.
I also want to extend my gratitude to Dr. ir. Thomas Vyncke, for the specific input about
the studied solenoid, and for the constructive comments on this report.
Finally I would like to thank my friends and family for being helpful and supportive during
this thesis period. Special thanks to my father and brother for their contribution in reading
and revising my final report.
Ghent,
January 19, 2015
iv
Sensorless position estimation on a proportional
ellectrically adjustable hydraulic valve
Author:
Philippe Proost
Supervisors:
Prof.Dr.ir. Jan Melkebeek
Dr.ir. Frederik De Belie
January 19, 2015
Proportional solenoid actuators are used to operate hydraulic valves and are omnipresent
in hydraulic systems. To improve their control characteristics, a feedback loop containing
a position measurement can be added. Position sensors are relative expensive though, and
require space and extra cabling. To avoid the use of sensors, the principle of selfsensing is
explored and the feasibility of a sensorless position estimation on a proportional solenoid
actuator is studied.
A finite element model is built and a multitude of simulations is performed to study the
variation in flux linkage with changing position. This variation of flux linkage results in
variation of inductance and resistance. In which the latter is a result of eddy currents. An
electrical model for the current response of the solenoid is built in Matlab. This model is
used to simulate a proposed position estimation technique in which the amplitude of the
ripple current is used to sense the pilot position. An adjusted control scheme is proposed to
improve the control of the studied proportional solenoid actuator.
Extended abstract
Proportional solenoid actuators are widely used to control hydraulic valves. They are compact, robust and relatively cheap to produce. But some local non-linearities, for example
electromagnetic hysteresis and static friction, in their control characteristic remain present.
To improve control, position estimation trough use of the selfsensing principle is proposed.
In this thesis, the feasibility of such a position estimation on a pilot-operated proportional
solenoid actuator is investigated.
A solenoid actuator is a variable reluctance machine. The behaviour of flux linkage is studied using finite element (FE) simulations. It was found that eddy currents play a massive role
on the behaviour of flux linkage trough skin effect. Variation of magnetic flux with regard
to the pilot position is dependent on the skin depth, and thus frequency. In other words, the
max can be optimized by choosing the right frequency.
ratio L
L
min
An electric model for the solenoid is built. The electrical parameters, resistance and inductance, are identified using a LCR meter. Based upon these measurements, a suitable
frequency range for position sensing is identified. For frequencies between 250 Hz and 500 Hz
changes up to 38% with regard to air gap are measured for resistance. Changes in inductance are highest for frequencies below 250 Hz. Up to 35% is measured around 100 Hz. These
measurements are imported in Matlab and a 2D look-up table of resistance and inductance
against frequency and air gap is constructed.
The solenoid actuator is driven by a puls-width-modulated (PWM) voltage with frequency
f and duty ratio δ. Its driver circuit consists of a single DC voltage source and a ’smart’
switch, connecting solenoid to the source during δT . Often a so-called dither signal is injected. This is an alternating voltage signal with frequency between 100 Hz and 300 Hz and
duty ratio 50%. Its purpose is to superimpose a small up-and down movement on the plunger,
in order to avoid standstill. At standstill static friction would occur, disturbing the linear
relationship between current and force. Two possibilities occur, when the main frequency is
around 600 Hz or lower, no dither signal is needed because plunger will experience enough
xi
vibrations resulting from the PWM voltage. When this frequency is above 2.5 kHz, a dither
signal with an amplitude of 2 - 10% of the main voltage is injected. For frequencies between
600 Hz and 2.5 kHz, an injection of dither signal depends on the situation. A secondary voltage signal, such as a dither signal, is injected in the duty ratio, δtot = δ + δdither , in which
δdither is a square test signal, alternating symmetrically around zero.
An analytic solution for the current response is presented. Two components are present
in the current response. The main current, iDC from which the electromagnetic force is
created, and a highly exponential ripple current, iAC symmetrical oscillating around iDC .
The former, iDC , is in steady state dependent on the DC resistance and the duty ratio δ of
the PWM voltage. While the ripple current is dependent on the AC resistance, inductance
and again duty ratio δ. Information about the pilot position is thus contained in the ripple
currents amplitude.
Unlike in rotary machines, the electrical time constant is very small, resulting in a highly
exponential ripple current. And it stays exponential for all interesting measurement frequencies. As a result a jump in duty ratio translates into a difficult analytical equation for the
ripple current. Making it hard to compensate for variations in duty ratio. It is mathematically proven, however, that because of this small time constant, the ripple current reaches
steady state within two PWM periods.
A selfsensing technique is then proposed and simulated in a Matlab environment. In the
proposed selfsensing technique, a secondary sensing signal is injected. This sensing signal
is a PWM voltage signal with duty ratio 50% and zero mean. The corresponding current
ripple is measured and pilot position is estimated out of it. Because the sensing signal uses
a duty ratio of 50%, the corresponding current ripple will only depend pilot position. A one
dimensional look-up table current ripples amplitude against pilot position will be sufficient.
Optimal sensing frequencies are in the range of 100 Hz to 750 Hz. In accordance with the
dither signal. Again like with the dither signal, when high driving frequencies are used, this
secondary sensing signal is advised to use. However, when the driving frequency is sufficient
low, the ripple current resulting from it may be just fine to sense the pilot position. Although a two dimensional look-up table is then needed, to include the variation of current
ripple with duty ratio. It is obvious that the optional dither signal can be integrated in this
sensing signal.
To measure the current, a bandpass filter and a lowpass filter is proposed. If a sensing
signal is injected, the current will contain three components, the main current, iDC , a high
frequency ripple current and a low frequency ripple current. In which the latter corresponds
xii
to the sensing signal. The bandpass filter is needed to pass the low frequency current ripple
for estimating the position. The lowpass filter will be used to pass the main current as feedback to the current controller.
All these simulations are based upon the constructed model and the constructed 2D look-up
table for resistance and inductance. To verify this model and the conducted LCR measurements, current measurements were conducted.
xiii
Contents
1 Introduction and thesis research goals
1.1
Structural Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2 Functionality of the solenoid actuator
1
3
4
2.1
Magnetic circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4
2.2
Electrical circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6
2.2.1
Electrical model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6
2.2.2
Dither signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10
Dynamics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10
2.3.1
Mechanical subsytem . . . . . . . . . . . . . . . . . . . . . . . . . . .
10
Hydraulic circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11
2.3
2.4
3 Position sensing
3.1
3.2
3.3
13
Position sensors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
13
3.1.1
Analogue sensors . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
13
3.1.2
Digital sensors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
14
3.1.3
conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15
Selfsensing on rotary machines . . . . . . . . . . . . . . . . . . . . . . . . . .
15
3.2.1
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
17
Selfsensing on solenoid actuators . . . . . . . . . . . . . . . . . . . . . . . . .
18
4 Finite Element Model Simulations
4.1
4.2
20
Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
20
4.1.1
Solver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
24
4.1.2
Simulation Parameters . . . . . . . . . . . . . . . . . . . . . . . . . .
24
Magnetic flux behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
25
4.2.1
26
Functionality of the Stopper . . . . . . . . . . . . . . . . . . . . . . .
xiv
Contents
Contents
4.2.2
Functionality of the ’little stick’ . . . . . . . . . . . . . . . . . . . . .
26
4.2.3
Principle of skin depth δ . . . . . . . . . . . . . . . . . . . . . . . . .
27
Inductance simulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
29
4.3.1
Calculating the inductance . . . . . . . . . . . . . . . . . . . . . . . .
30
4.3.2
Influence of the skin depth . . . . . . . . . . . . . . . . . . . . . . . .
31
4.3.3
Influence of saturation . . . . . . . . . . . . . . . . . . . . . . . . . .
35
4.4
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
36
4.5
Future work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
37
4.3
5 Identification of electric parameters
38
5.1
Test setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
38
5.2
Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
39
5.3
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
43
5.4
Importing measurements to Matlab . . . . . . . . . . . . . . . . . . . . . . .
43
6 Selfsensing on the solenoid
44
6.1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
44
6.2
Identification of the solenoid current . . . . . . . . . . . . . . . . . . . . . .
46
6.2.1
Influence of air gap and frequency . . . . . . . . . . . . . . . . . . . .
46
6.2.2
Influence of harmonics in a square wave . . . . . . . . . . . . . . . . .
48
6.2.3
Modelling current during duty jump . . . . . . . . . . . . . . . . . .
50
Position sensing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
53
6.3.1
Injecting sensing voltage . . . . . . . . . . . . . . . . . . . . . . . . .
53
6.3.2
Measuring current ripple . . . . . . . . . . . . . . . . . . . . . . . . .
56
Simulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
57
6.4.1
Simulation setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
57
6.4.2
Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
57
6.4.3
Simulating measurement error . . . . . . . . . . . . . . . . . . . . . .
61
6.4.4
Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
61
6.5
Practical implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
62
6.6
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
64
6.3
6.4
7 Solenoid current measurements
7.1
65
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
65
7.1.1
65
Verifying theoretic model for current waveforms . . . . . . . . . . . .
xv
Contents
7.2
7.3
7.4
Contents
Practical implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
67
7.2.1
Test set-up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
67
7.2.2
Test setup deviations . . . . . . . . . . . . . . . . . . . . . . . . . . .
68
7.2.3
Data processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
69
Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
69
7.3.1
Comparing resistance and inductance . . . . . . . . . . . . . . . . . .
69
7.3.2
Comparison of measured and simulated ripple current . . . . . . . . .
71
7.3.3
Saturation curve . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
73
conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
73
8 Future work
75
9 Conclusion
76
A Flowcharts
79
B Extra figures, FG measurements
82
C Matlab code, LCR measurements
83
D Matlab code, selfsensing simulations
84
E Matlab code, FG measurements
94
F Python code, FEM simulations
106
xvi
Chapter 1
Introduction and thesis research goals
Proportional electro-hydraulic valves are ubiquitous as flow actuators in hydraulic systems.
Examples of usage can be found in the automotive sector. For example fuel control in diesel
engines with direct injection [1]. Or pressure control in hydraulically actuated clutches [2].
This type of clutch is used both in off-highway transmissions and in sport cars with a semiautomatic transmission (SAT). Also in other sectors these valves are popular, for example in
the hydraulic circuit of a steel rolling mill press [3].
This thesis is in cooperation with Dana. The Dana Holding Corporation is an Americanbased worldwide supplier of powertrain components such as axles, driveshafts, off-highway
transmissions, sealing and thermal-management products, and service parts. The TS98-T34
proportional pilot-operated solenoid valve, studied in this thesis, is used by Dana in the field
of hydraulic actuated clutches in off-highway transmissions.
A proportional electro-hydraulic valve consist of an hydraulic valve and a proportional
solenoid actuator. Their popularity stems from the fact that they are simple and rugged
in construction, and relatively cheap to produce. Proportional solenoid actuators are a bit
more complex than on-off solenoid actuators, but their linear relationship between current
and force is a big advantage. On-off solenoids are mostly used as electrical contacts in relays
or in the form of throttling devices in fluid/gas valves. Classic proportional actuators, such
as the dc, stepper and other servo motors are high precision motion devices, usually with a
linear control characteristic. These proportional actuators have very precise control characteristics. But they are more complex, expensive and require more maintenance.
Much interest is shown in improving the control characteristics of solenoid actuators. This is
motivated by three considerations. Firstly, solenoid have a small and compact size, and their
1
Chapter 1. Introduction and thesis research goals
production cost is much lower than traditional proportional actuators. Secondly, solenoids
have simple constructions, they are robust and maintenance free. Finally, due to its compact
size and robust construction, solenoids can be easily incorporated in systems.
The electromagnetic force produced by the solenoid, should be proportional to the current
and independent of the plunger position in order to be used to control the valve position in
the oil hydraulic control system. Positioning accuracy is contrasted by the solenoid plunger
friction, by fluid forces depending on the pressure drop across valve openings and by complexity and hysteresis of the electromagnetic force generated by the solenoid.
Improving the control characteristics can be done by adding a position sensor and a feedback
loop. Resulting in the control scheme of fig. 1.1.
Figure 1.1: Proposed control scheme
It is, however, not ideal to add a position sensor. First of all, position sensors are relatively
expensive, making the proportional solenoid less economic. Secondly, the sensor needs to be
mounted upon the solenoid, resulting in more cabling and less reliability. Finally, solenoid
actuators can be very small and compact, therefore it is not always possible to add a position
sensor to the system.
The goal of this thesis is to investigate whether a position estimation without sensor is
feasible. We will make use of the selfsensing principle, in which the motor or actuator itself
is used as sensing device. Measurements of the applied voltage and the resulting current will
be used to estimate the armature position.
2
1.1. Structural Overview
1.1
Chapter 1. Introduction and thesis research goals
Structural Overview
Chapter 1: Introduction and thesis research goals In this chapter the goal of this
thesis is briefly explained. As well as some problems and challenges faced.
Chapter 2: Functionality of the solenoid actuator The basic functionality of the
solenoid actuator and its driver circuit are explained here.
Chapter 3: Position sensing In this chapter is explained why we want to sense the pilot
position. An overview of the most popular displacement sensors is given, as well as some
literature study about selfsensing.
Chapter 4: Finite element simulations In this chapter finite element (FE) simulations
are performed. These simulations are used to get more insight and understanding of the
electromagnetic behaviour inside the solenoid.
Chapter 5: R and L modelling In Ch. 4, the flux was simulated for different varying
parameters. In this chapter the resistance and inductance are measured and a look-up table
is constructed. This look-up table will serve as a base for the simulations of chapter 6.
Chapter 6: Selfsensing Based upon the look-up table created in Ch.5, the current response is calculated, starting from the theoretical kirchoff equations. A selfsensing technique
based upon current measurements is proposed here.
Chapter 7: Current measurements In Ch.5 en Ch. 6, a theoretic model is built and
used. In this chapter these results are validated with the help of current measurements.
Chapter 8: Future research Some ideas for future research are proposed.
Chapter 9: Conclusion A final conclusion is made.
3
Chapter 2
Functionality of the solenoid actuator
The functionality and basic operation of the proportional solenoid actuator is explained in
this chapter.
2.1
Magnetic circuit
The solenoid used in this thesis is the TS98-T34 proportional pilot-operated solenoid valve,
from the company Hydraforce. A cross-section is shown below. Important to note is that
on the picture in fig. 2.1, the surrounding iron case is not shown, unlike in the schematic
drawing 2.2. The armature of the solenoid can also be named pilot. These two names will
be used interchangeably throughout this thesis.
Figure 2.1: Cross-cut of the used solenoid actu-Figure 2.2: Schematic
ator
cross-section
of
the
solenoid actuator
When the coil is energized, a magnetic flux will flow trough the armature, air gap and
surrounding iron. The objects painted in blue on the schematic cross-section, are made out
of non magnetic material, and thus no flux will flow trough them. The underlying reason for
4
2.1. Magnetic circuit
Chapter 2. Functionality of the solenoid actuator
this will be discussed in chapter 4.
This magnetic flux flow path can be summarized in a magnetic circuit, fig. 2.3. In this circuit we recognize the magnetomotive force Fcoil and the reluctances, or magnetic resistances,
Rairgap , Riron and Rarmature . The reluctance is proportional to the length of the section,
l, and inversely proportional to the cross-sectional area, A, and the magnetic permeability, µ.
Fcoil
Rair gap
Riron
Rarmature
Figure 2.3: Magnetic circuit of the solenoid
Applying these formulas to our circuit, we get:
Rtot = Rairgap + Riron + Rarmature
=
(2.1.1)
lairgap
liron
larmature
+
+
µ0 Aairgap µiron Airon µarmature Aarmature
(2.1.2)
Which results in the following magnetic flux.
φ=
=
mmf
Rtot
Ni
lairgap
µ0 Aairgap
+
liron
µiron Airon
+
larmature
µarmature Aarmature
(2.1.3)
Out of this magnetic flux, the inductance can be calculated easily. The equation for inductance is put here, it will be of value later in the thesis.
L=
φ
Ni
=
=
i
Ri
n
lairgap
µ0 Aairgap
l
l
armature
+ µ iron
+µ
armature Aarmature
iron Airon
5
(2.1.4)
2.2. Electrical circuit
Chapter 2. Functionality of the solenoid actuator
In this last equation for inductance, things can be simplified. The length of the iron and
the length of the armature are constant, just as the cross-section of the air gap. This results
in
L=
n
c1
µiron Airon
c
2
+µ
+ c3 .lag
armature Aarmature
(2.1.5)
The permeabilities µiron and µarmature will vary as a result from saturation. The crosssection areas Airon and Aarmature will vary with skin depth. And the length of the air gap
lag will vary when the position of the armature is changed. These three parameters, air gap,
saturation and skin depth will be of importance throughout the whole thesis.
2.2
2.2.1
Electrical circuit
Electrical model
The solenoid is driven by pulse width modulated (PWM) voltage signal, varying between
0 V and 12 V or 0 V and 24 V, and with duty ratio δ. A PWM voltage with typical current
response is shown in fig. 2.4. The PWM signal is merely a square wave with constant
frequency. The thickness of the ’active’ pulses is characterized by the duty ratio. This is the
time the signal is high, divided by the period.
t
(2.2.1)
δ = active
T
This PWM signal is obtained by a constant voltage source and ’smart’ switch, connecting
the voltage source to the solenoid during tactive and opening the circuit during T − tactive .
The solenoid can be regarded as a series connection of an inductance and two types of
resistances. A DC resistance and an AC resistance. The former is the resistance of the coil,
while the latter results from eddy currents losses which are introduced in the system because
of alternating currents. Because these eddy currents only result from the AC currents, our
model should be split in two parts: a DC circuit and an AC circuit.
Rtot = RDC + RAC = Rcoil + Reddylosses
(2.2.2)
The DC circuit is a series connection of the inductance LDC , measured in DC, and the DC
resistance RDC , driven by a constant voltage source VDC .
The AC circuit is a series connection of the inductance, measured at the desired frequency,
6
2.2. Electrical circuit
Chapter 2. Functionality of the solenoid actuator
0.75
12
0.7
10
8
I [A]
V [V]
0.65
6
0.6
4
2
0.55
0
4
5
6
7
0.5
8
Time [ms]
4
5
6
Time [ms]
−3
x 10
7
8
−3
x 10
Figure 2.4: Solenoid powered by a PWM voltage, in normal operation
the DC resistance and the AC resistance, again measured at the desired frequency. This
circuit will be driven by an alternating voltage source with zero mean.
VDC
RDC
L
(a) Electric DC model
In the following section, a square wave oscillating between V1 and V2 with duty ratio δ is
assumed.
7
2.2. Electrical circuit
Chapter 2. Functionality of the solenoid actuator
VDC = δV1 + (1 − δ)V2
(2.2.3)
VAC,max = V1 − VDC
(2.2.4)
VAC,min = V2 − VDC
(2.2.5)
i = iDC + iAC
(2.2.6)
V = VDC + VAC
(2.2.7)
In order to calculate the current response during one PWM period, we start from the
kirchoff equations 2.2.8 and 2.2.9.
di (t)
= VDC
RDC .iDC (t) + LDC . DC
dt

diAC (t)  VAC,max
R.iAC (t) + L.
=
dt
VAC,min
(2.2.8)
0 ≤ t ≤ tactive
tactive ≤ t ≤ T
(2.2.9)
In which,
T = 1/f
tactive = δT
Equation 2.2.8 is a first order differential equation. The DC current will reach its steady
state value after a exponential transient.
Solving the kirchoff equations we get:
V
V
iDC (t) = iDC (0) − DC e−t/τDC + DC
RDC
RDC
VDC
iDC,ss =
RDC
 VAC,max −t/τ VAC,max


 iAC (0) −
e
+
R
R
iAC (t) =  VAC,min −(t−δT )/τ VAC,min


iAC (δT ) −
e
+
R
R
8
(2.2.10)
(2.2.11)
0 ≤ t ≤ δT
δT ≤ t ≤ T
(2.2.12)
2.2. Electrical circuit
Chapter 2. Functionality of the solenoid actuator
In which,
L
R
L
τDC = DC
RDC
τ=
The alternating current is a periodic current varying between iAC,min at t = 0 and iAC,max
at t = δT . Using this information, the AC equation becomes:
iAC (t) =
 


VAC,max −t/τ VAC,max



e
i
+

AC,min −


R
R



VAC,min −(t−δT )/τ VAC,min



e
i
+

AC,max −


R
R
0 ≤ t < δT
(2.2.13)
δT ≤ t < T
In a steady-state situation, the current in the beginning of the period equals the current
at the end of the period. Also the current at time δT should be continuous.
Expressing these two principles mathematically, we get following constraints:
iAC (0) = iAC (T )
lim iAC (t) =
t→δT −
(2.2.14)
lim iAC (t)
(2.2.15)
t→δT +
If we apply these constraints to the AC equation, we can calculate the maximum and
minimum currents.
iAC,max =
VAC,min
e−T /τ
+ VAC,max
e−δT /τ
−1
R e−T /τ − 1
iAC,min =
− e−δT /τ
VAC,max
e−T /τ
− e−(1−δ)T /τ
+ VAC,min
e−(1−δ)T /τ
−1
(2.2.16)
R e−T /τ − 1
Corrected with the DC-component of the solenoid current, we get the maximum and minimum currents.
imin = iAC,min + iDC
imax = iAC,max + iDC
9
(2.2.17)
2.3. Dynamics
2.2.2
Chapter 2. Functionality of the solenoid actuator
Dither signal
One of the non linearities of the system is static friction. When the hydraulic plunger, shown
in fig. 2.6a, is moving, the friction will be lower then when this plunger is standing still.
And thus the electromagnetic force needed to move the plunger is bigger at standstill then
during movement. To account for this difficulty, a dither signal can be injected. Its purpose
is to keep the plunger moving, by injecting a low frequency alternating voltage, superposed
on the main voltage. This vibration should not hinder the normal operation, and thus its
amplitude should be restricted.
Whether an additional dither signal is needed depends on the application of the solenoid,
and the used PWM frequency. Also the amplitude of the dither signal depends on the needed
performance of the system and the present resonances in the system. An overview is given
in the table below.
Table 2.1: Overview of dither signal
2.3
PWM frequency
<600 Hz
<2.5 kHz
Dither amplitude
No dither
Dither frequency
No dither
Dependend on situation 2-10 % of Vmain
Dependend on situation 100 Hz - 300 Hz
>2.5 kHz
Dynamics
2.3.1
Mechanical subsytem
The mechanical subsystem of a classic solenoid actuator would consist of a mass, spring and
damper. However in the solenoid used in this thesis, no mechanical spring is found, see fig.
2.1.
Oil is distributed inside the solenoid trough the oil distributing orifice. Because of the
length and small cross-section of this orifice, a pressure difference occurs. The equation of
forces acting on the armature is given below.
mpilot ẍpilot + B ẋpilot = pentry Astick + pdis Apilot − Astick − pdis Apilot + Fem
= pentry − pdis Astick + Fem
= Fpressure + Fem
10
(2.3.1)
2.4. Hydraulic circuit
Chapter 2. Functionality of the solenoid actuator
In which pdis stands for the pressure of the distributed oil, Fem for the electromagnetic
force and Aarm stands for the surface of the armature. Displacement of pilot, xpilot , is chosen
to be positive to the right. It is, positive for increasing air gap.
Let us take a look at the force produced by the magnetic field, Fem . This one can be
derived using the coenergy W 0 .
W0 =
Z i
Fem =
0
N φ(i)di
∂W 0 (x, i)
∂x
Resulting in,
∂N φ
i
∂x
In which N represents the number of windings of the solenoid.
Fem =
(2.3.2)
If we simplify eq. 2.1.3, and replace lairgap with x, we get:
φ=
Ni
k1 + xk2
(2.3.3)
⇔
∂N φ
−N 2 k2 i2
i= 2
∂x
k1 + k2 x
(2.3.4)
We notice that this force is negative at all times, and thus opposing the force applied by
the oil pressure.
To summarize, if no current is flowing trough the coil, the pilot will be pushed towards the
back as a result from the oil pressure. When the coil is energized, and the electromagnetic
force exceeds the oil pressure, the pilot will move to the center of the solenoid, decreasing
the air gap.
2.4
Hydraulic circuit
Now we have seen how the solenoid works, it is time to look at the hydraulic part of the
actuator. In fig. 2.6a a picture of the valve is shown. Using fig. 2.6b the functionality can
be explained.
11
2.4. Hydraulic circuit
Chapter 2. Functionality of the solenoid actuator
(b) Schematic cross-section of hydraulic valve
(a) Picture of hydraulic valve
Figure 2.6: Hydraulic valve and its schematic cross-section
Without applied current, the valve allows flow from 2 to 1 while blocking 3. When the coil
is energized, 2 is connected to 3, and pressure at 2 is controlled proportional to the amount of
current applied to the coil. If pressure at 2 exceeds the setting induced by the coil, pressure
is relieved to 1. This valve is intended for pressure limiting purposes.
12
Chapter 3
Position sensing
As explained in previous posts, a measurement of an internal variable is needed to better
control the actuator. In this thesis, the armature position is chosen to be measured because
there are some non linearities which are dependant on the armature’s position. Also, the
output pressure directly depends on the position of the armature.
First an overview of the existing position sensors is given. Secondly, a discussion on selfsensing
on rotary machines is presented. And to conclude, a literature review of selfsensing on
solenoid actuators is presented.
3.1
Position sensors
3.1.1
Analogue sensors
Strain gauge The strain gauge is a transducer, used to measure very small strains on an
object. The most common type of strain gauge consists of an insulating flexible backing
which supports a metallic foil pattern. The gauge is attached to the object by a suitable
adhesive, such as cyanoacrylate. As the object is deformed, the foil is deformed, causing its
electrical resistance to change. This resistance change is converted to a voltage deflection by
the use of a Wheatstone bridge.
Accelerometer An accelerometer is a sensor, used to measure accelerations. It exists of
a little mass, spring and damper system. As a result of an acceleration, the mass will be
displaced. This displacement results in a chance of capacitance which again can be measured
by a Wheatstone bridge?
13
3.1. Position sensors
Chapter 3. Position sensing
Figure 3.1: Functionality of an accelerometer
Figure 3.2: Functionality of a LVDT
LVDT The linear variable differential transformer (LVDT) is a sensor used to measure
displacements between 0.1 mm and 500 mm. The LVDT can be regarded as a transformator
with two identical secondary windings and a ferromagnetic core. When the core is moved, the
voltages induced in the secondary windings change. The difference between these secondary
windings is a measure for the displacement of the core. This functionality is explained in fig.
3.2.
Proximity sensor The last analogue sensor we will describe is a proximity sensor. A
proximity sensor is a sensor able to detect the presence of nearby objects without any physical
contact. A proximity sensor often emits an electromagnetic field or a beam of electromagnetic
radiation (infrared, for instance), and looks for changes in the field or return signal.
3.1.2
Digital sensors
Selfsensing is typically an analogue problem. But for the sake of completeness, also the
subject of digital sensors is treated.
14
3.2. Selfsensing on rotary machines
Chapter 3. Position sensing
Figure 3.3: Digital bit pattern of a position encoder
The most used position sensor on electrical motors are digital position encoders. Strictly
speaking these encoders are not real sensors, but subsystems sending a digital signal. A
board with digital bit pattern is attached to the object to be measured. This board will
move relative towards the sensor. This sensor will read the digital pattern, which can be
decoded into position.
3.1.3
conclusion
The functionality of the LVDT sensor reminds us of the solenoid actuator. Which basically
is a winding with a ferromagnetic core inside. When the core of the LVDT is moving, the
mutual inductance will change. In our solenoid, only one winding is present. And thus the
self inductance will vary when the core is moved.
3.2
Selfsensing on rotary machines
A number of sensorless control techniques have been developed the last three decades. The
aim of these techniques is to accurately control the electrical machine without any mechanical position or speed sensor [8]. Instead, the electromagnetic properties of the motor itself is
used to sense an internal variable, f.e. flux linkage or armature position. Therefore we talk
about self-sensing.
Self-sensing eliminates the need for an external sensor. This way the cost is reduced and
15
3.2. Selfsensing on rotary machines
Chapter 3. Position sensing
it makes the overall system more compact. The latter is an important advantage on small
servomotors or actuators. Since these machines are often too small to integrate an external
sensor. Selfsensing also makes the overall system more reliable, since no extra cables etc. are
necessary.
A lot of research on selfsensing has been executed on rotary variable reluctance machines. Most of the latest research is performed on permanent magnet synchronous machines
(PMSM). Which is a variable reluctance machine, just as our solenoid actuator. In selfsensing on PMSM, a distinction is made between a machine running at high speed, or a machine
at low speed or standstill. At high speed, the most used technique is back-EMF tracking.
Since both the back-EMF amplitude and frequency are proportional to the rotor speed, this
method will not work at low speed or standstill. Because the back-EMF in solenoid actuators
is negligible, this technique will not further be discussed.
At standstill, position detection is only possible if an electrical characteristic of the motor changes with rotor position. In most methods, these changes are detected by injecting
high-frequency voltage test pulses and then measuring the corresponding current response.
Different electromagnetic phenomena can produce variations in the phase resistance, self
inductance and phase to phase mutual inductances.
Saturation This principle resides in saturating the iron of the motor by injecting high
current pulses in the phases. If the magnet is aligned with the phase and the flux generated
by the winding has the same direction, the iron saturates. Hereby decreasing the phase
inductance. On the other hand, if the magnet flux is in the opposite direction relatively to
the winding created flux, iron will not saturate. And the inductance will not decrease.
Injecting a series of pulses on the three motor windings will permit to detect the electrical
position of the rotor.
Inductance variation Self inductance of a phase depends on the total reluctance of the
magnetic flux path in the motor. Mechanical asymmetries will cause the flux path and
the total reluctance to vary with rotor position. Inductance variations are retrieved trough
injection of high frequency (500 Hz-2 kHz) signals. The corresponding high frequency current
ripple contains information about inductance and thus about rotor position.
16
3.2. Selfsensing on rotary machines
Chapter 3. Position sensing
Eddy currents Eddy current affect both phase resistance and phase inductance, since eddy
currents generate a flux opposing the original flux, which created them. Hereby indirectly
decreasing the phase inductance. When a mechanically asymmetric rotor is used, phase
resistance and inductance will vary with rotor position.
MAM The magnetic anisotropy method (MAM) takes advantage of the modern rare earth
magnet mechanical characteristics. In fact, magnets such as SmCo or NdFeB are intentionally
made anisotropic durin the production process.
As a consequence, the relative permeability of the magnets varies significantly between easy
and hard magnetization axis. Again, like in the case of inductance variations die to saturation,
the magnetic path will be position dependent because of the permeability variations in the
magnetic equivalent circuit reluctances.
Selfsensing technique used in EELAB In the Electrical Energy Laboratory (EELAB)
of UGent, the topic of selfsensing is covered as well. Special attention will be given to this
technique.
A salient-pole PMSM is used, and thus phase inductance will vary with rotor position. Test
signals will be injected in the PMSM, and the resulting current ripple will depend on the
rotor position. These test signals are voltage deviations from steady state. The test period
during which these signals are applied is much smaller than the electrical time-constants,
causing the current deviations to vary linearly in time.
By measuring current variations during two succeeding test periods, an estimation of the
rotor angle can be made.
In order to avoid current distortions, the test pulses are constructed in a particular manner.
A first test vector which results in a voltage deviation δV is applied during half a switching
period. Then a second test vector with voltage deviation −δV is applied during a whole
switching period. Finally a third test vector with voltage deviation δV is applied during half
a switching period. By using this test vector sequence, the current crosses its average value
in the middle of the switching period.
3.2.1
Conclusion
An overview of the selfsensing methods used on PMSM at standstill is given. Generally
speaking, phase inductance or resistance is dependent on rotor position as a result from a
certain electromagnetic phenomenon. The inductance or resistance is then estimated using
17
3.3. Selfsensing on solenoid actuators
Chapter 3. Position sensing
test voltage pulses.
The idea of inductance variation because of saturation or magnetic anisotropy are not
suitable for the solenoid actuator, used in this thesis, as these methods need multiple poles
in order to work.
The idea of inductance variation trough a change in magnetic flux path however, can be a
possibility.
3.3
Selfsensing on solenoid actuators
Some research about selfsensing on solenoid actuators has been done. Most of them are about
turning a on/off switching solenoid to a proportional one trough position estimation. The
solenoid used in this thesis is already a proportional solenoid, the goal here is to improve the
control using an estimate of the position. An overview of the most important papers is given
below.
Rahman ’96 In [9], a selfsensing technique is established, in order to convert an on/off
switching solenoid to a proportional one. Because of the change in magnetic flux path with
regard to the position, the inductance varies over the air gap. In this paper, the incremental
inductance is calculated at each PWM period. In this calculation, the back-EMF is neglected.
Using a 2D look-up table of inductance as a function of air gap and current level, the position
is estimated, since the current level can be measured. When air gap was close to zero, and
the current level was high, position estimation was not possible since inductance stayed more
or less constant in that region, due to saturation.
Lincremental =
≈
V − Ri − E(x, i) dx
dt
di
dt
V − Ri
(3.3.1)
di
dt
Y. Qinghui, P. Y. Li ’04 In [10] position estimation on a push-pull solenoid is achieved
using flux observers. Again the flux varies with position as a result from the change in
magnetic flux path. These flux observers are constructed using integration of the voltage
over the solenoid.
λ(t) = λ0 (tk ) +
18
Z t
tk
u − Ridt
(3.3.2)
3.3. Selfsensing on solenoid actuators
Chapter 3. Position sensing
Pawelczak ’04 In [11] the effect of eddy currents on both inductance and resistance is
explored. The ripple in current, resulting from the applied PWM voltage is modelled. Using
assumption 3.3.3, the current ripple can be calculated as a function of only resistance R(x).
This resistance is modelled in function of position x, eliminating the need for a look-up table.
∆R
∆L
R
L
(3.3.3)
Y. Perriard, S. Maridor, N. Katic, D. Ladas ’09 Paper [12] is the first to inject a
test voltage signal. Which is frequently done in selfsensing on PMSM nowadays. As a result
from parasitic capacitances between the windings of the solenoid, the solenoid can be seen as
a RLC circuit, with a certain resonance frequency fres . Because of the changing inductance,
also this frequency will vary with position. A sinusoidal test signal with frequency close to
fres is injected. The current response on this test signal is filtered using a bandpass filter,
the amplitude of this current response is dependent on the position.
19
Chapter 4
Finite Element Model Simulations
To get more insight and understanding of the electromagnetic behaviour of the solenoid, a
multitude of simulations are made with a finite element model (FEM).
1. First, the constructed FEM is explained.
2. Further, the magnetic flux path is simulated and explained.
3. Then, the influence of some parameters (frequency f , specific conductivity σ and current level I) on the inductance is studied using multiple simulations
4.1
Model
The FEM is build with the help of Agros2D. As the organization describes its own product
[20].
"Agros2D is a multiplatform application to solve physical problems based on the
Hermes library, developed by the group at the University of West Bohemia in
Pilsen."
In short, it is a freeware, FEM simulator to solve physical problems.
Using the Agros2D platform, an electromagnetic model of the solenoid is build. This model
is shown in figure 4.1. We can recognize the different components. The coil is divided into
different little divisions, to better approach the reality. If we would represent the conductor
as one big square, then the simulation programme would assume it is one solid conductor,
resulting in very extreme skin effects. To have perfect simulation results, we should make a
20
4.1. Model
Chapter 4. Finite Element Model Simulations
Figure 4.1: Finite element simulation of the magnetic vector potential
division for every conductor, which, of course, would result in large simulation time. A trade
off is made.
The problem to be solved can be seen as a magnetic circuit (fig. 2.3). This problem is both
non-linear and transient, posing some challenges to our simulation programme. Luckily, the
latest update of Agros2D includes a solver for both non-linear and transient problems.
Finite element simulations are very time consuming. So every gain in computation time is
desirable. In most cases the problems can be simplified with the help of symmetry. This is
also the case for the solenoid, which is symmetrical around its longitudinal axis. Only half of
the cross section is necessary to fully simulate the magnetic flux behaviour.
Special atten-
tion has to be paid to the boundary conditions. For this magnetic problem, two boundary
conditions are available, either the surface current can be specified, or the magnetic vector
potential.
Boundary conditions We will start with Maxwell’s equations for magnetostatics. [5]
∇×H=J
∇·B = 0
(4.1.1)
B = µH
In which H represents the magnetic field intensity, J represents the current density, B,
the magnetic flux density, and µ represents the material’s magnetic permeability. Since
21
4.1. Model
Chapter 4. Finite Element Model Simulations
n
y
t
x
Boundary line
Figure 4.2: Coordinate system
∇ · B = 0, there exists a magnetic vector potential A, such that
B=∇×A
(4.1.2)
and thus
1
∇×A =J
(4.1.3)
µ
The constructed FE problem is situated in a two dimensional field. This assumes that the
∇×
currents flowing are parallel to the z-axis. So only the z-component of the magnetic vector
potential A, and the current density J is present.
A = (0, 0, A)
(4.1.4)
J = (0, 0, J)
In order to simplify the future reasoning, a new coordinate system, parallel to the boundary
line, is introduced, see fig. 4.2.
With the tangential-normal coordinate system, the magnetic flux density can be computed
as
Bt,n = ∇|t,n × At,n


∂A −∂A 
=
,
,0
∂n ∂t
(4.1.5)
There are two available boundary conditions for a FE problem about magnetic fields. A
Dirichlet condition or a Neumann condition.
22
4.1. Model
Chapter 4. Finite Element Model Simulations
Dirichlet In the Dirichlet condition, a constant value is given to the magnetic vector
potential at the boundary.
Aboundary = (0, 0, c1 )
⇔
∂A
∂c
(t, 0) = 1 = 0
∂t
∂t
c − A(t, n)
∂A
(t, 0) = lim 1
n→0
∂n
0−n
Resulting in following magnetic flux density

(4.1.6)

∂A −∂A 
Bboundary = 
,
,0
∂n ∂t
(4.1.7)
= Bt , 0, 0
To conclude, the Dirichlet condition makes sure the normal component of the flux is cancelled out at the boundary. In other words, no flux is going through the boundary.
Neumann In the Neumann condition, a constant value is given to the surface current,
K, at the boundary. This surface current, in accordance with the agreements, flows only in
the z-direction.
1 ∂A
= c2
µ ∂n
This results in following magnetic flux density
(4.1.8)
−


∂A −∂A 
B=
,
,0
∂n ∂t
(4.1.9)
= µc2 , Bn , 0
To conclude, with the Neumann condition, the value of the tangent flux can be controlled.
As we know from physics courses [5], the magnetic flux inside the solenoid will flow parallel
to the longitudinal axis. Hence, the normal component of the flux Bn , inside the solenoid
equals zero. Therefore, the boundary condition on the symmetry axis in fig. 4.1 should be
the Dirichlet condition. The constant c1 is chosen to be zero. Also at the outer boundaries,
the Dirichlet condition will be used. Since, for a solenoid in free air, the flux lines should
close, and there is no reason to assume flux lines to leave the solenoid towards infinity. As
long as the surrounding free air area is chosen as big as necessary.
23
4.1. Model
4.1.1
Chapter 4. Finite Element Model Simulations
Solver
The problem is non-linear because the iron is ferromagnetive, and thus saturation can occur.
When the coil is energized, a magnetomotive force is created. This makes a magnetic flux
go around. As can be seen in the equations below, the induced magnetic flux depends upon
the magnetic permeability µ. While, at the same time, this magnetic permeability of iron
depends upon the flux running trough the material, i.e. the iron part of the solenoid displays
saturation. Hence, the problem is a non-linear one, and the solution will be achieved in an
iterative manner.
Fcoil
Riron + Rairgap + Rarmature
l
R=
µA
φ=
(4.1.10)
The problem is also time-dependent. The coil is energized by a PWM voltage with certain
frequency. The frequency will always be high enough to make sure that no steady state will
be achieved. And thus the problem will be transient.
The oscillating voltage induces eddy currents which will influence the magnetic flux trough
the skin effect. The skin effect principle is explained in section 4.2.3
4.1.2
Simulation Parameters
To be complete, all used simulation parameters are summarized in the tables below.
Table 4.1: Model parameters
µr,iron
9300*Agros2D database (9300*)
yiron
1e6S.m−1
µr,air
1
yair
0S.m−1
µr,copper
1
ycopper
5.7e7S.m−1
Nwinding
991
*iron is ferromagnetive, and thus µr,iron is not constant, 9300 is the value for zero magnetisation. The polynomial µr - B curve is found in the Agros2D database.
24
4.2. Magnetic flux behaviour
Chapter 4. Finite Element Model Simulations
Table 4.2: Model parameters
Solver
Picard’s method
Matrix solver
MUMPS
space adaptivity
disabled
number of refinements
1
polynomial order
2
Damping type
automatic
Damping factor
0.9
Min. residual for dactor decrease
1.1
Min. steps for factor increase
2
Table 4.3: Mesh parameters
Mesh type
GMSH (exp.) - triangle
Number of mesh elements
1752
4.2
Magnetic flux behaviour
In fig. 4.3, the magnetic vector potential is shown for different pilot positions. In section
4.3.1 we will see that magnetic flux is proportional to the gradient of this vector potential.
More explanation about this flowpath is given in the following sections.
25
4.2. Magnetic flux behaviour
Chapter 4. Finite Element Model Simulations
Figure 4.3: Magnetic vector potential at different pilot positions
4.2.1
Functionality of the Stopper
At the bottom of the solenoid a small disc, made out of a non-magnetic material , i.e. a
material with low relative magnetic permeability µr , is placed.
The function of this disc is to prevent the magnetic flux to go trough the bottom of the
solenoid. Hence, it forces the flux to leave the armature at the side.
Imagine all the flux going trough the bottom. A displacement of the armature could decrease
the air gap in the middle, but at the same time a new air gap will be introduced at the bottom.
Hence, the flux going trough the bottom will always, partly, cancel out the air gap created
in the middle of the solenoid. Therefore the flux should be forced to leave the armature on
the side instead of the bottom.
4.2.2
Functionality of the ’little stick’
Centered in the solenoid, a ’little stick’ is located. As explained in chapter 2, this ’stick’ is
needed to transfer the armature position to the pressure ball.
Also this little stick is made out of non-magnetic material. Let us imagine this would not
be the case. Then a lot of flux would enter the armature trough this little stick. Again, this
26
4.2. Magnetic flux behaviour
Chapter 4. Finite Element Model Simulations
would partially cancel out the air gap effect. Thus flux going trough this little stick should
be avoided at all times.
4.2.3
Principle of skin depth δ
The skin effect is a well known electromagnetic phenomenon. When a time-varying current
is running trough a conductor, this current has the tendency to concentrate near the surface
of the conductor.
The cause of the skin effect is electromagnetic induction. A time-varying magnetic field is
accompanied by a time-varying electric field, which in turn creates secondary time-varying
currents (induced currents) and a secondary magnetic field. We know from Lenz’s law that
the induced currents produce the magnetic flux, which is opposite to the external flux (which
"produced" the induced currents), so that the total flux is reduced. The larger the conductivity, the larger the induced currents are, and the larger the permeability, the more pronounced
is the flux reduction. As explained in [4].
Schematic, this can be illustrated as in fig. 4.4. In which Bcoil represents the magnetic
field induced by the current in the solenoid coils, Ieddy,1 represents the eddy current induced
by this primary magnetic field. Beddy,1 in turn, represents the magnetic field induced by
the primary eddy current. This magnetic field will induce a second eddy current, Ieddy,2 . It
can be seen that the secondary magnetic field will cancel out the primary magnetic field in
the center. In the same way, the secondary eddy current will try to cancel out the primary
eddy current in the center. This will cause the current to concentrate near the armature
surface. The skin depth will depend on the strength of the induced secondary eddy current,
depending on σ & ω and on the strength of the induced secondary magnetic field, depending
on µ.
The skin effect is discussed intuitively above. A more theoretic discussion will follow. The
used coordinate system is shown in fig. 4.5. We assume the current to flow only in the zdirection. This assumption will be valid if the armature’s radius of curvature is much smaller
than the skin depth. The primary magnetic field only has a x-component. And Ieddy,1 is
assumed to be constant in the x-direction, which seems logical.
Let’s start with the complex Maxwell equations, in which the displacement current is neglected because we assume the armature to be a good conductor.
27
4.2. Magnetic flux behaviour
Chapter 4. Finite Element Model Simulations
Bcoil
Beddy,1
Figure 4.4: Skin effect in the armature
∇ × E = −jωB
∇×H=J
(4.2.1)
Or,
∇ × J = −jωσB
∇ × B = µJ
(4.2.2)
Resulting in following set of equations,
dJz
= −jωσBx
dy
dBx
−
= µJz
dy
(4.2.3)
In which ordinary derivatives are used instead of partial, since Bx and Jz only depend on
y.
From Eqs. 4.2.3, Bx can be eliminated to obtain an eqaution for Jz .
2
d2 Jz
= jωµσJz
dy
(4.2.4)
Jz (y) = J1 eKy + j2 e−Ky
(4.2.5)
This equation has a simple solution
28
4.3. Inductance simulations
Chapter 4. Finite Element Model Simulations
Bcoil
Ieddy,1
x
y
z
Figure 4.5: Skin effect in the armature; coordinate system
In which,
K=
q
jωµσ = (1 + j)
r
ωµσ
= (1 + j)k
2
We can see that J2 has to equal zero, since
lim J (y)
y→∞ z
6= ∞
Leading to following solution
Jz (y) = Jz (0)e−ky e−jky
1
δ= =
k
s
2
µωσ
(4.2.6)
We assume the armature to be made out of iron, which has a relative permeability of 9300,
while µ0 = 4π10−7 . During the simulations, multiple values for the conductivity are tested.
These values and the respective skin depth at a frequency of 500 Hz are shown in the table
below.
The estimated skin depth will be
s
δ=
4.3
2
=
µσω
s
1
µr µ0 σπf
Inductance simulations
In this section, the inductance is estimated for varying frequency f and voltage level V .
29
4.3. Inductance simulations
Chapter 4. Finite Element Model Simulations
Table 4.4: Armature skin depth for different conductivities
δ [mm]
σ
1e7 0,073806338
1e6 0,233396
1e5 0,73806338
1e4 2,33396
4.3.1
Calculating the inductance
The flux travelling trough the solenoid can be calculated out of the simulation results, with
the help of the magnetic vector potential.
The magnetic flux inside the solenoid travels parallel to the longitudinal axis. Since this
longitudinal axis also functions as a boundary, we can conclude that the only magnetic flux
will be the one tangent to the longitudinal axis. Equation 4.1.5 is recalled.


∂A −∂A 
,
,0
Bt,n = 
∂n ∂t

(4.3.1)

∂A
=
, 0, 0
∂n
To calculate the flux, a volume integral of the flux density vector, B, has to be taken.
To do so, we will use a cylindrical coordinate system in which the z-axis coincides with the
longitudinal axis.


∂A
Bt,n = 
, 0, 0
∂r
m
φ=
=
=
Z 2π Z r
coil
0
0
Z 2π Z r
coil
∂A
r∂r∂θ
∂r
(4.3.2)
r∂A∂θ
0
0
Z 2π
rcoil Acoil
0
− Acenter ∂θ
= 2πrcoi Acoil
In which rcoil is the radius of the coil. The magnetic vector potential at the center, Acenter
is neglected. Since it coincides with the longitudinal axis, at which the boundary condition,
A = 0 is valid.
30
4.3. Inductance simulations
Chapter 4. Finite Element Model Simulations
The value Acoil is measured at the upper left corner of the coil, as can be seen in the picture
below.
Figure 4.6: Location of Acoil
Implementation The simulations are executed with the use of a python script. This code
can be found in the attachment F.
In the first part of the code, the complete geometry is defined. This part is omitted in the
attachment since it is a very long piece of irrelevant code. Secondly, a for loop is made in
which the problem is simulated and then the armature is shifted over 2 mm and the problem
is solved again. The flux and inductance is calculated in each step of the for loop and saved
in arrays. These arrays are then combined and saved in an CSV file.
4.3.2
Influence of the skin depth
The principle of skin depth is explained in section 4.2.3. To explain the influence of this skin
effect on the inductance, equations 4.2.6 and 4.1.10 are recalled.
s
δ=
1
µr µ0 σπf
Fcoil
Riron + Rairgap + Rarmature
l
R=
µA
φ=
31
4.3. Inductance simulations
Chapter 4. Finite Element Model Simulations
As we can see, the skin depth δ is affected by the frequency and two material constants,
the magnetic permeability and the electrical conductivity.
The skin depth, i.e. penetration depth, defines the depth at which the intensity of magnetic
flux falls to 1e (about 37%) of its original value at the surface [16]. In other words, the crosssection A, trough which the magnetic flux flows, is dependent upon the skin depth.
To illustrate the influence of the skin depth an example is given.
Suppose we are in a certain start state, with fstart , δstart , φstart and Rstart . Next the
frequency is doubled, then:
f = 2fstart
1
δ = √ δstart
2
√
R = 2Rstart
It is important to remember that the skin effect has no effect upon the reluctance of the
air gap. Therefore this increased frequency has a mixed influence on the magnetic flux. Let
us consider two situations.
First, we suppose a big air gap. The permeability of air is much smaller than the permeability
of iron, therefore the following simplifications are possible.
Rairgap Riron
Rairgap Rarmature
m
φ≈
Fcoil
Rairgap
Thus the flux does not change much, while the skin depth decreases by a factor of
√
a result we can see that the magnetic flux density increases by a factor 2.
(4.3.3)
√
2. As
φ
A
√
B = 2Bstart
B≈
This increased flux density could influence the saturation of the iron and armature, depending on the value of φstart . The saturation effect would decrease the permeability of the
iron and the armature, which will further increase the magnetic reluctance of the iron and
32
4.3. Inductance simulations
Chapter 4. Finite Element Model Simulations
armature.
As a conclusion we can see that because of the combined effect of the skin depth and saturation, the magnetic flux would decrease a bit, depending a the rate of saturation.
Secondly we suppose the opposite situation, in which the air gap is closed. Then the
reluctance of the air gap will become zero.
φ=
Fcoil
Riron + Rarmature
(4.3.4)
m
φstart
φ= √
2
Because the air gap reluctance can be neglected, no saturation will take place, and the
influence on the magnetic flux is much easier to calculate. The flux will decrease by a factor
√
2, which can be proven to be a bigger decrease as in the first situation.
Results
There are three parameters which have an effect on the skin depth, using Agros2D only the
effect of frequency is simulated, since its effect is similar to the effect of permeability and
conductivity. In which the latter only influences the skin depth in the armature, while the
former influences the skin depth in the iron as well.
Influence of frequency First the simulation results of the frequency are shown. In fig.
4.7 and 4.8 the skin effect is clearly visible. And as explained in the example above, the skin
effect has a much bigger influence at zero air gap, compared to the full air gap.
33
4.3. Inductance simulations
Chapter 4. Finite Element Model Simulations
Figure 4.7: FE simulation; Influence of frequency on the inductance; I= 0.3 A; ya = 1 kS/m;
y=100 kS/m
Figure 4.8: FE simulation; Influence of frequency on the inductance; I= 0.3 A; ya = 1 kS/m;
y=100 kS/m
34
4.3. Inductance simulations
4.3.3
Chapter 4. Finite Element Model Simulations
Influence of saturation
If the solenoid current increases, and with it the magnetic flux, saturation will occur in the
iron and armature. Again we notice that this effect is most visible at zero air gap. Rather
logical since at maximum air gap the magnetic flux is mainly determined by the reluctance
of the air gap itself, as explained in the section above.
Results
The results are shown below
Figure 4.9: FE simulation; Influence of current on the inductance; f= 500 Hz; ya = 1 kS/m;
y=100 kS/m
35
4.4. Conclusion
Chapter 4. Finite Element Model Simulations
Figure 4.10: FE simulation; Influence of current on the inductance; f= 500 Hz; ya = 1 kS/m;
y=100 kS/m
4.4
Conclusion
As a conclusion we notice that both the skin effect as the saturation effect are more pronounced at zero air gap. At maximum air gap, the magnetic flux is mainly determined by
the air gap reluctance. And thus in this situation, the skin and saturation effect are not very
prominent, since they only affect the iron and armature reluctance.
As a result, the inductance at maximum air gap remains more or less constant, while the
inductance at zero air gap can be varied. This is very good news indeed. The purpose of
the thesis is to estimate the position by measuring inductance or resistance. In other words,
a big change in inductance over the air gap interval is desirable. As we have seen, the ratio
Lmax
Lmin
can be controlled with the help of frequency and solenoid current level. Thus it should
be possible to reach a good inductance ratio by adjusting the frequency and solenoid current.
36
4.5. Future work
4.5
Chapter 4. Finite Element Model Simulations
Future work
This chapter is was very theoretical, greatly improving our understanding of the magnetic
flux behaviour. However by a lack of knowledge about the actual conductivity and permeability of the used materials, it was not possible to build a very accurate model of the solenoid.
This could be improved in future work.
In this chapter we mainly focused on the flux behaviour and the inductance resulting from
it. In future work it would be interesting to look at the AC resistance, resulting from eddy
current in the armature and iron, in the same way.
37
Chapter 5
Identification of electric parameters
In chapter 4, the magnetic flux lines inside the solenoid were simulated and investigated. In
chapter 2 an electric model is proposed. Next we want to identify this model, in order to
perform some electrical simulations. The aim of this chapter is thus to identify the solenoids
resistance and inductance as a function of frequency and armature position. And to construct
a 2D look-up table in Matlab. As a base for future simulations.
5.1
Test setup
The measurements are conducted with a LCR meter. To control the air gap manually, two
screws were placed, see fig. 5.1. A plastic fixture is mounted on top of the solenoid to
embed the upper screw. Both screws are made of aluminium, which has the same magnetic
permeability as the air. This to make sure no magnetic flux is conducted trough these screws.
Otherwise a big measurement error would be introduced.
A marking was made on top of the plastic fixture to count the number of turns made with
the screw. Knowing that the screw’s thread equals 0.5 mm, the air gap can be calculated.
38
5.2. Results
Chapter 5. Identification of electric parameters
Figure 5.1: Controlling air gap with two screws during LCR measurements
LCR meter An LCR meter is a piece of electronic test equipment used to measure the
inductance (L), capacitance (C), and resistance (R) of a component. The tested device is
subjected to a sinusoidal voltage. The meter measures the sinusoidal current response. From
the ratio of these the meter can determine the magnitude of impedance. In combination with
the phase angle between voltage and current, the equivalent capacitance or inductance and
resistance of the device can be calculated and displayed. In the conducted measurements,
the test voltage had an amplitude of 1 V.
5.2
Results
Measurements are shown in fig. 5.2a and 5.2b. In fig. 5.3a and 5.3b variation of resistance
and inductance are shown, relative to their value at zero air gap. The latter is calculated as
shown below.
39
5.2. Results
Chapter 5. Identification of electric parameters
Rrel (x) =
R(0) − R(x)
R(0)
(5.2.1)
In which R(0) represents the resistance value at zero air gap.
It is clearly visible that the measurement frequency has a large influence on the change of
resistance and inductance with regard to the air gap. This influence of frequency, i.e. trough
the skin effect, on inductance has been explored thoroughly in chapter 4. To recapitulate,
higher frequency results in higher reluctance in the iron and armature. Resulting in a smaller
variation in flux with regard to the length of the air gap.
φ=
ni
c1
µiron Airon
c
2
+µ
+ c3 .lag
armature Aarmature
(5.2.2)
The relative variation in inductance over the air gap interval is highest for lower frequencies. This change reaches up to 35% for 100 Hz
For the AC resistance, we see that the change in resistance over air gap reaches an optimum
for frequencies around 250 to 500 Hz.
The DC resistance is measured only once, since it does not vary with frequency, nor air
gap. Its value is 9.6 Ω.
40
5.2. Results
Chapter 5. Identification of electric parameters
45
40
35
L [mH]
30
100 Hz
250 Hz
500Hz
1 kHz
5kHz
25
20
15
10
5
0
0.5
1
1.5
2
2.5
3
Air gap [mm]
(a) Inductance by air gap
250
200
150
R [Ohm]
100 Hz
250 Hz
500Hz
1 kHz
5kHz
100
50
0
0
0.5
1
1.5
2
2.5
3
Air gap [mm]
(b) Resistance by air gap
Figure 5.2: Resistance and inductance, measured by LCR meter at different frequencies and air
gap
41
5.2. Results
Chapter 5. Identification of electric parameters
0.05
0
−0.05
L [−]
−0.1
100 Hz
250 Hz
500Hz
1 kHz
5kHz
−0.15
−0.2
−0.25
−0.3
−0.35
0
0.5
1
1.5
2
2.5
3
Air gap [mm]
(a) Change in inductance, relative to the value at zero air gap
0.05
0
−0.05
−0.1
100 Hz
250 Hz
500Hz
1 kHz
5kHz
R [−]
−0.15
−0.2
−0.25
−0.3
−0.35
−0.4
0
0.5
1
1.5
2
2.5
3
Air gap [mm]
(b) Change in resistance, relative to the value at zero air gap
Figure 5.3: Resistance and inductance, measured by LCR meter at different frequencies and air
gap
42
5.3. Conclusion
5.3
Chapter 5. Identification of electric parameters
Conclusion
A change up to 38% in resistance is measured for frequencies around 250 to 500 Hz. For a
frequency of 100 Hz, a change of 35% is measured in inductance. Overall we could say that
resistance is the most interesting parameter to watch for frequencies above 250 Hz. For the
lower frequencies, inductance varies more.
Two remarks should be made for these measurements.
• The test signal was a sine wave with an amplitude of 1 V. The solenoid, however, is
operated by PWM voltage, not a sinusoidal voltage. So we should bare in mind the
effect of higher harmonics on inductance and resistance.
• The operating PWM voltage will have an amplitude of 12 V. Which is much larger
than the test voltage, so attention should be paid for possible saturation effects.
5.4
Importing measurements to Matlab
These measurements are saved in an Excel file, and then imported in the Matlab environment
with the help of the .m file Import_LCR. This .m file reads the Excel file and then constructs
a 2D look-up table for resistance and inductance as a function of frequency and air gap in
Matlab. These look-up tables will be used in future simulations.
The .m file Import_LCR is given in attachment
43
Chapter 6
Selfsensing on the solenoid
6.1
Introduction
In this section we try to apply a selfsensing method on the solenoid actuator. If we drive the
solenoid in normal operation with a PWM voltage, the current behaves as shown in fig. 6.1.
We notice that the current has a highly exponential behaviour.
0.75
12
0.7
10
8
I [A]
V [V]
0.65
6
0.6
4
2
0.55
0
4
5
6
Time [ms]
7
0.5
8
4
5
6
Time [ms]
−3
x 10
7
8
−3
x 10
Figure 6.1: Solenoid powered by a PWM voltage, in normal operation
Exponential time constant The exponential behaviour of the solenoid current can be
described, using the exponential time constant τ .
44
6.1. Introduction
Chapter 6. Selfsensing on the solenoid
τ=
L(x, f )
R(x, f )
Most selfsensing methods are used and developed on electrical rotating machines. These
machines have a large inductance L and relatively low resistance R, which in turns results in
a large time constant τ . I.e. rotating machines have, generally speaking, a piecewise linear
current. The solenoids resistance however is much bigger, resulting in a small time constant
τ and therefore highly exponential behaviour.
In chapter 4, we have seen that the change of flux with the position depends upon the
frequency. The usable frequency range is determined in chapter 5. The time constant within
this range is shown in the table below. In order for the current to act in a linear way, the
period of the PWM voltage should be at most half the value of the exponential time constant.
TP W M ≤
τ
2
Table 6.1: Relation between the exponential time constant for the current and the frequency
Frequency [Hz]
τAC [ms]
τAC /TP W M
5000
0.03
0.16
2000
0.09
0.18
1000
0.20
0.20
500
0.43
0.21
250
0.91
0.23
100
2.09
0.21
In table 6.1, we see that the exponential time constant τ is smaller than the PWM period
TP W M . Resulting in a highly exponential current within the frequency domain of 100 Hz to
5 kHz.
This exponential behaviour makes it difficult to apply the selfsensing method as studied in
EELAB, since this principle assumes a piecewise linear current. In this chapter we will try
to formulate a selfsensing method to be used on linear actuators.
45
6.2. Identification of the solenoid current
6.2
Chapter 6. Selfsensing on the solenoid
Identification of the solenoid current
In chapter 2, a basic model of the electrical circuit is presented and solved analytically. The
objective of this section is to improve our electrical model in Matlab.
The improvements or adjustments to be made are:
• Identify influence of air gap and frequency
• Investigate influence of square wave harmonics
• Model and investigate current during a jump in duty ratio
6.2.1
Influence of air gap and frequency
We now know that a correlation exists between resistance, inductance and the air gap. Using
the basic equations from chapter 2, we want to investigate the relationship between current
and air gap. Let us review the equations 2.2.16, 2.2.13 and 2.2.10 from chapter 2.
V
V
iDC (t) = iDC (0) − DC e−t/τDC + DC
RDC
RDC
V
iDC,ss = DC
RDC
iAC (t, f, x) =
(6.2.1)
(6.2.2)
 


V
V

AC,max


i
e−t/τ (f,x) + AC,max
−

AC,min


R(f, x)
R(f, x)



VAC,min −(t−δT )/τ (f,x) VAC,min



i
e

+
AC,max −


R(f, x)
R(f, x)
0 ≤ t < δT
δT ≤ t < T
(6.2.3)
We notice that the iDC,ss does not depend on armature position x, nor on frequency f. It
depends upon RDC which is supposed to be constant for every position.
The minima and maxima of the alternating current are shown below.
iAC,max (f, x) =
R(f, x)
iAC,min (f, x) =
VAC,min e−T /τ (f,x) − e−δT /τ (f,x) + VAC,max e−δT /τ (f,x) − 1
VAC,max
e−T /τ (f,x)
e−T /τ (f,x)
− e−(1−δ)T /τ (f,x)
−1
+ VAC,min
e−(1−δ)T /τ (f,x)
−1
R(f, x) e−T /τ (f,x) − 1
(6.2.4)
46
6.2. Identification of the solenoid current
Chapter 6. Selfsensing on the solenoid
Corrected with the DC-component of the solenoid current, we get the maximum and minimum currents.
imin (f, x) = iAC,min (f, x) + iDC,ss
imax (f, x) = iAC,max (f, x) + iDC,ss
(6.2.5)
So we see that, in steady state, the knowledge of the armature position is contained in the
current ripple. In fact it is the amplitude of the current ripple which will give us information
about the position.
Using equation 6.2.4 together with the modelled resistance and inductance, the current
ripple can be calculated analytically. This way a direct link between the position and the
solenoid current arises. These maximum and minimum currents are calculated using Matlab.
Equation 6.2.4 is implemented in Matlab and the resistances and inductances are determined
using the 2D look-up table, created in previous chapter. An amplitude variation up to 35%
w.r.t. the air gap is possible.
0.5
0.45
0.4
|IAC | [A]
0.35
1 kHz
500 Hz
250 Hz
100 Hz
0.3
0.25
0.2
0.15
0.1
5 · 10−2
0
0.2 0.4 0.6 0.8
1 1.2 1.4 1.6 1.8
Air gap [mm]
2
2.2 2.4
Figure 6.2: Amplitude of the current ripple for different frequencies; δ = 0.5; Vpp = 12V
47
6.2. Identification of the solenoid current
Chapter 6. Selfsensing on the solenoid
100
95
90
|IAC | [%]
85
1 kHz
500 Hz
250 Hz
100 Hz
80
75
70
65
60
0
0.2 0.4 0.6 0.8
1 1.2 1.4 1.6 1.8
Air gap [mm]
2
2.2 2.4
Figure 6.3: Relative amplitude of the current ripple for different frequencies; δ = 0.5; Vpp = 12V
So to conclude, the current can be split in two components, a DC component and a AC
component. The AC component, or current ripple, is the part of the current containing
information about the air gap. The variation of the current ripples amplitude w.r.t. air gap
depends on the frequency, and can be as much as 35%.
6.2.2
Influence of harmonics in a square wave
The solenoid is driven by a square wave voltage, a waveform which is easy to implement
in practice as all we need is a constant voltage source and a simple switch. In simulations,
however, one should be attentive. A square wave contains many harmonics, which can
influence on the result. Using a Fourier analysis of an ideal square wave with amplitude 1
and frequency f, we get an infinite series of the form,
4
1
1
sin(2πf t) + sin(6πf t) + sin(10πf t) + ...
(6.2.6)
π
3
5
Until now, we assumed a square voltage wave with frequency f, to work on the resistance
vsquare (t) =
and inductance measured at frequency f by the LCR meter. The LCR measurements however,
are performed in a sinusoidal manner. Therefore it would be more correct to split the square
wave in different sinuses. The nth harmonic then corresponds to resistance and inductance
measured at frequency fn = nf . To investigate the influence of these harmonics, a simulation
of the current waveform in the frequency domain is executed.
The calculation in frequency domain is shown below, in which VAC is the amplitude of the
AC square wave with zero mean.
48
6.2. Identification of the solenoid current
Chapter 6. Selfsensing on the solenoid
Figure 6.4: Example of the harmonics contained by a 100 Hz square wave


sin(2πf t + φ1 ) 1 sin(6πf t + φ3 )
1 sin(2πnf t + φn )
4V
+
+...+
+...
iLCR,f req−domain (t) = AC 
π
Z1
3
Z3
n
Zn
(6.2.7)
In which,
Zn =
r
2
R(nf )
φn = tan−1
+ (2πnf )2 L(nf )2
2πnf L(nf )
R(nf )
(6.2.8)
(6.2.9)
The main effect of higher harmonics on the current response seems to be a higher ripple
amplitude. We will continue to use the time-domain equations, since they better connect to
reality. We bear in mind that because of higher harmonics, equivalent resistance decreases,
while equivalent inductance stays somehow constant.
49
6.2. Identification of the solenoid current
Chapter 6. Selfsensing on the solenoid
I
Model,LCR,time−domain
I
Model,LCR,Freq−domain
0.1
I [A]
0.05
0
−0.05
−0.1
1.5
2
2.5
3
3.5
Time [ms]
4
−3
x 10
Figure 6.5: Current waveform calculated in time-domain vs. frequency-domain
6.2.3
Modelling current during duty jump
Until now the duty ratio applied to the solenoid was supposed to be constant. Later, this
duty ratio will be used to control the solenoid and it will vary all the time. Such a jump in
duty ratio will have its effect on the current. Especially the effect of such a duty jump on the
current ripple is important, since this ripple contains the information about the armature
position. So, when measuring the current ripple in order to produce an estimate of the
position, we will have to compensate for the effect of a duty jump.
Suppose we have been applying duty ratio δ1 for a sufficient time, and now a jump towards
duty ratio δ2 occurs.


V
V
iAC,max,δ2 = iAC,min,δ1 − AC e−δT /τ (x) + AC
R(x)
R(x)
iAC,min,δ2 = iAC,max,δ2 e−(1−δ)T /τ (x)
After applying δ2 two times in row we get
50
(6.2.10)
6.2. Identification of the solenoid current
Chapter 6. Selfsensing on the solenoid


(1 − e−δ1 T /τ (x) ) −(1−δ )T /τ (x) VAC  −δ T /τ (x) VAC
V
1
e
−
e 2
+
iAC,max,δ2 ,2 =  AC
R(x) 1 − e−T /τ (x)
R(x)
R(x)




V
e−(1−δ1 )T /τ (x) − 1  −δ T /τ (x) 
= AC 1 + 
e 2
R(x)
1 − e−T /τ (x)
(6.2.11)
As we can see, this equation is rather tricky, and it does not look easy to compensate for
the jump in duty ratio.
Let us take a look at a graphic representation of the current during a duty jump.
1.4
0.6
frequency =500Hz; Air gap=0
VDC =12 Volt
1.2
0.5
0.4
Current [A]
Current [A]
1
0.8
0.6
0.3
0.2
0.4
0.1
0.2
0
0
0
0.1
0.2
0.3
0.4
0.5 0.6 0.7
Time [ms]
0.8
0.9
1
1.1 1.2
· 10−2
frequency =500Hz; Air gap=0
VDC =12 Volt
−0.1
0
0.1
0.2
0.3
0.4
0.5 0.6 0.7
Time [ms]
0.8
0.9
1
1.1 1.2
· 10−2
Figure 6.6: DC solenoid current during jump inFigure 6.7: AC solenoid current during jump in
duty ratio; δ1 = 0.9,δ2 = 0.3
duty ratio; δ1 = 0.9,δ2 = 0.3
As we can see, the influence of a duty jump on the current ripple is in fact very small.
Based on fig. 6.7 we would say that after two periods of constant duty ratio, the transient
effect of the jump in duty ratio has already disappeared. We will prove this mathematically
in the following paragraph.
In order to do so, we will consider three situations. In the first a duty ratio δ has been
applied for a sufficient long time. In the second situation we start from a certain starting
current Istart and apply our duty ratio δ . In the third situation we also start from Istart , but
now we will apply the same duty ratio δ twice in a row. We calculate the maximum currents
in the same manner as illustrated above. The simplified solution is shown in equation 6.2.12.
51
6.2. Identification of the solenoid current
Chapter 6. Selfsensing on the solenoid
1.4
frequency =500Hz; Air gap=0
VDC =12 Volt
1.2
Current [A]
1
0.8
0.6
0.4
0.2
0
0
0.1
0.2
0.3
0.4
0.5 0.6 0.7
Time [ms]
0.8
0.9
1
1.1 1.2
· 10−2
Figure 6.8: Solenoid current during jump in duty ratio; δ1 = 0.9,δ2 = 0.3
iAC,max,δ,reg =
−δT
δT T
−
−
VAC,min e τ (x) − e τ (x) + VAC,max e τ (x) − 1
− T
R(x) e τ (x)
−1
δT
−
R(x)istart − VAC,max e τ (x) + VAC,max
iAC,max,δ,1 =
R(x)
iAC,max,δ,2 =
− (1+δ)T
e τ (x)
R(x)istart − VAC,max
δT
−
VAC,min − VAC,max e τ (x) + VAC,max
R(x)
T
−
+ VAC,max − VAC,min e τ (x)
+
R(x)
(6.2.12)
Now we use the following assumption Tτ ≈ 5. Which is justified if we recall table 6.1. This
assumption means that e−T /τ ≈ 0.00674. And therefore it is justified to skip e−T /τ , and
also e−(δ+1)T /τ since δ + 1 ≥ 1. These approximations result in 6.2.13.
52
6.3. Position sensing
Chapter 6. Selfsensing on the solenoid
δT
−
VAC,min − VAC,max e τ (x) + VAC,max
iAC,max,δ,reg ≈
R(x)
− δT
− δT
R(x)istart − VAC,min e τ (x)
VAC,min − VAC,max e τ (x) + VAC,max
+
iAC,max,δ,1 ≈
R(x)
R(x)
δT
−
VAC,min − VAC,max e τ (x) + VAC,max
iAC,max,δ,2 ≈
R(x)
(6.2.13)
A similar reasoning can be made for iAC,min . And thus as we can see, the amplitude of
the current ripple will be approximately equal to its steady state value after two periods of
applying a constant duty ratio. So we can neglect the difficult equation for current ripple
during a jump in duty ratio. And instead just wait for the current ripple to achieve its steady
state. Since this happens very fast. So the idea is to maintain a constant duty ratio during
f.e. three PWM periods. In the last two periods we will then measure the amplitude of the
current ripple, which is by then supposed to be in steady state. Out of this measurement a
position estimation can then be made.
6.3
Position sensing
In previous section we have seen that information about the armature’s position is contained
in the current ripple’s amplitude. And the small time-constant makes sure the current ripple
reaches steady state within two PWM periods. With these two points in mind, a position
sensing technique is proposed in this section.
6.3.1
Injecting sensing voltage
A popular technique in selfsensing is the injection of a secondary voltage. Injecting a secondary voltage, which will be called the sensing voltage, has certain advantages. This signal
is only used to sense the position, and thus it can be optimized for this purpose. I.e. duty
ratio and frequency of the signal can be chosen in function of the position sensing, while the
main driving voltage can be optimized for driving purposes. This sensing voltage, however,
should not have influence on the normal operation. And thus its amplitude should be much
smaller, resulting in a smaller corresponding current ripple, increasing the need for sensitive
53
6.3. Position sensing
Chapter 6. Selfsensing on the solenoid
current measurements.
The characteristics of both voltage waveforms are summarized below. The injected voltage
will be symmetrical and have zero mean, this results in a symmetrical current ripple without
an extra injected iDC , making measurements easier. The frequency of the driving PWM
voltage is chosen to be ten times bigger than the sensing frequency. This will make it easy
to distinguish the two different current ripples.
Table 6.2: Sensing and driving voltage
Sensing voltage Driving voltage
Frequency [Hz] 250 - 500
5000
δ
50%
Variable
Vmin
−1 V
0V
Vmax
1V
12 V
Special assumptions can be made for these two kinds of voltage waveforms, resulting in
simplified current equations.
Working mode In the general calculations, we assumed a square wave oscillating between
V1 and V2 . The voltage used to actually drive the solenoid will be a square wave oscillating
between 0 V and 12 V or 24 V. The duty ratio of this voltage is considered to be the control
input of the solenoid.
In the following calculations, a voltage oscillating between 0 and V volts has been assumed.
VDC = δV
VAC,max = (1 − δ)V
VAC,min = −δV
iAC,min (f, x) =
V
R(f, x)
e−T /τ (f,x) − e−(1−δ)T /τ (f,x)
e−T /τ
−1
e−δT /τ (f,x) − 1
V
δV
iAC,max (f, x) =
−
−T
/τ
(f,x)
R(f, x) e
R(f, x)
−1
54
−
δV
R(x)
6.3. Position sensing
Chapter 6. Selfsensing on the solenoid
−δ
V
e
|iAC (f, x)| = −
R(f, x)
T
τ (f,x)
+e
−(1−δ)
e
−
T
τ (f,x)
T
τ (f,x)
T
−
− e τ (f,x) − 1
−1
And to conclude,
δV
δV
iDC (t, δ) = iDC (0) −
e−t/τDC (x) +
RDC
RDC
δV
iDC,ss (δ) =
RDC
iAC (t, f, x, δ) =
(6.3.1)
(6.3.2)
(6.3.3)
 



(1 − δ)V
(1
−
δ)V


e−t/τ (f,x) +
i

(f, x, δ) −
AC,min


R(f, x)
R(f, x)




δV  −(t−δT )/τ (f,x)
δV

 i
(f,
x,
δ)
+
e
−

AC,max


R(f, x)
R(f, x)
0 ≤ t < δT
δT ≤ t < T
(6.3.4)
Sensing mode Now the sensing mode is considered. This should be a low amplitude
voltage used to easily determine the position. We assume a voltage pulsating between -V
and V, with a duty ratio 50%, for reasons of simplicity.
VDC = 0
VAC,max = V
VAC,min = −V
iAC,max (f, x) =
V
R(f, x)
−T
2
e 2τ (f,x) − 1
−T
1 − e τ (f,x)
V
iAC,min (f, x) = −
R(f, x)
−T
2τ
e (f,x)
2
−1
−T
1 − e τ (f,x)
iAC,min (f, x) = −iAC,max (f, x)
Resulting in following amplitude of the current ripple.
2
V
|iAC (f, x)| =
R(f, x)
55
−T
2τ
e (f,x)
2
−1
−T
1 − e τ (f,x)
(6.3.5)
6.3. Position sensing
Chapter 6. Selfsensing on the solenoid
And to conclude,
iDC (t) = iDC (0)e−t/τDC (x)
(6.3.6)
iDC,ss = 0
(6.3.7)
iAC (t, f, x) =
 


− t

V


e τ (f,x)
i

(f,
x)
−
AC,min


R(f, x)



− t−δT

V


i
e τ (f,x)
(f,
x)
+

AC,max


R(f, x)
6.3.2
V
R(f, x)
0 ≤ t < δT
V
−
R(f, x)
δT ≤ t < T
+
(6.3.8)
Measuring current ripple
When injecting a sensing voltage as described above, the current response will consist of
components. A main current, in this thesis continuously called iDC , which will result in an
electromagnetic force Fem , actually moving the pilot and hereby the plunger.
∂N φ
i
(6.3.9)
∂x DC
Furthermore, two current ripples exists. A high frequency current ripple, resulting from
Fem =
the main operating PWM voltage. And a low frequency ripple, resulting from the injected
sensing voltage. It is the latter which we will use to sense the pilot position.
To do so, a band-pass filter is proposed. A band pass filter is a device that passes frequencies
within a certain range, and stops frequencies outside that range. When such a filter is tuned
at the sensing frequency, around 250 Hz to 500 Hz, the sensing current ripple can be filtered
out of the current response.
The current ripple will reach its steady state value within two PWM periods. And thus
in order to have an accurate measurement, the duty ratio should remain constant during
at least two PWM periods. It is clear, however, that the current measurement has to be
very accurate in order to have meaningful estimate of the position. Since the current ripple’s
amplitude changes only 35 % over the whole position range, resulting in a change of ripple
amplitude from 10 mA to 20 mA, posing some challenges for the resolution of the current
meter.
To counter disturbing effects of noise on the measurements, it is advisable to calculate a
moving average. Therefore we propose to maintain the same duty ratio during four PWM
periods, the current ripple is then measured four times and an average value will be used to
estimate the pilot position.
56
6.4. Simulations
6.4
6.4.1
Chapter 6. Selfsensing on the solenoid
Simulations
Simulation setup
The selfsensing technique explained above is simulated in Matlab. A flowchart of the simulations is put in attachment A, and the used Matlab code is put in attachment D. A quick
overview of the used .m files is given in table 6.3.
Table 6.3: Overview of Matlab code used during the selfsensing simulations
Imports measurement data, generated with LCR meter.
Import_LCR
Constructs 2-D look-up table for resistance and inductance
w.r.t. air gap and frequency
I_pwmGenerator
Returns current response on a particular voltage waveform
IdcSensing
Uses the current response to construct an estimate of iDC
Uses the current response and the estimate of iDC , to estimate
IacsMaxSensing
the low-frequency sensing current maxima and minima
iAC,sens,max , iAC,sens,max
Generates a look-up table for iAC,sens,max against position
PositionSensing at the specified frequency. And returns and estimate
of position based upon iAC,sens,max , iAC,sens,max
6.4.2
Results
The simulation results are shown in following figures. The partition of the current in two
different parts is clearly visible in fig. 6.11. If we compare this figure to fig. 6.9, we can
clearly see that the sensing currents amplitude only depends on the pilot position, while the
main current depends on the duty ratio. It should be noted that the position and duty ratio
in this simulation are defined arbitrary, separately from one another. In reality pilot position
and duty ratio are linked through the balance of forces, see eq. 2.3.1. Position and duty ratio
were chosen like this to easily see the influence of both variables on the current response.
Interesting to see in fig. 6.13, is that every first estimation after a jump in position gives
an error. This is because it takes one PWM period, or often only half a period, for the ripple
current to reach steady state.
57
6.4. Simulations
Chapter 6. Selfsensing on the solenoid
Pilot position
2.5
xpilot [mm]
2
1.5
1
0.5
0
0
0.01
0.02
0.03
0.04
0.05
0.06
0.07
0.08
0.05
0.06
0.07
0.08
Time [s]
Duty ratio
Duty ratio [−]
1
0.8
0.6
0.4
0.2
0
0
0.01
0.02
0.03
0.04
Time [s]
Figure 6.9: Specified pilot position and duty ratio during simulations
58
6.4. Simulations
Chapter 6. Selfsensing on the solenoid
Main voltage (5 kHz)
12
12
10
10
8
8
vmain [V]
vsens [V]
Injected sensing voltage (500 Hz)
6
4
6
4
2
2
0
0
−2
0
0.002
0.004
0.006
0.008
−2
0.01
0
0.002
0.004
Time [s]
0.006
0.008
0.01
Time [s]
Injected + main voltage
14
12
vtot [V]
10
8
6
4
2
0
−2
0
0.001
0.002
0.003
0.004
0.005
0.006
0.007
Time [s]
Figure 6.10: Constructed voltage waveforms
59
0.008
0.009
0.01
6.4. Simulations
Chapter 6. Selfsensing on the solenoid
Main current
Sensing current
0.03
1.2
0.02
1
0.8
i
main
0
sens
i
[A]
[A]
0.01
−0.01
0.6
−0.02
−0.03
0
0.02
0.04
0.06
0.08
0.4
0
0.02
Time [s]
0.04
0.06
0.08
0.1
Time [s]
Total current
1.2
itot [A]
1
0.8
0.6
0.4
0
0.01
0.02
0.03
0.04
0.05
0.06
Time [s]
Figure 6.11: Simulated current response
60
0.07
0.08
0.09
6.4. Simulations
Chapter 6. Selfsensing on the solenoid
3
xpilot,estimate [mm]
2.5
2
positive pwm−flank estimate
negative pwm−flank estimate
mean of 2 PWM periods
mean of 4 PWM periods
1.5
1
0.5
0
0
0.01
0.02
0.03
0.04
0.05
0.06
0.07
0.08
Time [s]
Figure 6.12: Simulated position estimation
6.4.3
Simulating measurement error
Position estimation in previous simulation was 100% correct. In reality, noise and measurement errors will occur. To investigate the effect of such errors on the position estimation, a
measurement error is introduced in this second simulation. The script IdcSensing is changed
to include a random error of 0.5% on the estimate of iDC .
6.4.4
Results
The position estimation with measurement error is shown in fig. 6.12. The benefit of a
moving average is clearly visible.
61
6.5. Practical implementation
Chapter 6. Selfsensing on the solenoid
3.5
3
xpilot,estimate [mm]
2.5
2
positive pwm−flank estimate
negative pwm−flank estimate
mean of 2 PWM periods
mean of 4 PWM periods
1.5
1
0.5
0
−0.5
0
0.01
0.02
0.03
0.04
0.05
0.06
0.07
0.08
Time [s]
Figure 6.13: Simulated position estimation, with random error
6.5
Practical implementation
The proposed injection of a secondary signal reminds us of the dither signal. The dither
signal is a low frequency voltage signal with an amplitude of 2% tot 10% of the main voltage. This signal is superposed on the main driving voltage in order to avoid a standstill of
the plunger. Because of the similarity between dither and sensing signal, it is proposed to
integrate one in the other.
During the simulations, a driving frequency of 5 kHz was supposed. In practical applications, the value for this driving frequency is often lower, and dependable on the situation.
If the driving frequency is in the area of 1 kHz, it might be unnecessary to inject a sensing
voltage. In table 6.4, the change in amplitude of the current ripple over the air gap interval is
shown. It was supposed that driving frequency is higher than 600 Hz at all times. To easily
compare ripple current variation resulting from sensing voltage and main voltage, a duty
62
6.5. Practical implementation
Chapter 6. Selfsensing on the solenoid
ratio of 50% is supposed. Ripple current variation is calculated as in the equation below.
|iripple,variation | = |iripple |(xmax ) − |iripple |(xmin )
(6.5.1)
Table 6.4: Change in current ripple amplitude over the air gap.
Frequency [Hz]
100
250
500
600
800
1000
2000
5000
Sensing ripple
0.0415
0.0202
0.0110
0.0092
0.0070
-
-
-
-
-
-
0.0553
0.0448
0.0348
0.0158
0.0064
current variation [A]
Main ripple
current variation [A]
As we can see, injecting a sensing voltage with frequency between 100 Hz and 250 Hz,
becomes interesting for driving frequencies above 1 kHz. For driving frequencies lower than
this value, the current ripple resulting from the main driving voltage will be sufficient to
estimate the position. We should bear in mind that in these cases, a 2D look-up table is
needed. As the ripple current resulting from main driving voltage does not only depends on
the pilot position, but also on the applied duty ratio.
A possible control scheme is given in fig. 6.14. In this scheme, a desired pressure pd is
defined and translated to a desired position xd . Further we recognize the sensing signal in
δsens , because only one PWM generator is present in the system, the sensing signal will be
translated to an equivalent duty ratio. The current response is feedback trough a low pass
filter to the current controller. And via a bandpass filter and a look-up table, an estimate of
position xest is made.
Figure 6.14: Presented control scheme
63
6.6. Conclusion
6.6
Chapter 6. Selfsensing on the solenoid
Conclusion
An analytic solution for the current response is presented in this chapter. It was found that
the current response consists of two components, a main current iDC and a current ripple
iAC . Information about pilot position is contained in the latter. Next the injection of a
secondary voltage is proposed to sense the position. Such a secondary voltage is similar to
the dither signal, introduced in ch. 2. For driving frequencies between 600 Hz and 1000 Hz
a change in the current ripples amplitude between 55 mA and 35 mA is possible over the air
gap interval. For higher driving frequencies, the injection of a sensing voltage with frequency
100 Hz is advisable. Resulting in a change in sensing current ripple amplitude of 41 mA over
the total air gap interval.
To measure the different components in the current response, a bandpass filter and lowpass
filter are proposed. The bandpass filter will be used to feed back the needed current ripple,
containing information about the position. The low pass filter is used to filter the main
component iDC , to feed it back to the current controller.
64
Chapter 7
Solenoid current measurements
7.1
Introduction
All simulations until now were based upon the measurements performed with the LCR meter
in ch. 5 and the theoretic electrical model, built in ch. 2 and 6. In this chapter we will try
to validate these simulations with the help current measurements. The goal of this chapter
is twofold.
First the electrical model will be verified, by comparing the current waveforms simulated
in ch. 6 to the measured ones.
Secondly, the effect of saturation will be checked. As explained in Chapter 5, the LCR
meter measures resistance and inductance, based upon a test sine wave with an amplitude
of 1 V. In real life, the solenoid will be operated by a PWM voltage with an amplitude of
12 V or 24 V, therefore it is possible that saturation will occur. We will test for saturation
by conducting current measurements at three different peak to peak voltages.
The current measurements are performed using a function generator, from now on these
measurements will be referred to as the FG measurements. Similarly we will write LCR
measurements to refer to the measurements conducted with the LCR meter.
7.1.1
Verifying theoretic model for current waveforms
The theoretic model is verified in two manners. First a value for the resistance and inductance
is calculated out of the FG measurements. These are then compared to the resistance and
inductance from the LCR measurements. Using these calculated resistance and inductance, a
current waveform is created and compared to the measured current, and a second simulated
65
7.1. Introduction
Chapter 7. Solenoid current measurements
current waveform. In which the latter uses the resistance and inductance measured with the
LCR meter.
During the FG measurements the applied duty ratio is to be 50%, this makes the calculations easier because the voltage waveform can then be split in a constant DC value and a
symmetrical AC ripple.
V + V2
VDC = 1
2
V1 − V2
VAC,max =
2
V2 − V1
VAC,min =
2
= −VAC,max = −VAC
As a result, also the current ripple will be symmetrical.
iDC =
VDC
RDC
(7.1.1)
T
−
VAC + VAC e−T /τ (x) − 2VAC e 2τ (x)
iAC,peak = iAC,max =
−T
/τ
(x)
R(x) 1 − e
(7.1.2)
imin = iDC − iAC,peak
imax = iDC + iAC,peak
In the following, measured values and the resistance and inductance calculated out of these
measured values will be noted with a star, thus imeasured = i∗ .
There are three unknowns to be calculated: RDC , RAC (x) and τ (x).
The first one can be calculated easily using eq. 7.1.1.
V
∗
RDC
= ∗DC
iDC
In which,
i∗DC
1 ZT ∗
i∗ + imin )∗
= ·
i (t)dt = max
T
2
0
66
(7.1.3)
(7.1.4)
7.2. Practical implementation
Chapter 7. Solenoid current measurements
With the help of the AC equation 7.1.2, two unknowns have to be calculated, therefore
two measurement values are needed. One measurement taken at the top of the AC ripple,
i∗AC,peak and the other one halfway during the rising slope, i∗AC,half .
T
−
VAC + VAC e−T /τ (x) − 2VAC e 2τ (x)
∗
∗
iAC,peak = iAC,max =
R(x) 1 − e−T /τ (x)
(7.1.5)
− T
V
V
i∗AC,half = i∗AC (t/4) = AC − i∗AC,peak + AC e 4τ (x)
R(x)
R(x)
!
Out of these measurements, the resistance and inductance can be calculated as follows.
T
τ ∗ (x) = −
4ln −
R∗ (x)
!
i∗
−i∗
AC,half AC,peak
+i∗
i∗
AC,half AC,peak
2i∗AC,half VAC
= ∗2
iAC,half + i∗2
AC,peak
(7.1.6)
L∗ (x) = τ ∗ (x)R∗ (x)
7.2
7.2.1
Practical implementation
Test set-up
The test set-up can be seen in fig. 7.1. A square wave is generated using the function
generator Thandar TG501. This square wave is amplified using a power amplifier and then
applied to the solenoid. The current is measured with a hall sensor and then amplified and
shown on the oscilloscope, as well as the voltage.
The pilot position is controlled with the positioning screw, as explained in chapter 5.
67
7.2. Practical implementation
Waveform
Generator
Chapter 7. Solenoid current measurements
Power
Amplifier
Solenoid
Hall sensor
Oscilloscope
Figure 7.1: Test set-up
7.2.2
Test setup deviations
The used test setup is not entirely perfect, thus the measurements are likewise. Knowledge
of the setup’s deviations is important when examining the test results.
In our case, it was not always possible to maintain a PWM voltage between 0 V and 12 V. For
instance in some measurements the voltage is oscillating between 0.8 V and 11.2 V. Therefore
it is important to measure the applied voltage as well, instead of assuming an ideal voltage
oscillating between 0 V and 12 V.
An overview of the maximum and minimum voltages according to the frequency and the
ideal peak to peak voltage is shown in table 7.1.
When looking at the table, the column containing the data for the 12Vpp is remarkable. The
minimum voltage is always below zero for this row. This is because the test setup did not
function well at the maximum voltage of 12 V.
Table 7.1: Overview of the voltage minima and maxima for the different measurement points
Vpp [V]
1
6
12
Frequency [Hz] Vmin [V] Vmax [V] Vmin [V] Vmax [V] Vmin [V] Vmax [V]
250
0.05
0.90
0.34
5.88
-1.54
8.82
500
0.06
0.91
0.22
5.56
-1.48
8.88
750
0.05
0.91
0.13
5.54
-1.46
8.81
1000
0.09
0.92
0.14
5.54
-2.66
7.75
68
7.3. Results
7.2.3
Chapter 7. Solenoid current measurements
Data processing
A flowchart of the data processing is put in attachment A. Both the LCR and FG measurements are imported in Matlab. The first were saved in an excel table, while the latter were
saved in a special map structure. The different Matlab scripts are listed in attachment E, a
quick overview is given in table 7.2.
Table 7.2: Short overview of the different Matlab scripts
Import_FG
Import_LCR
Idc_Ihalf
Filters and imports FG measurements to Matlab.
Imports LCR measurements to Matlab and creates polyfits
of the resistance and inductance over the range of the armature position
∗ , I∗
∗
Calculates IDC
AC,half and IAC,peak
using the imported current waveform. Out of these values,
the resistance and inductances are calculated.
Isimulation_FG
Creates a simulation of the current waveform,
based upon the FG measurements
Creates a simulation of the current waveform,
Isimulation_LCR based upon the resistances and inductance from the LCR measurements,
and the voltage waveform of the FG test.
7.3
7.3.1
Results
Comparing resistance and inductance
In this section the resistances and inductance measured with LCR meter and the ones estimated out of the FG measurements are compared.
Inductance We notice on fig. 7.2 and 7.3 that the inductance estimated out of the FG
measurements is almost 30% higher than the one measured by the LCR meter. The behaviour
with regard to frequency and air gap, however, is very similar.
69
7.3. Results
Chapter 7. Solenoid current measurements
45
34
250 Hz
500 Hz
750 Hz
1000 Hz
40
250 Hz
500 Hz
750 Hz
1000 Hz
32
30
Inductance [mH]
Inductance [mH]
28
35
30
26
24
22
25
20
18
20
16
15
0
0.5
1
1.5
2
14
2.5
0
0.5
1
Air gap [mm]
1.5
2
2.5
Air gap [mm]
Figure 7.2: Inductance, estimated out ofFigure 7.3: Inductance, measured by LCR
FG measurements
meter
Resistance In figures 7.4 and 7.5, the resistance is shown. We notice that the resistance
estimated out of FG measurements is bigger. Again, the behaviour w.r.t. the frequency and
air gap is very similar.
90
90
250 Hz
500 Hz
750 Hz
1000 Hz
80
80
70
Resistance [Ω]
Resistance [Ω]
70
60
50
60
50
40
40
30
30
20
250 Hz
500 Hz
750 Hz
1000 Hz
0
0.5
1
1.5
2
2.5
20
0
0.5
1
Air gap [mm]
1.5
2
2.5
Air gap [mm]
Figure 7.4: Resistance, estimated out ofFigure 7.5: Resistance, measured by LCR
meter
the FG measurements
DC resistance and exponential time constant The DC resistance and exponential
time constant, estimated out of the FG measurements are shown in fig. 7.6 respectively 7.7.
The former is supposed to be a constant, and equal to 9.6 Ω. It is remarkable to see the
∗
deviation of RDC
at the frequency of 1000 Hz. Perhaps this deviation can be linked to the
deviating minimum and maximum voltages applied to the solenoid at that frequency, as can
be seen in table 7.1. Except for the frequency of 1000 Hz, the estimated DC resistance seems
70
7.3. Results
Chapter 7. Solenoid current measurements
to be constant with regard to the frequency and air gap, as we would expect.
The estimated exponential time constant seems to be a bit bigger than the one measured
with the LCR meter. This is due to the estimation error made on the resistances. Because
both the resistance and inductance decrease with increasing air gap, the time constant does
not vary much over the air gap interval.
1.6
250 Hz
500 Hz
750 Hz
1000 Hz
12.5
250 Hz
500 Hz
750 Hz
1000 Hz
12
1.4
11.5
1.2
τ [ms]
Resistance [Ω]
11
10.5
10
1
0.8
9.5
0.6
9
8.5
0.4
8
0.2
7.5
0
0.5
1
1.5
2
2.5
0
0.5
1
1.5
2
2.5
Air gap [mm]
Air gap [mm]
Figure 7.7: Exponential time constant, esFigure 7.6: DC resistance, estimated out of
timated out of the FG measurethe FG measurements
ments
7.3.2
Comparison of measured and simulated ripple current
In this section, the measured ripple current is analysed and compared to the simulated ripple
current.
Verifying theoretic model First, our used theoretic model is verified. In fig. 7.8, the
measured current ripple is compared to two different simulations. The first one, Imodel,FG
is a simulation of the current for which the used resistance and inductance are the ones
estimated out of the FG measurements. Thus this current waveform is based upon measured
i∗AC,peak and i∗AC,half . Indeed, we see that IMeasurement and Imodel,FG intersect at the peaks
and halfway during rising and descending slope. At other points these two waveforms do
not coincide so well, this implies that the used model is not accurate enough. A third-order
model could be used, in which the third parameter could be the parasitic capacitance.
The second modelled current, Imodel,LCR , was simulated using R and L from the LCR
measurements. In the previous section we have seen that a rather large error on RDC exists.
71
7.3. Results
Chapter 7. Solenoid current measurements
∗ , i.e. the DC resistance estimated out of the FG
In order to make fig. 7.8 more clear, RDC
measurements, has been used.
0.45
IMeasurement
IModel,FG,time−domain
IModel,LCR,time−domain
0.4
I [A]
0.35
0.3
0.25
0.2
−1.5
−1
−0.5
Time [ms]
0
−3
x 10
Figure 7.8: Comparison of simulated and measured current ripple, f = 500 Hz, Vpp =12 V, x=1 mm
Analysing ripple current vs. air gap In fig. 7.9 and 7.10, the amplitude of the current
ripple versus the air gap is shown. In the second figure, the amplitude is normalized with
regard to the value at maximum air gap. A variation in amplitude of 25% is measured, which
is similar to fig. 6.3. But in the latter, the skin effect is much more visible, i.e. the frequency
has a bigger influence. We notice that the influence of frequency on the relative variation of
the current ripple’s amplitude is almost negligible.
72
7.4. conclusions
Chapter 7. Solenoid current measurements
1
250 Hz
500 Hz
750 Hz
1000 Hz
0.28
250 Hz
500 Hz
750 Hz
1000 Hz
0.26
0.95
0.24
0.9
|Iripple,measured| [%]
|Iripple,measured| [A]
0.22
0.2
0.18
0.16
0.85
0.8
0.14
0.75
0.12
0.1
0.7
0.08
0
0.5
1
1.5
2
2.5
0
0.5
1
1.5
2
2.5
Air gap [mm]
Air gap [mm]
Figure 7.10: Relative amplitude of the
Figure 7.9: Amplitude of the measured
measured current ripple,
current ripple, Vpp =12 V
Vpp =12 V
7.3.3
Saturation curve
To investigate the influence of saturation, the current is measured for multiple peak to peak
voltages. In fig. 7.11, the amplitude of the ripple current is shown for different peak to peak
voltages. No clear change in the amplitude of the ripple current is visible, indicating that
no saturation takes place. Also R∗ and L∗ , i.e. resistance and inductance estimated out of
FG measurements, are plotted for different peak to peak voltages. This figures are shown in
attachment B
7.4
conclusions
Current measurements were conducted in this chapter. When comparing these measurements
to the simulation model in Matlab, it was found that a minor modelling error exists.
When analysing the current measurements, it was found that the variation of current ripple
with regard to the air gap, is up to 25% at a frequency of 250 Hz, which is a little less than
the simulated variation of current ripple.
These measurements were conducted at different peak to peak voltages, it was found that
no saturation takes place.
73
7.4. conclusions
Chapter 7. Solenoid current measurements
0.18
0 mm
1 mm
2.5 mm
0.16
0.14
IAC,ripple [A]
0.12
0.1
0.08
0.06
0.04
0.02
0
0
2
4
6
8
10
Vpp [V]
Figure 7.11: Measured current ripple w.r.t. the applied peak to peak voltage
74
12
Chapter 8
Future work
In future research on the solenoid actuator, it would be interesting to perform dynamic
simulations with the help of a electrical circuit simulator such as PLECS®or SIMULINK®.
These simulations could be used to further test the proposed selfsensing technique. Also a
study about the right choice for the controller parameters could be made.
In a second phase, a dynamic test setup could be built. In order to function properly, the
solenoid actuator needs to be connected to a hydraulic. Because as we have seen in chapter
2, the return force on the solenoids pilot result from the connected hydraulic circuit.
Also the constructed current response model could be extended to a third order model.
75
Chapter 9
Conclusion
In this thesis, the feasibility of position estimation on a pilot-operated proportional solenoid
actuator is studied. Using finite element (FE) simulations, we have seen that because the
solenoid actuator is a variable reluctance machine, a change in flux linkage with regard to
the pilot position occurs. This change in flux over the position interval is dependent on the
frequency trough the principle of skin effect.
A sensorless position estimation technique is then proposed. The changing flux linkage
results in a variable ripple current. This ripple current is thus used to estimate the pilot
position. A major feature in the proposed selfsensing technique is to use a correct frequency
range for sensing the pilot position. Therefore, if the used PWM frequency is too high, a
secondary low-frequency sensing signal will be injected. This injected signal has an additional
advantage, its duty ratio can be chosen arbitrary and is chosen to be 50%, resulting in a
symmetrical current ripple.
76
Bibliography
[1] So-Nam Yun, Young-Bog Ham, Haeng-Bong Shin, Proportional Fuel Flow Control Valve
for Diesel Vehicle. International Conference on Control, Automation and Systems, Seoul,
Korea, 2008.
[2] So-Nam Yun, Dong-Won Yun, Hyo-Bong Kim, Soon-Chan Hwang, Proportional Pressure Reducing Valve for Clutch Control System. International Conference on Control,
Automation and Systems Gyeonggi-do, Korea, 2010.
[3] Mao Zhiyong, Zhang Ziyi, Liu jian, Study on application of electrohydraulic servo proportional valve in hydraulic system for rolling mills. Beijing Union University, 2008.
[4] Popovic and Popovic, Introductory Electromagnetics. Prentice-Hall Inc, 2000.
[5] Young and Freedman, University Physics. Addison Wesley, 12th edition 2007.
[6] Y. Perriard, O. Scaglione, M. Markovic, Self-Sensing Methods for PM Motors in Mechatronic Applications. IEEE Internation conference on advanced intelligent mechatronics,
Montréal, Canada, 2010.
[7] F.M. De Belie, P. Sergeant, J.A. Melkebeek, A sensorless PMSM drive using modified
high-frequency test pulse sequences for the purpose of a discrete-time current controller
with fixed sampling frequency. Power Electronics, IEEE Transactions on IEEE, 2010.
[8] R. D. Lorenz, Key Technologies for Future Motor Drives. Electrical Machines and Systems, Proceedings of the Eighth International Conference on, IEEE, 2005.
[9] M.F. Rahman, N.C. Cheung, Position Estimation in Solenoid Actuators. IEEE Transactions on industry applications, Vol. 32, 1996.
[10] Y. QingHui, Y.Li Perry, Selfsensing in electrohydraulic valves. Internation mechanical
engineering congress and exposition, California, USA, 2004.
77
Bibliography
Bibliography
[11] D. Pawelczak, H.R. Trankler, Sensorless position control of electromagnetic linear actuator. Instrumentation and Measurement Technology Conference, Como, Italy, 2004.
[12] J. Maridor, N. Katic, Y. Perriard, D. Ladas Sensorless position detection of a linear
actuator using the resonance frequency. International Conference on Electrical Machines
and Systems, Tokyo, Japan 2009.
[13] H. De Smet, Industriele elektrische metingen. Gent, 2014
[14] J.W.Dobchuk Control of a hydrualically actuated mechanism using a proportional valve
and a linearizing feedforward controller. Saskatoon, Canada, 2004
[15] http://en.wikipedia.org/wiki/Strain_gauge.
[16] http://en.wikipedia.org/wiki/Penetration_depth.
[17] http://en.wikipedia.org/wiki/Skin_effect.
[18] http://en.wikipedia.org/wiki/Band-pass_filter
[19] http://en.wikipedia.org/wiki/Electrohydraulic_manual_transmission
[20] http://www.agros2d.org.
[21] http://www.MATHWORKS.NL/help/pde/ug/magnetostatics.html
[22] http://recordingology.com/in-the-studio/distortion/
square-wave-calculations/
78
Appendix A
Flowcharts
79
Appendix A. Flowcharts
Excel table
Construct Vw
and Vs
Import_LCR
IpwmGenerator
Rfk(xk)
Lfk(xk)
Itot
IdcSensing
Idc,sens, Itot
IacMaxSensing
Iacsmax, Iacsmin
PositionSensing
xs
Figure A.1: Flowchart of the selfsensing simulations in Matlab
80
Appendix A. Flowcharts
Oscilloscope
V,I
measurement
at xm,fm,Vm
LCR
Save
PC
Save
Map\Vm\fm\All000xm
PC
Import_FG
Matlab
R,L
measurement
at xk,fk
Excel table
Import_LCR
Ifm_Vm(xm)
Matlab
2D Look-up table
for R(f,x) and L(f,x)
Idc_Ihalf
RdcFG LFG RFG
Isimulation_LCR
Isimulation_FG
Ith_FG : i simulation
based upon FG
measurements
Ith_LCR : i simulation
based upon LCR
measurements
Figure A.2: Flowchart of the FG and LCR measurements
81
Appendix B
Extra figures, FG measurements
75
3.9
0 mm
1 mm
2.5 mm
70
0 mm
1 mm
2.5 mm
3.8
3.7
3.6
IAC,ripple [A]
65
IAC,ripple [A]
· 10−2
60
55
3.5
3.4
3.3
3.2
3.1
50
3
45
0
1
2
3
4
5
6
7
Vpp [V]
8
9
10
11
12 2.9 0
1
2
3
4
5
6
7
Vpp [V]
8
9
10
11
(a) Resistance, estimated out of FG measure-(b) Inductance, estimated out of FG measurements
ments
82
12
Appendix C
Matlab code, LCR measurements
1
close all
2
clear all
3
4
M1=xlsread('Met.xls'); %Reading LCR measurements from EXCEL file
5
[n1 n2]=size(M1);
6
for i=0:n2-1
M(:,i+1)=M1(:,n2-i);
7
8
end
9
RDC=9.6;
%Declaration of Rdc, which is constant en was measured ...
afterwards
10
11
L5k=M(2,:);L2k=M(4,:);L1k=M(6,:);L500=M(8,:);L250=M(10,:);L100=M(12,:);
12
R5k=M(3,:);R2k=M(5,:);R1k=M(7,:);R500=M(9,:);R250=M(11,:);R100=M(13,:);
13
14
%Create 2D polyfit; A value at x1 and f1 should be called like this: ...
L1=interp2(ri,fi,Li,x1,f1)
15
ri=M(1,:);
16
fi=[100 250 500 1000 5000];
17
Li=[L100;L250;L500;L1k;L5k];
18
Ri=[R100;R250;R500;R1k;R5k];
83
Appendix D
Matlab code, selfsensing simulations
1
close all
2
%% Construct main driving PWM
3
% Changing position: every 2 sensing periods, position can be changed.
4
5
% Ts=20*Tw -> every 40 'working' periods, position can be changed.
Vw=12;
6
fw=5000;
7
nmax=400;
8
x1=repmat(1.1,1,nmax/5);
9
x2=repmat(1.2,1,nmax/5);
10
x3=repmat(0.3,1,nmax/5);
11
x4=repmat(2.2,1,nmax/5);
12
x5=repmat(2.2,1,nmax/5);
13
x=[x1 x2 x3 x4 x5];
14
tx=linspace(0,nmax/fw,nmax);
15
16
d1=repmat(0.5,1,1*nmax/10);
17
d2=repmat(0.5,1,3*nmax/10);
18
d3=repmat(0.7,1,3*nmax/10);
19
d4=repmat(0.9,1,3*nmax/10);
20
dutyw=[d1 d2 d3 d4];
21
22
dutyseq=square(tx*2*pi*250,50)/12;
23
dutytot=dutyw+dutyseq;
24
25
[iwac iwdc tw vw]=IpwmGenerator(fw,fw,x,dutyw,nmax,Vw,1);
26
84
Appendix D. Matlab code, selfsensing simulations
27
%% Construct sensing PWM
28
Vs=1;
29
fs=500;
30
nmaxs=nmax/(fw/fs);
31
dutys=repmat(0.5,nmaxs);
32
xs=x(1:fw/fs:length(x));
33
34
[isac isdc ts vs]=IpwmGenerator(fs,fw,xs,dutys,nmaxs,Vs,2);
35
36
%% Total current response
37
itot=iwdc+iwac+isac+isdc;
38
vtot=vw+vs;
39
40
%Idc sensing
41
[idcsens tsens]=IdcSensing(fw,dutyw,Vw,x);
42
%Possible random 'measurement' error
43
idcsens=idcsens+randi([-1,1]*100,[1,length(idcsens)])/100*mean(idcsens)/800*0;
44
45
%Iac sensing
46
[iacsmax iacsmin tmax ...
tmin]=IacMaxSensing(tw,vw,itot,idcsens,dutyw,fw,Vw,x);
47
48
%Position sensing
49
[txs,xs]=PositionSensing(tmax,iacsmax,tmin,iacsmin,Vs,fs);
50
51
set(0,'DefaultAxesColorOrder',[0 0 ...
0],'DefaultAxesLineStyleOrder','-|-.|--|:|*-')
1
function ...
[iacplot,idcplot,tplot,vplot]=IpwmGenerator(f,fw,x,duty,nmax,V,mode)
2
%fw is de werkfrequentie, i.e. fw=5000 Hz. f kan de werkfreq of de
3
%screeningfreq zijn, i.e. f=250 Hz OF f=5000 Hz
4
%mode=1 -> WorkMode ; mode=2-> ScreeningMode
5
6
T=1/f;
7
Tw=1/fw;
8
Rdc=evalin('base','RDC');
9
10
if mode==1
85
Appendix D. Matlab code, selfsensing simulations
11
%The working mode, we assume Vmin=0 and Vmax=V
12
iacmino=0;
13
idco=duty(1)*V/Rdc;
14
iacold=[];
15
idcold=[];
16
told=[];
17
vold=[];
18
Lold=[];
19
for k=1:nmax
20
21
pos=x(k); % Every 40 'work' periods, position is changed
22
assignin('base','pos',pos)
23
assignin('base','f',f)
24
L1=evalin('base','interp2(ri,fi,Li,pos,f, ''spline '')/1000');
25
R1=evalin('base','interp2(ri,fi,Ri,pos,f)');
26
Rpuls=(R1);
27
Lpuls=(L1);taupuls=Lpuls/Rpuls;
28
R=Rpuls;L=Lpuls;tau=taupuls;
29
Ldc=evalin('base', 'interp2(ri,fi,Li,pos,100)/1000'); %Using ...
100 Hz as DC inductance
30
taudc=Ldc/Rdc;
31
∆
32
iacmax=(iacmino-(1-∆)*V/R)*exp(-∆*T/tau)+(1-∆)*V/R;
33
iacmin=(iacmax+∆*V/R)*exp(-(1-∆)*T/tau)-∆*V/R;
34
tris=linspace(0,∆*T,100*fw/f);
=duty(k);
...
%Werkfrequentie wordt in 100 stapjes opgedeeld, ...
screeningfreq in 100*fw/f stapjes
35
tdown=linspace(∆*T,T,100*fw/f);
36
iac=[(iacmino-(1-∆)*V/R)*exp(-tris/tau)+(1-∆)*V/R ...
(iacmax+∆*V/R)*exp(-(tdown-∆*T)/tau)-∆*V/R];
38
idc=(idco-∆*V/Rdc).*exp(-[tris tdown]/taudc)+∆*V/Rdc;
v=[(tris+1)./(tris+1) 0.*tdown]*V/12;
39
iacold=[iacold iac];
40
idcold=[idcold idc];
41
42
told=[told tris+(k-1)*T tdown+(k-1)*T];
idco=idc(end);
43
iacmino=iacmin;
44
vold=[vold v];
45
Lold=[Lold L];
37
end
46
47
end
86
Appendix D. Matlab code, selfsensing simulations
48
49
if mode==2
50
%The screening mode, we assume Vmin=-V, Vmax=V and
51
∆
52
iacmino=0;
53
idco=0;
54
iacold=[];
55
idcold=[];
56
told=[];
57
vold=[];
58
Lold=[];
∆
=0.5
=0.5;
59
60
for k=1:nmax
61
pos=x(k); % Every 40 'work' periods, position is changed
62
assignin('base','pos',pos)
63
assignin('base','f',f)
64
L1=evalin('base','interp2(ri,fi,Li,pos,f)/1000'); %Fundamental ...
frequency
65
R1=evalin('base','interp2(ri,fi,Ri,pos,f)');
66
L3=evalin('base','interp2(ri,fi,Li,pos,3*f)/1000'); %Third harmonic
67
R3=evalin('base','interp2(ri,fi,Ri,pos,3*f)');
68
Rpuls=Rdc+((R1-Rdc)+1*(R3-Rdc)/3*0);
69
Lpuls=(L1+L3/3*0);taupuls=Lpuls/Rpuls;
70
R=Rpuls;L=Lpuls;tau=taupuls;
71
Ldc=evalin('base', 'interp2(ri,fi,Li,pos,100)/1000'); %Using ...
100 Hz as DC inductance
72
%Rdc=evalin('base','RDC');
73
taudc=Ldc/Rdc;
74
iacmax=V/R*(exp(-T/2/tau)-1)^2/(1-exp(-T/tau));
75
iacmin=-V/R*(exp(-T/2/tau)-1)^2/(1-exp(-T/tau));
76
tris=linspace(0,∆*T,100*fw/f);
...
%Werkfrequentie wordt in 100 stapjes opgedeeld, ...
77
screeningfreq in 100*fw/f stapjes
tdown=linspace(∆*T,T,100*fw/f);
78
iac=[(iacmino-V/R)*exp(-tris/tau)+V/R ...
(iacmax+V/R)*exp(-(tdown-∆*T)/tau)-V/R];
79
idc=idco.*exp(-[tris tdown]/taudc);
80
81
v=[(tris+1)./(tris+1) -(tdown+1)./(tdown+1)]*V/12;
iacold=[iacold iac];
82
idcold=[idcold idc];
83
told=[told tris+(k-1)*T tdown+(k-1)*T];
87
Appendix D. Matlab code, selfsensing simulations
84
idco=idc(end);
85
iacmino=iacmin;
86
vold=[vold v];
87
Lold=[Lold L];
end
88
89
end
90
91
Lplot=Lold;
92
tplot=told;
93
vplot=vold;
94
iacplot=iacold;
95
idcplot=idcold;
96
end
1
function [idc,t] = IdcSensing(fw,duty,V,x)
2
%Estimating idc out of an array itot. duty: array with duty ratios; t:time
3
%array; fw:working frequency
4
Rdc=evalin('base','RDC');
5
6
%Assumption: start in steady state
7
idc0=duty(1)*V/Rdc;
8
9
nmax=length(duty);
10
Tw=1/fw;
11
idc=[];
12
t=[];
13
14
for k=1:nmax
15
pos=x(k); % Every 40 'work' periods, position can be changed
16
assignin('base','pos',pos)
17
L=evalin('base','interp2(ri,fi,Li,pos,100)/1000');
18
=duty(k);
19
∆
20
tnew=linspace(0,Tw,200);
21
idcnew=(idc0-∆*V/Rdc).*exp(-tnew.*Rdc./L)+∆*V/Rdc;
22
idc0=idcnew(end);
23
idc=[idc idcnew];
24
t=[t tnew+(k-1)*Tw];
25
end
88
Appendix D. Matlab code, selfsensing simulations
26
27
1
end
function [iacsmax iacsmin tmax tmin] = ...
IacMaxSensing(t,v,itot,idcsens,duty,fw,Vw,x)
2
%duty: array met alle duty ratios erin; fw: workingfrequency; vtot:total
3
%iacsmax: value of iacs at the maxima of iacw; iacsmin: value of iacs ...
at the minima of iacw;
4
%voltage
5
iac=itot-idcsens;
6
7
8
%calculating iacwmax en iacwmin
9
Tw=1/fw;
10
if fw6=5000
error('fw!=5000')
11
12
end
13
14
iacwmin=zeros(1,length(duty));
15
iacwmax=zeros(1,length(duty));
16
for k=1:length(duty)
17
pos=x(k);
18
assignin('base','pos',pos)
19
Rw=evalin('base','interp2(ri,fi,Ri,pos,5000)');
20
Lw=evalin('base','interp2(ri,fi,Li,pos,5000)/1000');
21
tauw=Lw/Rw;
22
=duty(k);
23
∆
24
iacwmin(k)=Vw/Rw.*(exp(-Tw/tauw)-exp(-(1-∆)*Tw/tauw))/(exp(-Tw/tauw)-1)-∆*Vw/Rw;
25
iacwmax(k)=Vw/Rw.*(exp(-∆.*Tw/tauw)-1)/(exp(-Tw/tauw)-1)-∆*Vw/Rw;
26
end
27
28
29
%Search the periodV1=max(v);
30
V1=max(v);
31
V2=min(v);
32
Vgem=(V1+V2)/2;
33
nv=length(v);
34
tru=[]; %trigger points up
89
Appendix D. Matlab code, selfsensing simulations
35
trd=[]; %trigger point down
36
itru=1;
37
itrd=1;
38
vold=v(1);
39
for it=2:nv
if(v(it)>Vgem)&&(vold<Vgem)
40
41
tru(itru)=it-1;
42
itru=itru+1;
43
end
44
if(v(it)<Vgem)&&(vold>Vgem)
45
trd(itrd)=it-1;
46
itrd=itrd+1;
47
end
48
vold=v(it);
49
end
50
51
%measure points
52
iacmax=iac(trd);
53
tmax=t(trd);
54
iacmin=iac(tru);
55
tmin=t(tru);
56
iacsmax=iac(trd)-iacwmax(1:length(trd));
57
iacsmin=iac(tru)-iacwmin(1:length(tru));
58
59
% figure;
60
% plot(tmax,iacmax,'*',tmin,iacmin,'.',t,v)
61
% legend('iacmax','iacmin')
62
%
63
% figure;
64
65
% plot(tmax,iacsmax,'*',tmin,iacsmin,'.',t,v)
% legend('iacsmax','iacsmin')
66
end
1
function [tx,x] = PositionSensing(tmax,iacsmax,tmin,iacsmin,Vs,fs)
2
%Estimating the position out of a series of sensed maxima and minima
3
%iacsmax: value of iacs at the maxima of iacw; iacsmin: value of iacs ...
at the minima of iacw;
4
%Calibration_AC_Current moet uitgevoerd zijn!
5
90
Appendix D. Matlab code, selfsensing simulations
6
%% First: Calculate the maxima out of iacs using vs
7
8
minpeakheight=max(iacsmin)*0.5; %De pieken zijn hoogstens 50% lager dan ...
de maximale waarde, aangezien de max waarde maar 30% kan variëren ...
met de positie
9
acf=autocorr(iacsmin);
10
[acfmax itacfmax]=findpeaks(-acf); %To find the half of the period
11
acfmax=acfmax(1);itacfmax=itacfmax(1);
12
%itacfmax is de helft van de periode
13
minpeakdist=round(2*itacfmax/1.5); %De min afstand van 2 pieken is iets ...
kleiner dan de periode
14
15
[ismax,itmax]=findpeaks(iacsmin,'minpeakheight',minpeakheight,'minpeakdistance',minpeakd
16
[temp,itmin]=findpeaks(-iacsmin,'minpeakheight',minpeakheight,'minpeakdistance',minpeakd
17
18
% figure;
19
% plot(itmax,ismax)
20
% title('ismax')
21
22
%% Calibration
23
V=Vs;
24
duty=0.5;
25
x=linspace(0,2.6,15);
26
f=fs;
27
28
assignin('base','pos',x)
29
assignin('base','freq',f)
30
R1=evalin('base','interp2(ri,fi,Ri,pos,freq)');
31
L1=evalin('base','interp2(ri,fi,Li,pos,freq)/1000');
32
33
R=R1;L=L1;
34
tau=L./R;
35
T=1/f;
36
37
iMAC=V.*(exp(-T./(2.*tau))-1).^2./(R.*(1-exp(-T./tau)));
38
imAC= - V.*(exp(-T./(2.*tau))-1).^2./(R.*(1-exp(-T./tau)));
39
40
[pxiMAC,S,mu]=polyfit(iMAC,x,3);
41
42
figure;
43
%subplot(2,1,1)
91
Appendix D. Matlab code, selfsensing simulations
44
plot(iMAC,polyval(pxiMAC,iMAC,S,mu))
45
title(['iMAC vs x_{lookuptable}, f= ' num2str(f) ''],'fontsize',14)
46
% subplot(2,1,2)
47
% plot(iMAC,x)
48
% title(['iMAC vs x, f= ' num2str(f) ''])
49
50
%% Estimate position using iacs
51
xmax=polyval(pxiMAC,ismax,S,mu)
52
xmin=polyval(pxiMAC,-ismin,S,mu)
53
54
%x=(xmax-xmin)/2;
55
txmax=tmin(itmax);
56
txmin=tmin(itmin);
57
%tx=tmin(round((itmax+itmin)/2));
58
x=(xmax(1:length(xmin))+xmin)./2;
59
tx=(txmax(1:length(txmin))+txmin)./2;
60
xmean2=filter([1 1],2,x); %mean of 2 xmax and 2 xmin points
61
xmean4=filter([1 1],2,xmean2); %mean of 4 xmax and 4 xmin points
62
xmean8=filter([1 1],2,xmean4); %mean of 8 xmax and 8 xmin points
63
64
% figure;
65
% plot(txmax,ismax,'*',txmin,ismin,'.')
66
67
figure;
68
plot(txmax,xmax,'*',txmin,xmin,'.',tx,xmean8)
69
%title('Estimated position','fontsize',14)
70
ylabel('x_{pilot,estimate} [mm]','fontsize',14)
71
xlabel('Time [s]','fontsize',14)
72
legend('positive pwm-flank estimate','negative pwm-flank ...
estimate','mean of 8 PWM periods','fontsize',14,'Location','East')
73
%matlab2tikz(['Fig\Sim_x_est.tikz']);
74
75
figure;
76
plot(txmax,xmax,'*',txmin,xmin,'.',tx,xmean2,tx,xmean4)
77
%title('Estimated position','fontsize',14)
78
ylabel('x_{pilot,estimate} [mm]','fontsize',14)
79
xlabel('Time [s]','fontsize',14)
80
legend('positive pwm-flank estimate','negative pwm-flank ...
estimate','mean of 2 PWM periods','mean of 4 PWM ...
periods','fontsize',14,'Location','East')
81
print -depsc Sim_x_est.eps
92
Appendix D. Matlab code, selfsensing simulations
82
end
93
Appendix E
Matlab code, FG measurements
1
ns=5;
2
set(0,'DefaultAxesColorOrder',[1 0 0;0 0.5 0.5; 0.5 0 0.5; 0 0 1; 0 1 ...
3
%% Importing measurements conducted with Function Generator
4
for n=1:3
0; 0.5 0.5 0],'DefaultAxesLineStyleOrder','-|-|-');
5
if n==1
6
Vpp=12;
7
elseif n==2
Vpp=6;
8
9
elseif n==3
Vpp=1;
10
11
else
12
end
13
loc=['DC_Coupled\' num2str(Vpp) 'Vpp\'];
14
for nf=1:4
15
if nf==1
f=250;
16
17
elseif nf==2
f=500;
18
19
elseif nf==3
f=750;
20
21
elseif nf==5
f=100;
22
23
else
f=1000;
24
25
end
94
Appendix E. Matlab code, FG measurements
26
for it=0:5
27
[S t]=Import(['FG_2eZit\' loc '' num2str(f) 'HZ\ALL000' ...
28
num2str(it) '\F000' num2str(it) 'CH' num2str(1) ...
'.csv'],ns,3); %Voltage
29
V=S;
30
eval(['V' num2str(f) '_' num2str(Vpp) '(' num2str(it+1) ...
',:) =S;']);
eval(['VM' num2str(f) '_' num2str(Vpp) '(' num2str(it+1) ') ...
31
=max(S);']);
eval(['Vm' num2str(f) '_' num2str(Vpp) '(' num2str(it+1) ') ...
32
=min(S);']);
eval(['t' num2str(f) '_' num2str(Vpp) '(' num2str(it+1) ...
33
',:) =t;']);
[S1 t]=Import(['FG_2eZit\' loc '' num2str(f) 'HZ\ALL000' ...
34
num2str(it) '\F000' num2str(it) 'CH' num2str(3) ...
'.csv'],ns,3); %Current
35
S=0.1*S1; % Probe scaling
36
I=S;
37
eval(['I' num2str(f) '_' num2str(Vpp) '(' num2str(it+1) ...
',:) =S;']);
eval(['IM' num2str(f) '_' num2str(Vpp) '(' num2str(it+1) ') ...
38
=max(S);']);
eval(['Im' num2str(f) '_' num2str(Vpp) '(' num2str(it+1) ') ...
39
=min(S);']);
eval(['Id' num2str(f) '_' num2str(Vpp) '(' num2str(it+1) ') ...
40
=max(S)-min(S);']);
41
[Idc Ihalf Vdc Vper Iper tper]=IdcIhalf(V,I,t);
...
42
eval(['IDC' num2str(f) '_' num2str(Vpp) '(' num2str(it+1) ...
%Calculating Idc and Ihalf out of measured current waveform
') =Idc;']);
eval(['Ih' num2str(f) '_' num2str(Vpp) '(' num2str(it+1) ') ...
43
=Ihalf;']);
eval(['VDC' num2str(f) '_' num2str(Vpp) '(' num2str(it+1) ...
44
') =Vdc;']);
end
45
end
46
47
end
48
%% Calculating R and L out of measured current waveform
49
for n=1:3
50
if n==1
95
Appendix E. Matlab code, FG measurements
51
Vpp=12;
52
elseif n==2
Vpp=6;
53
54
elseif n==3
Vpp=1;
55
56
else
57
end
58
for nf=1:4
59
if nf==1
f=250;
60
61
elseif nf==2
f=500;
62
63
elseif nf==3
f=750;
64
65
elseif nf==5
f=100;
66
67
else
f=1000;
68
69
end
70
T=1/f;
71
for it=1:6
72
eval(['Vdc= VDC' num2str(f) '_' num2str(Vpp) '(' ...
num2str(it) ');']);
73
eval(['VM= VM' num2str(f) '_' num2str(Vpp) '(' num2str(it) ...
');']);
74
eval(['Vm= Vm' num2str(f) '_' num2str(Vpp) '(' num2str(it) ...
');']);
75
VacM=VM-Vdc;
76
Vacm=Vm-Vdc;
77
Vac=(VacM-Vacm)/2;
78
eval(['idc= IDC' num2str(f) '_' num2str(Vpp) '(' ...
num2str(it) ');']);
79
eval(['ih= Ih' num2str(f) '_' num2str(Vpp) '(' num2str(it) ...
');']);
80
eval(['iM= IM' num2str(f) '_' num2str(Vpp) '(' num2str(it) ...
');']);
81
iacp=iM-idc;
82
iach=ih;
83
Rdc=Vdc/idc;
84
tau=-T/4/(log(-(iach-iacp)/(iach+iacp)));
85
Rac=2*iach*Vac/(iach^2+iacp^2);
96
Appendix E. Matlab code, FG measurements
86
L=tau*Rac;
87
tauDC=L/Rdc;
88
eval(['RDC' num2str(f) '_' num2str(Vpp) '(' num2str(it) ') ...
=Rdc;']);
eval(['tau' num2str(f) '_' num2str(Vpp) '(' num2str(it) ') ...
89
= tau;']);
eval(['RAC' num2str(f) '_' num2str(Vpp) '(' num2str(it) ') ...
90
=Rac;']);
eval(['L' num2str(f) '_' num2str(Vpp) '(' num2str(it) ') = ...
91
L;']);
eval(['tauDC' num2str(f) '_' num2str(Vpp) '(' num2str(it) ...
92
') = tauDC;']);
end
93
end
94
95
end
96
%% Simulating current waveforms
97
nh=150; %number of harmonics used in frequency domain calculations
98
for n=1:3
99
if n==1
100
Vpp=12;
101
elseif n==2
Vpp=6;
102
103
elseif n==3
Vpp=1;
104
105
else
106
end
107
for nf=1:4
108
if nf==1
f=250;
109
110
elseif nf==2
f=500;
111
112
elseif nf==3
f=750;
113
114
elseif nf==5
f=100;
115
116
else
f=1000;
117
118
end
119
for it=1:6
120
eval(['[Ith_LCR' num2str(f) '_' num2str(Vpp) '(' ...
num2str(it) ',:),Ithd_LCR' num2str(f) '_' num2str(Vpp) ...
97
Appendix E. Matlab code, FG measurements
'(' num2str(it) ')] = Isimulation_LCR(' num2str(f) ',' ...
num2str((it-1)*0.5) ',V' num2str(f) '_' num2str(Vpp) '(' ...
num2str(it) ',:),t' num2str(f) '_' num2str(Vpp) '(' ...
num2str(it) ',:),RDC'...
num2str(f) '_' num2str(Vpp) '(' num2str(it) '));']);
121
eval(['[Ith_FG' num2str(f) '_' num2str(Vpp) '(' num2str(it) ...
122
',:),Ithd_FG' num2str(f) '_' num2str(Vpp) '(' ...
num2str(it) ')] = Isimulation_FG(' num2str((it-1)*0.5) ...
',V' num2str(f) '_' num2str(Vpp) '(' num2str(it) ...
',:),t' num2str(f) '_' num2str(Vpp) '(' num2str(it) ...
123
',:),RDC' num2str(f) '_' num2str(Vpp) '(' ...
num2str(it) '),RAC' num2str(f) '_' num2str(Vpp) '(' ...
num2str(it) '),L' num2str(f) '_' num2str(Vpp) '(' ...
num2str(it) '));']);
eval(['[Ith_LCR_Frq' num2str(f) '_' num2str(Vpp) '(' ...
124
num2str(it) ',:),Ithd_LCR_Frq' num2str(f) '_' ...
num2str(Vpp) '(' num2str(it) ')] = Isimulation_LCR_Frq(' ...
num2str(f) ',' num2str((it-1)*0.5) ',V' num2str(f) '_' ...
num2str(Vpp) '(' num2str(it) ',:),t' num2str(f) '_' ...
num2str(Vpp) '(' num2str(it) ',:),RDC'...
num2str(f) '_' num2str(Vpp) '(' num2str(it) '),' ...
125
num2str(nh) ');']);
end
126
end
127
128
1
end
function [res]=Filter(A,ns)
2
3
n=length(A);
4
n2=floor(n/ns);
5
6
for i=1:n2
7
res(i)=sum(A(1+ns*(i-1):ns*i))/ns;
8
end
9
10
1
end
function [res1 res2]=Import(abc,ns,m)
98
Appendix E. Matlab code, FG measurements
2
%% Function to easily import data from excel or .csv constructed by ...
oscilloscope
3
%ns: number of filtersamples
4
%abc: String with location of file
5
%m: mode;
6
%m=1 -> only signal, m=2 -> signal and time, m=3 -> signal, time and header
7
8
if (m==1)
res1=Filter(importdata(abc),ns);
9
10
elseif (m==2)
11
FF=importdata(abc);
12
res1=Filter(FF(:,2),ns);
13
res2=Filter(FF(:,1),ns);
14
elseif (m==3)
15
FF=csvread(abc,17);
16
res2=Filter(FF(:,4),ns); %tijd
17
res1=Filter(FF(:,5),ns); %signaal
18
end
19
end
1
function [ians iripple]=Isimulation_FG(x,v,t,Rdc,R,L)
2
%Returns exponential current waveform, based upon measured V-vector and ...
time-vector
4
%R*, L* used as resistance and inductance
V1=max(v);
5
V2=min(v);
6
tau=L/R;
7
Vgem=(V1+V2)/2;
8
%% Search PWM period
9
nv=length(v);
3
10
tru=[]; %trigger points up
11
trd=[]; %trigger point down
12
itru=1;
13
itrd=1;
14
vold=v(1);
15
for it=2:nv
16
if(v(it)>Vgem)&&(vold<Vgem)
17
tru(itru)=it;
18
itru=itru+1;
99
Appendix E. Matlab code, FG measurements
19
end
20
if(v(it)<Vgem)&&(vold>Vgem)
21
trd(itrd)=it;
22
itrd=itrd+1;
23
end
24
vold=v(it);
25
end
26
T=(t(tru(2))-t(tru(1))+t(trd(2))-t(trd(1)))/2; %Calculating the period
27
28
t1=t(1:tru(1)-1); %time untill first pulse
29
if(trd(1)>tru(1))
%if first up, then down
30
t2=t(tru(1):trd(1)-1);
31
t3=t(trd(1):tru(2)-1);
32
t4=t(tru(2):length(t));
33
Vper1=v(tru(1):trd(1)-1);
34
Vper2=v(trd(1):tru(2)-1);
35
else
%first down, then up
36
t2=t(tru(1):trd(2)-1);
37
t3=t(trd(2):tru(2)-1);
38
t4=t(tru(2):length(t));
39
Vper1=v(tru(1):trd(2)-1);
40
Vper2=v(trd(2):tru(2)-1);
41
end
42
43
d=length(t2)/(length(t2)+length(t3)); %Duty ratio
44
Vper=[Vper1 Vper2];
45
Vdc=trapz(Vper)/length(Vper);
46
VacM=V1-Vdc;
47
Vacm=V2-Vdc;
48
idc=Vdc/Rdc;
49
iacm=(exp(-T*(1-d)/tau)*(VacM-Vacm)-exp(-T/tau)*VacM+Vacm)/(R*(1-exp(-T/tau)));
50
iacM=(exp(-d*T/tau)*(Vacm-VacM)-exp(-T/tau)*Vacm+VacM)/(R*(1-exp(-T/tau)));
51
52
i1=0.*t1;
%dode tijd
53
i2=idc+(iacm-VacM/R).*exp(-(t2-t1(length(t1)))/tau)+VacM/R;
%exp rised
54
i3=idc+(iacM-Vacm/R).*exp(-(t3-t2(length(t2)))/tau)+Vacm/R;
%exp ...
decline
55
i4=0.*t4;
%eind dode tijd
56
iripple=max(i2)-min(i3); %Amplitude of ripple current
57
ians=[i1 i2 i3 i4];
58
end
100
Appendix E. Matlab code, FG measurements
1
function [ians iripple]=Isimulation_LCR(f,x,v,t,RDC)
2
%Returns exponential current waveform, based upon measured V-vector and ...
time-vector
3
V1=max(v);
4
V2=min(v);
5
Vgem=(V1+V2)/2;
6
% Get R,L from LCR measurements
7
pos=x;
8
assignin('base','pos',pos)
9
assignin('base','f',f)
10
L=evalin('base','interp2(ri,fi,Li,pos,f)/1000');
11
R=evalin('base','interp2(ri,fi,Ri,pos,f)');
12
tau=L/R;
13
Rdc=RDC;
14
%% Search PWM period
15
nv=length(v);
16
tru=[]; %trigger points up
17
trd=[]; %trigger point down
18
itru=1;
19
itrd=1;
20
vold=v(1);
21
for it=2:nv
if(v(it)>Vgem)&&(vold<Vgem)
22
23
tru(itru)=it;
24
itru=itru+1;
25
end
26
if(v(it)<Vgem)&&(vold>Vgem)
27
trd(itrd)=it;
28
itrd=itrd+1;
29
end
30
vold=v(it);
31
end
32
T=(t(tru(2))-t(tru(1))+t(trd(2))-t(trd(1)))/2; %Calculating the period
33
34
t1=t(1:tru(1)-1); %time untill first pulse
35
if(trd(1)>tru(1))
%if first up, then down
36
t2=t(tru(1):trd(1)-1);
37
t3=t(trd(1):tru(2)-1);
101
Appendix E. Matlab code, FG measurements
38
t4=t(tru(2):length(t));
39
Vper1=v(tru(1):trd(1)-1);
40
Vper2=v(trd(1):tru(2)-1);
41
else
%first down, then up
42
t2=t(tru(1):trd(2)-1);
43
t3=t(trd(2):tru(2)-1);
44
t4=t(tru(2):length(t));
45
Vper1=v(tru(1):trd(2)-1);
46
Vper2=v(trd(2):tru(2)-1);
47
end
48
49
d=length(t2)/(length(t2)+length(t3)); %duty ratio
50
Vper=[Vper1 Vper2];
51
Vdc=trapz(Vper)/length(Vper);
52
VacM=V1-Vdc;
53
Vacm=V2-Vdc;
54
idc=Vdc/Rdc;
55
iacm=(exp(-T*(1-d)/tau)*(VacM-Vacm)-exp(-T/tau)*VacM+Vacm)/(R*(1-exp(-T/tau)));
56
iacM=(exp(-d*T/tau)*(Vacm-VacM)-exp(-T/tau)*Vacm+VacM)/(R*(1-exp(-T/tau)));
57
58
i1=0.*t1;
%dode tijd
59
i2=idc+(iacm-VacM/R).*exp(-(t2-t1(length(t1)))/tau)+VacM/R;
%exp rise
60
i3=idc+(iacM-Vacm/R).*exp(-(t3-t2(length(t2)))/tau)+Vacm/R;
%exp ...
decline
61
i4=0.*t4;
%eind dode tijd
62
63
ians=[i1 i2 i3 i4];
64
iripple=max(i2)-min(i3); %Amplitude of ripple current
65
end
1
function [ians iripple]=Isimulation_LCR_Frq(f,x,v,t,Rdc,nh)
2
%create exponential current, based upon V-vector and time-vector;
3
%R,L-values from LCR measurements; Using calculations in freq-domain to ...
calculate i; Only valid for duty ratio 50%
4
V1=max(v);
5
V2=min(v);
6
Vgem=(V1+V2)/2;
7
pos=x;
8
102
Appendix E. Matlab code, FG measurements
9
%% Search the PWM period
10
nv=length(v);
11
tru=[]; %trigger points up
12
trd=[]; %trigger point down
13
itru=1;itrd=1;vold=v(1);
14
for it=2:nv
if(v(it)>Vgem)&&(vold<Vgem) %detect positive PWM-flank
15
16
tru(itru)=it;
17
itru=itru+1;
18
end
19
if(v(it)<Vgem)&&(vold>Vgem) %detect negative PWM-flank
20
trd(itrd)=it;
21
itrd=itrd+1;
22
end
23
vold=v(it);
24
end
25
T=(t(tru(2))-t(tru(1))+t(trd(2))-t(trd(1)))/2; %Calculate PWM period
26
f=1/T;
27
28
t1=t(1:tru(1)-1); %time untill first pulse
29
if(trd(1)>tru(1))
%if first up, then down
30
t2=t(tru(1):trd(1)-1);
31
t3=t(trd(1):tru(2)-1);
32
t4=t(tru(2):length(t));
33
Vper1=v(tru(1):trd(1)-1);
34
Vper2=v(trd(1):tru(2)-1);
35
else
%first down, then up
36
t2=t(tru(1):trd(2)-1);
37
t3=t(trd(2):tru(2)-1);
38
t4=t(tru(2):length(t));
39
Vper1=v(tru(1):trd(2)-1);
40
Vper2=v(trd(2):tru(2)-1);
41
end
42
43
d=length(t2)/(length(t2)+length(t3)); %duty ratio
44
if (d>0.55)&&(d<0.45)
45
%disp('error, duty ratio
46
error('duty ratio
47
6=
6=
50%')
50%')
end
48
49
Vper=[Vper1 Vper2];
103
Appendix E. Matlab code, FG measurements
50
Vdc=trapz(Vper)/length(Vper);
51
VacM=V1-Vdc;Vacm=V2-Vdc;
52
Vac=(VacM-Vacm)/2;
53
idc=Vdc/Rdc;
54
55
nmax=length([t2 t3]);
56
i=zeros(nh,nmax);
57
hmax=zeros(nh,1);
58
phi=zeros(nh,1);
59
tphi=zeros(nh,1);
60
I=zeros(nh,1);
61
for it=1:nh
62
h=2*it-1;
63
[I(it) phi(it) hmax(it)]=Ifreq(Vac,f,pos,h);
64
i(it,:)=I(it)*sin(2*pi*f*h*[t2 t3]-phi(it));
65
tphi(it)=phi(it)*(2*pi*f*h);
66
end
67
itot=sum(i,1);
68
69
i1=0.*t1;
70
i2=itot+idc;
71
i3=0.*t3;
%dode tijd
%eind dode tijd
72
73
ians=[i1 i2 i3];
74
itotf=filter([1 1],2,itot); %Filter the peaks at corners
75
iripple=max(itotf)-min(itotf); %Amplitude of ripple current
76
end
1
function [I,phi,hmax] = Ifreq(V,f,x,h)
2
%calculates i response on v=V*sin(2*pi*f*t), f is the ground frequency, h
%is the harmonic number
3
4
5
%Get R and L
6
7
if f*h<5000 %5000 Hz is the max frequency for which 2D lookup table ...
makes sense
8
pos=x;
9
assignin('base','pos',pos)
10
assignin('base','freq',f*h)
104
Appendix E. Matlab code, FG measurements
11
L=evalin('base','interp2(ri,fi,Li,pos,freq)/1000');
12
R=evalin('base','interp2(ri,fi,Ri,pos,freq)');
13
hmax=0;
14
else
15
pos=x;
16
assignin('base','pos',pos)
17
assignin('base','freq',5000)
18
L=evalin('base','interp2(ri,fi,Li,pos,freq)/1000');
19
R=evalin('base','interp2(ri,fi,Ri,pos,freq)');
20
hmax=1;
21
end
22
23
24
%Calculate I and phi
25
I=4/pi*1/h*V/sqrt(R^2+(2*pi*h*f)^2*L^2);
26
phi=atan(2*pi*h*f*L/R);
27
28
29
end
105
Appendix F
Python code, FEM simulations
1
import pythonlab
2
import pylab as pl
3
from math import pi
4
5
# variables
6
r1 = 0
7
l = 0.0075
8
rtot=0.0028
9
10
dr=0.0002
11
istart=0
12
N=int(round(rtot/dr)) #number of position increments
13
14
Ssp=1.6e-4
#Surface coil
15
nt=972
#number of windings
16
ncu=35
#number of modelled "windings"
17
I=0.3
18
v=0
19
kr=1;
20
kL=1;
21
kp=1;
22
kpe=1;
23
kpe_a=1;
24
ky_a=1e7;
25
ky=1e5;
26
f=500
#permeability factor
#conductivity
106
Appendix F. Python code, FEM simulations
27
28
# problem
29
problem = a2d.problem(clear = True)
30
problem.coordinate_type = "axisymmetric"
31
problem.mesh_type = "gmsh_triangle"
32
problem.frequency = f
33
34
# fields
35
# magnetic
36
37
## Complete description of solver, summarized in section Simulation ...
Parameters
38
39
# boundaries
40
magnetic.add_boundary("A0", "magnetic_potential", ...
{"magnetic_potential_real" : 0, "magnetic_potential_imag" : 0})
41
42
43
# materials
44
45
46
## Complete description of used materials, omitted because irrelevant
47
48
# geometry
49
50
## Complete description of geometry, omitted because irrelevant
51
52
# calculation of Inductance
53
r = []
54
L = []
55
Fl= []
56
57
Header = ["I:", str(I), " A, Kpea:", str(kpe_a), ", Kpe:", str(kpe), ", ...
f:", str(f), ", y_a=", str(ky_a), ", y=", str(ky), ";"]
58
Le= [" Inductance [mH] ; "]
59
Ag= [" Position [mm] ; "]
60
Fluxe= [" Central flux; "]
61
print("Fl = f(r) (F):")
62
for i in range(N):
63
64
if i > 0:
geometry.select_edges([22, 20, 7, 21])
107
#Move pilot over dr
Appendix F. Python code, FEM simulations
65
geometry.move_selection(0, dr, False)
66
geometry.select_labels([1])
67
geometry.move_selection(0, dr, False)
68
69
if i
≥
istart:
70
problem.solve()
71
result1 = magnetic.local_values(0.007, 0.04) #Result at the ...
coil (rechtsboven)
result2 = magnetic.local_values(0, 0.04)
72
#Result in the center
73
74
Fluxnu=(result1["Ar"]-result2["Ar"])*0.007*2*pi
75
Lnu=Fluxnu/I*1e3
76
r.append(r1 + (i*dr))
#displacement
77
Fl.append(Fluxnu)
#flux
78
L.append(Lnu)
79
80
#Lists to print to excel
81
Le.append(str(Lnu))
82
Le.append(" ; ")
83
Fluxe.append(str(Fluxnu))
84
Fluxe.append(" ; ")
85
Ag.append(str((rtot-i*dr)*1e3))
86
Ag.append(" ; ")
87
print(r[-1], L[-1])
88
89
# chart
90
pl.close()
91
pl.plot(r, Fl)
92
pl.grid(True)
93
pl.xlabel("r (m)")
94
pl.ylabel("Fl (Wb)")
95
fn_chart = pythonlab.tempname("png")
96
pl.savefig(fn_chart, dpi=60)
97
pl.close()
98
99
100
# show in console
pythonlab.image(fn_chart)
101
102
#Write to excel
103
Headerx= ''.join(Header)
104
Lex = ''.join(Le)
108
Appendix F. Python code, FEM simulations
105
Fluxex= ''.join(Fluxe)
106
Flux_rex= ''.join(Flux_re)
107
Agex= ''.join(Ag)
108
Pep_lex= ''.join(Pep_le)
109
Pep_mex= ''.join(Pep_me)
110
Pep_rex= ''.join(Pep_re)
111
Pesex= ''.join(Pese)
112
Peuex= ''.join(Peue)
113
114
Excel= [] #string to excel
115
Excel.append(Headerx)
116
Excel.append( "\n")
117
Excel.append(Lex)
118
Excel.append( "\n")
119
Excel.append(Fluxex)
120
Excel.append( "\n")
121
Excel.append(Flux_rex)
122
Excel.append( "\n")
123
Excel.append(Agex)
124
Excel.append( "\n")
125
Excel.append(Pep_lex)
126
Excel.append( "\n")
127
Excel.append(Pep_mex)
128
Excel.append( "\n")
129
Excel.append(Pep_rex)
130
Excel.append( "\n")
131
Excel.append(Pesex)
132
Excel.append( "\n")
133
Excel.append(Peuex)
134
Ex = ''.join(Excel)
135
136
f = open('TestLe.csv','w')
137
f.write(Ex)
138
f.close()
109