View Single Post
  #22   Report Post  
Old October 15th 04, 06:33 AM
john jardine
 
Posts: n/a
Default


"John Larkin" wrote in
message ...
On 11 Oct 2004 16:11:16 -0700, (Alan Horowitz)
wrote:

when a current just starts flowing into a RL or RC circuit, how does
the voltage "know" that it should be increasing exactly 63% during
each time-constant period?

And whence the number 63%?



How about this:

Charge a 1 farad capacitor to 1 volt and slap a 1 ohm resistor across
it. The resistor current is 1 amp, so the cap discharges, and the
voltage is at first declining at a rate of 1 volt per second. But
1/100 of a second later, the voltage is 0.99 volts, so the current is
only 0.99 amps, so the rate of discharge is only 0.99 volts per
second.

So we write a Basic program:

v = 1 ' charge the cap

for t = 1 to 100 ' then, for 1 second at 0.01 sec steps,

v = v - 0.01 * v ' discharge the cap by 1%

next

print v ' voltage is this, 1 second later


which simulates what I was doing above, but for a full second. The
value of v at the end is 0.36603 volts. That's close to 1/e, not exact
because I took 100 discrete steps, as an approximation to
continuous-time math. With 1000 steps, simulating 1 second of
discharge in 1 millisecond steps, you get 0.367700, even closer.

'e' is just nature's answer to a natural discharge curve.

John


Egads!. You've just given away the secret of Spice Transient Analysis. The
programmers will be calling for you with torches ablaze.
Why is it that if anyone wants to *clearly* explain an algorithm or
sequential idea, they'll use "Basic" or a very Basic looking 'Pseudo-code',
yet most programmes seem written in "C".
It just isn't logical.
regards
john