es lab eee454comp

28
Srmscet Bareilly [2013] Electrical Simulation Lab EEE 454 IV Sem EN Branch

Upload: sachin10dulkar

Post on 08-Apr-2016

40 views

Category:

Documents


0 download

DESCRIPTION

matlab programming

TRANSCRIPT

Srmscet Bareilly

[2013]

Electrical Simulation LabEEE 454

IV Sem EN Branch

INDEX

Expt .No. Experiment Name1 To obtain branch currents and node voltages of a resistive

network2 To obtain Thevenin’s equivalent circuit of a resistive network3 To obtain transient response of a series RLC circuit for a step

voltage input4 To obtain transient response of a parallel RLC circuit for a steo

voltage input.5 To obtain transient response of a series RLC circuit for a

alternating square voltage wave form input6 To obtain transient response of a series RLC circuit for a

sinusoidal voltage input7 To obtain transient response of output voltage in a single phase

half wave rectifier circuit using capacitive filter8 To obtain transient response of output voltage in a single phase

full wave rectifier circuit9 To obtain output characteristics of CE NPN transistor10 To obtain frequency response of an RC coupled CE amplifier

EEE-453: ELECTRICAL SIMULATION LAB(List of Experiments (PSPICE based)L T P0 0 2Note: Select any 10 out of the following:1. Study of various commands of PSPICE.2. To determine node voltages and branch currents in a resistive network.3. To obtain Thevenin’s equivalent circuit of a resistive network.4. To obtain transient response of a series R-L-C circuit for step voltage input.5. To obtain transient response of a parallel R-L-C circuit for step current input.6. To obtain transient response of a series R-L-C circuit for alternating square voltage waveform.7. To obtain frequency response of a series R-L-C circuit for sinusoidal voltage input.8. To determine line and load currents in a three phase delta circuit connected to a 3-phasebalanced ac supply.9. To plot magnitude, phase and step response of a network function.10. To determine z,y,g,h and transmission parameters of a two part network.11. To obtain transient response of output voltage in a single phase half wave rectifier circuit usingcapacitance filter.12. To obtain output characteristics of CE NPN transistor.[22]13. To obtain frequency response of a R-C coupled CE amplifier.14. To obtain frequency response of an op-Amp integrator circuit.15. To verify truth tables of NOT, ANDor OR gates implemented by NAND gates by plotting theirdigital input and output signals.Reference Books:1. Irvine, Calif, “PSPICE Manual” Microsim Corporation, 1992.2. Paul W. Tuinenga, “SPICE : A guide to circuit Simulation and Analysis Using PSPICE”,Prentice Hall, 1992.3. M.H. Rashid, “SPICE for Circuits and Electronics Using PSPICE” Prentice Hall of India, 2000.

INTRODUCTION

Electrical and electronic circuit design requires cost-effective and accurate methods for

evaluating circuit performance. Computer-aided simulation allows the designed system to be

simulated so that the expected circuit behaviour can be verified under specific operating

conditions, any design errors can be identified and the system performance can be refined by

fine-tuning relevant parts of the design. Hence, costly mistakes can be avoided well before the

final hardware implementation of the circuit.

SPICE (Simulation Program with Integrated Circuit Emphasis) is a general-purpose

circuit program that can perform analyses on various aspects of electronic circuits: the operating

point of transistors, time domain and frequency domain response, effects ofparameter variations,

among others. PSpice is the version of the software developed by MicroSim Company.

The simulation process is divided into three main parts:

(i) Drawing the circuit diagram using the MicroSim Schematics software.

(ii) Setting up the simulation parameters and running the simulation itself.

(iii) Observation/ evaluation of simulation results using MicroSim Probe.

Some Commercial Versions of SPICE

You can search for SPICE related information on the internet by using the search string EDA +

SPICE.There are now many commercial versions of SPICE supplied by various companies.

Some of them are listed below (this is not an exhaustive list)

PC Versions

1. PSPICE . supplied by OrCAD.

2. IS-SPICE . supplied by IntuSoft.

3. Z-SPICE. supplied by Z-Tech.

4. MultiSym . supplied by Electronic Work Bench (www.interactiv.com)

The latest review version of a limited demo (student)version of the professional package of

PSpice is available free of charge. It can be downloaded from Cadence website:

http://www.cadence.com/products/orcad/index.aspx

Types of Simulation Studies

The following types of studies can be conducted on a given analog circuit using PSPICE:

1. Bias Point. Analysis.Determination of steady-state response of the circuit when time-

invariant D.C.sources are applied. This can be done using op command.

2. D.C. Sweep Analysis. Determination of response of the circuit when excitation or any

other component is varied over a range. This can be done using dc command.

3. A.C. Analysis (Frequency Domain Analysis) . Determination of steady-state response of

the circuit when sinusoidal excitation is applied mine the frequency response of the

circuit. Thefrequency of excitation can be varied to determine the frequency response of

the circuit. This requires ac command and ac speci_cation in at least one of the sources in

the circuit.

4. T.F. Analysis . Determination of small-signal transfer function with small-signal gain,

input impedance, output impedance. This can be done using tf command.

5. Transient Analysis (Time Domain Analysis). Determination of variation of response of

the circuit with respect to time. This can be done using .tran command.

Apart from the basic analyses mentioned above, we can also conduct the following advanced

analyses:

a. Sensitivity Analysis .This can be done using .SENS command.

b. Distortion Analysis . This can be done using .DISTO command.

c. Noise Analysis . This can be done using .NOISE command.

d. Pole-Zero Analysis . This can be done using .PZ command.

Types of Output commands in PSPICE

.PRINT The result from dc analysis can be obtained in the form of table

Example:-print statement .PRINT DC (Output variables)

We will get output variables, maximum up to 8 values

. .PLOT The result from dc analysis can also be obtained in the form of line printer plots. The

plots are drawn by using characters, and the result can be obtained from any kind of printer.

Example:-plot statement .PLOT DC (Output variables) +

[{(Lower Limit) value}, (Upper limit) value}]

We will get output variables, maximum up to 8 values

The range and increment of the x-axis is fixed by the dc analysis command.

The range of the y-axis is set by adding [{(Lower Limit) value}, (Upper limit) value}]

At the end of the .PLOT statement .it can be placed in the middle of a set of o/p variables.

If the y-axis range is omitted, P Spice assigns a default range determined by the range of the

output variables.

Example:-.PLOT statement .PLOT DC V(2) , V(3,5), V(R1), I(Vin) , I(R1)

. .PROBE Probe is a Graphical wave form analyzer

Example statements:-

.PROBE where no output variables is specified, it writes all node voltages and all the element

currents.

PROBE OUTPUT

.PROBE V(5),V(4,3), I(R2) where the output variables are specified ,PSpice writes only the

specified out put variables to the PROBE .DAT file.

In the statement we have to write ‘m’ for milli not to write as MIL ;

M for mega , not to write as MEG

If a dc voltage source VS is connected between nodes 2 and 3,the plot of the trace(or curve) =

V(2,3) * I(VS) will give the power delivered by the source VS

Steps to construct and simulate a circuit:

1. To simulate a circuit first we have to draw a graphical representation of circuit using

schematics icon.

2. After opening schematics page select place part search for the required part and place it

on the schematics page.

NOTE: don’t forget to add grount to each circuit.

3. Once all the parts are selected, select draw wire and connect all parts according to circuit

diagram.

4. To change the values of parts double click on the part and change the attributes.

5. Now save the new schematic and select create netlist.

6. Once the netlist is created goto analysis setup and select the analysis to be performed.

7. Now select simulate and see the result.

Experimant.No.1

Objective: To determine node voltages and branch currents in a resistive network.

Circuit and theory:

Analysis and Expected output:

Step 1: Draw the schematic and set attributes.

Output File:

*** INCLUDING Schematic1.net ****

* Schematics Netlist *

R_R4 0 $N_0001 1k

R_R1 $N_0003 $N_0002 6k

R_R3 0 $N_0002 4k

I_I1 $N_0001 $N_0002 DC 2mA

V_V2 $N_0003 0 20V

**** RESUMING Schematic1.cir ****

.INC "Schematic1.als"

**** INCLUDING Schematic1.als ****

* Schematics Aliases *

.ALIASES

R_R4 R4(1=0 2=$N_0001 )

R_R1 R1(1=$N_0003 2=$N_0002 )

R_R3 R3(1=0 2=$N_0002 )

I_I1 I1(+=$N_0001 -=$N_0002 )

V_V2 V2(+=$N_0003 -=0 )

.ENDALIASES

Result:

Experimant.No.2

Objective: To obtain Thevenin’s equivalent circuit of a resistive network

Circuit and Theory:

Step 1: draw the schematic of the circuit and obtain node voltage and branch currents.

Step 2: To obtain thevenins voltage connect a very high resistance in place of load resistance and drop across high resistance will give Vth.

Step 3: to obtain resistance we will caiculate Ith by connecting Low resistance across load

Step4: Now Rth=Vth/Ith

Rth=8/2.858m=3399ohm

Thevenins equivalent is

Experimant.No.3

Objective: To obtain transient response of a series RLC circuit for a step voltage input.

Circuit and Theory:

Step 1: draw the schematic and set the attributes

In the above circuit VDC is used as step input with help of a swithch which closes at t=0.

Step 2: transient analysis is selected to obtain time response analysis. After simulation the obtained response of circuit current with respect to time is as shown.

Time

0s 0.1us 0.2us 0.3us 0.4us 0.5us 0.6us 0.7us 0.8us 0.9us 1.0usI(C1)

-2.0fA

-1.5fA

-1.0fA

-0.5fA

0A

0.5fA

Experimant.No.4

Objective: To obtain transient response of a parallel RLC circuit for a steo voltage input.

Circuit and Theory:

Step 1: draw the schematic and set attributes

In the above circuit Idc is used as step currendt input with help of a switch which closes at t=0.

Step 2: transient analysis is selected to obtain time response analysis. After simulation the obtained response of circuit current with respect to time is as shown.

Step 2: Select transient analysis and obtain response of voltage across capacitor

Time

0s 0.1us 0.2us 0.3us 0.4us 0.5us 0.6us 0.7us 0.8us 0.9us 1.0usV2(C1)

-80uV

-40uV

0V

40uV

80uV

Experimant.No.5

Objective: To obtain transient response of a series RLC circuit for a alternating square voltage

wave form input.

Circuit and Theory:

Step 1: draw the schematic and set the attributes

In the above circuit pulse voltage is used as alternating squre voltage input with help of a swithch which closes at t=0.

Following are its attributes:

Step 2: transient analysis is selected to obtain time response analysis. After simulation the obtained response of circuit current with respect to time is as shown.

Time

0s 0.1ms 0.2ms 0.3ms 0.4ms 0.5ms 0.6ms 0.7ms 0.8ms 0.9ms 1.0msV1(V3)

0V

5V

10VI(C1)

-10mA

-5mA

0A

5mA

SEL>>

Experimant.No.6

Objective: To obtain transient response of a series RLC circuit for a sinusoidal voltage input.

Circuit and Theory:

Step 1: draw the schematic and set the attributes

In the above circuit Vsin is used as sinusoidal voltage input

Following are its attributes:

Step 2: transient analysis is selected to obtain time response analysis. After simulation the obtained response of circuit current with respect to time is as

shown Time

0s 10ms 20ms 30ms 40ms 50ms 60ms 70ms 80ms 90ms 100msI(C1)

-20uA

0A

20uAV1(V4)

-20V

0V

20V

SEL>>

Experimant.No.7

Objective: To obtain transient response of output voltage in a single phase half wave rectifier circuit using capacitive filter.

Circuit and Theory:

Step 1: draw the schematic and set attributes

Step 2: transient analysis is selected to obtain time response analysis. After simulation the obtained response of circuit current with respect to time is as shown

Time

0s 10ms 20ms 30ms 40ms 50ms 60ms 70ms 80ms 90ms 100msV2(R1)

-20V

0V

20VV1(V1)

-20V

0V

20V

SEL>>

Experimant.No.8

Objective: To obtain transient response of output voltage in a single phase full wave rectifier circuit.

Circuit and Theory:

Step 1: draw the schematic and set attributes

Step 2: transient analysis is selected to obtain time response analysis. After simulation the obtained response of circuit current with respect to time is as shown

Time

0s 10ms 20ms 30ms 40ms 50ms 60ms 70ms 80ms 90ms 100msV(V1:+,V1:-)

-20V

0V

20VV2(R1)

-20V

0V

20V

SEL>>

Experimant.No.9

Objective: to obtain output characteristics of CE NPN transistor

Curcuit and Theory:

Step 1: draw the schematic and set attributes

To obtain the out put charecteristics of a transisters we have to plot a graph between Vcc and Ic for different Ib.

Here we use to types of analysis

1. DC Sweep analysis: vary Vcc from 0 to 10 volts on x-axis.2. Parametric analysis: to obtain response for different Ib we vary Vbb from

0.5 to 2volts.

Select Dc sweep analysis and plot a graph for Ic. Following is the output charecteristics.

V_V2

1V 2V 3V 4V 5V 6V 7V 8V 9V 10VIC(Q1)

0A

2.0mA

4.0mA

6.0mA

8.0mA

Experimant.No.10

Objective: To obtain frequency response of an RC coupled CE amplifier.

Curcuit and Theory:

Step 1: draw the schematic and set attributes

Response of an RC coupled amplifier is plot between frequency in decades and voltage gain .

To obtain frequency response we should use AC sweep analysis.

Select the range of frequency from 1KHz to 1MHz.

Now plot a graph ratio of Vi and Vo(V R6) .

Following is the response of RC coupled CE amplifier.

Frequency

1.0KHz 3.0KHz 10KHz 30KHz 100KHz 300KHz 1.0MHzV2(R6) / V1(V1)

0

40

80

120