Adaptive execution of an NC program with feed rate

0 downloads 0 Views 1MB Size Report
F. Ridwan email: firmanridwan@ft.unand.ac.id. Int J Adv Manuf Technol ...... Education of Indonesia, under scholarship contract no. 1840-. D4.4-2008. Appendix.
Int J Adv Manuf Technol DOI 10.1007/s00170-012-3959-9

ORIGINAL ARTICLE

Adaptive execution of an NC program with feed rate optimization Firman Ridwan & Xun Xu & Frederick Churn Loong Ho

Received: 16 June 2011 / Accepted: 26 January 2012 # Springer-Verlag London Limited 2012

Abstract The use of adaptive feed rates shortens machining time and increases the potential of efficient machining. Currently, feed rates in an numerically controlled (NC) program are pre-set constant values that are often determined based on the job shop experiences gained over the years by skilled operators. There is no such way to adapt feed rate to on-going cutting conditions since the feed rate is set before the NC code is executed. In this study, an optimizer for canonical machining commands (optiCMC) has been developed. Fuzzy adaptive control is used to keep a constant cutting load by adjusting feed rate automatically to the cutting conditions. The results showed that optimum feed rates can be achieved and controlled during the machining process considering the machine tool's capabilities and limitations. The developed optiCMC helps achieve machining optimization, shorten machining time, and increase product quality.

aallowable CN c dsi

Keywords Optimization . NC code . Fuzzy control . Tool condition monitoring

fz fmz

Nomenclature amin Minimum depth of cut (millimetres) Average depth of cut (millimetres) as amax Maximum depth of cut (millimetres)

Δf ks

F. Ridwan : X. Xu (*) : F. C. L. Ho Department of Mechanical Engineering, University of Auckland, Auckland, New Zealand\ e-mail: [email protected] F.C.L. Ho e-mail: [email protected] F. Ridwan Department of Mechanical Engineering, Andalas University, Padang, Indonesia email: [email protected] F. Ridwan email: [email protected]

ENc ηm Fmt Fmtallowable fmin fmax fs1opt fs2opt

Nm Nmc Nc Ncref n Ra Ra rt t tm opt ts1 Vc

Depth of cut permitted by machine (millimetres) Change of cutting power (kilowatts) Constant Different types of face milling (i01 full-face milling, i02 unidirectional part face, i03 bilateral part face) Error of the cutting power (kilowatts) Mechanical efficiency Total mean tangential milling force (newtons) Total mean tangential milling force allowable (newtons) Minimum feed rate (millimetres per minute) Maximum feed rate (millimetres per minute) Optimum feed rate for time-critical (millimetres per minute) Optimum feed rate for quality-critical (millimetres per minute) Feed per tooth (millimetres per revolution) Allowable feed mechanism (millimetres per minute) Change in feed rate (millimetres per minute) Specific cutting resistance (newtons per square millimetre) Main drive motor power (kilowatts) Predicted motor power (kilowatts) Cutting power (kilowatts) Reference cutting power (kilowatts) Milling cutter rotational speed (revolutions per minute) Arithmetic surface roughness (micrometres) Arithmetic average surface roughness (micrometres) Tool nose radius (millimetres) Chip thickness (millimetres) Machining time (minutes) Optimum machining time for time-critical (minutes) Cutting speed (metres per minute)

Int J Adv Manuf Technol

1 Introduction Numerically controlled (NC) machining based on G-codes (stipulated by ISO 6983 or RS274D) has had a tremendous impact on the manufacturing industry since it was first developed over half a century ago. G-codes were initially intended for documenting low-level data that are mostly step-by-step instructions. Such a part program only contains a subset of information from the design and planning phase. This conventional way of NC programming is therefore considered as a bottleneck for a complete and real-time optimisation of machining processes. For example, the selection of feed rate is normally based on an operator's own experience. Very often, feed rates were selected conservatively for safety and reliability reasons. Recommended feed rate values can also be found in various handbooks. However, they should only be used as a baseline value. They are paired up with a fixed spindle speed and depth of cut. When machining complex shapes with varying depth of cuts, proper feed rate adjustment and modification during machining are required, but usually labour intensive and time consuming. In addition, if the feed rate is reduced to accommodate the ‘worst case scenario’, machining efficiency will be compromised and machine tools underutilized. The majority of the current machining optimization research resorts to various feed rate scheduling techniques. This approach requires a huge programming effort in order to schedule a feed rate for every single block. Machine condition monitoring (MCM) is considered as one of the most effective ways in adapting to the dynamic conditions of the machining process in a more precise manner. MCM is essentially a process-monitoring exercise that combines data acquisition, signal processing and decision making in one. Data acquisition is about sensing and detecting the current machining constraints on a machine tool that may lead to major problems such as product quality deterioration, tool breakage or even machine breakdown. Signal processing is about converting the raw signal data to such a form that enables understanding of the machining process. The methods used can be based on the time domain, frequency domain or time-frequency domain. Decision making is about deciding the movement of the machine tool for optimal machining. For MCM to be more effective, more versatile NC programming codes are needed. In 1997, the National Institute of Standards and Technology (NIST) developed a testbed for an open architecture controller by using newly defined NC functions called canonical machining command (CMC). The intention was to overcome the vendor-specific problems rooted from the diversity of machine tools. Various NC inputs from different vendors may be converted to CMCs providing a common interface for CNCs [1]. It was recognized that CMC allows further expansion of the part program for more comprehensive functions and can be useful for sensory-interactive algorithms [2].

This paper describes an optimizer for CMC (hence called optiCMC) for adaptive feed rate optimization. The aims of optiCMC are to achieve efficient machining process, adapt and optimize feed rate during machining and perform machining operations considering machine capabilities and limitations. optiCMC uses fuzzy adaptive control for feed rate adjustment. The rest of the paper is organized as follows. The related studies in developing feed rate optimization are presented in Section 2. In Section 3, the optiCMC model and feed rate algorithms based on fuzzy logic are discussed. Section 4 describes the fuzzy inference system (FIS) that is used to support feed rate optimization. Section 5 provides a case study demonstrating and validating the optimization model. The results and discussions are given in Section 6. Finally, Section 7 concludes the paper.

2 Literature review In order to improve machining performance and efficiency, a significant amount of research has been devoted to performing feed rate optimization under the current NC programming environment (e.g. using G-codes). Various machining aspects have been considered such as jerk [3], tool path [4], tool allocation and management [5] and acceleration deceleration profiles of feed drive systems [6]. Predictive models based on a mechanistic force model have been developed by numerous researchers to predict the cutting forces and process conditions [7–10]. Simulation results used to compute cutting configurations based on a 3D geometric model were also amongst the techniques used [11, 12]. The results mostly demonstrated that the feed rate can be continuously adjusted to meet a given constraint such as maintaining the cutting force to be below a maximum allowable value. Some researchers performed offline feed rate scheduling in their optimization methods by modifying NC code blocks line by line [13–15]. Optimized feed rates are inserted in each block in order to bring the cutting force to a certain value. However, this approach requires a huge programming effort. In addition, the values are obtained from simulation models that may be subjected to modelling errors. On a whole, offline feed rate optimization alone cannot always guarantee a good result. The values are obtained through offline optimization procedures often by considering a static environment, neglecting the dynamic machining behaviour. In recognition of the problem, researchers have tried to integrate solid models using offline feed rate optimization with online monitoring and supervisory control [16, 17]. Excessive cutting force is known to be an indicator of decreasing machining productivity and product quality. Cutting force is often managed by adjusting feed rate using various optimization models. In many developed optimization models, fuzzy control is considered to be an effective approach

Int J Adv Manuf Technol

compared with the proportional control theory. Many studies have been performed, and the outcomes proved that fuzzy control algorithms can manipulate the feed rate to maintain a constant cutting force in machining processes [18–20]. For example, spindle torque due to machining with various depths of cut can be managed by optimizing feed rate using fuzzy control [21]. A hybrid mathematical fuzzy approach has been used to estimate feed-cutting force correlation from the feed motor current and then use its estimated feed-cutting force equation to monitor tool-wear condition [22]. Chatter can also be suppressed by altering machining parameters using a fuzzy system [23]. Power consumption is proportional to the torque that a motor provides. In other words, correlation can be found between electrical power and mechanical power, and between electrical current and mechanical force. Therefore, it can be indirectly used to analyse and monitor cutting forces. When motor power is used as an indicator for the cutting load, the relationship between input power and output force or torque is well understood to be a linear one. The major advantage of using measurement of motor-related parameters to monitor machining processes is that the measuring apparatus does not disturb the machining process. Therefore, it is better suited for a practical production environment. This is the main reason why cutting power is used as the constraint for the fuzzy logicbased feed rate optimization and adaptive control. The research work reported in this paper focuses on the development of optiCMC. optiCMC is essentially an upgraded CMC function for real-time feed rate optimization. The algorithm uses fuzzy adaptive control for feed rate adjustment based on two input signals, cutting power error and cutting power reference error. The objectives of optiCMC are to achieve efficient machining process, adapt and optimize feed rate during machining and perform machining process considering machine capabilities and limitations.

canonical commands which call for motion, with roughly a one-to-one correspondence between a canonical motion command and a command that a commercial board recognizes. (c) It must be possible to interpret G-code commands into canonical commands. The Appendix shows the comparison between CMCs and G-codes. For every group of functionality, there are general functions that can be described in both languages. CMC has the advantage of being more human readable. This can be very practical if the program involves machining with complex shapes and thus requires a large number of code lines. 3.2 The proposed model (optiCMC) As stated before, CMC is suitable for accommodating sensory-interactive algorithms. However, both CMCs and Gcode programs neglect acceleration and deceleration and do not consider machine dynamics. For example, parts of a machine may be programmed to move at a specific rate. Due to the moment of inertia of the moving part, the rate cannot be effectively implemented. It needs time to accelerate to the set point of the rate. Similarly, stopping involves deceleration. G-code commands have been standardized, and there is no mechanism for working around these situations. With canonical machining commands, it is possible to develop the function to deal with machine dynamics [24]. optiCMC is developed for feed rate optimization based on the dynamic machining behaviour. The main intention is to guarantee an efficient machining process by maintaining an optimal level of machine capability and limitation. Machine behaviour is acquired by a cutting force sensor and driven by a fuzzy control algorithm. The rest of this section provides a comparison on how feed rate is employed in NC programming and in optiCMC. This is followed by a description of the feed rate optimization algorithm implemented in optiCMC.

3 Development of optiCMC 3.1 Overview of CMC NIST classifies CMCs as atomic commands where every command produces a single tool motion or a single logical action. The reason for this is to make the command as simple as possible in order to make mappings to commercial control boards straightforward. CMCs were devised with three main objectives [24]: (a) All functionalities of a common machining centre have to be covered by the commands; for any function a machine can perform, there has to be a way to tell it to do that function. (b) It is possible to use readily available commercial motion control boards from various vendors to carry out those

3.2.1 Comparison of NC code programming Figure 1 illustrates three different ways of assigning a feed rate for CNC machining. In G-code programming, the feed rate is first set in a single block. The G01 command denotes linear movement. In the case of feed rate optimization based on cutting forces, the feed rate values are normally set by scheduling the program. The performance of the NC code using this scheduled feed rate is firstly evaluated by predicting the cutting force and machine surface error. The feed rates specified in Gcode are supposed to be achieved instantaneously. However, the physical drive system of the machine tool requires time to reach the desired set point of the feed rate. Apart from that, the desired feed rate may sometimes exceed the allowable power limits resulting in a higher tool load. In practice, the dynamics

Int J Adv Manuf Technol

G-code G01 X10 Y10 Z10 F300 G01 is used to allow straight movement to 10,10,10 mm using feed-rate of 300 mm/min.

G01 X30 Y10 Z10

CMC

optiCMC

SET_FEED_RATE (300) Feed-rate is set at 300 mm/min based on operator’s experience or machining handbook.

STRAIGHT_FEED (10,10,10)

The tool moves along X direction to X=30mm

STRAIGHT_FEED is used to allow straight movement using at the rate of 300mm/min

G01 X30 Y30 Z10 F250

SET_FEED_RATE (250)

A new feed-rate of 250 mm/min is assigned based on operator’s experience or machining handbook.

G01 X30 Y40 Z10 The tool moves in Y direction to Y=30mm based on the feed-rate.

Feed-rate is set at 250 mm/min

STRAIGHT_FEED (30,10,10) STRAIGHT_FEED is used to allow straight movement using at the rate of 250mm/min

...

SET_FEED_RATE (300) Feed-rate is set to the maximum allowable value.

STRAIGHT_FEED(X, Y, Z)

The tool move to X,Y,Z with starting feed rate as set in SET_FEED_RATE which the maximum value. The sensor detects any unattended machining constraint and analyzed the signal. Furthermore, the algorithm refined the signal information to be referred to in order to achieve optimum feedrate considering allowable motor power. This algorithm is continuously adopted as long as the tool moves toward (X,Y,Z). Once it reaches (X,Y, Z), the algorithm will then execute the next line of CMC code. This algorithm is also applied to other code that contains FEED under machining functions functionality such as ARC_FEED and ELLIPSE_FEED.

...

Fig. 1 Comparison of feed rate allocation in NC programming and optiCMC

of the machining process requires timely responses, which Gcode cannot provide. This was partially solved by Tounsi et al. [6] by specifying the acceleration and deceleration of feed drive systems in a CNC machine. However, the feed rate is assigned line by line in a discrete manner resulting in a serrated change of tool movement. Likewise, in CMC, every desired feed rate is assigned using SET_FEED_RATE. The optimized feed rate value is obtained in advance before it is inserted to the new SET_FEED_RATE value. Yet, these discrete feed rates work under a static environment. In both situations, the operators can modify these values simultaneously during machining by using the M48 and ENABLE_FEED_OVERRIDE functions although this can only be done by a skillful and experienced operator. In optiCMC, the optimization algorithm is designed to allow an optimal feed rate to be computed for every single FEED under the functionality of machine function commands. It is developed based on the CMC with optimization enhancement functions using fuzzy adaptive control. The algorithm is based on the cutting power step error and

cutting power reference error. The optiCMC is developed with three objectives in mind: (a) Reduce machining time with a minimum requirement of operator's skill (b) Maintain a constant cutting load and the motor power within the limit (c) Enable a smooth and realistic feed rate change considering the exact dynamics of the machining process

3.2.2 optiCMC system algorithm This section discusses how the optiCMC algorithm works to interpret STRAIGHT_FEED and other related commands as a function of feed rate optimization by considering machine dynamic. optiCMC contains two main elements: (1) monitoring data and (2) a fuzzy control-based optimization algorithm. Figure 2 shows the flow of the feed rate optimization process, starting from extracting the part information from a

Int J Adv Manuf Technol

Fig. 2 Fuzzy logic-based feed rate optimisation algorithm

Int J Adv Manuf Technol

CAD model. Two feed-related commands are used, SET_ FEED_RATE and STRAIGHT_FEED. & &

SET_FEED_RATE (feed) sets the feed rate to be used. STRAIGHT_FEED (x, y, z, probe) describes a movement in a straight line at the existing feed rate (or using the existing z force) from the current point to the point given by x, y and z parameters. If the z force is enabled, the values of x and y must be the same as those of the current point. The probe parameter is optional. If the probe parameter is present, the feed motion will stop when the probe is tripped or when the endpoint is reached, whichever happens first.

The optimization procedure is briefly explained as follows, making use of the corresponding numbers in Fig. 2. The roughing process starts with a maximum depth of cut. Feed rate optimization then begins with an initial maximum allowable feed rate value obtained from previously calculated data. The value is assigned to SET_FEED_RATE command (1). The aim is to achieve a shorter machining time. During machining, the tool may require linear or circular interpolations. This is achieved using the STRAIGHT_FEED, ARC_FEED and ELLIPSE_FEED commands (2). The cutting force sensor detects excessive cutting forces based on which cutting power is calculated. Using motor power as the reference, the cutting power step error (ENc) and cutting power reference error (CN) are obtained (3). These two errors are expressed mathematically in the following. Both parameters are used as input for fuzzy control in order to achieve an optimum feed rate considering the allowable motor power. The FIS, which is discussed in the next section, consists of a basic fuzzifier of inputs, fuzzy inference engine, a fuzzy rule base, membership functions and defuzzifier (4). The control signal is the feed rate. The fuzzy rule is used to optimize feed rate that is assigned to the axis actuators. For roughing operations, feed rate optimization can be mathematically expressed as, h i fs1opt ¼ max fz fmax  ð8rt Ra Þ1=2 ; amax ; xðtÞ ð1Þ   opt ¼ min tm fs1opt ; amax ; dsi ts1

ð2Þ

where, xðtÞ ¼ ðNm ; n; ks ; Vc ; t Þ; Nm fs1opt opt ts1 amax dsi

main drive motor power (kilowatts) optimum feed rate (millimetres per minute) optimum machining time (min) maximum depth of cut (millimetres) Different types of face milling (i01, full-face milling; i02, unidirectional part face; i03, bilateral part face)

The following constraints are considered: (a) Depth of cut constraint: as ≤aallowable, where aallowable depends on machine tool capability

(b) Type of face milling: ds1, ds2 and ds3 (c) Selection of Vc based on cutting tool properties (e.g. HSS, carbides or ceramics and its constraint factor, if any) (d) Cutting force constraint: Fmt ≤ Fmtallowable (e) Machine's motor power: Nm ≤ Nmc (motor power has to be larger than the predicted motor power) (f) Feed mechanism constraint: fmz  fs1opt In the case of finishing operations, feed rate optimization can be expressed as, h i fs2opt ¼ min fz fmin  ð8rt Ra Þ1=2 ; amin

ð3Þ

where fs2opt —optimum feed rate (millimetres per minute). The following constraints are considered: (a) Depth of cut: amin ≤as (b) Arithmetic surface roughness is taken into account instead of feed rate: min Ra  Ra This algorithm is implemented for every tool movement along the X, Y or Z axis. This procedure applies to all machine functions that contain the FEED command such as ARC_ FEED and ELLIPSE_FEED. This results in tool movement with optimized feed rates varying in smooth transitions, which is not possible with a typical G-code-based optimization. For finishing operations, feed rate is optimized in order to achieve the required surface quality.

4 Development of the fuzzy inference system The aim of FIS is to estimate a maximum possible feed rate by considering the machine tool's power capabilities. Each machine tool has its own power rating. By considering the machine tool's nominal power, a maximum feed rate for roughing operations is calculated with cutting force as the main constraint. The cutting power is determined based on the mechanical efficiency and is kept below the main motor power. Depth of cut is selected based on the machining allowance. The main components of FIS are a fuzzifier, membership functions, fuzzy inference engine, control rule bank and defuzzifier (Fig. 3). The rules in the rule bank have been determined based on trials on the machine tool. They reflect the machine tool's structural and dynamic behaviour, spindle power, type of workpiece materials, etc. Discussions over how the rules are tuned are not outside the scope of this paper. The model uses two inputs, i.e. error of the cutting power (ENc) and a change of cutting power (CN) and one output change in feed rate (Δf). To obtain the system input, the reference cutting power (Ncref) is used as the value we wish the cutting power (Nc) to be driven to. Ncref is set to a value slightly below the maximum power (e.g. 60%), with consideration given to possible overshoot of cutting power above the reference cutting power. Should the

Int J Adv Manuf Technol Fig. 3 Fuzzy inference system structure Generated from Matlab

Built in Labwindows

reference cutting power be set too close to maximum power, an overshoot of cutting power above reference cutting power could also result in the possibly dangerous situation of overshooting maximum power. Cutting power (Nc) is calculated from a theoretical cutting force. To run the fuzzy system, fuzzy inference system structure file (*.fis file) is used. The file is constructed and generated from the Fuzzy Logic Toolbox within the MATLAB program. Mathematically, the inputs are expressed as: ENc ðiÞ ¼ Ncref  Ncn ðiÞ

ð4Þ

CNðiÞ ¼ Ncn ðiÞ  Ncn ði  1Þ

ð5Þ

where i is the index of time increment for the sampling period of cutting power. The real value inputs ENc(i) and CNc(i) are fuzzified by scaling them to values appropriate for the FIS. The fuzzified inputs of power error and power change are enc(i) and cn(i), respectively. The fuzzified inputs are scaled to be between −1 and 1 by multiplying ENc(i) and CNc(i) by respective input scaling factors: enc ðiÞ ¼ ENc ðiÞKs; ENc

ð6Þ

cnðiÞ ¼ CNðiÞKs; CN

ð7Þ

The input scaling factors are calculated using the reference cutting power (Ncref), maximum rated motor power (Ncmax) and minimum power (Ncmin): ( 1 if Ncn ðiÞ  Ncref KS;ENc ¼ Ncmax1Ncref ð8Þ if Ncn ðiÞ < Ncref Ncref Nc min

KS;CN ¼

1 Nc max  Nc min

for all input and output variables. This triangular membership function μA can be expressed as, 8 ð x  aÞ 0 > > < xa ð a  x  bÞ ð10Þ μA ðx; a; b; cÞ ¼ ba cx ð b  x  cÞ > > : cb 0 ð c  xÞ Input and output values are classified as belonging to at least one of these fuzzy sets to a certain degree. The degree to which an input or output value belongs to a fuzzy set is determined by a membership function. The membership functions are shown in Fig. 4. The horizontal axis is the value of the fuzzified input or output in the range of −1 and 1. In the case of cutting power error, the input universe should be partitioned according to the minimum and maximum values allowed in order to control the system. The values −1 and 1 are assigned to ‘cutting power error min’ and ‘cutting power error max’, respectively. The discretized universe for the two fuzzy inputs enc(i) and cn(i) and for the output Δf are divided into nine fuzzy sets as shown in Fig. 4. They are, & & & & & & &

NX—negative extra large (−1) NL—negative large (−0.75) NM—negative medium (−0.5) NS—negative small (−0.25) ZE—zero (0) PS—positive small (0.25) PM—positive medium (0.5)

ð9Þ

The two scaled inputs are then mapped into suitable linguistic values by using membership functions of fuzzy sets. In this study, a triangular membership function is used

Fig. 4 Input membership function

Int J Adv Manuf Technol

& &

PL—positive large (0.75) PX—positive extra large (1)

The vertical axis is the degree to which the value belongs to a fuzzy set. For both inputs (enc and cn), it is possible to have all nine situations that correspond to the membership functions in Fig. 4. Control rules bank is one of the most important components of FIS and plays a key role in representing operator's knowledge and experience. Fuzzy rules link the input variables of fuzzy models to output variables and determine system actions. The output variable of the system is a reliable feed rate. Rules are written similar to the intuitive thinking of humans as an IF (condition state)–THEN (desired output) statement, which expresses the action to be taken in response to various fuzzy inputs. Table 1 presents the fuzzy control rules bank employed for feed rate adjustment. For instance, if the power error was rated at 0.8, it would belong to the PL fuzzy set to the degree of 65% and PX fuzzy set to the degree of 35%. The fuzzy controller is created by devolving simple logic rules with inputs to govern an output. These rules can be stated literally. For example (Table 1), ‘IF enc is PL AND cn is PX, THEN Δf is NS’, which means if the cutting power error ENc lies in the range of positive large (PL) and the cutting power change CN is in the range of positive extra large (PX), then the recommended feed rate adjustment is negative small (NS) meaning reducing feed rate by a small value. Because fuzzy inputs can belong to multiple fuzzy sets to a certain degree, it is possible that multiple fuzzy logic rules are satisfied to a certain degree. This will in turn give multiple

Table 1 Fuzzy control rules for feed rate optimization

fuzzy set outputs of certain degrees. To determine the degree of a fuzzy set output from a fuzzy logic rule, the logical AND operator is applied on the fuzzy inputs. The result of the AND operator is the minimum of the two fuzzy inputs. input 1 AND input 2 ¼ minðinput 1; input 2Þ

ð11Þ

The fuzzy inference engine and defuzzifier are used to perform all the fuzzy operations and interpret the membership degrees of the fuzzy sets into a specific decision or real value. In other words, the output of all satisfied fuzzy logic rules must be determined and aggregated by the fuzzy inference engine. Finally, the aggregated output must be defuzzified by the defuzzifier to obtain a usable real value output. Two major types of fuzzy inference engine exist, namely, the Mamdani-style and the Sugeno-style fuzzy inference engine. To reduce computational time, the Sugenostyle fuzzy inference engine [25] as described in Fig. 5 is adopted. This is due to the fact that all consequent membership functions of the Sugeno style used are represented by singleton spikes. The defuzzification result is simply aggregation of a weighted average of the height of the triangular (Fig. 5). The obtained result is defuzzified by the weighted average method [26]. n P μi Ci Δu ¼ i¼1 ð12Þ n P μi i¼1

where n is the total number of rules, and Ci is the value associated with the peak of output fuzzy set i. μi is the height of the spike associated with rule i.

Int J Adv Manuf Technol

Fig. 5 Sugeno-style fuzzy inference engine

5 Machining setup The hardware and software setup of the system is schematically shown in Fig. 6. The system is implemented using LabWindows. Fuzzy inference system structure files are generated from a MATLAB program. The machine tool used is a Sherline 3axis mill. The cutting force along the tool path is acquired by a

piezoelectric Kistler 9273 dynamometer. Vibration is measured by a PCB 352C65 accelerometer, which is installed on the tower column close to the tool piece. Online data acquisition (PXI-NIDAQ) from these two transducers is carried out during the machining process, i.e. cutting force and vibration with a sampling frequency of 10,000 Hz. The captured cutting force signal is used for online signal reference. Cutting power error

Spindle Motor

PCB 352C65 accelerometer

vibration

spindle speed

3/8 inch HSS spindle

NI SCC-ACC01

voltage

Sherline-Wettroth tachometer

voltage NI SCC-68 terminal block

Work-piece 3-axis CNC actuators

voltage

3-axis encoder

digital

Kistler 5007 charge amplifier

voltage

NI PXI-6221 DAQ card

Aluminium plate-table for work-piece

Kistler 9273 dynamometer

force

Fuzzy Control

Fig. 6 Experiment setup and data flow

Machine Tool Controller using LabWindows

Int J Adv Manuf Technol

machining operations with a quicker control response. The threads with which the system runs use loop-cycle frequencies of approximately 10 Hz. This loop-cycle frequency can be defined as the time taken to acquire a number of sensor input samples per loop cycle. In this study, each loop cycle contains 1,000 samples, with the sampling rate set at 10,000 samples per second for every channel. Thus, it can be calculated that the input sample reading time for each loop cycle is 0.1 s, which corresponds to the 10-Hz loop-cycle frequency.

6 Case study Fig. 7 Workpiece specimen for milling (all dimensions in millimetres)

(ENc) and cutting power change (CN) are calculated and used as input for the fuzzifier. The vibration signal is captured to be used for future offline analysis. A 1,000-point fast Fourier transform is carried out for each window. The points' corresponding Nyquist bandwidth (0–5,000 Hz) is stored in a column in a frequency matrix of the same column index. The system has a non-constant loop-cycle time. This is due to the programming design that tries to accommodate faster

The machining process was conducted on a 200×100×5-mm workpiece with cuts along the parallel straight slots (3/8 in. wide). Two-flute 3/8-in. HSS end-mill cutters were used to cut aluminium workpieces in full immersion (Fig. 7). The workpieces were machined by using a spindle speed of 2,800 rpm. The machining tests were repeated for two scenarios, (1) G-code/CMC program and (2) optiCMC program. Table 2 shows examples of G-code, CMC and optiCMC program codes used to machine the workpieces. G-code and CMC use offline feed rate optimization whereas optiCMC uses

Table 2 Examples of G-code, CMC and optiCMC program to machine a slot

G-code N01 M216 N02 G20 G90 G54 G40 N03 G50 S2800 N04 M01 N05 T0300 N06 G96 S854 N07 M42 M03 N08 M08 N09 G41 G00 X60.0 Z55.0 T0303 N10 G01 X30.0 F120 N11 X40.0 F100 N12 X50.0 F80 N13 G00 Z-55.0 N14 G91 G28 X0 N15 G91 G28 Z0 N16 G90 M215 N17 M30

A set of feed-rate code to cut the slot with 3 different depth of cut

CMC 1 USE_LENGTH_UNITS (CANON_UNITS_MM) 2 SET_ORIGIN_OFFSETS(0.0000, 0.0000, 0.0000) 3 SET_FEED_REFERENCE(CANON_XYZ) 4 SPINDLE_RETRACT() 5 FLOOD_OFF() 6 SPINDLE_RETRACT() 7 USE_TOOL_LENGTH_OFFSET(0.0000) 8 CHANGE_TOOL(SPIRAL_DRILL_9.9MM) 9 USE_TOOL_LENGTH_OFFSET(70.0000) 10 FLOOD_ON() 11 SET_SPINDLE_SPEED(900.0000) 12 START_SPINDLE_CLOCKWISE() 13 STRAIGHT_TRAVERSE(20.0000, 60.0000, 55.0000) 14 SET_SPINDLE_SPEED(2800.0000) 15 SET_FEED_RATE(120.0000) 16 STRAIGHT_FEED(30.0000, 60.0000, 55.0000) 17 SET_FEED_RATE(100.0000) 18 SET_SPINDLE_SPEED(2800.0000) 19 STRAIGHT_FEED(40.0000, 60.0000, 55.0000) 20 SET_SPINDLE_SPEED(2800.0000) 21 SET_FEED_RATE(80.0000) 22 STRAIGHT_FEED(50.0000, 60.0000, 55.0000) 25 STOP_SPINDLE_TURNING() 26 FLOOD_OFF() 27 SPINDLE_RETRACT() 28 PROGRAM_END()

optiCMC 1 USE_LENGTH_UNITS (CANON_UNITS_MM) 2 SET_ORIGIN_OFFSETS(0.0000, 0.0000, 0.0000) 3 SET_FEED_REFERENCE(CANON_XYZ) 4 SPINDLE_RETRACT() 5 FLOOD_OFF() 6 SPINDLE_RETRACT() 7 USE_TOOL_LENGTH_OFFSET(0.0000) 8 CHANGE_TOOL(SPIRAL_DRILL_9.9MM) 9 USE_TOOL_LENGTH_OFFSET(70.0000) 10 FLOOD_ON() 11 SET_SPINDLE_SPEED(900.0000) 12 START_SPINDLE_CLOCKWISE() 13 STRAIGHT_TRAVERSE(20.0000, 60.0000, 55.0000) 14 SET_SPINDLE_SPEED(2800.0000) 15 SET_FEED_RATE(200.0000) 16 STRAIGHT_FEED(50.0000, 60.0000, 55.0000) 17 PROGRAM_END()

Feed-rate values are generated by FIS based on input dynamometer sensor

Int J Adv Manuf Technol

online feed rate optimization. The behaviour of the feed rate obtained using optiCMC approach can be seen in Table 3. The experiment results demonstrated the adaptability of feed rate changes with respect to the changes in depth of cut, machine capability and limitation. The reference (allowable) cutting power was set at 60% of the motor power for safety reasons. The starting feed rate for optiCMC was set at a maximum allowable feed rate value obtained from a machining data repository. Table 3 summarizes the feed rate response data obtained from the fuzzy control with respect to the input fuzzifier, i.e. cutting power error and cutting power reference error. Clearly visible is the gradual change of feed rates for every single increment of time. The dynamic behaviour of these feed rates can be further differentiated to obtain acceleration/deceleration and jerk. During machining, excitations of vibrations in machine elements can be resulted from an occurrence of excessive jerk, which can lead to accelerated tool wear, increasing machining noise and large contouring errors [3]. Thus, jerk values can act as a basis or validation for performing smooth machining operation.

Table 3 Adaptive feed rates with a spindle speed of 2,800 rpm in optiCMC

Figure 8 indicates the effectiveness of the optiCMC algorithm in optimizing feed rate with respect to machine power capability. The figure is explained as follows. &

&

&

Nref—The reference cutting power (0.007 kW), is set to be a portion below the maximum allowable cutting power (0.0116 kW). The reference cutting power at which the system will operate is around 60% of the maximum cutting power. Nc1—In optiCMC, the intent of the controller is to maintain the cutting power at the reference cutting power (Nref) by adjusting the feed rate. During the transitioning to a deeper cutting depth, an associated increase in cutting power occurs. The feed rate is reduced by the controller in response to this increase in cutting power. The fall in feed rate due to the cutting power above reference cutting power is observed at time 48 to 58 s. Nc2—In a G-code- or CMC-based model where feed rates are predetermined, cutting power consumption (Nc2) is not controllable during machining. It is up to an experienced operator to set the feed rate beforehand for desired cutting results. If cutting power is notably

Time (s)

Power error (kW)

Power change (kW)

Feed rate (mm/min)

Acceleration (mm/s2)

Jerk (mm/s3)

. . 25.033 25.135

. . −0.00201039 −0.00197528

. . −0.00044906 −0.0000351

. . 84.8336 83.631

. . −0.17150201 −0.19649921

. . −0.05639375 −0.02499719

25.237 25.339 25.441

−0.00136385 −0.00135496 −0.00135762

−0.00061144 −0.00000888 0.00000265

82.6648 81.8392 81.2398

−0.17131185 −0.13624721 −0.09081001

0.02518735 0.03506465 0.0454372

25.543 25.644 25.746 25.848 25.95

−0.00125465 −0.00123317 −0.00119853 −0.00100858 −0.00055763

−0.00010296 −0.00002149 −0.00003464 −0.00018995 −0.00045096

80.3509 79.5203 78.8659 78.1548 77.7626

−0.15931039 −0.12583889 −0.12393575 −0.11620875 −0.06952996

−0.06850038 0.0334715 0.00190315 0.007727 0.04667879

26.052 26.153 26.255 26.327 26.459 26.523 26.654 26.726 26.865 26.967 27.069 . .

−0.0006758 −0.00069564 −0.00055501 −0.00041115 −0.0005192 −0.00067937 −0.00058871 −0.00050908 −0.00052929 −0.00051715 −0.00047651 . .

0.00011817 0.00001984 −0.00014063 −0.00014386 0.00010805 0.00016017 −0.00009066 −0.00007962 0.0000202 −0.00001213 −0.00004064 . .

77.2888 76.8904 76.5801 76.2944 75.9347 75.5518 75.1467 74.7983 74.4386 74.1431 73.8604 . .

−0.07244738 −0.06204864 −0.05332817 −0.04668033 −0.05936151 −0.07687325 −0.04928353 −0.06113245 −0.05499735 −0.05183391 −0.07362547 . .

−0.00291742 0.01039873 0.00872047 0.00664784 −0.01268118 −0.01751173 0.02758972 −0.01184892 0.0061351 0.00316344 −0.02179156 . .

Int J Adv Manuf Technol

2800 rpm F2 (optiCMC) F1 (G-code/CMC)

Nc2

Nc1

Nref End of Cutting (optiCMC)

End of Cutting (CMC)

CN

Δtc

ENC

Fig. 8 Feed rate response according to cutting power consumption using various depths of cut

&

&

below or above the reference cutting power during time 0 to 20 s and 90 to 110 s, respectively, there is no effort to correct this cutting power error. F1—In G-code/CMC, the feed rate changes according to the value set in the code. As can be seen in the figure, the feed rate decreases in a serrated manner, and it remains constant for a long period of time before changes occur. F2—In optiCMC, the actual feed rate starts with a predetermined value of 120 mm/min, which when adapting to the machine condition is changed by responding to the allowable cutting power. The feed rate continues to change in regions smooth and non-linearity in accordance to the nature of the fuzzy controller with respect to the

Fig. 9 3D STFT view and 2D STFT contour view of chatter behaviour

& &

dynamics of the machining process. This way, the cutting power is driven close to Nref. ENc—Change of cutting power error for optiCMC. CN—change of cutting power reference error for optiCMC.

The results of the optimization (Fig. 8) lead to a great reduction in machining time (Δtc), e.g. of about 29% for a spindle speed of 2,800 rpm. The case study also revealed the vibration signal behaviour at chatter frequency as presented around 185.5, 310 and 670 Hz (Fig. 9). The frequencies start occurring at 4 s. However, there are no significant power spectrum values

Int J Adv Manuf Technol

at chatter frequencies which can be considered as machining disturbance. This might be due to the responding of the fuzzy control system toward the cutting power error input. It is also possible that the given cutting parameters do not impact to chatter occurrence.

7 Conclusions Machining parameters such as speed, feed rate and depth of cut play an important role in machining optimization. The conventional approaches to NC programming involve selecting a series of constant parameters for a machining job based on the job shop-floor experiences without considering the machine tool's dynamics. As a result, the machining process can hardly be optimized. In this paper, an adaptive execution of an NC program with feed rate optimization is proposed to overcome this problem. Canonical machine commands are executed with a fuzzy feed rate optimization module. The key feature of the proposed NC program executor is the ability to perform adaptive feed rate optimization by keeping a constant load within the machine tool's capability. A 29%

reduction in machining time has been observed from the case study conducted. Furthermore, the optimization algorithm can also help reduce the chatter amplitude. Hence, occurrence of excessive chatter can be avoided. This leads to a much healthier machining operation environment. The experimental results approved the effectiveness of the proposed feed rate optimization module. Further development of optiCMC performance is envisaged to (a) examine the machining at a critical machining parameters and set the reference power close to the actual motor power in order to reach the onset of chatter, (b) consider the jerk values in the optimization algorithm in order to attain a smoother machining operation, (c) characterize the behaviour at the end of a linear or circular motion, so that a feasible trajectory can be planned to achieve the desired feed rate and to stop at a precise position and (d) investigate the correlation between jerk control and the dynamic energy of cutting power. Acknowledgements This research is supported by the Directorate General of Higher Education (DGHE), Department of National Education of Indonesia, under scholarship contract no. 1840D4.4-2008.

Appendix Table 4 Some typical canonical machining commands Functionality

Functions

ISO 6983/RS274

CMC

Representation

Plane selection

G17, G18, G19

SELECT_PLANE

Offset input Units

G10 G20, G21

SET_ORIGIN_OFFSETS USE_LENGTH_UNITS

Pallet clamp on and off Comment Feed and speed override not allowed

M10, M11 – M49

Feed and speed override allowed

M48

Coolant off Coolant on

M09 M08

CLAMP_AXIS COMMENT DISABLE_FEED_OVERRIDE DISABLE_SPEED_OVERRIDE ENABLE_FEED_OVERRIDE ENABLE_SPEED_OVERRIDE FLOOD_OFF FLOOD_ON

Message Rapid traverse rate Rapid linear interpolation Set feed rate Set feed reference Set motion control Start speed/feed synch Stop speed/feed synch Circular interpolation Dwell Ellipse feed

– G00F() G00 F() – – – – G02, G03 G04 –

MESSAGE SET_TRAVERSE_RATE STRAIGHT_TRAVERSE SET_FEED_RATE (300) SET_FEED_REFERENCE SET_MOTION_CONTROL_MODE START_SPEED_FEED_SYNCH STOP_SPEED_FEED_SYNCH ARC_FEED DWELL ELLIPSE_FEED

Miscellaneous functions

Free space motion Machining attributes

Machining functions

Int J Adv Manuf Technol Table 4 (continued) Functionality

Spindle functions

Tool functions

Functions

ISO 6983/RS274

CMC

Stop

G30

STOP

Linear interpolation Straight probe

G01 –

STRAIGHT_FEED (X,Y,Z) STRAIGHT_PROBE

Spindle orientation

M19

ORIENT_SPINDLE

Set spindle speed Return to reference point

S() G28, G30

SET_SPINDLE_SPEED SPINDLE_RETRACT

Spindle retract traverse



SPINDLE_RETRACT_TRAVERSE

Spindle on (clockwise rotation) Spindle on (counter-clockwise rotation)

M03 M04

START_SPINDLE_CLOCKWISE START_SPINDLE_COUNTERCLOCKWISE

Spindle stop

M05

STOP_SPINDLE_TURNING

No spindle force Spindle force

– –

USE_NO_SPINDLE_FORCE USE_SPINDLE_FORCE

Automatic tool change (ATC)

M06

CHANGE_TOOL

Select tool Tool height offset compensation

– G42, G43, H ()

SELECT_TOOL USE_TOOL_LENGTH_OFFSET

References 1. Liu Y, Guo X, Li W, Yamazaki K, Kashihara K, Fujishima M (2007) An intelligent NC program processor for CNC system of machine tool. Robot Comput Integr Manuf 23:160–169 2. Fred Proctor JM, Kramer T (1992) A methodology for integrating sensor feedback in machine tool controllers. Robot Systems Division, National Institute of Standards and Technology, Technology Administration, US Department of Commerce, Gaithersburg, 208991 3. Dong J, Ferreira PM, Stori JA (2007) Feed-rate optimization with jerk constraints for generating minimum-time trajectories. Int J Mach Tools Manuf 47:1941–1955 4. Abu Qudeiri J, Yamamoto H, Ramli R (2007) Optimization of operation sequence in CNC machine tools using genetic algorithm. J Adv Mech Des Syst Manuf 1:272–282 5. Selim M, Akturk SA (1996) Tool allocation and machining conditions optimization for CNC machines. Eur J Oper Res 94:335–348 6. Tounsi N, Bailey T, Elbestawi MA (2003) Identification of acceleration deceleration profile of feed drive systems in CNC machines. Int J Mach Tools Manuf 43:441–451 7. Wang S-M, Chiou C-H, Cheng Y-M (2004) An improved dynamic cutting force model for end-milling process. J Mater Process Technol 148:317–327 8. Rao VS, Rao PVM (2006) Effect of workpiece curvature on cutting forces and surface error in peripheral milling. Proc IMechE B J Eng Manuf 1399(220):1399–1407 9. Kim S-J, Lee HU, Cho D-W (2007) Prediction of chatter in NC machining based on a dynamic cutting force model for ball end milling. Int J Mach Tools Manuf 47:1827–1838 10. Rao BC, Shin YC (1999) A comprehensive dynamic cutting force model for chatter prediction in turning. Int J Mach Tools Manuf 39:1631–1654 11. Wang WP (1988) Solid modeling for optimizing metal removal of three-dimensional NC end milling. J Manuf Syst 7:57–65 12. Troitsky DI, Novikova MV, Bannatyne MW (2002) NC milling program optimization with 3D geometric modeling. International Conference Graphicon. 13. Ko JH, Yun WS, Cho D-W (2003) Off-line feed rate scheduling using virtual CNC based on an evaluation of cutting performance. Comput Aided Des 35:383–393

14. Qian L, Yang B, Lei S (2008) Comparing and combining off-line feed rate rescheduling strategies in free-form surface machining with feed rate acceleration and deceleration. Robot Comput Integr Manuf 24:796–803 15. Lee H, Cho DW (2003) An intelligent feed rate scheduling based on virtual machining. Int J Adv Manuf Technol 22:873–882 16. Richards ND, Fussell BK, Jerard RB (2002) Efficient NC machining using off-line optimized feed rates and on-line adaptive control. ASME Conf Proc 2002:181–191 17. Saturlay PV, Spence AD (2000) Integration of milling process simulation with on-line monitoring and control. Int J Adv Manuf Technol 16:92–99 18. Kim MK, Cho MW, Kim K (1994) Application of the fuzzy control strategy to adaptive force control of non-minimum phase end milling operations. Int J Mach Tools Manuf 34:677–696 19. Lian RJ, Lin BF, Huang JH (2005) Self-organizing fuzzy control of constant cutting force in turning. Int J Adv Manuf Technol 29:436– 445 20. Shiuh-Jer H, Chiou-Yuarn S (1999) Fuzzy logic for constant force control of end milling. Ind Electron IEEE Trans 46:169–176 21. Liang M, Yeap T, Hermansyah A, Rahmati S (2003) Fuzzy control of spindle torque for industrial CNC machining. Int J Mach Tools Manuf 43:1497–1508 22. Xiaoli L, Han-Xiong L, Xin-Ping G, Du R (2004) Fuzzy estimation of feed-cutting force from current measurement-a case study on intelligent tool wear condition monitoring. Syst Man Cybern C Appl Rev IEEE Trans 34:506–512 23. Liang SY, Hecker RL, Landers RG (2004) Machining process monitoring and control: the state-of-the-art. J Manuf Sci Eng 126:297–310 24. Proctor FMKTR, John LM (1997) Canonical machining commands. Intelligent Systems Division, National Institute of Standards and Technology Administration, US Department of Commerce, Gaithersburg, 20899 25. Jassbi JSP, Ribeiro RA, Donati A (2006) Comparison of Mamdani and Sugeno fuzzy inference systems for a space fault detection application. Proceeding of the 2006 World Automation Congress (WAG 2006). 26. Driankov DHH, Reinfrank M (1996) An introduction to fuzzy control. Springer, Berlin

Suggest Documents