CUTTING MACHINES USING FUZZY LOGIC CONTROLLER
DESCRIPTION TECHNICAL FIELD: The invention relates to machines for removing material from a workpiece by means of a cutting tool, and is especially applicable to computer/numerically-controlled milling machines, drilling machines, grinding/polishing machines, planing machines, lathes, and other such machines which have at least one drive motor for effecting relative movement between the workpiece and the cutting tool to effect material removal and which employ computer/numerical control of such movement. The invention also encompasses control systems per se for use with such machines and conversion of existing machines.
BACKGROUND ART: Computer/numerically-controlled machines have a control system which includes a computer that is programmed with numerical control codes for controlling movement of a workpiece-supporting table relative to a cutting tool, or vice versa. Many such machines have open-loop control systems which are designed to execute numerical control codes regardless of the on-line cutting geometry variation, tool conditions, and the dynamics of the cutting process. This leads to under-utilization of machine capacity, unsafe machining processes, and excessive human intervention. Usually, one or more rough cuts are made to remove most of the unwanted material quickly. It is desirable to provide closed loop control to maximise material removal rate without exceeding safe limits for the force exerted upon the cutting tool. It is known, therefore, to equip such a machine with a dynamometer mounted between the workpiece and the machine table to provide a measure of the force exerted between the cutting tool and the workpiece and attempt to maintain the force at a predetermined level by adjusting the feed rate of the table.
Such a control system has a number of disadvantages. For example, the dynamometer is limited in size, which limits the size of workpiece that can be mounted upon it, and is exposed to cutting fluid, swarf, and other potential contaminants, as well as, potentially, overload and collision damage. Moreover, such dynamometers are
relatively expensive and the systems are complicated to set up and prone to vibration and instability.
DISCLOSURE OF INVENTION: The present invention seeks to eliminate or at least mitigate one or more of the above-mentioned disadvantages and provide a material removal machine which allows better control of material removal rate.
According to one aspect of the present invention, there is provided a material removal machine comprising a carrier for carrying a workpiece fixed relative thereto; a holder for a cutting tool; drive means for effecting relative movement between the carrier and the holder to effect removal of material from the workpiece by the tool; a sensor for monitoring, during material removal, at least one variable parameter corresponding to energy consumption rate of an element of the drive means; and a control unit responsive to the sensor for controlling the drive means to vary said relative movement so as to tend to maintain energy consumption rate substantially at a predetermined level.
According to a second aspect of present invention, there is provided a control system for a material removal machine comprising a earner for carrying a workpiece fixed relative thereto, a holder for a cutting tool, drive means for effecting relative movement between the carrier and the holder to effect removal of material from the workpiece by the tool, and a sensor for monitoring, during material removal, at least one parameter conesponding to energy consumption rate of an element of the drive means; the system comprising a control unit responsive to the sensor for controlling the drive means to vary said relative movement so as to maintain energy consumption rate substantially at a predetermined level.
It is also desirable to increase material removal rates towards an optimum level for a particular machine, workpiece, and cutting tool. To this end, a third aspect of the present invention comprises a material removal machine in which the number of variables being controlled is greater than the number of variables being monitored. According to the third aspect of the invention, a material removal machine comprises a carrier for carrying a workpiece fixed relative thereto, a support for a cutting tool, drive means for effecting relative movement between the carrier and the support to effect material removal, a sensor operable to provide a signal representing a
parameter indicative of energy consumption rate of the drive means or a cutting force exerted between a cutting tool mounted to the support and a workpiece mounted to the carrier, control means for comparing said signal with a reference and controlling the drive means to maintain the energy consumption or cutting force substantially equal to a desired value, wherein the number of parameters being controlled is greater than the number of number of parameters being monitored.
According to a fourth aspect of the invention, there is provided a control system for a material removal machine comprising a carrier for canying a workpiece fixed relative thereto, a holder for a cutting tool, and drive means for effecting relative movement between the carrier and the holder to effect material removal, the control system comprising a sensor operable to provide a signal representing energy consumption rate of the drive means or cutting force exerted between a cutting tool carried by the holder and a workpiece carried by the carrier, and control means for comparing said signal with a reference and controlling two different parameters of the drive means to maintain the force substantially equal to a desired value.
Preferably, the control unit controls movement of both the workpiece carrier and the cutting tool. In either case, such movement may be linear or rotational.
In preferred embodiments of the above aspects of the invention, the control unit determines two variables, namely the difference (P(n) - Pref) between the instant actual energy consumption rate (P(n)) and a reference energy consumption rate (Pref), and the difference (P(n) - P(n-l)) between a cunent actual energy consumption rate (P(n)) and a previous actual energy consumption rate (P(n-l)), and determines therefrom a value for controlling the relative movement of the cutting tool and workpiece carrier.
In one prefened embodiment, the control unit compares the two variables (P(n) - Pref) and (P(n) - P(n-l)) with a table of predetermined values for the rate of movement of the workpiece support or the cutting tool holder to extract therefrom a desired adjustment to cause the actual energy consumption rate to correspond more closely with the desired energy consumption rate.
Thus, in the table, one of the ordinates comprises a range of values of one of the variables (P(n) - Pref) and the other ordinate comprises a range of values of the other of the variables (P(n) - P(n-l)), and the control unit uses the instant values of the two variables to select the conesponding recommended value for cutting tool holder movement and/or workpiece carrier movement.
The actual values contained within the table may conveniently be derived empirically, using predetermined data for the workpiece material, type of machine, from experience and/or by experiment.
Preferably, the control unit has two such tables, one containing values for movement of the workpiece carrier and the other containing values for movement of the cutting tool holder, both tables being indexed by the same variables (P(n) - Pref) and (P(n)
- P(n-l)) and the control unit compares the two variables with both tables, obtains therefrom recommended adjustments (Δf and Δv) for workpiece earner movement and cutting tool holder movement, respectively, and controls both accordingly. Preferably, the control unit employs a fuzzy logic controller to determine the desired values. Then the fuzzy logic controller fuzzifies the values of P(n) - P(n-l) and uses them as indices to select, from a table, conesponding sets of fuzzy rules for the respective adjustments. The fuzzy logic controller then uses membership functions to reduce the sets and a defuzzified to convert the resulting recommendations into crisp adjustments values.
Another aspect of the invention comprises an assemblage or kit for adapting an existing computer-numerically controlled machine having a carrier, tool holder and a microcontroller, the assemblage or kit comprising a sensor for connection to the drive means for providing a signal representing energy consumption rate of the drive means or cutting force exerted between a cutting tool carried by the holder and a workpiece carried by the carrier, and software for programming the microcontroller to compare the signal with a reference level and, in dependence thereupon, control the drive means to reduce said difference.
Yet another aspect of the invention comprises the aforementioned software, conveniently carried by a storage medium.
Various objects, features and advantages of the invention will become apparent form the following description, taken in conjunction with the accompanying drawings, of prefened embodiments which are described by way of example only.
BRIEF DESCRIPTION OF THE DRAWINGS:
Figure 1, labelled PRIOR ART, illustrates a computer/numerically controlled milling machine employing a dynamometer in a feedback control system;
Figure 2 illustrates an embodiment of the present invention in the form of a computer-numerically-controlled milling machine employing a power sensor;
Figure 3 is a block schematic diagram of a control unit of the machine of Figure 2; 5 Figure 4 illustrates the structure of a fuzzy logic controller of the control unit;
Figures 5(a) and 5(b) illustrate membership functions used by the fuzzy logic controller;
Figure 6 illustrates a degree of membership for triangular fuzzy sets;
Figure 7 illustrates fuzzy inference operation for table feed rate under crisp 0 inputs; and
Figure 8 illustrates defuzzification of feed rate using centre of area (COA).
BEST MODE(S) FOR CARRYING OUT THE INVENTION:
Before embodiments of the present invention are described, a prior art machine 5 tool will be described with reference to Figure 1, labelled PRIOR ART, which illustrates a milling machine 10 which has a machine table 12 supporting a workpiece 14 beneath a cutting tool 16 mounted upon a spindle 18 driven by a drive motor 20. Three-phase electrical power from a supply 22 is supplied to the drive motor 20 by way of a spindle control unit 24 which can be adjusted to set the drive motor speed to different, but fixed, o levels.
The table 12 is movable in two or more orthogonal directions, identified in Figure 1 as x, y and z, by one or more motors 26 controlled by a control unit 28, specifically a microcontroller. A dynamometer 30 is mounted upon the table 12 and the workpiece 14 is mounted upon the dynamometer 30. During operation of the milling machine 10, 5 the dynamometer 30 produces a signal representing the force exerted between the workpiece 14 and the cutting tool 16 and supplies it to the microcontroller 28 which compares it with a reference and, depending upon the difference, controls the motors 26 to increase or decrease the rate of movement of the table 12.
A disadvantage of such a control using traditional control algorithms is that it is 0 relatively sensitive to changes in the machine, cutting tool and workpiece. Usually, such a machine is developed for very few machine-tool-workpiece combinations. If it is used for other machine-tool-workpiece combinations, excessive oscillations, overshoot, and instability may occur, leading to premature tool failure and even machine breakdown.
Also, the dynamometer 30 is exposed to a relatively harsh environment and limits the size of workpiece which can be machined.
An embodiment of the present invention will now be described which addresses these disadvantages by means of a control system which employs both electrical power- sensing and fuzzy-logic and is capable of adjusting several machine parameters, for example both machine table feed rate and spindle speed.
Referring to Figure 2, a milling machine with a control system embodying the present invention comprises a machine table 32 supporting a workpiece 34 beneath a cutting tool 36 carried by a spindle 38 driven by a drive motor 40. The machine table 32 is movable in at least two orthogonal directions, identified in Figure 2 as x, y and z, by a table feed controller 37 which comprises several motors controlled in response to a control signal received on line 42 from a microcontroller 44. Three-phase electrical power from a supply 46 is supplied to the drive motor 40 by way of a spindle speed controller 48, which can be adjusted to vary the drive motor speed continuously, and a power sensor 50 which measures the instantaneous power supplied to the drive motor 40 and supplies a conesponding power signal to the microcontroller 42 via line 52. As will be described more fully later, the microcontroller 44 is programmed to function as a fuzzy logic controller and uses the spindle power signal, and data stored in tables, to compute desired values for the spindle speed control signal and the feed rate control signal which it supplies on lines 53 and 42 to the spindle control unit 48 and the table feed rate controller 36, respectively.
The spindle control unit 48 comprises an adjustable frequency AC drive unit having a port for the analog spindle control signal and which provides continuous variation of the spindle speed in dependence upon such signal. Such a control unit 48 is of known construction and so will not be described in detail. A suitable such unit is marketed by Saftronics Corporation of Fort Myers, Florida, U.S.A., as a "Model G3".
The microcontroller 44 includes a digital-to-analog converter so that it can supply the spindle speed control signal as an analog signal on line 53.
A suitable power sensor 48, which measures three-phase power consumption rather than cunent only, is marketed under the name "Universal Power Cell" by Load
Controls Incorporated of Sturbridge, Massachusetts, U.S.A.
In contrast to existing control systems, which require the feed rate for a particular workpiece profile to be calculated in advance and programmed into the microcontroller,
in the control system illustrated in Figure 2, the microcontroller 44 has tables storing control rules for feed rates and spindle speeds and uses so-called fuzzy logic to determine the recommended values of both parameters, despite the fact that the system monitors only the one input variable, namely spindle power. 5 Referring now to Figure 3, which shows, schematically, the functions performed by the microcontroller 44, the cunent power consumption level P(n) from the power sensor 50 is supplied, as a digital value, to a summing device 60 which sums it with the reference power value Pref, conveniently obtained from memory. A scaling factor 62 multiplies the output of summing device 60, which is the enor signal EP(n), by a 0 variable Ke and supplies the resulting value to one input of fuzzy logic controller (FLC) 64. The power sensor 50 also supplies the cunent power consumption level signal P(n) to a one sample delay 68 to produce a delayed or "previous" power consumption signal P(n-l) which summing device 70 subtracts from the cunent power consumption value P(n) to produce a power consumption signal value CP(n). A second scaling factor 72 5 multiplies the signal value CP(n) by variable Kc and supplies the resulting value to a second input of fuzzy logic controller 64.
The fuzzy logic controller 64 processes the two scaled values EP(n) and CP(n) to produce two recommended adjustment values Δf(n) and Δv(n). More particularly, the fuzzy logic controller 64 uses the two variables, i.e. P(n) - Pref and P(n) - P(n-l) to 0 address each of two tables, one table providing a recommended adjustment Δf(n) for controlling the feed rate of the machine table 32 and the other table providing a conesponding recommended adjustment Δv(n) for adjusting the rotational speed of spindle 38 (Figure 2). The values Δf(n) and Δv(n) are supplied to the scaling factors 74 and 76, respectively, which multiply them by variables Kf and Kv, respectively, and 5 supply the scaled values to summing devices 78 and 80, respectively, which are coupled also to delay elements 82 and 84, respectively. The latter delay the sample values by one sample period to produce delayed recommended values fcom(n-l) and vcom(n-l), respectively. The summing devices 78 and 80 sum the recommended values with their respective delayed recommended values to produce the final adjustment values fcom(n) and ° v com(n) which are converted to analog signals by digital-to-analog converters (not shown).
These analog signals are supplied to the table feed controller 37 and spindle speed controller 48, respectively, for adjusting the table feed rate and spindle speed, respectively.
The tuning mechanism 86 also receives the actual power samples P(n) and the reference power level Pref, derives from them a control signal, and uses the control signal to adjust the four scaling factors 62, 72, 74 and 76 so as to provide better stability and avoid "hunting" or erratic variations in the recommended and desired values. In effect, the summing devices 70, 78 and 80 and delay elements 68, 82 and 84, being connected in feedback loops, constitute low pass filters for smoothing the signals. As illustrated in Figure 4, the fuzzy logic controller 64 has the usual structure, namely a fuzzifier 88 which receives and "fuzzifies" the sample values CP(n) and EP(n), a fuzzy inference engine 90 which processes the sample values and a defuzzifier 92 which defuzzifies the output of the fuzzy inference engine 90 to provide "crisp" values for the recommended values Δf(n) and Δv(n). The fuzzy inference engine 90 uses membership functions and fuzzy rules extracted from Membership Function store 94 and Fuzzy Rule base 96, respectively. Tables of feed rate rules and spindle speed rules are illustrated below in tabular form in Tables 1(a) and 1(b), respectively. In both tables, the horizontal ordinates represent ranges of values of the rate of change of energy consumption CP(n), which is equal to P(n) - P(n-l), and the vertical ordinate represents ranges of values of the error or difference signal EP(n), which is equal to P(n) - Pref. The actual values in the tables are derived empirically from handbooks for the machine, handbooks for specific cutting rates for the material concerned, from experience and/or by experiment.
While the structure and operation of the fuzzy logic controller 64 are generally conventional, its operation will now be described briefly with reference also to Figures 5(a) to 8. Fuzzification of Inputs CP(n) and EP(n) by Fuzzifier 86 The first step of fuzzy control policy is to take the input values CP(n) and EP(n) and determine the degree to which they belong to each of the appropriate fuzzy sets in the various input universes of discourse. The two inputs power change CP(n) and power enor EP(n) applied to the fuzzifier 86 shown in Figure 4 are derived from the same power sensor 50. At each sampling instant n, the power enor EP(n) and the power change CP(n) are respectively calculated as
EP(n) = P(n) - Pref (1)
CP(n) = P(n) - P(n-l) (2)
The scaling factors 62 and 72 multiply them by scaling factors, Ke and Kc so as to normalize the power enor signals EP(n) and CP(n) and map them into suitable linguistic values.
The input data CP(n) and EP(n) are crisp, and fuzzification is required to map the range of crisp inputs to conesponding fuzzy values for the system input variables. This process can be expressed by: x = fuzzifier (x^) (3) where x0 is a vector of crisp values of one input variable from the process, and x is a vector of fuzzy sets defined for the variable. Membership Functions (92)
To transform crisp inputs into fuzzy inputs, membership functions must first be determined for each of the inputs CP(n) and EP(n). Once membership functions are specified, a real time input value, such as a power enor, is sampled and used to produce fuzzy inputs via membership function. There are usually several fuzzy inputs conesponding to a single crisp input since the crisp input can have partial membership grades in several fuzzy sets. The membership grading is represented by a real number ranging between 0 and 1 within the closed interval.
To simplify calculations, triangular shape membership functions were used in this embodiment. As illustrated in Figures 5(a) and 5(b), seven fuzzy sets are used for the inputs and outputs of the controller 86, namely NB, negative big; NM, negative medium;
NS, negative small; ZE, zero; PS, positive small; PM, positive medium; and PB, positive big.
The universe of discourse of all inputs and outputs was within the range of [-1,
1]. It should be noted that any output deviating from zero will trigger an adjustment when the NS and PS sets intersect at zero and hence lead to unnecessary oscillation.
This was remedied by maintaining a nanow open area between NS and PS sets in Figure
5(b).
Mathematically, the membership function, μ
A, for a fuzzy set, A, is given by μ
A : X- > [0,l] (4) Hence, the degree of membership for triangular fuzzy sets, as illustrated in Figure 6, can be defined as:
Control Rules
One of the most crucial components of the fuzzy controller 86 is the fuzzy control rule module 94 (Figure 4). The set of control rules defines the system behaviour and replaces the mathematical modelling of the system. The fuzzy rules, which use the fuzzy inputs to determine system actions, are obtained from the knowledge of skilled operators, by experiments, and/or prior knowledge of the end milling processes. Each of the rules can be written as an IF-THEN statement that describes the action to be taken in response to various fuzzy inputs. For example, as shown in Tables 1(a) and 1(b) below: If EP(n) is NB and CP is ZE then f is NM; also v is PB
The above rule, in natural language, states that if power enor EP(n) falls in the "negative big" (NB) fuzzy set and power change CP(n) is in the "zero" set (ZE), i.e. the actual energy consumption rate P(n) is well below the desired energy consumption rate Pref, and stable, then the suggested adjustment for table feed rate is negative medium (NM) and the suggested speed adjustment is "positive big" PB, i.e. reduce the table feed rate a moderate amount and increase the cutting tool speed a large amount. Each statement such as the one above is called a premise. Usually there are several premises for one input, which leads to a consequence or an action by the controller 86. This process will be discussed in detail in the next section. Once the fuzzy rules had been formulated, the decision-making tables Table 1(a) and Table 1(b) for the two-input, two-output system were constructed as shown below:
CP
EP
Table 1(a) Fuzzy rules for adaptive control of table feedrate before rule reduction
CP
EP
Table 1(b) Fuzzy rules for adaptive control of spindle speed before rule reduction Fuzzy Inference Engine 88
In this stage of the process, the fuzzy rules and the membership degree of the fuzzy inputs will determine the fuzzy outputs. A technique called max-min inference is used to calculate a numerical value representing the aggregate effect of all the rules triggered by a pair of input values (CP(n) and EP(n)). The result is a fuzzy output for each type of consequent action.
It has been determined that the union of fuzzy sets A and B is expressed as
C : =A V B : (6)
and the membership function of C is given by μc(x) = defMAX{μA(x), μB(x)} for all x G X (7)
Similarly, the intersection of fuzzy sets A, B, is written as
D : = A Λ B: (8) and the membership function of D is μD(x) = defMIN{μA(x), μB(x)} for all x E X (9)
For the two-input, two-output fuzzy system, the operation can be described as follows, and illustrated in Figure 8:
Premise 1: If EP is a{ AND CP is Then f is Cj also v is dj Premise 2: If EP is a2 AND CP is b2 Then f is c2 also v is d2
Premise n (Knowledge): If EP is a„ AND CP is bn Then f is cn and v is dn Premise n + 1 (Fact): EP is A AND CP is B
Consequence 1 : f is C Consequence 2: v is D
Figure 7 shows the MAX-MIN inferencing process for the crisp input values EP0 and CP0 which are regarded as fuzzy singletons.
In general, for an n-rule controller with inputs A = EP0 and B = CP0, the consequences C and D can be expressed as: μC(f') = (μA1(EP0) Λ MB1(CPQ) Λ μcl(f) V ..(MAD(EP0) Λ μBn(CP0) Λ μCn(f ))
(10) C(S') = (μA1(EP0) Λ B1(CP0) Λ cl(v') V ..(μAn(EP0) Λ Mjn(CPo) Λ μCn(v'))
(11) Defuzzification 90 Defuzzification is the process of mapping the infened fuzzy control actions to crisp control actions. A defuzzification strategy is aimed at producing a non-fuzzy control action that best represents the possibility distribution of the infened fuzzy control action. This can be expressed by: f0 = Defuzzifier f (12) where f is the fuzzy control action, f0 the crisp control action, and Defuzzifier is the defuzzification operator.
The Center of Area (COA) method is the most commonly used defuzzification strategy in real-time implementations of fuzzy logic control. The COA method generates
the centre of gravity of the possible distribution of a control action. The crisp output, f0, associated with the centre of gravity for the resulting fuzzy set C is obtained using the COA method as follows:
f f1 u (f' ) df' f - -1 C (13)
Figure 8 illustrates defuzzification of table feedrate recommendations f0 for two fuzzy sets cl and c2. The calculation for the spindle speed is similar to that described above for feedrate.
Given the crisp output values f0 and v0, the control commands can be calculated for each sampling period. The feedrate and spindle speed commands for the period i are obtained as follows: ccn(n) = Un-1) + Kff0(n) (14) com(n) = vcom(n-l) + Kvv0(n) (15) where fcom(n-l) and vcom(n-l) are the control commands of the previous sampling period,
Kf and Kv are the scaling factors for feedrate and spindle speed deviations respectively.
Scaling Factor Tuning
There are several adaptation techniques for fuzzy controllers, such as:
(a) membership function tuning,
(b) input, output scaling factors tuning, and (c) linguistic rule tuning.
The second technique, also refened to as gain coefficient tuning, was adopted as it appears to be more effective and simpler for implementation of a control policy. The other two techniques usually require additional algorithms such as neural networks and genetic algorithms, as well as an off-line learning procedure. For information about this second technique, the reader is directed to the text book "An Introduction to Fuzzy Logic Control" by D. Driankov, H. Hellendoorn and M. Reinfrank, publ. Springer, 1996, Munich and to the article "Adaptive Fuzzy Logic Controllers" by D. Mallampati and S. Shenoi, 4th. International Conference on Industrial and Engineering Application of Artificial Intelligence, 1991, pp. 62-70, both of which are incorporated herein by reference.
Tuning the scaling factors of the output parameters, feedrate and spindle speed deviations provides better response to the changes in the cutting process. In other words, this technique leads to the development of an adaptive fuzzy controller whose control actions change with respect to the machining processes and the environments in which it operates.
The tuning procedure involves the adjustment of the scaling factors 62, 72, 74 and 76 (Figure 3) for the feedrate and spindle speed in order to avoid, or minimize, overshoots when sudden changes in a cutting process occur. Also, it prevents the power from continuous decline below the reference level Pref. This is achieved by examining the trend of the power enor EP(n) and the change of power CP(n). Based on the trend of power enor EP(n) and the change of power CP(n), the tuning mechanism 86 (Figure 3) adjusts the scaling factors Kf(n) and Kv(n) in Equations (14) and (15) according to the expressions:
K/n) = K n-1) (16) Kv(n) = K Kv(n-1) (17)
To determine λ„, two consecutive power enors are defined by
EP(n) = P(n-l) - Pref EP(n-l) = P(n-2) - Pref and the two consecutive changes of power by: CP(n) = P(n) - P(n-l)
CP(n-l) = P(n-l) - P(n-2) (19) λ„ can be tuned as follows
if CP (n) >1
CP(n -l )
if sign CP(n) ≠ CP(n-l) set λ,, = 1
else if | EP(n) | < | EP(n-l) | set = CP (n -l)
CP (n)
else if | EP(n) | > | EP(n-l) | set λ,, = CP (n) CP(n -l )
else set = 1
where 0 < a < 1.
The main idea of this algorithm is to allow adjustments to be based upon the latest trend of power error EP(n) and power change CP(n). If the cunent situation is worse than before, or, in other words, the trend is away from the reference level Pref, more adjustment should be made, i.e. , should be greater than 1. If the cunent situation is the same as before, or no clear trend can be observed, it is desirable to keep Kf or Kv
unchanged, i.e. , = 1. For example, the condition specified by CP (n) > 1
CP(n -l )
sign(CP(n)) =sign(CP(n-l)), and | EP(n) | < | EP(n-l) | simply means that the situation between sampling points (n) and (n-1) is better than that between sampling points (n-1) and (n-2), and the actual or cunent power level P(n) is approaching the reference level
Pref at a faster pace. Apparently a smaller is prefened to avoid over-adjustment. The
opposite is true, i.e. if a situation occurs such that CP (n) > 1
CP (n -l )
sign(CP(n)) s sign(CP(n-l)) and | EP(n) | > | EP(n-l) | .
The selection of a in the above algorithm is often situation-dependent. From experiments, it appears α;=0.15 fits the tuning process very well. The initial values of Kf and Kv were found, by trial and enor, to be 0.86 and 120 respectively.
In the meantime, the input scaling factors Ke and Kc, for power enor and power enor change, were adjusted offline for different types of machines. This was accomplished by selecting appropriate scaling factors to normalize the inputs. In this case, the minimum actual power when the machine was idle at the lower spindle speed limit, which was set to 200 rpm, was recorded to be 0.50 HP. The power reference was set to 0.90 HP, and the maximum actual power was selected as 1.30 HP. Accordingly, the absolute value of the difference between the power reference Pref and each power limit, minimum and maximum, was 0.4. Therefore, the scaling factor, K,., for mapping EP(n) values into the interval of -1 and 1 of the universe of discourse was calculated as 2.5. Similarly for CP(n), when minimum actual power was 0.50 HP and maximum actual power was 1.30 HP, the absolute value of the difference was 0.8, hence K,. = 1.30.
Experimental Implementation
The performance of the control system described above was examined by implementing the adaptive fuzzy controller of Figures 3 and 4 with a Servo 2000 vertical CNC milling machine built by Servo Products Co. and using the machine to perform experiments on various workpieces with different cutter immersion rates. The microcontroller 44 was implemented using a Pentium personal computer equipped with an A/D converter and a D/A converter. A low-pass filter was also used, as an antialiasing filter, before the A/D converter. The spindle shaft was driven by a three-phase G3, 31-IP AC motor. The machine had a gear box which provided 2 speed systems, high and low. In the high gear the motor output power was transmitted to the spindle shaft directly from the spindle shaft hub, providing a range of spindle speed from 450 to 5, 100 RPM. In the low gear, the power from the spindle shaft hub was transmitted to the spindle shaft through a set of pulleys and gears. The spindle speed for the low gear ranged from 45 to 510 RPM. The machine had three sliding axes, with the X (table) and Y (cross) axes being driven by axis drive motors and lead screws, and Z axis being operated manually. The axis drive motors were 3-phase Variable Reluctance stepping motors with resolution of 84 primary steps per revolution. Power Sensor and Signal Processing
A PH-3A power sensor marketed by Loads Controls was used to measure the spindle power signals through three cables from the spindle motor passing through the cells. The power sensor had a full-scale power capacity of 10HP and a voltage output in the range of 0 to 10 volts, leading to sensitivity of 1 Volt/HP. The output signals from the power sensor were filtered by a 4-th order Butterworth low-pass filter with cut-off frequency of 100Hz to remove aliasing.
A/D, D/A Converter
The filtered signals from the power sensor were digitized by a 12 bit A/D converter, which was a part of an analog to digital and digital to analog converter PC card. The digital signals were the crisp inputs for the fuzzy logic controller. The outputs of the controller, spindle speed and feedrate, were routed through the D/A section of the converter and then to the feedrate drive controller and spindle speed controller box. The command feedrate, in the form of an overriding percentage of the full scale feedrate and
the command spindle speed in actual rpm were converted to analog voltage signals of 0 to 5V and 0 to 10V respectively by the 12 bit D/A converter.
The following fuzzy logic rules were stored in the fuzzy rule base 96:- The value ranges conesponding to power error (EP): NB = [-1.3333, -1.0000, -0.5000] NM = =[-1.0000, -0.5000, -0.3000] NS = [-0.5000, -0.3000, -0.0600] ZE = [-0.3000, 0.0000, 0.3000] PS = [0.0600, 0.3000, 0.5000] PM = [0.3000, 0.5000, 1.0000] PB = [0.5000, 1.0000, 1.3333]
The value ranges corresponding to power change (CP):
NB = [-1.3333, -1.0000, -0.6000]
NM = =[-1.0000, -0.6000, -0.3600]
NS = [-0.6000, -0.3600, -0.0600]
ZE = [-0.3600, 0.0000, 0.3600]
PS = [0.0600, 0.3600, 0.6000] PM = [0.3600, 0.6000, 1.0000]
PB = [0.60000, 1.0000, 1.3333]
The value ranges conesponding to feed rate:
NB = [-1.3333, -1.0000, -0.6300]
NM = =[-1.0000, -0.6300, -0.3000]
NS = [-0.6300, -0.3000, 0.0000]
ZE = [-0.3000, 0.0000, 0.3000]
PS = [0.0000, 0.3000, 0.6300] PM = [0.3000, 0.6300, 1.0000]
PB = [0.6300, 1.0000, 1.3333]
The value ranges conesponding to spindle speed:
NB = [-1.3333, -1.0000, -0.6300] NM = =[-1.0000, -0.6300, -0.3000] NS = [-0.6300, -0.3000, 0.0000] ZE = [-0.3000, 0.0000, 0.3000] 5 PS = [0.0000, 0.3000, 0.6300] PM = [0.3000, 0.6300, 1.0000] PB = [0.6300, 1.0000, 1.3333]
5. The reference power was 0.90 horsepower and the maximum and minimum 10 power limits are respectively 1.30 and 0.50 horsepower. The 1.30 hp conesponds to - 1.3333 and 0.50 hp conesponds to + 1.3333. The -1 and 1 of the universe of discourse are mapped as 1.20 and 0.60 hp respectively.
Accordingly, other values in the universe of discourse were calculated using the following equation
1 . 333
( P in) ■ zef ) = 3 . 33325 ( P (n) - P Λ
1 . 30 - 0 . 90
where X = the value in the universe of discourse, P(n) = actual spindle power (measured), P,,^ = maximum allowable spindle power (1.30 hp in our test), Pref = reference spindle power.
20 Programmed with these functions and rules, the machine described above was used with a High Speed Steel (HSS) 14.3 mm end milling cutter with four helical flutes and 30' helix angles to perform slot milling (i.e., full immersion) and 3/4 immersion milling on 1018 cold rolled steel workpieces. A sampling frequency of 200 samples per second was used in the cutting tests. The maximum and minimum feedrate commands
25 were set to 120 mm/min and 25 mm/min respectively. The upper spindle speed was set to 350 RPM and the lower limit was determined based on workpiece material and cutter specifications. The following relation was used to specify the lower limit of the spindle speed to avoid tool breakage:
— ≤ fn (Max)
where z is the number of cutter teeth, and fn(Max) is the maximum feed per tooth which is tool-workpiece dependent. This condition states that the feed/speed relation is restricted by the maximum allowable feed per tooth. According to a metal cutting handbook for 1018 cold rolled material and a high speed steel cutter, the value of fn(Max) was set to 0.08 mm/tooth.
The experiments showed that adjusting both spindle speed and feed rate resulted in a reduction of as much as 20-30 per cent in the cutting time, a compared with the cutting time when only feed rate was adjusted. It was also shown that the spindle power was well regulated around the reference level. Though no significant overshoots were observed in either case, dual-parameter adjustment showed a better transient performance when step changes in thickness were encountered.
It should be appreciated that, although the prefened embodiments of the various aspects of the invention detect one variable, i.e. power level at the drive means and use a control system which controls at least two variables of the drive means, the invention comprehends detecting power level and controlling only one variable; or detecting a single variable other than power level and controlling more variables than the or those detected. More specifically, the invention comprehends the use of a dynamometer to produce the signal representing force between the cutting tool and the workpiece, and using a fuzzy logic control system to control two or more variables of the drive means in dependence thereupon.
It should be appreciated that, although the foregoing description is of a complete machine, it would be possible to modify an existing machine to implement the invention. Thus, the invention also encompasses an assemblage or kit of items for converting an existing computer-numerically controlled machine, the assemblage or kit comprising a power sensor and software for reprogramming the microcontroller, or even an additional microcontroller, so as to implement the required functions. The invention also encompasses the software per se, conveniently carried by a storage medium, for use where the existing machine already has the required sensor, or the owner prefers to add one.
Although the above-described embodiment is a milling machine, the invention encompasses various other configurations. For example, a drill would have a rotatable cutting tool which was also linearly- movable relative to the carrier/workpiece. The carrier/ workpiece could be rotatable and the cutting tool holder moved linearly, as in a lathe; or both the carrier/workpiece and the cutting tool holder could be moved linearly, as in a shaping machine.
It is preferred to derive the signal representing energy consumption rate by measuring drive unit power level rather than supply current because power is linearly related to drive motor load, whereas supply cunent is related non-linearly. Nevertheless, it would be possible to measure supply cunent and derive energy consumption rate therefrom.
It is also envisaged that, where either the tool holder or the workpiece carrier rotates, the torque of the rotating part could be measured instead of the power and used as the parameter related to energy consumption rate. For example, in the embodiment of Figure 2, the power sensor 50 could be replaced by a torque sensor.
INDUSTRIAL APPLICABILITY
Computer numerically-controlled machine control systems embodying the present invention are robust, relatively inexpensive and do not require modifications to the machine structure, such as the machine table, or extensive mathematical modelling. The power sensor is not exposed to the harsh environment adjacent the cutting tool. Control of both spindle speed and feed rate reduces vibration and improves tool life. Embodiments are relatively insensitive to changes in the machine, cutting tool, workpiece and cutting tool immersion rate, and can be applied to material removal machines or cutting machines generally. Embodiments allowing multi-parameter adjustment, specifically adjustment of both spindle speed and feed rate, have been shown to increase material removal rates by as much as 25 per cent compared with machines employing single parameter, i.e. feed rate only, adjustment.