Transient AC Circuit Analysis - Page 1
Forum section: electronics / general

author: Randall W. Lott
author_rank: Regular Contributor
timestamp: March 05, 2012, 07:21:28 am
content: I've been wanting to learn circuit analysis with differential equations that deal with phasors. Are there any good resources? I haven't found anything online apart from one video on solving simple circuits with Laplace Transforms.I have an understanding of differential equations, steady-state AC analysis, vector calculus, LTI systems, and some Fourier Analysis.I would like to be able to find exact phasor solutions to, let's say, a AC/DC power supply. I can easily generate the output voltage expression, but I would like to find an explicit solution to the output voltage after the reservoir capacitor. I want to bridge the gap between the two separate worlds.I'm a junior in a BSEE program and I have an Associate degree in Electronic Engineering Technology.

author: amspire
author_rank: Super Contributor
timestamp: March 05, 2012, 07:38:08 am
content: It is not impossible to use methods like a Laplace transforms to look at waveforms across power supple caps, but you usually wouldn't. The calculations using the standard inductor and capacitor definitions are actually very simple. Resonant supplies can be a bit more complicated. Laplace transforms are most commonly used for linear AC calculations. It can be used for impulse based analysis, but I cannot see why you would want to with a power supply power inductor and filter capacitor analysis.I = C x dV/dTEnergy in a cap = 1/2 x C x V2V = L x dI/dTEnergy in an inductor = 1/2 x L x I2Other then losses,allthe energy in an inductor has to be dumped (eventually) into the output capacitor or load if it is a switching supply.That is about all you need to know, other then Ohm's Law.Do you have a circuit to show us what problem you are trying to solve? You might have a particular kind of supply in mind.Richard.

author: Randall W. Lott
author_rank: Regular Contributor
timestamp: March 06, 2012, 06:46:09 am
content: My apologies if I'm doing this incorrectly. I want to find the explicit expression for the capacitor so I can manually plot the charge curve. I realize this is extremely simple using SPICE, but I would like to learn it fully.Don't worry about inefficiencies in the transformer and non-linear characteristics of the diodes. I am only considering their maximum voltage drop for now.

author: slateraptor
author_rank: Frequent Contributor
timestamp: March 06, 2012, 08:46:20 am
content: Your expression for V1*is incorrect; capacitor voltage will be of the form Vpeak- e-ktas opposed to a rectified sinusoid since your circuit doesn't have a load.The problem needs to be solved piecewise, which is a major pain in the ass because the exponential model of your diodes will need to be approximated as a Taylor series expansion prior to applying numerical methods to find a time-domain sol'n to a non-linear 2nd order differential equation. It's not a trivial task by hand...that's why SPICE is such a powerful tool.P.S. If you're looking to study a circuit's transient behavior, then Laplace transform isn't even an option.

author: IanB
author_rank: Super Contributor
timestamp: March 06, 2012, 08:49:45 am
content: To get a solution in the time domain you need to solve differential equations involving time. Like for example the capacitor equation Richard posted above:I = C x dV/dtIf you do a nodal analysis of the circuit you will get a set of simultaneous differential and algebraic equations (DAE set) involving the voltages and currents in the circuit. Solve this to get your answer (this is what SPICE does). As a human you will want to make simplifications to generate local solutions--it will be much too hard to solve the whole circuit by hand in anything other than trivial cases. That's why SPICE exists.Note that none of your equations will involvejorwas you show above since these are frequency domain representations of the system.Also note that for the circuit you pictured above the capacitor will charge up to a constant voltage and remain steady atVmax. The only time there will be any transient is when you power up the circuit.

author: slateraptor
author_rank: Frequent Contributor
timestamp: March 06, 2012, 09:06:02 am
content: Quote from: IanB on March 06, 2012, 08:49:45 amSure they can, e.g. a sinusoid expressed as complex conjugate exponentials...of course, the caveat being that a time-domain sol'n is always real.

author: Randall W. Lott
author_rank: Regular Contributor
timestamp: March 06, 2012, 03:08:33 pm
content: Thank you for the responses. Are there any online resources for this? My textbooks don't cover this in great detail.I realize that I have to consider the storage, turn-on, and recovery times of the diode. I will need to consider a load to be able to plot the ripple waveform.My main goal is to express the filtered full-wave explicitly. I've been thinking about this for months, but it hasn't hit me yet.Thanks again for the support and I'm sorry if I sound like an idiot, haha!

author: robrenz
author_rank: Super Contributor
timestamp: March 06, 2012, 04:44:06 pm
content: Get yourself a student license of Maple while you are a student and It can do all the heavy lifting for you. Maple is nice because it can solve and simplify symbolically as opposed to only giving numeric solutions.

author: IanB
author_rank: Super Contributor
timestamp: March 06, 2012, 05:34:04 pm
content: Quote from: Randall W. Lott on March 06, 2012, 03:08:33 pmIf you are thinking of some analytical expression or formula you can evaluate, this is not likely to be possible for anything other than very simple cases.You really have to express the system as differential and algebraic equations, and solving differential equations by analytical means becomes impractical as soon as they become complicated or non-linear. You are reduced to numerical solutions, which is what SPICE does.It is however instructive to look at how the problem is set up and the solution derived. I don't know of any specific references, but you might try searching on topics like "how SPICE works" for some insights.

author: slateraptor
author_rank: Frequent Contributor
timestamp: March 06, 2012, 07:44:15 pm
content: Quote from: Randall W. Lott on March 06, 2012, 03:08:33 pmYou can browse through the LTspice manual to get an idea of modeled parameters. SPICE, 2e by Roberts/Sedra is also a good reference and is intended to supplement Sedra/Smith 4e.In terms of the prerequisite "toolbox" knowledge, you'll need a strong background in solid-state device physics and a 2nd course in ordinary differential equations (with your uni's math dept) at a minimum.

author: amspire
author_rank: Super Contributor
timestamp: March 07, 2012, 03:38:03 am
content: Randy, it is excellent to see you working with the equations. Keep that up- it is a really great skill to develop.But I think what you want to be able to do is different. You want to get to an understanding and feeling for a circuit, so that you can work out what is happening really quickly. This is why you want to resort to the basic calculations with the fundamental components, as they are simple devices.Complex equations tend to hide the very simple stuff that is going on.So first your circuit. As drawn, it is basically a peak detector. If the transformer was switched on when the mains was 0V, the capacitor voltage would follow the secondary voltage till it reached 1.4142 X 12 - (2 x 0.625) = 15.7 volts (there are two diode drops) and then sits at that voltage forever.Say you want 0.1A out of your supply, with less then 3V p-p ripple. How big a capacitor do I need is the first question? Always start with a first order approximation as it is often all you need. As a worse case approximation, I am going to assume the cap charges instantly at the top of the mains cycle and is discharging for the rest of the half cycle. For 50Hz mains, it is discharging for 10mS each half cycle.I = C x dV/dT C = I / (dV/dT) = 0.1 A / (3V/10mS) = 333 uF. Remember this is worse case - actually the capacitor does not charge instantly, so I could get away with a slightly smaller capacitor, but if I am happy with 330uF, I will not even bother with a better calculation.What is the effect of the capacitor's 60 mOhm ESR on the circuit?Ok more quick calculations. The sinewave is within 1% of its peak value for better then 1mSec per half cycle. The time constant of the electrolytic = Capacitance x ESR = 330 uF x 0.06 ohms = about 20uS.20uS is insignificant compared to the 1mS of the mains at the top of its cycle, so at this stage I ignore the ESR as far as its effects on capacitor charging and ripple.But we do need to find the capacitor RMS current to check that the capacitor can handle it. This is could be a problem as the charging current will be very non-linear and non-sinusoidal. How are we going to work out this difficult waveform, so we can calculate the RMS current?No problems. We just do not bother. I know the real ripple will be less then 3V, as I did a worst case approximation, so I am just going to assume 2V ripple for now as I know it will give a slightly higher RMS current then I would get with 3V p-p ripple, and I want to be conservative.If we have 2V ripple, the capacitors will start charging when the secondary winding voltage is 2V below its peak - that is at 30 degrees before the peak, and the diodes will keep conducting till perhaps 10 degrees past the peak. Lets just say 45 degrees of conduction in total. That means for 45 degrees of a half cycle, a capacitor can charge, and the other 135 degrees, it is discharging at 0.1 amps. Here is where understanding the basics of the capacitor comes in. The average current into the capacitor has to be zero, so if the current out of the capacitor for 75% of the time is 0.1A, then the average current in for 25% of the time has to be 0.3A for the average to be zero. It cannot be anything else.Now for the RMS current approximation. divide the time into four even slices, square the current, average and take the root.RMS current = sqrt( ((-0.32) + 0.12+ 0.12+ 0.12)/4) = 173mA RMSI look up the data for a basic 330 uF 25V electro, and see it can handle a ripple current of 420mA. The margin is big enough that I do not need to calculate the RMS current with any more accuracy. I never even worked out what the charging current looked like. All I knew is that the average current into the capacitor had to be zero.So we end up with the 0.1 A load, the voltage on the capacitor is 15.7 volts peak (I am assuming an ideal transformer with no winding resistance, as you asked) and it would have something less then 3V p-p ripple (ie dropping from 15.7 volts to something above 12.7V each half cycle.) The ripple waveform will be almost triangular with a downslope 3 times as long as the upslope.I hope that gives you an idea. The above took much longer to write, then to actually calculate. Once you get familiar, you could do all the above in maybe 30 seconds without a sweat. You an often start with simple calculations and build up a picture. Then you target specific key aspects of the design and ignore the rest. Your ability with the equations is the big gun you leave in the holster until you find you need something calculated precisely.Richard.

author: robrenz
author_rank: Super Contributor
timestamp: March 07, 2012, 03:52:47 am
content: Richard, that was excellent! That is what makes this forum great.

author: Randall W. Lott
author_rank: Regular Contributor
timestamp: March 07, 2012, 04:38:52 am
content: Wow, amspire, that was a phenomenal explanation.Thank you dearly for your incredible effort. It's people like you who really make this forum a pleasure to be a part of.I suppose I am a little overboard on the exactness of the whole process. I can easily find the correct value capacitor based on the worst case scenarios, but I plan on cracking open some SPICE files to see just what's going on in the grey matter. I've always had the kind of personality that needs to knowexactlywhat's happening. It's good and bad at the same time. I'll need to learn a better system of priorities to become a better engineer.Again, thank you.

author: amspire
author_rank: Super Contributor
timestamp: March 07, 2012, 06:17:59 am
content: Thanks Randy.Spice is phenomenal - you can test circuits with amazing parts for nothing. You can see waveforms that would be hard to see in the best equipped labs.Certainly, build up your circuit and add a 150 ohm load and see how well it matches my description above. Add a low resistor in series with the transformer winding and see what it does to the output voltage and to the amount of time the diodes are conducting.A great way to learn.Richard.

author: Randall W. Lott
author_rank: Regular Contributor
timestamp: March 07, 2012, 05:05:03 pm
content: I figured that I would build up a circuit in SPICE.Without capacitorWith capacitorI'll work on trying to develop the mathematical function that transforms the red wave to the blue wave.Maybe a step function will be used.Once the derivative becomes negative, I know that a new decay expression will be different due to the capacitor discharging. There's a clear phase shift or delay, which is obvious due to the capacitive nature of the circuit.

author: Randall W. Lott
author_rank: Regular Contributor
timestamp: March 07, 2012, 07:23:18 pm
content: Here's an update:I believe that my equation is correct.

author: IanB
author_rank: Super Contributor
timestamp: March 07, 2012, 07:45:47 pm
content: Viewed in isolation, why is the second peak higher than the first peak? It seems like there should be some state carried over from the first cycle into the second cycle (like accumulated charge) to cause the voltage to be different. Yet it isn't clear where that persistent state is accounted for?

author: amspire
author_rank: Super Contributor
timestamp: March 07, 2012, 07:54:37 pm
content: The second simulation and formula is not correct. The first simulation was on the right track.

author: amspire
author_rank: Super Contributor
timestamp: March 07, 2012, 08:01:36 pm
content: In the first stimulation, why is the voltage so high? Shouldn't it be closer to 17 V peak before the rectifiers?Also what load are you using? Looks like 50 Ohms. If it is, you will get a much bigger ripple.Richard

author: Randall W. Lott
author_rank: Regular Contributor
timestamp: March 07, 2012, 08:08:05 pm
content: Darn, haha! The second was done in Matlab, while the first was simulated in LTSpice.I agree that the Matlab plot doesn't look right. The capacitor shouldn't fully discharge.I used arbitrary values for the components, so it was not modeling what you said earlier.I assumed that since VC(t) = VS(1-e-t/RC), I could change VSto a full-wave rectified sine wave.What kind of load does a voltage regulator present to the filter capacitor in regards to a simulation?

author: amspire
author_rank: Super Contributor
timestamp: March 07, 2012, 09:29:58 pm
content: A linear voltage regulator will act like a constant current load. A switching regulator acts like a constant power load.