82
POLITECNICO DI TORINO III Facolt`adi Ingegneria dell’Informazione 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

Thesis Toptesi

Embed Size (px)

DESCRIPTION

ricerca su elettroerosione

Citation preview

Page 1: Thesis Toptesi

POLITECNICO DI TORINO

III Facolta di Ingegneria dell’InformazioneCorso 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

Page 2: Thesis Toptesi

Summary

The objective of this thesis is to find new strategies in order to better control the gapdistance between the electrode and workpiece in electro-discharge machining (EDM).

In order to reach this objective a model for simulating the EDM process was neces-sary. The model has been extracted from the literature and relative techniques for theidentification has been created.

The cyclic behavior of the EDM process has been exploited in order to reduce theinfluence of the stochastic part of the process on the gap behavior with the applicationof a new control technique based on the Iterative Learning Control (ILC). The relativedesign procedure of the new control technique have been developed.

The best results have been obtained with a combination of the ILC with a recursiveleast-square (RLS). With this techniques a smooth behavior of the gap distance and aregular forward movement have been obtained. The control method that performs thebest simulation results is in the phase of implementation.

1

Page 3: Thesis Toptesi

2

Page 4: Thesis Toptesi

Acknowledgements

I would like to express my gratitude:

• To the AGIE Charmilies Group, in particular to Dr. Ivano Beltrami, Ing. MarcoBoccadoro, Ing. Marco Baumeler and Ing. Walter Dal Bo, for their precious collab-oration and instruction on the base of the Electro Erosion Machining.

• To the professors of the Politecnico of Torino, my supervisor Marcello Chiabergeand Basilio Bona for their continued support and guidance.

• To professor Dr. Silvano Balemi of the SUPSI, who gave my the great opportunityto complete my Master degree and not sacrifice my responsibilities at work.

• To my family and my finance. Their unconditional love and support gave me thestrength to continue and look forward to a bright future.

Thank you!

3

Page 5: Thesis Toptesi

4

Page 6: Thesis Toptesi

Contents

Summary I

Acknowledgements III

1 Introduction 11.1 What is the Electro-Discharge Machining process? . . . . . . . . . . . . . . 11.2 EDM processing applications . . . . . . . . . . . . . . . . . . . . . . . . . . 11.3 History of the EDM process . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

1.3.1 Origins of Die-Sinking EDM in the USSR . . . . . . . . . . . . . . . 21.3.2 Origins of Die-Sinking EDM in the USA . . . . . . . . . . . . . . . . 21.3.3 Origins of Die Wire-cut EDM . . . . . . . . . . . . . . . . . . . . . . 3

1.4 The state of the art of the gap control of Die-sinking EDM . . . . . . . . . 31.5 Objective . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.6 Preview of chapters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2 EDM best practices and limitations 52.1 The process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2.1.1 The EDM machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.1.2 Principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

2.2 Cyclic behavior of the EDM process . . . . . . . . . . . . . . . . . . . . . . 72.3 The process signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2.3.1 EDM current and voltage signals . . . . . . . . . . . . . . . . . . . . 92.3.2 EDM Input/Output signals . . . . . . . . . . . . . . . . . . . . . . . 9

2.4 The control of the EDM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.4.1 Actuation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.4.2 Gap distance measurement . . . . . . . . . . . . . . . . . . . . . . . 112.4.3 Current gap control law . . . . . . . . . . . . . . . . . . . . . . . . . 11

2.5 Limitations of the current EDM control system . . . . . . . . . . . . . . . . 12

3 EDM process modeling 153.1 Mathematical model of the gap . . . . . . . . . . . . . . . . . . . . . . . . . 15

3.1.1 Deterministic component of the variable td . . . . . . . . . . . . . . 153.1.2 Stochastic component of variable td . . . . . . . . . . . . . . . . . . 163.1.3 Contamination V of the gap . . . . . . . . . . . . . . . . . . . . . . . 17

5

Page 7: Thesis Toptesi

3.1.4 Material removal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183.1.5 Complete gap model . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

3.2 Mathematical model of the z-axis . . . . . . . . . . . . . . . . . . . . . . . . 193.2.1 Dynamics of the z-axis . . . . . . . . . . . . . . . . . . . . . . . . . . 193.2.2 Discrete-time z-axis controller . . . . . . . . . . . . . . . . . . . . . . 213.2.3 Closed-loop discrete-time model of the axis . . . . . . . . . . . . . . 213.2.4 Generation of the signal zref from the controller actuation signal ε . 22

3.3 Block diagram of the EDM process . . . . . . . . . . . . . . . . . . . . . . . 22

4 EDM system identification 234.1 EDM process configuration and measurements . . . . . . . . . . . . . . . . 234.2 Identification of the mathematical model of the Gap . . . . . . . . . . . . . 24

4.2.1 Average of the measurements . . . . . . . . . . . . . . . . . . . . . . 24

4.2.2 Average removal V and forward moving speeds ˆz . . . . . . . . . . . 244.2.3 Volume of removed material during an effective discharge ∆V . . . 254.2.4 Deterministic component of the process model . . . . . . . . . . . . 264.2.5 Stochastic component of the process model . . . . . . . . . . . . . . 27

4.3 Identification of the z-axis dynamics . . . . . . . . . . . . . . . . . . . . . . 294.4 Comparison between simulation and real behavior . . . . . . . . . . . . . . 30

5 New control strategy for EDM 335.1 Iterative Learning Control (ILC) of the ionization time . . . . . . . . . . . . 33

5.1.1 Basis of the ILC algorithm . . . . . . . . . . . . . . . . . . . . . . . 335.1.2 Adopted notation for EDM . . . . . . . . . . . . . . . . . . . . . . . 355.1.3 Linearization of the gap model . . . . . . . . . . . . . . . . . . . . . 365.1.4 ILC control of the ionization time td . . . . . . . . . . . . . . . . . . 405.1.5 ILC controller with Q a low-pass filter . . . . . . . . . . . . . . . . . 425.1.6 ILC controller using a least-square optimization . . . . . . . . . . . . 475.1.7 Determination of the matrix representing the least-square minimiza-

tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485.2 Choice of the new control strategy . . . . . . . . . . . . . . . . . . . . . . . 62

6 Implementation 636.1 Scaling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 636.2 Multiplication of a signal with a constant in fixed-point arithmetics . . . . . 63

6.2.1 Multiplication algorithm . . . . . . . . . . . . . . . . . . . . . . . . . 636.2.2 Noise-shaping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 646.2.3 Measurements on the real EDM process of the Variant-1 . . . . . . . 64

7 Conclusions 67

6

Page 8: Thesis Toptesi

A Some mathematical proofs 69A.1 Log-Gaussian pdf from the formula (3.3) . . . . . . . . . . . . . . . . . . . . 69A.2 Linear-least square . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70A.3 Recursive Least Square (RLS) . . . . . . . . . . . . . . . . . . . . . . . . . . 71

Bibliography 73

7

Page 9: Thesis Toptesi

8

Page 10: Thesis Toptesi

Chapter 1

Introduction

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

1.1 What is the Electro-Discharge Machining process?

Electrical-discharge machining is a process which uses a controlled electrical spark toerode conductive materials. A series of electrical discharges takes place between the twoconductors 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 micro-sized spheres.

1.2 EDM processing applications

EDM processing presents the followings advantages with respect to traditional machiningprocesses

• EDM allows for cutting complex shapes and thin walled configurations without dis-tortions.

• EDM is very suitable for materials which are considered too hard or where adhesion isa 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 secondaryoperations such as deburring and polishing. The danger of scrapping a complex orexpensive 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 fragileparts that cannot bear the stress of traditional machining.

1

Page 11: Thesis Toptesi

1 – Introduction

1.3 History of the EDM process

1.3.1 Origins of Die-Sinking EDM in the USSR

The sinker EDM technology was invented accidentally by the soviet Moscow universityprofessors Dr. Boris Lazarenko and Dr. Natalya Lazarenko in the year 1943 while studyingthe wear of electrical contact materials in automotive-engine distributor-breaker points.As part of their experiments, the Lazarenkos immersed the breaker points in oil. Theyobserved that, while the oil did not eliminate the sparking, it did create more uniform andpredictable sparking.

The Lazarenkos experiments were not successful because they did not develop a meansfor extending the life of the automotive breaker points due to sparking but from thisexperiments the idea originated to use the destructive effect of electro-discharge for man-ufacturing conductive materials.

In 1943 the Lazarenkos developed a spark-machining process with an electrical circuitshow in figure 1.1 that used many of the same components used in an automotive ignitionsystem. This process became one of the standard EDM systems in use throughout theworld. Since the Lazarenko EDM system used resistors and capacitors, it became knownas resistor-capacitor (RC) circuit for EDM. Such EDM machines are still produced andused for producing fine surfaces and for drilling precise orifices.

&%

'$

?

¾

R

CSparking gap

Electrode (toll)

Workpiece

DC voltage

Applied

Figure 1.1. Lazarenko RC circuit

1.3.2 Origins of Die-Sinking EDM in the USA

At the same time when Lazarenko began his experiments a company producing hydraulicvalves in the USA place of the need for a machine to remove taps and drills broken withinthe body valve during production. In order to solve this problem the company assigneda 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 andthe drills from the valve bodies.

Stark, Harding and Beaver patented their system. They left the valve company andstarted the development of the vacuum-tube EDM machines and a electronic circuit servo

2

Page 12: Thesis Toptesi

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 (fig-ure 1.2). The vacuum tube made it possible to rise the sparking frequency from 60 Hz to1000 Hz.

""cc

&%

'$

?

¾ Sparking gapAC voltage

Electrode (toll)

Workpiece

Applied

Eletcromagnet

Figure 1.2. Stark-Harding-Beaver circuit

1.3.3 Origins of Die Wire-cut EDM

Another type of machines is Die Wire-cut type EDM machines. The period when theprocess was born ranges from the 1960ies to the 1970ies. The origin idea of Wire-cutEDM was born when the developers started to look after method’s for replacing themachined electrodes whose production is expensive and labor intensive. In a first solutiona static wire was used as an electrode. The wear of the wire cause the wire rupture;thusa continuously wire solved the problem. In the evolution of the wire-cut EDM, a relevantevent was numerical control (NC) which allowed accurate positioning of the wire withrespect of the workpiece.

1.4 The state of the art of the gap control of Die-sinkingEDM

EDM is a key technology in the sense that it machines workpieces without mechanicalstress, 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 con-ventional 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

Page 13: Thesis Toptesi

1 – Introduction

a jitter of the electrode because the measurement from the process are perturbed from thestochastic components of the EDM process and the actual control low of the gap distanceis not able to reject these disturbances. The jitter of the electrode causes a noticeabledegradation 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 movementof the z-axis.

1.6 Preview of chapters

• Chapter 2The chapter presents a typical EDM machine used for this thesis. The referencesystem is introduced, and the EDM process behavior is explained. Finally, the EDMbest practices and limitations will be presented.

• Chapter 3In the chapter the EDM process is modeled. The corresponding block diagram willbe presented.

• Chapter 4In the chapter a method for identification of the EDM process is presented. Allparameters of the model are determined.

• Chapter 5In the chapter new methods for the gap control are proposed.

• Chapter 6In the chapter the implementation and the real measurements are presented andanalyzed.

4

Page 14: Thesis Toptesi

Chapter 2

EDM best practices andlimitations

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

2.1 The process

2.1.1 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

5

Page 15: Thesis Toptesi

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. Itsposition must be described using 6 variables, 3 for the position p = [x(t),y(t),z(t)] and 3for the orientation φ = [α(t), β(t), γ(t)]. The trajectory of the electrode is irrelevant forthis thesis. Then is possible, without loss of generality, to reduce the degree of freedomof the electrode from 6 to 1. For simplicity, the choice of the degree of freedom is themovement along the z axis with a fixed orientation. Then the position of the electrodecan be described by the variable z(t) as shown in figure 2.2.

Electrode (tool)

Workpiece

δ(t)

zp(t)

z(t)

Figure 2.2. EDM basics

where

Symbol Description Unit of measurez(t) Position of the EDM electrode [m]zp(t) Depth of the erosion [m]δ(t) = z(t)− zp(t) Distance between Electrode and workpiece (Gap) [m]V (t) Removed material (contamination) [m3]

The generation of the spark and the relative wear can be explained with the followings6 steps

1. The tool is lowered while the gap distance δ(t) reaches the ideal value. Then a highvoltage is applied to the gap and a strong electrical field is applied between the tooland the workpiece (figure 2.3, step 1).

2. The electrical field accelerates some particles with negative charge (electrons) whichgenerate an avalanche effect breaking the insulation of the dielectric. The result is

6

Page 16: Thesis Toptesi

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. Aftersome time, called ionization time td, the dielectric is completely ionized and a plasmachannel is created (figure 2.3, step 3).

4. In the fluid a flow of ion starts flowing in the direction of the negative pole (theworkpiece). The ion flow builds up more slowly than the electron flow because theions are heavier than the electrons. The temperature of the workpiece and of theelectrode increases for the impact of the ions and electrons respectively and thefusion 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 craterson 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 thespark is extinguished in order to avoid electrical arcs. The temperature decreases.The channel of plasma implodes generating a dynamic action with the effect ofprojecting 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 thedielectric. (figure 2.3, step 6).

By convention, the polarity is called positive when the electrode (tool) is polarizedpositively towards the workpiece, negative otherwise. For fine machining EDM can workwith inverse polarity of electrode and workpiece (negative electrode negative positive work-piece). In this configuration the electrons erode the workpiece. Because the electrons arelighter than the ions, less material per unit of time is removed and smaller cavities can becreated 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 theerosion process. Sparks are produced as explained in the previous chapter in thesubsection (2.1.2).

3. After a fixed number of sparks, or when the dielectric condition is unacceptable (highcontamination V ), a washing cycle (also called timer) is executed. The washing cycleconsists in rapidly moving the electrode away from the workpiece in order to refreshthe dielectric fluid in the gap. After the washing cycle the process restarts frompoint 1.

7

Page 17: Thesis Toptesi

2 – EDM best practices and limitations

+

+

+

−−

− −

− −

− −

+

step 1 step 2 step 3

elec

tron

flow

elec

tron

flow

step 4

elec

tron

flow

ions

flow

elec

tron

flow

ions

flow

V

Workpiece

Workpiece Workpiece

Workpiece Workpiece

ElectrodeElectrodeElectrode

Electrode Electrode Electrode

Workpiece

step 5

Plasma channel

+

Vaporized material

E

+++++

+++++

+

+

+

+

+

+

+

+

++

+ ++ +

step 6

Figure 2.3. Generation of the discharge and of the relative wear

8

Page 18: Thesis Toptesi

2.3 – The process signals

The cycle of three steps is executed at a frequency from 1 Hz to 4 Hz and is called erosioncycle. In parallel to this process the machine can abort the pulse or the erosion cycle witha 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 washingcycles. An erosion cycles can be called iteration and an index j and the time index k canbe assigned as shown in figure (2.4), where index j ∈ N and k ∈ {0, . . . ,N − 1}.

- - -

Washing Washing

time [k] time [k]0 Ntime [k] 0 N N0

Erosion cycle j Erosion cycle j+1 Erosion cycle j+2

Figure 2.4. Erosion and washing cycles

2.3 The process signals

2.3.1 EDM current and voltage signals

The voltage and current signals of the spark produced from an EDM are shown in fig-ure (2.5) where

Symbol Description Unit of measureu(t) Voltage applied to the Gap [V]ue Peak voltage applied on the gap [V]ue Mean discharge voltage [V]i(t) Current trough the Gap [A]ie Peak current trough the Gap [A]ie Mean discharge current trough the Gap [A]td Ionization time [s]te Time length of the current pulse [s]to Time length of the pause [s]ti Time length of the current pulse plus ionization time [s]tp Total time length of the pulse [s]

2.3.2 EDM Input/Output signals

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

9

Page 19: Thesis Toptesi

2 – EDM best practices and limitations

6

-¾ - ¾ -

¾ -

¾ -

¾ -

XXXXXXXX

6

-cmrmn.

XXXXXXXX

tp

ti tot

ttetd

u(t)

ui

ue

i(t)

ie

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

-

-

-

-

-

EDM process

td

z

ui

ti

ε

Figure 2.6. EDM proces input and outut signals

Symbol Description Unit of measureui Voltage applied to the Gap during ionization time [V]ie Desired discharge current trough the Gap [A]ε Desired speed of the z-axis [m/s]td Ionization time Measurement [s]z Position of the z-axis Measurement [m]10

Page 20: Thesis Toptesi

2.4 – The control of the EDM

The machine can work in the following three modes

• IsopauseThe length of the pause to is maintained constant

• IsopulseThe length of the current pulse te and of the pause to are maintained constant

• IsofreqThe 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 orderto

• 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 theactuation 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 impossibleto measure the gap directly because no sensor can be inserted between the electrode andthe workpiece. The Gap size is then inferred from other measurements, typically (asconsidered in this thesis) from the ionization time td of the voltage pulse described in thesection (2.3.1). In fact the ionization time, as shown in the next chapter, depends on thegap dimension.

2.4.3 Current gap control law

The current control strategy of the gap size is to use a proportional controller

ε = K · (tdref − td)

where

11

Page 21: Thesis Toptesi

2 – EDM best practices and limitations

Symbol Description Unit of measureK Proportional controller gain [m

s2]

ε Actuation signal: desired speed of the z-axis [ms ]

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

-

-

-

--

-

EDM process

ui

ti

z

td

tdref Gap

controller ε

Figure 2.7. Control loop of the ionization time td

2.5 Limitations of the current EDM control system

The behavior of the gap δ is directly influenced by the electrode motion. Ideally, thebehavior of the z-axis (and then of the gap) must be smooth along the erosion cycles. Inreality, because of the disturbance that the actual gap position controller is not able toreject, the z-axis behavior is perturbed as shown in figure 2.8. The erratic behavior of thez-axis limits the performance of the EDM process in terms of

• Erosion speed

• Resulting roughness

12

Page 22: Thesis Toptesi

2.5 – Limitations of the current EDM control system

0 20 40 60 80 100 120 140 160 180 200−0.5

0

0.5

1

1.5

2

2.5x 10

−3 Erosion font

t [s]

z [m

]

0 20 40 60 80 100 120 140 160 180 2000

0.2

0.4

0.6

0.8

1

1.2

x 10−4 mean t

d

t [s]

t d [m]

54.5 55 55.5 56 56.5 57 57.5 58

0

0.5

1

1.5

2

x 10−3 Erosion and washing cycles

t [s]

z [m

]

147 147.2 147.4 147.6 147.8 148 148.2 148.4 148.6

−9

−8.5

−8

−7.5

−7

x 10−5 Particular of the z−axis position

t [s]

z [m

]

Figure 2.8. Behavior of the EDM process: z-axis behavior (upper left): forward movementof 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-axisduring the erosion cycles (bottom right): the movement of the z-axis is not smooth

13

Page 23: Thesis Toptesi

2 – EDM best practices and limitations

14

Page 24: Thesis Toptesi

Chapter 3

EDM process modeling

The aim of this chapter is to present the mathematical model of the EDM process usedin 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 analyzedin [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 thecontamination. Under the assumption that the concentration of the contamination cconta

iscconta(t) =

V (t)Aelectrode · δ(t)

i.e. that the contamination is expressed as the ratio between eroded material volume andgap 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 beenvalidated experimentally in [2]. Then

f(δ(t)) = kδ · δ(t)n−1

andtd(t) =

kδ · δ(t)n

V (t)(3.2)

15

Page 25: Thesis Toptesi

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 manyother variables, i.e. position of the residual particles in the dielectric, ionization state ofthe dielectric, temperature, etc.

The phenomenon is well represented considering the ionization time td(t) as a randomsignal with mean value td and Weibull probability density function [2]

ftd(td) = kλ ·

(tdλ

)k−1 · e−(

tdλ

)k

∀ td ≥ 0

ftd(td) = 0 ∀ td < 0

where the parameter k > 0 is called the shape parameter and λ > 0 is called the scale pa-rameter. Given td and σ2

td, approximated formula for determining the Weibull probability

density function parameters are

λ(t) ≈ td(t)

(ln(2))1k

k ≈√√√√ln

(σ2

td

td(t)2+ 1

)

Although the Weibull probability density is motivated by physics (analogy betweenbreakdown and failure process), standard simulation software generally does not supportthis type of random noise as an explicit function. In order to solve this problem thefollowing 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

=1

td ·√

2 · π · σ2d

· e−(ln(td)−ln(td(t)))2

2·σ2d (3.3)

that is called log-Gaussian probability density function. In this type of function theparameters σd is related to the the random signal td(t) from the followings relations

σd =

√√√√ln

(σ2

td

td(t)2+ 1

)

In the appendices the derivation of the log-Gaussian probability density function from theformula (3.3) is presented .

In the following example the log-Gaussian and the Weibull density function have beencompared.

Example 3.1 For a median ignition time td = 0.39s and a variance of the ignition timeσ2

td= 0.25s2, the Weibull probability density function and its approximation shown in

figure (3.1) are obtaind.

16

Page 26: Thesis Toptesi

3.1 – Mathematical model of the gap

0 0.5 1 1.5 20

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Td

f(T

d) [1

/s]

Figure 3.1. Weibull density (continuous line) and its approximation (dashed line)

3.1.3 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 relatingenergy dissipated into the gap with the removed material. The energy dissipated is thetime integral of the power in the gap P (t) = u(t) · i(t) where u(t) and i(t) are the voltageand current through the gap. Then

V (t) = α ·∫ t

0P (t) · dt + V0 = α ·

∫ t

0u(t) · i(t) · dt + V0

Under the assumption of operation with the isopulse mode, the following conditions canbe stated

• For values of the ionization time td(t) = 0 or td(t) ≥ te ,where te is the current pulselength, the energy dissipated during the pulse, and thus the quantity of removedmaterial, is 0 (pulse without removal).

In the case when td(t) ≥ te the energy dissipated into the gap is 0 because machinein this case the supervisor system of the EDM process interrupts the dischargegeneration.

17

Page 27: Thesis Toptesi

3 – EDM process modeling

• For values of the ionization time 0 < td(t) < te the energy dissipated during thepulse, 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∑

i=0

s(i) · α ·∫ tp

0u(t) · i(t) · dt + V0 (3.4)

where {s(i) = 0 ⇔ td(i) = 0 ∨ td(i) > tes(i) = 1 ⇔ 0 < td(i) ≤ te

is a signal for discriminating between good and bad pulses (s=1 pulse with removal, s=0pulse without removal).

Equation (3.4) can be rewritten as follows

V (k) =k∑

i=0

s(i) ·∆V + V0 (3.5)

where

∆V = α ·∫ tp

0u(t) · i(t) · dt

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 casewhere the electrode has a constant size geometry, see figure (2.2), the depth of the erosionzp is an affine function of V

zp(k) =V (k)

Aelectrode− V0

Aelectrode+ zp0 (3.6)

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

zp(k) =k∑

i=0

s(i) · ∆V

Aelectrode+ zp0 (3.7)

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

18

Page 28: Thesis Toptesi

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 deter-ministic gap model (3.2), the following model of the gap is obtained

td(k) = td(k) · eN(σtd,0) =

kδ · δ(k)n

V (k)· eN(σtd

,0) (3.8)

where

δ(k) = zp(k)− z(k) =∑k

i=0 s(i) · ∆VAelectrode

+ zp0 − z(tp · k)

V (k) =∑k

i=0 s(i) ·∆V + V0

with {s(i) = 0 ⇔ td(i) = 0 ∨ td(i) > tes(i) = 1 ⇔ 0 < td(i) ≤ te

After each washing cycle (timer) the value of the variable zp0 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 Description Unit of measureZref(z) Desired position of the z-axis [m]Z(z) Measured position of the z-axis [m]F (z) Applied force [N]C(z) Controller of the position (PD) [-]G(z) Discrete-time model of the z-axis [-]

e -- -6

- G(z)C(z)+-E(z) F (z)Zref(z) 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 fig-ure (3.3). From the second Newton law the following ordinary differential equation isobtained

m · z(t) = f(t)− c · z(t)

19

Page 29: Thesis Toptesi

3 – EDM process modeling

QQ

QQs

HHHj ?

?6

Workpiecez(t)

mc · z(t)

f(t)

Moving mass (electrode + z-axis)

Figure 3.3. Model of the mechanical system

20

Page 30: Thesis Toptesi

3.2 – Mathematical model of the z-axis

where

Symbol Description Unit of measurez(t) Position of the z-axis [m]m Mass of the axis [Kg]c Viscous damping coefficient [N · s/m]f Applied force [N ]

The corresponding transfer function of the system is

G(s) =Z(s)F (s)

=1

m · s2 + c · s (3.9)

or in discrete-time

G(z) =

(mc2·(e−

cm·Ts − 1

)+ Ts

c

)· z +

(mc2·(e−

cm·Ts − 1

)− Ts

c · e−cm·Ts

)

z2 −(1 + e−

cm·Ts

)· z + e−

cm·Ts

(3.10)

3.2.2 Discrete-time z-axis controller

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

C(z) =F (z)E(z)

(3.11)

= Kp + Kd · 1− z−1

Ts(3.12)

=

(Kp + Kd

Ts

)· z − Kp

Ts

z(3.13)

3.2.3 Closed-loop discrete-time model of the axis

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

GCL(z) =Z(z)

Zref(z)(3.14)

=C(z) ·G(z)

1 + C(z) ·G(z)(3.15)

=ACL · z2 + BCL · z + CCL

z3 + DCL · z2 + ECL · z + FCL(3.16)

21

Page 31: Thesis Toptesi

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 signaldetermined from the controller ε. In fact the actuation signal is a velocity.The signal isconverted 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 washingcycle plus a offset called Float.

The signal zref can be expressed in function of the controller actuation signal ε asfollows

zref =k∑

0

ε(k) · Ts + z0 + Float (3.17)

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 modelspresented in the previous section are connected as in figure (3.4).

­

®

ª

©

-

­

®

ª

©

- -z

model

Gap

EDM process

ε tdz-axis

Figure 3.4. Blocks diagram of the EDM process

22

Page 32: Thesis Toptesi

Chapter 4

EDM system identification

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

4.1 EDM process configuration and measurements

The most important configuration parameters, from the identification point of view, aresummarized in the following table

Symbol Description Value Unit of measurete Time length of the pulse of current 154 · 10−6 [s]C Compression 20 [-]Aelectrode Size of the electrode 3.53 · 10−4 [m2]δ0 Gap dimension at the begin of the erosion cycle 125 · 10−6 [m]Ts Sampling time 1 · 10−3 [s]

The compression C it is the representation of the reference ionization time tdref on thecurrent EDM process. The relation between compression and reference ionization time isthe following

tdref = 1− C

50= 92.4 · 10−6 s

A complete list of the configuration parameters can be found in the appendices.The available measurement are

Symbol Description Unit of measurez Position of the z-axis [m]td Mean of the ionization time in the k-1 sampling time Ts [s]Ntotal Total number of electrical spark [-]Ngood Number of electrical spark with removal different to 0 [-]

23

Page 33: Thesis Toptesi

4 – EDM system identification

4.2 Identification of the mathematical model of the Gap

4.2.1 Average of the measurements

In order to increase the signal-to-noise ratio, the averages of the z and td signals have beenused for this part of the model identification. The average of the signals are indicated withthe 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 measure-ments is searched for.

From equation (3.6), the average erosion speed zp is the following function of averageremoval speed V .

zp = − V

Aelectrode

Taking in consideration that the gap dimension is stationary along the erosion cycles, thefollowing equation can be written

z = zp

obtainingV = −z ·Aelectrode (4.1)

The average of the z-axis speed z can be estimated starting from assuming that theaverage position z of the electrode is

z(Ts · k) = z · Ts · k + b

With the available measurements the following over-determined linear system of equationscan be written

yn×1 = ΦN×2 · θ2×1 + ωN×1

with

y =

z(0)...

z(N)

Φ =

0 1...

...N · Ts 1

θ =[

z b]T

ω =[

ω0 . . . ωN

]T

where θ are the parameters of the affine function that describe the z-axis average forwardmovement and ω is a perturbation given by the disturbance (measurement noise, modeluncertain). In order to find the estimate θ of the unknown parameter θ, a linear least-square optimization, described in the proposition (A.2), can be applied.

[ˆzb

]= Φ+ · y

24

Page 34: Thesis Toptesi

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 · 10−7 m

s

then for the equation 4.1 V is

ˆV = −Aelectrode · ˆz = 7.5190 · 10−12 m3

s

0 50 100 150−0.2966

−0.2966

−0.2966

−0.2966

−0.2966

−0.2965

−0.2965

−0.2965

−0.2965

−0.2965z−axis position

t [s]

z [m

]

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 thevolume of removed material during an effective discharge ∆V as follow

N∑

i=0

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

and then∆V = V · tp · N∑N

i=0 s(i)= 2.1452 · 10−15 m3

25

Page 35: Thesis Toptesi

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 deterministiccomponent of the gap model (3.8) under the assumption

zp(k) = ˆz · Ts · k + δ0

V (k) = ˆV · Ts · k + V0

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 consideredbetween the limits indicated on the figure. Between this two limits the system can beconsidered stationary and all made assumption are valid these.

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45−20

−15

−10

−5

0

5x 10

−6 Mean of the z−axis position during the erosion period

t [s]

z [m

]

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.450.6

0.8

1

1.2

1.4

1.6x 10

−4 Mean of the ionization time

t [s]

t d [s]

Figure 4.2. Average of the erosion cycle used for parametric identification of the determin-istic component of the gap model

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

log(td(k) ·

(ˆV · Ts · k0 + V0

))= log (kδ) + n · log

(z · Ts · k + δ0 − z(k))

)

26

Page 36: Thesis Toptesi

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 bewritten

yn×1 = Φn×2 · θ2×1 + ωn×1

with

y =

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))

)

θ =[

log (kδ) n]T

ω =[

ω0 . . . ωn

]T

where θ is the vector of the model parameters and ω is a perturbation given bv thedisturbance (measurement noise, model uncertain).

In order to find the estimate θ of the unknown parameter vector θ, a linear least-squareoptimization, described in the proposition (A.2), can be applied.

[ ˆlog (kδ)n(V0)

]= Φ+ · y(V0)

The same is repeated for different values of V0. Then the optimal parameters ( ˆlog (kδ(V0)),n(V0))arethose minimizing the cost function J(V0) = εT · ε = (y − Φ · θ(V0)))T · (y − Φ · θ(V0)). Anexample is reported in figure (4.3). The relative parameters of the gap model are n = 2.86and kδ = 2.2728 · 10−4 s·m3

mn

The result of the interpolated function superposed on the real measurements are shownin 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 value of σd.With td(t) assumed to be constant, the probability density function of the random

component of td (3.3) becomes

ftd(td) = 1

td·√

2·π·σ2d

· e−(ln(td)−ln(td(t)))2

2·σ2d + a · δ(td − te) ⇔ td ∈ [0,te]

ftd(td) = 0 ⇔ td 6∈ [0,te]

where

a =∫ ∞

te

1

td ·√

2 · π · σ2d

· e−(ln(td)−ln(td(t)))2

2·σ2d dtd =

12· erfc

(ln(tdref)− ln(td(t))√

2 · σd

)

27

Page 37: Thesis Toptesi

4 – EDM system identification

0 0.5 1 1.5 2 2.5

x 10−9

0.5

0.55

0.6

0.65

0.7

0.75

0.8

V0

e2

Figure 4.3. Cost function of V0

−9.15 −9.14 −9.13 −9.12 −9.11 −9.1 −9.09 −9.08 −9.07 −9.06−32

−31.9

−31.8

−31.7

−31.6

−31.5

−31.4

−31.3

log(δ) [−]

log(

t d.*(t

ime*

beta

+V

0)) [−

]

0 0.05 0.1 0.15 0.2 0.25 0.3 0.357.5

8

8.5

9

9.5

10x 10

−5

t [s]

t d [s]

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

and the µ2 momentum is

µ2[td(σd)] = E[td2]

28

Page 38: Thesis Toptesi

4.3 – Identification of the z-axis dynamics

=∫ ∞

−∞td

2 · ftd(td) · dtd

=∫ tdref

0td · 1√

2 · π · σ2d

· e−(ln(td)−ln(td(t)))2

2·σ2d · dtd + tdref

2 · ·a

=e2·(ln(td(t))−σ2

d)

2· erf

(ln(tdref)− ln(td(t))− 2 · σ2

d√2 · σd

)+ tdref

2 · 12· erfc

(ln(tdref)− ln(td(t))√

2 · σd

)

In order to obtain an estimation of the unknown value σd, the value of the followingcost-function has been determined for different values of σd. The results are shown infigure (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,

4 6 8 10 12 14

0

1

2

3

4

5

6

7

8

9

10

x 10−20

σd2

e2

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 asinput signal. The system is then identified with non-parametric (spectrum) and para-metric methods (n4sid). Figure 4.6 shows the two frequency responses of the parametric

29

Page 39: Thesis Toptesi

4 – EDM system identification

identification and of the non parametric identification. The difference between the tworesults is very small.

10−1

100

101

102

103

10−2

10−1

100

101

|Z(jw

)|/|Z

ref(

jw)|

[−]

f [Hz]

Figure 4.6. Superposition of the resulting Bode diagram from the non parametric identi-fication (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 themodel just presented. Then is possible to conclude the the model describe well the realbehavior of the EDM process.

30

Page 40: Thesis Toptesi

4.4 – Comparison between simulation and real behavior

0 20 40 60 80 100 120 140 160−14

−12

−10

−8

−6

−4

−2

0

2x 10

−5 Erosion font

t [s]

z [m

]

0 20 40 60 80 100 120 140 160−14

−12

−10

−8

−6

−4

−2

0

2

4x 10

−5 Erosion font

t [s]z

[m]

0 20 40 60 80 100 120 140 1600

0.2

0.4

0.6

0.8

1

1.2

x 10−4 mean t

d

t [s]

t d [m]

0 20 40 60 80 100 120 140 1600

0.2

0.4

0.6

0.8

1

1.2

x 10−4 mean t

d

t [s]

t d [m]

48 48.2 48.4 48.6 48.8 49 49.2 49.4 49.6

−5

−4.5

−4

−3.5

−3

−2.5

x 10−5 Particular of the z−axis position

t [s]

z [m

]

155 155.5 156 156.5

−1.25

−1.2

−1.15

−1.1

−1.05

−1

−0.95

−0.9

−0.85

−0.8

x 10−4 Particular of the z−axis position

t [s]

z [m

]

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

31

Page 41: Thesis Toptesi

4 – EDM system identification

32

Page 42: Thesis Toptesi

Chapter 5

New control strategy for EDM

In general, current control methods for the working gap distance are based on the principlethat 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. areference speed signal). With this kind of approach, even if the same operation is performedrepeatedly and under same operating condition, the valuable information incorporated inthe tracking error of each repetition gets lost.

In order to increase the performance of the EDM process, a new control strategy forthe 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 outputsbut 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 taskmultiple times can be improved by learning from previous executions (iterations).

For instance, a basketball player shooting a throw from a fixed position can improve hisor her ability by practicing the shot repeatedly. During each shot, the basketball playerobserves the trajectory of the ball and consciously plans an alteration in the shootingmotion for the next attempt. As the player continues to practice, the correct motion islearned and becomes ingrained into the muscle memory so that the shooting accuracyis iteratively improved. The converged muscle motion profile is an open-loop controlgenerated through repetition and learning. This type of learned open-loop control strategyis 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

Page 43: Thesis Toptesi

5 – New control strategy for EDM

Figure 5.1. A two-dimensional, first-order ILC system. At the end of each iteration, theerror is filtered through L, added to the previous control, and filtered again through Q. Thisupdated 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 outputtrajectory must be repeated iteratively. Find the input signal, u(k), in order to minimizethe tracking error e(k) = yref(k)− y(k).

An index j, with j ∈ N, is assigned to each iteration. The control signal of theiteration 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)

whereuj =

[uj(0) uj(1) . . . uj(N − 1)

]T

ej =[

ej(0) ej(1) . . . ej(N − 1)]T

This means that the actuation signal at the sample k and iteration j + 1 can be functionof the values of the actuation signal and of the error signals u and e at any instant k andat any iteration j, as shown in figure (5.1) [4].

Generally the class of controllers based on the above learning algorithm is namedIterative Learning Control (ILC). With the forward time-shift operator q the widelyused 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 learningfunction and d is the delay of the system.

34

Page 44: Thesis Toptesi

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 followingsymbols can be defined

tdref, j(k) Desired ionization timetdj(k) Ionization timezj(k) Trajectory of the z-axiszpj(k) Depth of the erosionzA, j(k) Erosion profileδj(k) = zj(k)− zpj(k) Distance between electrode and workpiece (Gap)ej(k) = tdref, j(k)− tdj(k) Control erroruj(k) Actuation signal of the z-axisbV (k) 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 choicefor modeling the system. In this domain the signals are represented as follow

tdref, j =[

tdref, j(0) . . . tdref, j(k) . . . tdref, j(N − 1)]T

tdj =[

tdj(0) . . . tdj(k) . . . tdj(N − 1)]T

zj =[

zj(d) . . . zj(k) . . . zj(N + d− 1)]T

zpj =[

zp(d) . . . zp(k) . . . zp(N + d− 1)]T

zA, j =[

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

δj =[

δj(d) . . . δj(k) . . . δj(N + d− 1)]T

ej =[

ej(d) . . . ej(k) . . . ej(N + d− 1)]T

uj =[

uj(0) . . . uj(k) . . . uj(N − 1)]T

bV =[

bV (0) . . . bV (k) . . . bV (N − 1)]T

In general in the lifted domain, the output y = [y(0),y(1), . . . ,y(N − 1)] of a linearsystem excited by an input signal u = [u(0),u(1), . . . ,u(N − 1)] is determined by a multi-plication of the input signal u with a Toeplitz matrix P

y = P · u

For causal systems the matrix P is lower triangular, of the form

P =

p0 0 . . . . . . 0

p1. . . . . .

...

p2. . . . . . . . .

......

. . . . . . . . . 0pN . . . p2 p1 p0

35

Page 45: Thesis Toptesi

5 – New control strategy for EDM

where {p0,p2, . . . ,pN−1} are the first N samples of the impulse response of the system. Inorder to set the initial state of the system at the value of the first sample of the inputsignal, the matrix becomes

P =

1 0 . . . . . . 0

1− p0 p0. . .

...

1− p1 − p0 p1. . . . . .

......

.... . . . . . 0

1−∑N−1i=0 pN−1 . . . p1 p0

(5.2)

The following vector and matrix are defined

[1] = [1, . . . ,1]T

[0 1] =

0 . . . 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 thissection a linearization of the gap model is proposed.

For the working-point dimension of the δ, the values of the ionization time tdV (k) forthe respective contamination level V = V (k) can be approximated with the help of theaffine function

td(k) = kδ · δ(k)n

V (k)≈ kδlin · δ(k) + bV (k) (5.3)

As an example in figure (5.2), the linear approximations of the gap model for the twoextreme 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, kδlin and bV (k), have benn determined as follows:

1. The working point values of the gap distance δ0(k) in order to maintain the de-sired ionization time tdref with the variation of the contamination V (k) has beendetermined.

2. With a lest-square optimization the pendency of the functions: tdVmin= kδlinVmin

·δ(k) + b1 and tdVmax

= kδlinVmax · δ(k) + b2 that approximates the ionization timetd in function of the gap distance δ0 for the minimal and maximal values of thecontamination Vmin and Vmax has been determined. Then kδlin is assumed equal tothe mean of the two obtained value.

3. With a lest-square optimization the values of the offset bV (k) of the function: td =kδlin ·δ(k)+ bV (k) have been determined for all levels of contamination between Vmin

and Vmax have been determined.

36

Page 46: Thesis Toptesi

5.1 – Iterative Learning Control (ILC) of the ionization time

1.05 1.1 1.15 1.2

x 10−4

6

7

8

9

10

11

12

13x 10

−5

Td [s

]

Gap size [m]

Figure 5.2. Ionization time tdVmin for Vmin (continuous line) and tdVmax 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 pointFrom the non linear model of the gap

δ(k) =

td(k) ·

(V0 + V · tp · k

)

1n

the values of the gap at the working point, i.e. the values that maintaining the idealvalue of td(k) = tdref , are

δ0(k) =

tdref ·

(V0 + V · tp · k

)

1n

2. Determination of the parameter kδ lin of gap the linear modelWith the values of δ(t) at the working point and relatives ionization time td forthe minimal value of the contamination Vmin, the following over-determined linearsystem of equations can be written

yN×1 = AN×2 · θ2×1 + ωN×1

37

Page 47: Thesis Toptesi

5 – New control strategy for EDM

with

y =

tdVmin, 0...

tdVmin, N

A =

δ0 1...

...δN 1

θ =[

kδlinVminb

]T

ω =[

ω0 . . . ωN

]T

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

[ ˆkδlinVmin

b

]= A+ · y

With the values of δ(t) at the working point and relatives ionization time td for themaximal value of contamination Vmax, the following over-determined linear systemof equations can be written

yN×1 = AN×2 · θ2×1 + ωN×1

with

y =

tdVmax, 0...

tdVmax, N

Φ =

δ0 1...

...δN 1

θ =[

kδlinVmax b]T

ω =[

ω0 . . . ωN

]T

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

[ ˆkδlinVmax

b

]= A+ · y

Finally the parameter kδ lin is assigned equal to the mean of the two extreme pen-dency

kδlin =ˆkδlinVmin

+ ˆkδlinVmax

2= 2.3883

38

Page 48: Thesis Toptesi

5.1 – Iterative Learning Control (ILC) of the ionization time

3. Determination of the parameter bV (k) of gap the linear modelWith the values of δ(t) at the working point and relatives ionization time td forany value of contamination V (k), the following over-determined linear system ofequations can be written

yN×1 = AN×2 · θ2×1 + ωN×1

with

y =

tdV (k), 0 − kδlin · δ0...

tdV (k), N − kδlin · δN

Φ =

1...1

θ =[

bV (k)]T

ω =[

ω0 . . . ωN

]T

For any value of k the following solution is found[

ˆbV (k)]

= Φ+ · y

The bV (k) parameter is shown, in function of k, in figure (5.3).

0 100 200 300 400 500 600−4.9

−4.8

−4.7

−4.6

−4.5

−4.4

−4.3

−4.2x 10

−4

b V [s

]

k [−]

Figure 5.3. bV (k) in function of k

39

Page 49: Thesis Toptesi

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 representa-tion, in figure (5.4). The block D represents the derivative operator. The derivative it is

kk

-

-

-

--

-

¾

6

----

6

­

®

ª

©

EDM process

ui

ti

z

td

Gap

controller

tdref

eQ

1z

D+

+L

-

+

td

tdref εu

ε

Figure 5.4. EDM process controlled by the ILC controller

necessary because, in order to simplify the problem, the controller design in the followingsections has been developed with the assumption that the desired position of the z-axis isthe 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, infigure (5.5). The matrices

P z-axis modelQ Q filterLi Learning function, with i = {1,2}

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

40

Page 50: Thesis Toptesi

5.1 – Iterative Learning Control (ILC) of the ionization time

k

-

-

-

-

? -

6

­

®

ª

©1z

L1

L2

e

1z2

+

+

L

Figure 5.5. Learning operator - Variant 1

zj+1 = P · uj+1 + [0 1] · zj

δj+1 = zj+1 − zpj+1

tdj = kδlin · δj + bV + nj

zpj+1 = zA, j + zpj

the adopted ILC controller is{

uj+1 = Q · (uj + L1 · ej + L2 · ej−1)ej = tdref, j − tdj

From the process and controller descriptions, the equation that describes the behaviorof the controller and process combined can be obtained

δj+1 =(P ·Q · P−1 − P ·Q · L1 · kδlin + [0 1]

) · δj+(−P ·Q · L2 · kδlin − P ·Q · P−1[0 1]) · δj−1 − zA, j + P ·Q · P−1 · zA, j−1

+P ·Q · L1 · tdref, j + P ·Q · L2 · tdref, j−1 − P ·Q · L1 · bV − P ·Q · L2 · bV

−P ·Q · L1 · nj − P ·Q · L2 · nj−1

(5.4)Then the following state-space matrix form is obtained

[δj+1

δj

]=

[A11 A12

I 0

]

︸ ︷︷ ︸Φ

·[

δj

δj−1

](5.5)

+[ −I B12 B13 B14 B15 B16 B17

0 0 0 0 0 0 0

]

︸ ︷︷ ︸Γ

·

zA, j

zA, j−1

tdref, j

tdref, j−1

bV

nj

nj−1

(5.6)

41

Page 51: Thesis Toptesi

5 – New control strategy for EDM

whereA11 = P ·Q · P−1 − P ·Q · L1 · kδlin + [0 1]A12 = −P ·Q · L2 · kδlin − P ·Q · P−1 · [0 1]B12 = P ·Q · P−1

B13 = P ·Q · L1

B14 = P ·Q · L2

B15 = −P ·Q · (L1 + L2)B16 = −P ·Q · L1

B17 = −P ·Q · L2

5.1.5 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 · ej−1)

is typically set as a low-pass filter. The learning operators L1 and L2 have been chose asconstant.

Values of matrices

The controller and system matrices are

L1 = l1 · I

L2 = l2 · I

Q =

1 0 . . . . . . 0

1− q0 q0. . .

...

1− q1 − q0 q1. . . . . .

......

.... . . . . . 0

1−∑N−20 qi qN−2 . . . q1 q0

P =

1 0 . . . . . . 0

1− p0 p0. . .

...

1− p1 − p0 p1. . . . . .

......

.... . . . . . 0

1−∑N−20 pi pN−2 . . . p1 p0

(5.7)

where {q0, . . . ,qN−2} are the first N − 1 samples of the impulse response of the low-passfilter, and {p0, . . . ,pN−2} are the first N − 1 samples of the impulse response of the z-axis system. The first sample of the input signals to the matrices Q and P represent theoffsets of the respective output signals. Then the matrices have the form described inequation (5.2).

42

Page 52: Thesis Toptesi

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 followingrelations can be written

P−1 ·Q · P = QP−1 ·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 asfollows

A11 = Q− P ·Q · L1 · kδlin + [0 1]A12 = −P ·Q · L2 · kδlin − [0 1]B12 = Q

With the matrices (5.7) the matrices A11 and A12 become

A11 =

α 0 . . . . . . 1

α− α0 α0. . .

...

α− α1 − α0 α1. . . . . .

......

.... . . . . . 1

α−∑N−20 αi αN−2 . . . α1 α0 + 1

A12 =

β 0 . . . . . . −1

β − β0 β0. . .

...

β − β1 − q0 β1. . . . . .

......

.... . . . . . −1

β −∑N−20 βi βN−2 . . . β1 β0 − 1

whereα = 1− l1 · kδlin

αi = qi − kδlin · l1 ·∑i

j=0 qi−j · pj

β = −l2 · kδlin

βi = −kδlin · l2 ·∑i

j=0 qi−j · pj

(5.8)

Stability

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

[δ∗j

δ∗j−1

]= T−1 ·

[δj

δj−1

]

where

T =[

J 00 J

]

43

Page 53: Thesis Toptesi

5 – New control strategy for EDM

and

J =

1 0 . . . . . . 0

1 1 0...

... 0. . . . . .

......

.... . . 1 0

1 0 . . . 0 1

Then the system with the new state variables representation becomes[

δ∗j+1

δ∗j

]= T−1 ·

[A11 A12

I 0

]· T

︸ ︷︷ ︸Φ∗

·[

δ∗jδ∗j−1

]

+T−1 ·[ −I B12 B13 B14 B15 B16

0 0 0 0 0 0

]

︸ ︷︷ ︸Γ∗

·

zA, j

zA, j−1

tdref, j

tdref, j−1

nj

nj−1

where Φ∗ is of the form

Φ∗ =[

A∗11 A∗12

I 0

]

with

A∗11 =

α + 1 0 . . . . . . 1

0 α0. . . 0

... α1. . . . . .

......

.... . . . . . 0

0 αN−2 . . . α1 α0

A∗12 =

β − 1 0 . . . . . . −1

0 β0. . . 0

... β1. . . . . .

......

.... . . . . . 0

0 βN−2 . . . β1 β0

The eigenvalues of the matrix Φ∗ are

|λ · I − Φ∗| =∣∣∣∣[

λ · I −A∗11 −A∗12

−I λ · I]∣∣∣∣ = 0

With the application of the Schur rule the determinant is equal

|(λ · I −A∗11) · (λ · I) + A∗12| = 0

44

Page 54: Thesis Toptesi

5.1 – Iterative Learning Control (ILC) of the ionization time

or, exploded,∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣

λ2 − λ · (α + 1) + β − 1 0 . . . . . . 0 λ− 10 λ2 − λ · α0 − β0 0 . . . . . . 0... −λ · α1 − β1

. . . . . ....

......

. . . . . ....

......

. . . 00 −λ · αN−2 − βN−2 . . . λ2 − λ · α0 − β0

∣∣∣∣∣∣∣∣∣∣∣∣∣∣∣

= 0

The matrix is composed of two triangular blocks in the diagonal. Thus the determinantis 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 · kδlin)− l2 · kδlin − 1

)= 0

(λ2 − λ · (q0 − kδlin · l1 · q0 · p0) + kδlin · l2 · q0 · p0

)N−1 = 0

Thus we have two eigenvalues from the first equation at the values

λ1,2 =(2− l1 · kδlin)±

√(2− l1 · kδlin)

2 − 4 · (l2 · kδlin + 1)

2

and N − 1 identical pairs of eigenvalues from the second equation at the values

λ1,2 =(q0 − kδlin · l1 · q0 · p0)±

√(q0 − kδlin · l1 · q0 · p0)

2 − 4 · kδlin · l2 · q0 · p0

2

The system is asymptotically stable if and only if all eigenvalue λ satisfies |λ| < 1. The l1and 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 stationaryconditions. Consequently tdref, j ,zA, j are independent from j and moreover Q · zA = zA

and Q · tdref = tdref because tdref ∝ [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∞ = tdref − td∞ = tdref − kδlin · δ∞ − bV

45

Page 55: Thesis Toptesi

5 – New control strategy for EDM

The e∞ term can be determined from equation (5.6)

[δ∞δ∞

]=

[A11 A12

I 0

]

︸ ︷︷ ︸Φ

·[

δ∞δ∞

]+

[ −I B12 B13 B14 B15

0 0 0 0 0

]

︸ ︷︷ ︸Γ

·

zA,∞zA,∞

tdref,∞tdref,∞

bV

Then

δ∞ = (I −A11 −A12)−1 · [ −I + B12 B13 + B14 B15

] ·

zA,∞tdref,∞

bV

From equation

(I −A11 −A12) = (I −Q + Q · L1 · kδlin + Q · L2 · kδlin)

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 stepcan be performed. From the conclusion that the term [0 1] does not influence the stationaryvalue, δ∞ of the equation (5.4) can be obtained from the stationary value of the systemobtained from (5.4) without the term [0 1]

δj+1 = (Q−Q · L1 · kδlin) · δj −Q · L2 · kδlin · δj−1

−zA, j + P ·Q · P−1 · zA, j−1 − P ·Q · L1 · bV − P ·Q · L2 · bV

+P ·Q · L1 · tdref, j + P ·Q · L2 · tdref, j−1

From the z-axis identification (4.6) it is possible conclude that the dynamics of the z-axis is faster than the control band width of the gap controller. Then the z-axis canbe approximated as a static process, then P = I. If the low-pass filter Q is chosen asfirst order low-pass filter with transfer-function Q(z) = (1−q)·z

z−q , then the system can bedescribed, in the time domain, by the following system of equations

zj+1(k) = uj+1(k)δj+1(k) = zj+1(k)− zA(k)tdj(k) = kδlin · δj(k) + bV

uj+1(k) = (uj(k) + ej(k) · l1 + ej−1(k) · l2) · (1− q) + uj+1(k − 1) · qej(k) = tdtef(k)− tdj(k)

which for j →∞ becomes

z∞(k) = u∞(k)δ∞(k) = z∞(k)− zA(k)td∞(k) = kδlin · δ∞(k) + bV

u∞(k) = (u∞(k) + e∞(k) · l1 + e∞(k) · l2) · (1− q) + u∞(k − 1) · qe∞(k) = tdtef(k)− td∞(k)

46

Page 56: Thesis Toptesi

5.1 – Iterative Learning Control (ILC) of the ionization time

Then the following recursive equation can be obtained

δ∞(k) =δ∞(k − 1)

q − kδlin · (l1 + l2) · (q − 1)

+q · (−zA(k) + zA(k − 1))− (tdref(k)− bV (k)) · (l1 + l2) · (q − 1)

q − kδlin · (l1 + l2) · (q − 1)

where the initial value of the above recursive equation is

δ∞(0) =tdref(0)− bV (0)

kδlin

because the tracking error of the first point of the iteration is 0. For the considered typicalcase, the reference ionization time is tdref = 7.3073 · 10−5s and Q low-pass filter with cut-off 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

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.50

0.5

1

1.5x 10

−5

Infin

ite e

rror

e [s

]

t [s]

Figure 5.6. steady-state error

conclusion is that with this method the stationary error is not negligible. This method isthus 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 acurve can be used. In this case the matrix Q of the controller equation

uj+1 = Q · (uj + L1 · ej + L2 · ej−1)

47

Page 57: Thesis Toptesi

5 – New control strategy for EDM

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

5.1.7 Determination of the matrix representing the least-square mini-mization

From the appendices, the parameters θ that minimize the cost function

J(θ) = (y − Φ · θ)T · (y − Φ · θ)

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 . . . 01 1 1 . . . 11 22 23 . . . 2order

......

......

1 N − 1 (N − 1)2 . . . (N − 1)order

which corresponds to a linear least-square with polynomial of order : ”order” as basisfunction. The polynomials basis has been choice because it can be well approximate thebehavior 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 dynamicsof the z-axis is much faster than the control band width of the gap control. Then the z-axiscan be approximated as a static process and P = I.

The matrices of the controller and process become

L1 = l1 · I

L2 = l2 · I

Q = Φ · (ΦT · Φ)−1 · ΦT

P = I

48

Page 58: Thesis Toptesi

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 · kδlin − [0 1]

Stability

The eigenvalues of the matrix Φ are

|λ · I − Φ| =∣∣∣∣[

λ · I −A11 −A12

−I λ · I]∣∣∣∣ = 0

With the application of the Schur rule the determinant is equal

|(λ · I −A11) · (λ · I)−A12| = 0

or, exploded,∣∣λ2 · I −Q · λ + Q · L1 · kδlin · λ− [0 1] · λ + Q · L2 · kδlin + [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

vTi ·

(λ2 · I −Q · λ + Q · L1 · kδlin · λ− [0 1] · λ + Q · L2 · kδlin + [0 1]

)= 0

With a vector vi equal to a right eigenvector of the Q matrix ∈ Null{Q} (i.e)

vTi ·Q = 0

where i ∈ [1,2, . . . ,N− order− 1], the equation (5.1.7) becomes

vTi ·

(λ2 · I −Q · λ + Q · L1 · kδlin · λ− [0 1] · λ + Q · L2 · kδlin + [0 1]

)= 0

vTi · λ2 = 0

λ2 = 0λ1,2 = 0

Similarly, with a different choice of the eigenvector vi , a total number of N−order−1of linear independent vi vector can be found. Then the matrix and also Φ, possessesN − order − 1 couple of eigenvalues at 0.

49

Page 59: Thesis Toptesi

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 · kδlin · λ− [0 1] · λ + P ·Q · L2 · kδlin + [0 1]

)·vi = 0

With vector vi equal to a right eigenvector of the Q matrix (i.e)

Q · vi = vi

where [vN−order−1 . . . vN−order+k−1 . . . vorder

]=

1 . . . (N − 1)k . . . (N − 1)order

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

......

...1 . . . 1k . . . 1order

1 . . . 0 . . . 0

equation (5.1.7) becomes

(λ2 · I −Q · λ + Q · L1 · kδlin · λ− [0 1] · λ + Q · L2 · kδlin + [0 1]

) · v = 0v · λ2 − v · λ + v · L1 · kδlin · λ− [1] · vN · λ + v · L2 · kδlin + [1] · vN = 0

where vN is the last components of the vector v. For the eigenvector vN−order−1 thefollowing equations are obtained

(λ2 − λ · (2− l1 · kδlin) + l2 · kδlin + 1

) · [1] = 0

Then vN−order is a right eigenvector of the matrix with a couple of eigenvalues

λ1,2 =(2− l1 · kδlin)±

√(2− l1 · kδlin)

2 − 4 · (l2 · kδlin + 1)

2

For the other eigenvectors the the following equations are obtained

(λ2 − λ · (1− L1 · kδlin) + L2 · kδlin

) · [1] = 0

Then v is a right eigenvector of the matrix and with a couple of eigenvalues

λ1,2 =(1− l1 · kδlin)±

√(1− l1 · kδlin)

2 − 4 · l2 · kδlin

2

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

50

Page 60: Thesis Toptesi

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 stationaryconditions. Consequently tdref, j ,zA, j are independent from j and moreover Q · zA = zA,Q · tdref = tdref because tdref ∝ [1] and zA ∝ [1].

Taking in consideration the linear model of the gap, the error after an infinite numberof iterations can be expressed as follows

e∞ = tdref − td∞ = tdref − kδlin · δ∞ − bV

The e∞ term can be determined from equation (5.6)

[δ∞δ∞

]=

[A11 A12

I 0

]

︸ ︷︷ ︸Φ

·[

δ∞δ∞

]+

[ −I B12 B13 B14 B15

0 0 0 0 0

]

︸ ︷︷ ︸Γ

·

zA,∞zA,∞

tdref,∞tdref,∞

bV

then

δ∞ = (I −A11 −A12)−1 · [ −I + B12 B13 + B14 B15

] ·

zA,∞tdref,∞

bV

From equation

(I −A11 −A12) = (I −Q + Q · L1 · kδlin + Q · L2 · kδlin)

it results that the matrix [0 1] does influence the stationary value. With the developmentin series, the equation can be rewritten as follow

δ∞ =∞∑

i=0

(A11 + A12)i · [ −I + B12 B13 + B14 B15

] ·

zA,∞tdref,∞

bV

=

(Q ·

∞∑

i=1

(I − L1 · kδlin − L2 · kδlin)i + I

)

· [ −I + Q Q · L1 + Q · L2 −Q · L1 −Q · L2

] ·

zA,∞tdref,∞

bV

for the assumptions Q · zA = zA and Q · tdref = tdref , the equation can be rewritten asfollow

δ∞ =

(Q ·

∞∑

i=1

(I − L1 · kδlin − L2 · kδlin)i + I

)[

0 Q · L1 + Q · L2 −Q · L1 −Q · L2

] ·

zA,∞tdref,∞

bV

51

Page 61: Thesis Toptesi

5 – New control strategy for EDM

= Q ·∞∑

i=0

(I − L1 · kδlin − L2 · kδlin)i · [ 0 L1 + L2 −L1 − L2

] ·

zA,∞tdref,∞

bV

= Q ·∞∑

i=0

(1− l1 · kδlin − l2 · kδlin)i · [ 0 l1 + l2 −l1 − l2] ·

zA,∞tdref,∞

bV

= Q · 11− (1− l1 · kδlin − l2 · kδlin)

· (−l1 − l2) · (−tdref + bV )

= Q · 1kδlin

· tdref

︸ ︷︷ ︸1

kδlin·tdref

−Q · 1kδlin

· bV

and thuse∞ = tdref, ∞ − kδlin · δ∞ − bV = (Q− I) · bV

For the considered typical case, the reference ionization time is tdref = 7.3073 · 10−5s,from the equation above the steady-state error in figure (5.7) has been obtained. We can

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5−3

−2.5

−2

−1.5

−1

−0.5

0

0.5

1

1.5

2x 10

−7

Infin

ite e

rror

e [s

]

t [s]

Figure 5.7. 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

Page 62: Thesis Toptesi

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 · ifor the considered model of the process. The slow dynamics does not allow to follow theerosion front along a straight line.

0 200 400 600 800 1000 1200−12

−10

−8

−6

−4

−2

0

2x 10

−4 Erosion font

t [s]

z [m

]

0 200 400 600 800 1000 12000

0.2

0.4

0.6

0.8

1

1.2

x 10−4 mean t

d

t [s]

t d [m]

48 48.2 48.4 48.6 48.8 49 49.2 49.4 49.6

−5

−4.5

−4

−3.5

−3

−2.5

x 10−5 Particular of the z−axis position

t [s]

z [m

]

1326.4 1326.6 1326.8 1327 1327.2 1327.4 1327.6 1327.8 1328

−8.9

−8.88

−8.86

−8.84

−8.82

−8.8

−8.78

x 10−4 Particular of the z−axis position when the ILC control is active

t [s]

z [m

]

Figure 5.8. Behavior of the EDM process: z-axis behavior (upper left), mean of the ion-ization time td (upper right), particular of the z-axis movement with P controller (bottomleft), 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 · ifor the considered model of the process. The fast dynamics causes the interpolated line tochange continuously.

In conclusion it is not possible to find a solution in wich the erosion front is followedalong a straight and simultaneously to obtain a stationary behavior. Thus with thismethod there exist a tradeoff between the erosion front behavior and stationary behavior.

53

Page 63: Thesis Toptesi

5 – New control strategy for EDM

0 200 400 600 800 1000 1200−12

−10

−8

−6

−4

−2

0

2x 10

−4 Erosion font

t [s]

z [m

]

0 200 400 600 800 1000 12000

0.2

0.4

0.6

0.8

1

1.2

x 10−4 mean t

d

t [s]

t d [m]

48 48.2 48.4 48.6 48.8 49 49.2 49.4 49.6

−5

−4.5

−4

−3.5

−3

−2.5

x 10−5 Particular of the z−axis position

t [s]

z [m

]

1261.8 1262 1262.2 1262.4 1262.6 1262.8 1263 1263.2

−8.56

−8.54

−8.52

−8.5

−8.48

−8.46

x 10−4 Particular of the z−axis position when the ILC control is active

t [s]

z [m

]

Figure 5.9. Behavior of the EDM process: z-axis behavior (upper left), mean of the ion-ization time td (upper right), particular of the z-axis movement with P controller (bottomleft), 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 notin relative to the last point of the previous erosion cycle. Moreover the forward movementis controlled in order to maintain the mean value of the error e = tdref−td equal to 0 whilethe ionization time td during a cycle is controlled with the same approach of the previousmethod. With this kind of approach the dynamics of forward movement and behaviorduring the erosion cycle of the z-axis results decoupled and the tradeoff of the previousmethod is then solved.

For this variant the learning operator L is shown, in lifted domain representation, infigure (5.10). With the linear model (5.3) of the gap, and the following matrices

54

Page 64: Thesis Toptesi

5.1 – Iterative Learning Control (ILC) of the ionization time

k

k

-

-

-

- -

- -

-

6

--

­

®

ª

©

?

6

-

-

e

+

+

L21z

1z

L

1z

+

+ +

l3

Q1

L1

γ[1]

[1N

]T

Figure 5.10. Learning operator - Variant 2

P z-axis modelQ Least square of order = 3 (polynomial lest-square of 3◦ order)Q1 Least square of order = 0 (mean value of the input signal)Li 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 andoutput signals of the z-axis model (P), least-squares Q, Q1 and learning functions Li. TheEDM process can be described as follows

zj+1 = P · uj+1

δj+1 = zj+1 − zpj+1

tdj = kδlin · δj + bV + nj

zpj+1 = zA, j + [0 1] · zpj

the adopted ILC controller is

uj+1 = Q · (uj + L1 · ej)︸ ︷︷ ︸Controller of the td

+L2 ·Q1 · ej + [1] · l3 · γj︸ ︷︷ ︸Advancement compensation

γj+1 = 1N [1]T · ej + γj

ej = tdref, j − tdj

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

δj+1 =(P ·Q · P−1 − P ·Q · L1 · kδlin − P · L2 ·Q1 · kδlin

) · δj + P · [1] · l3 · γj

−zp, j+1 + P ·Q · P−1 · zp, j + (P ·Q · L1 ·+P · L2 ·Q1) · tdref, j

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

γj+1 = − 1N [1]T · kδlin · δj + γj + qT · tdref, j − qT · bV − qT · nj

55

Page 65: Thesis Toptesi

5 – New control strategy for EDM

Then the following state-space matrix form is obtained

[δj+1

γj+1

]=

[A11 a12

a21 1

]

︸ ︷︷ ︸Φ

·[

δj

γj

]+

[ −I B12 B13 B14 B15

0 0 b23 b24 b25

]

︸ ︷︷ ︸Γ

·

zP, j+1

zP, j

tdref, j

bV

nj

(5.10)

whereA11 = P ·Q · P−1 − P ·Q · L1 · kδlin − P · L2 ·Q1 · kδlin

a12 = P · [1] · l3a21 = − 1

N · [1]T · kδlin

B12 = P ·Q · P−1

B13 = P ·Q · L1 ·+P · L2 ·Q1

B14 = −P ·Q · L1 ·+P · L2 ·Q1

B15 = −P ·Q · L1 ·+P · L2 ·Q1

b23 = 1N · [1]T

b24 = − 1N · [1]T

b25 = − 1N · [1]T

Values of matrices

From the z-axis identification (4.6) it is possible to conclude that the dynamics of thez-axis is faster than the control band width of the gap controller. Then the z-axis can beapproximated as a static process.

The matrices of the controller and process become

L1 = l1 · I

L2 = l2 · I

Q = Φ · (ΦT · Φ)−1 · ΦT

Q1 = 1N ·

1 . . . 1...

...1 . . . 1

P = 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 bewritten

Q1 ·Q = Q1

Q ·Q2 = Q1

56

Page 66: Thesis Toptesi

5.1 – Iterative Learning Control (ILC) of the ionization time

Stability

The eigenvalues of the matrix Φ satisfy the following relation

|λ · I − Φ| =∣∣∣∣[

λ · I −A11 −a12

−a21 λ− 1

]∣∣∣∣ = 0

=∣∣∣∣[

λ · I −Q + Q · L1 · kδlin + L2 ·Q1 · kδlin −[1] · l31N · [1]T · kδlin λ− 1

]∣∣∣∣ = 0

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 · kδlin + L2 ·Q1 · kδlin −[1] · l3

1N · [1]T · kδlin λ− 1

]· vi· = 0 (5.11)

The vector vi can be found as follows. With a vector ui equal to right eigenvectorof the Q matrix ∈ Null{Q} (i.e)

Q · ui = 0

where i ∈ [1,2, . . . ,N − order − 1], the following vectors vi can be constructed

vi =[

ui −Q1 · ui

0

]

The equation (5.11) becomes[

λ · I −Q + Q · L1 · kδlin + L2 ·Q1 · kδlin −[1] · l31N · [1]T · kδlin λ− 1

]·[

ui −Q1 · ui

0

]= 0

[λ · I0

]= 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 · kδlin + L2 ·Q1 · kδlin −[1] · l3

1N · [1]T · kδlin λ− 1

]· vi· = 0 (5.12)

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

vi =[

ui −Q1 · ui

0

]

57

Page 67: Thesis Toptesi

5 – New control strategy for EDM

Equation (5.12) becomes[

λ · I −Q + Q · L1 · kδlin + L2 ·Q1 · kδlin −[1] · l31N · [1]T · kδlin λ− 1

]·[

ui −Q1 · ui

0

]= 0

[(λ− 1 + l1 · kδlin) · [1]

0

]= 0

and then λ = 1 − l1 · kδlin. Similarly for the other right eigenvector ui. Then thematrix Φ, possesses order − 1 eigenvalues at 1− l1 · kδlin.

The last two eigenvalues can be found as follow. With the vector u = [1] that isequal to a right eigenvector of the Q and Q1 matrix (i.e)

Q · u = uQ1 · u = u

the following vectors v can be constructed

v =[

u · αβ

]

Equation (5.12) becomes[

λ · I −Q + Q · L1 · kδlin + L2 ·Q1 · kδlin −[1] · l31N · [1]T · kδlin λ− 1

]·[

u · αβ

]= 0

[(α · (λ− 1) + α · l1 · kδlin + α · l2 · kδlin − β · l3) · [1]

α · kδlin + β · (λ− 1)

]= 0

then{

(α · (λ− 1) + α · l1 · kδlin + α · l2 · kδlin − β · l3) · [1] = 0α · kδlin + β · (λ− 1) = 0

(5.13)

Now α and β in order to satisfies the equation (5.13) must be found. With α 6= 0and β 6= 0, equation (5.13) can be rewritten as follows

{(λ− 1) + l1 · kδlin + l2 · kδlin − β

α · l3 = 0αβ · kδlin + (λ− 1) = 0 (5.14)

From the difference between the first and second equation the following relation isobtained

l1 · kδlin + l2 · kδlin − βα · l3 − α

β · kδlin = 0α2 · kδlin − α · β (l1 · kδlin + l2 · kδlin) + β2 · l3 = 0

Then the relation between α and β is

α1,2 =(l1 · kδlin + l2 · kδlin) · β ±

√(l1 · kδlin + l2 · kδlin)

2 − 4 · β2 · l3 · kδlin

2 · kδlin

58

Page 68: Thesis Toptesi

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 lasttwo eigenvalues are obtained

α1,2

β · kδlin + (λ− 1) = 0

λ1,2 = (2−l1·kδlin−l2·kδlin)±√

(2−l1·kδlin−l2·kδlin)2−4·(1−l1·kδlin−l2·kδlin+l3·kδlin)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 theforward dynamics during the erosion cycle. In fact the poles that depend from the constantl3 regulate the forward movement. The other pole regulate the behavior inside the erosioncycle.

Determination of the steady-state error

In this section we would like to verify if with this method a null steady-state error canbe reached. In this section is then assumed that nj = 0 ∀ j, and that the process is atthe stationary conditions, consequently tdref, j ,zA, j are independent from j and moreoverQ · zA = zA, Q1 · zA = zA, Q · tdref = tdref because tdref ∝ [1] and zA ∝ [1].

Taking in consideration the linear model of the gap, the error after an infinite numberof iterations can be expressed as follow

e∞ = tdref − td∞ = tdref − kδlin · δ∞ − bV

The e∞ term can be determined from equation (5.10)

[δ∞γ∞

]=

[A11 a12

a21 1

]

︸ ︷︷ ︸Φ

·[

δ∞γ∞

]+

[ −I B12 B13 B14

0 0 b23 b24

]

︸ ︷︷ ︸Γ

·

zP + zA

zP

tdref

bV

(5.15)

From the second equation of the state-space representation (5.15) it is possible to obtain

γ∞ = a21 · δ∞ + γ∞ + b23 · tdref + b24 · bV

0 = a21 · δ∞ + b23 · tdref + b24 · bV

then with the values of the matrices

0 = − 1N· [1]T · kδlin · δ∞

︸ ︷︷ ︸kδlin·δ∞

+1N· [1]T · tdref

︸ ︷︷ ︸tdref

− 1N· [1]T · bV

︸ ︷︷ ︸bV

0 = −kδlin · δ∞ + tdref − bV

(5.16)

where δ∞ and bV are the mean values of the gap dimension and respectively of the bV

signal disturbance.

59

Page 69: Thesis Toptesi

5 – New control strategy for EDM

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

δ∞ = A11 · δ∞ + a12 · γ∞ + (B12 − I) · zp − zA + B13 · tdref + B14 · bV

with the values of the matrices becomesδ∞ = (Q−Q · L1 · kδlin − L2 ·Q1 · kδlin) · δ∞ + [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 · kδlin) · δ∞ − L2 ·Q1 · kδlin · δ∞︸ ︷︷ ︸L2·kδlin·δ∞

+[1] · l3 · γ∞

Q · zP︸ ︷︷ ︸zP

−zP − zA + Q · L1 · tdref︸ ︷︷ ︸L1·tdref

+L2 ·Q1 · tdref︸ ︷︷ ︸L2·tdref

−Q · L1 · bV − L2 ·Q1 · bV︸ ︷︷ ︸L2·bV

and for the equation (5.16)

δ∞ = (Q−Q · L1 · kδlin) · δ∞ + [1] · l3 · γ∞−zA + L1 · tdref −Q · L1 · bV −L2 · kδlin · δ∞ + L2 · tdref − L2 · bV︸ ︷︷ ︸

0

(5.17)

With the multiplication of the two sides of the equation for Q2, for the made assumptionsat the begin of the section and for the matrices properties 5.1.7, the following relation hasbeen obtained

Q2 · δ∞︸ ︷︷ ︸[1]·δ∞

= Q2 ·Q · δ∞︸ ︷︷ ︸[1]·δ∞

−Q2 ·Q · L1 · kδlin · δ∞︸ ︷︷ ︸L1·kδlin·δ∞

+ Q2 · [1] · l3 · γ∞︸ ︷︷ ︸[1]·l3·γ∞

−Q2 · zA︸ ︷︷ ︸zA

+Q2 · L1 · tdref︸ ︷︷ ︸L1·tdref

−Q2 ·Q · L1 · bV︸ ︷︷ ︸L1·bV

that, for equation (5.16), becomes

[1] · l3 · γ∞ − zA = L1 · kδlin · δ∞ − L1 · tdref + L1 · bV︸ ︷︷ ︸0

Then equation (5.17) becomes

δ∞ = (Q−Q · L1 · kδlin) · δ∞ + [1] · l3 · γ∞ − zA︸ ︷︷ ︸0

+L1 · tdref −Q · L1 · bV

δ∞ = (I − (Q−Q · L1 · kδlin))−1 · (L1 · tdref −Q · L1 · bV )

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

δ∞ =(I + Q ·∑∞

1 (I − L1 · kδlin)i) · (L1 · tdref −Q · L1 · bV )

Q · (I +∑∞

1 (I − L1 · kδlin)i) · (L1 · tdref, ∞ − L1 · bV

)Q · (1 +

∑∞1 (1− l1 · kδlin)i

) · (l1 · tdref, ∞ − l1 · bV

)Q · 1

l1·kδlin· (l1 · tdref, ∞ − l1 · bV

)

= tdrefkδlin

−Q · bVkδlin

and thuse∞ = tdref, ∞ − kδlin · δ∞ − bV = (Q− I) · bV

60

Page 70: Thesis Toptesi

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

0 200 400 600 800 1000 1200−12

−10

−8

−6

−4

−2

0

2x 10

−4 Erosion font

t [s]

z [m

]

0 200 400 600 800 1000 12000

0.2

0.4

0.6

0.8

1

1.2

x 10−4 mean t

d

t [s]

t d [m]

48 48.2 48.4 48.6 48.8 49 49.2 49.4 49.6

−5

−4.5

−4

−3.5

−3

−2.5

x 10−5 Particular of the z−axis position

t [s]

z [m

]

1375 1375.5 1376 1376.5

−9

−8.99

−8.98

−8.97

−8.96

−8.95

−8.94

−8.93

−8.92

−8.91

−8.9x 10

−4 Particular of the z−axis position when the ILC control is active

t [s]

z [m

]

Figure 5.11. 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 theionization time td (upper right), particular of the z-axis movement with P controller (bottomleft), 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 astraight line and the behavior of the z-axis inside a erosion cycle is stationary.

61

Page 71: Thesis Toptesi

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-1with filter Q as a Least-square has been implemented on the EDM system. The imple-mentation of the Variant-2 is in process.

62

Page 72: Thesis Toptesi

Chapter 6

Implementation

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

6.1 Scaling

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

6.2 Multiplication of a signal with a constant in fixed-pointarithmetics

6.2.1 Multiplication algorithm

In fixed-point arithmetic a multiplication of a generic signal xk ∈ {xmin, . . . ,xmax} with aconstant a ∈ < is implemented as follow

a · xk∼=

⌊(ba · 2n + 0.5c · 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 approximationintroduce the following error e ∈ < function of the parameters a,n and the value of thesignal xk

e(xk,a,n) =⌊

(ba · 2n + 0.5c · xk)2n

⌋− a · xk

63

Page 73: Thesis Toptesi

6 – Implementation

6.2.2 Noise-shaping

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

a · xk∼=

⌊(ba · 2n + 0.5c · xk)

2n

⌋− e(xk−1,a,n)

The error eNoise−Shaping function of the parameters a,n and the value of the signal xk is

eNoise−Shaping(xk,a,n) =⌊

(ba · 2n + 0.5c · xk)2n

⌋− e(xk−1,a,n)− a · xk

=⌊

(ba · 2n + 0.5c · xk)2n

⌋− a · xk

︸ ︷︷ ︸e(xk,a,n)

−e(xk−1,a,n)

= e(xk,a,n)− e(xk−1,a,n)

that in z domain becomes

ENoise−Shaping(z,a,n) =z − 1

z︸ ︷︷ ︸F (z)

·E(z,a,n)

From the Bode diagram of the system F (z), shown in figure 6.1 (normalized at thesampling-time frequency of 20

2·π ), it results that F (z) has a high-pass behavior. The influ-ence 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 implementedon the EDM system. The behavior is shown in figure (6.2). In order to follow the erosionfront along a straight line, a fast dynamics is selected. A non stationary behavior of thez-axis during the erosion cycle is obtained.

64

Page 74: Thesis Toptesi

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

100

101

−12

−10

−8

−6

−4

−2

0

2

4

6

8

Mag

nitu

de (

dB)

Bode Diagram

Frequency (rad/sec)

Figure 6.1. Bode diagram of the transfer function F (z)

65

Page 75: Thesis Toptesi

6 – Implementation

0 5 10 15 20 25−3

−2.5

−2

−1.5

−1

−0.5

0

0.5x 10

−4 Erosion font

t [s]

z [m

]

0 50 100 150 200−2.5

−2

−1.5

−1

−0.5

0

0.5x 10

−3 Erosion font

t [s]

z [m

]

0 5 10 15 20 25 30 35 40 45−6

−5

−4

−3

−2

−1

0

1

2x 10

−4 Erosion font

t [s]

z [m

]

0 5 10 15 20 250

1

2

3

4

5

6

7

x 10−5 mean t

d

t [s]

t d [m]

0 50 100 150 2000

1

2

3

4

5

6

7

x 10−5 mean t

d

t [s]

t d [m]

0 5 10 15 20 25 30 35 40 450

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

x 10−4 mean t

d

t [s]

t d [m]

14.4 14.45 14.5 14.55 14.6 14.65 14.7 14.75 14.8

−1.8

−1.75

−1.7

−1.65

−1.6

−1.55

−1.5

−1.45

x 10−4 Particular of the z−axis position

t [s]

z [m

]

203 203.2 203.4 203.6 203.8 204 204.2

−2.282

−2.28

−2.278

−2.276

−2.274

−2.272

−2.27

−2.268

−2.266

−2.264

−2.262

x 10−3 Particular of the z−axis position

t [s]

z [m

]

26.4 26.45 26.5 26.55 26.6 26.65 26.7 26.75 26.8 26.85 26.9

−3.06

−3.05

−3.04

−3.03

−3.02

−3.01

−3

−2.99

−2.98x 10

−4 Particular of the z−axis position

t [s]

z [m

]

Figure 6.2. Real behavior of the EDM process controlled by the P controller (left), Sim-ulated 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

Page 76: Thesis Toptesi

Chapter 7

Conclusions

In this thesis a model of the EDM process has been determined. Because the high com-plexity and strong stochastic components that characterize the process is not was possibleto find an accurate model of the process. However the model reproduces the principalcharacteristics of the EDM process and could be used in order to verify the effect of thenew developed control strategies on the gap distance behavior.

The new control technique developed in this thesis exploits the cyclic behavior of theEDM process. In order to obtain a better control of the gap distance, the three followingsolution based on iterative learning control (ILC) have been analyzed:

1. ILC with a low pass-filterWith this method it was not possible to obtain a negligible steady-state error. Themethod hast not been considered interesting for our objectives.

2. ILC combined with an optimization method based on recursive least-squares (RLS) - Variant 1With this method it was possible to obtain a negligible steady-state error. Withthis method however it was hard to find an optimal tradeoff between the stationarybehavior and a good forward movement because of their mutual dependence. Thismethod has been implemented on the real system, and some measurements havebeen presented.

3. ILC combined with an optimization method based on recursive least-squares (RLS) - Variant 2With this method it was possible to reach a negligible steady-state error. Withthis method it is easy to find an optimal tradeoff between the stationary behaviorand a good forward movement because they independency. This method beingimplemented.

As a conclusion, thanks a this work, a model of the EDM process is now available anda new technique that allows a better behavior of the gap distance is being implemented.

67

Page 77: Thesis Toptesi

7 – Conclusions

68

Page 78: Thesis Toptesi

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

fy(y) =fx(f−1(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|

substituting |dy| =∣∣∣d(f(x))

dx

∣∣∣ · |dx|

fy(f(x)) ·∣∣∣∣d(f(x))

dx

∣∣∣∣ = fx(x)

then

fy(y) =fx(x)∣∣∣d(f(x))

dx

∣∣∣

and finally considering that y = f(x)

fy(y) =fx(f−1(y))∣∣∣df(f−1(y))

dx

∣∣∣

69

Page 79: Thesis Toptesi

A – Some mathematical proofs

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

fN (N) =1√

2 · π · σ2td

· e− N2

2·σ2td

the probability density function ftd(td) of the random signal td(t) = f(N(t)) = td ·eN(σtd,0)

is

ftd(td) =fN (f−1(td))

df(f−1(td))dx

=1

td ·√

2 · π · σ2d

· e−(ln(td)−ln(td(t)))2

2·σ2d (A.1)

that is called log-Gaussian probability density function. In this type of function theparameters σd is related to the the random signal td(t) from the followings relations

σd =

√√√√ln

(σ2

td

td(t)2+ 1

)

A.2 Linear-least square

In the following sections, in order to obtain the model parameters, a linear least squareis applied. The following preposition describes and proof the method with an deepeningabout the measurement noise.Preposition A linear system of equations

y = Φ · θ + ω

where y ∈ <n are the measurements, Φ ∈ <nxm known values, θ ∈ <m are unknown valuesand ω ∈ <n is the measurement noise, can be solved finding x that minimize the followingcost function

minθ

J(θ) = minθ‖y − Φ · θ‖2

2 = 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:

µθ = E[θ] = θ + (ΦT · Φ)−1 · ΦT · µω (A.2)

cov(θ) = E[(θ − µθ) · (θ − µθ)T ] = (ΦT · Φ)−1 · σ2

ω (A.3)

70

Page 80: Thesis Toptesi

A.3 – Recursive Least Square (RLS)

Proof: The best approximation θ of θ which minimize the index J(θ) is such that

∇J(θ) = ∇(y − Φ · θ)T · (y − Φ · θ) = (−yT · ΦT + θT · ΦT · Φ) = 0

and

θ = (ΦT · Φ)−1 · ΦT · y

which prove (A.2).Substituting in previous equation y = Φ · θ + ω:

θ = (ΦT · Φ)−1 · ΦT · (Φ · θ + ω)

then

µθ = E[θ] = θ + (ΦT · Φ)−1 · ΦT · E[ω] = θ + (ΦT · Φ)−1 · ΦT · µω

which prove (A.2).The covariance matrix of θ is:

cov(θ) = E[(θ − µθ) · (θ − µθ)T ]

= 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 calledpseudo-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 matrixof the measurement values y ∈ <n as follow

Φ(n) =

φ0

φ1

φ2...

φn

y(n) =

y0

y1

y2...

yn

(A.4)

71

Page 81: Thesis Toptesi

A – Some mathematical proofs

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

θ(n) = θ(n− 1) + c(n) · P (n− 1) · φTn · e(n)

with:

e(n) = yn − y(n)y(n) = φn · θ(n− 1)P (n− 1) =

(Φ(n− 1)T · Φ(n− 1)

)−1

c(n) = 11+φn·P (n−1)·φT

n

P (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)

)−1 · Φ(n)T · y(n)=

(Φ(n− 1)T · Φ(n− 1) + φT

n · φn

)−1 · (Φ(n− 1)T · y(n− 1) + φTn · yn

)

for the matrix inversion lemma(P (n− 1) + φT

n · φn

)−1=

(P (n− 1)− c(n) · P (n− 1) · φT

n · φn · P (n− 1))

then, with P (n− 1) =(Φ(n− 1)T · Φ(n− 1)

)−1, the equation (A.3) becomes

θ(n) =(P (n− 1)− c(n) · P (n− 1) · φT

n · φn · P (n− 1)) · (Φ(n− 1)T · y(n− 1) + φT

n · yn

)

= P (n− 1) · Φ(n− 1)T · y(n− 1)︸ ︷︷ ︸θ(n−1)

+P (n− 1) · φTn · yn−

c(n) · P (n− 1) · φTn · φn · P (n− 1) · φT

n︸ ︷︷ ︸1

c(n)−1

·yn − c(n) · P (n− 1) · φTn · φn · θ(n− 1)︸ ︷︷ ︸

y(n)

= θ(n− 1) + c(n) · P (n− 1) · φTn ·

yn − y(n)︸ ︷︷ ︸

e(n)

= θ(n− 1) + c(n) · P (n− 1) · φTn · e(n)

72

Page 82: Thesis Toptesi

Bibliography

[1] B. Bommeli, “Etude de l’influence de la contamination sur l’amorscage des dechargesdans les dielectriques liquides” PhD thesis, Fac, Sc, Univ. Geneva, 1979

[2] Altpeter and Tricarico, “Modelling, Simulation and Control of a Electro DischargeMachine”

[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