Create Circuit Simulation
Clash Royale CLAN TAG#URR8PPP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;
up vote
5
down vote
favorite
I wonder if someone can help me. How will one go about to create a simple circuit simulator? Similar to Multisim, just a lot simpler!
Basically, I only need resistors, capacitors, inductors and voltage sources.
Is there a tutorial I can follow, to create this using C# and Visual Studio?
simulation programming
add a comment |Â
up vote
5
down vote
favorite
I wonder if someone can help me. How will one go about to create a simple circuit simulator? Similar to Multisim, just a lot simpler!
Basically, I only need resistors, capacitors, inductors and voltage sources.
Is there a tutorial I can follow, to create this using C# and Visual Studio?
simulation programming
1
Must you have AC and DC and oppoint and thermal noise?
â analogsystemsrf
Sep 3 at 5:09
1
AC and DC yes, thermal noise not so important to me now.
â fitzchivalry
Sep 3 at 5:22
add a comment |Â
up vote
5
down vote
favorite
up vote
5
down vote
favorite
I wonder if someone can help me. How will one go about to create a simple circuit simulator? Similar to Multisim, just a lot simpler!
Basically, I only need resistors, capacitors, inductors and voltage sources.
Is there a tutorial I can follow, to create this using C# and Visual Studio?
simulation programming
I wonder if someone can help me. How will one go about to create a simple circuit simulator? Similar to Multisim, just a lot simpler!
Basically, I only need resistors, capacitors, inductors and voltage sources.
Is there a tutorial I can follow, to create this using C# and Visual Studio?
simulation programming
asked Sep 3 at 4:29
fitzchivalry
466
466
1
Must you have AC and DC and oppoint and thermal noise?
â analogsystemsrf
Sep 3 at 5:09
1
AC and DC yes, thermal noise not so important to me now.
â fitzchivalry
Sep 3 at 5:22
add a comment |Â
1
Must you have AC and DC and oppoint and thermal noise?
â analogsystemsrf
Sep 3 at 5:09
1
AC and DC yes, thermal noise not so important to me now.
â fitzchivalry
Sep 3 at 5:22
1
1
Must you have AC and DC and oppoint and thermal noise?
â analogsystemsrf
Sep 3 at 5:09
Must you have AC and DC and oppoint and thermal noise?
â analogsystemsrf
Sep 3 at 5:09
1
1
AC and DC yes, thermal noise not so important to me now.
â fitzchivalry
Sep 3 at 5:22
AC and DC yes, thermal noise not so important to me now.
â fitzchivalry
Sep 3 at 5:22
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
26
down vote
accepted
I wrote the simulation engine that powers CircuitLab from scratch: from the sparse matrix library up through component models and simulation modes. My co-founder wrote the front-end. It ended up being an unbelievably huge programming project, but one I'm quite proud of. If you're up for the challenge, writing a circuit simulator may be one of the most rewarding programming projects you'll ever tackle.
At a high level, you just need to:
- Turn a network of components into a system of equations (non-linear differential equations).
- Numerically solve the system of equations (using sparse matrix techniques).
I don't know of an online tutorial, but I've tried to document a lot of this as I write the "Ultimate Electronics" textbook, especially in Chapter 2. There are also a number of 1990s-era books on the topic of circuit simulation, though I don't have them handy at the moment.
My suggestion would be to start from only voltage sources and resistors, and continue building from there. Good luck.
Amazing, thank you!
â fitzchivalry
Sep 3 at 5:20
Thank you for this answer and book! Out of curiosity, as an estimation, can you tell how many lines of code it ended up being?
â user1584421
Sep 3 at 18:14
add a comment |Â
up vote
2
down vote
I doubt there are online tutorials because it's something pretty specific.
However, one source of information you can definitely use is open source code. One I know of is SpicePy - it's written in Python, but it's very well documented, although the Python language is very descriptive just by itself. You can use such library in your Python code or though the Telegram Bot.
What you'll need is some sort of way to describe the topology of your circuit. One common approach is the use of netlists, which are essentially text that describe each component in the circuit and how it's connect to the other ones (e.g. through node numbers). You can use this strategy or whatever one seems easier for you to take; parsing it and making it an actual graph (i.e. is it meaningful?) out of it might take you some time.
After that, one common way to analyze circuits in simulators is nodal analysis; then resort to some linear algebra library to solve the system of equations (which will surely be linear), such as Math.Net.
Awesome, thanks a lot.
â fitzchivalry
Sep 5 at 1:16
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
26
down vote
accepted
I wrote the simulation engine that powers CircuitLab from scratch: from the sparse matrix library up through component models and simulation modes. My co-founder wrote the front-end. It ended up being an unbelievably huge programming project, but one I'm quite proud of. If you're up for the challenge, writing a circuit simulator may be one of the most rewarding programming projects you'll ever tackle.
At a high level, you just need to:
- Turn a network of components into a system of equations (non-linear differential equations).
- Numerically solve the system of equations (using sparse matrix techniques).
I don't know of an online tutorial, but I've tried to document a lot of this as I write the "Ultimate Electronics" textbook, especially in Chapter 2. There are also a number of 1990s-era books on the topic of circuit simulation, though I don't have them handy at the moment.
My suggestion would be to start from only voltage sources and resistors, and continue building from there. Good luck.
Amazing, thank you!
â fitzchivalry
Sep 3 at 5:20
Thank you for this answer and book! Out of curiosity, as an estimation, can you tell how many lines of code it ended up being?
â user1584421
Sep 3 at 18:14
add a comment |Â
up vote
26
down vote
accepted
I wrote the simulation engine that powers CircuitLab from scratch: from the sparse matrix library up through component models and simulation modes. My co-founder wrote the front-end. It ended up being an unbelievably huge programming project, but one I'm quite proud of. If you're up for the challenge, writing a circuit simulator may be one of the most rewarding programming projects you'll ever tackle.
At a high level, you just need to:
- Turn a network of components into a system of equations (non-linear differential equations).
- Numerically solve the system of equations (using sparse matrix techniques).
I don't know of an online tutorial, but I've tried to document a lot of this as I write the "Ultimate Electronics" textbook, especially in Chapter 2. There are also a number of 1990s-era books on the topic of circuit simulation, though I don't have them handy at the moment.
My suggestion would be to start from only voltage sources and resistors, and continue building from there. Good luck.
Amazing, thank you!
â fitzchivalry
Sep 3 at 5:20
Thank you for this answer and book! Out of curiosity, as an estimation, can you tell how many lines of code it ended up being?
â user1584421
Sep 3 at 18:14
add a comment |Â
up vote
26
down vote
accepted
up vote
26
down vote
accepted
I wrote the simulation engine that powers CircuitLab from scratch: from the sparse matrix library up through component models and simulation modes. My co-founder wrote the front-end. It ended up being an unbelievably huge programming project, but one I'm quite proud of. If you're up for the challenge, writing a circuit simulator may be one of the most rewarding programming projects you'll ever tackle.
At a high level, you just need to:
- Turn a network of components into a system of equations (non-linear differential equations).
- Numerically solve the system of equations (using sparse matrix techniques).
I don't know of an online tutorial, but I've tried to document a lot of this as I write the "Ultimate Electronics" textbook, especially in Chapter 2. There are also a number of 1990s-era books on the topic of circuit simulation, though I don't have them handy at the moment.
My suggestion would be to start from only voltage sources and resistors, and continue building from there. Good luck.
I wrote the simulation engine that powers CircuitLab from scratch: from the sparse matrix library up through component models and simulation modes. My co-founder wrote the front-end. It ended up being an unbelievably huge programming project, but one I'm quite proud of. If you're up for the challenge, writing a circuit simulator may be one of the most rewarding programming projects you'll ever tackle.
At a high level, you just need to:
- Turn a network of components into a system of equations (non-linear differential equations).
- Numerically solve the system of equations (using sparse matrix techniques).
I don't know of an online tutorial, but I've tried to document a lot of this as I write the "Ultimate Electronics" textbook, especially in Chapter 2. There are also a number of 1990s-era books on the topic of circuit simulation, though I don't have them handy at the moment.
My suggestion would be to start from only voltage sources and resistors, and continue building from there. Good luck.
answered Sep 3 at 4:54
compumike
1,5941015
1,5941015
Amazing, thank you!
â fitzchivalry
Sep 3 at 5:20
Thank you for this answer and book! Out of curiosity, as an estimation, can you tell how many lines of code it ended up being?
â user1584421
Sep 3 at 18:14
add a comment |Â
Amazing, thank you!
â fitzchivalry
Sep 3 at 5:20
Thank you for this answer and book! Out of curiosity, as an estimation, can you tell how many lines of code it ended up being?
â user1584421
Sep 3 at 18:14
Amazing, thank you!
â fitzchivalry
Sep 3 at 5:20
Amazing, thank you!
â fitzchivalry
Sep 3 at 5:20
Thank you for this answer and book! Out of curiosity, as an estimation, can you tell how many lines of code it ended up being?
â user1584421
Sep 3 at 18:14
Thank you for this answer and book! Out of curiosity, as an estimation, can you tell how many lines of code it ended up being?
â user1584421
Sep 3 at 18:14
add a comment |Â
up vote
2
down vote
I doubt there are online tutorials because it's something pretty specific.
However, one source of information you can definitely use is open source code. One I know of is SpicePy - it's written in Python, but it's very well documented, although the Python language is very descriptive just by itself. You can use such library in your Python code or though the Telegram Bot.
What you'll need is some sort of way to describe the topology of your circuit. One common approach is the use of netlists, which are essentially text that describe each component in the circuit and how it's connect to the other ones (e.g. through node numbers). You can use this strategy or whatever one seems easier for you to take; parsing it and making it an actual graph (i.e. is it meaningful?) out of it might take you some time.
After that, one common way to analyze circuits in simulators is nodal analysis; then resort to some linear algebra library to solve the system of equations (which will surely be linear), such as Math.Net.
Awesome, thanks a lot.
â fitzchivalry
Sep 5 at 1:16
add a comment |Â
up vote
2
down vote
I doubt there are online tutorials because it's something pretty specific.
However, one source of information you can definitely use is open source code. One I know of is SpicePy - it's written in Python, but it's very well documented, although the Python language is very descriptive just by itself. You can use such library in your Python code or though the Telegram Bot.
What you'll need is some sort of way to describe the topology of your circuit. One common approach is the use of netlists, which are essentially text that describe each component in the circuit and how it's connect to the other ones (e.g. through node numbers). You can use this strategy or whatever one seems easier for you to take; parsing it and making it an actual graph (i.e. is it meaningful?) out of it might take you some time.
After that, one common way to analyze circuits in simulators is nodal analysis; then resort to some linear algebra library to solve the system of equations (which will surely be linear), such as Math.Net.
Awesome, thanks a lot.
â fitzchivalry
Sep 5 at 1:16
add a comment |Â
up vote
2
down vote
up vote
2
down vote
I doubt there are online tutorials because it's something pretty specific.
However, one source of information you can definitely use is open source code. One I know of is SpicePy - it's written in Python, but it's very well documented, although the Python language is very descriptive just by itself. You can use such library in your Python code or though the Telegram Bot.
What you'll need is some sort of way to describe the topology of your circuit. One common approach is the use of netlists, which are essentially text that describe each component in the circuit and how it's connect to the other ones (e.g. through node numbers). You can use this strategy or whatever one seems easier for you to take; parsing it and making it an actual graph (i.e. is it meaningful?) out of it might take you some time.
After that, one common way to analyze circuits in simulators is nodal analysis; then resort to some linear algebra library to solve the system of equations (which will surely be linear), such as Math.Net.
I doubt there are online tutorials because it's something pretty specific.
However, one source of information you can definitely use is open source code. One I know of is SpicePy - it's written in Python, but it's very well documented, although the Python language is very descriptive just by itself. You can use such library in your Python code or though the Telegram Bot.
What you'll need is some sort of way to describe the topology of your circuit. One common approach is the use of netlists, which are essentially text that describe each component in the circuit and how it's connect to the other ones (e.g. through node numbers). You can use this strategy or whatever one seems easier for you to take; parsing it and making it an actual graph (i.e. is it meaningful?) out of it might take you some time.
After that, one common way to analyze circuits in simulators is nodal analysis; then resort to some linear algebra library to solve the system of equations (which will surely be linear), such as Math.Net.
answered Sep 3 at 15:16
edmz
1212
1212
Awesome, thanks a lot.
â fitzchivalry
Sep 5 at 1:16
add a comment |Â
Awesome, thanks a lot.
â fitzchivalry
Sep 5 at 1:16
Awesome, thanks a lot.
â fitzchivalry
Sep 5 at 1:16
Awesome, thanks a lot.
â fitzchivalry
Sep 5 at 1:16
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2felectronics.stackexchange.com%2fquestions%2f394068%2fcreate-circuit-simulation%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
Must you have AC and DC and oppoint and thermal noise?
â analogsystemsrf
Sep 3 at 5:09
1
AC and DC yes, thermal noise not so important to me now.
â fitzchivalry
Sep 3 at 5:22