![]() |
physical/intuitive understanding of RL/RC time constants?
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%? |
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%? 1-(1/e). Crack your textbook. http://www.iop.org/EJ/S/UNREG/aS0aOQcupwxj4CNeiM5vaQ/article/-featured=jnl/0143-0807/23/1/304/ej2104.pdf "Demonstration of the exponential decay law using beer froth" "exponential decay" 63 20,500 hits Uncle Al gotta think of everything. -- Uncle Al http://www.mazepath.com/uncleal/ (Toxic URL! Unsafe for children and most mammals) http://www.mazepath.com/uncleal/qz.pdf |
"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? Definition of time-constant period. John Lowry Flight Physics And whence the number 63%? |
On Mon, 11 Oct 2004 16:18:07 -0700, Uncle Al
wrote: http://www.iop.org/EJ/S/UNREG/aS0aOQcupwxj4CNeiM5vaQ/article/-featured=jnl/0143-0807/23/1/304/ej2104.pdf "Demonstration of the exponential decay law using beer froth" Hi Al, Good link. Here is one that is Tau intensive from my own work: http://www.cybernalysis.com/tau/index.htm 73's Richard Clark, KB7QHC |
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%? This all goes back to the solution of the differential equation for the RC or RL system. e is a natural constant that has some very sweet properties in many applications of mathematics, and simplifying differential equations is one of them. Read through this tutorial and see how the rate constant k in this tutorial is an example of a time constant. http://www.ugrad.math.ubc.ca/coursed...eqs/intro.html -- John Popelish |
|
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. |
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 |
"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%? The voltage knows nothing about how it's "supposed" to behave. It just does its thing without a care in the world. The thing it does though, will always result in exactly the same voltage shape, because with a fixed R and C and supply voltage it can do no other. As the C voltage grows, the voltage across the R must drop. If the R voltage drops then the charging current must drop. If the charging current drops, then the C voltage must rise at a slower rate, ... and so on and so on ... Everything slows down more and more as time goes on. A bit of thought and you'll notice that the C can never actually charge exactly to the supply voltage. As this RL RC (dis)charging process must always result in this particular shape or curve and this quite 'natural' curve turns up across all branches of science, engineering and finance, it wasn't long before the mathematicians found they could usefully model, or describe the curve accurately, using an equation based on the 2.718 "e" value used for working out 'natural' logarithms. Hence the maths numbers and formulae that are taught are a good descriptive model or analogue of what's happening in the circuit but have nothing to do with the actual circuit workings. Be wary when relying purely on maths models. They confer 'expertise' into how something works, without offering 'understanding' of how something works. The difference can be crucial. regards john |
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 |
**** Y I K E S !!! -- Steve N, K,9;d, c. i My email has no u's. "Jonathan Kirwan" 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%? I haven't had a chance to read other responses, but here's mine: Take the case of an RC: ,---, | | V| \ --- / R - \ --- | - +----- | | o --- C / --- o | '---+----- Assume C is discharged and V has just been applied by closing the switch... The current through R is based on V, less the voltage on C (which counters V), so: I(R) = ( V - V(C) ) / R The above is a function of time, because V(C) is a function of time. So, what's V(C)? Well, that needs to be arrived at more slowly. First, we know that this is true: Q = C*V Well, actually, that's an average statement. More exactly, it's: dQ = C * dV In other words, the instantaneous change in Coulombs is equal to the capacitance times the instantaneous change in voltage. Both sides can now be divided by an instant of time to give: dQ / dt = C * dV / dt Since dQ/dt is just current (I), for the above capacitor this becomes: I(C) = C * dV(C) / dt So how does this help? Well, we know that the current from R must accumulate on C. So, we know that: I(C) = I(R) = ( V - V(C) ) / R so, combining, we get: C * dV(C) / dt = ( V - V(C) ) / R Rearrangement of this gives: dV(C) / dt + V(C) / (R*C) = V / ( R*C ) Which is the standard form for ordinary differential equations of this type. The standard form with general terms looks like: dy/dx + P(x)*y = Q(x). In our case, though, y = V(C), x = t, P(x) = 1 / (R*C), and Q(x) = V / (R*C). The solution to this includes multiplying by what is called "the integrating factor", which is: u(x) = e^(integral (P(x)*dx)) = e^(integral (dt/RC)) = e^(t/(R*C)) (This is a VERY POWERFUL method to learn, by the way, and it is probably covered in the first few chapters of any ordinary differential equations book.) So, going back to look at the general form and multiplying both sides: u(x)*dy/dx + u(x)*P(x)*y = u(x)*Q(x) But the left hand side is just d(u(x)*y)/dx, so: d(u(x)*y)/dx = u(x)*Q(x) or, d(u(x)*y) = u(x)*Q(x) * dx In our case, this means: d( e^(t/(R*C)) * V(C) ) = V / ( R*C ) * e^(t/(R*C)) * dt Taking the integral of both sides, we are left with: e^(t/(R*C)) * V(C) = integral [ V / ( R*C ) * e^(t/(R*C)) * dt ] = V / ( R*C ) * integral [ e^(t/(R*C)) * dt ] setting z = t/(R*C), we have dz = dt/(R*C) or dt = R*C*dz, thus: e^(t/(R*C)) * V(C) = V / ( R*C ) * R*C * [e^(t/(R*C)) + k1] = V * [e^(t/(R*C)) + k1] = V * e^(t/(R*C)) + V * k1 V(C) = V + V * k1 / e^(t/(R*C)) = V + V * k1 * e^(-t/(R*C)) = V * [ 1 + k1*e^(-t/(R*C)) ] From initial conditions, where V(C) = 0V at t=0, we know that k1=-1, so: V(C) = V * [ 1 - e^(-t/(R*C)) ] Time constants are usually taken to be: e^(-t/k) with (k) being the constant. In our V(C) case, this means that k=R*C. So that's the basic constant and it's in units of seconds. So, what's the voltage after one such constant of time? Well: V(C) = V * [ 1 - e^(R*C/(R*C)) ] = V * [ 1 - 1/e ] = V * .63212 Ah! There's that 63% figure. Actually, more like 63.212%. Two time constants would be: 1 - 1/e^2 = .864665 and so on.... Oh... and there are other methods you can use to solve the simple RC formula, but the method I chose is a very general and powerful one worth learning well. Jon |
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%? |
On Tue, 12 Oct 2004 16:20:32 -0500, "Steve Nosko"
wrote: **** Y I K E S !!! ;) Jon |
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. |
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 |
|
|
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 |
|
|
"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 |
All times are GMT +1. The time now is 11:06 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
RadioBanter.com