Unformatted text preview:

6.01, Fall Semester, 2007—Assignment 6, Issued: Tuesday, Oct. 9 1MASSACHVSETTS INSTITVTE OF TECHNOLOGYDepartment of Electrical Engineering and Computer Science6.01—Introduction to EECS IFall Semester, 2007Assignment 6, Issued: Tuesday, Oct. 9To do this weekNo Tuesday software lab...before the lab Thursday, 10/111. Do the on-line Tutor problems for week 6 that are due on Thursday (Part 6.1).2. Do the writeup for the 10/2 and 10/4 software labs (in a previous handout) providing writtenanswers (including code and test cases) for every numbered question in this handout....in lab on Thursday 10/111. Work on the robot steering lab described below.2. Do the nanoquiz; it will be based on the material in the lecture notes and the on-line Tutorproblems due on Thursday....before lecture Tuesday, 10/161. Do the writeup for the 10/11 design lab (In this handout).On Athena or the lab laptops make sure you execute:athrun 6.01 updateso that you can get the Desktop/6.01/lab4 directory which has the files mentioned in thishandout.• You need the file polynomial.pyc.• You need the file feedback.py.• You need the file differenceEquationWithInput.py.• You will need the z-transform manipulation software you wrote.• You need the file soar-graph.py for the software lab.6.01, Fall Semester, 2007—Assignment 6, Issued: Tuesday, Oct. 9 2Figure 1: Robot in corridor.Thursday Design Lab: More sophisticated robot controlJust as in the previous lab, you will be controlling the robot to drive down a narrow corridor asshown in Figure 1. Notice that in the figure, we have denoted the forward speed of the robot, V,the distance to the left wall, dleft, the distance to the right wall, dright, and the angle the robotis making with respect to the parallel walls, θ. Unlike two weeks ago, when you tried to steer therobot to drive straight down the center of the hallway, this week you will be trying to steer the robotto stay a desired distance, ddesired, from the center of the hallway (if ddesired= 0, the problem isequivalent to last week’s problem). Note that the distance from the center is d = 0.5∗(dright−dleft).Question 1. Briefly explain why the distance to the left of center is 0.5 ∗ (dright− dleft).In the last lab you used a very simple control strategy to keep the robot in the center of the corridor,ddesired= 0, by adjusting the rotational speed based on the current value of d(n). You discoveredthat a model of such a controller predicted robot behavior that would oscillate and eventually hitone of the walls. This time you will design a better controller.Using Z transforms to analyze the simple controllerConsider trying to steer the robot down a hallway so as to maintain a desired distance, ddesired,from the center of the hallway while moving forward with a constant speed. Let the error at stepn, e(n), be defined ase(n) = ddesired(n) − d(n).where d(n) is the measured distance at time n from the center of the hallway. Then, the objectivewould be to keep the magnitude of e(n) as small as possible.We can use almost the same difference equation as last lab to model this more general case of anadjustable desired displacement. In particular, the center displacement will still be related to therobot angle byd(n + 1) = d(n) + Vδtθ(n).6.01, Fall Semester, 2007—Assignment 6, Issued: Tuesday, Oct. 9 3where δt is the system’s time between samples and V is the robot forward speed. For this lab, useV = 0.1 meters p er s ec ond.If we use the same control strategy as in the last lab, then the robot angle will satisfy a slightlymodified difference equation for this more general input case,θ(n + 1) = θ(n) + Kδte(n)where K is the “gain” of the feedback. You experimented with different values of K in the last lab.BE CAREFUL ABOUT THE SIGN OF K, which depends on the definition of e! Notice that ifddesired= 0, then Ke(n) = −Kd(n).Question 2. Determine (by hand) a symbolic expression for the transfer function˜H(z) in˜D(z) =˜H(z)˜Ddesired(z),as a function of the gain K. Determine and use the numerical value for δt and use 0.1 forthe forward velo c ity V.Question 3. Pick a numerical value K, and demonstrate that you can use your transfer functionmanipulation program to combine the ab ove difference equations. Show that you can bothgenerate an˜H(z) and a difference equation that relates ddesired(n) to d(n).Question 4. Demonstrate that you can use your program to compute the system’s naturalfrequencies given a numerical value for K, and verify that you program can reproduce yourresults from lab 4.Checkpoint: 10:45• Demonstrate your answers to the above questions to an LA.Analyzing a more sophisticated controllerIn order to design a better controller, one can process the error, e(n), in a more sophisticatedway. For example, one could adjust the rotational speed using some combination of the presentand previous values of the displacement error. The robot angle would then satisfy the differenceequationθ(n + 1) = θ(n) + δt(K1e(n) + K2e(n − 1))6.01, Fall Semester, 2007—Assignment 6, Issued: Tuesday, Oct. 9 4Question 5. Determine (by hand) a symbolic expression for the transfer function˜H(z) of thenew controller,˜D(z) =˜H(z)˜Ddesired(z),as a function of the gains K1and K2. Determine and use the numerical value for δt and use0.1 for the forward velocity V.Question 6. Pick numerical values for K1and K2, and for demonstrate that you can use yourtransfer function manipulation program to combine the difference equations for the morecomplicated controller. Show that you can both generate an˜H(z) and a difference equationthat relates ddesired(n) to d(n).Question 7. Demonstrate that you can use your program to compute the system’s naturalfrequencies given numerical values for K1and K2.Designing the controller by placing the natural frequencies.As you have no doubt discovered, the more sophisticated controller generates a transfer functionwhose denominator is a cubic polynomial. In addition, two of the denominator polynomial coeffi-cients are functions of K1and K2. Since the roots of the denominator polynomial are the naturalfrequencies of the feedback system, your design problem is to pick values of K1and K2so that thenatural frequencies are less than one in magnitude.One approach to determining values of K1and K2is to use your transfer function program toperform a brute-force search for values of K1and K2. Before trying brute-force, consider a strategyof starting by specifying a set of


View Full Document

MIT 6 01 - Assignment - 6.01

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 - 6.01
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 - 6.01 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 - 6.01 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?