# Mathematics and circuit simulation

1. Jul 4, 2008

### ZPlayer

Hi, Everyone.

I am new to electronics in general so I have a rather uninformed question. It seems that a lot of circuits out there are presented "as is" without necessary mathematical calculations. When I took my physics, we were taught KCL, KVL, RLC etc. I enjoy deriving circuit behavior using math alone. The other day I verified LC tank voltage solve second-order ODE :)

For example, the other day I looked at this circuit: http://www.uoguelph.ca/~antoon/circ/555dcac.html [Broken]. Is it possible using calculus, differential equations and other math/electronics rules to describe why the square (pulse) output of the IC555 will be smoothened into sine wave by C4 and L1 ? Also, is there a general FREE software that I could use for comprehensive circuit simulation, so that mathematical expressions behind circuit function are shown?

Thanks to all.

Last edited by a moderator: May 3, 2017
2. Jul 5, 2008

### Redbelly98

Staff Emeritus
3. Jul 5, 2008

### prasannaworld

I suggest getting CircuitMaker Student Edition - it is freeware. This was the first circuit simulation software I used...

You can literally place the components and start the Simulation - both Analog and Digital

It is good as it requires no knowledge of SPICE. It can produce Multimeter readings and can produce Graphs of waveforms at certain points (chosen by the user) in the circuit.

http://babbage.cs.qc.edu/courses/cs343/Circuit_Maker/ [Broken]

Note: There is a Professional Edition of CircuitMaker, but it requires a budget... Of course if you have a budget you want to buy Electronics Workbench which has very interactive live simulations.

Last edited by a moderator: May 3, 2017
4. Jul 6, 2008

### maverick280857

Circuit simulation packages will "do it for you".

I believe your question really falls into the realm of mathematical modeling. You build a physical model, describe it mathematically and prep it for "use". That is how you get a set of tools. KVL, KCL are really restatements of energy and charge conservation. These, along with voltage-current relationships for linear and nonlinear elements give you the circuit model. Math alone won't help you solve circuit problems. You need to have a physical feel for the problem. Math is just the language of coherence and analysis. You need to make assumptions about how electrons will move, how conductors will behave and so on, to make any real progress.

But I think that to make good progress with circuits (both on paper and in practice) you need to have an intuitive functional feel and a decent knowledge of the numbers. Computer programs will (as Redbelly98 has pointed out) solve equations numerically...if you are looking for a mathematics-oriented approach, it would be good to do some of the work on paper and compare it with the software generated results.

Electronics Workbench is a pretty powerful tool..

5. Jul 7, 2008

### marcusl

Yes, you can describe the behavior of such circuits analytically. The appropriate differential equations are typically solved with Laplace transforms in the complex s plane. Look at books on "network theory" in your university library. (Sorry I can't recommend a particular book: the one on my shelf is out of print [Gupta, Transform and State Variable Methods in Linear Systems].)

6. Jul 7, 2008

### ZPlayer

Thanks to all who have replied to my original post. I was able to install LT Spice and have already modeled a simple RC circuit. I was wondering how do electronics engineers treat IC s (e.g. IC 555) for mathematical modeling. How is it possible to let the computer program know about the complex arrangement of op amps and transistors on the chip, so it model its behavior?

7. Jul 7, 2008

### Redbelly98

Staff Emeritus
IIRC, Laplace transforms only work for linear systems, eg. resistors, capacitors, and inductors. If your circuit has a diode or transistor, forget it.

8. Jul 7, 2008

### Redbelly98

Staff Emeritus
I'll address that shortly, but first: if you want a quick way to see what happens to the 555 output when filtered by the rest of the circuit, make an LTSpice circuit with a square wave voltage source and the part of your circuit that has R3, C4, L1, T1, Q1, Q2 and the "+5 to +15V" constant voltage.

It is possible to build sub-circuits to model things like op-amps and 555's, and then import them into LTSpice as single components. I know this has been done for op-amps and probably has been done for 555's as well. A lot of people have put their sub-circuit model files up at the Yahoo group (see link below), and that is also a good place to get advice. They do prefer that you try searching their message archives before asking questions, I guess to keep unnecessary traffic down to a minimum.

There is a learning curve to using subcircuits and models, but it is worth it once you get the hang of it.

At the Yahoo group, you can explore the "Files" section and look for op-amp and 555 models:
http://tech.groups.yahoo.com/group/LTspice/

Good luck and have fun!

Mark

Last edited by a moderator: May 3, 2017
9. Jul 7, 2008

### Phrak

That would be a worthy challenge if that's what you want to do. However, components like the 555 are treated as drop-in circuit elements. LT has a downloadable library of components.

http://www.linear.com/designtools/software/spice_models.jsp" [Broken]

If LT makes a version of the 555, it should be in there.

Last edited by a moderator: May 3, 2017