previous | back | home | next
updated 2000.09.02
Author Ananda Murthy R. S.
Unsolved Problem No. 39, taken from
'Problems in Electrical Engineering', VIII Edition, page no.47,
by S. Parker Smith & N. N. Parker Smith, 
Asia Publishing House, 1976.

This example is meant for novice users of SPICE OPUS to help them become familiar with steady-state analysis of a circuit excited by constant frequency sinusoidal excitation. 

PROBLEM: 

A coil of resistance 15 Ohm and inductance 0.05H is connected in parallel with a non-inductive resistor of 20 Ohm. Find: (a) The current in each branch of the circuit; (b) The total current supplied; (c) the phase angle of the combination when a voltage of 200V at 50Hz is applied. Answer: (a) 9.2A, 10A; (b) 17.6A; (c) 22 Deg. 

EXPLANATION:

Figure-1 shows the circuit simulated using SPICE OPUS. Dummy voltage sources work as ammeters. 

You know that steady-state analysis of a circuit excited by constant frequency sinusoidal excitation is done in frequency domain using the concept of impedance. For frequency domain analysis, a sinusoidal voltage source is represented as: 

v??????? n+ n- dc 0 ac rmsvalue

Observe that dc value is specified as zero and frequency is not specified here. Only the RMS value of the source is given in this statement. If dc value is not given, SPICE OPUS outputs a warning message and takes the value as 0. 

To conduct frequency domain analysis at a constant frequency the command to be included between .control and .endc is: 

ac dec 1 source_frequency source_frequency 

By default, SPICE OPUS outputs angle in radians. To make it output angle in degrees the command is: 

set units=degree 

Observe how we can print magnitude and phase angle of voltage and current. 

Create the circuit file given below using a text editor without any formatting and save it as a *.cir file. Then start SPICE OPUS. At SPICE OPUS prompt type 'source filename.cir' to run simulation and get results. Your results should tally with what is given below.

CIRCUIT FILE:

STEADY-STATE AC CIRCUIT ANALYSIS

* Sinusoidal Voltage Source

vin 1 0 dc 0 ac 200v

* vx  measures total current
* vx1 measures current through inductive branch
* vx2 measures current through resistive branch

vx  1 2 dc 0
vx1 4 0 dc 0
vx2 5 0 dc 0

* Passive Components
r1 2 3 15
r2 2 5 20
l  3 4 50mH

.control
set units=degree
ac dec 1 50 50

echo Total Current

* This command prints magnitude of a complex vector.
print mag(i(vx))

* This gives a blank line.
echo
echo Current through branch 1
print mag(i(vx1))
echo
echo Current through branch 2
print mag(i(vx2))
echo

echo Phase Angle of Impedance of Circuit in Deg

* This command prints phase angle of a complex vector
print ph(v(1)/i(vx))

.endc

.end

RESULTS:

Circuit: STEADY-STATE AC CIRCUIT ANALYSIS

Total Current
mag(i(vx)) = 1.766299e+01

Current through branch 1
mag(i(vx1)) = 9.208282e+00

Current through branch 2
mag(i(vx2)) = 1.000000e+01

Phase Angle of Impedance of Circuit in Deg
ph(v(1)/i(vx)) = 2.215021e+01
previous | back | home | next