Ngspice/C2/Operating-point-analysis-in-NGspice/English-timed

From Script | Spoken-Tutorial
Revision as of 13:15, 12 September 2014 by Ranjana (Talk | contribs)

Jump to: navigation, search

Title of the Script: Operating point analysis using ngspice

Author: Abhishek, IIT Bombay

Keywords: video tutorial, ngspice.

Time Narration
00:01 Dear Friends, Welcome to the spoken tutorial on “Operating point analysis in ngspice
00:08 In this tutorial we will learn,
00:10 To perform operating point analysis.
00:13 To verify Kirchoff's voltage law using ngspice in,
00:17 interactive mode command-line interface &
00:21 commandscript included in netlist file.
00:24 Ubuntu 12.04 is the operating system used with ngspice version 23 installed.
00:33 Basic knowledge of electronic circuits is a prerequisite for this tutorial.
00:38 Basic knowledge of Ubuntu Linux and shell commands is also required.
00:43 We will use the example circuit shown.
00:47 The circuit consists of three prominent nodes
00:52 “a”,
00:53 “b”
00:55 and “c”.
00:57 In addition, a fourth node called as reference or the datum node must be marked as node “0”.
01:06 This is mandatory for any circuit.
01:09 Let us open the ngspice netlist example1.cir file corresponding to the circuit schematic shown before, in a text editor.
01:19 I have already opened this in gedit text editor.
01:27 Note that the netlist file is saved with .cir extension
01:32 We can see all the components like voltage source, resistors and current source.
01:41 Also the information about nodes connecting them together.
01:46 .op command included in netlist file is used to perform operating point analysis
01:54 Now we will simulate this circuit, and verify Kirchoff's voltage law using the interactive mode-command-line interface.
02:02 let us open ngspice through terminal.
02:06 Go to top left corner of Ubuntu desktop screen.
02:10 Click on theDash home.
02:13 In the search bar, write terminal
02:18 and press Enter.
02:22 This will open Terminal window.
02:26 Let me resize this window
02:30 Now I will go to the folder where the netlist file example1.cir is saved.
02:38 I do this as follows:
02:40 On terminal, I will type cd space Desktop slash op hyphen analysis
02:52 and press Enter.
02:55 Now let us simulate the ngspice file.
02:59 Let us see how this can be done.


03:01 On terminal, Type ngspice space example1.cir and press Enter.
03:17 Here you will notice that we have entered into the ngspice command line interface.
03:23 Type run and press Enter
03:28 This will simulate the circuit and store the results.
03:33 We will verify Kirchoff's voltage law using the above simulation results.
03:39 According to Kirchoff's voltage law,
03:41 voltage around outer loop should be equal to the value of the dc voltage source V1
03:51 Calculate voltage around the outer loop.
03:54 For this, let us do the following:
03:59 In the ngspice command line interfaceOn the Terminal ,
04:03 Type print space v of a comma b plus v of b comma c plus v of c
04:18 and press Enter Key
04:21 Here v of a comma b denotes the voltage drop between the nodes a and b and so on.
04:29 print command displays the results of the calculation mentioned to its right side.
04:36 Notice the result of the calculation in the terminal.
04:39 It is 30 volt as shown
04:42 Now calculate the value of DC voltage source V1 that is v(a).
04:50 Type print space v of a and press Enter
05:00 Notice the result of the calculation in the terminal.
05:04 If both the results are equal then Kirchoff's voltage law is verified.
05:10 Since both voltage values are equal, the Kirchhoff's Voltage law is verified for outer loop
05:16 a
05:17 b
05:18 c
05:19 and 0.
05:21 Now we will simulate this circuit, and verify Kirchoff's voltage law using the command script included in the netlist file.
05:31 Modified netlist file example hyphen modified dot cir is as shown
05:40 As you can see all the commands we executed in command-line interface are included in this netlist as control statements.
05:50 That is, the statements in between the dot control and the dot endc statements.
05:57 Echo command will echo the text written to its right side, on the terminal window.
06:04 You can see that we have included the print statements in the netlist.
06:10 Now we execute the modified netlist file.
06:14 source command is used to simulate the netlist from within the ngspice simulator environment
06:22 On the terminal type source space example hyphen modified dot cir
06:33 and press theEnter key.
06:37 This will run the simulation and directly show the results for KVL verification.
06:43 You can see that results are the same as seen earlier.
06:48 This brings us to the end of this tutorial.
06:52 Quit the ngspice simulator by typing quit
06:58 and press the Enter key.
07:00 Now let us summarize what we learnt in this tutorial.
07:03 In this tutorial we learnt,
07:05 To perform operating point analysis of a given circuit.
07:09 To verify Kirchhoff's voltage law using ngspice through interactive mode-command line interface .
07:17 commandscript included in thenetlist file
07:20 Watch the video available at the following link
07:24 It summarises the Spoken Tutorial project
07:28 If you do not have good bandwidth, you can download and watch it
07:32 The Spoken Tutorial Project Team
07:34 Conducts workshops using spoken tutorials
07:38 Gives certificates for those who pass an online test
07:41 For more details, please write to contact at spoken hyphen tutorial dot org
07:47 Spoken Tutorial Project is a part of the Talk to a Teacher project
07:52 It is supported by the National Mission on Education through ICT, MHRD, Government of India
07:59 More information on this Mission is available at
08:02 spoken hyphen tutorial dot org slash NMEICT hyphen Intro
08:09 Thank you for joining.
08:11 Hope you found this tutorial useful.
08:13 This script is contributed by Abhishek Pawar and this is Rupak Rokade from IIT Bombay signing off.
08:19 Thank You.

Contributors and Content Editors

Madhurig, PoojaMoolya, Pratik kamble, Ranjana, Sandhya.np14