expert systems are suitable tools for gearbox development. ... are Visual Basic from Microsoft, Power Builder from Power Soft, and Delphi from .... it lets to select only corrosive resistant materials by using Structured Query ... (SQL) commands.
EXPERT SYSTEM DEVELOPMENT FOR SPUR GEAR DESIGN Necdet GEREN, University of Çukurova, Adana, Turkey M. Murat BAYSAL, University of Çukurova, Adana, Turkey ABSTRACT Expert systems have experienced tremendous growth and popularity since their commercial introduction in the early 1980’s. Today, expert systems are used in business, science, engineering, manufacturing, medical diagnosing, chemical, and many other fields. Mechanical engineers are the major users, expert systems, are finding rapid application in industry for such tasks as analysis of quality control data, assisting manufacturing personnel to safely operate machinery and accurately tune instruments. The design of gearbox requires good design decisions and design calculations, which are often interrelated with the various parameters. By using an expert system, which has various advantages, gearbox design will take less time and be easier. It will provide an important advantage in today’s competition conditions since it decreases human power and workday waste as well as cost. Hence an expert system has been developed for gearbox design in this study. 1. INTRODUCTION Design is a major activity of engineering. Engineering design problems (especially gearbox design) are often too large and complex for application of conventional software methods, but are suitable to application of certain expert system methods. Mechanical Engineering design decisions require not only a knowledge of engineering principles and understanding of design specifications, but also, experience with similar design activities. Expert systems provide a method for storage and organization of expert(s) expertise and experience. Expert systems have experienced tremendous growth and popularity since their commercial introduction in the early 1980’s. Today, expert systems are used in many fields from business to medical diagnosis [Akoumianakis and Stephanedis, 1997]. This is due to the attractive features of expert systems, which provide increased availability, fast response, reduced cost and reliability of expertise. In addition to these, permanency and steadiness of expertise, intelligent tutor and database features are obtained when expert systems used [Schur, 1988]. Expert systems for mechanical engineering design are finding applications in industry. As reported by Ulmann [1997], unfortunately the direct application of expert systems to the design process is proceeding more slowly. Gearbox design depends on some parameters (i.e.; shaft axis, size, standards, material, manufacturability, efficiency, constraints of gear, speed ratio, cost etc.). Aforementioned parameters also affect the choice of gear system and gear train arrangement. Hence the design of gearbox requires good design decisions and design calculations, which are often interrelated with the various parameters. Therefore, the expert systems are suitable tools for gearbox development. Much gear software has been written by experts in certain areas of gear design and manufacturing. Many of these experts have available software to perform very specialized tasks. Several software providers have packages that are useful for determining the best gear for a given application. These packages analyze load
distribution, bending strength, pitting resistance, thermal capacity, tribology or other factors affecting the potential life of individual gears or gear sets. Often, they are very specific and limited in scope. The aim of this study is to develop an expert system to design a gearbox. There are several types and variations of gearboxes based on the gear trains used, and choices to select a suitable one depends on several factors such as, transmitting power capacity, velocity ratio, speeds, noise and direction of the input-output axis. As it is known, each type of gear requires different set of formulas, calculations, procedures and constraints. At the same time, other components like; shaft, bearings, casing etc. in gearbox have to be designed or selected with respect to gear design, simultaneously. Briefly, the design of gearbox includes considering all types of gears and their related components. Therefore the expert system is designed as a main frame of a complete expert system for gearbox design. The current system is only capable of designing spur gears. In addition to that it has material selection unit, message dialogs, which are applicable to all types of gears. As the units are developed for helical, bevel and worm gears, they are going to be added to the system in near future. 2. SELECTION OF EXPERT SYSTEM DEVELOPMENT TOOL Since expert systems is a branch of Artificial Intelligence (AI), there are specialized languages for expert systems that are quite different from the conventional and also commonly used AI languages such as LISP, PROLOG and their modified ones. While many others have been developed, such as IPL-II, SAIL, CONNIVER, KRL, OPS5, KEE, ART, CLIPS, and Smalltalk, a few are widely used except for research. Object-oriented programming is known to improve programming productivity, increase software reuse, and reduce software maintenance costs. Rapid Application Developments (RAD) tools can be characterized as fourth generation languages (4GLs) with modern Graphical User Interfaces (GUIs) coupled with proprietary ObjectOriented Programming (OOP) and database access. Unlike abstract object-oriented programming concepts, RAD tools are more "component-centric". As a result, RAD tools have yielded more practical reuse of software than has been demonstrated by "pure" object-oriented programming languages, such as C++. The principal RAD tools are Visual Basic from Microsoft, Power Builder from Power Soft, and Delphi from Borland. RAD tools are able to supply all needed features to expert system developer. RAD tools are more "component-centric", unlike abstract object-oriented programming concepts. As a result, RAD tools have yielded more practical reuse of software than has been demonstrated by "pure" object-oriented programming languages, such as C++. Delphi meets in the same way that C++ other traditional OOP environments. Object Pascal is far more readable than C, C++, or Java [Thurrott et al, 1997]. However, it represents a colossal shift in the direction that visual tools have been headed since they first appeared. After the detailed analysis based on features of the tools, Delphi from Borland has been chosen as an expert system development tool for this study. 3. SPUR GEAR DESIGN (PROBLEM DOMAIN) The classification of gearbox types is usually on the basis of shaft orientation or speed ratio. Spur gearboxes, contain spur gears that have teeth cut parallel to the shaft axis and are only suitable for parallel shaft applications. Spur boxes may have single or
compound ratios but for each stage the speed reduction is limited to about 6:1. The highest peripheral speed of a spur gear is also limited, because of noise generation, to about 20 m/s. This limits the input rotational speed according to gear size [Hamilton, 1994, Shigley, 1986]. The American Gear Manufacturers Association (AGMA) recommendations as defined in standards are used in this study.
methods
and
Basic dimensions (such as addendum, dedendum, thickness etc.) are used for full depth teeth having pressure angles of 20° and 25°. The 20° pressure angle is most widely used and 25° pressure angle tooth is used mostly when a pinion with the least number of pinion teeth is desired. The 14½° teeth as well as stub teeth can also be obtained, but stub teeth have addendum shorter than standard. The standard addendum values in AGMA are for gears having tooth numbers equal to or greater than the minimum number of teeth for 20° and 25° pressure angles and for these numbers there will be no undercutting. For fewer numbers of teeth, a modification called the long and short addendum should be provided to the expert system in future studies. Number of Teeth of Pinion and Gear The minimum number of teeth of pinion is recommended, because of providing small gear size and decreasing row material and manufacturing process cost. The minimum number of teeth is given in Duddley [1992], according to pressure angle and manufacturing process. The Procedure for Estimating Gear Size In order to analyze a gear set to determine the reliability corresponding to specified life, or to determine the factor of safety guarding against the several kinds of failures, it is necessary to know the size of gears and materials of which they are made. In this section, a preliminary estimate of the size of gears required to carry a given load is concerned. The design approach presented here is based on the choice of face width in the range 3 pitch (p) ≤ F ≤ 5 pitch (p) . The size is obtained by using iteration, because both transmitted load and velocity depend, directly on the module. The computation procedure is to select a trial value for the module and then to make the following successive computations [Norton,1996, Drago,1992 and Hamrock et. al., 1999 ]: 1) The pitch diameter dp for pinion in mm is found from the below equation, where number of teeth (N) is estimated or given as minimum value and module is m. dp = m N
(1)
For the desired center distance (C), where VR is velocity ratio; dp =
2C 1 + VR
(2)
2) The pitch line velocity Vline in m/s is found from the below equation, Vline =
π ⋅ ni dp 60000
Where ni is pinion speed in rpm.
(3)
3) The transmitted load Wt in Newton is Wt =
P⋅ η Vline
where P is power in watt and η is mechanical efficiency.
(4)
4) The velocity factor (Kv) can be expressed for initial size calculation as, Kv =
6 6 + Vline
(5)
5) The face width F in mm based on permissible bending strength is found from the below equation, where σp is permissible bending stress, or surface stress, in MPa with respect to “Initial Size Criteria” (ISCriter). F=
Wt K v m Y σp
(6)
The face width F, based on surface fatigue strength is 2
C p Wt ,p F = SH K v d p I
(7)
Where Cp is the elastic coefficient in MPa , Wt,p is permissible tangential load and I as geometry factor for spur gears, and SH is the surface strength in MPa. The minimum and maximum face widths 3p and 5p are calculated, respectively, in mm When fatigue failure of the teeth is not a problem or when a quick estimate of gear size is needed for later use in a more detailed analysis, the bending stress (σb) is expressed as; σb =
Wt Kv FmJ
(8)
Where J is the geometry factor. Strength Calculations The stress formulas based on analysis are given here but these may be rearranged for design purposes. Gears that always rotate in the same direction are subjected to a tooth force that acts on the same side of the tooth. Thus the fatigue load is repeated but not reversed and so the tooth is said to be subjected to one-way bending. For one-way bending the mean and alternating stress components;
σa = σm =
σb 2
(9)
And from the modified Goodman Diagram; Sa Sm + =1 Sıe S ut
(10)
Now, Sa and Sm are equal and replace Sa with
σb ; and replace Sıe with 0.5 Sut. Solving 2
gives σb =
2 Sıe S ut = 1.33 Sıe 0.50 S ut + S ut
(11)
Bending fatigue strength can be calculated from the below formula, S e = k a k b k c k d k e k f ⋅ Se 0.5 Sut Se = 700 MPa
ı
where
(12) Sut ≤ 1400 MPa
ı
(13) where Sut ≥ 1400 MPa
Where Sut is ultimate tensile strength of a material used for gears, Seı is the endurance limit of the rotating beam specimen, and ka, kb, kc, kd, ke and kf are modification factors, which affects endurance limit of the gear teeth, are explained below. Where the kf = 1.33 for one-way bending, the factor of safety for gear due to bending stress is nG =
Se σb
for bending.
(14)
The surface stress ( σ H ) formula based on analysis is, Wt σH = Cp C Fd I p v
(15)
where Cp is the elastic coefficient and the geometry factor I for spur gears is, I=
cos φ sin φ VR 2 VR + 1
(16)
The surface fatigue strength (Sc) for steels is determined by using tables given by AGMA and AGMA formulas [Norton, 1996]. For AGMA Grade 1 steels, Sc is SC = (26000 + 327 HB ) × 6.895 ⋅ 10 − 3 MPa
(17)
for AGMA Grade 2 steels, Sc is
(18) −3
SC = (27000 + 364 HB ) × 6.895 ⋅ 10 MPa Where HB is the Brinell hardness of the softer of the two contacting surfaces. SH =
CL CH SC CT CR
(19)
Here; SH = corrected fatigue strength, or hertezian strength CL = life factor CH = hardness-ratio factor; use 1.0 for spur gears CT = temperature factor; use 1.0 for temperature less than 120° CR = reliability factor The factor of safety for gears, (nG), based on surface stress can be expressed as; nG =
SH σH
(20)
The overall factor of safety (n), can be calculated from nG = Ko Km n
(21)
In this formula, n represents the desired factor of safety and Ko is the application (overload correction) factor and Km is the load distribution factor. The values of these factors are suggested by AGMA. 4. DEVELOPMENT OF THE EXPERT SYSTEM Building of Expert System The first step in the evaluation of Expert System is identification and definition of the problem. The problem is gearbox design. The goals are: -
Design spur gears according to AGMA recommendations Provide a user friendly interface, to give advices and choices for gear type selection, material selection, determination of conditions Supply calculation probabilities according to different criteria, like: center distance, minimum number of pinion teeth etc. Easy data entering and knowledge inputs in visual form Supply explanations for each process, choices and results in all parts
The next step of the Development of the Prototype Expert System; entails finding the basic concepts which represent knowledge via key metarules, relations, and identifying the flow of information needed to describe the problem solving process
Knowledge Base The knowledge base of an expert system houses the information used by expert system in pursuit of solution to a problem. The knowledge base must be sufficiently powerful to represent data characteristics and the relationship in an easily accessible format. For this reason, database tables are made in Paradox 7, which can be used by the Delphi’s database engine, Borland Database Engine (BDBE), or used as part of the Delphi. At the same time knowledge is organized in relationships. For example, in the environment conditions form, if the corrosive choice is selected, then the material table is shown and it lets to select only corrosive resistant materials by using Structured Query Language (SQL) commands. Knowledge base of this expert system can also be expanded by adding new materials into “OthMat” material database table. The other features of knowledge base are explained in programming section. Inference Engine The inference engine combines data from the system knowledge base with data provided by the user in an attempt to generate solutions to user problems [Giarratano and Riley, 1989]. This is the component that performs the actual processing and control function during the problem solving process. For inference engine function, object Pascal and SQL commands are used together as the example in above section. Specialized search and data combination techniques are incorporated into inference engines in order to guide the inference process in desired direction and limit the search space. User Interface The one of the basic features of the expert system is being user friendly. So the user interface is so important for the expert system. The expert system for gearbox design is to be formed by visual forms, which can be seen on screen as windows. By using this feature of Delphi, a form (or window) is built for each step of design like, main, input, gear type, material, criteria, conditions, message, stage number calculation and other help forms. Therefore, each step of design and each component of the program are explained to user by the expert system explanation facility, which also has mouse right button click menu (Popup menu). Addition to this, when user must select one of the multi choices, expert system explains the choices and gives recommendations and suggestions to select suitable one. If user selects a wrong or unsuitable choice, expert system warns him by giving explanations for the fault made and also provides recommendations. For example, in the Input Form, user states shaft axes as parallel, but then selects straight bevel gear for which the shaft axes are perpendicular for this type from “Gear Type List” in the “Gear Type Form”. Expert system warns that this is not suitable for parallel shaft axes and gives recommendations to select parallel shaft axes for gear type listed in “Gear Type List” or directs the user to the “Start” and change the shaft axes in the input form. Architecture of Expert System Program for Spur Gear Design By the feature of Delphi, expert system program is built with forms, which are shown in Table 1, and units as subprograms. Firstly, the flow charts of the gear design are generated from the theory given in the section of initial gear size estimation procedure then, visual program is developed as well as database orientation. The developed forms and their functions are given briefly in Table 1.
Table 1. Gear Design Expert System Forms and Their Functions Forms
Function
Main Form
Organize the gear design expert system and let the user design a gear or use it partly as a part of design tool like, gear type selection or new material adding.
Input Form
Calculates the initial parameters (as, power, VR, speed etc) according to known and desired ones and gives shaft axis choices as constraint.
Gear Type Form
Suitable gear types, for previously entered input parameters, are listed and suitable gear types are allowed to be selected by the user. During selection process, limitations in power capacity and velocity ratios are considered by the user.
Stage Form
Calculates the number of stages and VR values along with velocity ratio and power capacity limitations for each gear type (for the present, the above is considered only for spur and helical gears)
Material Form
Allows the user to select a material according to environment conditions or enter and use a new material and its properties (only for registered users)
Criteria Form
Makes initial size calculations with respect to the selected criteria (like, center distance, minimum number of teeth and minimum size), by using selected module from module list or probabilities of modules in which face width is in the range of 3p ≤ F ≤ 5p
Conditions Form
By stating the operational conditions, analysis and synthesis of the design can be done according to the factor of safety and material properties. If results are not suitable, message form appears.
Message Form
When an error or warning occurs, this form appears on screen and gives explanation and/or recommendations in relation to the error or warning made and also directs the user to the related forms.
By the features of Delphi, visual programming language, entering of data, following of design, viewing of local results, queries, errors, warnings or information with recommendations and explanations are supplied by using of the visual components of Delphi. For example, selection of choices or probabilities can be supplied to user by combo box, list box, radio button/group or check box button etc. Expert System Main Program The flow chart of the main program (Figure 1) shows the relationships of subprograms (units), which constitute the whole program. Although, most of the program (design) flow probabilities are shown, there are some more probabilities, which are not shown, because of the complexity of expert system. Material Selection Unit Material selection is one of the most complex part of the program. The “Material Selection Unit” (shown in Figure 2) makes the user to select a material according to environment conditions and power capacity. In addition to these it also lets enter a new material and its properties in to the system. This feature is only valid for authorized users.
START Main Form lets get a new or old design or run any part of program independently Input Form Set the input requirements (P,n,T,VR and axis) and make pre-calcultions GearType Form Specification of gear type (GT)
No
isGT OK?
Yes Material Form Selection of material according to environmental conditions and strength AddMod Form Imp Form -Specification of calculation criteria -Initial size calculations -settting choices -Select and accept the one of choices
FOS Form -Specifying working, mounting conditions and, Reliability and Life factor. -Strength calculations for FOSg analaysis and synthesis. Results Form -Display all resultson screen or print out, -save results in QReport END
Addendum Modification calculations recommendations and queries
Message Form Displays errors and gives recommendations
Figure 1. Flow Chart of Main Expert System Program The “Material Selection Form” is related with “New Material Form”, “Condition Form” and “Criteria Form” and also has subroutines. Application selection subroutine assists the user to select the nearest application from combo box of Qv and also to determine the quality factor (Qv), which affects the velocity factor. Designation of the “Conditions Subroutine” is used to specify conditions like, corrosion, noise etc. by selecting them on the main “Material Form”. In the material database selection subroutine, the user selects the original or additional material database, or the new material addition form.
designation of conditions
F1
C1
MATERIAL INFERENCE ENGINE
Application selection
Material Database selection
calculate matQ
building SQL queries for limiting choices of materials
show suitable materials and their properies
No
Is there any suitable material Yes select material
RETURN
Figure 2. Flow Chart of the “Material Main Form”
SQL queries, which are prepared by the selection of conditions check boxes, allows to show and select only suitable materials on screen. New Material Unit When authorized user wants to use a material out of databases, the user can input new material properties by using “New Material Form”. The new material can also be added to the “OthMat Database”, but with master permission.
5. RESULTS AND DISCUSSION The gear expert program, developed in this study has 12 major forms (windows). These main forms have also 36 varied views.
(a)
(b)
(c)
(d) Figure 3. View of Some of the Input Forms The “Main Form” is beginning form (window) of the program. It allows starting a new gear design project. This form also contains information about the program. The “Input Form” helps the user to enter input parameters properly (see Figure 3-a).
The “Gear Type Form” shows recommended and commonly used gear types with a brief explanation and figures. Although the gear type can be selected from the “Suitable Gear Types List Box” as can be seen from the Figure 3-b, it can also be selected from the “Combo Box of Commonly Used Gear Types”. When an unsuitable gear type is selected, the user is warned and directed to select suitable gear type by a message form The “Gear Type Form” shows recommended and commonly used gear types with a brief explanation and figures. Although the gear type can be selected from the “Suitable Gear Types List Box” as can be seen from the Figure 3-b, it can also be selected from the “Combo Box of Commonly Used Gear Types”. When an unsuitable gear type is selected, the user is warned and directed to select suitable gear type by a message form. All the gear materials are kept in the permanent material database table (Figure 3-c and 3-d). Only suitable materials for desired environment conditions can be seen and selected from the permanent material database table when environment conditions check boxes is selected by the user. The unsuitable materials get invisible. In addition, the system only permits the authorised user to enter a new material. When a value of desired features of material is not entered or unacceptable value is entered, the user is warned for correction. The expert system provides alternative design routes either to design a gear based on center distance or minimum number of teeth. For a desired center distance, module size can be selected from “Recommended Module Size List Box”, which is the result of estimating gear size procedure for all standard module sizes. The module size from the combo box of “Standard Module” in the “Criteria Form” can also be selected as shown in Figure 4-a. In this form, the gear size parameters are shown when a module size is selected. This also gives an opinion to the user. When the pressure angle is designated in this form, the program automatically defines and states the minimum number of pinion teeth. The pressure angle probabilities also have explanations and recommendations. When a minimum number of pinion teeth criteria is selected from the “Criteria Form”, module size can also be selected from “Recommended Module Size List Box”, which are the results of estimating gear size procedure for all standard module sizes (see Figure 4-a). The “Standard Module Combo Box” can also be used for the selection of module size. Durability of gear teeth is controlled when the operating condition choices and desired factor of safety in the “ Operating Conditions and Durability Form” has been chosen by the designer. The desired factor of safety is entered by an edit box and operating conditions are stated by selection radio buttons as can be seen from Figure 4-d. This feature of expert system provides ease of use of the developed system. The user can also identify the factor of safety and overall factor of safety when the “Calculate FOS of Gear” radio button has been chosen. When pressing the calculate button, then the system automatically calculates bending stress and strength, surface stress and strength, factor of safety and presents the results in the same form. When the design is not acceptable, the “Message Form” appears. Then the program gives suggestions according to type of error with a reason for error (Figure 4-b and c).
(a)
(b)
(c)
(d) Figure 4. Some Views of the Output Forms . Only limited numbers of forms are presented here due to the space limitations
The developed expert system program has been run for various design parameter values and alternatives in order to control and check of the operations of program. The results of the program are also compared with manual calculations and it has been seen that the developed program operates successfully 6. CONCLUSION This study has been concentrated on an expert system development for only spur gearboxes. However, the expert system is designed as a main frame of a complete expert system for gearbox design so other units for available gear types are going to be prepared and fitted to complete the development in near future. The choices to select a suitable gearbox depends on several factors such as, transmitting power capacity, velocity ratio, speeds, noise and direction of the input-output axis. Different set of formulas, calculations, procedures and constraints given by American Gear Manufacturers Association (AGMA) are used for each type of gear in the developed expert system program for spur gear design. In the program, basic dimensions (such as addendum, dedendum, thickness etc.) are used for full depth teeth having pressure angles of 20° and 25°. The developed expert system for gearbox design consists of 12 forms (windows), and 36 different views of all these forms. Also, there are so many different warning, error and information message dialogue boxes to make the program be user friendly. The expert system program has been tested for numerous situations for gearbox design and found very helpful to the designer. As a result of the tests, the following points may be made for the developed expert system program. The system; •
decreases the design duration to 2 minutes for experienced designer and drastically reduces the duration for inexperienced designer to few minutes.
•
allows the user to try different design alternatives in a short time.
•
eliminates the errors made during the manual design process (as, incorrect data reading from tables or figures and inaccurate calculations).
•
provides alternative design routes either to design for center distance and minimum number of pinion teeth.
•
supplies choices and alternatives in different stages of design process to the user with recommendations and explanations.
•
warns and directs the user to go on proper design, when the user select inappropriate alternative with respect to previously entered data and calculations.
•
has an expandable database (the user can add new material features).
•
behaves as a tutorial.
• reduces the design cost for each gearbox. On the other hand, the manual design time depends on expertise level of the design engineer, and varies from hours to weeks due to the vast number of selections and decisions, which are made during the design stage to continue the design.
Future Studies Although the expert system program at this stage is quite useful for gearbox designers to design a spur gear, it can be improved for the material selection process and for more efficient expertise. The expert system program can also be improved by adding •
an addendum modification feature for long and short addendum for fewer numbers of teeth
•
helical, bevel, worm and planetary gears.
•
an interface between Delphi and computer aided drawing program such as AutoCAD to draw the technical drawings, which are ready to manufacture with tolerances and surface roughness values.
•
a feature that three dimensional (3D) models of gears in mesh can be viewed and the gear parameters can be transferred to solid modeling package programs.
REFERENCES 1. Akoumianakis, D. and Stephanidis, C. (1997), “Knowledge-Based Support for User Adapted Interaction Design”, Expert Systems with Applications, Vol.12, No.2, pp 225245. 2. Cantú, M. (1988), Delphi3 Uygulama Geliştirme Kılavuzu, Alfa, İstanbul. 3. Barengi, R. (1998), Ruhver Barengi ile Delphi 3’e Bakış, Seçkin Yayınevi, Ankara. 4. Drago, R. J. (1992), “Gear Types and Nomenclature” (D. P. Townsend, editor). Duddley’s Gear Handbook, Second Edition, McGraw Hill Inc., New York, pp 2.1- 2.19. 5. Duddley, W.D. (1992). “Gear Tooth Design”, (D. P. TOWNSEND, editor), Duddley’s Gear Handbook, Second Edition, McGraw Hill Inc., New York, pp 4.1- 4.93. 6. Giarratano, J. and Riley, G. (1989), Expert Systems: Principles and Programming, PWS-KENT Publishing Co., Boston. 7. Hamilton, P. (1994), Gearboxes (K. Hurst, editor). Rotary Power Transmission Design, McGraw Hill,, London, pp 34-42. 8. Hamrock, B., Sacobson, B., and Schmid, S. R. (1999). Fundamentals of Machine Elements, McGraw Hill, Singapore. 9. Norton, N.L. (1996), Machine Design An Integrated Approach, Prentice Hall, USA. 10. Shigley, J. E. (1986) Mechanical Engineering Design, McGraw Hill, New York. 11. Ullman, D. G. (1997), The Mechanical Design Process, McGraw Hill, New York.