N
N
NDimo2015-09-29 11:28:51
Circuit design
NDimo, 2015-09-29 11:28:51

How to develop a program for modeling electrical circuits?

Hello!
I am a novice developer and decided to write a modest program for modeling electrical circuits. For example, such as: Electronics Workbench, SimOne, Qucs, etc. The program is for personal experience only!
The functionality will not be so huge, only the main ones: the design and imitation of circuits. The main thing was that it was possible to work with analog circuits.
Preferred programming language C# (preferably), C/C++, Java.
I have never written a program for the design of circuits and do not know where to start.
Can you point me in the right direction? And I'm also interested in whether there are such open source programs !?
Thank you!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Martyanov, 2015-09-29
@vilgeforce

You have chosen a problem for yourself! :-) An opensource schematic editor is available in KiCAD. There seems to be C++ and Qt. I would recommend using C ++ and Qt, since native code is faster, which is important when simulating. Well, Qt has excellent documentation and a large developer community. An additional bonus is cross-platform if the code is written correctly.

D
Dmitry Makarov, 2015-09-29
@DmitryITWorksMakarov

If I understood correctly, then with your program you want not only to draw circuits, but to simulate the electrical processes taking place in them.
The simplest thing that can be done in this area is the modeling of linear circuits under harmonic influence. That is, such circuits that use active resistances R, inductances L, capacitances C, sources of harmonic current J and sources of harmonic voltage E. In this case, such methods for calculating electrical circuits as the method of loop currents and the method of nodal potentials for complex amplitudes will help you. That is, according to the topology of the circuit, in accordance with the method, you make a matrix equation, solve it and get currents and voltages through each element and on each element, respectively.
The second step will be the implementation of the simulation of electrical processes with arbitrary exposure. Here you will need to use the Fourier transform apparatus. An arbitrary waveform can be represented as a superposition of harmonic signals. And for linear circuits with harmonic influence, you already know how to model processes.
The third step is the analysis of transient processes in linear circuits. Here, conditionally, a switch is added to the linear circuit, which at the time To, which turns on/off/switches. Using the operator method and the methods of loop currents or nodal potentials, we compose an operator matrix equation, solve it, rewrite the result from the operator into the time domain, and draw graphs.
Further, if there is still patience left, we move on to non-linear circuits. This is where the tinkering starts. Since nonlinear circuits do not have the property of superposition, then in the general case it will be necessary to honestly compose systems of differential equations and solve them numerically.
Popov's classic textbook "Fundamentals of Circuit Theory" will help you. Good luck.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question