Documentation
Symbulator 9 9

Lesson 7

Alternating current analysis

Learn how to run an alternating current analysis (via phasor analysis) using ac. Learn how to describe capacitors, inductors, impedances and admittances, and sources for AC analysis.

Last updated 2023-07-08

In this lesson you will learn how to use the ac analysis to solve AC circuits in Symbulator. You will also learn how to describe the elements you already know so they suit AC analysis, and how to use er and th in their AC mode.

7.1AC analysis in Symbulator

The main thing to know is that in AC mode Symbulator understands phasors — complex numbers. It uses them in the input, in the analysis and in the output.

The AC analysis

Version 9 keeps AC on the same menu as the other analyses: set Analysis to AC — alternating current. Unlike DC and TR it needs one more input — the frequency of the circuit in radians per second, typed into the ω — angular frequency box that appears beside the menu.

AC mode in the other tools

The equivalence tools work in AC the same way: choose Find equivalent as usual, set Analysis to AC — alternating current, and give the ω box a frequency where the circuit needs one.

Describing elements for AC

When describing a circuit for AC analysis, element values have to be written the way this analysis expects. Valueless elements, like the short circuit and the op amp, are unchanged. Here's how to describe the ones with values:

  • Current sources j and voltage sources e accept complex values. You can declare their value in rectangular form, e.g. 10-3𝐢, or in angular form, e.g. (100∠120°).
  • The element r no longer represents just a resistor: it now represents an impedance. If you are wondering why we didn't use the letter z, wait until we get to two-ports. In AC analysis, r accepts complex numbers as its value, such as 10-3𝐢. We use r to describe resistors (real values) and conductances (real values, inverted), but also impedances (complex values) and admittances (the inverse of their complex value).
  • The elements c and l are used to describe capacitors and inductors only when their values are given in farads and henries, respectively. For AC analysis their description no longer requires the fifth field for the initial condition, since alternating current analysis focuses on the steady state after transient effects are long gone. So we only use the name, the two nodes, and the value.

The values of all of these elements can use SI prefixes.

What answers do you get

You get the same answers you did in DC, except that now they are phasors. The one difference is that now, besides the real power consumed, you also get the complex power consumed. We will discuss this in Lesson 8.

Rectangular or polar

A phasor can be written two ways, and circuit problems use both: in rectangular form as 3 + 4j, or in polar form as an amplitude and an angle, 5∠53.13°. They are the same number. Which one you want depends on the question — rectangular adds and subtracts easily, polar multiplies and divides easily, and textbook answers are usually quoted in polar.

Symbulator answers in rectangular form unless you ask otherwise. In Settings, under Display, tick Show AC answers as polar phasors and every answer is shown as an amplitude and an angle instead. The circuit is re-solved as soon as you tick it, so you can switch back and forth on a solved circuit and watch the same answers change form.

Three things it deliberately leaves alone, and they are worth knowing so the setting does not look broken:

  • Average power stays a plain number. It is a real quantity, not a phasor, so an angle would be meaningless — 1234 W is 1234 W. Complex power is converted, because its polar form is the apparent power and the power-factor angle, which is usually what you want. See Lesson 8.
  • Symbolic answers are left as they are, exactly as SI prefixes leave them. There is no angle to take of \(v_{in} r_b/(r_a + r_b)\).
  • It applies to AC only. In DC every answer is real, and in the other two analyses the answers are functions of s or t, so there is nothing to take the angle of. The checkbox greys out there and tells you why.

An answer that happens to be real still gets its angle, of 0° or 180°. That is deliberate: it is what the aa tool does, and it means a purely resistive circuit does not look as though the setting failed.

The aa tool has not gone anywhere, and it is still the better choice when you want one value converted — or when you want the amplitude and angle of something that is not an answer by itself, such as a difference between two node voltages. Lesson 9 uses it that way throughout.

7.2Solved numerical examples

With values in F and H

AS7's Example 9.9

Find v(t) and i(t).

AS7's Example 9.9

Solution

Since this is the first AC problem we will solve, I will explain every step, including the manual ones, in full detail.

Step 1: sinusoids to phasors. We have to express the value of the source in terms Symbulator can understand, so we convert it from a sinusoid to a phasor: 10∠0°. We can pass this as (10∠0°) or, since the angle is zero, simply as 10.

Step 2: note the frequency. The circuit has a capacitor with a value given in farads. Because of this, Symbulator will need the frequency, given by the problem as 4 rad/s, to convert that value into an impedance in ohms.

Step 3: describe the circuit.

Circuit Description
e,1,0,10
r1,1,2,5
c,2,0,.1

Choose AC — alternating current, and put 4 in the ω — angular frequency box that appears beside it.

Notice that, in our circuit description, the order we give to the nodes of the resistor and the capacitor is chosen to be convenient for the answers we will ask for.

Step 4: read the answers. Once Symbulator is done, you should take a look at what it found:

  • the usual voltages in the nodes, voltage drops in the elements, and currents through the elements, in variables that should be familiar by now
  • the average power consumed in the source and the resistor, in ape and apr1. None is given for the capacitor, since capacitors and inductors do not consume real power.
  • the complex power consumed in all elements, in sc, se and sr1
  • the equivalent impedance of the rest of the circuit as seen by the source, in ze

To get the answers we need for this problem in particular, we ask for ir1 and vc. It is likely that the computer will give you the answers in rectangular form, with a real part and an imaginary part.

If we want to see them as an amplitude and angle, open the Mini-Tools card under the results, leave the tool set to aa — amplitude and angle, and give it the answer's name:

Value
ir1

It reads 1.78926.57° A.

That is the one-value way of doing it. If you would rather see every answer in polar form, there is a setting for it — see Rectangular or polar, above.

This is correct. You manually convert it to a sinusoid, by putting it back in the same terms the input was given in:

\[i(t) = 1.789 \cos(4t + 26.57°)\ \mathrm{A}\]

Asking for the capacitor voltage the same way gives 4.472∠-63.43°, that is, \(v(t) = 4.472 \cos(4t - 63.43°)\) V, which is correct.

Future solved problems will not include this level of detail in the solution, only the circuit description and the commands we give.

AS7's Practice Problem 9.9

Determine v(t) and i(t).

AS7's Practice Problem 9.9

Solution

Circuit Description
e,1,0,(20∠30°)
r1,1,2,4
l,2,0,.2

The source is given in polar form, and version 9 reads it as written — magnitude, the angle sign, then the angle in degrees.

Then AC, with 10 for ω. Mini-Tools with aa reads ir1 as 4.4723.43° A and vl as 8.94493.43° V. Both are correct.

We ask for the current in the resistor and get 4.472∠3.43°, and for the voltage in the inductor and get 8.944∠93.43°. Both are correct.

AS7's Example 9.10

Find the input impedance of the circuit. Assume that the circuit operates at ω = 50 rad/s.

AS7's Example 9.10

Solution

Since this is a passive circuit, to reduce it we will use the er tool.

Circuit Description
ca,1,2,2'm
r1,2,3,3
cb,3,0,10'm
l1,2,4,.2
r2,4,0,8

Set Type of analysis to Find equivalent and Type of equivalent to Resistance / impedance, with nodes 1 and 0, in AC at ω 50. The answer is called zeq.

returns
3.22–𝐢11.07

That is 3.22 − j11.07 Ω, which is correct.

AS7's Problem 9.35

Find the steady-state current i in the circuit when vs(t) = 50 cos 200t V.

AS7's Problem 9.35

Solution

The capacitor is in farads and the inductor in henries, so Symbulator needs the frequency, and the source is entered as its phasor: 50 cos 200t is 50 at an angular frequency of 200.

Circuit Description
e,1,0,50
r,1,2,10
c,2,3,5'm
l,3,0,20'm

AC, with ω — angular frequency set to 200.

Read it with Mini-Tools set to aa: aa(ir) gives 4.789-16.70° A.

That is 4.789 A at an angle of −16.7°, which is correct.

With values in Ω only

When the values of all the capacitors and inductors in the circuit are given in imaginary ohms, they must be entered in the circuit description as impedances, r. In these cases, Symbulator will not need a frequency.

AS7's Problem 9.37

Determine the admittance Y for the circuit.

AS7's Problem 9.37

Solution

Since the values are in ohms, these are all impedances. This is a passive circuit, so we could use the er tool. However, the structure of this circuit is so simple that we can reduce it by hand. The problem asks for the equivalent admittance, so our answer will be the inverse of the equivalent impedance:

Evaluate
1/pr(4,8j,-10j)
returns
0.25-0.025𝐢

That is 0.25 − j0.025 S, which is correct.

AS7's Problem 9.39

For the circuit shown, find the equivalent impedance, and use that to find the current I. Let omega = 10 rad/s.

AS7's Problem 9.39

Solution

Notice that the question gives you a frequency and that it is entirely superfluous: every value is already in ohms, so there is nothing for a frequency to convert. You will not need it.

Notice also that nothing here asks for a full simulation. The equivalent impedance falls out of one expression, using the shorthand for parallel combination:

Evaluate
4+20j+pr(16,-14j+25j)
returns
9.135+𝐢27.47

That is 9.135 + j27.47 Ω. The current is the source voltage divided by it:

There is no stored zeq to divide by, so put the whole thing in Mini-Tools with aa: aa(12/(4+20j+pr(16,-14j+25j))) gives 0.4145-71.60° A.

That is 414.5 mA at an angle of −71.6°, which is correct.

AS7's Problem 9.73

Determine the equivalent impedance for the circuit.

AS7's Problem 9.73

Solution

Eight impedances and no source, so this is a job for the equivalent-impedance tool rather than a solve. The names below carry the two nodes each element bridges, which is only a convenience — any unique names would do.

Circuit Description
r10,1,0,6j
r20,2,0,8j
r30,3,0,8j
r40,4,0,12j
r12,1,2,2
r23,2,3,-6j
r34,3,4,4
r14,1,4,-4j

Set Type of analysis to Find equivalent and Type of equivalent to Resistance / impedance, with nodes 1 and 0, in AC. The answer is called zeq.

returns
0.3794+𝐢1.46

That is 0.3794 + j1.46 Ω, which is correct.

With dependent sources

A dependent source is described exactly like an independent one — the value is just an expression naming another element's answer instead of a number.

The spelling of that name is the one thing that changed between the versions. Version 7 runs the quantity and the element together, as in 2icx; version 9 uses the same names it reports its answers under, so the current through cx is icx and the voltage across rx is vrx.

AS7's Example 10.1

Find ix in the circuit.

AS7's Example 10.1

Solution

The current source is controlled by the current through the capacitor cx, which is what the last field of j1 says.

Circuit Description
e,1,0,20
r1,1,2,10
cx,2,0,.1
l1,2,3,1
j1,0,3,2*icx
l2,3,0,.5

AC, with ω — angular frequency set to 4.

aa(icx) gives 7.589108.4° A.

That is 7.59 A at an angle of 108.4°, which is correct.

AS7's Practice Problem 10.1

Find v1 and v2 in the circuit.

AS7's Practice Problem 10.1

Solution

This one is controlled by a voltage rather than a current — three times the voltage across rx.

Circuit Description
j,0,1,10
rx,1,0,2
c,1,2,.2
l,2,0,2
r,2,3,4
e,3,0,3*vrx

AC, with ω — angular frequency set to 2.

aa(v1) gives 11.3360.02° V and aa(v2) gives 33.0257.13° V.

Both are correct.

AS7's Example 10.13

Obtain vo and io in the circuit.

AS7's Example 10.13

Solution

The book wants its answers in terms of cosine rather than sine, so the source is taken as 8 cos(1000t − 40°) — as a phasor, (8∠-40°).

Note the decimal points on the values. They make the arithmetic approximate, which here is what you want: an exact solve of this circuit carries surds through every step for no benefit.

Circuit Description
e,1,0,(8∠-40°)
r1,1,2,4'k
co,2,0,2'µ
l1,2,3,50'm
j1,0,3,.5*ico
ro,3,0,2'k

AC, with ω — angular frequency set to 1000.

aa(vro) gives 1.550-95.18° V and aa(ico) gives 0.003264-3.743° A.

That is 1.55 V at −95.18° and 3.26 mA at −3.74°, both correct.

AS7's Example 10.14

Find V1 and V2 in the circuit.

AS7's Example 10.14

Solution

Every value here is already in ohms, so no frequency matters. Again the decimal points keep the arithmetic approximate.

Circuit Description
j1,0,1,3
r1,1,0,1
rx,1,0,-1j
r3,1,2,-2j
j2,1,2,.2*vrx
r4,1,2,2+2j
r5,2,0,-1j
r6,2,3,2+2j
e,3,0,(18∠30°)

AC. The frequency is asked for but never used, so anything will do.

aa(v1) gives 2.708-56.73° V and aa(v2) gives 6.914-80.70° V.

That is 2.708 V at −56.73° and 6.914 V at −80.70°, both correct.

7.3Solved numerical-from-symbolic examples

AS7's Problem 9.89

Calculate the value of C so that the net impedance is purely resistive at 2 kHz.

AS7's Problem 9.89

Solution

The answer given by the book is 25 µF. But I think this is one of those unfortunately common instances where there is a mistake in the book. I believe they meant to ask "at 2k rad/s", because that is the frequency at which the answer they give is right. Let me tell you how I solved this problem and I will let you be the judge.

Circuit Description
c,1,0,c
r1,1,2,10
l,2,0,5'm

Find equivalent, Resistance / impedance, nodes 1 and 0, AC. The problem gives 2000 Hz and the ω box wants radians per second, so type 2*pi*2e3 straight into it — it takes an expression, not only a number.

Once the simulation finishes, solve for the value of c that makes the imaginary part of the equivalent impedance zero:

Now open the Solve card and ask for the capacitance that leaves no imaginary part:

Equation(s) to solve in terms of the results
im(zeq) = 0
Unknown(s) to solve for
c

Tick real solutions only before running it. Without it the answer comes back carrying an im(c) term, because nothing has told Symbulator that a capacitance is a real number.

The answer is c = 0.000001235, or 1.235 µF. This is not the answer the book gives.

I first used cSolve here, which also works, but my friend Qifan Wang — who verified my answers — pointed out, correctly, that it is not necessary: focusing on the imaginary part removes every reference to the complex operator, so we are solving an equation in real terms only.

Let's now repeat the process, using what I suspect is the frequency they meant: 2000 rad/s. I also want to show you something cool. Now that we know the answer is in the range of µF, we can declare the value of the capacitor as c'µ, so that the value of c we get will be in that scale:

Circuit Description
c,1,0,c'µ
r1,1,2,10
l,2,0,5'm

Find equivalent, Resistance / impedance, nodes 1 and 0, in AC at ω 2000. That gives zeq = \(\frac{500 i}{- c + 25 + 25 i}\), and the condition goes to the Solve card:

Equation(s) to solve in terms of the results
im(zeq) = 0

with c as the unknown and real solutions only ticked — the same equation as before, now against the new zeq — which answers c = 25. The calculator spells that function imag; version 9 uses im.

The answer is c = 25, that is to say 25 µF. This is the right answer in the book. So they asked the wrong question — they asked it using the wrong frequency unit.

7.4Solved symbolic examples

AS7's Problem 10.69

Find Vo/Vs.

AS7's Problem 10.69

Solution

Circuit Description
e,1,0,vs
c,1,2,c
r1,2,o,r
o,0,2,o

The ω box takes a name as readily as a number: type omega into it and the answers come back as functions of it.

We ask for vo/vs and get −c·ω·r·𝐢, which is correct.