Plug-ins, Hosts, Apps,
Hardware, Soundware
Developers
(Brands)
Videos Groups
Whats's in?
Banks & Patches
Download & Upload
Music Search
KVR
   
KVR Forum » DSP and Plug-in Development
Thread Read
C++ Code Simulating Circuit Components?
Goto page 1, 2, 3, 4  Next
djomni
KVRist
- profile
- pm
- e-mail
PostPosted: Thu Jun 07, 2012 7:54 pm reply with quote
I was just wondering if anyone knows of a source to get bits of code that would, for example, simulate a capacitor or resistor? If not, could anyone recommend some reading material on this subject?


And allow me to include a few conditions: I am only interested in comments and materials relating to circuit SIMULATION. I may not an electrical or software engineer, but I am a mechanical engineer. I have taken linear algebra, differential equations, as well as circuits, and electrical physics.
Last edited by djomni on Thu Jun 07, 2012 10:54 pm; edited 1 time in total
^ Joined: 05 Jul 2011  Member: #260144  
Meffy
Skunk Mod
- profile
- pm
- e-mail
PostPosted: Thu Jun 07, 2012 7:58 pm reply with quote
Disclaimer: This isn't exactly what you want, but might help.

The cool kids use SPICE.

http://en.wikipedia.org/wiki/SPICE <--(this kind)

Other circuit emulators exist. See the link at the bottom of that Wikipedia page for more. I don't know about the translation from SPICE to code, but bet there are people here who are very familiar with it.

Or you could learn some basic electronic engineering and write your own lib. :-}
^ Joined: 10 Jun 2004  Member: #29021  Location: Pony Pasture
djomni
KVRist
- profile
- pm
- e-mail
PostPosted: Thu Jun 07, 2012 8:02 pm reply with quote
This may potentially be helpful, but will it output code for the individual components? I'm building custom blocks for simulink models, so I do need code.

Nevermind. You beat me to it. I appreciate it
^ Joined: 05 Jul 2011  Member: #260144  
Meffy
Skunk Mod
- profile
- pm
- e-mail
PostPosted: Thu Jun 07, 2012 8:09 pm reply with quote
I've reached the limit of my knowledge of this. (Wow, that wasn't far, was it?) I'd love to dig into circuit emulation software, but every time I think there'll be time something else comes up. I'll keep an eye on the thread because I'd like to know more too. Glad you asked.
^ Joined: 10 Jun 2004  Member: #29021  Location: Pony Pasture
djomni
KVRist
- profile
- pm
- e-mail
PostPosted: Thu Jun 07, 2012 8:16 pm reply with quote
Oh, definitely. If I can find a resource for this, I'll be able to make hardware emulator plugins in no-time flat with nothing but a circuit diagram. It will be beautiful.
^ Joined: 05 Jul 2011  Member: #260144  
Meffy
Skunk Mod
- profile
- pm
- e-mail
PostPosted: Thu Jun 07, 2012 8:20 pm reply with quote
Might be more to it than that, or they'd be all over the place. :-} My understanding is that CPU power is the limiting factor. That changes every year though, so last February's discussion could be obsolete today. I'll be interested in seeing what people who use this kind of software have to say. I'll shut up now and wait for them.
^ Joined: 10 Jun 2004  Member: #29021  Location: Pony Pasture
djomni
KVRist
- profile
- pm
- e-mail
PostPosted: Thu Jun 07, 2012 8:32 pm reply with quote
I used to do it in college all the time. But, the EE computer lab had endless custom blocks. The models are not hard to export to pretty much any language you'd like. I haven't yet attempted to integrate one of these code models into the steinberg architecture yet, but at worst it's just a little ratio mapping.

The reason they aren't all over the place is that the individual license for matlab/simulink cost me about $2000.
Last edited by djomni on Thu Jun 07, 2012 8:39 pm; edited 1 time in total
^ Joined: 05 Jul 2011  Member: #260144  
djomni
KVRist
- profile
- pm
- e-mail
PostPosted: Thu Jun 07, 2012 8:34 pm reply with quote
Incidentally, I really wish they'd figure out that 0 and 1 aren't the only two numbers. haha
^ Joined: 05 Jul 2011  Member: #260144  
djomni
KVRist
- profile
- pm
- e-mail
PostPosted: Thu Jun 07, 2012 9:01 pm reply with quote
This is pimp: http://www.mathworks.com/matlabcentral/fileexchange/25028-ma tlab-%3C-%3E-pspice-interface
^ Joined: 05 Jul 2011  Member: #260144  
djomni
KVRist
- profile
- pm
- e-mail
PostPosted: Thu Jun 07, 2012 9:04 pm reply with quote
On the same note: http://www.mathworks.com/matlabcentral/fileexchange/17838-sp ice3import
^ Joined: 05 Jul 2011  Member: #260144  
mystran
KVRAF
- profile
- pm
- e-mail
- www
PostPosted: Thu Jun 07, 2012 9:41 pm reply with quote
I think "code for individual components" is a fundamentally flawed concept; there are much better ways to do it. Sorry for not being more helpful this time, but I'd like to ask: why do you want to use Simulink in the first place? Is that just because it'll generate you the complete code?
----
<- my plugins | my music -> @Soundcloud
^ Joined: 11 Feb 2006  Member: #97939  Location: Helsinki, Finland
mystran
KVRAF
- profile
- pm
- e-mail
- www
PostPosted: Thu Jun 07, 2012 9:46 pm reply with quote
Meffy wrote:
My understanding is that CPU power is the limiting factor.


CPU power isn't a limiting factor for circuit simulation. Unless something terrible happens, I'll be able to prove it soon enough.
----
<- my plugins | my music -> @Soundcloud
^ Joined: 11 Feb 2006  Member: #97939  Location: Helsinki, Finland
djomni
KVRist
- profile
- pm
- e-mail
PostPosted: Thu Jun 07, 2012 9:56 pm reply with quote
I use simulink because I have it, I'm familiar with it, and I know how to make it do whatever I want.
^ Joined: 05 Jul 2011  Member: #260144  
djomni
KVRist
- profile
- pm
- e-mail
PostPosted: Thu Jun 07, 2012 10:15 pm reply with quote
mystran wrote:
I think "code for individual components" is a fundamentally flawed concept


How is this a flawed concept? The way I see it having these blocks allow for the creation of hardware emulation systems in a way that accurately represents the original product allowing for a more accurate emulation. What other methods are you referring to? Maybe a software engineer would find a different method easier, but as a mechanical engineer, I find HUGE strings of code a little tiresome.
^ Joined: 05 Jul 2011  Member: #260144  
mystran
KVRAF
- profile
- pm
- e-mail
- www
PostPosted: Thu Jun 07, 2012 10:17 pm reply with quote
Well, here's some useful insights into circuit simulation; it should probably get you started: http://qucs.sourceforge.net/tech/technical.html
----
<- my plugins | my music -> @Soundcloud
^ Joined: 11 Feb 2006  Member: #97939  Location: Helsinki, Finland
All times are GMT - 8 Hours

Printable version
Page 1 of 4
Goto page 1, 2, 3, 4  Next
Display posts from previous:   
ReplyNew TopicPrevious TopicNext Topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Username: Password:  
KVR Developer Challenge 2012