ПРОБЛЕМИ ВИЩОЇ ШКОЛИ. ІННОВАЦІЇ В ОСВІТІ ТА ВИРОБНИЦТВІ. КОМП’ЮТЕРНІ ТЕХНОЛОГІЇ В ОСВІТІ ТА ВИРОБНИЦТВІ. CIRCUIT SIMULATION USING SPARSE TABLEAU ANALYSIS IN MATLAB Vansáč M., research, Ing., post-grad. Technical University of Košice Letná, 9, 04200, Košice, Slovak Republic, e-mail: martin.vansac@tuke.sk Tomčíková I., research, Ing., Cand.Sc., Assoc. prof. Technical University of Košice Park Komenského, 3, 04200, Košice, Slovak Republic, e-mail: iveta.tomcikova@tuke.sk Perduľak J., research, Ing., post-grad. Technical University of Košice Letná, 9, 04200, Košice, Slovak Republic, e-mail: jan.perdulak@tuke.sk Introduction. Modeling and simulation are very important for analysis of the electronic system. Modeling presents a process by which the physical system will be transformed into an abstract form of the analyzed system, this means into set of equations. Simulation presents the process when a computer is used to obtain numerical or analytical solution. There are mostly three formulation methods for simulation of circuits, for circuit solution: nodal analysis (NA), modified nodal analysis (MNA) and sparse tableau analysis (STA). In this paper is used sparse tableau analysis, which is realized by GUI in MATLAB, for creation of circuit simulator. This circuit simulator was used for linear networks with no dynamic elements, i.e., linear resistive networks which consist from linear resistors, independent sources, and linear controlled sources [1]. Aim of the research. A goal in this paper is determine branch currents, nodal and branch voltages for every part of the electric circuit with sparse tableau analysis numerically and symbolically. The behavior of the electric circuit is expressed by set of equations, which are based on combining of the element equations and Kirchhoff’s Current Law (KCL) and Voltage Law (KVL). Sparse tableau analysis consists from the following steps: a) Write Kirchhoff’s Current Law in form Ai=0, where A presents a reduced incidence matrix and i is a vector of all branch currents, b) Write Kirchhoff’s Voltage Law in form u=ATv, where u is a vector of all branch voltages and v is a vector of all nodal voltages to ground, c) Write the element equations as Zi+Yu=s, where Z and Y are matrices and s is a vector of independent sources. For obtaining element equations in linear algebraic form we can use the following conditions. If edge ek is a resistor, then uk - Rik = 0. If edge ek is an independent source, then uk=U or Ik=I. If edge ek is a controlled source, then for a voltage controlled voltage source we can write uk = αux, for a current controlled voltage source uk = αix, for a voltage controlled current source ik = αux and for a current controlled current source ik = αix. Combining these equations with Kirchhoff’s Current and Voltage Laws, we will get the following system: , (1) where Z and Y are (m x m) matrices and s is a known (m x 1) vector. STA has the following advantages: it can be applied to any circuit, small or large; the equations can be created directly from the input circuit specification and the matrix coefficients are very sparse, i.e. matrix has mostly zero elements (although STA matrix is larger in dimension than the MNA matrix) [2]. Experimental part and result obtained. Based on STA was created the following electric circuit simulator. For practical utilize of proposed simulator, program user has to know principles of STA method and also properties of electric components. To verify of proposed simulator was used electronic circuit, which is shown in fig. 1. Proposed simulator in GUI environment is in fig. 2. Figure 1 – Tested electric circuit 19 ПРОБЛЕМИ ВИЩОЇ ШКОЛИ. ІННОВАЦІЇ В ОСВІТІ ТА ВИРОБНИЦТВІ. КОМП’ЮТЕРНІ ТЕХНОЛОГІЇ В ОСВІТІ ТА ВИРОБНИЦТВІ. Figure 2 – Proposed electric simulator A manual or instructions for correct implementation of the simulator are following. At the first, in the left half of the GUI simulator (ENTER CIRCUIT CHARACTERISTICS), after starting the program, the program user has to set number of branches and nodes and then press the button Load number of branches and nodes in the top of GUI simulator. After this, the table will appear below the previous button. This table is used to load a reduced incidence matrix A, and for load matrices Z, Y and S. Under this table there is button Load matrix to load matrix and popupmenu, from which user can chose required matrix. When required matrix is selected and individual components are inserted into the table, then user can press the button Load matrix. This procedure is necessary for each matrix. A status of each action is illustrated in orange field below previous button and popupmenu. If number of branches and nodes and each matrix are inserted, then user can solve circuit by pressing the button Calculate currents and voltages. After this, result will appear in the right half (CALCULATED CURRENTS AND VOLTAGES). Solution with all matrices with components is simply viewed in the fig. 3. To verify a numerical solution was used these parameters: R1=4k7 Ω, R2=100 Ω, R3=4k7 Ω, α=30, I0=10 mA, U0=6V DC. Results of this solution are in standard SI units (Ampere and Voltage) and they are shown in fig. 4. Figure 4 – Results of numerical solution Figure 3 – Solution of the circuit Conclusions. This paper is aimed at numerical and analytical solution of electric circuit by STA in GUI MATLAB environment. GUI simulator can help with simulation of the circuit and can be useful in the study of electric subjects. For correct results it is necessary to insert individual components into the right place in the matrix. User can verify its theoretical knowledge and can analyze behavior of circuit before its practical realization. Acknowledgement. The paper has been prepared under support of Slovak grant projects KEGA No. 005TUKE4/2012, KEGA No. 024TUKE-4/2012 and VEGA No. 1/0559/12. REFERENCES 1. Albustani H. Modelling Methods for Testability Analysis of Analog Integrated Circuits Based on Pole-Zero Analysis // Der Fakultät für Ingenieurwissenschaften der Universität Duisburg-Essen. – Germany, 2004. 2. Najm F.N. Circuit simulation // John Wiley & Sons, Inc. – Hoboken, New Jersey. – ISBN 978-0-470-53871-5, 2010. 20