19.12.2013 Views

Laboratory Manual - King Fahd University of Petroleum and Minerals

Laboratory Manual - King Fahd University of Petroleum and Minerals

Laboratory Manual - King Fahd University of Petroleum and Minerals

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

FSTOP is the final or ending frequency.<br />

.DC SOURCE_NAME START_VAL STOP-VAL INCREMENT_VAL<br />

The .DC control statement specifies the values that will be used for dc sweep or<br />

dc analysis.<br />

Where SOURCE_NAME is the name <strong>of</strong> an independent voltage or current<br />

source. START_VAL, STOP_VAL <strong>and</strong> INCREMENT_VAL represent the<br />

starting, ending, <strong>and</strong> increment values <strong>of</strong> the source, respectively.<br />

.TRAN TSTEP TSTOP<br />

.TRAN makes SPICE perform a time domain transient analysis <strong>of</strong> the circuit<br />

TSTEP is the time increment used for plotting <strong>and</strong>/or printing results <strong>of</strong> the<br />

analysis.<br />

TSTOP is the time <strong>of</strong> the last transient analysis.<br />

.PRINT ANALYSISTYPE OV<br />

The inclusion <strong>of</strong> the .PRINT statement makes SPICE perform a print <strong>of</strong> a<br />

specified output variable resulting from a specified type <strong>of</strong> analysis.<br />

where ANALYSISTYPE is the type <strong>of</strong> analysis performed from which the output<br />

variable OV is obtained.<br />

.PROBE<br />

Probe in SPICE is the graphics postprocessor that calculates <strong>and</strong> displays results<br />

<strong>of</strong> a simulation. In effect, Probe functions as a “s<strong>of</strong>tware” oscilloscope, calculator,<br />

<strong>and</strong> spectrum analyzer. Arithmetic operations on output variables are allowed in<br />

SPICE Probe. Always include .Probe statement to help in plotting your results.<br />

WRITING AND RUNING THE PROGRAME<br />

‣ Create an input file (source file) or Circuit description file for SPICE.<br />

You can run SPICE by going to programs→SPICE Student→SPICE AD<br />

Student from the start Menu. Next, we have to create text file that describes our<br />

circuit <strong>and</strong> the simulation protocol. Create a new text file (File→New→Text<br />

File) with any editor, such as Micros<strong>of</strong>t editor, Word perfect, Notepad under<br />

windows, etc. <strong>and</strong> immediately save it (File Save As…) with the extension .cir<br />

(example:circuit1.cir). Now you must open the file (File→Open, <strong>and</strong> change the<br />

“Types <strong>of</strong> Files” to “Circuit Files”) before SPICE recognize it as a valid circuit<br />

description file.<br />

6

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!