Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #21   Report Post  
Old October 14th 04, 10:43 PM
John Larkin
 
Posts: n/a
Default

On Thu, 14 Oct 2004 22:33:03 -0700, "john jardine"
wrote:


"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.


Hell, the average programmer couldn't set himself on fire.

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



Actually, I've done a lot of pll and control system simulation in
Basic. I really began using an HP 9100 desktop calculator (for
steamship throttle control system simulation), graduated to FOCAL,
then RSTS/E Basic+, QuickBasic, and now PowerBasic.

I agree, C isn't logical. Why this bizarre and ugly hack of a PDP-11
assembler got to be the programming standard is beyond me. We're
paying the price big time.

John

  #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





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 01:20 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 RadioBanter.
The comments are property of their posters.
 

About Us

"It's about Radio"

 

Copyright © 2017