Вы находитесь на странице: 1из 78

Course Objectives

 To simulate and analyze basic circuits using schematics.


 To develop programming skills to describe electric circuits using netlist.
 To design, simulate and verify circuits consisting of R, L, C, diodes, transistors
and OPAMPs.
 To generate various signals using MATLAB and study their spectrum.
 To analyze a given system and determine the response of the system for the
given input using MATLAB.
Course Outcomes
At the end of this course, students will be able to
 Simulate designed circuits using schematic and Netlist.
 Explore various applications using diode, BJT and OPAMP.
 Generate various signals and verify their spectrums.
 Analyze a given system for various inputs.
Evaluation plan
 Internal Assessment Marks : 60%
 Continuous evaluation component (for each experiment):10 marks
 Assessment is based on conduction of each experiment, exercise problems,
answering the questions related to the experiment.
 Total marks of the 10 experiments scaled to 60 marks
Note: Follow code of conduct (punctual, disciplined, and sincere)
 End semester assessment: 40 % (40 marks)
 write up (circuit diagram, design/analysis, netlist, observation table, expected
results/graphs): 12marks
 Conduction: 12 marks
 Results and Calculations: 08 marks
 Viva-Voce: 08 marks
1
Introduction to Simulation using PSPICE
Introduction
Simulation allows predicting the circuit behavior, without constructing a prototype. A
simulator is a software that enables to assemble circuit components models tested. It
provides economic and fast solution for testing of designs. SPICE (Simulation Program
with Integrated Circuit Emphasis) can be used to simulate circuits containing resistors,
capacitors, inductors, mutual inductance, independent and dependent voltage and
current sources and semiconductor devices. The circuit can be described either as a
Netlist or as a schematic. The described circuit is analyzed and the waveforms are
displayed interactively using the waveform viewer, Probe. The bias point details and
node voltages and currents are noted using output file.

Programming in PSPICE
Netlist can have 5 parts
 Title and comment statements:
First statement while writing the Netlist is the Title. Netlist file can have any
number of comment statements, by appending an asterisk(*) in the first column, the
statements are considered to be comments.
 Circuit Description:
Circuit Description can be done with data statements. Data statement is composed of
element name, circuit nodes to which elements are connected and the value of the
element.
 Analysis:
Analysis like AC, DC or Transient can be carried on the specific circuit. The
solution control statement specifies the type of analysis to be performed.
 Output Description:
The output specification statements specify how the results are to be stored in the
output file.
 END Statement:
The last statement while writing Netlist must be END statement, which indicates the
end of the simulation.

2
 Format of Data Statements:
 Passive Elements:
Resistor : Rname node1 node2 value
Capacitor : Cname node1 node2 value
Inductor : Lname node1 node2 value
Coupled Circuit : Kname L1 L2 value

Suffixes to be used to specify the value are: P-Pico, N-nano, U-micro, M-milli,
K-kilo, MEG- mega. Units are optional.

For coupled circuits, value indicates coefficient of coupling and should be a


number between 0 and 1. The ( ) DOT end should be the first node of L1 and
L2.
 Independent Sources:
Voltage Sources: Vname +node -node type value
Current Sources: Iname +node -node type value

Type indicates the type of the source model. Source Models: Few of the source models
are
 DC VALUE
 AC MAGNITUDE PHASE
 PWL (T1 V1 T2 V2 T3 V3 T4 V4…)
 PULSE (V1 V2 TD TR TF TW PER)

Figure (a) Example of PWL Waveform Figure (b) PULSE Waveform

 Solution Control Statement:


DC Analysis: .DC SNAME IVAL FVAL INC
AC Analysis: .AC LIN NP FSTART FSTOP

3
Transient Analysis: .TRAN TSTEP TSTOP UIC

.DC statement performs a dc sweep analysis for the source SNAME with IVAL as its
initial value, FVAL as its final value in steps of INC. It gives repeated dc steady state
solutions for different values of the source SNAME. Circuit parameters other than
SNAME remain unchanged.
Example: .DC VIN -0.125 0.125 0.005: This command does a DC sweep. The
Voltage source VIN is swept from -0.125 volts to 0.125 volts in steps of 0.005 volts.

.AC Statement is used to calculate the frequency response of a circuit over a range of
frequencies from FSTART to FSTOP. NP denotes the number of points and LIN
indicates linear sweep over the range.
Example: .AC DEC 10 100KHZ 10GHZ : The real and imaginary response of the
circuit is calculated as the inputs are swept from 100KHz to 10GHz by decades with 10
points per decade.

.TRAN statement performs a transient analysis on the circuit from time t = 0 to t =


TSTOP seconds in steps of TSTEP. Example: .TRAN 20NS 5uS.

UIC stands for use initial conditions and Used when initial charge across capacitors or
initial current through inductors not equal to zero.

Format of the output specification statements:

 .OP: Used with DC analysis. It displays the DC voltages, current delivered by the
sources and the total power dissipated. It specifies DC operation point.

 .PRINT type list: Prints values in output file. Here type is the type of analysis such
as DC,AC,TRAN etc. and list is a list of output variables to be displayed.

 .PROBE: It is for invoking the waveform viewer PROBE which displays the results
of PSPICE simulator graphically and interactively.

 .PLOT: It is to get the output plots.

 .TF: It is the small signal transfer (used in Thevenin’s equivalent).

4
START INSTRUCTIONS
There are two ways we can simulate the circuits
A) Drawing the circuit and simulating using Capture CIS.
B) Writing Netlist and simulating using PSPICE.
To work using software tools it is very important where and how you save your
work/programs

Follow the naming and location instruction properly


1) Create a folder with first name of student (limit name to max 7 letters) and save
in D:\student\SCS15\SecA1(SecA2 and so on)
2) Again in above folder create two folders as NET15 and SCH15
A – SCHEMATIC: Using Capture CIS
1. Open Capture CIS
startup→Allprograms→OrCAD→CaptureCIS
2. Create new project: File →new → Project → Create a new project: Select and
enter :
 Analog or Mixed A/D,
 Specify name of project as Expt number (eg. Expt 1 as E1).
 Location: in folder SCH15
{If asked then use Create a blank project worksheet appears}
3. A blank worksheet appears if not click on ‘+’ near the design→
‘+’SCHEMATIC1→PAGE1
Right click on SCHEMATIC1 rename. (eq. S1, S2….)

B – Writing Netlist
1. Open PSpice A/D
2. startup→Allprograms→OrCAD→PSpice A/D
3. Create new text file: File →new → text file: Save text file with ‘.cir’ extension
with name as N1.cir or N2.cir in folder E1 in NET15
4. To simulate again open that file which was saved with .cir extension and run.

5
Experiment No. 1: Verification of KCL & KVL

Objectives:
To verify Ohms law and Kirchhoff laws (KCL & KVL) using simple resistive circuits.

Circuit 1: Ohms Law

Figure 1.1 Circuit to verify Ohms law


Steps to draw the Schematic:
Get all the components and place them in the worksheet as shown in Figure 1.1.
Place → part →
1. Resistance : Analog → R
2. Place DC Voltage source from the Source library (Vdc). To set the value for
Vdc, double click and type the values as Vdc=10 V.
3. Place ground: go to Place →ground. Use 0/source option.
4. Place →wire: Connect all the components using wires as shown in the circuit.
5. Place→netalias to relabel the nodes.
6. Save the schematic as specified in introduction.

Analysis/Simulation set up:


1. Go to PSPICE →create netlist.
2. To setup a PSPICE simulation, click on “PSPICE” and then select “New
simulation profile”. Enter a filename for the simulation click on “Create”.
3. To do analysis select edit simulation settings→ DC Sweep and select Primary
source. Enter voltage source name as V1, Sweep type (i) value list and give 10
or (ii) select Linear and give start value as 10v, end value as 10v and increment
as 1v (Note: Don’t give increment as zero).
4. Run the simulation. (After simulation is finished a probe window pops up).

6
5. Measure currents and voltages using “Trace→Eval” goal functions.
Note: Eval goal functions works only for constant value
6. From the “TRACE” menu, select “ADD TRACE” and select the voltages and
currents you would like to display. Also verify Ohms Law by writing expression
in TRACE window.

Circuit 2: To verify KCL & KVL

Figure 1.2 Circuit to verify KCL and KVL


Results:

Figure 1.3 (a) Voltages across R1, R2, R3

Figure 1.3 (b) Current through R1, R2, R3

7
Circuit 3: Voltage source

Figure 1.4 Circuit to verify relation between voltage source and load resistor

Steps to draw the schematics:


1. PARAM: Select part Special library
To Edit properties: Insert new column: name=val, its value =1, apply and
display column  headed val (name and value)
2. Change value of that part (in this case say load resistor) to {val}
3. Place net alias for all important nets in circuit

Analysis/Simulation set up:


1. PSPICE →create netlist.
2. To setup a PSPICE simulation click on “PSPICE” and then select “New
simulation profile”. Enter a filename for the simulation click on “Create”.
3. Analysis→edit the simulation set up : DC sweep, primary sweep (give voltage
source name (V1), and in Sweep type (i) value list and give 10 volts or (ii) select
Linear and give start value as 10v, end value as 10v and increment as 1v (NOTE:
Don’t give increment as zero).
4. Also select parametric sweep, global parameter, parameter name as val, and
Sweep type log : 1 to 100K , no of points per decade is 10.
5. From the TRACE Menu select ADD TRACE and select the input and output
voltage (Set X-axis in log scale) to view variation clearly.

8
Result:

Figure 1.5 Voltage v/s load resistance waveform

Circuit 4: Current Source using voltage source

Figure 1.6 Circuit to analyze the behavior of voltage source as current source

Analysis/Simulation set up
1. PSPICE →create netlist
2. To setup a PSPICE simulation click on “PSPICE” and then select “New
simulation profile”. Enter a filename for the simulation click on “Create”.
3. Analysis→edit the simulation set up: DC sweep and follow the similar
instructions given for previous circuits.
4. Also select parametric sweep, global parameter, parameter name as val, and
Sweep type log : 1 to 100K , no of points per decade is 10.

9
5. From the TRACE Menu select ADD TRACE and select the load current (Set X-
axis in log scale) to view variation clearly. Also plot the current independent of
load (V1/100+100K).
Result:

Figure 1.7 voltage/(R1+Rsrc) and load current v/s Load


Exercise:
1. Analyze the circuit shown in Figure 1.2 (i) without R3 (ii) without V2 (short the
end).
2. By varying series resistance (R1), use the circuit in Figure 1.8 as voltage and the
current source.
3. Verify the KVL & KCL for a AC circuit shown in Figure 1.9

Figure 1.8 Circuit for problem 2 Figure 1.9 Circuit for problem 3

4. Use the PSpice Schematics to construct the circuit shown in Figure 1.10 and obtain
the node voltages and branch currents.

10
Figure 1.10 Circuit for problem 4
5. Find the loop current in the loop containing R2 R1 L1 and L2 shown in the loop
and voltage across 6Ω resistor for the circuit shown in Figure 1.11.

Figure 1.11 Circuit for problem 5 Figure 1.12 Circuit for problem 6

6. Use the PSpice Schematics to construct the circuit below and obtain the node
voltages.

11
Experiment No. 2: R L and C Circuits

Objectives:
1. Analysis of R C and R L circuits by varying the time constant.
2. Verification of coupling circuits.
3. To simulate and analyze series and parallel resonating circuits at 10 kHz
resonant frequency.
4. To observe the effect of variation in R, L, and C in resonating circuits.

Circuit 1: R C Circuit

Figure 2.1 R C circuit


Steps to draw the Schematic:
Get all components and place them in the worksheet as shown in Figure 2.1.
Place → part →
1. Select part R, and C from Analog library.
2. Place VPULSE source from the Source library.
3. To set the value for VPULSE double click and type the values as V1=0, V2=5,
TD=2n, TR=2n, TF=2n, PW=5m, PER=10m and AC=5.
4. Place ground: go to Place →ground. Use 0/source option.
5. Connect all the components as in the circuit diagram place →wire.
6. Place net alias for all important nets and Save the schematic appropriately.

Analysis:
1. PSPICE →create netlist.
2. To setup a PSPICE simulation, click on “PSPICE” and then select “New
simulation profile”. Enter a filename for the simulation click on “Create”.

12
3. Analysis → edit the simulation set up : set Time Domain(Transient) analysis,
Run to time=20ms, Maximum step size=5ms.
4. Click on run button. Once the simulation is finished a probe window pops up.
5. From the TRACE Menu select ADD TRACE and select the voltage and currents
you like to display.

Result:

Figure 2.2 Input and Output waveform of R C circuit

Analysis:
1. PSPICE →create Netlist & setup a new simulation profile and save.
2. Analysis → edit the simulation set up : set AC Sweep/Noise analysis, select AC
Sweep type ‘Logarithmic, Start Frequency=1, Stop Frequency=10k and
Total Points=100.
3. Click on run button. Once the simulation is finished a probe window pops up.
4. From the TRACE Menu select ADD TRACE and Plot the frequency response.

13
Result:

Figure 2.3 Gain in dB v/s frequency

Circuit 2: R-C Circuit by varying time constant

Figure 2.4 RC circuit by varying R


Steps to draw the Schematic:
Draw the R C circuit shown in Figure 2.4 in a new schematic and use place part as
1. PARAM: Select part Special library.
To Edit properties: Insert new column: name=val, its value =1, apply and
display column headed val (name and value).
2. Change value of that part (in this case say resistor) to {val}.
3. Place net alias for all important nets in circuit & save appropriately.

14
Analysis:

1. PSPICE →create netlist & setup a new simulation profile and save.
2. Analysis→ edit the simulation set up: set Time Domain(Transient) analysis,
Run to time=20m, Maximum step size=5m.
3. Also select parametric sweep, global parameter, parameter name as val, and
value list as 10, 5k, 10k.
4. From the TRACE Menu select ADD TRACE and display input output voltages.

Result:

Figure 2.5 Waveform across the capacitor in R C circuit by varying R

Circuit 3: R C Circuit by giving a Piece Wise Linear input

Figure 2.6 R C circuit for giving a PWL input

15
Steps to draw the Schematic:

1. Get all components and draw circuit as shown in Figure 2.6.


2. Place VPWL source from the Source library.
To set the value for VPULSE double click and type the values as V1=5, V2=5 ,
V3= -5, V4= -5, V5=5, V6=5 ,V7= -5 , V8= -5, T1=0, T2=4m, T3=4.00001m,
T4=10m, T5= 20m, T6=25m, T7=25.00001m and T8=30m.
3. Connect all the components, label all nets in the circuit & save appropriately.

Analysis:

1. Create netlist and new simulation profile.


2. Analysis→edit the simulation set up: set Time Domain(Transient) analysis,
Run to time=40m, Maximum step size=4m.
3. Run simulation and use trace various voltages.

Result:

Figure 2.7 Waveform of R C circuit for giving a PWL input

16
Circuit 4: Verification of coupling circuit

Figure 2.8 Coupled Circuits

Steps to draw the Schematic

Get all components and place them as shown in Figure 2.8


1. Set the coupling 0.8 and edit K properties and set L1=L2.
2. Save the schematic and run simulation and plot various currents v/s frequency.
3. Compare the manually calculated result and simulated result.

Result:

Figure 2.9 Simulated Results

17
Circuit 5: Series Resonant Circuit

(a) (b)
Figure 2.10 (a) Series Resonant circuit (b) Current Vs Frequency waveform

Steps to draw the Schematic:

1. Connect all components of circuit shown in Figure 2.11.


2. Place AC Voltage source from the Source library (VAC), Set the value for VAC
as ACMAG=10V and ACPHASE=0.
3. Label all important nets and save the schematic.

Figure 2.11(a) Series Resonant circuit at 10kHz resonant frequency

Analysis:
1. PSPICE →create netlist and Set AC Sweep type ‘Linear’, Start Frequency=1k,
Stop Frequency=20k and Total Points=100 and run
2. TRACE various voltage and currents, reactance v/s frequency.

18
Results:

Figure 2.11(b) Load current Vs frequency

Figure 2.11(c) Reactance (XL and XC) v/s frequency

Figure 2.11(d) Impedance (R+j(XL-Xc)) v/s frequency

19
Figure 2.11(e) Phase angle of series resonant circuit (tan-1((XL-XC)/R)) v/s frequency

Circuit 6: Series Resonant circuit by varying R, L and C

Figure 2.12(a) Series Resonant circuit at 10 kHz resonant frequency by varying L

Steps to draw the Schematic:


1. Copy the series resonant circuit in a new schematic and use PARAM.
2. Edit inductor L value to {val}, label important nets and save the circuit.

Analysis:
1. Create netlist and simulation profile for AC sweep for 1KHz to 20KHz.
2. Also select parametric sweep, global parameter, parameter name as val, and
value list as 0.27 , 0.25, 0.23.
3. Run simulation and plot load current.
4. Similarly obtain plots of currents by (ii) varying C(1.1n,1n,0.9n) and keeping R
and L constant and (iii) varying R (0.8k,1k,1.2k) and keeping C and L constant.

20
Result:

Figure 2.12(b) Current v/s Frequency waveform by varying L

Figure 2.12(c) Current v/s Frequency waveform by varying C

Figure 2.12(d) Current v/s Frequency waveform by varying R

21
Exercise:

1. Simulate and analyze the parallel resonant circuit at resonant frequency 10 kHz
given below in Figure 2.13. Obtain
a) Impedance v/s Frequency plot.
b) Current v/s frequency plot.
c) Susceptance v/s frequency plot (BL= -1/(2*pi*f*L) and Bc=2*pi*f*C).
d) Vary R, Land C and observe the effect in impedance v/s frequency plot.

Figure 2.13 Parallel Resonant circuit at 10kHz resonant frequency

2. Stimulate and analyze the R C and R L circuits using VPULSE and VPWL inputs.
(a) Find the voltages across R, L, or C in each case by varying R, C and L.
(b) Also observe the Frequency Response in each case.

3. Find the Frequency Response.


(a) Vary the time constant and observe the changes.

4. Design a Band pass filter using a low pass filter of cut off frequency 10k and high
pass filter with cut off frequency 1k.

Figure 2.14 Cascading filters

22
5. Determine the real power in the circuits shown in Figure 2.15. Use PSPICE and
obtain a plot of the instantaneous voltages. currents and power.

Figure 2.15 Circuits for problem 4


6. For the parallel RLC circuit shown, use PSpice and Probe to plot voltage magnitude
and phase angle over a range of 30 to 300 Hz in increment of 1 Hz. Determine the
resonant frequency. Also draw the 0.707 V0(max) line and estimate the circuit
bandwidth and the Q-factor.

7. For the series RLC circuit shown, use AC Analysis to sweep the frequency from
10Hz to 100KHz over a decade variation with 200 points per decade.
(a) Plot the current magnitude and phase angle. Determine the resonant frequency.
(b) Also draw the 0.707(V0(max)) line and estimate the circuit bandwidth b, and the
Q-factor.
(c) Plot the real and reactive power delivered to the circuit as a function of
frequency.

Figure 2.16 Circuits for problem 5 Figure 2.17 Circuits for problem 6

23
Experiment No. 3: Diode and its Applications
Objectives:
1. To simulate and analyze various applications of diode
2. To use C filter with rectifiers to smooth out the ripples present in rectified output

Circuit 1: Half wave rectifier

(a) (b)

Figure 3.1 (a) Half wave rectifier circuit (b) Rectified output waveform

Steps to draw the Schematic:


Get all components and connect circuit as shown in Figure 3.1(a).
1. For Diode: Select part D1N4002 from Diode library
2. Place sinusoidal Voltage source from the Source library (Vsin)
Set the value for Vsin, as Voff=0, Vampl=23, freq=50Hz.
3. Place net alias & Save the schematic.

Analysis:
1. Create netlist, simulate transient sweep for time =40ms
2. Run and TRACE the voltage and currents.

24
Results:

Figure 3.2 Amplitude of secondary input voltage for HWR set to (a) 23V (b) 1V

Figure 3.3(a) I/O waveforms HWR for Vm=23V

Figure 3.3(b) I/O waveforms of HWR for Vm=1V

25
Circuit 2: Center tapped Full wave rectifier

Figure 3.4: Center tapped FWR circuit and voltages at different nodes of FWR

Steps to draw the Schematic:


1. Draw circuit as shown in Figure 3.4 in schematic
2. Transformer: Select part XFRM_LIN/CT-SEC from ANL_MISC library.
Set coupling coefficient = 0.113 so that the input secondary peak is 23V.
2. Set input Vsin with Voff=0, Vampl=230, freq=50Hz, label nets and save.

Analysis:
1. Create netlist, set transient analysis and run for time 40ms.
2. TRACE various input voltages and load voltage.

The center tapped FWR circuit can be represented by using equivalent input at the
secondary directly as shown in Figure 3.5.

Figure 3.5 Center tapped FWR and its Equivalent Spice Model
26
Result:

Figure 3.6 I/O waveforms of FWR for Vm=23V

Circuit 3: HWR with R-C filter circuit

Figure 3.7 Circuit of HWR with C filter

Steps to draw the Schematic:


1. Copy the HWR circuit in a new schematic and place C.
2. Use PARAM to vary time constant either by varying R or varying C.

Analysis:
1. Create netlist, select transient analysis and run for 40ms
2. Also select parametric sweep to vary R as 50 , 4k, 10k and plot input and
output voltages
.

27
Results:

Figure 3.8 Waveforms for HWR with C filter for varied values of R

Exercise:
1. Simulate Bridge rectifier using 4 diodes.
2. Simulate center tapped and Bridge rectifiers using C type filters.
3. Simulate clipper circuits (positive, negative and both level).
4. Simulate the diode V- I characteristics using the circuit given below. Use diode
D1N4002.
5. Build the circuit as shown in Figure 3.10. Provide Vin= 2V pp at 1 KHz and
observe the output waveform. The circuit is called voltage doubler. What
changes would you do to the circuit of Figure 3.10 to build a simple clamping
circuit? What would the output look like? Verify using PSPICE.

Figure 3.9 Circuit for problem 4 Figure 3.10 Circuit for problem 5

28
Experiment No. 4: I/O Characteristics of BJT and OPAMP

Objectives:
1. To simulate and analyses the transfer characteristic of BJT.
2. To simulate and analyses the transfer characteristic of OPAMP.
3. Measurement of Slew rate and Input-output impedance of OPAMP.
4. To simulate Frequency Response of OPAMP.

Circuit 1: Transistor in CE configuration

Figure 4.1 Circuit diagram for CE configuration.


Steps to draw the Schematic:

1. Get all components and place and wire as shown in Figure 4.1.
2. Transistor: Select part Q2N22222A from transistor library.
3. Set DC Voltage values as DC=12.
4. Label nets and Save the schematic.

Analysis:
1. Create netlist and new simulation profile.
2. Set DC Analysis: Primary sweep for V1 in the range 0 to 12V in steps of 0.01
and Secondary sweep for I3 in the range of 0 to 1m in steps of 0.25m.
3. TRACE input and output currents to be displayed.

29
Results: The simulated waveform for the circuit above is as shown in Figure 4.2.

Figure 4.2 Output V-I characteristics of CE configuration.

Circuit 2: OPAMP Transfer Characteristics

Figure 4.3 OPAMP basic circuit to plot the transfer characteristic


Note: It is implied that the necessary bias voltages is to be given to the Op.Amps.

Steps to draw the Schematic:


1. Get all components and place and wire as shown in Figure 4.1.
2. Operational Amplifier: Select part U1 (μA 741C) from OPAMP library:

Analysis:
1. Create Netlist, DC analysis in new simulation profile.
2. Set V1 in the range of -150uV to 150uV in increments of 10uV.
3. TRACE output node voltage.

30
Results:

Figure 4.4 Simulated Waveform


In the transfer characteristic curve of OPAMP we can see that the Ad is 1x106
Calculation :- (Ad=Vout/V1=5V/5uV=1x106)

Exercise:

1. Build the voltage follower circuit. Apply Vin+ = 1 Vpp square waveform at 1 KHz.
Observe output signal and calculate slew rate. Use µa741 OPAMP.

2. Build the circuit as shown in Figure 4.5. Calculate the I/P impedance. Provide
necessary bias voltage for OPAMP.

Figure 4.5 I/P Impedance Measurement

3. Build the circuit a shown in Figure 4.7. Apply Vin = 1Vpp sine waveform at 1 KHz.
Vary frequency from 100 Hz to 3 MHz and measure Vout. Plot logarithmic graph
for frequency response. What is your bandwidth?

31
4. Obtain the characteristics of transistor in CB configuration.

5. For a square wave input of amplitude 5V, verify the working of BJT as an inverter
in Figure 4.8.

Figure 4.6 Slew rate Measurement Figure 4.7 Circuit for frequency response

Figure 4.8 BJT as inverter

32
Experiment No. 5: Network Theorems

Objectives:
To verify the circuit theorems-Thevenin’s, Norton’s, Maximum Power Transfer,
Superposition Theorem.

Circuit 1 & 2:

Figure 5.1 Circuit Diagram

Figure 5.2 Open Load: to obtain Thevenin’s equivalent Circuit

Steps to draw the Schematic and Analysis:


1. Draw the circuit without Rload as shown in Figure 5.2.
2. Setting new simulation for Bias point analysis -> Transfer function (.TF).
Give input voltage name as V1, and output name as voltage across R2 as V(2,0).
3. Run and check output file. Note the value of output resistance which is
Thevenin’s resistance.

33
Circuit 3:

Figure 5.3 Circuit Diagram to verify Norton’s theorem

Steps to draw the Schematic and Analysis:


1. Draw the circuit with Rload.
2. Set simulation for Bias point analysis or DC analysis at 10v.
3. Run and click on ‘Enable Bias Current Display’. This shows the current through
Rload which gives Norton’s current or Run and trace the current through Rload.

Circuit 4:

Figure 5.4 Circuit Diagram to verify maximum power transfer theorem

Steps to draw the Schematic and Analysis:


1. Place all circuit components, use PARAM to vary load resistance.

34
Results:

Figure 5.5 Power transferred to Load v/s Load resistance (‘val’)

Note: Unit ‘V’ in x-axis is unit of variable. In Figure 5.5 variable ‘val’ represents load ‘V’ is
considered as ‘Ω’

Circuit 5:

Figure 5.6 Circuit to verify superposition theorem


Steps to draw the Schematic and Analysis:
1. Draw the complete circuit, set simulation for Bias point analysis or DC sweep
with constant voltage source.
2. Run and click on ‘Enable Bias Current Display’. Note down the current through
2Ω load resistor R4 or trace the desired output.

35
Circuit 6:

Figure 5.7 Circuit to verify superposition theorem with voltage source alone

Steps to draw the Schematic and Analysis:


1. Draw the circuit without current source, Set Bias point analysis or DC sweep
with constant voltage source.
2. Run and click on ‘Enable Bias Current Display’. Measure currents.

Circuit 7:

Figure 5.8 Circuit to verify superposition theorem with current source alone

Steps to draw the Schematic and Analysis:


1. Draw the circuit without voltage source, DC sweep with constant current source
2. Run and click on ‘Enable Bias Current Display’. Measure currents

Exercise:
1. Calculate Iab and Vcg using superposition theorem for circuit shown in Figure 5.9
2. Verify the Thevenin’s, Norton’s andMaximum Power Transfer Theorem for circuit
shown in Figure 5.10

36
3. In the following figure, R1= 4 KΩ, R2 = 8 KΩ, R3= 10 KΩ, R4= 2Ω, R5=8 KΩ,
R6=6KΩ, and V1=10V. If the current source I1 is 5 mA, find the Thevenin’s
equivalent circuit between nodes A and B. If 2KΩ resistor is connected between
nodes A and B, find the power dissipated.
4. Find the Thevenin's equivalent of circuit shown in Figure 5.12.
5. Verify the maximum power transfer theorem for the circuit given in Figure 5.13

Figure 5.9 Circuit for problem 1 Figure 5.10 Circuit for problem 2

Figure 5.11 Circuit for problem 3 Figure 5.12 Circuit for problem 4

Figure 5.13 Circuit for problem 5

37
Experiment No. 6: Amplifiers and Oscillators
Objective:
To design and simulate RC-Coupled amplifier circuit (with or without feedback)
and plot frequency response.

Design 1:
1. Selection of VCC
Given VCEQ = 5V and ICQ = 2mA
For thermal stabilization
VCEQ ≤ VCC/2 or VCC ≥ 2VCEQ
Therefore VCC = 12V.

2. Selection of RE
Let the voltage drop across RE = 10 % of VCC
VRE = 1.2V, now IC  IE =2mA
Therefore RE = VRE/IE = 1.2/2m = 600 Ω
Select RE = 620 Ω standard value.

3. Selection of RC
RC = VRC/IC, here VRC = VCC – VCEQ – VRE
12 – 5 – 1.2 = 5.8V
RC = 2.9kΩ
Select RC = 3kΩ standard value.

4. Selection of R1 and R2
Transistor is BC107, from data book hFE = 200 = β

S
1   1  [ RB / RE ]
, where RB = R1 ‖ R2
1    [ RB / RE ]
Given S = 6, β = 200, we get RB  3kΩ
Now V = IBRB + VBE (1+ β) IBRE
Where IB = IC/ β = 10µA, VBE = 0.7V
We get V = 1.936V
38
VCC
V R2 and RB = R1 ‖ R2
R1  R2
VCC RB
V R1 = 18.59kΩ ≈ 22kΩ (std)
R1
R2 = 3.57kΩ = 3.3kΩ (std)

5. Selection of Coupling Capacitor


Let reactance of CC is one tenth of input resistance Ri.

Ri = R1 ‖ R2 = hFE. re
re = 25mv/ IE = 12.5Ω, Ri = 133Ω, XCC = 1/ 2πfLCC
where fL = lower cut-off frequency = 200Hz, CC = 6µF ≈ 10µF

6. Selection of emitter bypass capacitor CE:


R'
1
Let fL = 200Hz, fL = R
2R E C E

Where R'  hFE RE = 124kΩ


R  hie = 2.2kΩ , CE = 73.63µF
CE = 100µF.

1. Without feedback (CE connected):

Steps to draw the Schematic:


1. Draw the circuit as shown in Figure 6.1, set the VAC as ACMAG=1mV and
ACPHASE=0.

39
Analysis:
1. Create netlist, Set simulation AC Sweep ‘Logarithmic’ in the range of 1Hz to
10GHz with 10 points
2. TRACE 20*log10{(o/p voltage)/(i/p voltage)} and measure bandwidth.

Figure 6.1(a) Schematic circuit diagram of amplifier using BJT without feedback

Result:

Figure 6.1(b) Frequency response of amplifier using BJT without feedback

40
2. With feedback (CE not connected):

Figure 6.2(a) Schematic circuit diagram of amplifier using BJT with feedback

Result:

Figure 6.2(b) Frequency response of amplifier using BJT with feedback

Objective: To generate the sinusoidal signal of desired frequency using BJT


1
Design 2: The Frequency in Hz is given by 𝑓 = 2𝜋𝑅𝐶√2𝑁, , where R is the Resistance in
Ohms, C is the Capacitance in Farad, and N is the number of RC stages (N = 3). The
RC combination in the Oscillator circuit acts as an attenuator producing an
attenuation of 1/29th (Vo/Vi) per stage, the gain of the amplifier must be sufficient
to overcome the losses and must be greater than 29.
41
Steps to draw the Schematic:
1. Draw the circuit as in Figure 6.3 (a).

Figure 6.3(a) Schematic circuit diagram of Oscillator using BJT( RC oscillator)

Analysis:
1. Create netlist, set Transient analysis and run time to 160msec, maximum step
size = 50u, and run.
2. TRACE V(C4:2),V(C2:2),& V(C1:2) in as shown in Figure 6.3(b).
3. Measure frequency by calculating time period using curser in Figure 6.3(b).

Result:

Figure 6.3(b) voltage waveforms of RC phase oscillator using BJT

42
Objective: Design and simulate an inverting amplifier using Op-amp uA741 for a gain
of 50. Measure its roll off rate and bandwidth.
Design 3: Gain=Rf/R1., UGB=1MHZ ; Cuttoff Freq=UGB/Gain

Steps to draw the Schematic:


1. Draw circuit as shown in Figure 6.4(a)

Analysis:
1. Set for AC Sweep, frequency range 10Hz to 100KHz, and 100.
2. TRACE 20*log10 {(o/p voltage)/ (i/p voltage)} and also Output voltage and
input voltage using transient/ time domain analysis as shown in Figure 6.4(c).

Figure 6.4(a) Schematic circuit diagram of amplifier using OPAMP (UA741)

Results:

Figure 6.4(b) Gain v/s frequency of amplifier using OPAMP (UA741) (Gain Plot)

43
Figure 6.4(c): Input-output waveform of amplifier using OPAMP (μA741)

Objective:
Design a suitable circuit to generate the sinusoidal signal of desired frequency
using tank Circuit (LC) using BJT
1
Design 4: The frequency of oscillations for a Hartley Oscillator is given as: 𝑓 = 2𝜋√𝐿𝐶
The total inductance is sum of two inductive coils: 𝐿 = 𝐿1 + 𝐿2

Figure 6.5(a) Schematic circuit diagram of osclilator (Hartely)

Steps to draw the Schematic:


1. Draw circuit as in Figure 6.5(a).
2. Place net alias for all important nets & Save the schematic.

44
Analysis:
1. Set Transient Analysis and run to 10msec. (maximum step size = 50u).
2. TRACE V (L3:2) as shown in Figure 6.5(b).
3. Measure frequency by using curser in Figure 6.5(b).

Result:

Figure 6.5(b) output voltage waveform of Hartely osscilator

Objective: Design a suitable circuit to generate square wave using OPAMP for a
desired frequency and duty cycle.

𝟏 𝟏+𝜷 𝑹𝟒
Design 5: = 𝑻 = 𝟐𝑹𝑪 𝒍𝒏 𝟏−𝜷 Where 𝜷=𝑹
𝒇 𝟒 +𝑹𝟐

Steps to draw the Schematic:


1. Draw circuit as in Figure 6.5(a) Vcc=+/- 12V.

Analysis:
1. Set Transient analysis, run for 100msec, maximum step size = 50u.
2. TRACE V (R2:2) as in Figure 6.6(b).

45
Figure 6.6(a) Schematic diagram of square wave generator
Result:

Figure 6.6(b) Output waveform of square wave generator

Objective: Design a suitable circuit to generate triangular wave with specified peak
value and frequency.
𝑅 1 𝑅3
Design 6: Triangular wave Vo(pp) =2 𝑅2 𝑉𝑠𝑎𝑡 and Output frequency =
3 4𝑅1 𝐶2 𝑅2
Steps to draw the Schematic:
1. Draw circuit as shown circuit in Figure 6.7 (a).

Analysis:
1. Set Transient Analysis and run for 5msec, maximum step size = 50u.

46
2. TRACE output voltages of each of the OPAMP and verify results are shown in
Figure 6.7(b).

Figure 6.7(a) Schematic diagram of Triangular wave generator

Result:

Figure 6.7(b) output eaveform of Triangular wave generator

47
Exercise:

1. Design a square wave oscillator for fo = 1kHz. Take dc supply voltage ± 12V. Refer
Figure 6.6(a). Take R2 = 1.16 R4. Also take C = 0.05µF. Observe the output
waveform at pin 6 and capacitor waveform at pin 2 of OPAMP. Measure the
amplitude and frequency.

2. Design a phase shift oscillator to oscillate at 500 Hz. Use OPAMP instead of BJT.
Choose C=0.1µF. Take the resistance value appropriately. Adjust feedback resistor
to obtain a sine wave output. Measure the frequency of oscillator and voltage
amplitude.

3. Simulate the circuit shown in Figure 6.3(a). Use the following values: R4=100k,
R5=50k, R6=1.75k, R8=R9=5k, R2=1.8k, R1=10k, C1=C2=C4=10nF and
C6=100µF.

4. Connect the circuit shown in Figure 6.8. Use input voltage Vi=2Vpp sine wave at
1kHz. Observe the input and output waveforms.

Figure 6.8 Circuit for problem 4 (schmitt trigger)

48
5. Design a triangle wave generator of frequency 5kHz. Take β =0.5. Assume Resistance
values appropriately.

6. Obtain the transient and frequency response of an RC coupled amplifier using BJT as
shown below. Calculate the Bandwidth, Voltage Gain, Gain Bandwidth Product, Maximum
signal handling capacity.

Figure 6.9 Circuit for problem 6

49
Experiment No. 7: Applications of OPAMP

Objectives:
1. To simulate an inverting amplifier and non-inverting amplifier using Op-Amp.
2. To simulate and analyse various applications of Op-Amp Circuits.

Circuit 1: Inverting amplifier

Figure 7.1 Inverting amplifier


Steps to draw the Schematic:
1. Draw circuit as shown circuit in Figure 7.1
Analysis:
1. Perform a transient analysis, run for 5ms with step size of 500 µs.
2. TRACE input output waveform as shown in Figure 7.2(a)
3. Obtain frequency response: (Use AC Sweep). as shown in Figure 7.2(b).
Results:

Figure 7.2 (a) Input - Output waveform (peak output voltage exceeds saturation voltages)

50
Figure 7.2 (a) Gain of inverting amplifier (with OPAMP operating in linear region)

Circuit 2: Summer

Figure 7.3 Summer circuit


Steps to draw the Schematic:
1. Draw circuit as shown circuit in Figure 7.3.
Analysis:
1. Set transient analysis, run for 1s with step size of 50ms.
2. TRACE input output waveform.

51
Results:

Figure 7.4 Output waveform

Circuit 3: Integrator

Figure 7.5 Integrator


Steps to draw the Schematic:
1. Draw circuit as shown in Figure 7.5.
2. Set Vpulse with PER as 1ms, PW to 0.5ms, TD=0ms, TF=0.1ms, TR=0.1ms,
V1=3V, V2=0.

Analysis:
1. Set transient analysis and run to time 6 ms.
2. TRACE input and output waveforms.

52
Results:

Figure 7.6 Input - Output Waveforms

Exercise:
1. Simulate non-inverting amplifier using OPAMP (refer Figure 7.7).
2. Simulate and analyze differentiator circuit using OPAMP (refer Figure 7.7).

Figure 7.7 Non Inverting amplifier Figure 7.8 Differentiator


Note: It is implied that the necessary bias voltages is to be given to the OPAMPS.

3. An Integrator circuit is shown below. For the input voltage shown, plot the transient
response of the output voltage for duration of 0 to 4millisec in steps of 50microsec.

53
Figure 7.9 Circuit for problem 3

Figure 7.10 Input Voltage for problem 3

4. A practical differentiator circuit is given below. For a triangular input, Plot the
transient response of the output voltage for duration of 0 to 4millisec in steps of 50
microsec.

54
Figure 7.11 Circuit for problem 4

Figure 7.12 Input Voltage for problem 4

5. Design circuit using OPAMP adder- subtractor which give the output Vo = 4V1 +
5V2 - 2V3- 3V4.

55
6. For the following precision diode rectifier, VCC= 10V, VEE= -10V, X1, X2 are
μA741 op amps, and D1, D2 are D1N4002 diode. If the input voltage is the
triangular wave as shown in figure with period of 2ms, 10Vp-p, and zero average
value, find the output voltage.

Figure 7.13(a) Circuit for problem 6

Figure 7.13(b) Input waveform for problem 6

56
Experiment No. 8: Active and Passive First Order Filters
(LPF, HPF, BPF, BEF)

Objectives:
To design a first order
1. LPF to give a cut off frequency f=1kHz with pass band gain of 4. Choose
C=0.01F.
2. BPF with lower and higher cut-off frequencies 100Hz and 1kHz respectively.
3. BEF with lower and higher cut-off frequencies 1kHz and 20kHz respectively.
4. HPF to give a cut off frequency f=1MHz with pass band gain of 4.

Circuit 1: Low Pass Filter

Figure 8.1 LPF Circuit

Steps to draw the Schematic:


1. Draw circuit as shown in Figure 8.1.
2. Set AC Voltage sources with Voff=0, Vampl=1V, freq=50Hz and VAC=1V.

Analysis:
1. Set AC Sweep type: Logarithmic; frequency 1 Hz to 100kHz and
points/Decade=10.
57
2. TRACE Gain in dB v/s frequency

Result:

Figure 8.2 Gain in dB v/s frequency: Frequency response of LPF Filter

Circuit 2: Band Pass Filter

Figure 8.3 BPF circuit

58
Results:

Figure 8.4(a) Frequency response of LPF, HPF and BPF(Cascade of LPF and HPF)

Figure 8.4(b) peak output voltage of BPF

59
Circuit 3: Band Elimination Filter

Figure 8.5 BEF circuit

Result:

Figure 8.6 BEF Frequency response

60
Circuit 4: Passive LPF

Figure 8.7 Passive LPF Circuit


Results:

Figure 8.8(a) Frequency response of Passive LPF

61
Figure 8.8(b) Frequency response of Passive LPF (with different values of ‘R’ values)
Exercise:
1. Design a first order low pass filter for a high cut off frequency of 2 kHz and pass
band gain of 2.
2. Given below is a second order low pass filter. Calculate the high frequency cut off
and pass band gain both theoretically and by simulation.

Figure 8.9 Circuit for problem 2

3. The Circuit given below is an all pass filter where Rf=R1=10kΩ; R=15.9kΩ and
C=0.01µF. Simulate the circuit and verify that the output voltage will have the same
frequency as the input, but lags the input voltage by 90°. Given ϕ = -2 tan-1(2πRC).

62
Figure 8.10 Circuit for problem 3

4. Cascade a low pass filter with higher cut off frequency 2kHz and a high pass filter
of lower cut off frequency 400Hz to give a band pass filter with pass band gain of 4.
𝑜 𝑓
Also find the value of Q of the filter. Take C=0.01F. Where 𝑄 = 𝐵𝑊 and 𝑓𝑜 =
√𝑓𝑙 𝑓ℎ (Since pass band gain is 4, the LPF and HPF section may be designed to
give gain of 2.)

5. Connect the circuit as shown below using discrete components.


a. Given an input signal of 1V peak to peak and measure the output voltage for
different frequencies.(eg. 100Hz, 200Hz, 500Hz, 1kHz, 1.5kHz, 2kHz, 5kHz,
10kHz).
b. Plot the frequency response 20 log(Vo/Vi) versus input frequency and find the
3dB frequency from here.
c. Calculate theoretically and by simulation the upper cut off frequency and pass
band gain.
d. Interchange the resistor R with the capacitor C to make the high pass filter and
repeat steps a, b, and c.

Figure 8.11 Circuit for problem 5

63
6. A filter circuit is shown below. For the circuit, plot the frequency response of the
output voltage. The frequency is varied from 10Hz to 100MHz with an increment of
1 decade and 10 points per decade.

Figure 8.12 Circuit for problem 6

64
Experiment No. 9: Simulation of signal, operations on signals using
MATLAB

MATLAB is an interactive, matrix based system for numeric computation and


visualisation. It is a powerful tool in the sense that is is simple and also can be extended
to create new commands and functions.

How to start matlab?


Click on start programs MATLAB 7.0.4
Command window will get opened.

Figure 9.1 Command Window

Now you can enter the commands and functions directly in command window.
Try some examples in the command window:
1. A = ones(R,C)
R=number or rows C=number of columns.
A=ones(3,3), A=zeros(3,3)
Study different functions like:-
2. Plot - used to plot continuous time signal
3. Subplot
4. Stem - used for plotting discrete time signals.
5. Figure
6. Title ,label, axis, linespace etc

65
Type Help <space> command in command window You will get the syntax and
explanation.

M-file editor
From file menu select NEW M-File
Edit window will appear with untitled.
Enter the program statements. Save the program with name and extension .m
Run the program either from command window or from editor window.

Figure 9.2 Editor Window

Experiment 9.1
Objectives :
To plot different signals a) unit impulse b) step c) sine wave d) square wave.

Theory:
Unit impulse
δ[n] =1 n=0
0 n≠0

Figure 9.3 Delta Function

66
Unit step:
u[n]= 1 n ≥ 0
0 n<0

Figure 9.4 Unit Step Function


MATLAB CODE
a) Unit impulse
clc;
clear all;
close all;
n = -10:10;
u = [(n)==0];
stem (n,u); Figure 9.5 delta Function

b) Unit step
clc;
clear all;
close all;
n = -15:15;
u = [(n)>=0];
stem (n,u);

Figure 9.6 Unit Step Function

67
c) Sine wave
clc;
clear all;
close all;
n = 0:.001:5;
x=5*sin(2*pi*n);
plot(n,x);

Figure 9.7 Sine wave form

d) Square wave.
clc;
t=0:.001:5;
v = square(2*pi*t);
plot(t,v);
Figure 9.8 Square wave form

Exercise:
1. Generate square wave and triangular wave of different frequency.
2. Generate Unit-step function & delayed step function with a delay of n = 5.
3. Generate Square wave with duty cycle 25,50 and 75%.(Use square function )
4. Generate the signals a) (-1/2)k b) (2)k and c) (-2)k, assuming k=0 to 5.
5. Generate a mixed frequency signal having the frequencies 10, 30 and 60Hz.
6. Write a MATLAB program to sketch the following discrete-time signals in the
time range of -10 n 10.
a) 𝑥[𝑛] = 𝑢[𝑛] − 𝑢[𝑛 − 3]
𝑛𝜋
b) 𝑥[𝑛] = sin ( 3 ) 𝑢[𝑛]
𝑗𝜋𝑛
c) 𝑥[𝑛] = (0.5)𝑛 𝑒 2

68
Experiment 9.2
Objective:
To study and find the convolution of two signals.

MATLAB CODE
clear all;
t1=-10:.01:0;
t1=t1';
g1=-2*exp(2*t1);
t2=0:.01:10;
t2=t2';
g2=2*exp(-t2);
t=[t1;t2];
g=[g1;g2];
f=[zeros(size(g1));ones(size(g2))];
subplot(3,1,1);
plot(t,f);
title('f(t)');
subplot(3,1,2);
plot(t,g);
title('g(t)');
c=0.01*conv(f,g);
t=-20:.01:5;
subplot(3,1,3);
plot(t,c(1:length(t)));
title('c(t)');
grid on;

Figure 9.8 Convolution Result

69
Exercise:
1. Find the system output y[n], 0 n 10, of an LTI system when the input
𝑥[𝑛] = (0.8)𝑛 (𝑢[𝑛] − 𝑢[𝑛 − 5]) and
the impulse response
ℎ[𝑛] = (0.8)𝑛 (𝑢[𝑛] − 𝑢[𝑛 − 10])
Plot the vectors x, h, and y on the same page using subplot commands.

2. Find the system output y[n], 0 ≤ n ≤ 10, of an LTI system when the input x[n] =
δ[n] + 3δ[n – 1] + 4δ[n – 3], and the impulse response h[n] = (0.5)n(u[n] – u[n -5]).
Plot the vectors x, h, and y on the same page using subplot commands.

3. Generate and plot signal x[n] = 0.5𝑛 {𝑢[𝑛] − 𝑛[𝑛 − 10]}. If the impulse response
of the system is y[n] = {𝑢[𝑛] − 𝑢[𝑛 − 3]}.

4. Do Loop Analysis and find current in R2 using MATLAB.

Figure 9.9 Circuit for analysis


Ans: 0.037 AMPERS
Hint: write loop equations;use inv function.

5. In Figure 9.10, VS = 10V, R = 10,000 Ω, C = 10μF. Find the output voltage v0(t),
between the interval 0 to 20 ms, assuming v0(0) = 0 and by (a) using a numerical
solution to the differential equation; and (b) analytical solution.

70
Figure 9.10 Circuit for problem 5

MATLAB CODE
t0=0;
tf=20e-2; function dy=diff1(t,y)
x0=0; dy=100-10*y;
[t,v0]= ode23('diff1',[t0 tf],x0); end
subplot(2,1,1);
plot(t,v0,'b'); Type this function and save it
v0a=10*(1-exp(-10*t)); as separate M file in the name
subplot(2,1,2); diff1.m
plot (t,v0a,'r');

71
Experiment No. 10: Study of Response of System

Objective:
To Study the response of system.

1. To find the impulse response of a system defined by difference equation.


y(n)-0.6y(n-1)-0.16y(n-2)=5x(n)

impulse response
MATLAB CODE 5
clear all;
4.5
close all;
n=20; 4

b=[5 0 0]; 3.5


a=[1,-0.6,-0.16];
3
f=[1,zeros(1,n-
x(n)

2.5
1)];
y=filter(b,a,f); 2
k=0:1:n-1; 1.5
stem(k,y);
1
xlabel('n');
ylabel('x(n)'); 0.5

title('impulse 0
response'); 0 5 10 15 20
n

Figure 10.1 Impulse response

2. To find the impulse response of a system. The Z-Transform is given by


H(z) = (1+2z^-1) / (1-0.2z^-1)(1+0.6z^-1)

MATLAB CODE
clear all;
close all;
b=[1 2];

72
impulse response
2
a=[1 0.4 -0.12];
L=11;
1.5
[y,t]=impz(b,a,L);
stem(t,y);
1
xlabel('n');
ylabel('h(n)');
h(n) 0.5
title('impulse
response');
0

-0.5

-1
0 2 4 6 8 10
n

Figure 10.2 Impulse response

3. To study the Fast Fourier Transform and its properties.


MATLAB CODE
clear all;
close all;
x=input('Enter the sequence');
N=input('Enter fft length');
X=fft(x,N);
subplot(2,1,1);
stem(x);
xlabel('n');
ylabel('x');
title('Input Signal');
subplot(2,1,2);
% n=0:1:7;
stem(X);
title('FFT of the signal');

73
Output:
Enter the sequence [1 2 3 4]
Enter fft length 8

Input signal
4

0
1 1.5 2 2.5 3 3.5 4

FFT of the Input signal


10

-5

-10
1 2 3 4 5 6 7 8
n

Figure 10.3 Input signal and its FFT

4. Express the following Z-transform in factored form, plot its poles and zeros, and then
determine its ROCs.

H(z) = (2z^4+16z^3+44z^2+56z+32) / (3z^4+3x^3-15z^2+18z-12)

74
MATLAB CODE
clear all;
close all;
b=[2 16 44 56 32];
a=[3 3 -15 18 -12];
[z p k]=tf2zp(b,a);
disp('Zeros: ');
disp(z);
disp('Poles: ');
disp(p);
disp('Gain
constant= ');
disp(k);
disp('Radius of
poles: ');
disp(abs(p));
sos=zp2sos(z,p,k);
disp('Second order
system');
disp(real(sos));
zplane(b,a); Figure 10.4 Pole Zero Plot

Outputs:

Zeros:
-4.0000 + 0.0000i
-2.0000 + 0.0000i
-1.0000 + 1.0000i
-1.0000 - 1.0000i

Poles:
-3.2361 + 0.0000i
1.2361 + 0.0000i
75
0.5000 + 0.8660i
0.5000 - 0.8660i

Gain constant=
0.6667

Radius of poles:
3.2361
1.2361
1.0000
1.0000

Second order system


0.6667 4.0000 5.3333 1.0000 2.0000 -4.0000
1.0000 2.0000 2.0000 1.0000 -1.0000 1.0000

5. Find the response of the system defined by the differential equation


𝑑𝑦
+ 𝑦(𝑡) = 1 with 0 initial conditions.
𝑑𝑡

MATLAB CODE
clear all;
close all;
y=dsolve('Dy=1-y','y(0)=0');
disp('y=');
disp(y);

Output: y= 1- 1/exp(t)

Exercise:
1. Find inverse Z transform: X(z)=(8z3+2z2 – 5z)/(z3 – 1.75z + 0.75)
2. Find the impulse response: y(n) – 1.5y(n-1) + y(n-2) = x(n-2)
3. Find response of system: d2y/dt2+4dy/dt+13y(t)=0; dy/dt (t=0)=0; y(0)=1

76
4. Determine the UNIT impulse response h[n] of a system specified by the equation. (Use
filter function with input to the system as unit impulse δ[n])
a. 𝑦[𝑛] = 𝑦[𝑛 − 1] + 2𝑦[𝑛 − 2] + 𝑥[𝑛 − 2]
5. A simple digital differentiator is given by 𝑦[𝑛] = 𝑥[𝑛] − 𝑥[𝑛 − 1]. Implement this
differentiator on the following sequences and plot the results. Comment on the
appropriateness of this differentiator.
a. 𝑥[𝑛] = 𝑛(𝑢[𝑛] − 𝑢[𝑛 − 10]) + (20 − 𝑛)(𝑢[𝑛 − 10] − 𝑢[𝑛 − 20])
b. 𝑥[𝑛] = 5(𝑢[𝑛] − 𝑢[𝑛 − 20])
6. Find the Discrete Fourier Transform (DFT) of a sine wave of frequency 50Hz and plot
the magnitude and phase. (Use fft function).
7. Find the DFT of mixed frequency sine wave with 30Hz, 80Hz, 120Hz frequency
components and plot the magnitude vs. frequency in Hz.
8. A causal LTI system is described by the difference equation
𝑦[𝑛] = 𝑥[𝑛] + 0.5𝑥[𝑛 − 1] − 0.5𝑦[𝑛 − 1] + 0.25𝑦[𝑛 − 2].Write MATLAB program to
determine
i) the impulse response representation
ii) the system function
iii) pole-zero plot the output y[n] if the input is 𝑥[𝑛] = 2(0.9)𝑛 𝑢[𝑛]

References
1. Muhammad H Rashid,” SPICE for Circuits and Electronics Using PSPICE”, 2nd
edition, 1996.
2. D. Roy Choudhury & Shail B. Jain,” Linear Integrated Circuits”, New Age
International Publishers , 3rd edition, 2009.
3. Ramakant A. Gayakwad, “Op.Amps and linear integrated circuit”s, PHI.

77
OBSERVATION & WORK SPACE

78

Вам также может понравиться