DOC PREVIEW
MIT 6 01 - Assignment 9a - Software Lab

This preview shows page 1-2 out of 5 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 5 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 5 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 5 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

6.01, Fall Semester, 2007—Assignment 9a - Software Lab, Issued: Tuesday, Oct. 30th 1MASSACHVSETTS INSTITVTE OF TECHNOLOGYDepartment of Electrical Engineering and Computer Science6.01—Introduction to EECS IFall Semester, 2007Assignment 9a - Software Lab, Issued: Tuesday, Oct. 30thTo do this week...in Tuesday software lab1. Start writing code and test cases for the numbered questions in the software lab. Paste allyour code, including your test cases, into the b ox provided in the “Software Lab” (Part 9.1)problem on the on-line Tutor. This will not be graded....before the start of lab on Thursday1. Read the lecture notes.2. Do the on-line Tutor problems for week 9 that are due on Thursday (Part 9.2).3. Read through the entire description of Thursday’s lab (a separate handout from this one)....in Thursday robot lab1. Answer the numbered questions in the robot lab and demonstrate them to your LA.2. Do the nanoquiz; it will be based on the material in the lecture notes and the on-line Tutorproblems due on Thursday....before the start of lecture next Tuesday1. Do the lab writeup, providing written answers (including code and test cases) for everynumb e red question in this and the Thursday lab handout.On Athena machines make sure you do:athrun 6.01 updateso that you can get the Desktop/6.01/lab9 directory which has the files mentioned in thishandout.• You need the files resolveConstraints.py, circuitConstraints.py, genKCL.py(your code) or genKCL.pyc (our code) for the software lab, and may find themhelpful for the circuit design lab.During software lab, if you are using your own laptop, download the files from the courseWeb site (on the Calendar page). Be sure you have numpy installed.6.01, Fall Semester, 2007—Assignment 9a - Software Lab, Issued: Tuesday, Oct. 30th 2Getting a head wi th circuitsIn all the previous labs, we have mostly abstracted away the electrical nature of the signals beingprocessed and generated by the robot. In this laboratory you will design and build an electricalfeedback system which controls a robot “head”. In subsequent labs, you will put “eyes” on thehead to help your robot “see”. As with the previous labs, you will start by building a pythontool to help you analyze circuits, and then you will use that tool to help you design an improvedrobot head controller. So this week you will be extending the constraint resolver, analyzing anelectromechanical system, and designing a circuit. Whew!Tuesday’s Software Lab: Adding an Op-amp to the Constraint Re-solverYou will be extending the constraint resolver program for analyzing circuits by adding an op-ampmodel to the program. You can then use your augmented constraint resolver to help you design acircuit to control the motor.Add an op-amp mo del to the constraint resolverIn class we discussed the operational amplifier circuit referred to as an inverting amplifier shownin figure 1In order to simplify the analysis of the op-amp circuit, we assumed that V+− V−≈ 0 and that nocurrent enters the op-amp inputs. Using those assumptions, we determined that the relationshipbetween Vinand VoutwasVout= −RfRinVin.The main reason we could assume that V+− V−≈ 0 was that the op-amp was connected in afeedback configuration and the gain of the op-amp was very large. You will now investigate theaccuracy of that approximation using the constraint resolver. Please use the version of the constraintresolver that does NOT automatically generate KC L equations. As part of an exploration, you caninvestigate how to add the op-amp to your derived class for two-terminal devices.The abstract model we used for the op-amp was a voltage-controlled voltage source model, andusing that model in the inverting amplifier yields a somewhat different looking schematic shown infigure 2.where the gain of the voltage-controlled voltage source, K, is a very large number. We would likeyou to please add this voltage-controlled voltage source model to circuitConstraints.py, allowing Kto be a parameter, analogous to way resistance is a parameter for resistors. Keep in mind that thismodel has four terminals, but there is only one nonzero current, iout. Therefore, your constraintshould involve four voltages and one current. Please carefully consider what to do with iout, thecurrent generated at the output terminals of the op-amp. Note that this output current is not usedin the op-amp constitutive relations (recall that the same situation occurs with a voltage sourceelement).6.01, Fall Semester, 2007—Assignment 9a - Software Lab, Issued: Tuesday, Oct. 30th 3+_Opamp+_inRfRoutVV+V-+15-15VoFigure 1: Operational amplifier connected in an inverting amplifier configuration6.01, Fall Semester, 2007—Assignment 9a - Software Lab, Issued: Tuesday, Oct. 30th 4+_+_Opamp Model+_ioutFigure 2: Inverting amplifier using a voltage-c ontrolled voltage source op-amp model6.01, Fall Semester, 2007—Assignment 9a - Software Lab, Issued: Tuesday, Oct. 30th 5Question 1. Describe your modification to circuitConstraints.py to implement the voltage-controlled voltage source model of the op-ampQuestion 2. What constraint will make use of the the op-amp current?Test your implementation of the op-amp constraints by analyzing the inverting amplifier in figure 2using the constraint resolver. Use Rin= 10, 000, Rf= 100, 000, and try two cases: one where theop-amp gain, K, is K = 1000 and then when K = 100. Also, try several different input voltages totest the gain.Question 3. Describe your python file that generates the constitutive equations and the con-servation law s for the negative feedback amplifier circuit.Question 4. What was the gain of the amplifier when K = 1000 and when K = 100? Did thegain you measured depend on the input voltage?Question 5. If the input voltage is 10 volts, you would expect the output voltage to be near−100 volts. In the lab, we use protoboard power supplies that generate voltages in therange −15 volts to +15 volts? So what do you think would happen if you built the circuitin figure 2 using the protoboard power supplies and tested it with an input of 10 volts?Question 6. Determine approximately the smallest value of op-amp gain, K, for whichVoutVin= −RfRinis accurate to within ten percent.Go to the on-line Tutor at http://sicp.csail.mit.edu/6.01/fall07, choose PS9, andpaste the code that you wrote during lab, including your test cases, into the box providedin the “Software Lab” problem. Do this even if you have


View Full Document

MIT 6 01 - Assignment 9a - Software Lab

Documents in this Course
Week 1

Week 1

3 pages

Op-Amps

Op-Amps

8 pages

Op-Amps

Op-Amps

6 pages

Syllabus

Syllabus

14 pages

Planning

Planning

14 pages

Load more
Download Assignment 9a - Software Lab
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Assignment 9a - Software Lab and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Assignment 9a - Software Lab 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?