Damien Thuau

Cédric Ayela

Etienne Lemaire

Stephen Heinrich

Philippe Poulin

Isabelle Dufour

Advanced thermo-mechanical characterization of organic materials by piezoresistive organic resonators

A Introduction

The fast growing market that represents organic electronics is of huge interest in the MEMS field. 1-2 Organic electronics offers two major advantages in comparison to classical siliconbased electronics: (1) it enables the design of devices on flexible substrates and offers a wide range of new applications in terms of flexibility; (2) it allows the production of electronics applications with fabrication techniques whose investments and costs are much lower than in the silicon industry. Although the performance of silicon MEMS is often considered as higher than organic MEMS, the cost/performance ratio makes these organic electronics devices an extremely attractive alternative option for many applications.

A key parameter for the development of organic electronicsbased microsystems is therefore the expertise and control of appropriate fabrication processes. To date, two main techniques are used to deposit organic materials: (1) evaporation and spincoating and (2) printing techniques (spray, ink jet, screen printing). Thus, organic materials have generally been patterned using standard technology processes from the semiconductor industry. However, significant levels of attention are now focused on novel fabrication techniques to achieve the optimal cost/performance ratio required to launch this emerging market. The fabrication technology proposed and realized in this work for the development of an organic piezoresistive resonator addresses this issue. In fact, it enables the fabrication of polymer MEMS without cleanroom micro-fabrication facilities and should lead to broaden the use of resonator in the same spirit as PDMS microfluidic or 3D printing. Here, a commercially available vinyl cutting machine 3 has been used to design organic MEMS resonators at an extremely low cost and rapid production rate with no sacrifice in performance. Moreover, by using the proposed fabrication technology the manufacturing cost of an organic electronic device is drastically reduced compared to an inorganic device. Thus, the role of materials in the overall cost of manufacturing, as presented here, can be estimated to represent a much larger portion than in the semiconductor industry, in which it represents only a small fraction of the cost. This addresses the strategic challenge that represents materials design (substrates and deposited layers with specific electrical, chemical and mechanical properties) for the development of organic electronics. In this sense, flexible substrates such as paper and plastic have been chosen in this work to further reduce the cost of the final sensor. Functionality is provided by carbon nanotubes that are produced on an industrial scale and are now available at a cost estimated to be below 50 USD/kg. Organic/inorganic hybrid materials and nanocomposite materials have been shown to display performances that compare or exceed that of an inorganic semiconductor when used as a transduction element or sensing layer in MEMS devices. [4][5][6][7] In particular, CNT-based piezoresistive nanocomposites exhibit giant gauge factors due to the intrinsic gauge factor of an individual single-walled nanotube (SWNT) and to changes of the contact resistances in response to mechanical deformations. 8 Depending on the applied stimuli, their gauge factors have been found to range from unity to several hundred. This type of strain sensor exhibiting outstanding static and low-frequency dynamic response shows promise for implementation for structural health/integrity monitoring tasks such as dynamic contact detection or monitoring of impact events. 7 In addition to outstanding strain sensing capabilities, piezoresistive nanocomposites are viewed as powerful transducers for realtime MEMS chemical and bio-sensing applications.

Due to its relatively simple geometry and ease of fabrication, the most common platform for MEMS sensing applications is the cantilever beam. Here, U-shaped cantilevers have been chosen for the resonator geometry in order to concentrate the strain on the piezoresistor. Cantilever-based MEMS can be operated either in a static bending regime (where the cantilever bends due to mechanical strain) or in a dynamic mode.In the latter case, the phenomenon to be sensed may be revealed with excellent resolution by a shift in the resonant frequency of the cantilever caused by, e.g., sorbed mass and/or environmentally induced changes in material properties. Sensing based on resonant frequency shift provides more precision than sensing in the static regime since the effect of noise in a direct voltage or current measurement is clearly attenuated in frequency measurements. To date, the piezoresistive responses of organic MEMS have only been reported in the static bending configuration. [6][7][8][9][10] This provides a major motivation for the primary objective of the present work: to present the first piezoresistively transduced organic cantilevers functioning in a low-frequency dynamic configuration. The reported sensors have been fabricated using an innovative, low-cost and environmentally friendly fabrication process which employs commercially available materials. Electromechanical characterization of the organic cantilevers as a function of temperature has been performed with the aim of validating this new concept. Finally, the electromechanical characterization of the organic MEMS has been used to analyze the viscoelastic mechanical properties of particular organic materials.

B Materials and methods

The micromachining method of our approach does not require the high-cost semiconductor manufacturing equipment used for silicon microfabrication and therefore drastically reduces the cost of the MEMS devices in comparison with those of the silicon industry in which 65-nm technology has required a multi-billion dollar investment. Here, an extremely low-cost fabrication process has been developed for the fabrication of organic MEMS. This process requires a spin coater to deposit the material and, as noted earlier, a vinyl cutting machine to pattern the structure. Furthermore, the main microfabrication concerns of deposited layer homogeneity and the resolution of the patterned structure are addressed by combining spin-or spray-coating, yielding a deposited layer thickness ranging from 100 nm to hundreds of microns, with the vinyl cutting machine (resolution of 5 m). 3 For comparison purposes, the cost of the equipment for this fabrication technique has been estimated to be less than 4,000 USD. Consequently, the proposed fabrication technique can be applied to a wide range of polymers leading to a straightforward development of organic electronics devices and microsystems. Figure 1a illustrates the fabrication process flow of the organic resonator. This fabrication process replaces UV photolithography as the easiest way to pattern polymer MEMS and has been demonstrated to be the most straightforward method to pattern organic MEMS. 11 .

Figure 1a) Fabrication process flow for the U-shaped organic resonator, 1b) Optical image showing the flexibility of the bimorph nanocomposite + PET sheet after patterning, 1c) Schematic of the U-shaped cantilever (with h, the thickness and  the density) and 1d) SEM images of the U-shaped organic MEMS

The first step involves the preparation of the piezoresistive nanocomposite. CNT-based Graphistrength Epoxy Master batch pellets from Arkema have been used. The pellets consist of 25 wt% of multi-walled nanotubes (MWNTs) made via catalytic chemical vapor deposition (CCVD) and dispersed in an epoxy-type matrix. The nanocomposite was prepared by mixing the SU-8 epoxy photoresist with the pellets using a high shear mixer (Silverson L4RT) at 5000 rpm for 60 min in an ice bath. Subsequently, the U-shaped piezoresistive organic cantilevers were fabricated in a low-cost, two-step process. The aforementioned solution was spin-coated on a 100-m thick sheet of polyethylene terephthalate (PET) and soft-baked at 95°C for 5 min. The thin film was then cross-linked by exposure to UV light combined with a post-exposure bake step at 65°C for 1 min and 120°C for 10 min followed by a final hard bake of 150°C for 15 min to release internal stress. Afterwards, the resonators were patterned by simply using the vinyl cutting machine (Graphtec Craft ROBO Pro CE 5000-40). Note that the thickness of the layer to be patterned should be thick enough (>10um) to be easily manipulated during fabrication and thinner than the limitation of the vinyl cutting plotter (250um). The final dimensions of the PET-based structures were 2800 m long, 1600 m wide and 118 m thick. Figure 1b shows a nanocomposite/PET bimorph flexible thin film after MEMS device patterning while Figure 1c represents a schematic of the U-shaped MEMS cantilever. SEM images of the fabricated PET-CNT-SU/8 resonator are shown in Figure 1d.

C Results and discussion

Piezoresistive transduction of MEMS resonator

The piezoresistive behavior of a CNT network within an insulating matrix involves a complicated interplay among different mechanisms, including the resistance change of the matrix due to dimensional changes, tunneling resistance, resistance of the intertube contacts and intrinsic piezoresistivity of the nanotubes. 12 Several numerical studies have been performed with the aim of theoretically describing the influence of the CNTs and polymer parameters on the piezoresisitive effect in nanocomposites (e.g., 13,14 ). A general observation made in these studies is the enhancement of the sensitivity of a piezoresisitive nanocomposite for samples containing a CNT wt% concentration close to the percolation threshold. This phenomenon was also reported in several experimental studies; for instance, in the case of a similar material as the ones used in this work, namely an epoxy resin filled with carbon-based particles. 5,6 A detailed electrical characterization as well as an analytical modeling of the piezoresistive behavior of the CNT-SU/8 composite has been reported in a previous work. 6 Accordingly, a nanocomposite containing 2wt% of CNT concentration has been chosen to pattern the piezoresistive transducers with initial resistances of 6.1 M on the resonator of the present study.

The fabricated devices were successfully driven into resonance by an external piezoelectric buzzer while optical and piezoresistive transductions were measured in order to ensure the accuracy of the piezoresistive transduction. Furthermore, finite element model (FEM) simulations using COMSOL were performed for the case of a homogeneous U-shaped resonator with the same dimensions and mechanical properties (measured with Dynamic Mechanical Analysis, (DMA)) of the CNT-SU/8 -PET fabricated device in order to investigate the structure's resonant frequency and quality factor. Finite element simulations together with the experimentally measured frequency response are plotted in Figure 2a while the inset depicts a snapshot of the model's resonant response. The simulations were performed by specifying the cantilever material's properties as density ρ = 1380 kg.m -3 and storage and loss moduli E'=4.43 GPa and E"=130 MPa, respectively. Using these input parameters, the resonant frequency and quality factor (due to viscoelastic material losses) of the first out-ofplane flexural mode were calculated to be 3493 Hz and 22, respectively, showing good agreement with the measured values (i.e., errors less than 3% in resonant frequency and 5% in quality factor as detailed in what follows).

The vibration amplitudes at resonance were detected with a laser vibrometer (Polytec MSA 500) whereas the electromechanical measurements were recorded with a network analyzer (Agilent E5061B). The devices were tested in a half Wheatstone bridge configuration without using any amplification. All measurements were performed in air at atmospheric pressure. The resonant frequencies of the first outof-plane flexural mode were measured experimentally to be 3602 and 3597 Hz using the piezoresistive optical and transduction methods, respectively, thus showing excellent dynamic electromechanical transduction of the piezoresistive nanocomposite. Quality factor (Q), defined as the ratio of the resonant frequency to the bandwidth associated with a 3dB transmission magnitude drop, has been calculated from the data to be 23 and 21 for optical and piezoresistive transduction, respectively.

Figure 2a) Comparison between the frequency response of FEM simulations and experimental data based on optical and piezoresistive detection through the 1st flexural mode of resonance; inset: snapshot of the model's resonant response 2b) Shift of the resonant frequency and quality factor as a function of temperature obtained from electrical measurement of the piezoresistance; inset: Measured frequency response curves for different temperatures where the arrows show the direction of the shift of the resonant frequency with increasing temperature

Temperature sensor

Additionally, the electromechanical responses of organic Ushaped microcantilever resonators as a function of temperature have been measured in order to validate the ability of the present piezoresistive transduction scheme integrated onto a PET resonator to be able to monitor accurately thermal effects occurring in the resonator. The measured relative changes of resonant frequency (f r /f r ) as well as quality factor versus temperature are plotted in Figure 2b, while the evolution of the resonant frequency of the first out-of-plane flexural mode of the U-shaped cantilever resonator in the temperature range 23°C to 49°C is shown in the inset of Figure 2b. The resonant frequencies are observed to drop ~9% from 3597 Hz to 3277 Hz when the temperature increases from 23°C to 49°C. Moreover, the piezoresistive responses to temperature change show an excellent linearity with a correlation coefficient (R) of 0.9975 in this temperature range. The sensitivity of the PETbased resonator, as measured by the thermal coefficient of frequency (TCF) of the MEMS, has been determined from linear regression to be -0.33%/°C in the range 23-49°C. The limit of detection (LOD) of the fabricated MEMS resonator has been estimated by calculating the standard deviation of the resonant frequency of 100 points at a given constant temperature and humidity level. The LOD could then be determined by taking three times the standard deviation and dividing it by the sensor' sensitivity. Using this approach the LOD of the proposed sensor was estimated to be 0.112°C. Moreover, the quality factor has been calculated at different temperatures without exhibit significant changes. An average value of Q = 21 ± 1 has been measured. It is noted that standard commercial platinum temperature sensors (Pt100) have a relative sensitivity (R/R/T with R being the resistance) of 0.385%/°C and a limit of detection in the range 0.143°C to 0.850°C depending on their characteristics. In comparison, our fabricated MEMS resonators exhibit sensitivity on the same order of magnitude and a better (lower) limit of detection (0.112°C). This sensitivity to temperature confirms the high efficiency of the proposed resonators which is one order of magnitude higher than the best organic/inorganic bimorph materials reported to date and can compare with those based on the state-of-the-art inorganic materials. [15][16][17][18] In addition, the stability of our sensors to humidity has been investigated where a shift in resonant frequency lower than 0.7% has been observed in the relative humidity range of 10 to 90% RH.

In order to obtain further insight into the temperaturedependence of the electromechanical properties of the MEMS device, the relative changes in resistance of CNT-SU/8 thin film as well as in the U-shaped cantilever in the static mode have been recorded as a function of temperature as shown in Figure 3a. The resistance of CNT-SU/8 thin film decreases with increasing temperature, indicating a negative temperature coefficient. This behaviour can be explained by a thermal fluctuation-induced tunnelling conduction. [19][20][21] Also shown in Fig. 3a is the dependence of the relative change in resonant frequency on the temperature of the U-shaped cantilever operated in the dynamic mode. The numerical values of the thermal sensitivities of the thin film and the U-shaped cantilever in static and dynamic modes have been measured to be -863, -976 and -3300 ppm/°C, respectively, demonstrating an improved thermal monitoring sensitivity of the MEMS when operating in the dynamic mode.

The real-time responses to temperature of the U-shaped cantilever used in static and dynamic mode have also been measured as shown in Figure 3b. One can observe the instantaneous response of the device when used in the dynamic mode whereas a long delay in the resistance change response to temperature can be seen, due to the viscoelastic relaxation of the material, when used in the static mode. Therefore, the integrated piezoresistive transduction in the dynamic mode clearly appears to be the method with optimal efficiency for sensing thermal events.

Figure 3a) Relative change in resistance (static mode) or resonant frequency (dynamic mode) for thin film and U-shaped cantilever as a function of T with an initial temperature of 23°C; 3b) Temperature control and real time responses of the MEMS in static and dynamic mode

Micro-dynamical mechanical analyser

The performances of the proposed organic MEMS with integrated transduction scheme make these devices excellent candidates as mechanical platform to characterize accurately material properties. Indeed, by following the shift in resonant frequency and quality factor of the resonators as a function of temperature, one may determine the mechanical properties of the resonator material in a similar manner as in dynamic mechanical analysis (DMA) measurements. [22][23][24] The use of MEMS as an analytical tool for thermomechanical characterization of polymer materials has recently been reported by S. Bose et al. using the resonant frequency and quality factor of microstrings measured by external optical transduction. The devices were made of silicon nitride (SiN x ) fabricated using an expensive inorganic fabrication processes. Devices of this type enable the observation of the glass transition temperature (T g ) of polymers via a relative variation of the Young's modulus. 22 The present organic MEMS, in addition to being more simply fabricated, allows for more detailed quantitative measurements. One primary advantage of the device proposed here in comparison with the one reported by S. Bose et al. 22 is its integrated piezoresistive transduction scheme, which offers potential integration on multiple supports. Moreover, instead of assuming two constant values of Young's modulus before and after the T g of the polymer, the fabricated Journal Name ARTICLE organic micro-dynamic mechanical analyzers enable one to quantitatively determine the variation of storage modulus (E') and the loss tangent (tan) as a function of temperature for multiple organic material used as substrate in the MEMS structure as illustrated in Figure 4 for PET. Note that the devices showed excellent reversibility and repeatability in the thermo-mechanical characterization of organic materials for measurements at temperatures below the T g of the material to be characterized. This is confirmed by data in Figure 2b. Nevertheless, once the temperature reached and exceeded the T g of the polymer to be characterized, the devices' responses were not repeatable due to irreversible re-structurations of the material in its rubbery state.

Figure 4 Mechanical properties of the PET-based U-shaped cantilever material as a function of temperature measured with the organic MEMS device and DMA

Analytical modelling

The Young's modulus of the material constituting the resonator has been determined by measuring the resonant frequency of the MEMS devices. Then, the quality factor used for the calculation of the tan using the proposed MEMS has been extracted using the fitting model. 25 The potential of the proposed characterization technique is indicated by the good correlation of the storage modulus and tan values as measured with DMA. The slight differences between the DMA and MEMS measurements are due to the fact that T g has a kinetic component and is strongly influenced by the frequency (rate) of deformation. While the DMA measurements have been performed at a frequency rate of 1 Hz, the MEMS measurements have been taken in the range of a few kHz. As the frequency of the deformation increases, the molecular relaxations can only occur at higher temperatures and, as a consequence, T g increases with increasing frequency. In addition, the shape and magnitude of the tanδ peak as well as the slope of the storage modulus in the transition region can also be affected. The tan of PET has been found to be 0.030 and 0.044 for DMA and MEMS resonator measurements at 20°C, respectively. Similar measurements on PEN and paper substrates have been performed up to 50°C showing consistent results with DMA measurements. As a result, the proposed technique could be of great interest in the field of MEMS sensors where the performance of the devices are strongly influenced by any changes of mechanical properties of the materials due to temperature and/or frequency. An approach has also been developed for determining the effective Young's modulus E eff (or effective storage modulus E' eff ) for "bimorph materials" (two-layer structures) obtained using the proposed organic MEMS device. The method is based on the following analytical model, [START_REF] Heinrich | Proceedings of the 11 th Nanomechanical Sensing Workshop NMC 2014[END_REF] which accounts for the non-uniform mass associated with the U-shaped cantilever. The major advantages of the analytical model proposed here is that the solution form is (1) based on a simple, yet rigorous, modification of the uniform cantilever case and (2) applicable to general end mass distributions. In the model normalized tip mass parameters ( and  eff ) are utilized in the calculation of the resonant frequency in order to incorporate the effects of the translational and rotational inertia of the end portion as well as its eccentricity with respect to the ends of the legs: where 6 , ≡ , and .

Since the Young's moduli of both materials are of the same order of magnitude, one may treat the flexural rigidity of the legs as being the same as that of a single layer of the same thickness and total width and having an effective modulus E eff .

Thus, we take I , with b, L, b 0 = 1600 m and L 0 = 400 m being the width and length of the arms and end portion of the U-shaped cantilever beam, respectively, as shown in Figure 1c. Parameters h 1 , h 2 ,  1 and  2 denote the thicknesses and mass densities of the substrate and nanocomposite layers, respectively. Measured values of resonant frequency used in conjunction with the above analytical expression permit one to easily back-calculate the effective modulus in the case of 100m thick PET, 50m thick PEN (PolyEthylene Naphtalate) and 200m thick Paper (Powercoat ® ) substrates coated with the nanocomposite. The values determined by this method have been compared with those from DMA measurements and show excellent agreement (Table 1

Conclusions

Organic U-shaped cantilever resonators can be fabricated using a quick, low-cost and environmentally friendly fabrication process. The developed fabrication method can be applied to a large panel of organic materials opening new routes toward the development of low-cost organic electronics devices. The fabricated devices have been tested optically and electrically. These responses have also been compared to FEM simulations. The high level of correlation between experiments and modeling confirm the achievement of the first piezoresistive transduction in organic MEMS resonators. The present MEMS exhibit an extreme sensitivity to temperature that compares well with that of inorganic materials. In spite of their low-cost, the present materials can therefore serve as viable candidates for various sensing applications. The sensitivity of the bimorph PET-CNT-SU/8 device with respect to temperature has been determined to be -0.33%/°C in the range of temperature 20-50°C together with a limit of detection of 0.112°C, which is comparable to the best commercial Pt100 Class AA temperature sensors. As an example of another application, the present MEMS resonators have been used as microdynamic mechanical analyzers. Mechanical properties such as storage modulus and loss tangent of organic materials can be accurately extracted by recording the changes of resonant frequency and quality factor of the fabricated MEMS. Considering the cost, simplicity of fabrication, versatility and performance, the proposed MEMS offer exciting new possibilities across a wide spectrum of applications, including microsensors, mechanical energy harvesters, and microactuators.

4 -

 4 f r /f r (dynamic mode) -R/R (static mode)

  tan  (MEMS) materials of CNT-SU/8 nanocomposite deposited on PET, PEN and paper substrates.

  ).

	CNT-SU/8 on	PET	PEN	Paper
	E eff ' (GPa)	DMA MEMS	4.43 4.38	2.90 2.81	4.33 4.11
	E eff "(MPa)	DMA MEMS	131 192	290 256	625 471
	tan	DMA MEMS	0.030 0.044	0.100 0.091	0.144 0.115
	Table 1 Measured effective storage modulus (E eff '), loss
	modulus (E

eff ") and tan at room temperature of bimorph

Acknowledgements

This research was carried out within the framework of the LabEx AMADEuS, ANR-10-LABX-0042-AMADEUS, and was supported by a state grant handled by the National Agency of Research as part of the program Excellence Initiative IdEx Bordeaux, Grant N° ANR-10-IDEX-0003-02.


Vincent Kherbache
email: vincent.kherbache@inria.fr

Eric Madelaine
email: eric.madelaine@inria.fr

Fabien Hermenier
email: fabien.hermenier@unice.fr

Planning live-migrations to prepare servers for maintenance

In a virtualized data center, server maintenance is a common but still critical operation. A prerequisite is indeed to relocate elsewhere the Virtual Machines (VMs) running on the production servers to prepare them for the maintenance. When the maintenance focuses several servers, this may lead to a costly relocation of several VMs so the migration plan must be chose wisely. This however implies to master numerous human, technical, and economical aspects that play a role in the design of a quality migration plan. In this paper, we study migration plans that can be decided by an operator to prepare for an hardware upgrade or a server refresh on multiple servers. We exhibit performance bottleneck and pitfalls that reduce the plan efficiency. We then discuss and validate possible improvements deduced from the knowledge of the environment peculiarities.

Introduction

In data centres, virtualization has become a cornerstone. On one side, it raised the hosting capabilities thanks to performance isolation [START_REF] Barham | Xen and the art of virtualization[END_REF] and consolidation techniques [START_REF] Verma | pmapper: power and migration cost aware application placement in virtualized systems[END_REF][START_REF] Hermenier | Entropy: a Consolidation Manager for Clusters[END_REF]. On the other side, live migration [START_REF] Clark | Live migration of virtual machines[END_REF] permitted the operators to perform server maintenance more easily. Indeed, maintenance operations such as server updating, hardware or software upgrade are critical tasks to perform on production servers. It is then recommended to operate on idle or offline servers to prevent any failure or mis-configuration to alter client virtual machines (VMs). Thanks to live migration, it is now possible to prepare the servers by migrating their VMs elsewhere in prior, with a negligible downtime for the VMs.

Maintenance tasks can occur at the level of a single server as well at the scale of an entire blade-center or rack. With the ever increasing number of servers and VMs per server in a data center, planning efficiently numerous migrations over multiple servers becomes problematic [START_REF] Soundararajan | The Impact of Management Operations on the Virtualized Datacenter[END_REF]. Indeed the notion of efficiency has many facets: an operator may expect short completion times, small migration durations or low energy usage for example. However, many technical, environmental or even human aspects dictate these optimisation criteria and today, all these parameters but also their interactions must be mastered to design migration plans of quality.

In this paper we analyze different realistic migration plans to exhibit common pitfalls and discuss some levers to improve their quality. Our results are derived from experiments on a real testbed involving up to 45 servers connected through a hierarchical network. In both scenarios we compare two migration strategies that consist to execute all the tasks in parallel or sequentially. We analyze the pros and cons of both approaches with regards to performance, energy efficiency and duration optimization criteria. Finally, we discuss and validate possible improvements that consider the infrastructure and the workload properties.

The rest of this paper is organized as follows. Section 2 presents related works. Section 3 presents our experimental analysis of migrations plans. Section 4 discusses possible solutions to improve the plan efficiency. Finally, Section 5 presents our conclusions and future research directions.

Related Works

Live migrations efficiency: Many efforts have been made to improve the live migration efficiency and many research papers proved that the network speed and the VM's dirty page rate are the main factors affecting the live migrations behavior in pre-copy migration architecture. Based on these findings, Sherif et al. [START_REF] Akoush | Predicting the performance of virtual machine migration[END_REF] offer good predictions of the duration and the workload service interruptions arising from live migrations. Also, to help administrators at making optimal migrations decisions, Liu et al. [START_REF] Liu | Performance and energy modeling for live migration of virtual machines[END_REF] define a performance model to predict the energy consumed by a live migration at different transmission rates. Although being linked to our work, these work study the migration of a single VM while we focus on issues related to the concurrent migration of multiple VMs.

Accordingly, several works have been conducted to improve the performance of multiple live migrations. Among the studies that most closely match our work, Kejiang et al. [START_REF] Ye | Live migration of multiple virtual machines with resource reservation in cloud computing environments[END_REF] consider the live migration efficiency of multiple VMs with different strategies (sequential / parallel migrations) by investigating resources reservation methods on target servers. Nevertheless their study does not include network management or information about the topology which are the preeminent aspects that we consider in this paper. Sarker et al. [START_REF] Sarker | Performance-driven live migration of multiple virtual machines in datacenters[END_REF] propose an algorithm to schedule the migrations of a given set of VMs by minimizing the total migration time and the VMs downtime. The novelty of their approach is to take into account the network topology and the inter-VM data dependencies. In this paper we also focus on the need to reduce individual migration durations and energy consumption. Furthermore, despite all their experiments were performed in a simulated environment, we focus exclusively on a real testbed. Deshpande et al. [START_REF] Deshpande | Live gang migration of virtual machines[END_REF] introduce Live gang migration of VMs to speed up the parallel migration of co-located VMs to the same destination server thanks to memory deduplication. Nevertheless the proposed technique requires a deep modification of the underlying hypervisor and does not address the migration of VMs over a complex network topology. Zheng et al. [START_REF] Zheng | COMMA: Coordinating the Migration of Multi-tier Applications[END_REF] propose a centralized architecture to coordinate the migration of multi-tiers applications between distant sites inter-connected through a slow network path. The objectives are to ensure the convergence of all migrations and to minimize the impact of inter-VMs communications on migrations duration. In contrast, in this paper we consider an isolated network dedicated to migrations within the same data-centre, which greatly reduces the impact of inter-VMs communications on the migrations performance.

Maintenance operations in virtualized data centers: The new considerations related to the virtualization for management operations in data centers have been introduced in [START_REF] Soundararajan | The Impact of Management Operations on the Virtualized Datacenter[END_REF]. The authors explain that the management operations constitute themselves a workload over the applications running in VMs and becomes more and more critical with increasing multi-core architectures. They analyze 5 common management tasks in virtualized data centres, although they do not investigate the blade-center maintenance or server upgrading scenarios which are the main interests of this paper.

In the best of our knowledge, our work is the first study to tackle multiple migrations plans in the context of critical maintenance operations such as replacing a whole blade-center in a real infrastructure, and to propose solutions to automate these operations with the aim to facilitate the work of administrators.

Analysis of migrations plans

In this section, we experiment on a testbed the effects of 2 intuitive migration plans in the case of a blade-center maintenance or a server upgrading. In practice, we evaluate the impact of the migration plans on the completion time, the individual migration duration, the instantaneous power and the energy consumption.

Environment

The experimental testbed is composed of three Bullx B500 blade-centers. Each blade-center consists of 15 servers with 2 Intel quad-core Xeon E5520 2.27 GHz processors and 24 GB RAM each. All servers run Debian Wheezy with a Linux 3.2.0-4 amd64 kernel and the KVM/Qemu hypervisor 1.7.50. The testbed hosts 60 VMs. Every single VM uses 2 VCPUs, 2 GB RAM and runs a Ubuntu 13.10 desktop distribution. Each VCPU is mapped to a dedicated physical core.

Figure 1 depicts a testbed fragment. In a single blade-center, each server is connected to a switch through a Gigabit Ethernet interface. The bandwidth between the blade-centers is however limited to 3 Gb/s by an aggregation of 3 Gigabit links. All the servers are also connected to a 10 Gb/s Infiniband network that share the VM disk images exported by a dedicated NFS server. To only analyze the migration related traffic, only the live migrations operate over the Ethernet network.

The VM workload is generated by the Web server benchmark tool httperf [START_REF] Mosberger | httperf -a Tool for Measuring Web Server Performance[END_REF]. Inside each VM, the benchmark repeatedly retrieves a static Web page from a local Apache Web server. Two workloads, equally distributed between the VMs, retrieve the Web page at a rate of 100 or 200 requests per second.

During experiments, the power consumption of each server is retrieved every second from a remote dedicated server through its management board.

Experiments

We consider two maintenance scenarios that reflect common situations: Scenario 1 -Blade-center maintenance: This scenario simulates the preparation of a maintenance on a whole blade-center that need to be powered down. The 60 VMs are relocated to a spare blade-center having the same hardware specification. The spare servers are initially offline to save power. Each server to put into maintenance hosts 4 VMs. All the VMs of a source server are migrated to a specific destination server (see Figure 2a).

Scenario 2 -Server upgrading: This scenario simulates the replacement of two out-dated blade-centers by a single one that is more powerful. Each deprecated server has 4 cores while each new server has 8. Initially, each deprecated server hosted 2 VMs while each new server will host 4 VMs (see Figure 2b). Initially the servers in the new blade-center are offline. Once the migration terminated, the old blade-center is shut down. To simulate the low performance of the out-dated servers, half the cores are disabled using linux procfs. In both scenarios, we evaluated 2 migration strategies that can be inferred naturally by an operator. The first strategy launches all the migrations sequentially. This has the benefits of being safe and easily trackable. The second strategy launches all the migrations in parallel to reduce the completion time, a common objective of reconfiguration algorithms to increase their reactivity [START_REF] Hermenier | Entropy: a Consolidation Manager for Clusters[END_REF][START_REF] Zheng | COMMA: Coordinating the Migration of Multi-tier Applications[END_REF][START_REF] Verma | pmapper: power and migration cost aware application placement in virtualized systems[END_REF]. Table 1 shows the experimental results.

We observe that with parallel strategies, the average VM migration duration is about 15 times longer, but also less stable, than with the sequential strategies. This difference is explained by the network interlink that restricts the throughput between the blade-centers to 3 Gb/s when the maximum rate could be up to 15 Gb/s. In contrast, the interlink bandwidth is under-utilized in sequential strategies as the maximum throughput between the two blade-centers equals 1 Gb/s. In practice, long migration durations are not desirable as they lead to performance issues. Indeed, a migration consumes resources on the involved servers and this additional load reduce the VM performance. Furthermore, the links aggregation that composes the interlink does not balance the traffic fairly. Indeed, the negotiation protocol distributes the traffic with a XOR hash-based on the source and the destination MAC addresses. As a consequence in parallel strategies, multiples migrations can share a single 1 Gb link while others will have a dedicated one. Therefore the main issue of parallel strategies is related to the network overload but also the network topologies. Both must be carefully investigated to use them to their best. Another limitation of parallel strategies occurs when a software license is needed for each running server [START_REF]Citrix store[END_REF]. Indeed, parallel strategies bring online 15 additional servers simultaneously, which means that 15 additional licenses must be acquired for a short utilisation period. On the other side, only 1 spare license is required when the migration plan is performed server by server. It might therefore be important to adapt the level of parallelism, so the number of servers simultaneously online, to the number of server licenses [START_REF] Dang | Higher SLA Satisfaction in Datacenters with Continuous VM Placement Constraints[END_REF].

We observe that with sequential strategies, booting a server (respectively shutting down) is about 10 times longer (resp. 3 times) than the average migration duration. As each action is executed sequentially, the time spent to boot and shutdown the servers is not used to migrate VMs. In the scenario 1, 2139 sec. or 74.5 % of the completion time is then wasted waiting for power switching actions (boot and shutdown of 15 servers). It is usually not desirable to have long standing critical operations as the operator in charge must be continuously available to fix potential failures. It is then important to parallelize as much as possible the power-switching actions to reduce the waiting time to a minimum. Likewise, the longest completion times in scenario 2 are essentially due to the time spent to shutdown the 15 additional servers.

We finally observe a higher energy consumption in the scenario 2 due to the higher number of servers. More important, we observe significant power consumption peaks in the parallel strategies. These peaks occur at the beginning of each experiment during the simultaneous boot of all the destination servers. This situation is problematic when the energy is a scarce or expensive resource. For example, when the energy price market is volatile [START_REF]Energy Information Administration: Wholesale Electricity and Natural Gas Market Data[END_REF] or when the data center is partially powered by renewable energies [START_REF] Li | iSwitch: Coordinating and optimizing renewable energy powered server clusters[END_REF][START_REF] Goiri | Parasol and GreenSwitch: Managing Datacenters Powered by Renewable Energy[END_REF]. In these cases, a solution is to delay some boot actions to more energy-friendly periods. Such a delay must however be considered carefully with regards to the priority of the maintenance operation. These results demonstrate the need to control the energy consumption during the maintenance task to be adaptive to external energy constraints. One of the consequences will be to choose the best sequence of power switching actions.

Toward Smarter Migration Plans

Experiments exhibited that pure parallel and pure sequential strategies have their own benefits and drawbacks. Pure parallel strategies provide short completion time but long migrations while pure sequential strategies provide the opposite. In practice, the efficiency of each approach is strongly related to the environment and the workload peculiarities. This advocates for a smart composition of both approaches to provide finer migration plans. In this section, we explore hybrid strategies to prepare servers for a blade-center maintenance according to the network and the workload peculiarities and verify their effectiveness. The first experiment considers the network interlink in a testbed reduced to 6 servers per blade-center. We chose this smaller and more manageable set of servers to easily analyze the behavior of the 3 links aggregation. In all subsequent experiments, httperf is configured at a rate of 200 requests per second for all VMs. Table 2 shows the results. In Scenario A1, all the VMs are migrated in parallel. Similarly to previous experiments, we observe long and unstable migration due to the interlink saturation. Furthermore, some migrations did not complete in live. This happens when the dirty page rate of a VM is greater than the bandwidth available for the migration. In this case, KVM cannot guarantee a VM downtime lesser than 30 ms, the maximum allowed by default. It then suspends the VM after 10 minutes for a possible long period to terminate the migration. We note that this behavior does not occur in the previous scenarios involving a whole blade-center, this is mainly explained by the less intensive workloads on VMs. In Scenario A2, the source servers are freed 3 by 3. We then observe the migration time is 4 time faster and the completion time is 3 times shorter. This is explained by the interlink that is no longer saturated as each server has in theory a 1Gbit/s bandwidth to migrate its VMs. Dirty-pages are then send faster and the number of rounds to synchronize the memory is reduced. We however reported in Section 3 that the link aggregation protocol is not fair. In Scenario A3, we then decided to probe the interlink topology using iperf to choose for each source server, a destination server reachable through a dedicated Gigabit link. This micro-optimisation reduced again the total migration time by 65 sec. and the average migration duration by 13 sec. This experiments reveals that a fine grain optimisation of the level of parallelism between the migration of different servers allows to reduce by up to 4 the time spent to migrate but also by 5 the average migration duration. We also observe that the energy consumption is lower in connection with the reduced completion time. We finally refines the migration plan according to the workload peculiarity. With regard to results in Section 3, we observe the average migration duration is 7 times longer and less stable than when migrations are performed sequentially. This reveals despite the network interlink is not saturated, the parallel migration 4 VMs on a single Gigabit link still saturates the network. According to the pre-copy algorithm used in Qemu, a bandwidth below a certain threshold causes the re-transmission of the set of dirty pages that are quickly updated, named Writable Working Set (WWS) [START_REF] Clark | Live migration of virtual machines[END_REF]. The minimum bandwidth that guarantee the termination of a migration depends therefore of the WWS size and the memory dirtying rate. Figure 3 shows the number of pages that are made dirty by httperf in 30 ms depending on the request rate. This indicates that with a 200 requests per second rate, at most 2 VMs should be migrated simultaneously on a Gigabit link to ensure their termination. We verified this assumption in an experiment that varies the number of VMs migrated simultaneously on a Gigabit link. It consists to migrate the VMs of 3 servers from a server to another.

Metrics

The servers were selected to ensure an equitable sharing of the 3 Gb/s interlink between them. Table 3: Optimisations according to the workload peculiarities Table 3 shows the results. In Scenario B1, the 4 VMs on each server are migrated in parallel. In Scenario B2, the VMs are migrated 2 by 2. With regard to Scenario B1, the duration is 3 times shorter and stable. This indicates the network is no longer saturated and the bandwidth available for the migration is sufficient to prevent a repetitive copy of the dirty pages. In Scenario B3, the VMs are migrated one at a time. With regard to Scenario B2, the migration duration has been only divided by 2 while the completion time remains unchanged. The last two scenarios ensure then a fully effective migration management by dealing with workloads and network specificities. We were able to reduce by up to 7 the average migration duration and by up to 3 the time spent to migrate. However, it may be judicious to prefer Scenario B3 over Scenario B2 depending on the VMs peculiarities. For example, when a group of VMs communicates extensively, it is preferable to migrate the VMs in parallel and synchronize the migration terminations to restrict the amount of data exchanged over a highlatency interlink [START_REF] Zheng | COMMA: Coordinating the Migration of Multi-tier Applications[END_REF]. In contrast, when the VMs are independent, it is wise to migrate the VMs one by one to reduce the average migration duration so the impact on the workload.

Metrics

Conclusion and Future Work

Server maintenance is a common but still critical operation that must be prepared by operators. It requires to plan the migration of numerous VMs but also the management of the server state. With the ever increasing complexity of the datacenter infrastructure, it becomes difficult to define plans that are fast, reliable or simply fitting the environment peculiarities.

In this paper, we experimented migration plans involving up to 45 servers. This exhibited performance bottlenecks but also evaluation metrics to qualify the quality of a migration plan. We then show how the knowledge of the environment peculiarities can improve the migration plan quality. In practice, we adapted the number of migrations to perform in parallel between the servers, but also inside each server. These decisions were applied manually from the knowledge of the network topologies, and the workload particularities.

As future work, we then want to automatize the creation of efficient plans. We first need to model the aspects that qualify a migration plan. Based on the experiments, we conclude our model must consider the workload characteristics such as the dirty page rate and the estimated migration durations, the network topology but also external and possible evolving side constraints such as a possible power budget, a completion deadline or a server licensing policy. We already patched Qemu to retrieve the VM dirty page rate but we also planned to use an approach similar to Pacer [START_REF] Zheng | Pacer: A Progress Management System for Live Virtual Machine Migration in Cloud Computing[END_REF] to predict the duration of a live migration. With regards to the network, it is possible to extract the network topology using standard monitoring tools. In addition, dynamic aspects such as the practical decomposition of the traffic made by an aggregation protocol can be observed from benchmarks. We plan to implement this model over the VM manager BtrPlace [START_REF] Hermenier | Bin repacking scheduling in virtualized datacenters[END_REF][START_REF] Hermenier | BtrPlace: A Flexible Consolidation Manager for Highly Available Applications[END_REF]. BtrPlace is an extensible VM manager that can be customized to augment its inferring capabilities. It provides a composable VM placement algorithm that has already been used to address energy-efficiency [START_REF] Dupont | An energy aware framework for virtual machine placement in cloud federated data centres[END_REF], or scheduling concerns such as the continuous respect of server licensing policies [START_REF] Dang | Higher SLA Satisfaction in Datacenters with Continuous VM Placement Constraints[END_REF]. The use of BtrPlace might also be beneficial to support side constraints that have to be expressed by the operators. It already provides a support for configuration scripts to state easily constraints over servers and VMs. Furthermore, the implementation of the constraints is usually short.

We also want to investigate on another common maintenance operation that is the usage of anti-virus over VM disk images, a very storage intensive operation that must be planned carefully to maintain the performance of the storage layer. More generally, we think that while advanced algorithms have been proposed to optimize the datacenter usage, there is a large pace for innovation to assist operators at doing their job. Typically, how to automatically improve the preparation of maintenance operations from high-level expectations while hiding the complex technical peculiarities that are today required to be mastered.

Fig. 1 :

 1 Fig. 1: Testbed design

  (a) Scenario 1 -Blade-center maintenance new blade center out-dated blade centers (b) Scenario 2 -Server upgrading

Fig. 2 :

 2 Fig. 2: Experimental scenarios

Fig. 3 :

 3 Fig. 3: dirty pages generated by httperf in 30 ms (95% confidence interval)

Table 1 :

 1 Scenarios comparison

		Scenario 1	Scenario 2
	Metrics	Sequential	Parallel	Sequential	Parallel
	Time to completion (sec.)	2871	446	3467	384
	Mean migration duration (sec.)	12.2	192.9	11.2	158.0
	standard deviation	5.41	45.12	4.81	52.97
	Server boot time (sec.)	113.1	116.5	114.9	115.0
	Server shutdown duration (sec.)	29.5	28.8	32.2	32.1
	Energy consumption (kWh)	2098.4	366.4	3317.5	548.1
	Max. peak power (kW)	2.70	4.47	4.24	6.05

Table 2 :

 2 Optimisations according to the network interlink peculiarities

		Scenario A1	Scenario A2	Scenario A3
	Mean migration duration (sec.)	284.2	63.66	50.62
	standard deviation	251.78	33.15	23.17
	Time spent to migrate (sec.)	604	213	148
	Energy consumption (kWh)	286.27	156.35	132.52

https://www.grid5000.fr

Acknowledgments

This work has been carried out within the European Project DC4Cities (FP7-ICT-2013.6.2). Experiments presented in this paper were carried out using the Grid'5000 experimental testbed [3] 3 , being developed by INRIA with support from CNRS, RENATER and several universities as well as other funding bodies.


Shixin Xú
email: xushixin@buaa.edu.cn

Nabil Anwer
email: anwer@ens-cachan.fr

Sylvain Lavernhe
email: lavernhe@ens-cachan.fr

Conversion of G-code programs for milling into STEP-NC

Keywords: G-code, STEP-NC, manufacturing features, canonical machining functions, process plan

STEP-NC (ISO 14649) is becoming a promising standard to replace or supplement the conventional G-code programs based on ISO 6983 due to its feature based machine independent characteristics and its centric role to enable efficient CAD/CAM/CNC interoperability. The re-use of Gcode programs is important for both manufacturing and capitalization of machining knowledge, nevertheless the conversion is a tedious task when carried out manually and machining knowledge is almost hidden in the low level G-code. Mapping G-code into STEP-NC should benefit from more expressiveness of the manufacturing feature-based characteristics of this new standard.

The work presented here proposes an overall method for Gcode to STEP-NC conversion. First, G-code is converted into canonical machining functions, this can make the method more applicable and make subsequent processes easier to implement; then these functions are parsed to generate the neutral format of STEP-NC Part21 toolpath file, this turns G-code into object instances, and can facilitate company's usage of legacy programs; and finally, also optionally, machining features are extracted to generate Part21 CC2 (conformance class) file. The proposed extraction method employs geometric information of cutting area inferred from toolpaths and machining strategies, in addition to cutting tools' data and workpiece's dimension data. This comprehensive use of available data makes the extraction more accurate and reliable. The conversion method is holistic, and can be extended to process a wide range of Gcode programs (e.g. turning or mill-turn codes) with as few user interventions as possible.

Most CNC machines are programmed in the ISO 6983 G-code language, which limits program portability because the language focuses on coding the tool center path with respect to machine axes, rather than the machining process with regard to the part. Moreover CNC vendors usually extend the language beyond the limited scope of ISO 6983 creating their own macro-languages implying that they can only be executed on specific machine-tools. STEP-NC (STEP Data Model for Computerized Numerical Controllers) is a model of data transfer between CAD/CAM systems and CNC machines. It aims at standardizing the data formats used at the machine level, one key link in the entire process chain in a manufacturing enterprise. STEP-NC specifies machining processes rather than machine tool motion, using the objectoriented paradigm and the concept of "workingsteps", which correspond to high-level manufacturing features and associated process parameters. Thus STEP-NC creates an exchangeable, workpiece-oriented data model for CNC machine tools, supports the direct use of computer-generated product data from ISO 10303, and ensures compatibility of CNC input data. CNCs are responsible for translating workingsteps to axis motion and tool operation [I1].

In the course of STEP-NC adoption, there are many needs to convert legacy G-codes into STEP-NC programs. With the impending prevalence of this new standard, manual conversion of G-codes will be a huge, tedious task. Therefore, automatic and effective conversion will be highly adopted by manufacturing enterprises. On the other hand, legacy programs are important resources for enterprises. They contain optimal cutting conditions and machining strategies for making products, and embody implicitly the machining know-how from various experts. So converting legacy Gcodes to get corresponding STEP-NC files, instead of designing from scratch, would save much costs and resources for enterprises. Also this practice would facilitate the accumulation of machining know-how due to information storage in object-oriented structures.

The essential of the conversion is reconstruction of a manufacturing feature oriented NC program from a G-code program. NC programming by feature approach can streamline the manufacturing cycle and make CAM/CNC integration easier since manufacturing feature data and the associated process data originate from CAM. Also the feature approach makes NC-to-CAM feedback link realizable. The core of STEP-NC data model is manufacturing features and machining operations, which are encapsulated in a workingstep. Figure 1 shows STEP-NC data model structure [I1]. A workingstep represents the machining process for a specified area of the workpiece. It specifies the association between "machining_feature" and "machining_operation" to be performed on the feature. The "machining_workingstep" is characterized by the use of a single tool and a set of technological parameters. A machining operation contains technological data for a workingstep. A workplan is a collection of workingsteps with an execution sequence. The "project" serves as a starting point for the program execution. The division of information means that changing the sequence of workingsteps or optimizing tool paths can be done with minimal impact on the rest of the data. Only few researches addressed G-code to STEP-NC conversion. Shin et al. developed a system, called G2STEP, to convert G-codes into STEP-NC for turning applications [START_REF] Shin | Reincarnation of Gcode based part programs into STEP-NC for turning applications[END_REF]. The system is based on two main functions: the pre-processor function and the turning feature recognition function. In the pre-processor, each block of a G-code program is interpreted and stored in a pre-defined data structure. These blocks are divided using some hints and these blocks are grouped into workingsteps. At the turning feature recognition level, the feature profile remaining after a workingstep is generated, and the manufacturing feature, defined in STEP-NC, is recognized by a profile and pre-determined machining operation. However, this work did not handle milling applications and not fit well for roughing operations in G-code programs.

Zhang et al. proposed a method to re-use the process knowledge embedded in G-code part programs with different manufacturing resources [START_REF] Zhang | Process comprehension for shopfloor manufacturing knowledge reuse[END_REF]. The authors emphasized the "process comprehension", which is "essentially restructuring the combined manufacturing information in an NC program into a high-level process plan and the associated resource information." They proposed an abstract meta-model for different CNC controllers. The method briefly involves how to get a STEP-NC file from a G-code. They recognized features from a G-code mainly by tool types, toolpath boundary and the rawpiece geometry. STEP-NC entities are then created. However details of feature types and feature parameters, are not mentioned in the paper. Their method tries to decode a Gcode to get a STEP-NC file directly. Thus increasing the implementation difficulty and limiting the applicable scopes. This paper aims to present a systematic method for automatically converting G-code part programs into STEP-NC formats. The method is applicable to both milling and turning G-codes. In Section 2, we first make clear what should be given as inputs to the conversion process, followed by the overall strategy of the conversion. In Section 3, detailed descriptions of the conversion of G-codes into canonical machining functions are described. In Sections 4 and 5, detailed descriptions for obtaining STEP-NC Part21 files, implemented in explicit tool path level, and in manufacturing feature level are presented. The system development and a testing example are given in Section 6, followed by concluding remarks in Section 7.

2-Method overview

Since there is no information about tools, rawpiece and its setup in a G-code, we should supplement them for ensuring successful conversion. And the G-code should be an errorfree part program, hopefully, with high-quality, to make the conversion significant.

For example, one simple G-code with different shape of rawpieces will produce different final workpieces (Figure 2). With the following G-code, if a small rawpiece is used, it will make a profile feature; if a large rawpiece, it will make a slot feature. Similarly, the rawpiece's setup location, or its offsets with regard to the programming frame also affects the workpiece's geometry. Therefore the rawpiece's geometry, location, etc. are necessary supplements for the conversion. In fact, these supplements for the conversion roughly correspond to the phase of machining definition for carrying out a CNC machining. In order to illustrate the method, we use a very simple example as shown in Figure 4a. The case study is a finish milling in one layer to remove a 5mm-depth material on the planar top face of the stock. In this case the only machining feature is the planar face. The toolpath for one layer cutting is shown in Figure 4b, followed by the G-code in Table 1. The functions of any CNC machine can be viewed as a set of canonical machining functions defined by NIST based on ISO 6983 [K1]. If a machine has new functions beyond this standard, one can add new canonical functions. The G-code program is firstly mapped into canonical functions that the machine should execute. Secondly, by analyzing hints (such as tool changes, speed changes) in the canonical functions, workingsteps can be generated. In these workingsteps all operations are treated as freeform operations and features as toolpath features, except those that can be easily attached to operations, like canned cycles. Then toolpath data is converted into the data structure "toolpath" of freeform operations. Thus we can generate STEP-NC Part21 file in explicit toolpaths.

G90 G54 G0 X0 Y0 Z100 Y-50 G1 Z-50 F200 S300 M3 X100 Y50 X-100 Y-50 X0 Z100 G0 Y0 M5 M30
The "toolpath_feature" is introduced in STEP-NC to enable the definition of tool movements not covered by regular machining features (such as pockets, holes, slots, steps). It is a placeholder for explicit toolpaths assigned to the operations associated with it. 3 to 5-axis milling of freeform surfaces typically requires explicit specification of toolpaths. This kind of Part21 file (CC1) still has advantage over G-code. By connecting this information with the high-level operation and feature data, the toolpaths can always be interpreted within their semantic context. They are also provided in a structure which allows to identify the individual toolpath rather than to search through thousands of lines of unstructured code for axis movements.

Finally, we can extract manufacturing features from the toolpath data of the Part21 file by analyzing the machining regions, machining strategies, etc. In this process we need to merge some workingsteps and reorganize them. When achieved, the STEP-NC Part21 file in features and operations can be generated. The final step can be optional according to the needs of each company.

3-G-code to canonical functions

-Canonical functions

Canonical machining functions were defined by NIST with two objectives. First, all the functionality of common 3 to 5-axis machining centers had to be covered by them; for any function a machining center can perform, there has to be a way to tell it to do that function. Second, it should be possible to interpret an ISO 6983/RS274 compatible NC program into canonical function calls.

Canonical functions are atomic commands. Each function produces a single tool motion or a single logical action. NC commands include two types: those for which a single NC command corresponds exactly to a canonical function call, and those for which a single one will be decomposed into several canonical function calls. For instance, G1 (move in a straight line), M8 (turn flood coolant on) are of the first type; G83 (peck drilling) is of the second type. Some main canonical functions are listed below:

1) Representation: SET_ORIGIN_OFFSETS(); USE_LENGTH_UNITS() 2) Free Space Motion: STRAIGHT_TRAVERSE() 3) Machining Attributes: SELECT_PLANE(); SET_FEED_RATE() 4) Machining Functions: STRAIGHT_FEED(); ARC_FEED() 5) Spindle Functions: SET_SPINDLE_SPEED(); START_SPINDLE_CLOCKWISE(); START_SPINDLE_COUNTERCLOCKWISE(); 6) Tool Functions: CHANGE_TOOL(); SELECT_TOOL(); USE_TOOL_LENGTH_OFFSET() 7) Miscellaneous Functions: FLOOD_OFF(); FLOOD_ON() 8) Program Functions: PROGRAM_STOP()

In G-code, canned cycles (G81-G89) are for hole machining operations. A canned cycle is decomposed into its basic moves expressed by the above canonical functions. For example, (G81 X…Y…Z…R…L…) is intended for drilling. Its motions are: preliminary motion(s); move Z-axis at current feedrate to the Z position; Retract Z-axis at traverse rate to clear Z. This work does not handle G-codes programs that have macro-commands. Non-linear G-code program structure, like parallel, selective, non-sequential, are not handled, either.

-The role of the conversion

In a G-code program, the working coordinate system may change frequently, and the coordinate data may be absolute or relative, and the radius/length compensation may be used. All these are up to the user's choice according to programming convenience. In addition, as in all dialects of G-codes, a line of code may specify several different things to do, such as moving from one place to another along a line/arc, changing the feed rate, starting the spindle turning, etc. The Interpreter reads lines of a G-code one at a time, emulates the execution, and keeps track of the current state of the controller. We use the Interpreter: to check the correctness of the inputting G-code; to unify the coordinates and parameters for a line/arc move with respect to a chosen coordinate system; to determine the correct execution order of the G-code. The Interpreter outputs the following canonical functions as shown in Table 2, for the example G-code. This conversion facilitates greatly the subsequent processes. STRAIGHT_TRAVERSE(91.9,100) 14 STRAIGHT_TRAVERSE(91.9,15) 15 SET_FEED_RATE(240) 16 STRAIGHT_FEED(91.9,0) 17 STRAIGHT_FEED(91.9,133.5,0) 18 STRAIGHT_FEED(74.8,133.5,0) 19 STRAIGHT_FEED(74.8,0) 20 STRAIGHT_FEED(57.7,0) 21 STRAIGHT_FEED(57.7,133.5,0) 22 STRAIGHT_FEED(40.6,133.5,0) 23 STRAIGHT_FEED(40.6,0) 24 STRAIGHT_FEED(23.5,0) 25 STRAIGHT_FEED(23.5,133.5,0) 26 STRAIGHT_FEED(6.4,133.5,0) 27 STRAIGHT_FEED(6.4,0) 28 STRAIGHT_TRAVERSE(6.4,15) 29 STOP_SPINDLE_TURNING() 30 FLOOD_OFF() 31 SPINDLE_RETRACT() 32 PROGRAM_END()

4-Canonical functions to STEP-NC Part21

A STEP Part 21 file contains two sections: the header section and the data section. Since the conversion is only relevant to the data section, the following will only consider the data section of a Part21 file. The data section has the following main types of entities: cutting tools; definitions and their setups of rawpieces (usually only one); one project, workplans and workingsteps; manufacturing features; machining operations; technology, functions and machining strategies; and placements, planes, dimensions, etc. The entities for tools and rawpieces can be written in the Part21 file directly as per the inputting information since they have less connection involved with other entities.

We devised a canonical function interpreter for the generation of other entities. In the beginning a "struct" buffer is defined to keep track of the controller status, such as the units, the security plane, the coolant switch, feed rate, spindle speed, the current tool and its position. The interpreter maintains this buffer when it runs. The interpreter emulates the execution of the canonical functions one by one: if it meets a "STRAIGHT_TRAVERSE", a "rapid movement" entity is created; if it meets one or several consecutive "STRAIGHT_FEED"s or "ARC_FEED"s, a "machining workingstep" which includes a freeform operation is created. The parameters of these functions are used as cutter location data stored in the toolpath list of the freeform operation. Of course sometimes computation is needed for obtaining the toolpaths. Other data, such as technology and machining functions can be inferred from the buffer. The entities of "toolpath features" here are used for information only. For cycle operations, hole features, not toolpath features are used. Thus when the emulation comes to an end, we can get a STEP-NC Part21 CC1 file in explicit toolpaths (cf. Appendix A.1, here only the data section is shown).

5-STEP-NC Part21 file to manufacturing features

This phase deals with mainly the extraction of manufacturing/machining features from toolpaths based on the previous Part21 CC1 file. Yan [START_REF] Yan | Recognition of machining features and feature topologies from NC programs[END_REF] adopts a Z-map based method; Other type of method is: first build a CAD model from a simulated or cut model usually in a STL file, then using conventional methods do the recognition [START_REF] Anwer | Reverse engineering for NC machining simulation[END_REF][START_REF] Sunil | Automatic recognition of features from freeform surface CAD models[END_REF]. Here we carry out the work based on toolpaths and tool's geometry. In this phase, one freeform operation corresponds to one machining workingstep. Many freeform operations might correspond to one manufacturing feature because often there are several layers of a rough machining and finish machining, which are needed to make a final feature. So one major procedure is to merge those freeform operations that machine the same feature, as well as the relevant workingsteps and rapid movements.

The feature types we are coping with are the machining features defined in ISO 14649 Part 10[I2]. The procedure for processing phase 1 is detailed as follows.

Step 1: From a freeform operation, get the tool and the toolpath list. If no freeform operations left, end phase 1.

Step 2: Analyse the feature type by tool type first. If the tool type is for drilling, the feature is a round hole, and note down the diameter and the axis. They can be used to identify the same hole in other operations; if the tool is a facemill, the feature is a planar_face; if the tool is a T-slot_mill or dovetail_mill or woodruff_keyseat_mill, feature is obviously a slot. Go to Step 1.

Step 3: If the tool is an endmill (including tapered_endmill, ball_endmill, bullnose_endmill), then analyse the x, y, z-values of the CL (cutter location) data in the toolpath list. If z-value varies and x, y-values keep constant, it is milling a hole feature. Note down the diameter and axis. Go to Step 1.

Step 4: If x, y, z-values are all varying, it is a freeform milling operation to make a region (surface). Go to Step 6.

Step 5: If z-value keeps constant and x, y-values vary, it is a 2½D milling operation.

Step 6: Compare the toolpath list with the one of the next freeform operation, for each CL-data, if the corresponding x, yvalues are the same and the z-value is decreased, the two operations are cutting different layers of the same feature, then they can be merged. For a region feature, go to Step 1.

After the above processing, extracted features are easily found; processing phase 2 deals with the remaining toolpaths to find planar_faces, general_outside_profiles, closed_pockets and open_pockets. A step feature is a special type of open_pocket that has only one wall face (the open boundary is a line segment). A slot feature is also a special type of pocket, whose profile shape has a constant width. The main grounds to find features in phase 2 are the cutting area (the tool's covering region for cutting movements, Figure 3b) and the milling strategy, which are computed based on toolpath CL data.

Common 2½D milling strategies are shown in Figure 6. Unidirectional milling is going from one side to the other, then lifting the tool and going back to the starting point. Bidirectional milling is in a zigzag fashion, i.e. going from one side to the other and back. Center milling is along the center of the feature. It is often used for milling along the center of a slot. Contour milling, which is a typical strategy for pocket milling, is in several paths following the contour of the feature. Contour spiral milling is similar to contour parallel milling, with the exception, that in this case the milling path is a truly spiral path rather than concentric paths which are connected by an orthogonal movement. In general practices, the relationship between features and milling strategies is as follows.

"closed_pocket", "round_hole" --contour parallel milling, contour spiral milling. "open_pocket" --bidirectional/unidirectional milling. "planar_face" --bidirectional/unidirectional milling, contour parallel milling (outside-in). "step" --bidirectional/unidirectional milling. "slot" --center milling. "general_outside_profile" --contour parallel milling. In phase 2 the method is illustrated as in Figure 7. In 2½D manufacturing, the computation of the cutting area and milling strategy from toolpath CL data is not difficult since they are 2D geometries. The milling strategy can also be used for checking the correctness of the extracted features. After characterizing the feature types, the profiles of features are obtained from the boundaries of the cutting areas, which are determined by toolpaths and cutters' geometry. Sometimes the feature profiles thus obtained need to be fixed a bit if there is finish cutting or supplementary cutting to make the feature. For open features, such as planar_faces, steps, open_pockets, their profiles need not to be exact, as long as the open parts of their profiles are outside the workpiece's boundary. This requirement can simplify the computation. Some cutting parameters, as required by the machining technology in STEP-NC, such as radial/axial depths, can also be inferred from the milling strategy.

The converted STEP-NC Part21 CC2 file in manufacturing features is shown in appendix A.2 (only the data section shown). In this file the only feature is "PLANAR_FACE".

6-Implementation and examples

The entities of 11,111 [I2] [I3] [I4] are mapped to C++ classes. The syntax of G-code and Part21 files is checked during the generation. The conversion of G-codes into canonical functions, and canonical functions into STEP-NC Part21 (CC1) can cope with 3 to 5-axis milling programs. The method for generating STEP-NC Part21 (CC2) is applied for 2½D G-code programs. In a future work, entities of STEP-NC Parts 12,121 (turning) will be mapped to C++ classes, so that turning programs can be also processed.

7-Conclusions

While STEP-NC is gaining popularity in the manufacturing industry, the issue of legacy G-code program conversion is arising. This paper proposes an overall approach for the conversion of a G-code program into STEP-NC. The conditions for a valid conversion are detailed. This approach includes three main phases: first, G-code program is converted into canonical functions; then, canonical functions are analyzed to create a Part21 file in explicit toolpaths (CC1); and finally, by applying machining feature recognition techniques, the Part21 file is rewritten into a higher level Part21 file in manufacturing features (CC2). Although, 2½D machining features can be recognized, and the machining feature recognition approach developed here have no feature interaction issues, the problem of merging freeform operations that make the same feature has to be solved. Future work will include: (a) detecting turning or milling machining type should be automatic, as well as the number of axis involved in the program, (b) the extension of the approach to handle turning/mill-turn G-code programs, (c) to increase the capacity of manufacturing feature recognition, especially for the case of region features.

Figure 1 :

 1 Figure 1: STEP-NC data model.

Figure 2 :

 2 Figure 2: From rawpiece to final workpiece. In this work, we consider G-code program, information of cutting tools used in the G-code, rawpiece's shape and location. Besides, we should know whether the given G-code is a milling program, or a turning one, as well as the number of axis involved in the program as far as current realization. Two types of conversion outcomes are proposed: STEP-NC Part21 file in explicit toolpaths (conformance class 1, or CC1) and STEP-NC Part21 file in manufacturing features (CC2). The first type mainly use toolpath features, and can deal with 3 to 5-axis part programs. The second type performs manufacturing feature extraction from the given G-code part program, and it can deal with G-code programs for 2½D machining at present realization. The information flow is

Figure 3 :

 3 Figure 3: The information flow.

  Figure 4: Illustration example.Table 1: G-code for milling the planar faceG54 G90 G21 G40 G49 M5 M9 T1 M6 (Use an endmill, Ø18mm) G43 H1 (Cutter length compensation by 50mm) M8 S720 M3 G0 X91.90 Y-13.50 Z100.00 Z15.00 G1 Z0.00 F240.00 Y133.50 X74.80 Y-13.50 X57.70 Y133.50 X40.60 Y-13.50 X23.50 Y133.50 X6.40 Y-13.50 G0 Z15.00 G49 M9 M5 M30

  The overall procedures can be summarized as follows. A Gcode program is firstly translated into canonical functions, which are then interpreted into a STEP-NC Part21 file (CC1). The CC1 file is further converted into the higher level STEP-NC Part21 file (CC2) after manufacturing feature extraction[I2] [I3] [I4]. If we want to share a G-code program in a higher level, or want to establish a bidirectional information flow between CNC and CAM, we can choose CC2 conversion. Figure5shows the overall strategy.

Figure 5 :

 5 Figure 5: The overall strategy.

Figure 6 :

 6 Figure 6: Common milling strategies.

Figure 7 :

 7 Figure 7: Milled feature extraction.

A

  test example is given in Figure 8. It has 3 machining features: a planar face, a round hole and a closed pocket. A section of the resulting Part 21 CC2 file is shown as follows, and part of the initial G-code program is shown in appendix A.3.

Figure 8 :

 8 Figure 8: A test example.

Table 2 : Canonical functions for milling the planar face

 2

	1USE_LENGTH_UNITS(UNITS_MM)
	2 SET_ORIGIN_OFFSETS(0, 0, 0)
	3 SET_FEED_REFERENCE(CANON_XYZ)
	4 STOP_SPINDLE_TURNING()
	5 FLOOD_OFF()
	6 SPINDLE_RETRACT()
	7 USE_TOOL_LENGTH_OFFSET(0)
	8 CHANGE_TOOL(ENDMILL_18MM)
	9 USE_TOOL_LENGTH_OFFSET(50)
	10 FLOOD_ON()
	11 SET_SPINDLE_SPEED(720)
	12 START_SPINDLE_CLOCKWISE()
	13

Acknowledgements

This work is a part of the ANGEL FUI project recently funded by the French Inter-ministerial Fund and endorsed by top French competiveness clusters (SYSTEMATIC PARIS REGION "Systems & ICT", VIAMECA "Advanced Manufacturing" and ASTECH "Aeronautics & Space").

Appendix

A.1 -Part21 file (CC1) DATA;

A.3 -Part of the initial G-code for the test G54 G90 G21 G40 G49 M5 M9 T1 M6 (Use an endmill, diameter 18mm) G43 H1 (Length compensation by 50mm) M8 S720 M3 G0 X91.9 Y-13.5 Z100.

(To finish top face of rawpiece in 2 layers) Z15. G1 Z2.5 F240. (1st layer, depth 2.5mm) Y133.5 X74.8 Y-13.5 X57.7 Y133.5 X40.6 Y-13.5 X23.5 Y133.5 X6.4 Y-13.5 G0 Z15. X91.9 G1 Z0. (2nd layer, depth 2.5mm) Y133.5 X74.8 Y-13.5 X57.7 Y133.5 X40.6 Y-13.5 X23.5 Y133.5 X6.4 Y-13.5

(To drill and ream a thru hole) G0 Z15. G49 M9 M5 T2 M6 (Use a spiral drill, diameter 20mm) G43 H2 (Length compensation by 70mm) M8 M3 F900. S720 G0 Z30. G90 G99 G81 X20. Y60. Z-18. R10. G99 G81 X20. Y60. Z-36. R10. F1800. G99 G81 X20. Y60. Z-60. R10. F1350. G1 Z10. F1800. G80 G49 M5 M9 (end of drilling cycle) T3 M6 (Use a reamer, diameter 22mm) G43 H3 (Length compensation by 50mm) M8 M3 S1080 G90 G99 G85 X20. Y60. Z-60. R10. G80 G49 M5 M9 (End of reaming cycle) (To cut a pocket, rough & finish) T1 M6 (Use an endmill, diameter 18mm) G43 H1 (Length compensation by 50mm) M8 S1200 M3 F2400. G0 Z30. X64.754 Y50.069 Z15.

(To rough pocket in 5 layers, 5.9/layer) (First 2 blocks: to run helical approach) G2 X77.2 Y55. Z-5.9 I5.246 J4.932 G2 X70.