Using expert system tools and techniques in computer-aided design — An electrical switchboard design example

Using expert system tools and techniques in computer-aided design — An electrical switchboard design example

Journal of Mechanical Working Technology, 17 (1988) 73 - 82 Elsevier Science Publishers B.V., Amsterdam - Printed inThe Netherlands USING EXPERTSYSTE...

465KB Sizes 14 Downloads 84 Views

Journal of Mechanical Working Technology, 17 (1988) 73 - 82 Elsevier Science Publishers B.V., Amsterdam - Printed inThe Netherlands

USING EXPERTSYSTEMTOOLSAND TECHNIQUESIN COMPUTER-AIDEDDESIGN - AN ELECTRICAL SWITCHBOARDDESIGN EXAMPLE I

2

2

H.K. HO , C.H. TAN and F.T.L. TAY ISchool Of Mechanical and Production Engineering, Nanyang Technological Institute, Nanyang Avenue, Singapore 2Grumman Int./NTI CAD/CAMCentre (GINTIC), Nanyang Technological Institute, Nanyang Avenue, Singapore

SUMMARY A switchboard design system is being developed which makes use of expert system tools and techniques together with conventional database and draughting software to form an integrated CAD system. This system enables automation of much of the entire design process of low voltage electrical switchboards. The system performs design tasks ranging from selection of switchboard components, to switchboard configuration, busbar design and routing, production of engineering drawings and cost estimates, and giving advice on testing procedures. The design produced by the system is not optimized in any mathematical sense. Instead, the expertise of human designers encoded in the knowledge base of the system ensures acceptable and near-optimal designs even without re-design. The relatively loose coupling of the expert system tool with conventional software tools in the system has the advantage of simplifying development and maintenance. However, performance in terms of speed and some aspects of f l e x i b i l i t y has to be compromised to some extent. INTRODUCTION Much of the knowledge used at the preliminary design stage of any engineering design problem is broad, heuristic, symbolic, and qualitative in nature. This knowledge can often be expressed in the form of design "rules" which take into account industry, company and individual design standards, codes, practices, skills, and experience. Most existing CAD systems do not provide any real support to the designer at this stage of design, since the knowledge required is not easily incorporated into conventional algorithmictype computer programs. With the advent of knowledge-based and expert systems, there is considerable interest in using such systems for preliminary design and design synthesis. In this paper, the example of a low-voltage electrical switchboard design system will be used to illustrate the use of expert system techniques and tools in the implementation of an integrated CAD system. The system aims to automate a major part of the design process starting from preliminary design to the production of drawings and documents to support actual manufacture of the switchboard. The system is being 0378-38041881503.50

© 1988 Elsevier Science Publishers B.V.

73

developed at Nanyang Technological Institute's Grumman Int./NTI CAD/CAM Centre (GINTIC) for a local (Singapore) switchboard manufacturer, with support from the Economic Development Board of Singapore's Ministry of Trade and Industry [refs. 1,2]. NATURE OF THE SWITCHBOARD DESIGN PROBLEM Low voltage switchboards are commonly used in residential and commercial buildings, manufacturing plants and other f a c i l i t i e s to provide safe and controlled distribution of e l e c t r i c i t y for various purposes and to various parts of the f a c i l i t y . Switchboard manufacturing is an example of a customised one-off job shop production process. A switchboard manufacturer has to respond quickly and accurately to requests for proposals for manufacture of switchboards of almost unlimited variety.

Since few

buildings/facilties are exactly alike, few switchboard projects are s u f f i c i e n t l y alike for the manufacturer to benefit greatly from the use of previous designs. The switchboard designer must have knowledge and expertise on industrywide e l e c t r i c i t y distribution and switching codes and standards; characteristics of the various switchboard components such as c i r c u i t breakers, meters, protection relays; sizing of busbars and their supports for normal current carrying and for fault conditions; andthe special needs and requirements of major clients (such as government bodies/statutory boards).

His aim is to design a switchboard that is optimised in several

respects. F i r s t l y , the switchboard components, busbars and busbar supports must be carefully selected or sized so that they meet the requirements and yet are not over-specified and unnecessarily costly. Next, he must place them in panels or cubicles that enable all the required components/equipment for that section of the switchboard to be placed safely and ergonomically. This should be achieved with minimum amounts of structural materials, cables and busbars, while ensuring that all the required testing procedures for the switchboard can be carried out on the assembled switchboard. DESCRIPTION OF THE SWITCHBOARD DESIGN SYSTEM Overall Framework The knowledge-intensiveness and expertise-based characteristics of the switchboard design problem match well with the advantages that are often associated with knowledge-based expert systems [ref. 3]. The modularity, e x t e n s i b i l i t y , and "user-friendly" characteristics associated with knowledge-based systems are also important to ensure that the design system would not become obsolete, and could be used as a training aid for novice switchboard designers. Fortunately, switchboard design is also sufficiently

75 constrained to make i t possible to arrive at near-optimal designs without the need for re-design.

Therefore, a r e l a t i v e l y simple ( f i r s t generation

type) rule-based expert system approach (based on the very successful RI/XCON program from Digital Equipment Corp) [refs. 4,5] can be used. Based on the assessment of the problem domain, i t was decided to make use of Personal Consultant Plus (PC+), a Lisp-based expert system shell, as the main development tool for the design system. PC+ has been described as a PCbased tool with many of the advanced features found in more sophisticated tools and provides extensive user-friendly interfaces for development and execution [refs. 6,7]. The decision to make use of this tool did not result in conventional computer-based design tools being discarded. These are important in any CAD system, and are already in widespread use. Therefore, the system makes use of a conventional database management system (DbaseIII), and a conventional CAD package (Professional CADAM) together with PC+ to form an inteqrated and comprehensive CAD system. The system to be delivered w i l l eventually run on an IBM RT workstation and include the following components: (a) a run-time (compiled) version of the expert system running under DOS on an AT coprocessor, (b) DbaseIII software also running on an AT co-processor, and (c) Professional CADAMsoftware and associated compiled interface programs, under AIX, the RT PC version of Unix. The basic framework of the system is shown in Fig. I.

The user provides

input to the system either interactively, or by specifying an input f i l e . The expert system w i l l select suitable switchboard components from the comnonents data base (DbaseIII data f i l e s ) , select suitable cubicle sizes for the various switchboard modules, and then lay out the components and design busbars and busbar supports based on design rules and standards encoded within the system's desian knowledae base. I f necessary, the user w i l l be queried for missing/additional information which cannot be deduced directly. The result (output) from the system w i l l include a l i s t i n g of the B i l l of Materials for the switchboard, estimated overall costs, layout and production drawings, electrical line and control diagrams, and advice/notes on test procedures for the configured switchboard. The drawings are produced using the CADAMinterface module. Several interface programs (written in Fortran) read output f i l e s produced by PC+, and make use of the graphical component/materials/symbols l i b r a r y to produce the necessary mechanical and electrical drawings and diagrams automatically. The user and develooer interfaces available from the system are provided by the tools which have been used. For the user, a l l the necessary inputs are made under PC+, and this expert system tool provides menu-driven input

76



USER ) I USER INTERFACE

i INPUTS

OUTPb'T

)ecifications/requirements such as type, voltage/ current ratings, applicable standards/codes, preferred component manufacturer etc.

3ill of materials. Various I drawings to support design / proposals and actual / switchboard manufacturing, / including layout and assemblyJ drawings, electrical line a n d / control drawings. Advice on / testing requirements and / procedures J

S

INFERENCE ENGINE Forward rule-chaining, ordering of rule firing, inheritance, activation of attached procedures, instantiation of frames etc.

' /

WORKINGDESIGN

Working design which will be generated by expert system

KNOWLEDGEBASE COMPONENTDATA BASE (TEXT AND GRAPHICS)

DESIGN RULES KNOWLEDGEBASE

Textual and graphical details of components and materials, including physical dimensions, costs, functional specifications, etc.

Heuristic design rules. Rules from industrial/ statutory standards. Rules resulting from physical, manufacturing and other contraints. "Meta" rules for ordering of subtasks, etc.

t DEVELOPER INTERFACE J

Fig. I. Framework of Switchboard Design System

?? prompts; "playback" and "review" f a c i l i t i e s to simplify entering of input data and making changes to the input; the means to query the system (asking WHY and HOW); and the a b i l i t y to generate English-like responses to such queries. The user can also make use of the draughting f a c i l i t i e s in CADAMi f the drawings produced automatically by the system have to be improved or modified in any way. For the developer, interfaces are provided in PC+ to f a c i l i t a t e encoding of rules (including the use of an English-like Rule Language), to write user-defined functions in Lisp, and to trace and debug the expert system. DbaseIII enables the component data base to be easily updated and expanded without affecting the design knowledge base. CADAM allows the creation and storage of component l i b r a r i e s without the need to change the design knowledge base. The use of CADAM's Interactive User Exchange (IUE) also enables the automatic generation of drawings to be customised to f i t any changes in the company's requirements. Expert System and Knowldeqe Base Using the expert system shell, the design knowledge is structured in a way which is natural to a switchboard designer. "Frames" are used to store groups of interrelated parameters and "if-then" rules as shown in Fig. 2. Each frame contains i t s own group/s of design parameters and rules appropriate to the sub-task i t is named after. For example, the COMPONENTSELECT frame handles selection of components, with each switchboard functional sub-system having i t s own sub-frame ( i . e . INCOMING-SECTION, OUTGOING-SECTION and COUPLER-SECTION). The selected components are retrieved ---

COMPONENT-SELECT

I ..... I

OUTGOING-SECTION --

-SWITCHBOARD

.....

CONFIGURATION

I ........ I

BUSBAR-DESIGN

--

T E S T PROCEDURES

--

COUPLER-SECTION

INCOMING-CUBICLE OUTGOING-CUBICLE

--

--

INCOMING-SECTION

COUPLER-CUBICLE

Fig. 2. Frame Organization for Expert System

OUTGOING-LINE

78 from the text database with all the necessary information about them needed for the other sub-tasks of the design process, for e.g., i t s CADAM (graphical) l i b r a r y PID (part identification number), physical dimensions, details of connecting points (applicable for example, to the c i r c u i t breakers), etc..

Someframes may be instantiated more than once. For

example, the number of outgoing sections w i l l determine the number of times the OUTGOING-SECTION frame is to be instantiated, and each instantiation w i l l result in a different outgoing section being specified and designed. The actual placement of components in the vhvsical cubicles (or panels) of the switchboard is carried out by using the rules in the CONFIGURATION frame, and i t s associated INCOMING-CUBICLE, OUTGOING-CUBICLE and COUPLERCUBICLE frames. The placement rules make use of the knowledge of expert designers to determine acceptable and near-optimal placement of components on the various cubicles, beginning with those which are more c r i t i c a l , followed by the rest. Once the components have been placed, the rules in the BUSBAR-DESIGN frame are used to size and lay out the required busbars and main cables, and to design the busbar supports.

Although one objective of

the system is to minimize the required length of expensive copper busbars, this is not done by using any auto-routing algorithm (as is common in PCB and VLSI design software). Instead, the prudent placement of c r i t i c a l components, and the use of only a small number of possible busbar shapes to connect the relevant components to the main (straight) busbar that runs along the switchboard ensure that busbars are correctly designed without unacceptable wastage. Finally, the TEST-PROCEDURES frame is used to generate advice on the testing procedures which are needed according to the applicable standards and the design specifications of the switchboard. In general, the expert system runs in a data-directed (forward chaining) manner without any backtracking or re-design. The system requires only a minimal set of input data to begin the consultation, after which only inputs relevant to the design problem at hand w i l l be asked of the user. This avoids unnecessary (and unintelligent) questioning of the user for information which can either be deduced from an earlier input, or is not relevant to the ongoing consultation. Examples of rule groups and rules implemented in the system's knowledge base are shown in Fig. 3. The text of these rules can be displayed either in Lisp, or in an abbreviated rule language, or in English, making use of the English text used to describe the parameters of the knowledge base. Couplinq to Conventional Parts of System The conventional parts of the system makes use of popular software for database management and computer-aided draughting. PC+ provides b u i l t - i n

?9 Rule Grouos SWITCHBOARD-CONTROL-RULES SWITCHBOARD-HEATER-RULES INCONING-ACB-BREAKER-RULE$ INCOMING-INDICATING-LIGHTS-RULES COUPLER-SECTION-BREAKER-RULES

SWITCHBOARD-APPLICABLE-STANDARD-RULES SWITCHBOARD-PREFERRED-MANUFACTURER-RULES INCONING-ANNETER-RULES OUTGOING-LINE-BNEAKER-RULES BUSBAR-DESIGN-RULES

Control Rvlqs the number of incoming-section frame instantiations is equal or greater than the number of incoming sections THEN p r i n t "You have finished giving information for the incoming sections and refuse any further request for incoming-section frame instant/at/ IF

IF selection of components is completed THEN start configuration of switchboard cubicles IF configuration of switchboard cubicles is completed THEN start busbardesign Design Rules IF THEN IF THEN

the the the the the

applicable standards are applicable standards are applicable standards are frequency of e l e c t r i c i t y protection class is IP

B r i t i s h Standards or PUB regulations or IEC Standards supply is 50Hz and

KVA meters are required the required maximum-scale-range for the KVA meter = (incoming-breaker-current-rating * incoming-voltage * (sqrt 3)) / ]00

IF

ammeters are required and the number of ammeters required = ] and the number-of-poles for the breaker > ] THEN an ammeter-selector-switch is required

Fig. 3

Examples of Rule Groups and Rules in the Knowledge Base

functions that act as "hooks" to DbaseIII. Using these functions, DbaselII databases are used to store textual design data on switchboard components which can be searched and updated as part of the consultation with the expert system ( i . e . , without having to e x i t and c a l l DbaseIII separately). Any changes to the component databases involving addition of new component models, changes in costs etc. can be made independently of the expert system, and such changes w i l l not a f f e c t the correct running of the system. The expert system's output to CADAM comprises various output f i l e s which are formatted according to the needs of the various interface programs. An example of the format of the output f i l e for the automatic generation of switchboard layout drawings is shown in Fig. 4. The created drawings (e.g.

80

Fig. 5) are stored in CADAMfor future use and to enable any necessary modifications to be made manually by the user.

FRAME LIB FRAME LIB FRAME LIB FRAME LIB ACB LIB ACB LIB ACB LIB METER LIB METER LIB METER LIB MCCB LIB MCCB LIB MCCB LIB

001001001001001001001001001001002002002-

I

1 1 I I I I I I I I 1 I I

II__I CADAMDrawing Name

Detail Pg. No.

1800.0 2400.0 3000.0 3600.0 300.0 3300.0 3900.0 889.0 883.0 1356.0 2079.0 2079.0 2682.0

0.0 0.0 0.0 0.0 100.0 100.0 100.0 1454.0 1213.0 1727.0 979.0 468.0 979.0

0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0

I X, Y and Z co-ordinates

Fig. 4 Format of Output File to be Used by CADAMInterface Program for Generation of Switchboard Layout Drawings

LESSONS LEARNT The system described has been based on, and has benefitted from, the experiences of the implementors of similar expert systems for design and configuration developed elsewhere. However, the following points are prominent enough to warrant special mention:(a) Knowledge acquisition was proven again to be a serious bottleneck in the implementation of an expert system. For this project, i t was found that the design expertise in a small manufacturing company is not streamlined or well-documented, and considerable effort is needed to extract consistent and correct design "rules" for the knowledge base of the expert system, and to keep i t stable. The authors i n i t i a l l y made use of ad-hoc and largely unstructured interviews and protocol analysis to acquire knowledge from the human designers. As the implementation progressed, i t was found that the knowledge acquisition process was not being done very e f f i c i e n t l y , and different designers often had different points of view. A more formal approach is now being attempted but much more work is certainly needed to enable more e f f i c i e n t and accurate capture of human expertise, particularly i f i t is necessary to make use of multiple sources of such expertise [refs.

8,9].

eaTs~s u6tsep ~aedxe ue u! satT~L~qede3 3~uo~ouo= SSeL pue etqlxe U eao= ~o uo~e~ue~eLd=i

".o6 euo uh, pau~eTqo s[ u6[sep Le=[ldo-aeeu pue eLqe~deo3e

ue TeqT eansue o~ se qons eJe e6peL~ouN pue seLna u6~sep eq~ 'eTep ~ndu~ UeAL6 eq~ q ~

pa~eaeue6 sL uf!sap e j ~ ~eq~ uo~d=nsse eq~ aapun sNao~

=e~sRs eql pee~suI "u6tsep-ea ao 6ULN3ea~3eq ~q u6~sep eq~ ~o UO[~eZL=L~do etqeue o~ ~d=elle ou se~ eJeq~ '~tsno~^ead peuo~lue= ueeq seq sv (o) • ~3e£oad s~q~ ao~ suo~do 3~S[Lee= ~ou eae 000'095S~ se q3n= se 6ut~soo SLOO~ ~ue=doLeAep pue-do~ 'suot~do toa~uoo pue uotle~uese4dea snotJeA ~no £a~ o~ (saBers Le~T~u~ eqT uL £Lte!oedse) SLOOT Lnhae~od eaom ~o esn eqT =oa~ p e l ~ e u e q e^eq pLno~ meat ~uamdoLe^ep eql q6noqltv "~uemTsa^ut uo su=n~aa eLqeuosee4 pue 'Ns~a =nm~ut= eansua oT sasseu~snq Lte=s oT Tue~aod=~ &LaeLno!~aed s! aoloe3 Tso3 eqL

"uo!~e~ueeeLd=~ 30 esee pue s~soo uee~eq

es~=oad=o3 e SL Loo~ ~ue=doLe^ep =e~s£s ~=edxe peseq-3d e jo esn eqt (q)

ee~s~s eqT £q £tte3L~eeo~nv peTeaeue9







6u~eaa ~ndTno £ "6~3

J

S'-lOOJ. ~ SVg gOOHNd.L V09

r L

jn

:f

r+~

I igr . Lqd-L

V0017

®

~. k i

1

t • L '

• •

I~ ~ ii

0 gOON

t

Ndl V09

SIN VO0~'

®

L J L lkT~J

J

J F ~.

I

I -"Fr I ' ~ I - 0

~ i

I



NdJ.

VOOi"

1:10014 N d l

r E~~F -I

¢

,J • J

/

r;,"z~'-, ,-:~'.'1

~F NdJ.

®

Ig

V091

I~-Y1

®

-q

VO0£

L

o o o

000

~

__

~'t Zfl

/

L

J

L



~





L





J

L



~









82 would be required in more general design problems, which are not as constrained as for low voltage electrical switchboards [ref. 10]. However, i t should be noted that expert systems are s t i l l not capable of handling problems that are too open-ended (i.e. with few constraints), and which requires substantial general and common sense knowledge. (d) The system illustrates the usefulness and importance of integrating computer-based design tools [ref. 11]. The relatively loose coupling of the various tools used in the system helped speed up development since modules on the various tools could be developed independently once the basic framework had been established. Furthermore, the implementation of the component database and graphics modules using powerful and specialised high level tools such as DbaseIII and CADAMresulted in high quality software modules which would have been d i f f i c u l t to match i f they had been developed in a more tightly coupled system using a single computer language (e.g. Lisp). However, their use naturally resulted in a drop in program efficiency, reduction of speed of processing and a higher demand for computer memory (both RAM and disk memory). The interfaces (i.e. the DbaseIII access functions in Personal Consultant Plus, and the interface programs for use with CADAM) also did not allow as much f l e x i b i l i t y in data structuring and in program development and use as would have been possible i f a more tightly coupled system had been developed. REFERENCES I

J. Boyd and N.C. Ho, PDASProject Proposal for Joint Project on Developing an Expert CAD System for The Design of Electrical Switchboard by GINTIC and TRIAD Enterprises, GINTIC, 1986. 2 First Progress Report on The Joint GINTIC-TRIAD Project to Develop an Expert CAD System for the Design of Electrical Switchboards, GINTIC and TRIAD Enterprises, Nov 1987. 3 D.D.'Wolfgram et al, Expert Systems for The Technical Professsional, John Wiley, New York, 1987. 4 J. McDermott, RI: A Rule-Based Configurer of Computer-Systems, A r t i f i c i a l Intelligence, Ig (1982) 39-88. 5 J. McDermott, XSEL: A Computer Sales Person's Assistant, in: J. Hayes and D. Michie (Eds.), Machine Intelligence I0, Ellis-Horwood, Chichester, 1982. 6 W.B. Gevarter, The Nature and Evaluation of Commercial Expert System Building Tools, IEEE Computer, May 1987. 7 Personal Consultant Plus Reference Guide (ver. 3.0), Texas Instruments Inc. Data Systems Group, Austin, Texas, 1987. 8 R.R. Hoffman, The Problem of Extracting the Knowledge of Experts from the Perspective of Experimental Psychology, AI Magazine, Summer 1987. g S. Mittal, Knowledge Acquisition from Multiple Experts, AI Magazine, Summer 1985. 10 D.C. Brown and B. Chandrasekaran, Knowledge and Control for a Mechanical Design Expert System, IEEE Computer, July 1986. 11T. Tomiyama and H. Yoshikawa, Requirements and Principles for Intelligent CAD Systems, in: J. Gero (Ed.), Knowledge Engineering in Computer-Aided Design, Elsevier, Amsterdam, 1985.