Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old October 13th 04, 01:10 AM
 
Posts: n/a
Default

Nice job Robert, I really liked it
Art
"Robert Monsen" wrote in message
news:6gKad.230613$D%.163996@attbi_s51...
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%?


Suppose you are trying to fill up a box with balls. However, for some
strange reason, you've decided that each time you throw in balls, you'll
throw in 1/2 of the balls that will fit in the remaining space.

At the first second, you have 1/2 the balls. Next second, you'll have
that plus 1/2 of the remaining space, which is 1/2 + 1/4 = 3/4. The
third second, you'll have that plus 1/2 the remaining space, ie, 1/2 +
1/4 + 1/8 = 7/8...

So, the number of balls at any time t will be:

B(t) = 1 - (1/2)^t

Thus, after 3 seconds, there will be B(3) = 1 - (1/2)^3 = 1 - 1/8 = 7/8,
just like above.

Now, apply that same reasoning, only instead of using the ratio 1/2, use
the ratio 1/e (since we are applying arbitrary rules)

Then

B(t) = 1 - (1/e)^t

After the first second, you'll have

B(1) = 1 - (1/e)^1 = 1 - 1/e = 0.632 (that is, 63%)

Strange coincidence, isn't it? It happens because when you are charging
a capacitor through a resistor, you are throwing balls, in the form of
charges, into a box (the capacitor), and the number of charges you throw
at any given time (the current) depends on how many charges are already
on the capacitor (the voltage).

Each step of the formula above is one time constant, RC. By dividing out
the RC, you can get the answer given seconds, ie

B(t) = 1 - (1/e)^(t/RC) = 1 - e^(-t/RC)

Where B is the percentage 'filled' the capacitor is (ie, what percentage
it is of the input voltage).

Why is 1/e used instead of 1/2? That has to do with the fact that we
must have a continuous solution, not a solution based on ratios of
existing values; the rate of change of the current (ie, how many balls
we throw in per unit time) is proportional to the voltage remaining,
which is continuously changing. Using 1/e instead of 1/2 allows us to
generalize to this, in the same way as the compound interest formula
allows us to compute 'continuously compounding' interest.

--
Regards,
Robert Monsen

"Your Highness, I have no need of this hypothesis."
- Pierre Laplace (1749-1827), to Napoleon,
on why his works on celestial mechanics make no mention of God.



  #2   Report Post  
Old October 13th 04, 03:52 AM
Robert Monsen
 
Posts: n/a
Default

wrote:
Nice job Robert, I really liked it
Art


Thanks Art. I enjoyed thinking about it and writing it. The exponential
function is everywhere in nature, and, despite all the mathematical
machinery required to analyze it in detail, its a pretty simple concept.

Regards,
Bob Monsen

"Robert Monsen" wrote in message
news:6gKad.230613$D%.163996@attbi_s51...

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%?


Suppose you are trying to fill up a box with balls. However, for some
strange reason, you've decided that each time you throw in balls, you'll
throw in 1/2 of the balls that will fit in the remaining space.

At the first second, you have 1/2 the balls. Next second, you'll have
that plus 1/2 of the remaining space, which is 1/2 + 1/4 = 3/4. The
third second, you'll have that plus 1/2 the remaining space, ie, 1/2 +
1/4 + 1/8 = 7/8...

So, the number of balls at any time t will be:

B(t) = 1 - (1/2)^t

Thus, after 3 seconds, there will be B(3) = 1 - (1/2)^3 = 1 - 1/8 = 7/8,
just like above.

Now, apply that same reasoning, only instead of using the ratio 1/2, use
the ratio 1/e (since we are applying arbitrary rules)

Then

B(t) = 1 - (1/e)^t

After the first second, you'll have

B(1) = 1 - (1/e)^1 = 1 - 1/e = 0.632 (that is, 63%)

Strange coincidence, isn't it? It happens because when you are charging
a capacitor through a resistor, you are throwing balls, in the form of
charges, into a box (the capacitor), and the number of charges you throw
at any given time (the current) depends on how many charges are already
on the capacitor (the voltage).

Each step of the formula above is one time constant, RC. By dividing out
the RC, you can get the answer given seconds, ie

B(t) = 1 - (1/e)^(t/RC) = 1 - e^(-t/RC)

Where B is the percentage 'filled' the capacitor is (ie, what percentage
it is of the input voltage).

Why is 1/e used instead of 1/2? That has to do with the fact that we
must have a continuous solution, not a solution based on ratios of
existing values; the rate of change of the current (ie, how many balls
we throw in per unit time) is proportional to the voltage remaining,
which is continuously changing. Using 1/e instead of 1/2 allows us to
generalize to this, in the same way as the compound interest formula
allows us to compute 'continuously compounding' interest.

--
Regards,
Robert Monsen

"Your Highness, I have no need of this hypothesis."
- Pierre Laplace (1749-1827), to Napoleon,
on why his works on celestial mechanics make no mention of God.






--
Regards,
Robert Monsen

"Your Highness, I have no need of this hypothesis."
- Pierre Laplace (1749-1827), to Napoleon,
on why his works on celestial mechanics make no mention of God.
  #3   Report Post  
Old October 12th 04, 07:23 AM
Ban
 
Posts: n/a
Default

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%?


Let's try another way. You can actually experiment yourself.

Take a 1000uF electrolytic cap and charge it up to +5V, then disconnect the
power supply. Put your voltmeter on the cap terminals and read +5V. Now take
a 10k resistor and put it across the terminals as well. The cap discharges
slowly. In the first moment the discharge current was 5V/10k = 0.5mA. With
this current the cap would be discharged in 10s, this is the time constant
"tau" = RC

But since the voltage is dropping also the discharge current drops. Now you
can use a stopwatch and read the voltage after 10s and you find it to be
1.84V, which is (1-0.624)5V. So this is where your 63% come from. Since we
are discharging, the value is 37% of the initial voltage. You can also note
down the values for 20s, 30s etc. until your meter has no more resolution
and find the corresponding values for multiple time constants.
BTW you do not need to do this experiment yourself but use a simulator or
solve the equations others have already written in their answers.

--
ciao Ban
Bordighera, Italy


  #4   Report Post  
Old October 12th 04, 04:12 PM
Richard Harrison
 
Posts: n/a
Default

Alan Horowitz wrote:
"---how does the voltage "know" that it should be increasing exactly 63%
during each time-constant period?"

The rate of growth or decline is natural as the circuit response is
non-variable and operates on the energy flow in the circuit at the
instant. This rate depends on the state of charge in the capacitor while
the capacitor is charging. Rate of capacitor discharge depends on the
charge remaining in the capacitor. It is steadily (exponentially)
declining during discharge.

The time required to charge a capacitor to 63% (actually 63.2%) of full
charge, or to discharge it to 37% (actually 36.8%) of its initial charge
or voltage is defined as the "time constant" of the circuit.

A search on "time constant" will produce many colorful illustrations.

Time constant is the time in seconds for a capacitor to charge up to 63%
of the applied voltage, or the time it takes a fully charged capacitor
to discharge from 100% down to 37% of full charge.

Time constant is the product of R (in ohms) times C (in farads) in an RC
circuit.

Time constant is the quotient of L/R with L in henries and R in ohms in
an RL circuit.

Epsilon is a number approximately 2.71828 which is the base of the
natural, Naperian, or hyperbolic logarithms.

There is a natural rate of growth or decline caused by growth or decline
as a constant percentage of size at the moment. It is epsilon.

As an example of natural decline, the quantity of charge (q) remaining
in a capacitor after current has been flowing out for (t) seconds is:

Qo times epsilon raised to the minus t/CR power.

Where Qo is the initial value of q.

Voltage is proportional to charge, so V at any time can be found by
substituting Vo for Qo in the formula for q.

Best regards, Richard Harrison, KB5WZI

  #5   Report Post  
Old October 12th 04, 10:45 PM
Steve Nosko
 
Posts: n/a
Default

Alan,

John Popelish got a good start with "e is a natural constant that has
some very sweet
properties in many applications of mathematics, and simplifying..."



Then, it looked as thought John Jardine was going to steal my thunder with
"the voltage knows nothing about how it's "supposed" to behave. "



This could resolve to a mater of faith Alan.



Indeed, the voltage/current "knows" nothing.



After observing what happens in such circuits, "we" (those who must
understand all things) very carefully examined what was going on and
"discovered" that there were mathematical expressions or equations which
would model what happens in nature. "We" came up with theories about what
was going on and what was causing it to happen. "We" then found ways to
make the math fit reality. In the case of time constants, we have a natural
phenomena which is very nicely described by the equations stated elsewhere
in this thread (the 1/e thingy). It is just like the F=MA equation. "We"
discovered that the force applied to a mass is equal to the mass times the
acceleration. The Mass knows nothing about force, acceleration or
mathematics. We found that this math describes nature.



It is exactly like a model airplane (or whatever). We make the model to
look like the real thing. The real thing knows not of the model that we
built, but if we did a good job, I or you can now look at the model and
"know" just how the real thing looks.



The math behind all of our sciences is just like this. *WE* found math
which models reality and because we did such a good job, we can now "do the
math" and "know" how the real thing should behave.



To be a little more specific, in the case of the time constant. we have
theories about current flow, charge, capacitance, inductance magnetism and
resistance which are borne out by countless experiments and then by
subsequent usage. These theories have all had mathematics fitted to them,
and by golly everything fits. We can now plug-in values to equations till
the cows come home and holy-cripes! The real thing does just what the math
predicted. Based upon the properties we have observed for each type of
component, this math works out such that this 1/e thingy fits just right.



In other words, the answer is: "It just does!"

73,
--
Steve N, K,9;d, c. i My email has no u's.




"Alan Horowitz" wrote in message
om...
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%?





  #6   Report Post  
Old October 13th 04, 01:12 AM
Jonathan Kirwan
 
Posts: n/a
Default

On Tue, 12 Oct 2004 16:45:50 -0500, "Steve Nosko"
wrote:

Alan,

John Popelish got a good start with "e is a natural constant that has
some very sweet properties in many applications of mathematics, and
simplifying..."

Then, it looked as thought John Jardine was going to steal my thunder with
"the voltage knows nothing about how it's "supposed" to behave. "

This could resolve to a mater of faith Alan.

Indeed, the voltage/current "knows" nothing.

After observing what happens in such circuits, "we" (those who must
understand all things) very carefully examined what was going on and
"discovered" that there were mathematical expressions or equations which
would model what happens in nature. "We" came up with theories about what
was going on and what was causing it to happen. "We" then found ways to
make the math fit reality.


Reminds me of Galileo writing in "The Assayer," saying:

"Philosophy is written in this grand book-I mean the universe-which stands
continually open to our gaze, but it cannot be understood unless one first
learns to comprehend the language and interpret the characters in which it is
written. It is written in the language of mathematics, and its characters are
triangles, circles, and other geometric figures, without which it is humanly
impossible to understand a single word of it; without these, one is wandering
about in a dark labyrinth."

(By the way, to anyone who has NOT actually read The Assayer from beginning to
end, I highly recommend it!)

Mathematics is a wonderful world all of its own, independent of nature, yet
where it often turns out that insights in that world happen to happily suggest
relationships found in this world and where proper deductions there imply proper
deductions here. The language is sufficiently rigorous that someone two
millennia before me can describe a circle using it and I can read it today,
knowing absolutely nothing about their lives, their fads or interests, their
politics or style of dress, and come away with exactly the same image in mind
with exactly the same deductive power. In short, mathematics is a quantitative
language that speaks across culture, time, and place. And there is nothing we
have to compare with that.

The processes of science work to achieve a relatively objective process that
works well. It requires the use of objective language sufficient for rigorous
quantitative deductions (by anyone adequately trained in the language) to
specific circumstances, insists that such language both explain past results
well and (more importantly) also make accurate and repeatable predictions,
requires quantitative prediction for discernment, and requires time and patience
for the resulting critical opinion of others skilled in the field to arrive at a
consensus. But mathematics *is* a key part of this objective language used in
science because of its demonstrated congruencies with nature.

In the case of time constants, we have a natural
phenomena which is very nicely described by the equations stated elsewhere
in this thread (the 1/e thingy). It is just like the F=MA equation. "We"
discovered that the force applied to a mass is equal to the mass times the
acceleration. The Mass knows nothing about force, acceleration or
mathematics. We found that this math describes nature.


One thing to keep in mind is that ideas like "density," a useful relationship
between volume and mass, are truly discovered through hard work and through
trying to find some kind of useful discernment regarding sinking and floating.
One doesn't just naturally _know_ about density, as our direct senses tell us
nothing of the kind. It's discovered and then taught and learned. And such
relationships are about parsimonious tools for prediction.

And yes, we have been fortunate that some math describes some nature.

It is exactly like a model airplane (or whatever). We make the model to
look like the real thing. The real thing knows not of the model that we
built, but if we did a good job, I or you can now look at the model and
"know" just how the real thing looks.


It can also be that the model ignores some of the unimportant details of the
"real thing" and still be quite useful. Or that it ignores some important
details, but that so long as we keep those boundaries and limitations in mind
the model is still quite useful for many other things.

I like your example.

The math behind all of our sciences is just like this. *WE* found math
which models reality and because we did such a good job, we can now "do the
math" and "know" how the real thing should behave.


We can also disappear into the mathematical universe and discover brand new
relationships there and have some expectation that where such new territory is
true there, it will probably be found true in the real world as well. One can
make important discoveries using mathematics and use them to suggest what can be
searched out and found here. Surprising, at times.

To be a little more specific, in the case of the time constant. we have
theories about current flow, charge, capacitance, inductance magnetism and
resistance which are borne out by countless experiments and then by
subsequent usage. These theories have all had mathematics fitted to them,
and by golly everything fits. We can now plug-in values to equations till
the cows come home and holy-cripes! The real thing does just what the math
predicted. Based upon the properties we have observed for each type of
component, this math works out such that this 1/e thingy fits just right.

In other words, the answer is: "It just does!"


Yup. In the capacitor case, for example, I idealized it as a simple
differential equation. Real capacitors are more complex, but the ideal is often
close enough in practice to be useful.

Enjoyed seeing your thunder!

Jon
  #7   Report Post  
Old October 13th 04, 11:35 PM
Steve Nosko
 
Posts: n/a
Default

Jonathan,
you put this to some nice words.
Steve K9DCI

"Jonathan Kirwan" wrote in message
...
On Tue, 12 Oct 2004 16:45:50 -0500, "Steve Nosko"
wrote:

Alan,

John Popelish got a good start with "e is a natural constant that has
some very sweet properties in many applications of mathematics, and
simplifying..."

Then, it looked as thought John Jardine was going to steal my thunder

with
"the voltage knows nothing about how it's "supposed" to behave. "

This could resolve to a mater of faith Alan.

Indeed, the voltage/current "knows" nothing.

After observing what happens in such circuits, "we" (those who must
understand all things) very carefully examined what was going on and
"discovered" that there were mathematical expressions or equations which
would model what happens in nature. "We" came up with theories about

what
was going on and what was causing it to happen. "We" then found ways to
make the math fit reality.


Reminds me of Galileo writing in "The Assayer," saying:

"Philosophy is written in this grand book-I mean the universe-which stands
continually open to our gaze, but it cannot be understood unless one first
learns to comprehend the language and interpret the characters in which it

is
written. It is written in the language of mathematics, and its characters

are
triangles, circles, and other geometric figures, without which it is

humanly
impossible to understand a single word of it; without these, one is

wandering
about in a dark labyrinth."

(By the way, to anyone who has NOT actually read The Assayer from

beginning to
end, I highly recommend it!)

Mathematics is a wonderful world all of its own, independent of nature,

yet
where it often turns out that insights in that world happen to happily

suggest
relationships found in this world and where proper deductions there imply

proper
deductions here. The language is sufficiently rigorous that someone two
millennia before me can describe a circle using it and I can read it

today,
knowing absolutely nothing about their lives, their fads or interests,

their
politics or style of dress, and come away with exactly the same image in

mind
with exactly the same deductive power. In short, mathematics is a

quantitative
language that speaks across culture, time, and place. And there is

nothing we
have to compare with that.

The processes of science work to achieve a relatively objective process

that
works well. It requires the use of objective language sufficient for

rigorous
quantitative deductions (by anyone adequately trained in the language) to
specific circumstances, insists that such language both explain past

results
well and (more importantly) also make accurate and repeatable predictions,
requires quantitative prediction for discernment, and requires time and

patience
for the resulting critical opinion of others skilled in the field to

arrive at a
consensus. But mathematics *is* a key part of this objective language

used in
science because of its demonstrated congruencies with nature.

In the case of time constants, we have a natural
phenomena which is very nicely described by the equations stated

elsewhere
in this thread (the 1/e thingy). It is just like the F=MA equation.

"We"
discovered that the force applied to a mass is equal to the mass times

the
acceleration. The Mass knows nothing about force, acceleration or
mathematics. We found that this math describes nature.


One thing to keep in mind is that ideas like "density," a useful

relationship
between volume and mass, are truly discovered through hard work and

through
trying to find some kind of useful discernment regarding sinking and

floating.
One doesn't just naturally _know_ about density, as our direct senses tell

us
nothing of the kind. It's discovered and then taught and learned. And

such
relationships are about parsimonious tools for prediction.

And yes, we have been fortunate that some math describes some nature.

It is exactly like a model airplane (or whatever). We make the model to
look like the real thing. The real thing knows not of the model that we
built, but if we did a good job, I or you can now look at the model and
"know" just how the real thing looks.


It can also be that the model ignores some of the unimportant details of

the
"real thing" and still be quite useful. Or that it ignores some important
details, but that so long as we keep those boundaries and limitations in

mind
the model is still quite useful for many other things.

I like your example.

The math behind all of our sciences is just like this. *WE* found math
which models reality and because we did such a good job, we can now "do

the
math" and "know" how the real thing should behave.


We can also disappear into the mathematical universe and discover brand

new
relationships there and have some expectation that where such new

territory is
true there, it will probably be found true in the real world as well. One

can
make important discoveries using mathematics and use them to suggest what

can be
searched out and found here. Surprising, at times.

To be a little more specific, in the case of the time constant. we have
theories about current flow, charge, capacitance, inductance magnetism

and
resistance which are borne out by countless experiments and then by
subsequent usage. These theories have all had mathematics fitted to

them,
and by golly everything fits. We can now plug-in values to equations

till
the cows come home and holy-cripes! The real thing does just what the

math
predicted. Based upon the properties we have observed for each type of
component, this math works out such that this 1/e thingy fits just right.

In other words, the answer is: "It just does!"


Yup. In the capacitor case, for example, I idealized it as a simple
differential equation. Real capacitors are more complex, but the ideal is

often
close enough in practice to be useful.

Enjoyed seeing your thunder!

Jon



  #8   Report Post  
Old October 13th 04, 10:30 AM
Jim Black
 
Posts: n/a
Default

(Alan Horowitz) wrote in message . com...
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%?


First, I should make a few corrections to what you've said. The
voltage doesn't increase 63% during each time-constant period. If it
did, it would become 1.63 times its original value after the first
period, then 1.63*1.63 = 2.66 times, then 1.63^3 = 4.33 times, etc.
The voltage would increase forever, and the circuit would fry itself.

I'm assuming you're talking about a battery connected to a resistor
and capacitor (or inductor) in series, or similar circuits. In the
case of the capacitor, the voltage across the capacitor starts from
zero, and in the first time-constant period, the voltage across the
capacitor rises to 63% of the voltage across the battery. In each
time-constant period thereafter, it increases by 63% of the difference
between the battery voltage and its previous voltage.

Sorry if you knew this already, but it's hard to tell from just
reading a post.

It also isn't exactly 63%. The number predicted by theory is
63.21205588285576784044762298385 ... %. But that number will not be
exact either, due to the fact that the models which predict it assume
perfect wires, perfect resistors, etc., which is never the case. At
some point one has to round.

Let's examine such a circuit at at some time after the switch has been
flipped. We'll call the voltage of the capacitor at this point V and
the voltage of the battery E, the value of the resistor R and the
value of the capacitor C.

The voltage across the resistor is E-V, making the current through it
(E-V)/R. The charge on the capacitor is CV. If the capacitor were
fully charged, it would have a charge CE. That means the capacitor
needs CE-CV more charge to be fully charged. If the current through
the resistor continued to flow at its current rate, the time it would
take to supply this charge would be CR. This time is called the time
constant.

It's crucial to notice that the time constant we just computed does
not depend on how far the capacitor has been charged. At any time, it
is correct to say that if the current through the capacitor would only
stay the same, it would be fully charged after an amount of time later
given by the time constant.

Of course, the current through the resistor will not continue to flow
at its current rate. As capacitor is charged, the voltage across the
resistor decreases, and with it, the current.

Let's pretend the current really does stay constant for a small
fraction 1/n of the time constant, that is, for the short time CR/n.
In this time, the capacitor's voltage would increase by 1/n of the
difference between the battery's voltage E and its present voltage V.
The voltage E-V across the resistor would decrease by the same amount,
making it (1-1/n) of what it was before. After one time-constant, the
voltage across the resistor would have decreased by the same ratio n
times, making the voltage across the resistor (1-1/n)^n times its
previous value.

This all still an approximation; the current doesn't really stay
constant for any length of time. But if CR/n is very small, the drop
in current is insignificant. If we choose larger and larger values of
n, the answer we get becomes better and better. If we choose an
extremely large n, the error will go away with rounding, and we will
get (1-1/n)^n = 0.3678794... . And if the difference between the
battery voltage E and the capacitor voltage V is 37% of what it was
before, that means that the voltage of the capacitor increased by 63%
of that difference.

The reciprical of 0.3678794..., 1/0.3678794... = 2.7182818..., appears
in the answers to a lot of problems, and so it has been given a
special name: "e." It is near [n/(n-1)]^n, for large n. We can
simplify this formula even further by replacing n by m+1, making it
(1+1/m)^(m+1), and dividing by (1+1/m), which is very near 1, to get
(1+1/m)^m, for large m.

While in principle one could compute e by choosing a very large n, in
practice you need such a large n to get a correct answer that the
calculation that ensues becomes tedious. But, using the binomial
theorem, we can find:

(1+1/m)^m = 1 + m(1/m) + [m(m-1)/2!](1/m)^2
+ [m(m-1)(m-2)/3!](1/m)^3 + ...

(1+1/m)^m = 1 + 1 + (1-1/m)/2! + (1-1/m)(1-2/m)/3! + ...

(1+1/m)^m ~ 1 + 1 + 1/2! + 1/3! + 1/4! + 1/5! + ... = e

We can do a similar calculation to find a series for 1/e from "near
(1-1/n)^n for large n." It all works out the same, except that we're
dealing with powers of (-1/n) instead of (1/n). Terms that had odd
powers have their sign flipped:

1/e = 1 - 1 + 1/2! - 1/3! + 1/4! - 1/5! + 1/6! - 1/7! + ...

or

1/e = 3/3! - 1/3! + 5/5! - 1/5! + 7/7! - 1/7! + 9/9! - 1/9! + ...

1/e = 2/3! + 4/5! + 6/7! + 8/9! + 10/11! + 12/13! + ...

1/e = 1/1!/3 + 1/3!/5 + 1/5!/7 + 1/7!/9 + 1/9!/11 + 1/11!/13 + ...

With just the first two terms, which you can add in your head, you can
get 1/e accurate to two significant figures.

--
Jim Black

"Within the philosophy system, it is quite correct. Let's try this: if
it was in single quotes it would 'mean' "chaos". As it is not, there
'is some form'." -- Peter Kinane
  #10   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 10:58 AM.

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

About Us

"It's about Radio"

 

Copyright © 2017