You are on page 1of 82

POLITECNICO DI TORINO

III Facolt`a di Ingegneria dellInformazione


Corso di Laurea in Ingegneria Meccatronica

Tesi di Laurea Magistrale

Controllo del processo di elettroerosione


Nuove strategie di controllo del processo di elettroerosione a tuffo

Relatore:
prof. Marcello Chiaberge
Candidato:
Ivan Furlan

Gennaio 2009

Summary
The objective of this thesis is to find new strategies in order to better control the gap
distance between the electrode and workpiece in electro-discharge machining (EDM).
In order to reach this objective a model for simulating the EDM process was necessary. The model has been extracted from the literature and relative techniques for the
identification has been created.
The cyclic behavior of the EDM process has been exploited in order to reduce the
influence of the stochastic part of the process on the gap behavior with the application
of a new control technique based on the Iterative Learning Control (ILC). The relative
design procedure of the new control technique have been developed.
The best results have been obtained with a combination of the ILC with a recursive
least-square (RLS). With this techniques a smooth behavior of the gap distance and a
regular forward movement have been obtained. The control method that performs the
best simulation results is in the phase of implementation.

Acknowledgements
I would like to express my gratitude:
To the AGIE Charmilies Group, in particular to Dr. Ivano Beltrami, Ing. Marco
Boccadoro, Ing. Marco Baumeler and Ing. Walter Dal Bo, for their precious collaboration and instruction on the base of the Electro Erosion Machining.
To the professors of the Politecnico of Torino, my supervisor Marcello Chiaberge
and Basilio Bona for their continued support and guidance.
To professor Dr. Silvano Balemi of the SUPSI, who gave my the great opportunity
to complete my Master degree and not sacrifice my responsibilities at work.
To my family and my finance. Their unconditional love and support gave me the
strength to continue and look forward to a bright future.
Thank you!

Contents
Summary

Acknowledgements

III

1 Introduction
1.1 What is the Electro-Discharge Machining process? .
1.2 EDM processing applications . . . . . . . . . . . . .
1.3 History of the EDM process . . . . . . . . . . . . . .
1.3.1 Origins of Die-Sinking EDM in the USSR . .
1.3.2 Origins of Die-Sinking EDM in the USA . . .
1.3.3 Origins of Die Wire-cut EDM . . . . . . . . .
1.4 The state of the art of the gap control of Die-sinking
1.5 Objective . . . . . . . . . . . . . . . . . . . . . . . .
1.6 Preview of chapters . . . . . . . . . . . . . . . . . . .

. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
EDM
. . . .
. . . .

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

1
1
1
2
2
2
3
3
4
4

2 EDM best practices and limitations


2.1 The process . . . . . . . . . . . . . . . . . . . .
2.1.1 The EDM machine . . . . . . . . . . . .
2.1.2 Principle . . . . . . . . . . . . . . . . .
2.2 Cyclic behavior of the EDM process . . . . . .
2.3 The process signals . . . . . . . . . . . . . . . .
2.3.1 EDM current and voltage signals . . . .
2.3.2 EDM Input/Output signals . . . . . . .
2.4 The control of the EDM . . . . . . . . . . . . .
2.4.1 Actuation . . . . . . . . . . . . . . . . .
2.4.2 Gap distance measurement . . . . . . .
2.4.3 Current gap control law . . . . . . . . .
2.5 Limitations of the current EDM control system

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

5
5
5
6
7
9
9
9
11
11
11
11
12

3 EDM process modeling


3.1 Mathematical model of the gap . . . . . . . . . . .
3.1.1 Deterministic component of the variable td
3.1.2 Stochastic component of variable td . . . .
3.1.3 Contamination V of the gap . . . . . . . . .

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

15
15
15
16
17

.
.
.
.
.
.
.
.
.
.
.
.

3.2

3.3

3.1.4 Material removal . . . . . . . . . . . . . . . . .


3.1.5 Complete gap model . . . . . . . . . . . . . . .
Mathematical model of the z-axis . . . . . . . . . . . .
3.2.1 Dynamics of the z-axis . . . . . . . . . . . . . .
3.2.2 Discrete-time z-axis controller . . . . . . . . . .
3.2.3 Closed-loop discrete-time model of the axis . .
3.2.4 Generation of the signal zref from the controller
Block diagram of the EDM process . . . . . . . . . . .

. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
actuation signal
. . . . . . . . . . .

4 EDM system identification


4.1 EDM process configuration and measurements . . . . .
4.2 Identification of the mathematical model of the Gap . .
4.2.1 Average of the measurements . . . . . . . . . . .
4.2.2 Average removal V and forward moving speeds z

4.3
4.4

4.2.3 Volume of removed material during an effective


4.2.4 Deterministic component of the process model
4.2.5 Stochastic component of the process model . .
Identification of the z-axis dynamics . . . . . . . . . .
Comparison between simulation and real behavior . .

18
19
19
19
21
21
22
22

23
. . . . . . . . . . . 23
. . . . . . . . . . . 24
. . . . . . . . . . . 24

. . . . . . .
discharge V
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .

. .
.
. .
. .
. .
. .

.
.
.
.
.
.

5 New control strategy for EDM


5.1 Iterative Learning Control (ILC) of the ionization time . . . . . . . . . . .
5.1.1 Basis of the ILC algorithm . . . . . . . . . . . . . . . . . . . . . .
5.1.2 Adopted notation for EDM . . . . . . . . . . . . . . . . . . . . . .
5.1.3 Linearization of the gap model . . . . . . . . . . . . . . . . . . . .
5.1.4 ILC control of the ionization time td . . . . . . . . . . . . . . . . .
5.1.5 ILC controller with Q a low-pass filter . . . . . . . . . . . . . . . .
5.1.6 ILC controller using a least-square optimization . . . . . . . . . . .
5.1.7 Determination of the matrix representing the least-square minimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.2 Choice of the new control strategy . . . . . . . . . . . . . . . . . . . . . .
6 Implementation
6.1 Scaling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.2 Multiplication of a signal with a constant in fixed-point arithmetics
6.2.1 Multiplication algorithm . . . . . . . . . . . . . . . . . . . .
6.2.2 Noise-shaping . . . . . . . . . . . . . . . . . . . . . . . . . .
6.2.3 Measurements on the real EDM process of the Variant-1 . .
7 Conclusions

.
.
.
.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
.

24
25
26
27
29
30

.
.
.
.
.
.
.

33
33
33
35
36
40
42
47

. 48
. 62

.
.
.
.
.

63
63
63
63
64
64
67

A Some mathematical proofs


A.1 Log-Gaussian pdf from the formula (3.3) . . . . . . . . . . . . . . . . . . . .
A.2 Linear-least square . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A.3 Recursive Least Square (RLS) . . . . . . . . . . . . . . . . . . . . . . . . . .

69
69
70
71

Bibliography

73

Chapter 1

Introduction
In this chapter the basic idea, the history and the state of the art of Electro-Discharge
Machining (EDM) is presented.

1.1

What is the Electro-Discharge Machining process?

Electrical-discharge machining is a process which uses a controlled electrical spark to


erode conductive materials. A series of electrical discharges takes place between the two
conductors separated from each other by a film of non-conducting liquid, called a dielectric.
After the spark the eroded material solidifies again in the dielectric in the form of microsized spheres.

1.2

EDM processing applications

EDM processing presents the followings advantages with respect to traditional machining
processes
EDM allows for cutting complex shapes and thin walled configurations without distortions.
EDM is very suitable for materials which are considered too hard or where adhesion is
a problem for traditional machining or for materials typically machined by grinding.
Some material examples include: Tungsten Carbide, Stellite, Hastelloy, Nitralloy,
Waspaloy, Nimonic, Inconel.
EDM can replace many types of contour grinding operations and eliminate secondary
operations such as deburring and polishing. The danger of scrapping a complex or
expensive part because of tool breakage is eliminated. It is ideal for machining dies,
tools and molds.
EDM is a no-contact and no-force process well suited for making delicate or fragile
parts that cannot bear the stress of traditional machining.
1

1 Introduction

1.3
1.3.1

History of the EDM process


Origins of Die-Sinking EDM in the USSR

The sinker EDM technology was invented accidentally by the soviet Moscow university
professors Dr. Boris Lazarenko and Dr. Natalya Lazarenko in the year 1943 while studying
the wear of electrical contact materials in automotive-engine distributor-breaker points.
As part of their experiments, the Lazarenkos immersed the breaker points in oil. They
observed that, while the oil did not eliminate the sparking, it did create more uniform and
predictable sparking.
The Lazarenkos experiments were not successful because they did not develop a means
for extending the life of the automotive breaker points due to sparking but from this
experiments the idea originated to use the destructive effect of electro-discharge for manufacturing conductive materials.
In 1943 the Lazarenkos developed a spark-machining process with an electrical circuit
show in figure 1.1 that used many of the same components used in an automotive ignition
system. This process became one of the standard EDM systems in use throughout the
world. Since the Lazarenko EDM system used resistors and capacitors, it became known
as resistor-capacitor (RC) circuit for EDM. Such EDM machines are still produced and
used for producing fine surfaces and for drilling precise orifices.

R
Electrode (toll)
'$

Applied
&%
?DC voltage

Figure 1.1.

1.3.2

Sparking gap

Workpiece

Lazarenko RC circuit

Origins of Die-Sinking EDM in the USA

At the same time when Lazarenko began his experiments a company producing hydraulic
valves in the USA place of the need for a machine to remove taps and drills broken within
the body valve during production. In order to solve this problem the company assigned
a research project to three employees Harold Stark, Victor Harding and Jack Beaver.
Harding, an electrical engineering, had the idea to use sparks for to eroding the taps and
the drills from the valve bodies.
Stark, Harding and Beaver patented their system. They left the valve company and
started the development of the vacuum-tube EDM machines and a electronic circuit servo
2

1.4 The state of the art of the gap control of Die-sinking EDM

system for automatically maintaining the proper electrode to workpiece sparking gap (figure 1.2). The vacuum tube made it possible to rise the sparking frequency from 60 Hz to
1000 Hz.
c
c
"
"

Eletcromagnet

Electrode (toll)
'$

Applied
AC voltage

&%
?

Figure 1.2.

1.3.3

Sparking gap
Workpiece

Stark-Harding-Beaver circuit

Origins of Die Wire-cut EDM

Another type of machines is Die Wire-cut type EDM machines. The period when the
process was born ranges from the 1960ies to the 1970ies. The origin idea of Wire-cut
EDM was born when the developers started to look after methods for replacing the
machined electrodes whose production is expensive and labor intensive. In a first solution
a static wire was used as an electrode. The wear of the wire cause the wire rupture;thus
a continuously wire solved the problem. In the evolution of the wire-cut EDM, a relevant
event was numerical control (NC) which allowed accurate positioning of the wire with
respect of the workpiece.

1.4

The state of the art of the gap control of Die-sinking


EDM

EDM is a key technology in the sense that it machines workpieces without mechanical
stress, thus making it possible to create very small structures in the micrometer range.
Moreover, using EDM it is possible to machine many complicated shapes like thin slots,
curved holes, or microholes. Some of these machining tasks are impossible using conventional technologies, and even dedicated technologies (laser, electron beam machining,
micromilling, LIGA) cannot achieve the machining quality of EDM.
A limiting factor in the EDM machines currently on the market is the mechanical side,
with difficulties in controlling gaps of 10-15 micrometers (jitter of the electrode). There is
3

1 Introduction

a jitter of the electrode because the measurement from the process are perturbed from the
stochastic components of the EDM process and the actual control low of the gap distance
is not able to reject these disturbances. The jitter of the electrode causes a noticeable
degradation of the behavior of the EDM process causing long sequences of open circuits
(no sparks) or short-circuits (arcs) instead of sparks eroding the material.

1.5

Objective

This thesis aims to find new control strategies in order to obtain a good control of the gap,
i.e a smooth behavior of the electrode and at the same time a regular forward movement
of the z-axis.

1.6

Preview of chapters

Chapter 2
The chapter presents a typical EDM machine used for this thesis. The reference
system is introduced, and the EDM process behavior is explained. Finally, the EDM
best practices and limitations will be presented.
Chapter 3
In the chapter the EDM process is modeled. The corresponding block diagram will
be presented.
Chapter 4
In the chapter a method for identification of the EDM process is presented. All
parameters of the model are determined.
Chapter 5
In the chapter new methods for the gap control are proposed.
Chapter 6
In the chapter the implementation and the real measurements are presented and
analyzed.

Chapter 2

EDM best practices and


limitations
In this chapter the principle, the best practices and the current limitations of a typical
EDM system are presented.

2.1
2.1.1

The process
The EDM machine

The EDM machine used along the development of this thesis is shown in figure (2.1).

Figure 2.1.

EDM system of reference

2 EDM best practices and limitations

2.1.2

Principle

In the general case the electrode can be moved in the space with 6 degrees of freedom. Its
position must be described using 6 variables, 3 for the position p = [x(t),y(t),z(t)] and 3
for the orientation = [(t), (t), (t)]. The trajectory of the electrode is irrelevant for
this thesis. Then is possible, without loss of generality, to reduce the degree of freedom
of the electrode from 6 to 1. For simplicity, the choice of the degree of freedom is the
movement along the z axis with a fixed orientation. Then the position of the electrode
can be described by the variable z(t) as shown in figure 2.2.

Electrode (tool)

(t)
z(t)
zp (t)

Workpiece

Figure 2.2.

EDM basics

where
Symbol
z(t)
zp (t)
(t) = z(t) zp (t)
V (t)

Description
Position of the EDM electrode
Depth of the erosion
Distance between Electrode and workpiece (Gap)
Removed material (contamination)

Unit of measure
[m]
[m]
[m]
[m3 ]

The generation of the spark and the relative wear can be explained with the followings
6 steps
1. The tool is lowered while the gap distance (t) reaches the ideal value. Then a high
voltage is applied to the gap and a strong electrical field is applied between the tool
and the workpiece (figure 2.3, step 1).
2. The electrical field accelerates some particles with negative charge (electrons) which
generate an avalanche effect breaking the insulation of the dielectric. The result is
6

2.2 Cyclic behavior of the EDM process

a bridge of particles with negative charge (electrons) from the workpiece to the tool
(figure 2.3, step 2).
3. The impact of electrons with the dielectric molecules ionizes the dielectric. After
some time, called ionization time td , the dielectric is completely ionized and a plasma
channel is created (figure 2.3, step 3).
4. In the fluid a flow of ion starts flowing in the direction of the negative pole (the
workpiece). The ion flow builds up more slowly than the electron flow because the
ions are heavier than the electrons. The temperature of the workpiece and of the
electrode increases for the impact of the ions and electrons respectively and the
fusion process begins (figure 2.3, step 4)
5. The temperature of the plasma channel reaches the maximal values (8000-12000 C).
The vaporization process of the workpiece and the electrode material forms craters
on the two pieces (figure 2.3, step 5).
6. After a short time (milliseconds) the voltage applied to the gap is reset to 0V and the
spark is extinguished in order to avoid electrical arcs. The temperature decreases.
The channel of plasma implodes generating a dynamic action with the effect of
projecting residue of the fused material to the exterior of the crater.
The metal particles suspended in the fluid cause a so called contamination V of the
dielectric. (figure 2.3, step 6).
By convention, the polarity is called positive when the electrode (tool) is polarized
positively towards the workpiece, negative otherwise. For fine machining EDM can work
with inverse polarity of electrode and workpiece (negative electrode negative positive workpiece). In this configuration the electrons erode the workpiece. Because the electrons are
lighter than the ions, less material per unit of time is removed and smaller cavities can be
created than with the positive polarity.

2.2

Cyclic behavior of the EDM process

The process of erosion is executed according the following steps


1. The electrode is lowered and the gap (t) reaches the ideal sparking gap.
2. The gap distance controller maintains the ideal sparking gap distance during the
erosion process. Sparks are produced as explained in the previous chapter in the
subsection (2.1.2).
3. After a fixed number of sparks, or when the dielectric condition is unacceptable (high
contamination V ), a washing cycle (also called timer) is executed. The washing cycle
consists in rapidly moving the electrode away from the workpiece in order to refresh
the dielectric fluid in the gap. After the washing cycle the process restarts from
point 1.
7

2 EDM best practices and limitations

Electrode

Electrode

+
+
+
+
+

electron flow

electron flow

Electrode

Workpiece

Workpiece

Workpiece

step 1

step 2

step 3

Electrode

Electrode

Workpiece

Electrode
+
+ +
+ +
+ +

+ +
+ +
+ +
+ +

Workpiece

step 4

step 5

electron flow

ions flow

+
+
+
+
+

ions flow

electron flow

Plasma channel

V
Workpiece
step 6

Vaporized material

Figure 2.3.

Generation of the discharge and of the relative wear

2.3 The process signals

The cycle of three steps is executed at a frequency from 1 Hz to 4 Hz and is called erosion
cycle. In parallel to this process the machine can abort the pulse or the erosion cycle with
a washing cycle at any time if unwanted sparking conditions (short-circuits, open-circuits,
. . . ) are detected or predicted.
The electroerosion process is characterized by a sequence of erosion cycles and washing
cycles. An erosion cycles can be called iteration and an index j and the time index k can
be assigned as shown in figure (2.4), where index j N and k {0, . . . ,N 1}.

Washing
0

time [k]

N
-

Erosion cycle j

2.3.1

time [k]

N
-

Erosion cycle j+1

Figure 2.4.

2.3

Washing
0

time [k]

N
-

Erosion cycle j+2

Erosion and washing cycles

The process signals


EDM current and voltage signals

The voltage and current signals of the spark produced from an EDM are shown in figure (2.5) where
Symbol
u(t)
u
e
ue
i(t)
ie
ie
td
te
to
ti
tp

2.3.2

Description
Voltage applied to the Gap
Peak voltage applied on the gap
Mean discharge voltage
Current trough the Gap
Peak current trough the Gap
Mean discharge current trough the Gap
Ionization time
Time length of the current pulse
Time length of the pause
Time length of the current pulse plus ionization time
Total time length of the pulse

Unit of measure
[V]
[V]
[V]
[A]
[A]
[A]
[s]
[s]
[s]
[s]
[s]

EDM Input/Output signals

The input and output signals of the EDM process are shown in figure (2.6) where
9

2 EDM best practices and limitations

u(t) 6
ui
XXX

ue

XXX
XXX
XX

XXX

XX

i(t) 6

td

- -

te

ie

cmrmn.

ti

to

tp

Figure 2.5.

Typical voltage u(t) and current i(t) of the spark produced by EDM

ui

ti

- EDM process

Figure 2.6.

Symbol
ui
ie

td
z

td

-z

EDM proces input and outut signals

Description
Voltage applied to the Gap during ionization time
Desired discharge current trough the Gap
Desired speed of the z-axis
Ionization time Measurement
10
Position of the z-axis Measurement

Unit of measure
[V]
[A]
[m/s]
[s]
[m]

2.4 The control of the EDM

The machine can work in the following three modes


Isopause
The length of the pause to is maintained constant
Isopulse
The length of the current pulse te and of the pause to are maintained constant
Isofreq
The total length of the pulse tp is maintained constant
In this thesis only the Isopulse mode has been considered.

2.4

The control of the EDM

The main control objective of an EDM system controller is to control the gap size in order
to
Maximize the speed of the erosion.
Minimize the wear of the electrode.
Optimize the resulting roughness

2.4.1

Actuation

The gap and z axis (position of the electrode) are related with the equation (t) = z(t)
zp (t), then the gap dimension can be changed by moving the z-axis. In this thesis the
actuation signal of the z-axis is given in velocity and is denoted by the symbol .

2.4.2

Gap distance measurement

In order to control the gap size a measurement is necessary. Unfortunately it is impossible


to measure the gap directly because no sensor can be inserted between the electrode and
the workpiece. The Gap size is then inferred from other measurements, typically (as
considered in this thesis) from the ionization time td of the voltage pulse described in the
section (2.3.1). In fact the ionization time, as shown in the next chapter, depends on the
gap dimension.

2.4.3

Current gap control law

The current control strategy of the gap size is to use a proportional controller
= K (td ref td )
where
11

2 EDM best practices and limitations

Symbol
K

Description
Proportional controller gain
Actuation signal: desired speed of the z-axis

Unit of measure
[ sm2 ]
[ ms ]

The control loop of the ionization time is shown in figure (2.7).

td ref

ti

- EDM process

Gap

- controller

Figure 2.7.

2.5

ui

td

Control loop of the ionization time td

Limitations of the current EDM control system

The behavior of the gap is directly influenced by the electrode motion. Ideally, the
behavior of the z-axis (and then of the gap) must be smooth along the erosion cycles. In
reality, because of the disturbance that the actual gap position controller is not able to
reject, the z-axis behavior is perturbed as shown in figure 2.8. The erratic behavior of the
z-axis limits the performance of the EDM process in terms of
Erosion speed
Resulting roughness

12

2.5 Limitations of the current EDM control system

2.5

mean td

Erosion font

x 10

x 10

1.2
2

1
1.5

td [m]

z [m]

0.8
1

0.6

0.5
0.4

0.5

0.2

20

40

60

80

100
t [s]

120

140

160

180

200

20

40

60

Erosion and washing cycles

x 10

80

100
t [s]

120

140

160

180

200

Particular of the zaxis position

x 10

7
2

7.5

z [m]

z [m]

1.5

8.5
0.5

9
0
54.5

55

55.5

56
t [s]

56.5

57

57.5

58

147

147.2

147.4

147.6

147.8
t [s]

148

148.2

148.4

148.6

Figure 2.8. Behavior of the EDM process: z-axis behavior (upper left): forward movement
of the z-axis, averaged ionization time td (upper right), particular of the z-axis movement
(bottom left): washing cycles and erosion cycles, particular of the behavior of the z-axis
during the erosion cycles (bottom right): the movement of the z-axis is not smooth

13

2 EDM best practices and limitations

14

Chapter 3

EDM process modeling


The aim of this chapter is to present the mathematical model of the EDM process used
in this thesis.

3.1

Mathematical model of the gap

In this section the mathematical model of the Gap is introduced.

3.1.1

Deterministic component of the variable td

The influence of the dielectric contamination caused by machining debris has been analyzed
in [1]. Therein, it has been observed that the mean ignition delay td is
td (t) Aelectrode cconta (t) = f ((t))

(3.1)

where Aelectrode represents the surface of the electrode and cconta the concentration of the
contamination. Under the assumption that the concentration of the contamination cconta
is
V (t)
cconta (t) =
Aelectrode (t)
i.e. that the contamination is expressed as the ratio between eroded material volume and
gap volume, equation (3.1) can be rewritten as follows
td (t) =

(t) f ((t))
V (t)

An exponential relationship between the ignition delay td (t) and the gap size (t) has been
validated experimentally in [2]. Then
f ((t)) = k (t)n1
and
td (t) =

k (t)n
V (t)
15

(3.2)

3 EDM process modeling

3.1.2

Stochastic component of variable td

The ionization time td (t) does not depend only on the gap size (t) but also on many
other variables, i.e. position of the residual particles in the dielectric, ionization state of
the dielectric, temperature, etc.
The phenomenon is well represented considering the ionization time td (t) as a random
signal with mean value td and Weibull probability density function [2]


t k1 td k

k
d
ftd (td ) =
td 0
e

ftd (td ) =
0
td < 0
where the parameter k > 0 is called the shape parameter and > 0 is called the scale parameter. Given td and t2d , approximated formula for determining the Weibull probability
density function parameters are
td (t)

(t)

(ln(2)) k
v
!
u
2
u

t
d
k tln
+1
td (t)2

Although the Weibull probability density is motivated by physics (analogy between


breakdown and failure process), standard simulation software generally does not support
this type of random noise as an explicit function. In order to solve this problem the
following approximation [2] of the random Weibull signal
td (t) = td (t) eN (d ,0)
can be used. The signal N (d ,0) is a stochastic signal with gaussian distribution.
The probability distribution function of this approximation is
ftd (td ) =

fN (f 1 (td ))
df (f 1 (td ))
dx

q
e
td 2 d2

(ln(td )ln(td (t)))2


2 2
d

(3.3)

that is called log-Gaussian probability density function. In this type of function the
parameters d is related to the the random signal td (t) from the followings relations
v
!
u
2
u

t
d
d = tln
+1
td (t)2
In the appendices the derivation of the log-Gaussian probability density function from the
formula (3.3) is presented .
In the following example the log-Gaussian and the Weibull density function have been
compared.
Example 3.1 For a median ignition time td = 0.39s and a variance of the ignition time
t2d = 0.25s2 , the Weibull probability density function and its approximation shown in
figure (3.1) are obtaind.
16

3.1 Mathematical model of the gap

1
0.9
0.8

f(Td) [1/s]

0.7
0.6
0.5
0.4
0.3
0.2
0.1
0

Figure 3.1.

3.1.3

0.5

1
Td

1.5

Weibull density (continuous line) and its approximation (dashed line)

Contamination V of the gap

The literature [3] reports that , the quantity of the removed material (contamination) V (t)
is proportional to the energy E(t) dissipated during the discharges. Then
V (t) = E(t) + V0
where V0 is the initial contamination of the gap, is the proportional constant relating
energy dissipated into the gap with the removed material. The energy dissipated is the
time integral of the power in the gap P (t) = u(t) i(t) where u(t) and i(t) are the voltage
and current through the gap. Then
Z
V (t) =
0

P (t) dt + V0 =

u(t) i(t) dt + V0

Under the assumption of operation with the isopulse mode, the following conditions can
be stated
For values of the ionization time td (t) = 0 or td (t) te ,where te is the current pulse
length, the energy dissipated during the pulse, and thus the quantity of removed
material, is 0 (pulse without removal).
In the case when td (t) te the energy dissipated into the gap is 0 because machine
in this case the supervisor system of the EDM process interrupts the discharge
generation.
17

3 EDM process modeling

For values of the ionization time 0 < td (t) < te the energy dissipated during the
pulse, and then the quantity of removed material, is constant (pulse with removal).
The contamination at the k-th spark of the erosion cycle is
V (k) =

k
X

Z
0

i=0

where

tp

s(i)

u(t) i(t) dt + V0

(3.4)

s(i) = 0 td (i) = 0 td (i) > te


s(i) = 1 0 < td (i) te

is a signal for discriminating between good and bad pulses (s=1 pulse with removal, s=0
pulse without removal).
Equation (3.4) can be rewritten as follows
V (k) =

k
X

s(i) V + V0

(3.5)

i=0

where

tp

V =

u(t) i(t) dt
0

represents the volume of removed material during an effective discharge.

3.1.4

Material removal

The depth of the erosion is proportional to the contamination V . In the simplest case
where the electrode has a constant size geometry, see figure (2.2), the depth of the erosion
zp is an affine function of V
zp (k) =

V (k)
Aelectrode

V0
Aelectrode

+ zp 0

(3.6)

where Aelectrode is the surface of the electrode base and zp 0 is the initial value of zp at the
begin of the erosion cycle. Equation (3.5) with the expression fot zp (tp k) becomes
zp (k) =

k
X

s(i)

i=0

V
Aelectrode

+ zp 0

(3.7)

After each washing cycle (timer) the value of the variable zp 0 is set to the value that
zp has reached at the end of the previous iteration.
18

3.2 Mathematical model of the z-axis

3.1.5

Complete gap model

With equation (3.3) and with the substitution of equations (3.5) and (3.7) in the deterministic gap model (3.2), the following model of the gap is obtained
td (k) = td (k) eN (td ,0) =
where

(k)

= zp (k) z(k) =

V (k) =

with

Pk

i=0 s(i)

k (k)n N (t ,0)
d
e
V (k)

Pk

i=0 s(i)

V
Aelectrode

(3.8)

+ zp 0 z(tp k)

V + V0

s(i) = 0 td (i) = 0 td (i) > te


s(i) = 1 0 < td (i) te

After each washing cycle (timer) the value of the variable zp 0 is set to the value that zp
has reached at the end of the previous iteration.

3.2

Mathematical model of the z-axis

The z-axis position is controlled in closed-loop as shown in figure (3.2), where


Symbol
Zref (z)
Z(z)
F (z)
C(z)
G(z)

Description
Desired position of the z-axis
Measured position of the z-axis
Applied force
Controller of the position (PD)
Discrete-time model of the z-axis

Zref (z)-+e E(z) C(z)


6-

F (z) -

G(z)

Unit of measure
[m]
[m]
[N]
[-]
[-]

Z(z)

Figure 3.2. z-axis in closed-loop

3.2.1

Dynamics of the z-axis

The physical model of the mechanical part of the EDM axis is representable as in figure (3.3). From the second Newton law the following ordinary differential equation is
obtained
m z(t) = f (t) c z(t)

19

3 EDM process modeling

Moving mass (electrode + z-axis)


Q

Q
s
Q

f (t)
m

c z(t)

z(t)
Workpiece
H

Figure 3.3.

HH
j

Model of the mechanical system

20

3.2 Mathematical model of the z-axis

where
Symbol
z(t)
m
c
f

Description
Position of the z-axis
Mass of the axis
Viscous damping coefficient
Applied force

Unit of measure
[m]
[Kg]
[N s/m]
[N ]

The corresponding transfer function of the system is


G(s) =
or in discrete-time

G(z) =

3.2.2

m
c2

e m Ts 1 +

Z(s)
1
=
2
F (s)
ms +cs

e m Ts 1

c
c
z 2 1 + e m Ts z + e m Ts
Ts
c

z+

m
c2

(3.9)

Ts
c

e m Ts

(3.10)

Discrete-time z-axis controller

The control law of the PD position controller C(z) is


C(z) =

F (z)
E(z)

1 z 1
= Kp + Kd
Ts

K
Kd
Kp + Ts z Tsp
=
z

3.2.3

(3.11)
(3.12)
(3.13)

Closed-loop discrete-time model of the axis

The equation of the equivalent z-axis discrete-time system (3.10) and the equation of the
z-axis controller (3.13), the closed-loop transfer-function is representable by the following
third order low-pass filter transfer function.
GCL (z) =
=
=

Z(z)
Zref (z)
C(z) G(z)
1 + C(z) G(z)
ACL z 2 + BCL z + CCL
z 3 + DCL z 2 + ECL z + FCL
21

(3.14)
(3.15)
(3.16)

3 EDM process modeling

3.2.4

Generation of the signal zref from the controller actuation signal

The reference signal at the input of the closed-loop (3.2) is not directly the actuation signal
determined from the controller . In fact the actuation signal is a velocity.The signal is
converted in a position thought an integration. Moreover, in the current EDM process,
the z-axis is moved relatively to the last position point of the z-axis before the last washing
cycle plus a offset called F loat.
The signal zref can be expressed in function of the controller actuation signal as
follows
k
X
zref =
(3.17)
(k) Ts + z0 + F loat
0

where z0 represents the z-axis position at the end of the previous iteration.

3.3

Block diagram of the EDM process

In order to represent the complete model of the EDM process, the mathematical models
presented in the previous section are connected as in figure (3.4).

z-

z-axis

Gap

td -

model

EDM process

Figure 3.4.

Blocks diagram of the EDM process

22

Chapter 4

EDM system identification


The aim of this chapter is to identify the parameters of the mathematical model of the
process.

4.1

EDM process configuration and measurements

The most important configuration parameters, from the identification point of view, are
summarized in the following table
Symbol
te
C
Aelectrode
0
Ts

Description
Time length of the pulse of current
Compression
Size of the electrode
Gap dimension at the begin of the erosion cycle
Sampling time

Value
154 106
20
3.53 104
125 106
1 103

Unit of measure
[s]
[-]
[m2 ]
[m]
[s]

The compression C it is the representation of the reference ionization time tdref on the
current EDM process. The relation between compression and reference ionization time is
the following
C
= 92.4 106 s
td ref = 1
50
A complete list of the configuration parameters can be found in the appendices.
The available measurement are
Symbol
z
td
Ntotal
Ngood

Description
Position of the z-axis
Mean of the ionization time in the k-1 sampling time Ts
Total number of electrical spark
Number of electrical spark with removal different to 0
23

Unit of measure
[m]
[s]
[-]
[-]

4 EDM system identification

4.2
4.2.1

Identification of the mathematical model of the Gap


Average of the measurements

In order to increase the signal-to-noise ratio, the averages of the z and td signals have been
used for this part of the model identification. The average of the signals are indicated with
the symbols z and td and are obtained from the average of a large number of iterations j.

4.2.2

Average removal V and forward moving speeds z

In this section a relation between the average removal speed V and available the measurements is searched for.
From equation (3.6), the average erosion speed zp is the following function of average
removal speed V .
V
zp =
Aelectrode
Taking in consideration that the gap dimension is stationary along the erosion cycles, the
following equation can be written
z = zp
obtaining
V = z Aelectrode

(4.1)

The average of the z-axis speed z can be estimated starting from assuming that the
average position z of the electrode is
z(Ts k) = z Ts k + b
With the available measurements the following over-determined linear system of equations
can be written
yn1 = N 2 21 + N 1
with

z(0)
0
1

..
..
y = ... =
.
.
z(N )
N Ts 1
=

z b

0 . . . N

where are the parameters of the affine function that describe the z-axis average forward
movement and is a perturbation given by the disturbance (measurement noise, model
uncertain). In order to find the estimate of the unknown parameter , a linear leastsquare optimization, described in the proposition (A.2), can be applied.
" #
z
= + y
b
24

4.2 Identification of the mathematical model of the Gap

In the considered case the forward movement of the z-axis is shown in figure (4.1).
With this data the least-square optimization give
z =

V
Aelectrode

= 7.0810 107

m
s

then for the equation 4.1 V is


m3
V = Aelectrode z = 7.5190 1012
s

zaxis position
0.2965

0.2965

0.2965

0.2965

z [m]

0.2965

0.2966

0.2966

0.2966

0.2966

0.2966

50

100

150

t [s]

Figure 4.1. Forward movement and resulting interpolated straight z(Ts k) =


z Ts k + b (white line)

4.2.3

Volume of removed material during an effective discharge V

After N sparks,for the equation (3.5), the average removal speed V is in relation with the
volume of removed material during an effective discharge V as follow
N
X

s(i) V + V0 = V tp N + V0

i=0

and then

N
V = V tp PN

i=0 s(i)

25

= 2.1452 1015 m3

4 EDM system identification

4.2.4

Deterministic component of the process model

In this section is presented the procedure in order to obtain the unknown values of kdelta
and n. The substitution of the average signals z(k) and td (k) in to the deterministic
component of the gap model (3.8) under the assumption
zp (k) = z Ts k + 0
V (k) = V T k + V
s

gives
td (k) =

k (z k + 0 z(k))n
V Ts k + V0

(4.2)

The average signals z(k) and td (k) are shown in figure (4.2). The signals are considered
between the limits indicated on the figure. Between this two limits the system can be
considered stationary and all made assumption are valid these.
6

Mean of the zaxis position during the erosion period

x 10

z [m]

0
5
10
15
20

0.05

0.1

0.15

1.6

0.2

0.25
t [s]

0.3

0.35

0.4

0.45

0.35

0.4

0.45

Mean of the ionization time

x 10

td [s]

1.4
1.2
1
0.8
0.6

0.05

0.1

0.15

0.2

0.25
t [s]

0.3

Figure 4.2. Average of the erosion cycle used for parametric identification of the deterministic component of the gap model

With logarithmic operations on the equation (4.2) the following relation has been
obtained

log td (k) V Ts k0 + V0
= log (k ) + n log z Ts k + 0 z(k))
26

4.2 Identification of the mathematical model of the Gap

With z(k) and td (k) the following over-determined linear system of equations can be
written
yn1 = n2 21 + n1
with


log td (k0 ) V Ts k0 + V0

..


.
log td (kn ) V Ts kn + V0

1 log z Ts k0 + 0 z(k0 ))

..
..

.
.


1 log z Ts kn + 0 z(kn ))

T
log (k ) n
=

T
0 . . . n
=

where is the vector of the model parameters and is a perturbation given bv the
disturbance (measurement noise, model uncertain).
In order to find the estimate of the unknown parameter vector , a linear least-square
optimization, described in the proposition (A.2), can be applied.

log (k )
= + y(V0 )
n
(V0 )
The same is repeated for different values of V0 . Then the optimal parameters (log (k (V0 )),
n(V0 ))are
T
T
those minimizing the cost function J(V0 ) = = (y (V0 ))) (y (V0 )). An
example is reported in figure (4.3). The relative parameters of the gap model are n = 2.86
3
and k = 2.2728 104 sm
mn
The result of the interpolated function superposed on the real measurements are shown
in figure (4.4).

4.2.5

Stochastic component of the process model

In this section is presented the procedure in order to obtain the unknown


With td (t) assumed to be constant, the probability density function
component of td (3.3) becomes

(ln(td )ln(td (t)))2

2 2
1
d
ftd (td ) =
e
+ a (td te ) td
td 2d2

ftd (td ) = 0
td
where
Z

a=
te

td

1
2 d2

(ln(td )ln(td (t)))2


2 2
d

27

1
dtd = erfc
2

value of d .
of the random

[0,te ]
6 [0,te ]

ln(td ref ) ln(td (t))

2 d

4 EDM system identification

0.8

0.75

e2

0.7

0.65

0.6

0.55

0.5
0

0.5

1.5
V0

2.5
9

x 10

Figure 4.3.

Cost function of V0

9.13

9.11
9.1
log() []

log(td.*(time*beta+V0)) []

31.3
31.4
31.5
31.6
31.7
31.8
31.9
32
9.15

9.14

9.12

9.09

9.08

9.07

9.06

10

x 10

td [s]

9.5
9
8.5
8
7.5

0.05

0.1

0.15

0.2

0.25

0.3

0.35

t [s]

Figure 4.4. Mean of the measured ionization time td (continuous line) and result
of the interpolation (circles)

and the 2 momentum is


2 [td (d )] = E[td 2 ]
28

4.3 Identification of the z-axis dynamics

Z
=

td 2 ftd (td ) dtd

td ref

(ln(td )ln(td (t)))2


2

2
d
e
td q
dtd + td ref 2 a
0
2 d2
!
!

2
ln(td ref ) ln(td (t)) 2 d2
(t))
e2(ln(td (t))d )
1
ln(t
)

ln(t
d
d ref

+ td ref 2 erfc
erf
2
2
2 d
2 d

In order to obtain an estimation of the unknown value d , the value of the following
cost-function has been determined for different values of d . The results are shown in
figure (4.5).
J(d ) = (2 (td (Ts k)) 2 [td (d )])2
The best value of d is the value that minimize the cost function J(d ) and is d = 11.482,
20

x 10
10
9
8
7

e2

6
5
4
3
2
1
0
4

10

12

14

2d

Figure 4.5. Cost function of d

this value the second momentum u2 of the simulated noise is equal to the momentum u2
of the measured noise.

4.3

Identification of the z-axis dynamics

In order to identify the z-axis dynamics (3.16), a periodic white noise has been used as
input signal. The system is then identified with non-parametric (spectrum) and parametric methods (n4sid). Figure 4.6 shows the two frequency responses of the parametric
29

4 EDM system identification

identification and of the non parametric identification. The difference between the two
results is very small.
1

10

|Z(jw)|/|Zref(jw)| []

10

10

10

10

10

10
f [Hz]

10

10

Figure 4.6. Superposition of the resulting Bode diagram from the non parametric identification (continuous line) and parametric identification (dashed line)

4.4

Comparison between simulation and real behavior

Figures (4.7) compares the measurements of the EDM process with a simulated on the
model just presented. Then is possible to conclude the the model describe well the real
behavior of the EDM process.

30

4.4 Comparison between simulation and real behavior

Erosion font

x 10

Erosion font

x 10

0
2
2
4

z [m]

z [m]

4
6

6
8
8
10
10

12

14

12

20

40

60

80
t [s]

100

120

140

14

160

mean td

x 10

20

40

60

80
t [s]

0.8

0.8

140

160

100

120

140

160

td [m]

td [m]

1.2

120

mean td

x 10

1.2

100

0.6

0.6

0.4

0.4

0.2

0.2

20

40

60

80
t [s]

100

120

140

160

20
4

Particular of the zaxis position

x 10

40

60

80
t [s]

Particular of the zaxis position

x 10
0.8

2.5

0.85

0.9
3
0.95

z [m]

z [m]

3.5

1.05

1.1
4.5
1.15

1.2

1.25
48

48.2

48.4

48.6

48.8

49

49.2

49.4

49.6

t [s]

155

155.5

156

156.5

t [s]

Figure 4.7. Real behavior (left column) and simulated behavior (right column) of the EDM
process controlled by a proportional controller.

31

4 EDM system identification

32

Chapter 5

New control strategy for EDM


In general, current control methods for the working gap distance are based on the principle
that a desired signal (e.g. the desired ionization time) is compared to a current signal
(e.g. the current ionization time) to a produce a signal for actuating the z-axis (e.g. a
reference speed signal). With this kind of approach, even if the same operation is performed
repeatedly and under same operating condition, the valuable information incorporated in
the tracking error of each repetition gets lost.
In order to increase the performance of the EDM process, a new control strategy for
the gap distance control based on the application of the Iterative Learning Control (ILC)
is proposed. This kind of algorithm exploits not only the current process control outputs
but also considers the input and output values of previous cycles.

5.1

Iterative Learning Control (ILC) of the ionization time

ILC is based on the notion that the performance of a system that executes the same task
multiple times can be improved by learning from previous executions (iterations).
For instance, a basketball player shooting a throw from a fixed position can improve his
or her ability by practicing the shot repeatedly. During each shot, the basketball player
observes the trajectory of the ball and consciously plans an alteration in the shooting
motion for the next attempt. As the player continues to practice, the correct motion is
learned and becomes ingrained into the muscle memory so that the shooting accuracy
is iteratively improved. The converged muscle motion profile is an open-loop control
generated through repetition and learning. This type of learned open-loop control strategy
is the essence of ILC [4].

5.1.1

Basis of the ILC algorithm

Given is a static discrete-time process


y(k) = K(k) u(k)
33

5 New control strategy for EDM

Figure 5.1. A two-dimensional, first-order ILC system. At the end of each iteration, the
error is filtered through L, added to the previous control, and filtered again through Q. This
updated open-loop control is applied to the plant in the next iteration.

with K(k) > 0 and k {0, . . . ,N 1}, and a desired output trajectory yref (k). The output
trajectory must be repeated iteratively. Find the input signal, u(k), in order to minimize
the tracking error e(k) = yref (k) y(k).
An index j, with j N, is assigned to each iteration. The control signal of the
iteration is denoted by uj (k), the output of the system and the tracking error by yj (k)
and ej (k) = yref (k) yj (k).
The control signal can be learned iteratively by the following control scheme.
uj+1 (k) = f (uj , . . . ,u0 ,ej+1 ,ej , . . . ,e0 )
where
uj
ej

T
uj (0) uj (1) . . . uj (N 1)
=

T
ej (0) ej (1) . . . ej (N 1)
=

This means that the actuation signal at the sample k and iteration j + 1 can be function
of the values of the actuation signal and of the error signals u and e at any instant k and
at any iteration j, as shown in figure (5.1) [4].
Generally the class of controllers based on the above learning algorithm is named
Iterative Learning Control (ILC). With the forward time-shift operator q the widely
used ILC algorithm can be written as follows
uj+1 (k) = Q(q) (uj (k) + L(q) ej (k + d))

(5.1)

where the LTI dynamics Q(q) and L(q) are defined respectively as the Q-filter and learning
function and d is the delay of the system.
34

5.1 Iterative Learning Control (ILC) of the ionization time

5.1.2

Adopted notation for EDM

Remembering the definition of the index j and k represented in figure (2.4), the following
symbols can be defined
td ref, j (k)
tdj (k)
zj (k)
zp j (k)
zA, j (k)
j (k) = zj (k) zp j (k)
ej (k) = td ref, j (k) td j (k)
uj (k)
bV (k)

Desired ionization time


Ionization time
Trajectory of the z-axis
Depth of the erosion
Erosion profile
Distance between electrode and workpiece (Gap)
Control error
Actuation signal of the z-axis
Influence of the contamination V (k) on the linear model
of the gap (independent form j)

For the iterative nature of the process, the lifted-domain is the most convenient choice
for modeling the system. In this domain the signals are represented as follow
tdref,
td j
zj
zp j
zA,
j
ej
uj
bV

T
td ref, j (0) . . . td ref, j (k) . . . td ref, j (N 1)
=

T
t (0) . . . td j (k) . . . td j (N 1)
=
dj
T
z (d) . . . zj (k) . . . zj (N + d 1)
=
j
T
zp (d) . . . zp (k) . . . zp (N + d 1)
=

T
zA, j (d) . . . zA, j (k) . . . zA, j (N + d 1)
=

T
j (d) . . . j (k) . . . j (N + d 1)
=

T
ej (d) . . . ej (k) . . . ej (N + d 1)
=

T
uj (0) . . . uj (k) . . . uj (N 1)
=

T
bV (0) . . . bV (k) . . . bV (N 1)
=

In general in the lifted domain, the output y = [y(0),y(1), . . . ,y(N 1)] of a linear
system excited by an input signal u = [u(0),u(1), . . . ,u(N 1)] is determined by a multiplication of the input signal u with a Toeplitz matrix P
y =P u
For causal systems the matrix P is lower triangular, of

p0 0 . . . . . .

p1 . . . . . .

P = p2 . . . . . . . . .

.. . . . . . .
.
.
.
.
pN

...
35

p2

p1

the form

0
..
.

..
.

0
p0

5 New control strategy for EDM

where {p0 ,p2 , . . . ,pN 1 } are the first N samples of the impulse response of the system. In
order to set the initial state of the system at the value of the first sample of the input
signal, the matrix becomes

1
0
... ... 0

..
..
1 p0
.
p
.
0

. . . . ..
P = 1 p1 p0 p1
(5.2)
.
. .

..
..

.. ..
.
. 0
.
.
PN 1
1 i=0
pN 1 . . . p1 p0
The following vector and matrix are defined
[1]

[1, . . . ,1]T

0 ... 0 1

.. ..
[0 1] = ...
. .
0 ... 0 1

5.1.3

Linearization of the gap model

In order to simplify the controller design, a linear model of the gap is needed. In this
section a linearization of the gap model is proposed.
For the working-point dimension of the , the values of the ionization time td V (k) for
the respective contamination level V = V (k) can be approximated with the help of the
affine function
(k)n
klin (k) + bV (k)
(5.3)
td (k) = k
V (k)
As an example in figure (5.2), the linear approximations of the gap model for the two
extreme value of contamination levels Vmin = V0 and Vmax = V0 + V tp kmax (where kmax
represents the maximal number of pulses in a cycle of erosion) are shown.
The linear model parameters, klin and bV (k), have benn determined as follows:
1. The working point values of the gap distance 0 (k) in order to maintain the desired ionization time tdref with the variation of the contamination V (k) has been
determined.
2. With a lest-square optimization the pendency of the functions: td Vmin = klinVmin
(k) + b1 and td Vmax = klinVmax (k) + b2 that approximates the ionization time
td in function of the gap distance 0 for the minimal and maximal values of the
contamination Vmin and Vmax has been determined. Then klin is assumed equal to
the mean of the two obtained value.
3. With a lest-square optimization the values of the offset bV (k) of the function: td =
klin (k) + bV (k) have been determined for all levels of contamination between Vmin
and Vmax have been determined.
36

5.1 Iterative Learning Control (ILC) of the ionization time

13

x 10

12

11

Td [s]

10

6
1.05

1.1

1.15
Gap size [m]

1.2
4

x 10

Figure 5.2. Ionization time td Vmin for Vmin (continuous line) and td Vmax Vmax (dashed line)
and the relatives linear approximations

In the follow the steps described above.


1. Determination of the values of the gap (k) at the working point
From the non linear model of the gap

1
n
td (k) V0 + V tp k

(k) =
k

the values of the gap at the working point, i.e. the values that maintaining the ideal
value of td (k) = td ref , are

1
n
td ref V0 + V tp k

0 (k) =
k

2. Determination of the parameter k lin of gap the linear model


With the values of (t) at the working point and relatives ionization time td for
the minimal value of the contamination Vmin , the following over-determined linear
system of equations can be written
yN 1 = AN 2 21 + N 1
37

5 New control strategy for EDM

with

td Vmin , 0

..
y =

.
tdVmin , N

0 1

A = ... ...
N 1

T
klinVmin b
=

T
0 . . . N
=

where x are the unknown parameters and is a perturbation given by the disturbance (measurement noise, model uncertain). The solution is

klinV
min
= A+ y
b
With the values of (t) at the working point and relatives ionization time td for the
maximal value of contamination Vmax , the following over-determined linear system
of equations can be written
yN 1 = AN 2 21 + N 1
with

td Vmax , 0

..
y =

.
N
td Vmax ,
0 1

= ... ...
N 1

T
klinVmax b
=

T
0 . . . N
=

where are the unknown parameters and is a perturbation given by the disturbance
(measurement noise, model uncertain). The solution is

klinV
max
= A+ y
b
Finally the parameter k
dency

lin

is assigned equal to the mean of the two extreme pen-

klin =

+ klinV
klinV
max
min
= 2.3883
2
38

5.1 Iterative Learning Control (ILC) of the ionization time

3. Determination of the parameter bV (k) of gap the linear model


With the values of (t) at the working point and relatives ionization time td for
any value of contamination V (k), the following over-determined linear system of
equations can be written
yN 1 = AN 2 21 + N 1
with

td V (k), 0 klin 0

..
y =

.
tdV(k), N klin N
1
..
= .
1

T
bV (k)
=

T
0 . . . N
=

For any value of k the following solution is found


h
i
= + y
bV (k)
The bV (k) parameter is shown, in function of k, in figure (5.3).
4

4.2

x 10

4.3

4.4

bV [s]

4.5

4.6

4.7

4.8

4.9

100

200

300
k []

400

Figure 5.3. bV (k) in function of k

39

500

600

5 New control strategy for EDM

5.1.4

ILC control of the ionization time td

ILC controller for EDM system


The EDM process controlled by the ILC controller is shown, in lifted domain representation, in figure (5.4). The block D represents the derivative operator. The derivative it is

td ref

e
+
- k- L
6

+
- k
+6

td
1
z

td ref

Gap

ui

ti

- EDM process

- controller

Figure 5.4.

td

EDM process controlled by the ILC controller

necessary because, in order to simplify the problem, the controller design in the following
sections has been developed with the assumption that the desired position of the z-axis is
the actuation signal u, while the true actuation of the EDM process is a velocity.
General mathematical model of the system and ILC controller - Variant 1
For this variant the learning operator L is shown, in lifted domain representation, in
figure (5.5). The matrices
P
Q
Li

z-axis model
Q filter
Learning function, with i = {1,2}

express, in the lifted-domain, the relation between input and output signals of the: z-axis
model (P), filter Q and learning functions Li . The EDM process can be described as
follows
40

5.1 Iterative Learning Control (ILC) of the ionization time

- 1
z

- 12
z

Figure 5.5.

zj+1


j+1
t

dj
zp j+1

- L1

- L2

+
?
k

+
6

Learning operator - Variant 1

=
=
=
=

P uj+1 + [0 1] zj
zj+1 zp j+1
klin j + bV + nj
zA, j + zp j

the adopted ILC controller is

uj+1 = Q (uj + L1 ej + L2 ej1 )


ej
= td ref, j td j
From the process and controller descriptions, the equation that describes the behavior
of the controller and process combined can be obtained

j+1 = P Q P 1 P Q L1 klin + [0 1] j +
P Q L2 klin P Q P 1 [0 1] j1 zA, j + P Q P 1 zA, j1
+P Q L1 td ref, j + P Q L2 td ref, j1 P Q L1 bV P Q L2 bV
P Q L1 nj P Q L2 nj1
(5.4)
Then the following state-space matrix form is obtained

A11 A12
j+1
j
=
(5.5)

j
I
0
j1
|
{z
}

I B12 B13 B14 B15 B16


0
0
0
0
0
0
|
{z

41

zA,

zA, j1

td ref, j

B17

tdref, j1
0
bV
}

nj
nj1

(5.6)

5 New control strategy for EDM

where

5.1.5

A11
A12
B12
B13
B14
B15
B16
B17

=
=
=
=
=
=
=
=

P Q P 1 P Q L1 klin + [0 1]
P Q L2 klin P Q P 1 [0 1]
P Q P 1
P Q L1
P Q L2
P Q (L1 + L2 )
P Q L1
P Q L2

ILC controller with Q a low-pass filter

In order to reduce the influence of the noise nj , the filter Q of the controller equation
uj+1 = Q (uj + L1 ej + L2 ej1 )
is typically set as a low-pass filter. The learning operators L1 and L2 have been chose as
constant.
Values of matrices
The controller and system matrices are
L1 = l1 I
L2 = l2 I

1 q0

q0

1 q1 q0
..
.
P 2
1 N
qi
0

q1
..
.

1 p0

p0

1 p1 p0
..
.
P 2
1 N
pi
0

p1
..
.
pN 2

qN 2

...
..
.
..
.
..
.
...

... 0
..
.
. . ..
. .
..
. 0

...
..
.
..
.
..
.
...

... 0
..
.
. . ..
. .
..
. 0

q1

p1

(5.7)

q0

p0

where {q0, . . . ,qN 2 } are the first N 1 samples of the impulse response of the low-pass
filter, and {p0, . . . ,pN 2 } are the first N 1 samples of the impulse response of the zaxis system. The first sample of the input signals to the matrices Q and P represent the
offsets of the respective output signals. Then the matrices have the form described in
equation (5.2).
42

5.1 Iterative Learning Control (ILC) of the ionization time

Matrix properties
We first make the consideration that P Q = Q P and that Q [1] = [1]. Then following
relations can be written
P 1 Q P
= Q
1
P Q P [0 1] = Q [0 1] = [0 1]
Then the matrices A11 , A12 and B12 of the state-space equation (5.6) can be rewritten as
follows
A11 = Q P Q L1 klin + [0 1]
A12 = P Q L2 klin [0 1]
B12 = Q
With the matrices (5.7) the matrices A11 and A12 become

0
... ...

..
0
.
0

.
.. ...
A11 = 1 0 1

..
..
.. ..
.
.
.
.
PN 2
0
i N 2 . . . 1

0
... ...

..
0
.
0

.
.. ...
A12 = 1 q0
1

..
..
.. ..
.
.
.
.
PN 2
i N 2 . . . 1
0
where

=
=
=
=

1
..
.
..
.
1
0 + 1
1
..
.
..
.
1
0 1

1 l1 klin
P
qi klin l1 ij=0 qij pj
l2 klin
P
klin l2 ij=0 qij pj

(5.8)

Stability
In order to study the stability of the system (5.6), the following state-space trasformation
can be applied


j
j
1
=
T

j1
j1
where

=
43

J 0
0 J

5 New control strategy for EDM

and

1 0 ... ... 0
..
1 1 0
.
..
. . . . ..
.
. .
. 0
.. .. . .
. 1 0
. .
1 0 ...

Then the system with the new state variables representation becomes

j
j+1
A11 A12
1
= T
T

j1
j
I
0
|
{z
}

+ T 1
|

A11

A12

zA, j1
tdref, j
I B12 B13 B14 B15 B16

td ref, j1
0
0
0
0
0
0
{z
}

nj

nj1

where is of the form

with

zA,

A11 A12
I
0

+1 0
0
..
.
..
.
0

0
1
..
.
N 2

1 0
0
..
.
..
.
0

0
1
..
.
N 2

...
..
.
..
.
..
.
...

... 1

...
..
.
..
.
..
.
...

. . . 1

0
. . ..
. .
..
. 0
1

0
. . ..
. .
..
. 0
1

The eigenvalues of the matrix are

I A11 A12

= 0

| I | =
I
I
With the application of the Schur rule the determinant is equal
|( I A11 ) ( I) + A12 | = 0
44

5.1 Iterative Learning Control (ILC) of the ionization time

or, exploded,
2
( + 1) + 1
0
...

0
0
0

.
..
..

.
1 1

.
.
..
..

..
..

.
.

0
N 2 N 2

... 0
... ...
..
.
.. ..
.
.
..
.
...

= 0

2
0 0
1
0
..
.
..
.

The matrix is composed of two triangular blocks in the diagonal. Thus the determinant
is equal to the multiplication of the elements along the diagonal, and is equal to
2

( + 1) + 1 2 0 0 = 0
With the expressions (5.8) the followings relations are obtained
2

(2 l1 klin ) l2 klin 1 = 0
2
N 1
(q0 klin l1 q0 p0 ) + klin l2 q0 p0
= 0
Thus we have two eigenvalues from the first equation at the values
q
(2 l1 klin ) (2 l1 klin )2 4 (l2 klin + 1)
1,2 =
2
and N 1 identical pairs of eigenvalues from the second equation at the values
q
(q0 klin l1 q0 p0 ) (q0 klin l1 q0 p0 )2 4 klin l2 q0 p0
1,2 =
2
The system is asymptotically stable if and only if all eigenvalue satisfies || < 1. The l1
and l2 must be determined in order to satisfies this condition.
The values l1 = 0.0174 and l2 = 0.0076 that, for the considered model of the process,
perform the following stable poles
1 = 0.1915 2 = 0.0352 3 = 0.9550 + 0.2209 i 4 = 0.9550 0.2209 i
Determination of the steady-state error
In this section we would like verify if with this method reaches a null steady-state error.
In this section it is assumed that nj = 0 j, and that the process is at the stationary
conditions. Consequently td ref, j ,zA, j are independent from j and moreover Q zA = zA
and Q td ref = td ref because td ref [1] and zA [1].
Taking in consideration the linear model of the gap, the error after an infinite number
of iterations can be expressed as follows
e = td ref td = td ref klin bV
45

5 New control strategy for EDM

The e term can be determined from equation (5.6)

A11 A12
=
I
0
|
{z

I B12 B13 B14

0
0
0
0
}
|
{z

zA,
zA,

B15
td ref,

0
} tdref,
bV

Then

= (I A11 A12 )1

I + B12 B13 + B14 B15

zA,

td ref,
bV

From equation
(I A11 A12 ) = (I Q + Q L1 klin + Q L2 klin )
it results that the matrix [0 1] does not influence the stationary value.
In order to avoid the large size matrix inversion (I A11 A12 )1 , the following step
can be performed. From the conclusion that the term [0 1] does not influence the stationary
value, of the equation (5.4) can be obtained from the stationary value of the system
obtained from (5.4) without the term [0 1]
j+1 = (Q Q L1 klin ) j Q L2 klin j1
zA, j + P Q P 1 zA, j1 P Q L1 bV P Q L2 bV
+P Q L1 tdref, j + P Q L2 tdref, j1
From the z-axis identification (4.6) it is possible conclude that the dynamics of the zaxis is faster than the control band width of the gap controller. Then the z-axis can
be approximated as a static process, then P = I. If the low-pass filter Q is chosen as
first order low-pass filter with transfer-function Q(z) = (1q)z
zq , then the system can be
described, in the time domain, by the following system of equations

zj+1 (k) = uj+1 (k)

j+1 (k) = zj+1 (k) zA (k)


td j (k)
= klin j (k) + bV

u (k) = (uj (k) + ej (k) l1 + ej1 (k) l2 ) (1 q) + uj+1 (k 1) q

j+1
ej (k)
= td tef (k) td j (k)
which for j becomes

z (k) = u (k)

(k) = z (k) zA (k)


td (k) = klin (k) + bV

u (k) = (u (k) + e (k) l1 + e (k) l2 ) (1 q) + u (k 1) q


e (k) = td tef (k) td (k)
46

5.1 Iterative Learning Control (ILC) of the ionization time

Then the following recursive equation can be obtained


(k) =

(k 1)
q klin (l1 + l2 ) (q 1)
q (zA (k) + zA (k 1)) (td ref (k) bV (k)) (l1 + l2 ) (q 1)
+
q klin (l1 + l2 ) (q 1)

where the initial value of the above recursive equation is


(0) =

td ref (0) bV (0)


klin

because the tracking error of the first point of the iteration is 0. For the considered typical
case, the reference ionization time is tdref = 7.3073 105 s and Q low-pass filter with cutoff frequency at 30Hz (necessary value in order to obtain a good rejection of the noise),
from the equation above the steady-state error in figure (5.6) has been obtained. The
5

1.5

x 10

Infinite error e [s]

0.5

0.05

0.1

0.15

0.2

Figure 5.6.

0.25
t [s]

0.3

0.35

0.4

0.45

0.5

steady-state error

conclusion is that with this method the stationary error is not negligible. This method is
thus not interesting and is not further considered in this thesis.

5.1.6

ILC controller using a least-square optimization

Instead use a low-pass filter, in order to reduce the influence of the noise nj a fitting of a
curve can be used. In this case the matrix Q of the controller equation
uj+1 = Q (uj + L1 ej + L2 ej1 )
47

5 New control strategy for EDM

performs a linear least-square operation. The learning operators L1 and L2 have been
chose as constant.

5.1.7

Determination of the matrix representing the least-square minimization

From the appendices, the parameters that minimize the cost function
= (y )
T (y )

J()
are

= (T )1 T y

Then the approximating function y of y is


y = = (T )1 T y
The matrix which performs the linear least-square operation is then Q = (T )1 T .
In this case the matrix Q represents a projection from the space <m on the subspace
V j <m defined from the column vector which composes the matrix .
In our case the following matrix has been chosen

1
0
0
...
0
1

1
1
...
1

2
3
order
1

2
2
...
2
=

..

..
..
..
.

.
.
.
1 N 1 (N 1)2 . . . (N 1)order
which corresponds to a linear least-square with polynomial of order : order as basis
function. The polynomials basis has been choice because it can be well approximate the
behavior of the z-axis during an erosion cycle.
Values of matrices
From the z-axis identification (4.6) it is possible to conclude that the closed-loop dynamics
of the z-axis is much faster than the control band width of the gap control. Then the z-axis
can be approximated as a static process and P = I.
The matrices of the controller and process become
L1 = l1 I
L2 = l2 I
Q

1 T
= T

= I
48

5.1 Iterative Learning Control (ILC) of the ionization time

Matrix properties
We first made the consideration that Q [1] = [1]. Then the following relation can written
Q [0 1] = [0 1]
thus the matrices A12 of the state-space equation (5.6) can be rewritten as follows
A12 = Q L2 klin [0 1]
Stability
The eigenvalues of the matrix are

I A11 A12
= 0
| I | =
I
I
With the application of the Schur rule the determinant is equal
|( I A11 ) ( I) A12 | = 0
or, exploded,
2

I Q + Q L1 klin [0 1] + Q L2 klin + [0 1] = 0

(5.9)

Now the eigenvalues of the matrix can be found with the followings steps.
Eigenvalues = 0 of the matrix
If | I | = 0 then it is possible to find a vector vi that satisfies

viT 2 I Q + Q L1 klin [0 1] + Q L2 klin + [0 1] = 0


With a vector vi equal to a right eigenvector of the Q matrix Null{Q} (i.e)
viT Q = 0
where i [1,2, . . . ,N order 1], the equation (5.1.7) becomes

viT 2 I Q + Q L1 klin [0 1] + Q L2 klin + [0 1]


viT 2
2
1,2

=
=
=
=

0
0
0
0

Similarly, with a different choice of the eigenvector vi , a total number of N order1


of linear independent vi vector can be found. Then the matrix and also , possesses
N order 1 couple of eigenvalues at 0.
49

5 New control strategy for EDM

Eigenvalues 6= 0 of the matrix


If | I | = 0 then it is possible to find a vector vi that satisfies
2

I P Q P 1 + P Q L1 klin [0 1] + P Q L2 klin + [0 1] vi = 0
With vector vi equal to a right eigenvector of the Q matrix (i.e)
Q vi = vi
where

vNorder1 . . . vN order+k1 . . . vorder

1 . . . (N 1)k . . . (N 1)order
1 . . . (N 2)k . . . (N 2)order

..
..
..
.

.
.

k
order

1 ...
1
...
1
1 ...
0
...
0

equation (5.1.7) becomes


2

I Q + Q L1 klin [0 1] + Q L2 klin + [0 1] v = 0
v 2 v + v L1 klin [1] vN + v L2 klin + [1] vN
= 0
where vN is the last components of the vector v. For the eigenvector vNorder1 the
following equations are obtained
2

(2 l1 klin ) + l2 klin + 1 [1] = 0


Then vNorder is a right eigenvector of the matrix with a couple of eigenvalues

1,2 =

(2 l1 klin )

q
(2 l1 klin )2 4 (l2 klin + 1)
2

For the other eigenvectors the the following equations are obtained
2

(1 L1 klin ) + L2 klin [1] = 0


Then v is a right eigenvector of the matrix and with a couple of eigenvalues
q
1,2 =

(1 l1 klin )

(1 l1 klin )2 4 l2 klin
2

The system is asymptotically stable if and only if all eigenvalue satisfies || < 1.
50

5.1 Iterative Learning Control (ILC) of the ionization time

Determination of the steady-state error


In this section we would like verify if with this method reaches a null steady-state error.
In this section it is assumed that nj = 0 j, and that the process is at the stationary
conditions. Consequently td ref, j ,zA, j are independent from j and moreover Q zA = zA ,
Q td ref = td ref because td ref [1] and zA [1].
Taking in consideration the linear model of the gap, the error after an infinite number
of iterations can be expressed as follows
e = td ref td = td ref klin bV
The e term can be determined from equation (5.6)

A11 A12
I
0
|
{z

zA,
zA,

B15
td ref,

0
} td ref,
bV



I B12 B13 B14

0
0
0
0
|
}
{z

then

= (I A11 A12 )1

I + B12 B13 + B14 B15

zA,

td ref,
bV

From equation
(I A11 A12 ) = (I Q + Q L1 klin + Q L2 klin )
it results that the matrix [0 1] does influence the stationary value. With the development
in series, the equation can be rewritten as follow

z
A,
X

=
(A11 + A12 )i I + B12 B13 + B14 B15 td ref,
i=0
bV

X
=
Q
(I L1 klin L2 klin )i + I
i=1

I + Q Q L1 + Q L2 Q L1 Q L2

zA,

td ref,
bV

for the assumptions Q zA = zA and Q td ref = td ref , the equation can be rewritten as
follow

zA,
X

0 Q L1 + Q L2 Q L1 Q L2 tdref,
=
Q
(I L1 klin L2 klin )i + I
i=1
bV
51

5 New control strategy for EDM

zA,
X

(I L1 klin L2 klin )i 0 L1 + L2 L1 L2 tdref,


= Q
i=0
bV

zA,
X

= Q
(1 l1 klin l2 klin )i 0 l1 + l2 l1 l2 tdref,
i=0
bV
1
= Q
(l1 l2 ) (tdref + bV )
1 (1 l1 klin l2 klin )
1
1
= Q
td ref Q
bV
klin
klin
{z
}
|
1
t
klin d ref

and thus
e = td ref,

klin bV = (Q I) bV

For the considered typical case, the reference ionization time is td ref = 7.3073 105 s,
from the equation above the steady-state error in figure (5.7) has been obtained. We can
7

x 10

1.5

Infinite error e [s]

0.5

0.5

1.5

2.5

0.05

0.1

0.15

0.2

Figure 5.7.

0.25
t [s]

0.3

0.35

0.4

0.45

0.5

Infinite error

conclude that with this method the stationary error is negligible.


Simulation results
In order to obtain a stationary behavior of the z-axis, a slow dynamics must be selected.
The behavior is represented in figure (5.8). The values l1 = 0.0180 and l2 = 0.0141,
52

5.1 Iterative Learning Control (ILC) of the ionization time

deliver the following stable poles


1 = 0.9992 2 = 0.0512 3 = 0.9850 + 0.0935 i 4 = 0.9850 0.0935 i
for the considered model of the process. The slow dynamics does not allow to follow the
erosion front along a straight line.
4

mean td

Erosion font

x 10

x 10

1.2

0.8

z [m]

td [m]

0.6

0.4

10

0.2

12

200

400

600

800

1000

1200

200

400

600

Particular of the zaxis position

x 10

800

1000

1200

t [s]

t [s]
x 10

Particular of the zaxis position when the ILC control is active

8.78
2.5
8.8
3
8.82

z [m]

z [m]

3.5
8.84

4
8.86
4.5
8.88

5
8.9
48

48.2

48.4

48.6

48.8

49

49.2

49.4

49.6

t [s]

1326.4

1326.6

1326.8

1327

1327.2
t [s]

1327.4

1327.6

1327.8

1328

Figure 5.8. Behavior of the EDM process: z-axis behavior (upper left), mean of the ionization time td (upper right), particular of the z-axis movement with P controller (bottom
left), particular of the z-axis movement with ILC controller (bottom right)

In order to follow the erosion front along a straight, a faster dynamics must be selected.
The behavior is represented in figure (5.9). The values l1 = 0.0209 and l2 = 0.0171,
deliver the following stable poles
1 = 0.9912 2 = 0.0412 3 = 0.9750 + 0.0924 i 4 = 0.9750 0.0924 i
for the considered model of the process. The fast dynamics causes the interpolated line to
change continuously.
In conclusion it is not possible to find a solution in wich the erosion front is followed
along a straight and simultaneously to obtain a stationary behavior. Thus with this
method there exist a tradeoff between the erosion front behavior and stationary behavior.
53

5 New control strategy for EDM

mean td

Erosion font

x 10

x 10

1.2

0.8

z [m]

td [m]

0.6

0.4

10

0.2

12

200

400

600

800

1000

1200

200

400

600

Particular of the zaxis position

x 10

800

1000

1200

t [s]

t [s]
x 10

Particular of the zaxis position when the ILC control is active

8.46
2.5

8.48

8.5
z [m]

z [m]

3.5

8.52

4.5

8.54

8.56

48

48.2

48.4

48.6

48.8

49

49.2

49.4

49.6

t [s]

1261.8

1262

1262.2

1262.4

1262.6
t [s]

1262.8

1263

1263.2

Figure 5.9. Behavior of the EDM process: z-axis behavior (upper left), mean of the ionization time td (upper right), particular of the z-axis movement with P controller (bottom
left), particular of the z-axis movement with ILC controller (bottom right)

General mathematical model of the system and ILC controller - Variant 2

In this method the forward movement of the z-axis is expressed in absolute value and not
in relative to the last point of the previous erosion cycle. Moreover the forward movement
is controlled in order to maintain the mean value of the error e = td ref td equal to 0 while
the ionization time td during a cycle is controlled with the same approach of the previous
method. With this kind of approach the dynamics of forward movement and behavior
during the erosion cycle of the z-axis results decoupled and the tradeoff of the previous
method is then solved.
For this variant the learning operator L is shown, in lifted domain representation, in
figure (5.10). With the linear model (5.3) of the gap, and the following matrices
54

5.1 Iterative Learning Control (ILC) of the ionization time

- 1

- L1

- 1

- Q1

+
- 1 T - k- 1
N

+6

+
6
- l3

- [1]

Figure 5.10.

P
Q
Q1
Li

+
+?
k -

- L2

Learning operator - Variant 2

z-axis model
Least square of order = 3 (polynomial lest-square of 3 order)
Least square of order = 0 (mean value of the input signal)
Learning function for i = i
and gain for the controller of the forward movement for i = {2,3}

The matrices above express, in the lifted-domain, the relation between the input and
output signals of the z-axis model (P), least-squares Q, Q1 and learning functions Li . The
EDM process can be described as follows

zj+1 = P uj+1


= z
z
j+1

j+1

p j+1

t
= klin j + bV + nj

dj
zp j+1 = zA, j + [0 1] zp j
the adopted ILC controller is

uj+1 = Q (uj + L1 ej ) + L2 Q1 ej + [1] l3 j

|
{z
} |
{z
}

j+1
ej

Controller of the td

= N1 [1]T ej + j
= td ref, j td j

Advancement compensation

From the process and controller descriptions, the equations that describe the behavior
of the controller and process combined are

j+1 = P Q P 1 P Q L1 klin P L2 Q1 klin j + P [1] l3 j

zp, j+1 + P Q P 1 zp, j + (P Q L1 +P L2 Q1 ) td ref, j


(P Q L1 +P L2 Q1 ) bV (P Q L1 +P L2 Q1 ) nj

j+1 = N1 [1]T klin j + j + q T td ref, j q T bV q T nj


55

5 New control strategy for EDM

Then the following state-space matrix form is obtained

j+1
j+1

A11 a12
=
a21 1
|
{z

j
I B12 B13 B14 B15

j
0
0
b23 b24 b25
}
|
{z
}

where

A11
a12
a21
B12
B13
B14
B15
b23
b24
b25

=
=
=
=
=
=
=
=
=
=

zP, j+1
zP, j
td ref, j
bV
nj

(5.10)

P Q P 1 P Q L1 klin P L2 Q1 klin
P [1] l3
N1 [1]T klin
P Q P 1
P Q L1 +P L2 Q1
P Q L1 +P L2 Q1
P Q L1 +P L2 Q1
1
T
N [1]
1
N [1]T
N1 [1]T

Values of matrices
From the z-axis identification (4.6) it is possible to conclude that the dynamics of the
z-axis is faster than the control band width of the gap controller. Then the z-axis can be
approximated as a static process.
The matrices of the controller and process become
L1

= l1 I

L2

= l2 I

1 T
= T

Q1 =

1
N

1 ... 1

..
...
.
1 ... 1

= I

where N represents the number of samples of a cycle j.


Matrix properties
We first made the consideration that Q [1] = [1]. Then the following relation can be
written
Q1 Q = Q1
Q Q2 = Q1
56

5.1 Iterative Learning Control (ILC) of the ionization time

Stability
The eigenvalues of the matrix satisfy the following relation

I A11 a12

| I | =
= 0

1
21

I Q + Q L1 klin + L2 Q1 klin [1] l3


= 0
=
1
T
1
N [1] klin
Now the eigenvalues of the matrix can be determined.
Eigenvalue = 0 of the matrix
If | I | = 0 it is possible to find a vector vi that satisfies

I Q + Q L1 klin + L2 Q1 klin [1] l3


vi = 0
1
T
1
N [1] klin

(5.11)

The vector vi can be found as follows. With a vector ui equal to right eigenvector
of the Q matrix Null{Q} (i.e)
Q ui = 0
where i [1,2, . . . ,N order 1], the following vectors vi can be constructed

ui Q1 ui
vi =
0
The equation (5.11) becomes

I Q + Q L1 klin + L2 Q1 klin [1] l3


ui Q1 ui

= 0
1
T
1
N [1] klin
0

I
= 0
0
= 0
Similarly for the other right eigenvector ui of the matrix Q. Then the matrix ,
possesses N order 1 eigenvalues at 0.
Eigenvalue 6= 0 of the matrix
If | I | = 0 it is possible to find a vector vi that satisfies

I Q + Q L1 klin + L2 Q1 klin [1] l3


vi = 0
1
T
1
N [1] klin
With a vector ui equal to a right eigenvector of the Q matrix (i.e)
Q ui = ui
where i [1,2, . . . ,order 1], the following vectors vi can be constructed

ui Q1 ui
vi =
0
57

(5.12)

5 New control strategy for EDM

Equation (5.12) becomes


ui Q1 ui
I Q + Q L1 klin + L2 Q1 klin [1] l3
= 0

1
T
0
1
N [1] klin

( 1 + l1 klin ) [1]
= 0
0
and then = 1 l1 klin . Similarly for the other right eigenvector ui . Then the
matrix , possesses order 1 eigenvalues at 1 l1 klin .
The last two eigenvalues can be found as follow. With the vector u = [1] that is
equal to a right eigenvector of the Q and Q1 matrix (i.e)
Qu = u
Q1 u = u
the following vectors v can be constructed

u
v=

Equation (5.12) becomes


u
I Q + Q L1 klin + L2 Q1 klin [1] l3

= 0
1
T
1

N [1] klin

( ( 1) + l1 klin + l2 klin l3 ) [1]


= 0
klin + ( 1)
then

( ( 1) + l1 klin + l2 klin l3 ) [1] = 0


klin + ( 1)
= 0

(5.13)

Now and in order to satisfies the equation (5.13) must be found. With 6= 0
and 6= 0, equation (5.13) can be rewritten as follows
(
( 1) + l1 klin + l2 klin l3 = 0
(5.14)

= 0
klin + ( 1)
From the difference between the first and second equation the following relation is
obtained
l1 klin + l2 klin l3 klin = 0
2 klin (l1 klin + l2 klin ) + 2 l3 = 0
Then the relation between and is
q
1,2 =

(l1 klin + l2 klin )

(l1 klin + l2 klin )2 4 2 l3 klin


2 klin

58

5.1 Iterative Learning Control (ILC) of the ionization time

With the substitution of 1,2 in the second equations of the system (5.14), the last
two eigenvalues are obtained
1,2

klin + ( 1) = 0
1,2

(2l1 klin l2 klin )

(2l1 klin l2 klin )2 4(1l1 klin l2 klin +l3 klin )


2

The system is asymptotically stable if and only if all eigenvalue satisfies || < 1.
With this controller architecture it is possible to place at desired position all the poles
of the system. Differently from the variant 1, it is possible to adjust independently the
forward dynamics during the erosion cycle. In fact the poles that depend from the constant
l3 regulate the forward movement. The other pole regulate the behavior inside the erosion
cycle.
Determination of the steady-state error
In this section we would like to verify if with this method a null steady-state error can
be reached. In this section is then assumed that nj = 0 j, and that the process is at
the stationary conditions, consequently td ref, j ,zA, j are independent from j and moreover
Q zA = zA , Q1 zA = zA , Q td ref = td ref because td ref [1] and zA [1].
Taking in consideration the linear model of the gap, the error after an infinite number
of iterations can be expressed as follow
e = td ref td = td ref klin bV
The e term can be determined from equation (5.10)

A11 a12
a21 1
|
{z

zP + zA

I B12 B13 B14


zP

0
0
b23 b24
td ref
}
|
{z
}
bV

(5.15)

From the second equation of the state-space representation (5.15) it is possible to obtain
= a21 + + b23 td ref + b24 bV
0 =
a21 + b23 td ref + b24 bV
then with the values of the matrices
0 =

1
1
1
[1]T klin +
[1]T td ref
[1]T bV
N
N
N
|
{z
} |
{z
} |
{z
}
td ref

klin

0 =

bV

(5.16)

klin + td ref bV

where and bV are the mean values of the gap dimension and respectively of the bV
signal disturbance.
59

5 New control strategy for EDM

From the first equation of the state-space representation (5.15)


= A11 + a12 + (B12 I) zp zA + B13 td ref + B14 bV
with the values of the matrices becomes
= (Q Q L1 klin L2 Q1 klin ) + [1] l3
+ (Q I) zP zA + (Q L1 + L2 Q1 ) tdref (Q L1 + L2 Q1 ) bV
for the made assumptions at the begin of the section and for the matrices properties (5.1.7),
the equation can be rewritten as follow
= (Q Q L1 klin ) L2 Q1 klin +[1] l3
|
{z
}
L2 klin

Q zP zP zA + Q L1 td ref + L2 Q1 td ref Q L1 bV L2 Q1 bV
| {z }
|
{z
}
{z
} |
{z
}
|
zP

L1 td ref

L2 td ref

L2 bV

and for the equation (5.16)


= (Q Q L1 klin ) + [1] l3
zA + L1 td ref Q L1 bV L2 klin + L2 td ref L2 bV
|
{z
}

(5.17)

With the multiplication of the two sides of the equation for Q2 , for the made assumptions
at the begin of the section and for the matrices properties 5.1.7, the following relation has
been obtained
Q2 = Q2 Q Q2 Q L1 klin + Q2 [1] l3
| {z } |
| {z }
{z
} |
{z
}
[1]

[1]

[1]l3

L1 klin

Q2 zA + Q2 L1 td ref Q2 Q L1 bV
{z
}
| {z } |
{z
} |
zA

L1 td ref

L1 bV

that, for equation (5.16), becomes


[1] l3 zA = L1 klin L1 td ref + L1 bV
|
{z
}
0

Then equation (5.17) becomes


= (Q Q L1 klin ) + [1] l3 zA +L1 td ref Q L1 bV
|
{z
}
0

= (I (Q Q L1 klin ))1 (L1 tdref Q L1 bV )


With the development in series, the equation can be rewritten as follow

P
i
= I + Q P
1 (I L1 klin ) (L
1 td ref Q L1 bV )
i L t
Q I + P
(I

k
)
bV
1
1
lin
d ref, L1
1

i
Q 1 + 1 (1 l1 klin ) l1 td ref, l1 bV
Q l1 k1lin l1 td ref, l1 bV
V
ref
Q kblin
= tkdlin
and thus
e = td ref,

klin bV = (Q I) bV
60

5.1 Iterative Learning Control (ILC) of the ionization time

Simulation results
The values l1 = 0.0042 and l2 = 0.0126 that, for the considered model of the process,
perform the following stable poles
1 = 0.99 2 = 0.98 3 = 0.98

mean td

Erosion font

x 10

x 10

1.2

0.8

z [m]

td [m]

0.6

0.4

10

0.2

12

200

400

600

800

1000

1200

200

400

600

Particular of the zaxis position

x 10

800

1000

1200

t [s]

t [s]

Particular of the zaxis position when the ILC control is active

x 10
8.9
8.91

2.5

8.92
3

8.93
8.94
z [m]

z [m]

3.5
8.95
8.96

8.97
4.5

8.98
8.99

5
9
48

48.2

48.4

48.6

48.8

49

49.2

49.4

49.6

Figure 5.11.

1375

1375.5

1376

1376.5

t [s]

t [s]

Simulated behavior with P controller and ILC controller: z-axis behavior

Figure 5.12. Behavior of the EDM process: z-axis behavior (upper left), mean of the
ionization time td (upper right), particular of the z-axis movement with P controller (bottom
left), particular of the z-axis movement with ILC controller (bottom right)

This method gives the best behavior of the z-axis. The forward movement is along a
straight line and the behavior of the z-axis inside a erosion cycle is stationary.
61

5 New control strategy for EDM

5.2

Choice of the new control strategy

The best control strategy is given by the Variant-2. For the moment only the Variant-1
with filter Q as a Least-square has been implemented on the EDM system. The implementation of the Variant-2 is in process.

62

Chapter 6

Implementation
The controller will be implemented in a fixed-point arithmetic micro-controller. In the
followings sections are introduced the necessary steps in order to obtain the implementable
controller.

6.1

Scaling

The scaling is a mathematical operation that does not have influence on the behavior of
the controller. The objective is to exploit the maximal resolution of the available variables
in the micro-controller with the expansion of the controller signals over the available range.

6.2
6.2.1

Multiplication of a signal with a constant in fixed-point


arithmetics
Multiplication algorithm

In fixed-point arithmetic a multiplication of a generic signal xk {xmin , . . . ,xmax } with a


constant a < is implemented as follow

(ba 2n + 0.5c xk )

a xk =
2n
where n N is chosen in order to satisfy the following condition
max(xk ) ba 2n + 0.5c 2nA 1

(6.1)

with nA the number of available bits of the accumulator register. The approximation
introduce the following error e < function of the parameters a,n and the value of the
signal xk

(ba 2n + 0.5c xk )
e(xk ,a,n) =
a xk
2n
63

6 Implementation

6.2.2

Noise-shaping

In order to increase the accuracy of the multiplication algorithm presented in the previous
section, the noise shaping technic can be applied. The following equation is then obtained

(ba 2n + 0.5c xk )

e(xk1 ,a,n)
a xk =
2n
The error eNoiseShaping function of the parameters a,n and the value of the signal xk is

(ba 2n + 0.5c xk )
eNoiseShaping (xk ,a,n) =
e(xk1 ,a,n) a xk
2n

(ba 2n + 0.5c xk )
=
a xk e(xk1 ,a,n)
2n
|
{z
}
e(xk ,a,n)

= e(xk ,a,n) e(xk1 ,a,n)


that in z domain becomes
ENoiseShaping (z,a,n) =

z1
E(z,a,n)
z }
| {z
F (z)

From the Bode diagram of the system F (z), shown in figure 6.1 (normalized at the
20
sampling-time frequency of 2
), it results that F (z) has a high-pass behavior. The influence of the error e(xk ,a,n) at low frequencies i.e. in the band of the control is reduced.

6.2.3

Measurements on the real EDM process of the Variant-1

The Variant-1 with Q as a recursive least-square is the only method current implemented
on the EDM system. The behavior is shown in figure (6.2). In order to follow the erosion
front along a straight line, a fast dynamics is selected. A non stationary behavior of the
z-axis during the erosion cycle is obtained.

64

6.2 Multiplication of a signal with a constant in fixed-point arithmetics

Bode Diagram
8
6
4

Magnitude (dB)

2
0
2
4
6
8
10
12
0
10

10
Frequency (rad/sec)

Figure 6.1.

Bode diagram of the transfer function F (z)

65

6 Implementation

Erosion font

x 10

0.5

0.5

Erosion font

x 10

Erosion font

x 10

0
0

0.5

0.5
1

z [m]

z [m]

z [m]

1.5
3

1.5
2
4

2.5

10

15

20

2.5

25

50

100

150

x 10

200

10

15

20

t [s]

t [s]

mean td

mean td

x 10

25
t [s]

30

35

40

45

mean td

x 10

1
0.9
0.8

td [m]

td [m]

td [m]

0.7
0.6
0.5
0.4
0.3
0.2
0.1
0

10

15

20

25

50

100

t [s]
4

200

10

15

20

t [s]
3

Particular of the zaxis position

x 10

150

Particular of the zaxis position

x 10

2.98

1.45

25
t [s]

30

35

40

45

Particular of the zaxis position

x 10

2.262
2.99

2.264

1.5

2.266
1.55

2.268

3.01

z [m]

z [m]

z [m]

2.27

1.6

2.272

3.02

1.65
3.03

2.274
1.7

2.276
3.04

2.278

1.75

3.05

2.28
1.8

2.282
14.4

14.45

14.5

14.55

14.6
t [s]

14.65

14.7

14.75

14.8

3.06

203

203.2

203.4

203.6
t [s]

203.8

204

204.2

26.4

26.45

26.5

26.55

26.6

26.65
t [s]

26.7

26.75

26.8

26.85

Figure 6.2. Real behavior of the EDM process controlled by the P controller (left), Simulated behavior of the EDM process controlled by ILC controller with Q =RLS (central),
Real behavior of the EDM process controlled by ILC controller with Q =RLS (right)

66

26.9

Chapter 7

Conclusions
In this thesis a model of the EDM process has been determined. Because the high complexity and strong stochastic components that characterize the process is not was possible
to find an accurate model of the process. However the model reproduces the principal
characteristics of the EDM process and could be used in order to verify the effect of the
new developed control strategies on the gap distance behavior.
The new control technique developed in this thesis exploits the cyclic behavior of the
EDM process. In order to obtain a better control of the gap distance, the three following
solution based on iterative learning control (ILC) have been analyzed:
1. ILC with a low pass-filter
With this method it was not possible to obtain a negligible steady-state error. The
method hast not been considered interesting for our objectives.
2. ILC combined with an optimization method based on recursive leastsquares (RLS) - Variant 1
With this method it was possible to obtain a negligible steady-state error. With
this method however it was hard to find an optimal tradeoff between the stationary
behavior and a good forward movement because of their mutual dependence. This
method has been implemented on the real system, and some measurements have
been presented.
3. ILC combined with an optimization method based on recursive leastsquares (RLS) - Variant 2
With this method it was possible to reach a negligible steady-state error. With
this method it is easy to find an optimal tradeoff between the stationary behavior
and a good forward movement because they independency. This method being
implemented.
As a conclusion, thanks a this work, a model of the EDM process is now available and
a new technique that allows a better behavior of the gap distance is being implemented.

67

7 Conclusions

68

Appendix A

Some mathematical proofs


A.1

Log-Gaussian pdf from the formula (3.3)

Preposition The probability density function Fy (y) of the random variable y(t) = f (x(t))
with x(t) random variable with probability density function Fx (x(t)) is
fx (f 1 (y))

fy (y) =

df (f 1 (y))
dx

Proof: With y(t) = f (x(t)) then the following equation must hold
P [y(t) = f (x)] = P [x(t) = x]
fy (f (x)) |dy| = fx (x) |dx|

(x))
substituting |dy| = d(fdx
|dx|

d(f (x))

= fx (x)
fy (f (x))
dx
then
f (x)
x

d(f (x))
dx

fy (y) =
and finally considering that y = f (x)
fy (y) =

fx (f 1 (y))

df (f 1 (y))

dx

69

A Some mathematical proofs

Then considering that probability density function of the random signal N (td ,0) is
fN (N ) =

q
e
2 t2d

N2
2t2
d

the probability density function ftd (td ) of the random signal td (t) = f (N (t)) = td eN (td ,0)
is
(ln(td )ln(td (t)))2

fN (f 1 (td ))
1
2 2
d
q
ftd (td ) = df (f 1 (t )) =
(A.1)
e
d
td 2 d2
dx
that is called log-Gaussian probability density function. In this type of function the
parameters d is related to the the random signal td (t) from the followings relations
v
!
u
2
u

td
d = tln
+1
td (t)2

A.2

Linear-least square

In the following sections, in order to obtain the model parameters, a linear least square
is applied. The following preposition describes and proof the method with an deepening
about the measurement noise.
Preposition A linear system of equations
y = +
where y <n are the measurements, <nxm known values, <m are unknown values
and <n is the measurement noise, can be solved finding x that minimize the following
cost function
min J() = min ky k22 = min(y )T (y )

In presence of noise with mean value and covariance matrix :


= E[]
cov() = E[( ) ( )T ] = 2 I
the solution is:
= arg min J() = arg min(y )T (y ) = (T )1 T y

with mean value and covariance matrix:


= + (T )1 T
= E[]
= E[( ) ( )T ] = (T )1 2
cov()

70

(A.2)
(A.3)

A.3 Recursive Least Square (RLS)

Proof: The best approximation of which minimize the index J() is such that
= (y )
T (y )
= (y T T + T T ) = 0
J()
and
= (T )1 T y
which prove (A.2).
Substituting in previous equation y = + :
= (T )1 T ( + )
then
= + (T )1 T E[] = + (T )1 T
= E[]
which prove (A.2).
The covariance matrix of is:
= E[( ) ( )T ]
cov()

= E[((T )1 T ( )) ((T )1 T ( ))T ]


= (T )1 T E[( ) ( )T ] (T )1
= (T )1 T cov() (T )1
= (T )1 T I 2 (T )1
= (T )1 2
that prove (A.3).
The matrix (T )1 T is usually substituted by the symbol + and is called
pseudo-inverse of the matrix .

A.3

Recursive Least Square (RLS)

The recursive Least Square (RLS) is a recursive solution of the linear least square problem
(LLS) defined in (A.2). Writing the matrix of the know values A <nxm and the matrix
of the measurement values y <n as follow

y0
0
y1
1

(n) = 2 y(n) = y2
(A.4)
..
..
.
.
yn
n
71

A Some mathematical proofs

with i <1m and yi < i [1, ,n] where i represents the instant of measurement.
The estimation of the parameters R1xm at the instant n is:

1) + c(n) P (n 1) T e(n)
(n)
= (n
n
with:

e(n)

y(n)
P (n 1)

c(n)

P (n)

=
=
=
=
=

yn y(n)
1)
n (n

1
(n 1)T (n 1)
1
1+n P (n1)T
n

P (n 1) + c(n) P (n 1) Tn n P (n 1)

Proof: With (A.4), the solution of the LLS method (A.2) becomes

(n)
=
(n)T (n)
(n)T y(n)

1
= (n 1)T (n 1) + Tn n
(n 1)T y(n 1) + Tn yn
for the matrix inversion lemma
1

P (n 1) + Tn n
= P (n 1) c(n) P (n 1) Tn n P (n 1)

1
then, with P (n 1) = (n 1)T (n 1) , the equation (A.3) becomes

(n)
=


P (n 1) c(n) P (n 1) Tn n P (n 1) (n 1)T y(n 1) + Tn yn

= P (n 1) (n 1)T y(n 1) +P (n 1) Tn yn
|
{z
}

(n1)

1)
c(n) P (n 1) Tn n P (n 1) Tn yn c(n) P (n 1) Tn n (n
|
|
{z
}
{z
}
1
1
c(n)

y(n)

1) + c(n) P (n 1) T
= (n
(n)
n yn y
| {z }
e(n)

1) + c(n) P (n 1)
= (n

Tn

e(n)

72

Bibliography
[1] B. Bommeli, Etude de linfluence de la contamination sur lamorscage des d`echarges
dans les dielectriques liquides PhD thesis, Fac, Sc, Univ. Geneva, 1979
[2] Altpeter and Tricarico, Modelling, Simulation and Control of a Electro Discharge
Machine
[3] F. Dauw, On-line identification and optimization of electro-discharge machining
PhD thesis, Katholieke Universiteit Leuven, 1985
[4] DOUGLAS A. BRISTOW, MARINA THARAYIL and ANDREW G. ALLEYNE,
A survay of Iterative Learning Control IEEE CONTROL SYSTEMS MAGAZINE,
JUNE 2006

73

You might also like