An Expert System for Understanding Expressions from Electric Circuit Analysis
Proceedings of the Ninth International Joint Conference on Artificial Intelligence. AI and Education. Pages 23-24.
© 1985 International Joint Conferences on Artificial Intelligence
Abstract
Circ uit an alysis is central to elcc lrical engin eering . It is important ihat students master th e skills it req~ir os . Most of circu it ar;Jlysis i~; co nce rn ed with writing cxpn;:';sions that r; rnbu,i;r transfnr.n cttions, con ~;e rvation laws an cl \1 re elec trical behaviors of 'J CHi:.:us devices. This paper describes work in !l r<l cJress o•·· cu t ,:x pc rt sysiem tlw t can exami ne til e ex pressions tha t. stuli:') ilts vn it e, cliag no sn the errors in th em ancl sug\)es t currt:c tion:o. fhe c x p ~~ rt sys tem is implemented in OPS5 and uses llw 0irate qit')S oi divide-:l!lcl -co nquer, forwa rd chaininy ancl ilypoihesize·•.i:lcl -l es l. Th e systt; rn c<J n now r eclCg ni zc most of itre C"l!Prno n e•rors tb at s tu rl r· nts rr1ake in dealing with linear resistive circuits an d operates at about the level of a competent hurnan srade r.
- Senturia, S.D .; and B.D. Wedlock , Elec tronic Circuits and Applica tions, John, Wiley & Sons, Inc., New Yo rk, pp. 55•60, 1975.
- Anderson, J.R., C.F. Bayle, R. Farrell . and B.J . 11eiser, "Cogn iti ve Principles in l.he Design of Computer Tutors", Internal paper, at /he present time, Advanced Computer tutoring Project, Carnegic •Mellon University1884.
- Forgy, C.L., OPS5 User's Manual, Department of Computer Science, Carnegie•Mell on University, July 1981 .
- Fod eraro, J.K. , The F/1ANZ LISP Manual, University of California at Berkeley 1981.
- Barr, A., and E.A. Feigenbaum (Eds. ), The Handbook of Artificial Intelligence (vols • 1, 2, 3), Los Altos, CA: Kaufmann, 198 1, 1982.
- Joobbani , R., and S. N. Tal ukdar. "/1. Knowledge•Based Expert System for Tutoring in Electri cal Engineering", Proc eedings, 8th Intern atio nal Computing Symposium ICS •85Fiorence, Italy, March •1985.
References were extracted automatically from the PDF and may contain errors.
Full text extracted automatically from the PDF; figures, tables and equations may differ. The PDF is the version of record.
~R5IB.t\S:_I
Circuit analysis is central to elcclrical engineering. It is important ihat students master the skills it req~iros . Most of circu it ar;Jlysis i~; concerned with writing cxpn;:';sions that r; rnbu,i;r transfnr.ncttions, con ~;ervation laws ancl \1 re electrical behaviors of 'JCHi:.:us devices. This paper describes work in !l r<lcJress o··· cu t ,:xpcrt sysiem tlwt can examine tile expressions that. stuli:')ilts vn ite, cliagnosn the errors in them ancl sug\)est currt:ction:o. fhe cx p ~~ rt system is implemented in OPS5 and uses llw 0irateqit')S oi divide-:l!lcl -conquer, forward chaininy ancl ilypoihesize··.i:lcl-lesl. The systt; rn c<Jn now reclCgnizc most of itre C"l!Prnon e· rors tbat sturl r·nts rr1ake in dealing with linear resistive circuits and operates at about the level of a competent hurnan srader.
Tile ge·,e·<tl fon'rl of a circu; t ::~nalysis problem is:
- given the configuration of a circuit and two subsets of it<; .,,ariobles (one de~igrw.ted as known, the otfler as Llf!known);
- "' solve for the unknown ·Jariables in terms of the known varic.bles.
Gy "coni iguraticn" ·Ne mev.n 2.· specification of tile type and i..Jcation of e;:~clr element in the d 1cuit. By "variable" we mean ti;c value of a circuit element or a vol tage or a current. An example of a circuit problem is shown in Figure 1.
Tile first stag.o in solving a circuit analysis problem is to ass.' :nble a set nf 2quations relating the known and unknown variables. T!1e second stage is to solve for the unknowns. Progrz.uns embodying numerical and symbolic procedu··~S for tiw second slauu are widely av.J. ilable. Therefore, in this paper ·;i·J will fl.ddn;fs only the first stage.
Equations reto!ing the known and unknown variables are generated by invoking Kirchhoff's conservation laws (the net current enteriny each and every node is zero; the net voltage ;;round each and &very loop is z.ero) and by using branch rel.ati ons (that de~;cribe the elec trical behavior of the elements in the circu it -- for instance, vollrJge is equal to resistance multiplied by cur1ent in the case of a resdor) . Many more
· l his wol!<. was hnldC:d in ~1art by tLo Oc~iqn Research Center of Carnegic1\k·llon Uruverist y ami by FounLI for li:l iJiO\''~; · ~·c nt ot PoGt St~condary E"ducati·Jn (!'IPSE).
t\i\l EXPERT SYSTEM FOI-l UNDERSTANDING EX \JF1ESSlONS FROM ELECTRIC C!r:ICUrf ANALYS!S
Rostam Joobbani and Sarosh N. Talul<dar
Design Research Center, Carnegie-Mellon University Schenley Park, Pittsburgh, PA 15213
------·-------

equations can be generated than is necessary. Therefore, part of the problem is to select a subset of all the possible equations SliCh that the :;ubset is complete and indepenuent from the viewpoint of the unknown variables. Such subsets are not unique.
The task of assembling equations CMr often be made easier by network transformations that replace portions of the circuit .vilh electrical equ ivalents that have fewer elements 1 , as illustrated in Figure 2. Replacements can be represented by algebroic expressions of the form:
where SC clenotes subconfiguration and the r's and s's denote the element values in subconfigurations.
In summary, the first stage or solving a circuit analysis problem consists largely of writing expressions that represent network transformations, conservation laws and branch relations.
1.1 Intelligent ComQ111.P,.r -Based Tutors
Circuit analysis is central to electrical engineering so it is important tint students master the skills it requires. As with many other en(Jineering and scientific topics, these skills are best learned through "doing", that is, through problem solving 2 . Problem .;;olving sessions are most effective when they are
·------------·-·-----··- ·--·-----

:j;.; ided by a tutor that is able to un(k:rstan· I what the: stuc!:C?r.t is <~ctua ll y do:n!J, net just what he oughl to be doing. We are in the process d IJuii<.Jing such a tutc r. Amcng its components is an e:<flt'r t :>yst·)m that understands the mathematical expressions tt1at sl:.:dents write. The next :_; ,~ci i on dr~~;c ribes tilis expert furth~r.
liH~ purpose ot this expert is to monitor each expression a stud.:;nt w: ites d< HJ quickly r ecogr,iz,~ c~ny errors in it. (With be~; inni11g ;,tc~dents we in ~8nd to pr int out o.nd expl ain errors as sucn as they occlir. iv1orc ach-anced students will be allowed to corn;:J iete a:tcn1pts to solve entire probl<":ns before their errors arc discussed.)
An advanced prototype of the expression expert has been written in OPS5 3 and Fran'!· Lisp~ . A brief description of this expert ful!ows.
2 .1 .C.!l rrent l(nowled_g_g_
The expr";ss:on expert coniains some basic mathematical knowledge, " fair amount of ci<cuit a.1::.lysis l;nowledge nnd <'.n expanding store of student modell ing/diagnostic knowleJse.
The mathernC' tical knowled\)e covers:
- tlw use of tile operators: +, ·, · I, (replace) und ··>
- .. the transitivity law [a+ b = b +a, a*b c' b·aj .
- e the associati vi ty law [a+ (b +c) = (a+ b)+ c].
- o equiv;o.lence[a+ O = a,a' l ~ a,a·o = 0].
The ci rcu it 2nalysis knowl edge covers:
- " simple network transformations (series and parallel equivalents as well as the removal of shorted elements but not Y-/1 transformations and more complicated equivalents)
- Kirchhoff 's current law
- branch relations for resistors, independen t voltage sources and independent current sources
The student modelling/diagnostic knowledge has been collected from SGme of CMU's best teachers uf circuit analysis and co,l sists of a taxonomy of errors ;: ;l d the misconceptions mc,st likely to cause them.
When presented with an expression, the exprcssion -expert attempts to answer the following questions:
- What is the expression supposed to represent? (current conservation? If so, for which node? A branch relation? If so, fo~ which branch? A network trans:orrnation? If so, of what sort?)
- o Is the expression correct? If not, what are the errors and what misconceptions on the part of the student are likely to have caused them?
To answer these questions quickly and eff iciently, the expert uses the strategies of divide-and -conquc.-, forward chaining and hjpothesize-and-tests Four steps are involved:
- Dissect the expression into subexpressions.
- Determine what each subexpression is supposed to represent (a voltage, current or resistance). If any subexpression is nut immediately rr::cn·Jniwble, move on to the next sL.l>e.<pression .
- From the rlJcouni?able subexpressions, iden tify the overall expression.
- Cienerato :u1d test hyrotheses for the identities of the hitherto unrecognized sul>expressions.
Tlw followin~J simp 1 e exarnr les illustrate how tho strategy works. IJoth examples are based on the circu it of Fi9ure 1.
In the first exarnp!e the student enters a correr:t expression for cu rrent conservation at node n2. This expre:;sion is: (v2-v i )/ri + (v2- v4)/ r2 = 0. The expression expert proceeds as follows:
- The expression is dissected into I he subexpressions (v2-v1 )/ r I Gild (v2-v4)/r2.
- Euch subC'xpression is examined separately. (v2-v1) 1s recooniLed as being the vol tage di fference !::<~tween nodes n2 and n1 . Tl1en (v2-v 1)/r1 is recogni..:;."d as being a current flowing in r1 . Similarly, (v2-v4)/ r2 is n:;cognized as being the current in wsistor r2.
- Knowing that the expression is a sum of currents, the expert reasons that it represents a current conservations and searches for an appropriate node(s). This node is found to be n2. Now the expert checks the overall expression to see that it is correct (that there are no missing currents and all the signs are right).
As a second example, consider the current conservation equation for node n4. A correct equation is: i + (v4·v3)/r4 + (v4·v1 )/ r3 + (v4·v2) / r2 = 0. Suppose that a student makes the mistake of writing r1 instead of r3 in the equation. The expression expert proceeds as follows:
- The expression is dissected into the subexpressions: i, (v4·v3)/r4, (v4·v1 )/r1 , and (V4·V3)/r2.
- Using reasoning like that described in the previous example, the expert recognizes i, (v4·v3)/r4 and (v4·v3) /r2 as currents. However, (v4·v1) / r1 does .not make immediate sense and is left unrecognized.
- The axpert ignores the unrecognized subexpression and concentrates on the others which, under examination, prove to be currents flowing out of a single node, namely, n4. Thus, of all the possibili ties, the expression comes closest to being a current conservation equation for node n4.
- In !ight of this information, it is clear that the unrecognized subexpression should represent the current through resistor r3, which it would if r1 were changed to r3. (One hypothesize·and·test cycle was required to achieve this.)
Two points are worth noting:
- Hypothesize.and·test cycles are time consuming and are used only for unrecognized subexpressions, not for subexpressions that are recognized but out of context For example, suppose that a student replaces the current in resistor r2 with the current in resistor r1. These two currents are the same. The expert recognizes this without having to employ any hypothesize·and·test cycles.
- To understand complicated mistakes the expert may have to use several hypothesize·and·test cycles. Suppose, for instance, the student writes: i + (v4·v3)/r4 + (v4·v I )/ r2 + (v4·v2)/r3 = 0. The first two terms of this expression are currents that could apply to either node n3 or n4. The second two terms are mistakes. To examine all the possibilities takes several hypothesize.and·test cycles.
2.3 Status
The existing version of the expression·expert can correctly identify most of lhe common errors made by students. It is written in OPSo and Franz·Lisp and uses MACSYMA 6 for solving systems of equations. It and its supporting structure, consists of 800 OPS5 rules, broken down as shown in Table I.
3 FUTURE WORK
Our plans for continuing work include expanding the expression·expert's store of l ~nowledge on student models and diagnostics, and extending its capabilities to include circuits with dependent sources This work is part of a project designed to produce intelligent tutors for basic topics in engineering and
| Task/Function | No . of rules |
|---|---|
| El ec tri ca l engi nP.er'i ng know l | edge 29 l |
| Mat hematical knowledge | 14 |
| Fquation so lving | 53 |
| Diag nostics/Tutoring | 84 |
| User in te r face | 167 |
| St udent modeling | 70 |
| llypo thP.s i ze - and-tes t | 50 |
| Scheduling | 14 |
| Housekeep ing | 57 al: 800 |
science 7 . The first of these tutors is targeted for completion in 1986 when it will be deployed in a network of powerful work stations that will make it readily available to all the electrical engineering undergraduates at Carnegie· Mellon Wniversity.
@inproceedings{ijcai1985p5,
title = {An Expert System for Understanding Expressions from Electric Circuit Analysis},
author = {Joobbani, Rostam and Talukdar, Sarosh},
booktitle = {Proceedings of the Ninth International Joint Conference on
Artificial Intelligence, {IJCAI-85}},
publisher = {International Joint Conferences on Artificial Intelligence},
editor = {Aravind Joshi},
pages = {23--24},
year = {1985},
note = {AI and Education},
url = {https://ijcai.org/proceedings/1985/5},
}
TY - CPAPER TI - An Expert System for Understanding Expressions from Electric Circuit Analysis AU - Joobbani, Rostam AU - Talukdar, Sarosh T2 - Proceedings of the Ninth International Joint Conference on Artificial Intelligence, IJCAI-85 PB - International Joint Conferences on Artificial Intelligence PY - 1985 SP - 23 EP - 24 UR - https://ijcai.org/proceedings/1985/5 ER -Copied
Machine-readable versions of this paper, for tools and AI agents:
Welcome
Future Conferences
AI Journal Division
IJCAI Proceedings
About IJCAI
IJCAI Awards