University of Huddersfield Repository Model­based Expert System to Automatically Adapt Milling Forces in Pareto Optimal Multi­ Objective Working Points Original Citation Model-based Expert System to Automatically Adapt Milling Forces in Pareto Optimal Multi-objective Working Points

Users may access full items free of charge; copies of full text items generally can be reproduced, displayed or performed and given to third parties in any format or medium for personal research or study, educational or not­for­profit purposes without prior permission or charge, provided: • The authors, title and full bibliographic details is credited in any copy; • A hyperlink and/or URL is included for the original metadata page; and • The content is not changed in any way. Abstract – The objective of this paper is to present an open and modular expert rule-based system in order to automatically select cutting parameters in milling operations. The knowledge base of the system presents considerations of stability, machine drives efficiency and restrictions while adaptively controlling milling forces in suitable working points. Moreover, a novel classical cost function has been conceived and constructed to Pareto-optimise cutting parameters subjected to multi-objective purposes, namely: tool-life, surface roughness, material remove rate and stability rate parameter. Different Pareto optimal front solutions can be obtained modulating the weighting factors of the cost function. Additional rules have been added in order to manually and/or automatically modulate this cost function. Furthermore, a database which relates weighting factors, cutting conditions and cost function variables is produced for learning purposes. Chatter detection and suppression system automatically feedback to the system to take into account non-modelled disturbances. Finally, since the knowledge of the system is basically obtained from mathematical models, the possibility of combining experience and knowledge from expert engineers and operators is included. In this way, best practice from mathematical modelling and expert engineers and operators is joined in one system obtaining a full, automated system combining the best of each world. As a result, the expert rule-based system selects Pareto optimal cutting conditions for a broad range of milling processes, sorting out automatically different problems such as chatter vibrations, incorporating model reference adaptive control (MRAC) of forces. This procedure is intuitive, being executed in the same way as a human expert would do and it provides the possibility to interact with expert engineers and operators in order to take into account their experience and knowledge. Finally, the expert system is designed in modular form allowing incorporating new functionalities in rule based forms to them or just adding new modules to improve the performance of the milling system.


Introduction
Despite various attempts at optimization, the selection of cutting parameters for CNC milling operations is still largely driven by machine operators on the shop-floor. They use their experience and/or handbooks in order to program adequate cutting parameters (Balakrishana & DeVries, 1982;Liang, Hecker, & Landers, 2004). Normally, those parameters are selected in an intuitive way and/or using machining handbooks leading to programming cutting parameters under safety upper limits in order to prevent vibrations and process malfunctions. In this sense, automation techniques are being introduced in manufacturing environments to computerize and achieve more accurate solutions due to increase competitive markets. As a first solution adaptive controllers substituted fixed gain controllers in order to behave better under sensible changes in the depth of cut (Koren, 1989). One step ahead is the adaptive optimization of the cutting parameters using intelligent techniques. Those techniques present multi-function optimization through, for example, neural networks, genetic algorithms and other bio-inspired techniques (Avellan, Romeros, Siller, Estrud, & Vila, 2008;Cus & Balic, 2003;Surech et al., in press;Wong & Hamouda 2003b;Zuperl & Cus 2003;Zuperl, Cus, & Milfelner 2005). Nevertheless, those methodologies provide intrinsic mathematical non-linear functions, which learn in hidden ''black boxes'' from a series of examples, given useful solutions but reducing the transparency of the interfaces.
Furthermore, expert systems have also been developed to cope with this problem. In manufacturing processes, expert systems propose two steps. First, a knowledge base about the system is addressed, and then, some pseudo-heuristic rules are used, extracted from knowledge or experience in order to infer a solution, often using Fuzzy Logic (FL) or reasoning. Some versatile approaches in the literature are, for example; Wong and Hamouda (2003a), where an online knowledge based fuzzy expert system for machinability data selection using Fuzzy Logic as reasoning mechanism in capturing the knowledge of machining operators is developed. Also in Vidal, Alberti, Ciurana, and Casadesús (2005) computer aided process planning is used for choosing the manufacturing route in metal removal processes and their cutting parameters. On the other hand, Zhang and Lu (1992) discussed an expert system for economic evaluation of machining planning operation through integration of the manufacturing and management systems, trying to plan technical issues tied to the economical ones such as amortization of the machine, taking into account labour, materials and working capacity. In Morgan, Cheng, Altintas, and Ridgway (2007), the milling system is fully diagnosed using FL, providing sources of machining problems and corrective actions. Finally, in Iqbal, He, Li, and Dar (2007), tool life is enhanced and work-piece surface finish improved using experimental data and if-then rules through analysis of variance techniques and numeric optimization. Moreover, some theoretical and experimental work has been carried out in order to get optimal machining parameters subject to dimensional precision and surface quality, tool life expectancy and production times (Chien & Chou, 2001;Vivanco, Luis, Costa, & Ortiz 2004 and references therein); in different machining processes and using different materials. The term expert system was originally used to denote systems using a significant amount of expert information about a particular domain in order to solve problems within that domain. Due to the important role of knowledge in such systems; they have also been called knowledge-based systems. However, since the terminology has been applied to so many diverse systems, it has essentially evolved into two different uses of the term. First, the term is often used to describe any system constructed with special kinds of ''expert-systems'' programming languages and tools, including production systems, rule-based systems, frame-based systems, ''blackboard'' architectures, and programming languages such as LISP or Prolog. Nevertheless, another important feature is that, since expert systems are usually non-deterministic, a large number of modules may be candidates for activation at any given moment. Thus, a criterion is needed to determine how to select which of the applicable modules must be executed next, and what to do after selection. This second type is the more appropriate job of an expert system in the sense that it is a system that ''reasons'' about the problem in much the same way as humans do.
Despite the fashion of using bio-inspired optimization methods, this work proposes classical optimization methods which allow assembling self-learning and self-adaptive algorithms in a modular way to search for different Pareto optimal solutions. For this purpose, it is used the calculus of optimal working points associated with methods to calculate the stability of the dealt system. Then, the proposed expert rule-based system deals with stability issues and more in-depth analysis can be added. Furthermore, this paper makes an attempt to manage the milling system through reasoning of the possible states in spite of using blackboard architectures.
In this paper, the milling system is described from the point of view of an expert system, but not in the traditional sense where knowledge is extracted from expert engineers' and/or operators' experience. Instead, the dynamic behaviour of the system obtained from theoretical models is used to develop the expert system. Those models of the cutting process consist of the relative compliance between the tool and the work-piece, given by the modal parameters of the used tool. The advantage of this methodology is that the use of mathematical models gives universal solutions in contrast to linguistic solutions which give particular solutions. Moreover, the proposed expert system can be supplemented by semantic-based solutions added in parallel to the modelled expert system, giving the potential to act with the best qualities of each. While this dual method is attractive, care has to be taken of the increase in complexity and cost to develop models of the system and parameterize their constants. This is mitigated in the case of milling since it is a well-known study in literature (Balanchandran, 2001;Budak & Altintas, 1998) and it is possible to take advantage of this extensive literature.
The paper is scheduled as follows. A brief introduction of the dynamic delay differential equation which governs milling systems is initially given. The transfer function which relates forces and programmed feed rates is then explained. This is followed by the development of seven modules which are composed by rules. The first module gives advice about robustness of the system and allowable input cutting parameters; the second one introduces model reference adaptive control of milling forces; the third covers constraints of the spindle and feed drives capabilities; the fourth suggest initial cutting parameters; the fifth model is composed of a novel cost function which measures the performance of the system giving Pareto optimal cutting parameters depending on the milling process to carry out and, the possibility to program different cutting parameters corresponding to different Pareto optimal fronts automatically through the modification of the weighting factors of the cost function; module 6 gives automatic feedback to the system due to non-modelled facts; finally module 7 provides the possibility to interact with expert engineers or operators to input to the system their experience and knowledge. Results clarify the developed work and conclusions and discussion will end the paper.

System description
Milling processes are well characterized as mechanical systems which are particularly sensibility to acquiring vibrations. In this section, the milling process is modelled as a second order differential equation, which is excited by forces whose inherent terms excite the modal parameters of the system. This fact results in the conversion of resultant energy into vibrations of the system. Those vibrations are generated under certain cutting conditions depending on the process being carried out, clamping of the workpiece, tool and workpiece materials, etc. (Budak and Altintas,1998;Landers & Ulsoy, 1993).
In this frame of mind, the standard milling system responds to a second order differential equation excited by the cutting forces, F(t) (Budak and Altintas,1998;Landers & Ulsoy, 1993), where r(t) = {x(t), y(t)} T are the relative displacements between the tool and the workpiece in the X-Y plane, F(t) = {F x (t), F y (t)} T , and M, B and C are the modal mass, damping and stiffness matrices, all of them represented in two dimensions. The milling cutting force is represented by a tangential force proportional with the instantaneous chip thickness, and a radial force which is expressed in terms of the tangential force (Balanchandran, 2001;Budak & Altintas, 1998) where K t and K r , the tangential and radial specific cutting constants which are dependent on the tool material for any geometry, a dc , the axial depth of cut and, t c (t), the chip thickness, obtaining the cutting forces in Cartesian coordinates (Balanchandran, 2001). The most critical variable in the equation of motion, the chip thickness, t c (t), consists of a static part and a dynamic one. The static's is proportional to the feed rate and it is attributed to the rigid body motion of the cutter. The dynamic one models two subsequent passes of the tool through the same part of the work-piece. The phase shift between two consecutive passes of one tooth on the working-piece can be seen in Fig. 1. It is widely modelled as (Balanchandran, 2001;Budak & Altintas, 1998), where f r is the feed rate, £ j the immersion angle and s is a delayed term defined as s ¼ 60 NsSs , N t is the number of teeth and S s the spindle speed in rpm.
On the other hand, the transfer function of the system, in chatter and resonant free zones, can be separated as a series decomposition of the transfer function which relates the resultant force and the actual feed delivered by the drive motor, which models the deflection of the tool, and the transfer function which represents the Computerized Numerical Control (CNC). Then, a continuous transfer function which relates both signals, measured resultant force and the actual feed delivered by the drive motor can be showed as a first order dynamic (Altintas, 2000), where K c (N/mm 2 ) is the resultant cutting pressure constant, a dc (mm) is the axial depth of cut, rð£ st ; £ ex ; N t Þ is a non-dimensional immersion function, which is dependent on the immersion angle and the number of teeth in cut, N t is the number of teeth in the milling cutter, S s (rev/s) the spindle speed and s c = 1/N t S s . At the same time, the relationship between the machine tool control, the CNC and, the motor drive system can be approximated as a first order system within the range of working frequencies (Altintas, 2000). This transfer function relates the actual, f a , and the command, f c , feed velocities, where s s represents an average time constant.
The combined transfer function of the system is given by Altintas (2000),

Knowledge base identification
Milling processes basically consist of three possible phases: roughing, medium and finishing the surface (Juneja, Sekhon, & Seth 2003). The selection of optimal cutting parameters, for each phase, plays an important role in manufacturing. In roughing phases, large amounts of material are removed with the emphasis on speed, but the tendency of the system to propagate and amplify vibrations limits the process. In medium phases, a trade-off between removal rate and form generation of the workpiece is balanced. Finally, finishing cuts demand more accurate control programs, adequate cutting conditions and selection of the milling process to achieve accurate products.
Further to the above constraints of the system, the life of the tool can represent an important performance index to take into account when selecting cutting conditions. One reason is that an increase in the cost of tooling will decrease the benefits of rapid production. Another reason is that wear changes the geometry of the tool, which can either lead to degradation in cutting accuracy and speed or more frequent tool changes which increases production time (Kalpakjian & Schmidt, 2000).
Of significant and increasing importance for many components is the surface finish. Roughness is one measure of the texture of the surface and is another indicator of quality of the final product (Baek, Ko, & Kim, 1997) that is affected by both tool wear and vibrations. The main source of vibrations in milling arises from the regenerative effect (Altintas, 2000;Balanchandran, 2001) known as chatter vibrations which are typically modelled by the Eqs. (1)-(3). They can be solved in the time domain and frequency domain. Frequency domain outputs the well-known stability charts, which gives stability frontiers in the cutting space parameter (Altintas, 2000;Balanchandran, 2001). Other sources of vibrations are couple-mode (Tlusty & Koenigsberger, 1970) and forced vibrations (Sutherland & Andrew, 1968).
Furthermore, controlling the forces is required in mechanical systems in order to govern the system under variation in system parameters. Keeping the forces under a prescribed safe upper limit prevents the system from having deflections on the tool and avoids tool damage and breakage (Altintas, 1992). Conversely, the bigger the permitted force is, the more material can be removed in a single pass. From this we can see that there is a trade-off between deflection of the tool and material remove rate when programming the reference forces (Altintas, 2000;Rubio, De la Sen, & Bilbao-Guillerma, 2007a,b;Zuperl et al., 2005).
Finally, since milling processes can be defined as the relative movement between feeding a workpiece while rotating a multitooth tool, the feed and spindle servo-drives restrictions are considered in order to give more robustness and efficiency to the system. Then, the knowledge base presented in this section is transcribed as a series of rules which operates in an open and modular way. In this way, the expert system can be applied in modules adapting it to every machine and conditions.

Module I: stability robustness and allowable input space parameter
In this section, some robustness considerations are discussed, after which, the allowable input space parameter is declared. For this purpose, the following algorithmic methodologies are taken into consideration and programmed in the expert system: Rule 1: Stability robustness.
This rule deals with the regions (axial depth of cut and spindle speed pairs) where there exist uncertainty in the stability due to the model of chatter vibrations. The stability lobes are calculated from a linear approximation (Altintas, 2000;Budak & Altintas, 1998), so that the nominal stability frontier and its neighbourhood are inaccurate as stable regions of the real nonlinear problem. For this reason and in order to calculate secure stability lobes, an accurate stability margin is prescribed. The Laplace transform imaginary axis is translated a d value to the left part, allowing minimization of the approximations when stability charts are calculated in the frequency domain using Eqs. (1)-(3); it is supposed that the chatter vibrations happen at By examining the influence of d in the stability lobes ( Fig. 2), it is concluded that large d values are necessary in order to get appreciable stability margins in lobes.

Rule 1.2: Influence of the axial depth of cut in robustness
The expression of the value of the axial depth of cut which limits stable and unstable zones is multiplied by a factor, a, 0 < a < 1, aimed at improving the robustness of the system when lobes charts are calculated using Eqs. (1)-(3). Then, a refinement on this parameter, a 0 dc;lim ¼ a Á a dc;lim , allows better control capacity in the spindle speed, but limits the amount of material to be removed.
From Figs. 2 and 3, it can be concluded that a has more influence in stability charts than d, in absolute terms.

Rule 2: Allowable cutting space parameter
Better knowledge about feasible cutting input space parameters allows programming more successful cutting conditions. This rule gives the steps followed in this paper to calculate the allowable cutting space parameter. Rule 2 has been split into two rules:

Rule 2.1: Border line data extraction
This first sub-rule calculates the value of the pair, axial depth of cut and spindle speed, which compose the border line between stable and unstable zones, Eqs. (1)-(3), satisfying rule 1. The purpose of this rule is to identify the border line between stable and unstable cutting parameters.

Rule 2.2: Broad input cutting parameter space
Since it is a requirement to work in a stable and robust region where the system will not be influenced by chatter vibrations, the set of input parameters is given by the pairs axial depth of cut and spindle speed which are in the stable region of the lobes satisfying rule 1. Then, the pairs which are below the border line according to rule 1 are calculated.

Module II: model reference adaptive control of milling forces
A model reference adaptive control scheme is proposed to control the forces of the system and considerations of the sampling time are added.  The control of forces in milling machines occupies an extensive amount of literature (Altintas, 2000;Lauderbaugh & Ulsoy, 1998a;Lauderbaugh & Ulsoy, 1998b;Peng, 2004;Rubio et al., 2007a,b). The reasons for this are that keeping forces below prescribed safety upper bounds avoids spindle, tool and/or work-piece deflections which deteriorate resultant geometric accuracy and, can cause the breakage of the tool or damage machine components (Altintas, 1992;Campomanes & Altintas, 2003). Then, the upper limit of the total cutting force, F p , that results from machining operation must not exceed the allowed cutting force, F p , that the tool can resist.
In this paper, an adaptive control is proposed to program the feed rate according to the transfer function of Eq. (6). The use of adaptive controllers is due to the variation of cutting and intrinsic parameters and, possible external perturbations in the system during machining.
Since the transfer function of the system is continuous and machine process is controlled at each spindle speed period, the zero order hold (ZOH) equivalent of G c (s) is considered, using a recursive least square estimator to update the estimation parameter vector (Rubio, De la Sen M., & A., 2007b;Rubio et al., 2007a).

Rule 4: Sampling time selection and computer resources maximization
The selection of the sampling time is typically selected as T s = 60/S s , S s in rpm. Since this rule is intended to give a compromise between reconstructing clear digital output signals and optimizing computer resources during steady state operation, the following algorithmic methodology is proposed: If a dc , S s and f c remain constant T s ¼ n Á 60=S s where n e N + predefined by the designer, else n = 1.

Module III: drives constraints
Milling, basically, consists of feeding a workpiece relative to a rotating multi-tooth tool. Therefore, there are two main types of drives, namely, the spindle motor and feed drives.

Rule 5: Spindle power consumption
Power draw from spindle motor and the efficiency of the motor are machine tool specific values where the net power can be calculated to ensure that the machine in question can cope with the cutter mass and operation. Therefore, the power drawn from the spindle motor constrains the machining efficiency (Maeda, Cao, & ALtintas 2005). The cutting power is found from Eq. (7) (Altintas, 2000;Maeda et al. 2005) as, where D is the tool diameter, S s the spindle speed and F t the tangential cutting force. The cutting power P t,max required for the spindle motor is the maximum value among the instantaneous power P t in one tooth period (Altintas, 2000;Maeda et al. 2005) Rule 6: Feed drive restrictions Feed drive motor must have enough torque to accelerate the table and workpiece and to cover frictions and forces acting in the feeding directions of the table. For simplicity, in this case it will suppose that feed drives are limited by its upper maximum feed, given by feed drive system or force upper. In this case it is represented by f max which can be affected by, for example, the weight and size of the workpiece, depending upon machine configuration.

Module IV: initial cutting parameter selection
This module gives assistance in the selection of the initial cutting parameters which can potentially lead to saving machining times.
Rule 7: Initial cutting parameter space selection This rule provides guidance to propose initial cutting parameters:  The admissible input parameter-space subject to cutting force control and spindle motor power availability and feed drive constraints is obtained. The initial cutting parameter space is given by the triple-(S s , a dc , f c ) so as fulfill rule 1, P t,max < P available , where P available is the power available in the spindle motor and 0 < f < f max where f max is given by feed drive system or force restrictions.
Rule 7.2: Selection of initial spindle speed Spindle speeds associated with the modal frequencies are selected as initial candidate working points. Those spindle speeds are associated with the areas in the stability lobes where deeper axial depth of cuts can be programmed.

Module V: cost function definition and rules to inference with it
This section defines a classical cost function to Pareto optimise multi-purpose objectives.

Cost function definition
A novel cost function has been conceived to allow an inference engine to carry out the selection of suitable cutting parameters. The tool cost model for a single milling process can be calculated using the following Eq. (11): JðTOL; MRR; ROS; TES; R; c iði¼1;...;4Þ Þ ¼ c The cost function has four terms. Each term is composed of a weighting factor (c i ), a normalisation factor (NF i ) and the function which delimits the process efficiency. These functions are: the life of the tool, TOL; the material remove rate, MRR; the surface finish, SURF; and the robustness of the system, ROS. The tool cost function is designed to be directly proportional to the life of the tool, material remove rate and robustness of the system and inversely proportional to surface roughness. So, optimal solutions will maximise TOL, MRR and ROS while minimising SURF. These parameters play an important role when selecting cutting parameters since they are usually used as benchmark indices in industries to measure the performance of the system. They are defined as following: 4.1.1. Life of the tool (TOL) TOL is a measure of the length of time a cutting tool will cut effectively. According to some studies (Alauddin, El Baradie, & Hashmi 1997;Ginta, Nurul Amin, Mohd Radzi, & Lajis 2009;Wong & Hamouda, 2003a;Wong & Hamouda, 2003b), an increase in the cutting speed, feed rate and axial depth of cut will decrease the tool life. In this paper, the Taylor Equation for Tool Life Expectancy, a model typically used in literature, is used to evaluate TOL in the expert system. This model is represented by the equation (Ginta et al. 2009;Wong & Hamouda, 2003a;Wong & Hamouda, 2003b): where K tol is a model constant, a 1 , a 2 and a 3 , are model parameters and V, a dc and f t , the cutting speed (m/min), axial depth of cut (mm) and feed per tooth (mm/tooth).

Material or metal remove rate (MRR)
The MRR measures the amount of material removed from the workpiece. Its definition is, where a dc is the axial depth of cut (mm), r dc the radial depth of cut (mm) and f c the feed velocity (mm/s).

Surface roughness (SURF)
The variations of the surface roughness are widely used criteria for the assessment of the surface quality. Some research works use the empirical relationship of the Eq. (12), (Kalpakjian & Schmidt, 2000;Wong & Hamouda, 2003a;Wong & Hamouda, 2003b). This approach is adopted in this paper: where V, f c and a dc are the cutting velocity (m/min), the feed velocity (mm/s) and axial depth of cut (mm), and K surf is a model constant and, b 1 , b 2 and b 3 surface roughness model parameters.

Robustness of the system (ROS)
The robustness of the system is a non-conventional measure to evaluate how close cutting parameters are to the border line in the stability lobe diagrams. For this purpose, a non-dimensional parameter is defined by: where a dc,ROS is the length of the axial depth of cut to the lobe and S s,ROS is the length of the spindle speed to the lobe, considering them to be non-dimensional. Finally, the weighting factors, c i , i = 1,. . . , 4 have the restriction that the sum of the parameters is the unity, i.e. P 4 i¼1 c i ¼ 1. Their declaration depends on process constraints. Normalization factors, NF i , i = 1,. . . , 4, equalize the magnitude order of each term in the cost function. They are defined as: where J i , represents each term of the cost function of the Eq. (11), which eventually, can be represented as

Rules of inference with the cost function
The following rules are proposed in order to modulate the cost function: Rule 8: Initial weighting factors selection.
The weighting factors can be selected by an expert engineer or operator who can judge the importance of each term in the cost function with respect to the phase of the operation to be carried out. The initial weighting factors are selected in a heuristic way and only experience and expertise in their programming will make the expert system more efficient.

Rule 9: Declaration of normalized factors
In the definition of the normalization factors, NF i ¼ J i ÀJ max ImaxÀJ min , the pairs (J max , J min ) are computed as the maximum and minimum values of each term in the cost function, being i the number of potential terms in the cost function.
Rule 10: Pareto optimal cutting parameter selection The Pareto optimal concept is introduced here in order to clarify the selection of weighting factors. This concept requires optimisation of different control objectives, known as multi-objective optimization, and in general there is no single optimal solution, instead a set of possible solutions exits called a Pareto optimal front (Su & Hou, 2008; Zhang, Wu, Xing, & Hu 2011). Which solution is chosen from the front depends on the weights that are given to the different objectives.

Rule 10.1: Coarse selection
The selected cutting parameters will be the values of S s , a dc and f c corresponding to the minimum value of the cost function according to selected values of the c i parameters. It can be expressed mathematically as follows, obtaining the 3-tuple of candidate input cutting parameter, ðS Ã s ; a Ã dc ; f Ã c Þ.

Rule 10.2: Fine selection
In order to have a more accurate solution, the cutting parameters are searched with a finer integration step around the point where the cost function gives its minimum value. In this case, the cutting parameter space is given by a 3-tuple Q Ã ¼ ðS ÃðkÞ s ; a ÃðkÞ dc ; f ÃðkÞ c Þ around q ⁄ , for k = 1,. . . , p, where p is the number of points to be considered, according to rules 1 and 2. The procedure for obtaining the required cutting parameters is the same as used in Rule 12.1 through Eq. (16) for the above defined new cutting parameters. Mathematically, it is expressed as, q ÃÃ ¼ arg max q ÃðkÞ fJðTOLðq ÃðkÞ Þ; MRRðq ÃðkÞ Þ; SURFðq ÃðkÞ Þ; ROSðq ÃðkÞ Þ;NF i ;c i Þg ð17Þ obtaining the 3-tuple of refined candidate input cutting parameter, ðS ÃÃ s ; a ÃÃ dc ; f ÃÃ c Þ.

Rule 11: Automatic modification of weighting factors
In order to achieve certain process or machine tool requirements in the cost function variables, the c i parameters are automatically redefined as in Eq. (15): J ¼ P 4 i¼1 c i Á NF i Á J i , which represents the proposed cost function of the Eq. (11). Then, for a given operation, Rule 12: Automatic modification of weighting factors through the gradient ascent method The steepest ascendant method is based on the estimation of a parameter vector in order to maximize a cost function (Passino, 2004). Here, it is applied as, from Eq. (11), Rule 13: Re-normalisation of the weighting factors.
After using rules 13 and 14, the weighting factors need to be normalized again to fulfil the constraint P 4 i¼1 c i ¼ 1. Then, two possibilities are considered: The c i parameters and the corresponding cost function variables are saved and stored. Then, a database is created with those values, which relates c i parameters to process variables in order to retain previous knowledge. In this way, the system can incorporate non responsive data mining algorithms, semantic rules or fuzzy rule based system to improve performance. Moreover, the system is open to the heuristic interaction with operators and expert engineers. This information can be further used for programming initial c i parameters according to production requirements, training novel operators and searching for more accurate cutting parameters.

Module VI: automatic feedback and monitoring
Due to non-modelled facts such as tool wear or run-out the predicted models cannot give accurate predictions about chatter vibrations when the tool is, for example, worn or run out. To consider this fact an automatic chatter detection and suppression system has been incorporated to the system.

Rule 15: Automatic chatter vibration detection
Despite having taken into account robustness margins against unstable situations against chatter, tool wear and/or other non-linear phenomena in the process can lead to vibrations. To accommodate this eventuality, a chatter detection algorithm has been integrated to the system in order to take action if chatter conditions are experienced due to unexpected conditions. Some approaches for on-line detection of chatter can be found in Soliman and Ismail (1997), Li, Wong, and Nee (1997) and Gradisek, Govekar, and Gravec (1998). In our case, the following algorithmic methodology has been taken into consideration (Campomanes & Altintas, 2003): then there exists chatter vibration, where h d.max is the maximum uncut chip thickness during a dynamic time domain simulation and h s,max is the maximum uncut chip thickness during a time domain simulation in which the work-piece and cutter remain rigid. The threshold of instability is selected to be 1.25 as in Campomanes and Altintas (2003).

Rule 16: Automatic chatter vibration suppression
In the case where chatter is detected, an automatic algorithm to suppress chatter has been embedded into the system. Since regenerative chatter is related to the interaction of the closed loop between two independent entities, the structural dynamics of the machine and the dynamics of the process, it is necessary to influence one of them to achieve a more stable and robust system. The most promising among the methods of influencing the cutting process is to control the spindle speed on-line, which means influencing the dynamics of the process. This can be achieved in two ways, by selecting the spindle speed or modulating it. In the expert system a spindle speed is selected automatically as Smith and Tlusty (1992) proposed. Then, in the case where chatter vibration is detected, an automatic variation of the spindle speed to deal with chatter problem is suggested. The strategy consist of detecting the chatter frequency and readjusting spindle speed in such a way that the new tooth passing frequency equals a multiple value of the chatter frequency.

Module VII: expert human machine interface
Since expert systems normally codify expert engineers and/or operators experience and knowledge in order to create decision support systems (DSS), this last module incorporates the possibility of adding to the system this experience and knowledge in order to achieve the best of two possibilities. Moreover, monitoring vibrations and other parameters such as system forces, feeds, MRR, TOL and SURF is suggested to support the interaction between expert engineers, operators and the system. In this way, this interaction will be more reliable.

Rule 17: Monitoring signals
In order to facilitate the human machine interface, it is proposed to monitoring the most important signals to provide better information to the expert system. For example, there are some sources of vibrations which can appear when machining. For example, forced vibrations, mode coupled, vibrations due to run-out, and so on (Wiercigroch & Budak, 2001). For this reason, it is necessary to monitory the frequencies which appear in the system in order to identify them, and have the chance to deal with them. In this case, straightforward Fourier Frequency Transform (FFT) is presented for this purpose. Also, the most signal it is possible to monitor in the system the better performance will be achieved, then the above proposed signals are taken into account in this section in order to have better interaction with Rule 18 proposal.

Rule 18: Expert human machine interface
This last rule incorporates the possibility of introducing expert engineers' and/or operators' experience and knowledge in form of, for instance, if/then rules in order to create decision support systems using data mining techniques for knowledge discover and reasoning techniques for supporting the system with possible decisions and advises (Gilbert, Sanchez-Marre, & Codina 2010;Liau, Chu, & Hsioa, 2012;Alonso, Martinez, Perez, & Valente 2012). Fig. 4 pictures the schematic representation of the DSS. Table 1 Schematic representation of the expert rules.
Rule Knowledge base 1.
Since stability lobes are calculated from a linear approximation a stability region inexactitude is added. Also, a robustness factor which influences the axial depth of cut is taken into account 2.
Cutting space parameters extracted from lobes and restrictions in spindle power availability and cutting force controllers 3.
Considerations about controlling the forces; using model reference adaptive control for keeping forces under prescribed upper limit 4.
Sampling period considerations to maximize computer resources 5.
Spindle power consumption restrictions 6.
Giving appropriate the initial cutting space parameter to decrease searching time Rules to inference with the cost function 8. Initial weighting factors selection; the selection of right initial weighting factors plays an important role in achieving good solutions in short time 9.
Declaration of standardizing factors 10.
Selection of cutting parameters criterion; coarse and fine criterion 11.
Automatic rule of weighting factors modification 12.
Automatic weighting factors modification through gradient descendent method. An alternative way to modify automatically the weighting factors is proposed 13.
Renormalization of the weighting factors if they are re-programmed automatically through rules 11 and 12 14.
Re-parameterization of weighting factors Feedback and expert HMI rules 15.
Chatter vibration detection algorithm is added to be more reliable 16.
Chatter suppression algorithm to lead the system to stable and reliable cutting conditions 17.
Interaction with expert engineers and operators Table 2 Tool modal parameters.

Stability margin factors
Life of the tool model parameters Surface roughness model parameters In Fig. 4, it can be seen that experience can become knowledge through a self-learning system composed by data mining techniques. Also, knowledge can be introduced directly by expert engineers and operators. A decision system is extracted from knowledge through a self-adaptive system using reasoning techniques. The so-called ''self-learning'' and ''self-adaptive'' system is suggested to do it automatically. This rule can be added to the whole system or to each module independently.
Finally, Fig. 5 depicts a schematic representation of the expert system composed of five main blocks. The first one gives the inputs to the expert system, representing the milling process determination, modal characteristics, tool diameter and number of teeth and tool and workpiece material properties and, the transfer function which relates output force and programmed feed rates and process restrictions. The second block represents the knowledge base of the system and is composed for the first four modules, all of them related to the milling process. The third block describes the inference of the system with the cost function and concentrates on the modulation of it with some expert rules. This block, it also re-parameterises those parameters according to knowledge base insights. The fourth block shows the outputs. It, also, reflects the feedback to the system, in case of not achieving adequate objectives or of changing system requirements. Finally, the fifth block of the Fig. 5 represents the modules VI and VII. The feedback module detects and suppresses chatter on-line in the case where nonmodelled facets appears in in the milling process due, for instance, to tool wear. The expert interaction module provides the facility to interact automatically with experience and knowledge obtained from expert engineers and operators. The proposed rules are summarised in Table 1.

Case study
For the validation of this method, an end mill has been chosen with the modal characteristics in the X and Y directions corresponding to Table 2, with three tooth and 30 mm diameter. The work-piece is a rigid aluminium block whose specific cutting energy is k t ¼ 600 kN mm À2 and the proportionally factor is taken to be k r ¼ 0:07. Other parameters belonging to the expert system are shown in Table 3. They are the stability margin factor, d, and the stability margin factor for the axial depth of cut, a. Moreover, the parameters of the tool-life model ðK tool ; a 1 ; a 2 ; a 3 Þ and the parameters corresponding to the surface roughness model (K surf ,b 1 , b 2 , b 3 ), which have been considered constants in the simulations for simplicity purposes, are listed in Table 3.
Regarding to the model reference adaptive control, the transfer function of the Eq. (6); the cutting pressure of the transfer function has been selected to be constant and equal to 1200 N/mm 2 in all range of cutting parameters, the CNC time constant, s m = 0.1 ms and, s c = 1/N t S s . The continuous model reference system of the adaptive control is chosen to be a typical continuous second order plant with n = 0.75 and x n ¼ 2:5 4T , where T is the sampling period. In this work, it is desirable for the reference force to be maintained at 600 N.
The analytical tests for cutting parameter selection were conducted within a known range of spindle speeds, starting at the spindle speed corresponding to its natural frequency and its submultiples. The integration in the axial depths of cuts is designed to start at its minimum value in the stability border line divided by a natural number designed by the engineer, with increments of the same size. The spindle motor is supposed to guarantee 2745.3 W of power at maximum value and, the feed motor is able to produce 25 mm/s of feed velocity. The resulting cutting parameters are those which lead to a Pareto optimal value of the cost function depending on the chosen weighting factors.
The conducted milling process is a full immersion face up-milling operation. Table 4 and Fig. 6 gather the scenarios which are specified in the current example: 1. The first point, (specified as point 1 in the Table 4 and in red in Fig. 6), is associated with programming of initial c i parameters.
In this case, the initial cutting parameters are programmed, intuitively, to preserve the tool, ensuring enough stability margin and minimizing the surface roughness, while the MRR will not be important at first sight. Then, the following weighting factors are programmed c 1 = 0.3, c 2 , 0.1, c 3 = 0.3 and c 4 = 0.3. They are equivalent to programming the following cutting parameters, q ⁄ = (1723 rpm, 0.3609 mm, 5.6512 mm/s). The associated values of the material removal rate, life of the tool, robustness of the system and surface roughness which are achieved working under those cutting parameters are MRR ¼ 0:0467 cm 3 s ; TOL ¼ 49:54 min; ROS ¼ 1:16 and SURF = 0.9125 lm. And, the values which measure the chatter instability and the spindle power consumption are l = 1.0349, P t = 1623.9 W. Finer selection of cutting parameters can be achieved through rule 10.2. In this case, this rule leads to program the following cutting parameters, q ⁄⁄ = (1800 rpm, 0.3693 mm, 7.2319 mm/s). This second Pareto optimal solution improves every factor of the cost function except the robustness of the system, as it can be seen comparing them with previous values showed in Table 4. 2. Secondly (specified as point 2. in the Table 4 and in blue in Fig. 6), a situation is assumed in which it is required to increase the productivity. In this case, the MRR can be delimited between two values bigger than the current (point 1.) MRR, for example, 0:08 cm 3 s 6 MRR 6 0:09 cm 3 s . Using rule 12, this situation leads to program the following cutting parameters q Ã ¼ ð2412 rpm; 0:3609 mm; 7:9299 mm=sÞ, which gives the performance indexes MRR 3. The third situation (point 3. in the Table 4 and in green in Fig. 6) that has been taken into consideration for increasing the removed material from the workpiece is tuning the c i -values manually, by engineer or operator experience, or, automatically, through rules 11 and 12. For example, the following values could be programmed c 1 = 0.1, c 2 = 0.7, c 3 = 0.1 and c 4 = 0.1, which boost the increased of MRR, leads to the following cutting parameters: q ⁄ = (2010 rpm, 1.5124 mm, 17.4394 mm/s) and the following cost function variables values MRR ¼ 0:7913 cm 3 s ; TL ¼ 3:2564 min; Iv ¼ 0:0022 and R a = 8.148 lm. Table 4 gathers the three described cases. It shows the programmed cutting parameters, the values of the variables of the cost function in that working point, the values which measure the chatter instability and the spindle power consumption and their corresponding weighting factors at those working points. Fig. 6 pictures the represented cutting parameters in Table 3 on the stability charts, pairs spindle speed and axial depth of cut for the cases 1, 2 and 3, and the programmed feed velocity for the three cases, represented by changes in the feed velocity. It can be observed that the control signal (feed velocity) is smooth and feasible except in the transient response and when cutting parameters change and the pairs of spindle speed and axial depth of cuts are both under the border line in the stable zone. The control signal has a peak at the transitory due to selection of initial conditions which are not close to the real values. It also experiments not smooth transition when changed from working point 2 to 3. The frequency response of the points 1 and 3 gives the tooth pass frequency and its harmonics in each case, as with case 2 which has not been considered in the graphs.
The expert system is able to move around the cutting parameter space subjected to different production 'states' or requirements. This fact can be achieved by the programming of easy and intuitive c i -parameters which leads to giving adequate cutting parameters to the milling system according to production requirements. In this way, the expert system provides an intuitive but intelligent planning of cutting parameters giving a fast solution if changeable situations happen. Finally, through rule 14, the obtained c i parameters are stored subjected to learning and adaptive skills to help improve proven solutions.

Conclusions and discussion
The paper describes, in an intuitive way but with mathematical thoroughness, the construction of an expert rule based system for cutting parameter selection in the milling processes. The approach consists of a series of rules split into 7 modules. Each module can interact independently leading to a universal system in the sense that it can be applied to every machine. The first module gives robustness to the system and presents the rough allowable input cutting parameters. The second module includes the model reference adaptive control of milling forces functionality, keeping the forces of the system under prescribed upper limit in spite of variations in system parameters. Moreover, the possibility of manipulating the sampling time of the system is added to preserve computer resources if necessary. The third module covers the spindle and feed drive motors constraints. The fourth module gives initial computational input parameters subjected to constraint of the motors and suggests potential initial spindle speed candidates. The fifth module presents a novel multi-objective cost function to evaluate the performance of the system. It has been devised from first principles and depends on the material to be removed, tool life, surface roughness and a stability margin. Weighting factors give the importance of the each term in the cost function. Each term is then modulated by a weighting factor, where the most important term is associated with the largest weighting factor to obtain Pareto optimal cutting parameters. Other Pareto optimal fronts can be obtained by two methods. First, by refining the searching cutting parameters around the selected one and, secondly, by modulating the weighting factors automatically if new production requirements are required or by interacting with system engineers or operators in order to take advantage of their experience. This information is stored in a database in order to register and modify previous data. Module 6 gives automatic feedback to the system if chatter vibrations are experienced due to non-modeled nonlinear effects such as wear or run out of the tool. Finally, module 7 proposes to monitor key parameters to better inter-actuation with expert engineers and operators and a scheme to infer with them providing in this way the best qualities of traditional expert systems and model based expert systems. Nevertheless, since the presented expert system is based on mathematical models of the system, its outputs selection is dominated by the modal parameters of the tool, tool and workpiece material properties, the linear transfer function which gives the relationship between the resultant force and the feed velocity, stability robustness constants, the determination of the process and the process restrictions.
The developed expert rule based system suggests an open and modular architecture which is able to automatically execute orders and reason about the milling problem in a comparable way to humans reasoning, giving performances of possible programmable cutting conditions through the cost function with the possibility of incorporating new functionalities. Those performance indices are then used to select appropriate cutting parameters for the operation which leads to the maximum productivity while respecting stability, spindle and feed motor consumptions and control constraints. Initial candidate cutting conditions are determined from the knowledge of the system, optimising, in this way, the process of training the system. Furthermore, the expert system is able to modify the values of the weighting factors automatically or interacting with operators with an easy interface if new constraints are required or they change, obtaining different Pareto optimal solutions. Finally, the system has automatic feedback if chatter vibrations occur due to non-modelled parameters such as wear or run out the tool.
The developed expert rule based system uses classical mathematical approaches to calculate cutting conditions. In the simplest implementation the operator of the machine just has to tune to the system with four simple and intuitive c i values in order to program cutting parameters to fulfill full process requirements. A simulation example which shows the behaviour of the system is presented. As an added benefit, the integrated database, which is provided to introduce experience based or knowledge based rules if necessary or, the proposed control scheme which is able to update with information from external sources of experience and knowledge, providing an open and modular architecture with learning and adaptable skills.
Finally, the expert system scheme can be extrapolated to any kind of system, given an intuitive, open control architecture, where learning and adaptive resources can be added according to multiobjective purposes. The open and modular design of the expert system allows new functionalities to be incorporated as and when new research allows.