Electronics > QUESTIONS & ANSWERS > California Polytechnic State University, San Luis Obispo - EE 308EE308_HW4_F2018solution ( 100% COR (All)

California Polytechnic State University, San Luis Obispo - EE 308EE308_HW4_F2018solution ( 100% CORRECT AND COMPLETE SOLUTIONS )

Document Content and Description Below

EE308 Analog Electronics and Integrated Circuits HW4 - Assigned: 10/6/18 Due: 10/12/18 Paper submissions due: 2:30pm /72 Electronic submissions due: 10:00pm This assignment will introduce you to o... ne more ability of LTSpice, and some practice on design. Reminder: Because we will be talking about both MOSFETs and BJTs in this class, I’d like to use common terms for the regions between the two. I will use the boldface terms: Region BJT MOSFET What I will call it Importance 1 Cutoff Cutoff, subthreshold Cutoff 2 Saturation Linear, ohmic, resistive Linear 3 Forward active Saturation, pinchoff Active Region we like If a question is taking much time at all, write to me for help. We’ve talked about four types of simulations: AC sweep, DC sweep, .op and transient. Before you do a simulation, make sure you select the correct type of simulation that will give you the information that you are trying to get. 1. LTSpice: Letting Spice do calculations for you Here’s a technique that will allow you to have LTSpice do the work of finding or calculating a value. The value can be any equation, a slope, a value at a certain time, a value at a certain input, a value when the slope is a certain value, etc etc… This is done using a .MEASURE (or .MEAS for short) statement. .MEAS uses data collected during a simulation. The actual calculation is done after the simulation is done using the values stored from the simulation. Here’s an example: I first did a DC sweep to find the RC that would give me 5mA through the biasing circuitry using a .PARAM directive. I found that 286.5Ω makes the biasing circuitry conduct 5mA. I set that value in the: .PARAM RC=286.5 to set the value of RC. Now my circuit is complete. In the example above, I then did a transient response simulation of 50ms. .MEAS can be used with other simulation types but I’ll use .TRAN here.I added a bunch of .MEAS statements to the schematic. You do that using the .op on a PC. …. Mac people, check out http://cmosedu.com/videos/ltspice/LTspice_Mac_op_sim.pdf I’ll explain them one by one here. After the .PARAM statement and .TRAN statement comes a .meas statement. It is just setting a value in a variable: .MEAS end1 PARAM 25m It says: end1 is a variable and I’m giving it the value 0.025. A variable is the same as in programming. Now you can use end1 in equations in other .MEAS statements and it’ll have the value 25x10-3. I’m using the notation of all upper case means the word is a reserved words. The lower case words are values or names you get to pick. I picked “end1” for my start time but I could have used “armadillo” and it would have been just as happy. .MEAS armadillo PARAM 50m It says: armadillo is a variable and I’m giving it the value 0.05. Here’s how you might use a variable in a ,MEAS statement: .MEAS TRAN result1 AVG V(Q1CollectorV) FROM armadillo TO end1 This says: I’m doing a transient response simulation and I want the average (AVG) of the voltage on the wire called Q1CollectorV starting from the time (X-axis value) in armadillo and ending at time end1 (Xaxis value) to be put in a variable called result1. As in the other examples, the all upper case words are reserved words. The lower case words are values or names you get to pick. .MEAS TRAN vmid FIND V(Q1CollectorV) AT (armadillo+end1)/2 This finds the value of voltage at node Q1CollectorV at the time (start1+end1)/2 (in the middle of the time measurement range) and puts it in the variable vmid. .MEAS TRAN vstart FIND V(Q1CollectorV) AT armadillo .MEAS TRAN vend FIND V(Q1CollectorV) AT end1 These statements put the voltage at the node Q1CollectorV at the start time armadillo into vstart and the voltage at the node Q1CollectorV at the end time into vend. .MEAS TRAN result2 DERIV V(Q1CollectorV) WHEN V(Q1CollectorV)=(vstart+vend)/2 This statement puts the derivative of the voltage graph at the middle voltage (vstart+vend)/2, into the variable result2. This is the derivative of the voltage slope. This is just the slope of V2 (5V/50ms=100) .MEAS TRAN result3 DERIV ID(M1)*RC WHEN V(Q1CollectorV)=(vstart+vend)/2 This takes the derivative of the current from M1 times RC which kinda makes no sense…. But shows how you can use multiplication in the thing you are taking the derivative. .MEAS TRAN result4 DERIV ID(M1) WHEN V(Q1CollectorV)=(vstart+vend)/2 This takes the derivative of the current out of M1 in the middle of the time range and puts the value in the variable called result4. .MEAS ro PARAM 1/result4 This puts the inverse of the slope into the variable called ro. To see the values of the variables (results) enter Ctrl+L. You can also see the values by going to: View  Spice Error Log. I’ve posted the *.asc file that I used as an example on PolyLearn for you to look at. For more information go to page 73 of http://ecee.colorado.edu/~mathys/ecen1400/pdf/scad3.pdf There’s an LTSpice video that will give you even more tips at: http://www.linear.com/solutions/1100 LTSpice’s old version had trouble with some basic .meas statements. They’ve improved LTSpice so it does better with .meas statements. Almost all circuit simulator are based on Spice and have their own text version of .meas. Most use statements that look very much like the LTSpice statements. Text below stolen from: http://web.stanford.edu/class/ee133/handouts/general/spice_ref.pdfYou can use .MEASURE for finding: ·  Rise, Fall and Time Delay ·  Average, RMS, min, max, peak-to-peak and integral ·  Find X when Y occurs ·  Derivative and Integral Evaluations ·  Equation Evaluations ·  Relative Error (See Manual for Examples) Other things you can do including finding minimums, maximums, where things cross for the first time, second time, Nth time, rise and fall times, rms and any equation of your own that you’d like Spice to calculate for you. Rise and Fall times: .MEAS TRAN rise TRIG V(1) VAL=.2 RISE=1 + TARG V(1) VAL=.8 RISE=1 Gives the time it takes for node 1 to go from 20% to 80% of the maximum voltage (assuming a max voltage of 1V) Time (propagation) Delay: .MEAS TRAN tdelay TRIG V(1) VAL=2.5 TD=10n RISE=1 + TARG V(2) VAL=2.5 FALL=1 This command takes a look between two points and calculates the time delay as a signal pushes the voltage up at first node 1 and then node 2. The crossing does not count unless it lasts longer than 10 ns. It only counts the first time it rises and the first time it falls. Average (and RMS, MIN, MAX and Peak to Peak): .MEAS TRAN avgval AVG V(1) FROM=10ns TO=55ns This takes the average value of node 1 from 10ns to 55ns and outputs it as avgval in the *.lis or *.lst file. If you replace the keyword AVG with RMS, MIN, MAX and PP SPICE will calculate that function for the time given. Find and When: .MEAS TRAN DesiredCurr FIND I(Vmeas) WHEN V(1)=1V Output to DesiredCurr the current through the votlage supply Vmeas when node 1 reaches 1V. Derivatives and Integrals: .MEAS TRAN slewrate DERIV V(out) AT=25ns This calculates the derivative of V(out) at 25ns. Derivative is always calculated with respect to the sweeping parameter (which is time in this case). Using Equation Evaluations: .MEAS TRAN slew DERIV v(1) WHEN v(1)=’0.9*vdd’ In this case, we’re calculating slew rate when v(1) is equal to 0.9*vdd. .MEAS AC delay DERIV ‘VP(output)/360.0’ AT=10kHz This calculates the delay which is equal to the derivative of the phase normalized by 360 degrees. Another handy .MEAS: .meas ac peak max v(Out) FROM=15kHz TO=45kHz Here’s the homework question: Use the common source amplifier in the *.asc file on PolyLearn called hw7CS.asc for this question. Don’t change the circuit or any of the statements. Just add .measure statements to find your answer. Note that a DCsweep is being used instead of a transient. Because you are doing a DC sweep, the .MEAS statements will have a DC instead of a TRAN. For example: .MEAS TRAN result4 DERIV ID(M1) WHEN V(Q1CollectorV)=(vstart+vend)/2 Would become: .MEAS DC result4 DERIV ID(M1) WHEN V(Q1CollectorV)=(vstart+vend)/2The values that you are looking for are: (Future question  Change to 0.8V and 1.2V) a. The slope of the output in the middle of the range 3V to 3.8V using DERIV. b. The slope of the output in the middle of the range 3V to 3.8V using the current through the transistor times RD. Include a screen capture of the schematic with .MEAS statements readable and the result from the log file [Show More]

Last updated: 2 years ago

Preview 1 out of 10 pages

Buy Now

Instant download

We Accept:

We Accept
document-preview

Buy this document to get the full access instantly

Instant Download Access after purchase

Buy Now

Instant download

We Accept:

We Accept

Reviews( 0 )

$7.00

Buy Now

We Accept:

We Accept

Instant download

Can't find what you want? Try our AI powered Search

60
0

Document information


Connected school, study & course


About the document


Uploaded On

Apr 06, 2021

Number of pages

10

Written in

Seller


seller-icon
Muchiri

Member since 4 years

209 Documents Sold

Reviews Received
19
5
1
1
6
Additional information

This document has been written for:

Uploaded

Apr 06, 2021

Downloads

 0

Views

 60

Document Keyword Tags


$7.00
What is Scholarfriends

In Scholarfriends, a student can earn by offering help to other student. Students can help other students with materials by upploading their notes and earn money.

We are here to help

We're available through e-mail, Twitter, Facebook, and live chat.
 FAQ
 Questions? Leave a message!

Follow us on
 Twitter

Copyright © Scholarfriends · High quality services·