EngngApplic.Aru'f.lnteU.Vol.4, No. 5, pp. 351-358,1991 Printed in Great Britain. All rights reserved
0952-1976/91$3.00+0.00 Copyright~) 1991PergamonPressplc
Contributed Paper
A Knowledge-Based Design Model for Mechanical Components D A R I N S. M O T Z Purdue University, W. Lafayette KAMYAR HAGHIGHI Purdue University, W. Lafayette
A model of the design process for mechanical components is presented. The proposed model uses modular knowledge bases and a hierarchical control structure. The modular structure makes it easy to update the knowledge bases with new knowledge. The modular structure also allows for painless integration of external software into the design expert system. An expert system implementation of the model, XPRING, has been developed. XPRING's design domain includes helical compression, extension, and torsion springs. XPRING incorporates computer graphics, finite element analysis, and design optimization into its design knowledge base to form a comprehensive mechanical design expert system. Keywords: Expert systems, finite element analysis, springs, optimization, mechanical computer aided engineering.
INTRODUCTION The requirements for quality, productivity and cost efficiency are at a level where the design of a product needs to be optimized at the earliest stages of conception. The possibilities for trial and error in the design process have to be eliminated for an industry to remain competitive in a global market. Incorporation of new and improved knowledge and technology will enhance the competitiveness of industry in the international market place. In this connection, there is tremendous interest in developing a unified, systematic and computerized methodology for engineering design by using finite element analysis/optimization techniques and artificial intelligence/expert systems concepts. There are several potential payoffs: reduced design cost and cycle time, the ability to rapidly consider a wider range of design alternatives, improved product quality and increased engineering productivity. With the rapid developments in computer engineering, both the areas of finite element methods and expert systems have now matured to a stage where they are being used successfully for real-life industrial design problems. Further, these technologies are considered to be of critical Correspondence should be sent to: K. Haghighi, Department of Agricultural Engineering, Purdue University, W. Lafayette, IN 47907, U.S.A.
significance in developing a design methodology for the future. A multidisciplinary, integrated approach of developing a comprehensive design expert system which carries out design analysis and incorporates all aspects of the design into an integrated system is a step toward efficient and automated design. Mechanical Computer Aided Engineering (MCAE) tools have been and continue to be developed to assist the designer in the various stages of the design process, using Computer-Aided Design (CAD), solid modelers, Finite Element Analysis (FEA), and optimization codes. These tools have been used individually for many years; however, an integration of these tools is lacking. With advancements in the field of artificial intelligence, research today is being done to incorporate these MCAE tools into an intelligent, integrated design environment. Figure 1 shows a schematic diagram of an advanced MCAE design environment which is proposed for this research. The proposed system incorporates a CAD module, a failure and fatigue analysis module, a design optimization module, and a FEA module, which will interact through a design expert system to achieve design objectives based on prespecified constraints. Communication between the end user and the expert system will be via a graphical user interface.
351
352
DARIN S. MOTZ and KAMYAR HAGHIGHI: MECHANICAL COMPONENTS
[•
Knowledge base
Design expert system
[~
"~
Failure and fatigue~ analysis [
I
C
I
Finite element analysis
Optimization
"~
Fig. 1. Schematic diagram of the proposed integrated approach to knowledge-baseddesign.
BACKGROUND
OBJECTIVES The objective of this research was to study the design process and develop a design model which can be implemented in an integrated knowledge-based design environment. Efforts were focused on development and implementation of the design model in an expert system which incorporates computer graphics, F E A , fatigue and failure analysis, and optimization for the design and selection of mechanical springs. This work was undertaken to develop the concept of the integrated design system into a working prototype. A complete implementation of the system was not within the scope of this work and is the goal of future work.
Design is a complex human activity not well understood. Design is inherently an iterative process of seeking an acceptable solution to a set of requirements. 1-3 There are probably as many ways to model the design process as there are model builders. Two models which seem to be at the forefront are the transformational and abstract refinement models. 2 The transformational model converts a specification into an implementation via a sequence of correctnesspreserving transformations from one complete description to another. One transformation may operate on one or more components of a design at once. Although
User interface Main desi in controller
#3 I
#1
I design Component #2 ] controller
Component design controller
#1
J Component ~2 J design moduli
Component design
Component design controller
Component design moduli
I #'3 moduli [I •
Fig. 2. General control structure of the proposed design model.
DARIN S. MOTZ and KAMYARHAGHIGHI:MECHANICALCOMPONENTS a general model, the transformational model can be very complex to implement. Abstract refinement attempts to break the component to be designed into a collection of subcomponents. Systems based on abstract refinement generally use constraint propagation to ensure consistency between subcomponents. During the course of any design work, considerable time is usually spent on redesigning some components to meet a new or changing requirement. Dixon and Simmons2,4 modeled design as a continuing process of "design-evaluate-redesign". They implemented their model in an expert system for the design of standard vbelt drives. Kalay et al) developed and implemented a design model in which control of the design process could be shifted from the user to the computer as the user wished. Mayer and Lu 6 included multiple knowledge sources in their model of the design process. They used a blackboard-type approach and included the user as a knowledge source. Blackboard-type expert systems are described fully in Refs 7-9. Although great gains have been made in understanding and modeling the design process, much work remains to be done before expert systems receive widespread acceptance among design engineers. For engineers to meet the challenges of future competition they must incorporate advanced methods and concepts such as FEA and optimization into their designs as early in the design process as possible. Many FEA and optimization programs are difficult for the infrequent user and novice to use effectively. Expert systems can provide a valuable tool for design engineers in the future. Not only can expert systems represent vast amounts of design knowledge gathered through years of experience by engineering design experts, they can also contain the knowledge required to effectively use FEA and optimization codes. Combining these different types of knowledge in a single, easy-to-use system is an important step in automating the design process.
353
DESIGN MODEL The design model proposed in this work was arrived at by considering the design process as the simplification of a large complex task into smaller, more-manageable problems. In real life these smaller problems are solved individually by one person or simultaneously by several design teams working semi-independently. In the latter case, one person is usually responsible for the entire design project and each group has one person responsible for the group's actions. The design team approach leads to a hierarchical structure of responsibility with the most responsibility resting at the top. The model proposed in this work is based on a hierarchical system of control and responsibility. A modular structure allows separation of the control structures and the design knowledge. The control structure is divided into two levels, where top-level control rests with a main control module, while control of individual design modules is handled by morespecialized component design controllers. Figure 2 illustrates the relationship between the main control, component control, and design modules. The design model is not limited to three components, as any number of components can be included in an expert system based on this model. A graphical user interface developed for this work is shown encompassing the control and design modules. All communication with the user is via a graphical interface. Use of a common interface for all modules makes the system easier to use because the end user has to become familiar with only one interface. At the start of a design session, the main control module handles all initial communication with the user. At this time the design problem is outlined (type of component, application, etc.). The main control module is responsible for decomposing the design problem into smaller subproblems which can be solved by
User interface I I
User input (problem definition)
J
Design optimization
Component #:I design control module
J Design equation solver Fig. 3. Subcomponentdesigncontrol modulewith knowledgesources.
Finite element analysis
J
Constraint violation
I
Design evaluation
J
354
DARIN S. MOTZ and KAMYAR HAGHIGHI: MECHANICAL COMPONENTS
J User input I~
Yes
D
No 9
¢o
a.
Solve design equations
Re-execute design plan
initial
Additional
plans
Run simulation
values
No
I I
Yes
~
=
System recommended design v a r i a b l e changes
1
User specified variab e c h a n g e s
Yes
I
Design complete J
I
I Fig. 4. Flow diagram for the proposed design model.
the individual design modules. Initial design specifications are defined in the main control module and communicated to individual component design controllers. Component design controllers pass the design specifications received from the main controller to specific design knowledge modules under its control. Figure 3 illustrates a possible relationship between a component controller and its design knowledge modules. In the figure, component No. 1 control module is shown linked to several modules. The controller is responsible for determining when a design module can contribute
to the solution. One design module is active at any one time. Upon completion of its task, a design module notifies the controller it has finished, and the controller will deactivate the design module and determines which module to execute next. Design knowledge modules contain the means to solve a specific problem or subproblem. They receive design specifications from the control modules and return results based on the type of knowledge contained therein. The modules shown in Fig. 3 demonstrate the flexibility of the modular structure. These modules can contain design equations, tables of mat-
DARIN S. MOTZ and KAMYAR HAGHIGHI: MECHANICAL COMPONENTS
355
!!1!!!!!!!!!!!/!!1
What type of spring do you want to design? Single selection only
Compression Extension Torsion
Fig. 5. XPRING menu for user specification of spring type.
erial properties, links to external programs such as FEA, optimization, external data bases, etc. Each module operates individually, and no direct communication exists between modules. The control module monitors the state of the design problem, passes information from module to module, and determines when each module will contribute to the solution. If additional information is needed by the design modules, the component control module will attempt to locate the information in a knowledge source under its control. If the information cannot be located within its knowledge sources, the user will be asked to provide the information. The user is regarded as the final knowledge source. Only the control modules, main and component, have access to the user through the user interface. The design process is illustrated in Fig. 4. The process begins with a dialogue between the user and the main control module. Input from the user is tested for plausibility. Plausibility does not necessarily mean that a feasible design will be reached, it merely means that the input is geometrically correct (e.g., the user did not specify the inside diameter of a hole larger than the outside diameter). Once the input has been verified, the component control module will select a design plan based on the known information. A design plan is a
series of steps which will either lead to a solution or add information to that which is already known. After the completion of a design plan, the component controller compares the current state of the design with what it knows is required for a completed design, and if information is lacking the controller will select another design plan to continue the design process. This cycle continues until the design problem is completed. Once a design has been completed it is checked for violations of user-defined and implied constraints. Implied constraints are those which are inherent to the design problem, such as geometric relationships, spatial relationships and functional relationships. Design modules must also contain the knowledge necessary to handle constraint violations. Knowledge included in a design module should try alternatives to the current design in order to satisfy the specified design constraints. Information from failed designs is retained by the design control module while it is searching for a feasible design, as past information is particularly useful when identifying design specifications which cannot be met. In the case when a design is not possible the design module notifies its control module of the failure. At this point the controller examines the constraint violations and recommends a course of action. The user
356
DARIN S. MOTZ and KAMYARHAGHIGHI:MECHANICALCOMPONENTS I XPRING
Press , . or "+" to advance cursor Press "-" to return cursor to previous item HELICAL COMPRESSION SPRINGS (enter only those specifications necessary)
1I ~~?~::::: •
Maximum outside diameter ~ Minimum inside diameter Mean coil diameter ~ Maximum solid height ~
Load 1: Load 2: Spring rate Spring rate from
+
( l b . ) at (tb.) at 1b/in. in, to
in. in• in. in. (in.) length 1 (in.) length 2
in.
Factor of safety, @ solid (> 1.0): Factor of safety, fatigue (> 1•0):
-Maximum outside diameter-
Enter the required specifications in the appropriate blanks in the window to the right. If you do not wish to enter a value for one of the specifications, leave it blank. YOU DO NOT HAVE TO ENTER A NUMBER FOR EVERY ITEM
Type of spring ends: ~ Squared and ground Material: ~ Music wire
ii!ii: TM
For STATIC designs you MUST specify: at least one load/length pair factor of safety, static For FATIGUE designs you MUST specify: both load/length pairs factor of safety, static AND fatigue To change the END TYPE and the MATERIAL TYPE: click the left mouse button over the circled arrows OR hold down the right mouse button and highlight the desired selection•
!i:
Click the left mouse button over "Done" to begin when finished
Fig. 6. XPRINGsgraphicalinterfacefor user input in compressionspring design. has the options of altering the constraints, or redefining the problem. Upon completion of the design process, the results are presented to the user in a tabular format through the graphical interface. At this point, the user is free to alter the design inputs and try new alternatives, start the design all over with a new set of inputs, select a new design problem to work on, or quit the system. The user also has the option of obtaining hardcopy of a detailed analysis of the design determined by the expert system. MODEL IMPLEMENTATION The design model described above was implemented in an expert system called XPRING ©.~° XPRING is a knowledge-based expert system for the design and selection of helical compression, extension, and torsion springs. XPRING was developed on a Sun Microsystems SPARCstationa'M* and is written using a combination of CLIPSTM and the C programming language. CLIPS is a rule-based pattern-matching expert system language that uses a forward-chaining inference engine. An advantage of the CLIPS environment is the ease in which external programs can be linked to the * U s e of commercial product n a m e s and trademarks does not imply approval or r e c o m m e n d a t i o n by the authors or Purdue University.
expert system. XPRING's graphical interface was developed with the SunViewTM windowing package. A design session with XPRING begins with the main controller asking the user to select the type of spring to be designed, illustrated in Fig. 5, and the type of load application from a menu. The component design controller for the spring type selected by the user is then activated to continue the design process. The user further defines the problem by responding to simple menu questions and by entering specifications in a fillout form. Figure 6 shows a fill-out form for compression springs. A graphical prompt is associated with nearly all items on the form to minimize confusion when asking for dimensions. The level of input is flexible, and the user is not required to specify a value for all the blanks in the fill-out form. If insufficient information is supplied, XPRING will tell the user what additional information is required; for instance, XPRING is capable of solving a design problem where the user specifies only two applied loads at two spring lengths. Once the design problem is fully defined, the user input module linked to the compression design controller tests the input for errors. Provided the input is error free, the compression design controller executes the design plan (or plans, depending on the input provided by the user) contained in its knowledge base. Upon reaching a satisfactory design, a design module in
Press , or "+" IS advance cursor Press *-" to return cursor to previous ilem
HELICAL COMPRESSION SPRINGS (enter only those specifications necessary)
I
;ompression spring designs I ~
Metlrtcl: Hire drawn / S p r i n g rite: 75.000 I bf.lin. F | F r e c length: 3.000 in, F~ Spring preset: no |
Design no.
Outside diameter
Active coils
Wire diameter
Solid height
1.5442
0.192
10,535
2.4068
1.5418
3
2.0739
0.218
6.773
1.9125
1.9092
4
2.7429
0.250
4.8334
1.7083
2.6270
I
I
sight
Spring index
7.0420
::emt::cr--
tOI
J
Volume
2
:
II II [ ]
Ill
8.5132 J
3:5+
I
-
~
-
in. in. in. In.
(tb.) I t (lb.) at 3.2 1b/in. in, to y, ill solid (> 1.0): 1.1 y, fatigue (> 1.0):
Meteriah ~
nds: ~ Squared and ground Hard draw wire
The expert system recommends design number 2
Is the selected spring okay Or would you like to change the selection?
Single selection only I~
Accept Change
Fig. 7. Table of feasible spring designs determined by XPRING.
E F
F
ANSY8 4.4 Univ version Jun 22 1990 22:32:06 POSt 1 Stress Step - 1 Itcr - 1 SXZ (AVG) S global DMX - 0,100509 SMN - -84551 SMX - 05567
XV -1 Diet - 0,450052 YF --0.345832 ZF -0.203088 ANGZ - - 9 0 Precise hidden A --75204 S --56289 C --37375 D --18451 E -+53.244 F -19367 G -38292 H -57196 I -76110
F F
Compression spring analysis
{P, ot ,,.pi . . . . . . t)
tXZ
)lne,SMZ Produce stress plot. label - $XZ POST I - INP-
KAYG - 0
Fig. 8. Stress contours obtained from ANSYS via link with XPRING. 357
(in,) length t (in.) length 2 in.
358
DARIN S. MOTZ and KAMYAR HAGHIGHI: MECHANICAL COMPONENTS
X P R I N G will attempt to find other satisfactory designs by making small alterations to the design variables. W h e n X P R I N G determines it has exhausted the feasible design space, the control module will activate an evaluation module. The evaluation module rates each of the feasible designs. All feasible designs are tabulated and presented to the user with a recommendation of the highest rated design (see Fig. 7). The user is free to accept the r e c o m m e n d e d design or select another from the list. Dimensions of the selected spring can be used to perform finite element analysis ( F E A ) and optimization of the design if the user desires. F E A is accomplished by a link between X P R I N G and the A N S Y S m * finite element program. The user interface provides the user with easy access to displacement and stress contour plots (Fig. 8) for further evaluation of the design. X P R I N G has been successfully tested on numerous test problems and has been used as an instructional tool in a machine design class. Complete verification results can be found in Ref. 11.
SUMMARY AND CONCLUSIONS A model of the design process is proposed for the d e v e l o p m e n t of machine design expert systems; this contains design knowledge as well as the knowledge required to p e r f o r m F E A , design optimization, and fatigue and failure analysis. The model simplifies an often-complex design problem into smaller, morediscrete design problems through abstract refinement. These discrete problems are then solved by independent design modules. The modules comprising the design system are hierarchically organized, with the most complex parts at the top and the simplest components at the b o t t o m of the hierarchy. Design specifications are passed down the hierarchy through control modules. Design modules receive design specifications from a c o m p o n e n t design controller and return results, or failure information, back up the hierarchy. The model has been successful in combining the
* ANSYS is the trade mark of Swanson Analysis Systems, Inc. and reference here does not imply approval or recommendation by the authors or Purdue University.
design knowledge required to reach an initial solution with the knowledge needed to p e r f o r m the moreadvanced tasks of F E A and design opimtization. Combining these two types of knowledge in one complete expert system will allow design engineers to spend m o r e time being creative and trying alternative designs, and less time on the analytic part of the design process. The proposed design model was implemented in X P R I N G , a knowledge-based expert system for the design of mechanical springs. X P R I N G has p e r f o r m e d well on m a n y trial problems and has been successfully used as an instructional aid in a machine design class. Due to the modular structure, the model shows great potential for expansion to include additional machine components.
REFERENCES 1. Dixon J. R. and Simmons M. K. Computers that design: expert systems for mechanical engineers. Comput. Mech. Engng 2, (3), 10-18 (1983). 2. Mostow J. Toward better models of the design process. A1 Mag. 6, (5), 44-57 (1985). 3. Dixon J. R. Artificial intelligence and design: a mechanical engineering view. Proc. of 5th National Conf. on A.L, Los Altos, pp. 872-877 (1986). 4. Dixon J. R. and Simmons M. K. Expert systems for engineering design: standard v-belt drive design as an example of the designevaluate-redesign architecture. Proc. Int. Computers in Engineering Conf., Las Vegas, Nevada, pp. 332-337 (1984). 5. Kalay Y. E., Swerdloff L. M. and Harfmann A. C. A knowledge-based computable model of design. In Expert Systems in Computer-Aided Design (Gero, J. S., Ed.) Proceedings of the IFIP WG 5.2 Working Conference on Expert Systems in Computer-Aided Design, pp. 203-223. Elsevier, New York (1987). 6. Mayer A. K. and Lu S. C.-Y. An AI-based approach for the integration of multiple sources of knowledge to aid engineering design. J. Mech. Transm. Autom. Design, Trans. ASME 110, 316-323 (1988). 7. Nii H. P. Blackboard systems: The blackboard model of problem solving and the evolution of blackboard architectures. A1 Mag. 7, (3), 38-53 (1986). 8. Nii H. P. Blackboard systems: Blackboard application systems, blackboard systems from a knowledge engineering perspective. AI Mag. 7, (2), 82-106 (1986). 9. Engel B. A., Beasley D. B. and Barrett J. R. A procedure for handling multiple experts. Paper No. 87-5535. American Society of Agricultural Engineers, St Joseph, Michigan (1987). 10. XPRING: An integrated expert system for design and selection of mechanical springs. Copyright no. C91003, Purdue University, W. Laf., IN (1990). 11. Motz D. S. An integrated approach to knowledge-aided design and optimization of mechanical springs. MSc Thesis, Purdue University (1990).