improving an electronic circuit simulator based on...
TRANSCRIPT
![Page 1: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/1.jpg)
Improving an Electronic Circuit Simulator based on Homotopy
Methods
João Erik Melo Centro de Informática
Universidade Federal de Pernambuco [email protected]
Advisor: Ljiljana Trajkovic, professor
School of Engineering Science Simon Fraser Univeresity
![Page 2: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/2.jpg)
Outline
Why simulate electronic circuits
What are DC operating points
Homotopy Methods
Parser
Improvements
Conclusion
![Page 3: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/3.jpg)
Why simulate
![Page 4: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/4.jpg)
Why simulate
![Page 5: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/5.jpg)
Why simulate
![Page 6: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/6.jpg)
Finding DC operating points
Electronic Circuits Simulators
![Page 7: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/7.jpg)
Finding DC operating points Electronic Circuits Simulators: circuit description
![Page 8: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/8.jpg)
Finding DC operating points
• Alternative simulator • Composed for two parts
Parser Homotopy algorithm
By Edward Chan By Heath Hofmann
![Page 9: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/9.jpg)
Finding DC operating points
NETLIST FILE
Vcc 1 0 15 R1 2 3 10K R2 1 3 15K Q1 1 3 2 Q2N2222
PARSER
HOMOTOPY
F(1) = X(1) – X(2)/R1; F(2) = IS*exp(N*X(3)-X(2)) + X(1); F(3) = X(2)/R1 + X(1)/R2; … JAC(1,1) = 1; JAC(1,2) = -1/R1; …
System of equations and Jacobian
![Page 10: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/10.jpg)
Finding DC operating points
DC Operating
Points: Voltages
and Currents
HOMOTOPY
F(1) = X(1) – X(2)/R1; F(2) = IS*exp(N*X(3)-X(2)) + X(1); F(3) = X(2)/R1 + X(1)/R2; … JAC(1,1) = 1; JAC(1,2) = -1/R1; …
System of equations and Jacobian
![Page 11: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/11.jpg)
Finding DC operating points
NETLIST FILE
Vcc 1 0 15 R1 2 3 10K R2 1 3 15K Q1 1 3 2 Q2N2222
PARSER
F(1) = X(1) – X(2)/R1; F(2) = IS*exp(N*X(3)-X(2)) + X(1); F(3) = X(2)/R1 + X(1)/R2; … JAC(1,1) = 1; JAC(1,2) = -1/R1; …
HOMOTOPY
System of equations and Jacobian
DC Operating Points:
Voltages and
Currents
![Page 12: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/12.jpg)
Homotopy Methods
A numerical method used to find zeros of a system of equations.
Create a simpler problem and then deform this problem into the original one.
A series of zeros is computed from the simple problem until end in the problem of interest.
![Page 13: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/13.jpg)
Homotopy Methods
Given a system of equations to be solved:
Create a new function called Homotopy Function:
This function is chosen in such form that deforms a simpler function G(x) into F(x).
![Page 14: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/14.jpg)
Homotopy Methods
The deformation is made by variation of λ from 0 to 1 continuously.
In such way that:
and
![Page 15: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/15.jpg)
Homotopy Methods
Simple Example of homotopy function:
Choosing G(x) = (x – a):
Then for λ = 0, H(x, 0) = (x – a)
And for λ = 1, H(x, 1) = F(x)
![Page 16: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/16.jpg)
Homotopy Methods
The objective is found the set:
Inside this set we hope find a continuous path which connect zeros of
to zeros of
![Page 17: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/17.jpg)
Homotopy Methods
Font: Kenneth L. Judd, 1998
![Page 18: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/18.jpg)
Homotopy Methods
To trace this curve we use a method that include differentiate the Homotopy Function with respect to x and λ.
Then use some numerical method to solve the differential equation(s) created.
![Page 19: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/19.jpg)
The Parser
The homotopy method require the set of equations.
For some circuits is possible write by hand.
Not for others.
![Page 20: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/20.jpg)
The Parser
The Parser is a C++ computer program developed by Edward Chan.
Receive as input a SPICE input file (Netlist). Rc1 1 2 2.2K R1 2 3 1K Rc2 1 4 2.2K Q1 2 5 6 Q2N2222A Q2 4 3 6 Q2N2222A Vin 5 0 5.0 RE 6 0 3.3K R2 3 0 3.3K
.model Q2N2222A NPN BF=150 IS=1E-16 BR=7.5
![Page 21: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/21.jpg)
The Parser
Generates nodal or modified nodal equations.
![Page 22: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/22.jpg)
The Parser
Problem: Equations were not in the correct form required by MATLAB algorithm.
![Page 23: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/23.jpg)
The Parser
Problems: Equations and Jacobian were not in the correct form required by MATLAB algorithm.
Main problem: Floating Voltage Source.
![Page 24: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/24.jpg)
The Parser
For Nodal Analysis
Missing supernode equation each floating source.
Missing one jacobian for each floating source.
For Modified Nodal Analysis
Error in the numerating of the equations.
Missing specific jacobinas for each source.
Other errors in many jacobians.
![Page 25: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/25.jpg)
The Parser
Classes of Parser
![Page 26: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/26.jpg)
The Parser
Actions performed:
Added one more member functions in the Component class: printSuperNode(…)
Added one more member function in the Node class: printSuperNodal(…)
Modified existent functions in the Component class: specialPrintJac(…)
Created function that print the list of components and nodes with respective connections to make the maintenance easier.
![Page 27: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/27.jpg)
Conclusion
Contribution in a important project on Electronics field.
Improve the Parser created by Edward Chan.
Figuring out the great part of the problems in its operation and results.
![Page 28: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/28.jpg)
Conclusion
Acquire knowledge in Homotopy Methods.
Learn how to use Pspice simulator.
Improve my skills in Matlab script and C++ program language.
Improve English skill.
![Page 29: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/29.jpg)
![Page 30: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/30.jpg)
Erik’s Brasil
![Page 31: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/31.jpg)
Roadmap
Brasil
Presentation
Industry and politics
Nature and Turism
Cosine
Football (Soccer)
Culture
Recife (my City)
![Page 32: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/32.jpg)
Brasil
Official Language: Portuguese
Population:
202 032 714 hab (5º)
Area: +8 500 000 Km² (5º)
Borders: 11 countries
![Page 33: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/33.jpg)
Brazilian Flag
![Page 34: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/34.jpg)
Brazilian Flag
![Page 35: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/35.jpg)
Industry & Politics
Presidents
Dilma Rousseff
Lula da Silva
Presidential elections 2014
![Page 36: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/36.jpg)
Industry & Politics
13th biggest Petrol Company in the world.
![Page 37: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/37.jpg)
Nuture & Turism
Amazonas
![Page 38: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/38.jpg)
Nuture & Turism
Rio de Janeiro
![Page 39: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/39.jpg)
Nuture & Turism
Gramado
![Page 40: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/40.jpg)
Nuture & Turism
Northeast
![Page 41: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/41.jpg)
Nuture & Turism
Northeast
![Page 42: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/42.jpg)
Cosine
Rice and beans
![Page 43: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/43.jpg)
Cosine
Cuscuz and cheese
Corn foods
![Page 44: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/44.jpg)
Culture
Capoeira
Frevo
![Page 45: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/45.jpg)
Culture
Chimarrão
Samba
![Page 46: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/46.jpg)
Climate
40ºC Natal - 10ºC Caixas
Average: 25ºC
![Page 47: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/47.jpg)
Recife, my city
![Page 48: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/48.jpg)
Recife
Population:
1 599 513 hab
Area: + 218 Km²
![Page 49: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/49.jpg)
Recife
Distance of Recife to Vancouver
![Page 50: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/50.jpg)
Universidade Federal de Pernambuco
![Page 51: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/51.jpg)
Recife
![Page 52: Improving an Electronic Circuit Simulator based on ...ljilja/cnl/projects/Homotopy/parser/report/Improving_a... · Improving an Electronic Circuit Simulator based on Homotopy Methods](https://reader033.vdocuments.net/reader033/viewer/2022052423/5f07238a7e708231d41b7f91/html5/thumbnails/52.jpg)
See you in Brazil