+ All Categories
Home > Documents > Automating the design process for electromagnetic devices

Automating the design process for electromagnetic devices

Date post: 19-Sep-2016
Category:
Upload: da
View: 213 times
Download: 1 times
Share this document with a friend
7
Automating the design process for electromagnetic devices by C. M. Saldanha and Prof. D. A. Lowther McCill University This paper presents the next logical step in CAD tools for the design of electromagnetic devices. Artificial intelligence techniques are used to incorporate the designer's role into a comprehensive system for automating the design process. This paper describes the design process and presents the structure of such a system. Introduction The Electromagnetic Design System (EDS) is a program which uses artificial intelligence (Al) techniques to provide a knowledge base interface to existing computer-aided design (CAD) packages for electromagnetic devices (Refs. 1 and 2). It is a framework which simulates the design process common to a large class of devices such as transformers, motors, reactors and actuators. The underlying power of the system is that each device model embodies a set of design rules used by the framework to infer a design given the initial specifi- cations. The design rules for a device are symbolic representations of exper- tise traditionally held by human experts; thus the novelty in EDS is that it encompasses the role of the design engineer in the design process. Conventional programs for device design serve as computational aids for the expert designer. One of the major reasons for producing EDS is to provide a means by which a non-expert can have quick access to a reasonable design of a required device in the absence of an expert. For example, an engineer at a plant who may need to incorporate a power transformer design in a particular sys- tem will possess expertise as far as the system and its requirements is con- cerned. However, he may not hold the knowledge necessary to complete a sat- isfactory transformer design. EDS would invoke the module containing a model for power transformer design and accept the design specification from the plant engineer. Any missing data or information which is expected from a non-expert is requested, and EDS would employ all its resources to synthesise a transformer design meet- ing the requirements set by the plant engineer. A major objective of EDS is to offset a lack of expertise in producing good designs of magnetic devices. The program is also directed at the expert designer as a means of overcom- ing the increasing complexity of CAD tools for numerical solutions of elec- tromagnetic devices. Finite-element based software packages such as Mag- Net (Ref. 3) and Tosca (Ref. 4) for the computer-aided design of electromag- netic devices (Refs. 5 and 6) have provided a powerful alternative to ana- lytical design methods (Refs. 7 and 8). However, these tools, while providing rapid computer-based 'prototyping' of designs, require significant skill in their use. Thus, rather than reducing the need for expert designers, they empha- sise the need for even more expertise! At each step in design simulation using a finite-element package an engineer must know how to set up boundary conditions, generate an appropriate mesh, select the best solver, and manipulate the field sol- utions generated by the solver to calcu- late desired quantities such as impedances, inductances and losses. The latter calculations are accom- plished through a postprocessing mod- ule included in the package. An example where familiarity and experience, or 'expertise', is a definite necessity for producing accurate sol- utions is in generating the mesh (Ref. 9) for a particular geometry. Depending on the overall level of mesh refinement chosen by the designer, inaccurate sol- utions may result. In short, the com- plexity of CAD packages for finite- element analysis can become a burden <frame name> <frame type> <cvalue>: ' <range>: (object, rule,'equation, procedure) <slot n a m e > •.••-•. < value-faeet> .,. <default facet>. • . i <range facet> <if_ne*ede*d fae.et> <slot.name>' <value facet> <default faeet> -crange faee.t> <if_nee'ded'facet> Fig. 1 The frame, data structure Computer-Aided Engineering Journal October 1986 173
Transcript

Automating the design processfor electromagnetic devicesby C. M. Saldanha and Prof. D. A. LowtherMcCill University

This paper presents the next logical step in CAD tools for the designof electromagnetic devices. Artificial intelligence techniques are usedto incorporate the designer's role into a comprehensive system forautomating the design process. This paper describes the designprocess and presents the structure of such a system.

Introduction

The Electromagnetic Design System(EDS) is a program which uses artificialintelligence (Al) techniques to provide aknowledge base interface to existingcomputer-aided design (CAD) packagesfor electromagnetic devices (Refs. 1 and2). It is a framework which simulates thedesign process common to a large classof devices such as transformers,motors, reactors and actuators. Theunderlying power of the system is thateach device model embodies a set ofdesign rules used by the framework toinfer a design given the initial specifi-cations. The design rules for a deviceare symbolic representations of exper-tise traditionally held by humanexperts; thus the novelty in EDS is that itencompasses the role of the designengineer in the design process.

Conventional programs for devicedesign serve as computational aids forthe expert designer. One of the majorreasons for producing EDS is to providea means by which a non-expert can havequick access to a reasonable design of arequired device in the absence of anexpert.

For example, an engineer at a plantwho may need to incorporate a powertransformer design in a particular sys-tem will possess expertise as far as thesystem and its requirements is con-cerned. However, he may not hold theknowledge necessary to complete a sat-isfactory transformer design. EDSwould invoke the module containing amodel for power transformer designand accept the design specification

from the plant engineer. Any missingdata or information which is expectedfrom a non-expert is requested, andEDS would employ all its resources tosynthesise a transformer design meet-ing the requirements set by the plantengineer. A major objective of EDS is tooffset a lack of expertise in producinggood designs of magnetic devices.

The program is also directed at theexpert designer as a means of overcom-ing the increasing complexity of CADtools for numerical solutions of elec-tromagnetic devices. Finite-elementbased software packages such as Mag-Net (Ref. 3) and Tosca (Ref. 4) for thecomputer-aided design of electromag-netic devices (Refs. 5 and 6) haveprovided a powerful alternative to ana-lytical design methods (Refs. 7 and 8).

However, these tools, while providingrapid computer-based 'prototyping' ofdesigns, require significant skill in theiruse. Thus, rather than reducing theneed for expert designers, they empha-sise the need for even more expertise!

At each step in design simulationusing a finite-element package anengineer must know how to set upboundary conditions, generate anappropriate mesh, select the bestsolver, and manipulate the field sol-utions generated by the solver to calcu-late desired quantities such asimpedances, inductances and losses.The latter calculations are accom-plished through a postprocessing mod-ule included in the package.

An example where familiarity andexperience, or 'expertise', is a definitenecessity for producing accurate sol-utions is in generating the mesh (Ref. 9)for a particular geometry. Dependingon the overall level of mesh refinementchosen by the designer, inaccurate sol-utions may result. In short, the com-plexity of CAD packages for finite-element analysis can become a burden

<frame name><frame type>

<cvalue>: ' •<range>: (object, rule,'equation, procedure)

< s l o t n a m e > • . • • - • .< value-faeet> .,.<default facet>. • . i<range facet><if_ne*ede*d fae.et>

<slot.name>'<value facet><default faeet>-crange faee.t><if_nee'ded'facet>

Fig. 1 The frame, data structure

Computer-Aided Engineering Journal October 1986 173

on the engineer who lacks the time tobecome proficient with the system, andinaccurate solutions may result frominexperience with the systems. An intel-ligent design system should thereforecontain the knowledge concerned withthe usage of CAD tools for design, thuseliminating the associated problems.

Much has already been accomplishedin the automation of the mesh gener-ation process. This work can be sup-plemented with Al techniques.Adaptive mesh generation programshave been written (Ref. 9) with theobjective of producing an optimal meshfor a given geometry. However, thetechniques are iterative and involve sol-ving the finite-element problem, mak-ing them computationally expensive.The intelligent design system proposedwould add intelligence to mesh gener-ation techniques, with the objective ofreducing the number of iterative stepsand thus the cost of generating a mesh.

Automation should not stop at meshgeneration, and yet additional auto-mation of the use of a finite-elementpackage would have to be tightly linkedto the device under consideration. Forinstance, to automate the generation ofan outline for a transformer, the pro-gram would have to know the shape ofthe transformer as well as the relation-ship between the dimensions of theoutline and the current design con-straints. This kind of knowledge is inde-pendent of finite-element analysis, butis concerned with a particular devicedesign.

Theonly way to completely avoid hav-ing to learn how to use CAD tools is ifthey belonged to a system with a know-ledge of the electromagnetic devicesthemselves. In the case of a trans-former, the system would know aboutthe geometry of a transformer andwould issue the appropriate finite-ele-ment package commands to generatethe outline. Suitable mesh refinementcriteria would be conveyed to the auto-matic mesh generator so that an optimalmesh could be produced inexpensivelyand the relevant solver for the trans-former mesh would be selected toobtain the finite-element solution. Sucha system would actually perform therole of the design engineer. The courseof automating a designer's role in con-junction with his design aids is, in fact,the automation of the design process.

EDS must be a general frameworkwhich can accommodate a wide rangeof devices, and is therefore designed toexploit factors which are common tomost devices. The most obvious deter-minant is the physical laws of elec-tromagnetics which form the basis forthe operation of all the devices. As aconsequence, the same CAD tools are

174

used to simulate all the devices. Thisfact is significant in achieving a feasiblesystem since only a few packages needto be interfaced to the system. Perhapsthe most important issue regarding therange of application is that the designparadigm is common to most devices.Thus the following section is devoted tothe design methodology of electromag-netic devices.

The design process

The objective of this section is todevelop an understanding of the pro-cess which is to be simulated. The dis-cusion begins with a description of thescope of EDS and continues with theclassification of knowledge into threecategories:

• Structural knowledge about adevice gives the designer a global pic-ture of the key components which makeup that device.• To guarantee the operation of adevice, knowledge relating the dimen-sional, performance and functional par-ameters of the device is expressed by amathematical model.• The third kind of knowledge dis-cussed is the most abstract, but is inval-uable to the design process. Thedesigner's expertise puts him at thehelm of the design process.

The design process is thendescribed as an iterative operation ofevaluation and modification. Finally,conventional design optimisation canthen be introduced as an exhaustivesearch through design space.

The scope of EDS is limited to the designprocess rather than to the process ofscientific discovery. The scientific pro-cess is much more powerful; however,sufficient technology to adequatelysimulate it does not exist.

It is important to make the distinctionbetween engineering design and scien-tific discovery so that the task becomesmore realistic and useful. Although allelectromagnetic devices exhibitbehaviour which conforms to the lawsof electromagnetics, the goal of theintelligent design system is not to infer adesign from the underlying principles,i.e. Maxwell's equations; nor is it to dis-cover Faraday's law. Each entity that canbe designed by the system alreadyadheres to a mathematical model basedon the above scientific principles.Engineering research strives to createmodels for new devices and to improveexisting models, whereas engineeringdesign is the application of a model tosynthesise and evaluate a design. Thedesign engineer gains expertise in theapplication of a model to producespecific instances of the device. Hisinteractivity with the current state of a

design and model is the primary designprocess that the intelligent system fordesign strives to simulate.

Intrinsically, the engineering designprocess is a multi-dimensional taskinvolving numerical, structural andjudgmental procedures. The func-tionality of a structural form is verifiedby a mathematical model of the entity.As a result, engineering design consistsof specifying a unique set of parametersto an analytical model.

By structural variables we refer to thesub-components of a device, such asthe core of a transformer or the arma-ture of an actuator. A transformerdesigner chooses between a large num-ber of different core types ('shell' type,'core' type, 'toroidal' type etc.). Hisselection is based on a set of designrules which relate the performancecharacteristics of the different typeswith applications and other design vari-ables such as cost. Structural par-ameters are not usually included in aglobal mathematical model for adevice; rather the model is different forthe different possible values of thestructural parameters. Thus the selec-tion of a value for a structural variable is"totally qualitative and depends on thedesigner's expertise.

The role of the designer is initially tointerpret a customer's specificationsand requirements regarding the appli-cation for a device. Based on this infor-mation the designer can makeassumptions and approximations whichlead to a quick preliminary design.These decisions are made based on thedesigner's experience, reflected by aset of design rules he has acquiredthroughout his design career.

With respect to transformer design,applying the rule of ideal distribution oflosses and assuming a value of effi-ciency greater than 0.5 will allow a largenumber of transformer parameters tobe calculated. A design rule whichstates that most power transformershave efficiencies between 0.75 and 0.95can be used to infer a value for effi-ciency greater than 0.5, so that the firstrule can apply. If both these designrules are used, the following set of par-ameters and equations are valid, wherePin is the total input power and y] is theefficiency:

output power Po = Pin 17total power loss P = Pin (1 — y\)primary copper loss P,p = Pin (1 -

TI)/4

secondary copper loss P,s. = P,piron loss Pn = Pm (1 - TI)/2regulation = (1/T|) - 1full load output voltage Vo =

V^ (N2/N,)Vint where N, and N2 are thenumber of turns on the primary and sec-ondary coils, respectively

Computer-Aided Engineering Journal October 1986

• secondary winding no-load voltageV2 = Vo/Vrj.Pin is provided by the customer, and thelast two equations hold assuming T] >0.5.

Once the set of parameters is com-pletely instantiated as a result of designrules or equations, the process ofevaluation and refinement begins. Inthis case the designer can invoke Mag-Net to simulate the design and obtainperformance parameters which cannotbe calculated from the model. Also,comparisons can be made betweensimulated and calculated versions of thesame parameter. In addition, the

designer uses his own criteria forevaluation purposes.

An evaluation rule for transformerdesign states that maximum efficiency isreached if the available winding spacein terms of volume is divided equallybetween the primary and sum of thesecondary coils. When the number ofturns and wire gauges has beenselected, this rule can be used to evalu-ate the current design by determining ifit is indeed operating at maximum effi-ciency. The evaluation process deter-mines the accuracy of the currentdesign instantiation by testing whetherlimiting factors are being exceeded.

Refinement of the design is the nextstep in the design process. The need forrefinement depends on the accuracy ofthe assumptions and approximationsmade by the designer. Thus the moreknowledgeable the expert, the faster adesign can be produced, since the num-ber of iterations of design evaluationand modification is reduced. The majorissues in any modification are identify-ing which parameters to change and theamount by which to change them, andthen re-calculating the rest of thedesign parameters related to thosemodified.

The expert designer knows exactly

bobbin

secondarywindings

<frame name>: (transformer.)<frame type>: {object)

<core>:<value>::<default>: (shell):<range>: (shell, toroidal etc.):<-if_needed>: (knowledge source 1)

<primary winding>:<value>::<default>: (winding_1)

. <secondary winding>:<value>::<defaulf>: (winding^)

<reactance> . . .<output power> . . .

primarywindings

output power

- number of turns

- radial width

- material

- MMF

inputvoltage

Fig. 2 Transformer frame representationa Transformer b Transformer frame c Transformer frame network

Computer-Aided Engineering Journal October 1986 175

V=4FfaNB

, where:, .# V is the voltage across- fhe-winding (VRMS)

• Pis the form factor• f is the frequency (.irvhertz)

1 • aHs'the core eross-^eetiorial arear • /Vis the number.ofwjFfdinfg^tupns

•' B-'\s the flux density iri w'etoers per unit

a r

<frame name>: (voltage equation)<frametype>: (equation)

<LHS>: (V)<RHS>: (4* F*f * a * N • B)

b ' *"

Fig. 3 Equation framea The transformer voltage equation b The corresponding frame

where to start making modificationsand to what extent they should bemade. This knowledge can also beencoded in rules and used in EDS fordesign modification. The iterative pro-cess of refinement and analysis con-tinues until at least the specificationcriteria for the device are met, giving anoptimal design.

Essentially, device design is a searchthrough design spaceforan optimal sol-ution. The design space is a sub-set ofpossible designs which meet the func-tional specifications in accordance withthe theoretical functional model of adevice — the set of equations whichdescribe the operation of the device.Although a device meets the functionalrequirements, it may not be acceptablesince there are other factors whichinfluence a suitable design. Theseinclude cost, weight, size, availability ofconstruction components and evenenvironmental constraints.

Some models are formulated tooptimise a particular parameter, such ascost. In this case, a mathematicalexpression of cost as a function of theother design parameters is used in costoptimisation. Not all relevant designparameters of a device can be incor-porated into one expression; thusoptimisation is accomplished adap-tively, whereby a systematic search ofthe design space occurs based on vari-ations of performance due to variationsin design parameters, and on the mini-misation condition.

These iterative methods are exhaus-tive. For example, in one particular pro-gram for power transformer design(Ref. 10) an optimisation routine for fix-ing the cross-sectional area of the coreconsists of automatically selecting thesmallest core area from a table, calculat-ing the other parameters affected bychanges in the core area, such as thecore mass and winding current den-sities, and then testing for the mini-mum-cost condition.

If the condition is not met, the next

core area in the table is used. If difficultyarises in converging, the program printsout a warning so that the design engin-eer can modify the input data to theprogram. Before doing so, he can ana-lyse the current state of the design byhaving the program print the criticaldesign parameters. The criteria that theexpert uses to modify the data form thebasis of rules which will allow EDS tomake design modifications.

This program is a good example of aconventional program which can onlybe used by an expert. In EDS, the exper-tise is included in the program so that,in each convergence loop or designiteration, evaluation rules are used foranalysis, and modification rules areused to refine parameters if necessary.If no modifications are necessary, theconventional optimisation routine isallowed to proceed.

Knowledge representation

As has already been shown, there aredifferent kinds of knowledge that needto be represented in EDS: the structuraland functional knowledge of a device,the model of analysis, and the expertdesign rules. In addition, the systemmust be able to communicate withother analytical programs, such asMagNet.

The different kinds of knowledge canbe classified into two groups. 'Deviceknowledge' refers to the full set of par-ameters which describe the structureand operation of a device, while 'prob-lem-solving knowledge' combinesdesign rules, equations and proceduralknowledge. The latter represents all theknowledge which cannot be repre-sented easily by rules. Frames con-taining procedural knowledge areespecially used to interface to simu-lation and analysis programs.

Together the two kinds of knowledgerepresent a 'model' of the device thatcan be designed. Each model is storedin a separate knowledge module, and

therefore different knowledge modulesaccount for the various items that canbe designed by EDS. All the knowledgemodules available to the system arestored in a library.

The basic unit used for knowledgerepresentation in EDS is called a 'frame'(Refs. 11 and 12). A frame is composedof slots, which are used to signify dif-ferent concepts. When all the slots in aframe have been assigned values, theframe is said to be instantiated and rep-resents an instance of the concept.

A generic frame is illustrated in Fig. 1.Each frame has a 'frame type' slot whichindicates the kind of knowledge that theframe represents. 'Object' frames areused to represent device knowledge.

For example, the transformer is anobject consisting of other objects, suchas the magnetic core, the primary andsecondary windings and the tank. Thetransformer is also described by certainfunctional parameters, such as theinput and output power, efficiency andreactance. A transformer at this level ofabstraction is represented by a frame asshown in Fig. 2b. The sub-parts of thetransformer are also objects which aredescribed by a set of parameters. Whenall the sub-parts are linked together theresulting frame network, as shown inFig. 2c, completely describes atransformer.

In general, a device is encoded as ahierarchical network of object framescalled the 'frame network'. The slots ofthe object frames correspond to theparameters of the device. These slotshave 'value' facets which are instanti-ated during the design process. Theoverall goal of EDS is, in fact, to fill in thevalue facets of all the slots in a framenetwork.

The instantiation process is guided bythe mathematical model and the designrules. The set of equations and designrules which can be used to find a valuefor a slot are included in a 'knowledgesource'. Each slot has an additional facetcalled an 'if_needed' facet. The know-ledge source used to find a value for theslot is contained in this facet. There aretwo more facets attached to a slot: the'default' facet is used to provide adefault value, while the 'range' facetindicates a set of possible values for aslot. The core slot of the transformercan be filled with different types ofcores. These are specified in the rangefacet. However, the usual default is the'shell' type called for by the default facetof the core slot.

The equations used in the mathemat-ical model of the device are also repre-sented with the frame data structure. Inthis case the slots in a frame are givenstandard names. The syntax of anequation frame shown in Fig. 3b repre-

176 Computer-Aided Engineering Journal October 1986

sents the voltage equation of the trans-former defined in Fig. 3a. Equations areencoded symbolically because thesame inference mechanism that oper-ates on the design rules of an expert canalso be used to solve equations.

Frames are also used to representprocedural knowledge. A frame whoseframe type slot contains the key word'procedure' indicates to the inferenceengine that the procedure named in theframe must be executed. These framescontain variables representing inputand output parameters of the externalprograms. These input variables can bemodified by rules, and values of outputvariables can be retrieved once ex-ecution of the code ends. The externalprograms can be batch files which areused to run MagNet and OPTDES (Ref.13), an optimisation package. Thusknowledge about the CAD tools is con-tained in pre-programed files which canbe accessed by procedure frames.These frames contain variables that aremodified by the design rules tocustomise the batch files for the particu-lar design.

For example, a procedure frame toautomatically create a transformer out-line on MagNet consists of the differentdimensions of the core and coil and thename of the batch file for the trans-formeroutline. Design rules are used toinstantiate the dimension variables, andyet another rule, such as 'if the next stepis to create the transformer outline,then invoke the procedure frame thataccomplishes this', executes theprocedure.

Frames with a value of 'rule' in theirframe_type slot are used to denote thedesign rules which correspond to adesigner's expertise. The syntax of arule frame is given in Fig. 4a. There aretwo main slots in a rule frame. The valueof the 'premise' slot contains a list ofconditions. During the design process,if all of these conditions are valid, therule may be triggered. EDS performs allthe actions contained in a list attachedto the slot named 'action' if the rule istriggered.

The design rule in Fig. 4b selects thecore material to be low-carbon steel ifthe size, weight and core loss of thetransformer is relatively unimportant, ifthe regulation is not very high, and if thecost is to be low. The clauses in thepremise have to be determined beforethe rule is triggered. If all the clauses aretrue and there is no other competingrule which can fill in the core materialslot, this rule assigns the slot value to below-carbon steel.

System overview

EDS is a centralised system syn-

chronised by a co-ordinator'. Theco-ordinator is responsible for imple-menting the problem-solving strategyto synthesise a design. In the designprocess, the co-ordinator interacts withthe rest of the system, invoking certainmodules and retrieving or passing infor-mation between the others. The centraldata structure is the 'blackboard' (Ref.14), through which the various systemmodules communicate. The 'modelspace', the 'agenda' and the 'status'areas on the blackboard are used by theco-ordinator for control purposes,while the 'design space' contains theactual facts describing the currentdesign. Since facts about a design areinferred from the design rules, or calcu-lated from the model equations, thedesign space is accessible to theinference engine and algebraic solver.The system configuration is illustratedin Fig. 5.

The design process is initiated by theuser with a request for a device. Itsmodel is retrieved from the knowledgemodule library and entered into themodel space of the blackboard. Thismodel is a stereotype of the device to bedesigned and is used to guide the selec-tion of values for the parameters. A top-down strategy is implemented by theco-ordinator as it traverses the framenetwork in a breadth-first style. Begin-ning with the root frame, a value foreach parameter is found and enteredinto the design space of the blackboard.Design continues with the frames onthe next hierarchical level, starting withthe left-most frame. A design is com-pleted when all the parameters havebeen assigned values and there are noinconsistencies with those values.

The co-ordinator utilises a simple setof general heuristics, alternatively

called control or meta-rules, to gener-ate a value for each parameter. The pro-cedure followed is to check theif_needed facet of the parameter toobtain a reference to the knowledgesource. If one exists, the co-ordinatorinvokes the inference engine with theknowledge source as input. If theinference engine fails to generate avalue for the parameter, the defaultfacet is used. If a default is not specified,then general heuristics are used to infera value from the range facet.

When all attempts have failed, includ-ing a lack of response from the algebraicsolver because of incomplete numericspecifications, the process of finding avalue is suspended and the knowledgesource responsible is added to theagenda in the blackboard. The designprogresses, and if new information isderived which can activate the know-ledge source in the agenda the goal ofinstantiating the suspended variable isre-invoked. As a last resort, theco-ordinator can ask the user to supplya value for the particular parameter.Finally, because an inconsistent set ofvalues for a single parameter may existas a result of evaluating it several ways(either heuristically, algebraically ornumerically through simulation), abacktracking mechanism can beinvoked to resolve any inconsistency.

The rule inference engine and thealgebraic solver

There are two different kinds ofinference mechanisms used in EDS. Thescheme used by the rule inferenceengine is goal directed, while thealgebraic solver uses a data-drivenmechanism.

The inference engine is activated tooperate on a knowledge source with

• ' <•' • *<vatu e>(. nisi I e -

<frame n.anie>: (core_materiaj) ' • \ '.Vframe'type?*:, (rule) • ' . - • ' ' ' . ' . '

<p remise> : (.transformerilsizedovy importance, transfbrmer_weight low .

~ ' • importance,, tra'nsWmerJosS'l'ow importance, regulation low)

;••>• • <saetion>: (assign .eore^maJeKia|^ca^b!0nistle,el.j- . ,

Fig. 4 Rule frame

a Rule frame syntax b Example of a rule frame

Computer-Aided Engineering Journal October 1986 177

analysis andoptimisationsoftware

Fig. 5 System configuration

one primary goal, i.e. to infer a value forthe particular slot in the frame network.A rule which concludes a value for theparameter is tested by setting each ofthe premise clauses as sub-goals andthen having the inference engine oper-ate recursively on each of them. Thebackchaining mechanism halts when allthe premise clauses can be proven true,in which case the rule being tested isallowed to trigger; otherwise anotherrule is tested.

The algebraic solver manipulatesnumeric variables symbolically.Equations can be re-organised so thatsolutions can be obtained for any varia-ble. This re-organisation is accom-plished through a set of re-write rules.Thus, given a set of equations, the sol-ver works forward from those variablesthat have already been specified byfinding an equation that contains onlyone unknown and then re-writing theequation so that the unknown can besolved.

The calculation of this variable maycause other equations to be solved. Thepropagation of constraints continuesuntil no equation can be triggered. Thesolver is given a set of equations anduses the values for parameters con-tained in the design space. Any newvalues generated are added to thedesign space even though theco-ordinator has not asked for them.

The behaviour mentioned above hassome important side effects. Thealgebraic solver plays a critical role intriggering the backtracking mechanism.

Some parameters whose values are cal-culated by the solver without a formalrequest from the co-ordinator may havebeen previously constrained by a rule oras an input specification. If the valueimposed by the system differs from thecalculated value, then an inconsistencyoccurs and backtracking is triggered toresolve the conflict. Usually theperformance parameters are specifiedby the user, and are calculated by thealgebraic solver as they are part of themathematical model of the item beingdesigned. If backtracking occursbecause of inconsistent performanceparameters, then the current designfails to meet the required specificationsand backtracking is thus required.

The backtracking scheme imple-mented in EDS is a dependency back-tracking mechanism described in Ref.15. The main problem with backtrackingis to determine how much of the cur-rent design to undo. In simple terms,dependency lists are kept throughoutthe design process for each parameter-value pair in the design space. Someparameters are inferred heuristically.This means that there is some degree ofuncertainty in the value of the par-ameter. The uncertainty is propagatedthroughout the design process as par-ameters are determined from othersthat were deduced heuristically.Dependency lists record the evolutionof each parameter in the design spaceand provide a trace of all the rules usedin determining the value of a parameter.

Eventually, when an inconsistency

does occur later in the design process,backtracking begins by evaluating thedependency list of the parameter withdiffering values and by selecting themost uncertain decision point. All theother parameters whose values dependon the selected rule are removed fromthe design space. The inference engineis invoked with the knowledge sourcecorresponding to the bad rule. A newstrategy or rule is selected, and at thispoint the design proceeds.

Interaction with the userThe user interacts with EDS at several

stages throughout the design process.The most important is at the problemdefinition stage, where the user makesa request for a design and enters thedesign specification. These specifi-cations constrain some parameters,including the performance parameters.These performance parameters permitthe co-ordinator to determine the suc-cess of a particular design (i.e. trans-former losses and reactance).Specification parameters and theirvalues are entered into the design spaceof the blackboard and are marked asbeing provided by the user.

Forany design there is a minimum setof input specifications. If a user fails toenter some of these parameters, thesystem will provide a prompt for theirvalues. However, this action takes placeonly when an absolute need arises, i.e.when the design process cannotcontinue.

The procedure of prompting the userfor values of parameters takes placewhenever all the problem-solving strat-egies of EDS fail to infer a value for theparameter in question and the designprocess is in stalemate as a result. Thisfeature is extremely important in vali-dating a new knowledge module. Theexpert can test his model, note wherethe design process halts, and formulatea new production. Systems such as SEEK(Ref. 16) have been written to automatethe task of validating a rule knowledgebase. The Knowledge Acquisition Pro-gram, described later, can be furtherenhanced by these techniques.

There are several options which offerthe user control over the design pro-cess. He can halt the process at anytime, turn on or off a trace of all theinferences that are being made, and dis-play the design space in the blackboard.Other system commands display a rec-ord of the knowledge source and rulesused to deduce a value for a specifiedparameter. These are typical features ofan expert system which allow it toexplain its line of reasoning.

Acquisition of expertiseKnowledge modules containing a

178 Computer-Aided Engineering Journal October 1986

generic model of an object and the cor-responding knowledge sources are cre-ated by the human expert with the helpof the Knowledge Acquisition Program(KAP). KAP is a menu-driven systemwhich allows interactive creation andediting of a knowledge module via twosub-programs. One facility wasdesigned for the development of theframe network, while the second pro-gram is used to enter the problem-solving knowledge.

Upon entering the first facility theexpert can begin a frame model byproviding a name for the root frame andassigning slots to this frame. In this facil-ity the frame type slot is immediately setto 'object'. For each slot name that isentered the user is prompted with thedifferent facets of the slot. Theif_needed facet prompt expects a refer-ence to a knowledge source, while therange prompt allows the user to enter alist of possible values for the slot.

A value for the default facet may bespecified next. Note that the valuefacets of the slots in the network are notspecified by the expert. EDS is respon-sible for instantiating this facet usingeither general heuristics or the appro-priate knowledge source. Once all thefacet information is complete for oneslot, the user is asked to indicatewhether the slot is a simple parameteror the name of another object frame,signifying a sub-assembly of the currentframe. KAP maintains a stack of all theslots which are marked as frames. Thisstack is then used to build the framenetwork representing the model. At thecompletion of the root frame, theacquisition process continues withthose slots that were marked as frames.

The frame network is constructed in adepth-first manner. Each of the slotnames on the stack becomes an objectframe name in turn, and the user isasked to formulate the slot informationfor the new frame. New sub-assembliesare added to the stack; i.e. new slotsmarked as frames are added to thestack. A terminal frame is one whoseslots all represent parameters; i.e. noneare frames. Once a terminal frame iscompleted KAP pops the stack and thedepth-first process continues. A framenetwork is considered complete whenthe stack is empty, implying that nomore sub-assemblies need to be addedto the network.

• The knowledge acquisition process isonly partially complete when the framenetwork is finished. The knowledgesources containing the problem-solvingknowledge are created next. For eachknowledge source the user can createrules, equations or procedures byentering the frame type, in which casethe corresponding template appears on

the screen. For a rule frame, the userthen fills in the premise and actionclauses in the template. Procedureframes are usually entered by the know-ledge engineer since the code is writtenin the language of EDS.

Once the current knowledge sourceis complete with all its rules, equationsand procedures, the user is promptedwith the other sources referenced in theframe network. If a knowledge source isspecified in the network, then KAP mustensure that it exists. When all the refer-enced knowledge sources are input,the generic model of the device isentered into the device library as a newknowledge module. It may now betested using the EDS system; however,a few iterations of testing and validatingthe rules are expected.

Conclusions

This paper has described the engineer-ing design process for electromagneticdevices and a system used to automatethis process. The objective of EDS is toallow non-experts access to theaccumulated expertise of one or moredesigners, in addition to providing analmost transparent interface to complex

CAD tools.Artificial intelligence techniques are

used to represent the different kinds ofknowledge involved in the design pro-cess. The 'frame' was introduced as asuitable data structure which can beused to represent device knowledge inthe form of a frame network, and torepresent problem-solving knowledgein the form of rule, equation and pro-cedure frames. An algebraic solver isused to infer values from numeric par-ameters by symbolically manipulatingthe equation frames, while a ruleinference engine is used to operate onthe designer's heuristics. Access toexternal CAD tools is provided by pro-cedure frames. The entire system ismanaged by a 'co-ordinator', whichimplements a 'blackboard' architecturefor control.

Acknowledgments

The authors would like to acknowledgethe financial support of FCAR (Fondspour la Formation de Chercheurs etI'Aide a la Recherche) and the NaturalSciences and Engineering ResearchCouncil of Canada for this work.

References

1 LATOMBE, J. C : 'Artificial intelligence in computer-aided design: the TROPIC system', inALLAN, J. J. (Ed.): 'CAD systems' (North-Holland, 1977), pp. 61-120

2 LOWTHER, D. A., SALDANHA, C. M., and CHOY, C.: 'The application of expert systems toCAD in electromagnetics', IEEE Transactions on Magnetics, 1985, MAG-21, (6), pp. 2559-2562

3 'The MagNet user's manual'. Infolytica Corporation, Montreal, Canada, 19854 SIMKIN, J., and TROWBRIDCE, C. W.: 'Three-dimensional nonlinear electromagnetic

field computations, using scalar potentials', IEE Proceedings Part B, Electric Power& Applications, 1980, 127, (6), pp. 368-374

5 KONRAD, A.: 'Electromagnetic devices and the application of computational techniquesin their design', IEEE Transactions on Magnetics, 1985, MAC-21, (6), pp. 2382-2387

6 LOWTHER, D.A., and SILVESTER, P. P.: 'Computer-aided design in magnetics' (Springer-Verlag, 1985)

7 LOWDON, E.: 'Practical transformer design handbook' (H. W. Sams & Co., 1980)8 SMITH, S.: 'Magnetic components design and applications' (Van Nostrand Reinhold,

1985)9 PINCHUK, A. R., and SILVESTER, P. P.: 'Error estimation for automatic adaptive finite

element mesh generation', IEEE Transactions on Magnetics, 1985, MAG-21, (6), pp. 2551-2554

10 ROWE, K.: 'The use of the automatic electronic digital computer as an aid to the powertransformer designer', in FEINBERC, R. (Ed.): 'Modern power transformer'practice'(Macmillan Press, 1979)

11 LOWTHER, D. A., and SALDANHA, C. M.: 'A frame-based system for the design ofelectromagnetic devices'. Proceedings of Intermag Conference, Phoenix, AZ, USA, April1986

12 PREISS, K.: 'Data frame model for the engineering design process', Design Studies, 1980,1, pp. 231-243

13 BALLING, R., PARKINSON, A., and FREE, J.: 'OPTDES user's manual. Version 3.0'. BrighamYoung University, Provo, UT, USA, 1985

14 HAYES-ROTH, B.: 'The blackboard architecture for control', Artificial Intelligence, 1985,26, pp. 251-321

15 STALLMAN, R. M., and SUSSMAN, G. J.: 'Forward reasoning and dependency — directedbacktracking in a system for computer-aicled circuit analysis', ibid, 1977, 9, pp. 135-196

16 POLITAKIS, P. G.: 'Empirical analysis for expert systems' (Pitman Publishing, 1985)

C. M. Saldanha and Prof. D. A. Lowther are with the Computational Analysis & DesignLaboratory of the Department of Electrical Engineering, McGill University, 3480 UniversityStreet, Montreal, Quebec, Canada H3A 2A7.

Computer-Aided Engineering Journal October 1986 179


Recommended