CIRCUIT ANALYSIS USING NGSPICE

Slides:



Advertisements
Similar presentations
AC  DC: Using a full-wave diode rectifier circuit (used in the music system final project) The 20:1 turns ratio transformer here reduces the rms voltage.
Advertisements

Operational Amplifiers
Operational Amplifiers 1. Copyright  2004 by Oxford University Press, Inc. Microelectronic Circuits - Fifth Edition Sedra/Smith2 Figure 2.1 Circuit symbol.
EEL102 Introduction to SPICE. Spice – Introduction Spice is a short form of : Simulated Program with Integrated Circuit Emphasis Used for circuit analysis.
Experiment 17 A Differentiator Circuit
EC 2208 – Electronic Circuits Lab 1
Introduction to electronics lab ENGRI 1810 Using: Solderless prototype board (white board) Digital multimeter (DMM) Power Supply Signal Generator Oscilloscope.
PSPICE Tutorial Spring 2015
INTRODUCTION Spice Excel. SPICE Simulation Program with Integrated Circuit Emphasis.
Experiment 11: An Inverting Amplifier
The maximum current flows when |X C |
Operational Amplifiers
1 Announcements l Bring motors to lab this week. l Bring eight 1N4001 diodes to lab per team. Get them at the Scientific Supply Store (2 nd Floor Sciences.
Pulse Width Modulation (PWM) LED Dimmer Circuit
Advanced Operational Amplifier applications
Low-Pass Filter & High Pass Filter
Content Op-amp Application Introduction Inverting Amplifier
SIMULATION OF AMPLIFIERS USING NGSPICE VISHNU V 2 nd Year M.Tech VLSI and Embedded Systems Govt. Model Engineering College, Thrikkakara TECHNICAL WORKSHOP.
Experiment 11: Non-Inverting Amplifier With Modifications that Require the Use of the Velleman Oscilloscope.
Semiconductor Devices I Rectifiers Benchmark Companies Inc PO Box Aurora CO
Integrator Op Amp Amplifier
Electronics 1 Lecture 7 Diode types and application
Chapter 25 Nonsinusoidal Waveforms. 2 Waveforms Used in electronics except for sinusoidal Any periodic waveform may be expressed as –Sum of a series of.
Rectification – transforming AC signal into a signal with one polarity – Half wave rectifier Recall Lecture 6 Full Wave Rectifier – Center tapped – Bridge.
A Differentiator Circuit.  All of the diagrams use a uA741 op amp. ◦ You are to construct your circuits using an LM 356 op amp.  There is a statement.
Experiment 17 A Differentiator Circuit
Experiment 12 Non-Inverting Amplifier. Experimental Procedure Clarification in Step 3 (Modeling) – To perform the DC Sweep in the sinusoidal voltage source.
The George Washington University School of Engineering and Applied Science Department of Electrical and Computer Engineering Circuit Design Verification.
General Engineering Polytechnic University Laboratory 9: Electrical Filters.
Electronic Circuits Laboratory EE462G Lab #4 DC Power Supply Circuits Using Diodes.
Topic 3: Op-Amp: Golden Rules of OP Amp 1.i in =0, no current flow into op amp. 2.V + =V - Typically one end of op amp is connected to ground, therefore,
Electronic Circuits Laboratory EE462G Lab #3
1/38 Passive components and circuits - CCP Lecture 5.
EENG 2920: Circuit Design and Analysis Using PSpice Class 3: DC and Transient Analysis Oluwayomi Adamo Department of Electrical Engineering College of.
Introduction to SPICE (Version16.2) Prof. Shahrokh Ahmadi ECE002.
Chapter 10 Analog Systems
Recall Lecture 6 Rectification – transforming AC signal into a signal with one polarity Half wave rectifier Full Wave Rectifier Center tapped Bridge Rectifier.
2-1 McGraw-Hill Copyright © 2001 by the McGraw-Hill Companies, Inc. All rights reserved. Chapter 2 Diode Circuits.
TUTORIAL QUESTIONS – OSCILLATOR
Lab 4 Experiments 8 and 9. Same Circuit: Experiment 8 and 9.
Introduction to PSpice
Optocoupler Isolation Circuits for Industrial Application
0 Chap 2. Operational amplifiers (op-amps) Circuit symbol of an op-amp Widely used Often requires 2 power supplies + V Responds to difference between.
Electronic workshop Dr. Imtiaz Hussain URL :
Experiment 10: Inverting Amplifier With Modifications that Require the Use of the Velleman Oscilloscope.
Filters By combining resistor, capacitor, inductor in special ways we can design circuits that are capable of passing certain frequency while rejecting.
In practice, it is often required to make or break an electric al circuit in many operations. In some applications, it is desirable that this make and.
Week 4: Experiment 24 Using Nodal or Mesh Analysis to Solve AC Circuits with an addition of Equivalent Impedance.
Clipper circuits LET’S REMOVE UNWANTED PART OF SIGNALS.
It’s always important that all of your nodes be numbered. So the way to do that is to go to Options at the top of the screen then select Preferences. When.
Transient Response. Transient Analysis Plot of the voltages or currents as a function of time. – Output plot mimics the oscilloscope display. If simulating.
Operational Amplifier
Introduction to LTspice IV
Demodulation PWM Signal
(4) Filters.
Diode Clipping Circuits
MECH 373 Instrumentation and Measurements
Maj Jeffrey Falkinburg Room 2E46E
INTRODUCTION Spice Excel.
A Differentiator Circuit
Recall Lecture 8 Standard Clipper Circuit Clipper in series
INTRODUCTION Spice.
Two Differentiators Circuit
Recall Lecture 6 Rectification – transforming AC signal into a signal with one polarity Half wave rectifier Full Wave Rectifier Center tapped Bridge Rectifier.
the process of achieving,
Chapter 4 – Operational Amplifiers – Part 2
Week 4: Experiment 24 Using Nodal or Mesh Analysis to Solve AC Circuits with an addition of Equivalent Impedance.
Review Half Wave Full Wave Rectifier Rectifier Parameters
Spice Seminar Simulation Program with Integrated Circuit Emphasis.
Presentation transcript:

CIRCUIT ANALYSIS USING NGSPICE TECHNICAL WORKSHOP MARATHON 2012 CIRCUIT ANALYSIS USING NGSPICE VISHNU V 2nd Year M.Tech VLSI and Embedded Systems Govt. Model Engineering College, Thrikkakara

CONTENTS SIMULATING A CIRCUIT IN NGSPICE EXAMPLE CIRCUIT NETLIST CREATION USING gEDA SCHEMATIC EDITOR ANALYSIS OF BASIC CIRCUITS HIGH PASS CIRCUIT AND DIFFERENTIATOR LOW PASS CIRCUIT AND INTEGRATOR RECTIFIER CIRCUITS CLIPPER CIRCUITS CLAMPER CIRCUITS

Simulating a Circuit using NGSPICE Steps Mark the nodes present in the circuit using numbers or symbols (Try to mark Ground node by '0') Write the netlist (use texteditors such as gedit or vi editor etc)for the circuit satisfying all the rules and regulations. Save the netlist using .cir or .net extension. 3

Simulating a Circuit using NGSPICE Open ngspice command window by typing ngspice in terminal(bash,sash etc) Give the name of the saved netlist in ngspice command window.

EXAMPLE CIRCUIT Simulation of a simple RC filter using NGSPICE

EXAMPLE CIRCUIT Here there are three nodes n0 n1 Also the components present are A sinusoidal voltage source A 3.3nF capacitor A 1k resistor

Writing NETLIST Title Line (First Line ) A simple RC High pass filter Component connections V1 n0 0 SIN(0 10 1kHz) C1 n0 n1 3.3nF R n1 0 1k

Writing NETLIST Control Lines .CONTROL TRAN 0.01ms 10ms PLOT V(n0) V(n1) END Lines .ENDC .END

Total NETLIST A Simple RC High pass filter V1 n0 0 SIN(0 10 1kHz) C1 n0 n1 3.3nF R n1 0 1k .CONTROL TRAN 0 0.01ms 10ms PLOT V( n0) V(n1) .ENDC .END

SIMULATION STEPS Save the above file as rc_filter.cir Terminal Save the above file as rc_filter.cir STEP 1 : Open Terminal and type ngspice Open Terminal and Type ngspice Ngspice command terminal opens

SIMULATION STEPS STEP 2 : Give the file name of the netlist we have written ie rc_filter.cir Give the file name of the netlist and press enter

SIMULATION STEPS BASH TERMINAL WAVE FORM WINDOW TRANSIENT ANALYSIS OUTPUT BASH TERMINAL WAVE FORM WINDOW

ANALYSIS OF WAVEFORM Analyse the waveform I N P U T OUTPUT

NETLIST CREATION USING PART II NETLIST CREATION USING gEDA SCHEMATIC EDITOR

STEPS Draw the schematic of the circuit using gEDA schematic editor Save the file with extension .sch Convert .sch file to .net file using gnetlister. Command : gnetlist -g spice -o rc_filter.net rc_filter.sch

DRAWING CIRCUIT IN gEDA SCHEMATIC EDITOR SAVE THE ABOVE SCHEMATIC AS rc_filter.sch

CONVERING SCHEMATIC TO NETLIST Output File name Schematic Name gnetlist -g spice -o rc_filter.net rc_filter.sch

NETLIST OBTAINED FROM SCHEMATIC rc_filter.net

SIMULATING THE NETLIST

SIMULATING THE NETLIST Name of the NETLIST created using gnetlister

SIMULATING THE NETLIST

SIMULATING THE NETLIST : TRANSIENT ANALYSIS Final Value Indicates Transient Analysis Increment value

SIMULATING THE NETLIST : TRANSIENT ANALYSIS

SIMULATING THE NETLIST : TRANSIENT ANALYSIS PLOT V(2) V(1)

ANALYSIS OF THE WAVEFORM GREEN COLOUR : INPUT WAVE RED COLOUR : OUTPUT WAVEFORM

WHY THE AMPLITUDE OF THE OUTPUT WAVEFORM IS VERY LESS ??

Cut off frequency of the high pass filter is given by, REASONS The Circuit is a High pass filter, so it passes only high frequency signals. We have given an input sinusoidal waveform of Amplitude = 10V and Frequency = 1kHz Cut off frequency of the high pass filter is given by, cutoff frequency= 1/(2*pi*R*C) Here in this case Cutoff frequency (3 dB frequency ) = 48.22kHZ So, Give input sine wave frequency >= 48.22 kHz

A Simple RC High pass filter V1 n0 0 SIN(0 10 500kHz) C1 n0 n1 3.3nF MODIFIED NETLIST A Simple RC High pass filter V1 n0 0 SIN(0 10 500kHz) C1 n0 n1 3.3nF R n1 0 1k .CONTROL TRAN 0.0001ms 0.1ms PLOT n0 n1 .ENDC .END NEW INPUT FREQUENCY

OUTPUT WAVEFORM

AC ANALYSIS OF HIGH PASS FILTER FOR AC ANALYSIS THE CONTROL SIGNAL IS .AC <sweep type> <points value> <start frequency> <end frequency> (sweep type is either LIN,OCT or DEC) Examples .AC  LIN  16 60 600KHz .AC  DEC  20 1  10kHz

NETLIST FOR AC ANALYSIS OF HIGH PASS FILTER A Simple RC High pass filter V1 n0 0 SIN(0 10 500kHz) C1 n0 n1 3.3nF R n1 0 1k .CONTROL AC LIN 1000 0.1Hz 1000kHz PLOT V(n1) .ENDC .END AC ANALYSIS

AC ANALYSIS PLOT I

NETLIST FOR AC ANALYSIS OF HIGH PASS FILTER A Simple RC High pass filter V1 n0 0 SIN(0 10 500kHz) C1 n0 n1 3.3nF R n1 0 1k .CONTROL AC DEC 10 100Hz 10000kHz PLOT DB(V(n1)/V(n0)) .ENDC .END AC ANALYSIS

AC ANALYSIS PLOT II

HOW A HIGH PASS FILTER CAN BE CONVERTED TO A DIFFERENTIATOR CIRCUIT

HIGH PASS FILTER AS DIFFERENTIATOR The Condition in which a high pass filter acts as a differentiator circuit is given by RC << 0.0016T ; Where T = Time period of the input signal Question ? Design a Differentiator Circuit which takes a pulse waveform of frequency 1 kHz and perform its transient analysis using NGSPICE.... Take the capacitor value as C = 3.3nF

DIFFERENTIATOR TRANSIENT RESPONSE With RESISTOR VALUE, R = 47k

DIFFERENTIATOR TRANSIENT RESPONSE With RESISTOR VALUE, R = 10k

RC LOW PASS FILTER

RC LOWPASS FILTER AC ANALYSIS PLOT

RC LOWPASS FILTER AS INTEGRATOR

RECTIFIER CIRCUIT WRITE THE NETLIST AND PLOT THE WAVEFORMS

RECTIFIER CIRCUIT OUTPUT

CLIPPER CIRCUITS POSITIVE CLIPPER CLIPPING LEVEL : +5V WRITE NETLIST AND OBTAIN THE OUTPUT WAVEFORM

POSITIVE CLIPPER OUTPUT WAVEFORM

CLIPPER CIRCUITS DOUBLE CLIPPER CLIPPING LEVELS : +5V and -5V WRITE NETLIST AND OBTAIN THE OUTPUT WAVEFORM

DOUBLE CLIPPER OUTPUT WAVEFORM

CLAMPER CIRCUITS SIMPLE POSITIVE CLAMPER CIRCUIT

OUTPUT WAVEFORM

LAB SESSION EXPERIMENTS RC HIGH PASS CIRCUIT AND DIFFERENTIATOR RC LOW PASS CIRCUIT AND INTEGRATOR RECTIFIER CIRCUITS CLIPPER CIRCUITS CLAMPER CIRCUITS

PLOT THE FOLLOWING WAVEFORM USING NGSPICE ASSIGNMENT I PLOT THE FOLLOWING WAVEFORM USING NGSPICE

52