Designing Information Devices and Systems I Spring 2017 Babak Ayazifar, Vladimir Stojanovic Homework 6

Similar documents
Designing Information Devices and Systems I Anant Sahai, Ali Niknejad. This homework is due October 13, 2015, at Noon.

Designing Information Devices and Systems I Spring 2019 Homework 7

Designing Information Devices and Systems I Spring 2017 Babak Ayazifar, Vladimir Stojanovic Homework 4

Designing Information Devices and Systems I Fall 2018 Homework 7

Designing Information Devices and Systems I Spring 2017 Babak Ayazifar, Vladimir Stojanovic Homework 2

Designing Information Devices and Systems I Spring 2018 Homework 13

Designing Information Devices and Systems I Spring 2018 Homework 7

Designing Information Devices and Systems I Spring 2018 Homework 11

Designing Information Devices and Systems I Fall 2017 Homework 3

Designing Information Devices and Systems I Spring 2019 Homework 11

Designing Information Devices and Systems I Fall 2016 Babak Ayazifar, Vladimir Stojanovic Homework 2

Designing Information Devices and Systems I Fall 2018 Homework 5

Designing Information Devices and Systems I Summer 2017 D. Aranki, F. Maksimovic, V. Swamy Homework 5

Designing Information Devices and Systems I Fall 2015 Anant Sahai, Ali Niknejad Homework 2. This homework is due September 14, 2015, at Noon.

Designing Information Devices and Systems I Fall 2018 Homework 3

Designing Information Devices and Systems I Spring 2018 Homework 10

Designing Information Devices and Systems I Babak Ayazifar, Vladimir Stojanovic. This homework is due October 25, 2016, at 1PM.

Designing Information Devices and Systems I Spring 2019 Homework 5

Designing Information Devices and Systems I Spring 2017 Babak Ayazifar, Vladimir Stojanovic Midterm 1

Designing Information Devices and Systems I Summer 2017 D. Aranki, F. Maksimovic, V. Swamy Homework 2

Designing Information Devices and Systems I Fall 2015 Anant Sahai, Ali Niknejad Final Exam. Exam location: RSF Fieldhouse, Back Left, last SID 6, 8, 9

Designing Information Devices and Systems II Fall 2016 Murat Arcak and Michel Maharbiz Homework 0. This homework is due August 29th, 2016, at Noon.

Designing Information Devices and Systems I Summer 2017 D. Aranki, F. Maksimovic, V. Swamy Homework 1

Designing Information Devices and Systems I Spring 2016 Elad Alon, Babak Ayazifar Homework 11

Designing Information Devices and Systems I Fall 2015 Anant Sahai, Ali Niknejad Homework 8. This homework is due October 26, 2015, at Noon.

Designing Information Devices and Systems I Spring 2016 Elad Alon, Babak Ayazifar Homework 1. This homework is due February 2, 2016, at Noon.

Designing Information Devices and Systems I Fall 2016 Babak Ayazifar, Vladimir Stojanovic Homework 12

EECS 16A: SPRING 2015 MIDTERM 2

Designing Information Devices and Systems II Spring 2017 Murat Arcak and Michel Maharbiz Homework 9

Total 100

Designing Information Devices and Systems I Spring 2017 Babak Ayazifar, Vladimir Stojanovic Midterm 2. Exam location: 145 Dwinelle, last SID# 2

The line that passes through the point A ( and parallel to the vector v = (a, b, c) has parametric equations:,,

Designing Information Devices and Systems I Fall 2015 Anant Sahai, Ali Niknejad Midterm 1. Exam location: 60 Evans, last digit SID= 6

Designing Information Devices and Systems II Fall 2018 Elad Alon and Miki Lustig Homework 9

Designing Information Devices and Systems I Spring 2016 Elad Alon, Babak Ayazifar Midterm 2. Exam location: 145 Dwinelle, last SID# 2

Math 308 Discussion Problems #4 Chapter 4 (after 4.3)

Designing Information Devices and Systems I Fall 2016 Babak Ayazifar, Vladimir Stojanovic Final Exam

Simultaneous equations for circuit analysis

Math 152 Second Midterm March 20, 2012

Current Electricity.notebook. December 17, 2012

Designing Information Devices and Systems I Spring 2016 Elad Alon, Babak Ayazifar Homework 12

EECS 16A Designing Information Devices and Systems I Spring 2016 Elad Alon, Babak Ayazifar Final. Exam location: RSF Back Left, last SID# 1, 4, + 5

Designing Information Devices and Systems I Spring 2016 Elad Alon, Babak Ayazifar Midterm 1

Module 1, Add on math lesson Simultaneous Equations. Teacher. 45 minutes

ENERGY AND TIME CONSTANTS IN RC CIRCUITS By: Iwana Loveu Student No Lab Section: 0003 Date: February 8, 2004

physics 4/7/2016 Chapter 31 Lecture Chapter 31 Fundamentals of Circuits Chapter 31 Preview a strategic approach THIRD EDITION

Designing Information Devices and Systems I Fall 2016 Babak Ayazifar, Vladimir Stojanovic Midterm 1. Exam location: 145 Dwinelle, last SID# 2

Capacitance. A different kind of capacitor: Work must be done to charge a capacitor. Capacitors in circuits. Capacitor connected to a battery

P1: Basics - Things you now know that you didn t know you knew (25 pts)

Math 308 Midterm Answers and Comments July 18, Part A. Short answer questions

Designing Information Devices and Systems I Fall 2015 Anant Sahai, Ali Niknejad Final Exam. Exam location: You re Done!!

University of Maryland Department of Physics

NAME: PHYSICS 3 FALL 2009 FINAL EXAM (VERSION A ) A) Wood B) Glass C) Equal D) No reflection occurs from either material

Designing Information Devices and Systems I Fall 2015 Anant Sahai, Ali Niknejad Homework 10. This homework is due November 9, 2015, at Noon.

Math 20F Final Exam(ver. c)

Homework For each of the following matrices, find the minimal polynomial and determine whether the matrix is diagonalizable.

Experiment 2 Electric Field Mapping

Direct Current Circuits. February 18, 2014 Physics for Scientists & Engineers 2, Chapter 26 1

Designing Information Devices and Systems I Spring 2019 Lecture Notes Note 6

Math 322. Spring 2015 Review Problems for Midterm 2

E40M Charge, Current, Voltage and Electrical Circuits. M. Horowitz, J. Plummer, R. Howe 1

Designing a Thermostat Worksheet

Spring 2015 Midterm 1 03/04/15 Lecturer: Jesse Gell-Redman

80 min. 65 points in total. The raw score will be normalized according to the course policy to count into the final score.

Math 307 Learning Goals. March 23, 2010

B: Know Circuit Vocabulary: Multiple Choice Level 1 Prerequisites: None Points to: Know Circuit Vocabulary (Short Answer)

Chapter 22: Current and Resistance Solutions

MAT 1302B Mathematical Methods II

Notes: Ohm s Law and Electric Power

Maximum Power Point (Teacher Notes) (The Principles of Optimizing Photovoltaic Cell Power Output)

Lecture 5: Using electronics to make measurements

Recitation 8: Graphs and Adjacency Matrices

Physics 208: Electricity and Magnetism Final Exam, Secs May 2003 IMPORTANT. Read these directions carefully:

Designing Information Devices and Systems I Fall 2018 Lecture Notes Note 6

k is a product of elementary matrices.

Designing Information Devices and Systems II Spring 2016 Anant Sahai and Michel Maharbiz Homework 5. This homework is due February 29, 2016, at Noon.

Problem Set 1 Solutions (Rev B, 2/5/2012)

The Basis. [5] The Basis

LINEAR ALGEBRA KNOWLEDGE SURVEY

Midterm 1 Solutions Math Section 55 - Spring 2018 Instructor: Daren Cheng

Designing Information Devices and Systems I Spring 2016 Elad Alon, Babak Ayazifar Midterm 1

Designing Information Devices and Systems I Spring 2019 Lecture Notes Note 2

Designing Information Devices and Systems I Summer 2017 D. Aranki, F. Maksimovic, V. Swamy Midterm 1. Exam Location: 2050 VLSB

DC Circuits. Circuits and Capacitance Worksheet. 10 Ω resistance. second? on the sodium is the same as on an electron, but positive.

Lab 6: Capacitors and Resistor-Capacitor Circuits Phy208 Spr 2008 Name Section

No Brain Too Small PHYSICS

[Disclaimer: This is not a complete list of everything you need to know, just some of the topics that gave people difficulty.]

ECE 220 Laboratory 4 Volt Meter, Comparators, and Timer

Iterative Methods for Solving A x = b

UNIVERSITY OF ALABAMA Department of Physics and Astronomy. PH / LeClair Fall Circuits Exercises

MasteringPhysics: Assignment Print View. Problem 30.50

Reduction to the associated homogeneous system via a particular solution

SAM Teachers Guide Electricity

CMU CS 462/662 (INTRO TO COMPUTER GRAPHICS) HOMEWORK 0.0 MATH REVIEW/PREVIEW LINEAR ALGEBRA

Physics 212 Midterm 2 Form A

Which one of the pipes emits sound with the lowest frequency? Which one of the pipes emits sound with the next lowest frequency?

Electric Current. Chapter 17. Electric Current, cont QUICK QUIZ Current and Resistance. Sections: 1, 3, 4, 6, 7, 9

EK102 Linear Algebra PRACTICE PROBLEMS for Final Exam Spring 2016

General Physics - E&M (PHY 1308) - Lecture Notes. General Physics - E&M (PHY 1308) Lecture Notes

MIT Final Exam Solutions, Spring 2017

Transcription:

EECS 16A Designing Information Devices and Systems I Spring 2017 Babak Ayazifar, Vladimir Stojanovic Homework 6 This homework is due March 6, 2017, at 23:59. Self-grades are due March 9, 2017, at 23:59. Submission Format Your homework submission should consist of two files. hw6.pdf: A single pdf file that contains all your answers (any handwritten answers should be scanned) as well as your IPython notebook saved as a pdf. If you do not attach a pdf of your IPython notebook, you will not receive credit for problems that involve coding. Make sure your results and plots are showing. hw6.ipynb: A single IPython notebook with all your code in it. In order to receive credit for your IPython notebook, you must submit both a printout and the code itself. Submit each file to its respective assignment in Gradescope. 1. Can You Hear the Shape of a Drum? This problem is inspired by a popular problem posed by Mark Kac in his article "Can you hear the shape of a drum? 1 Kac s question was about different shapes of drums. Here s what he wanted to know: if the shape of a drum defines the sound that s made when we strike it, can we listen to the drum and automatically infer its shape? Deep down, this is really a question about eigenvalues and eigenvectors of a matrix. The vibrational dynamics of a particularly shaped drum membrane can be captured by a system of linear equations represented by a matrix. The eigenvalues and eigenvectors of this matrix reveal interesting properties about the drum that will help us answer the question: can we hear its shape? We ll use a model of vibration given by the equation, 2 u(x,y) + λu(x,y) = 0 Where u is the amount of displacement of the drum membrane at a particular location (x,y), and λ is a parameter (which will turn out to be an eigenvalue, as you will see). The 2 is an operator called the Laplacian, and just stands for taking the 2nd x-partial-derivative and adding it to the 2nd y-partialderivative: 2 u(x,y) = 2 u x 2 + 2 u u(x + h,y) + u(x,y + h) 4u(x,y) + u(x,y h) + u(x h,y) y2 h 2 I ve given you an approximation for the Laplacian above, which is the key to formulating this problem as a matrix equation. This equation is known as the 5-point finite difference equation because it uses five 1 Marc Kac, Can one hear the shape of a drum?, Amer. Math. Monthly 73 (1966), 1-23. EECS 16A, Spring 2017, Homework 6 1

points (the point at x,y and each of its nearest neighbors) to approximate the value of the Laplacian. The last thing you ll need before we start is the 1D version of this equation, to start: d 2 u u(x + h) 2u(x) + u(x h) dx2 h 2 (Note: for 1D the Laplacian simplifies to a regular 2nd derivative; the factor on the u(x) is 2 instead of 4; and there are only 3 points!) (a) First we ll do a simple model: a violin string. Write the finite difference matrix problem for a 1 5 1D violin string as shown in Figure 1. Use the model shown above to derive your matrix. You can make the assumption that the ends of the string (points 0 and 4) are anchored, so they always have a displacement of zero. Assume that the length of the string is 1 meter (even though that s kind of long for a violin...) (Note: there are only 3 unknowns here!) Figure 1: A 5-point model of a violin string. (b) For our vibrating string, find the 3 eigenvalues (λ) of the matrix A. (c) For the vibrating string, find the 3 eigenvectors u that correspond to the λ s from part b. What do these vectors look like? (d) What do you think the eigenvalues mean for our vibrating string? (Hint: what does a larger eigenvalue seem to indicate about the corresponding eigenvector?) Using what you know from part (a) of this problem, we will write down the 5-point finite difference equation for a 5 5 square drum in the form of a matrix problem so that it has the same form as λ u = A u In this formulation, as in the 1D formulation, each row of A will correspond to the equation of motion for one point on the model. In our 5 5 grid, we will be modeling the motion of the inner 3 3 grid, since we will assume the membrane is fixed on the outer border. Since there are 9 points that we are modeling, this corresponds to 9 equations and 9 unknowns, so A should be 9 9. (e) Based on our intuition from the 1D problem, what do the eigenvalues and eigenvectors correspond to in the 2D problem? (f) Write down the 9 9 matrix, A, for the drum in Figure 2. It should have some symmetry, but be careful with the diagonals. (g) In the IPython Notebook, implement a function to solve the finite difference problem for a square drum of any side-length (though keep the side-length short at first, so that you don t run into memory problems!). What are the eigenvalues of the 5 5 drum? EECS 16A, Spring 2017, Homework 6 2

Figure 2: A 25-point model of a drum membrane. (h) Using some of the built-in functionality, you can construct a drum with any polygonal shape. There are two shapes already implemented, with the shapes shown below. The code already included will construct the A matrix given a polygon and a grid. Find the first 10 vibrational modes of each drum, and the associated eigenvalues (this is analogous to finding the first 10 eigenvectors of each A matrix, and the associated eigenvalues). Plot the 0th, 4th, and 8th modes using a contour plot. (i) These two drums are different shapes. Do they sound the same? Why or why not? Can you hear the shape of a drum? 2. Traffic Flows Your goal is to measure the flow rates of vehicles along roads in a town. However, it is prohibitively expensive to place a traffic sensor along every road. You realize, however, that the number of cars flowing into an intersection must equal the number of cars flowing out. You can use this flow conservation to determine the traffic along all roads in a network by only measuring flow along only some roads. In this problem we will explore this concept. (a) Let s begin with a network with three intersections, A, B and C. Define the flows t 1 as the rate of cars (cars/hour) on the road between B and A, t 2 as the rate on the road between C and B and t 3 as the rate on the road between C and A. Figure 3: A simple road network. (Note: The directions of the arrows in the figure are only the way that we define the flow by convention. If there were 100 cars per hour traveling from A to C, then t 3 = 100.) We assume the flow conservation constraints: the total number of cars per hour flowing into each intersection is zero. For example at intersection B, we have the constraint t 2 t 1 = 0. The full set of EECS 16A, Spring 2017, Homework 6 3

constraints (one per intersection) is: t 1 +t 3 = 0 t 2 t 1 = 0 t 3 t 2 = 0 As mentioned earlier, we can place sensors on a road to measure the flow through it. But, we have a limited budget, and we would like to determine all of the flows with the smallest possible number of sensors. Suppose for the network above we have one sensor reading, t 1 = 10. Can we figure out the flows along the other roads? (That is, the values of t 2 and t 3 ). (b) Now suppose we have a larger network, as shown in Figure 4. Figure 4: A larger road network. We would again like to determine the traffic flows on all roads, using measurements from some sensors. A Berkeley student claims that we need two sensors placed on the roads AD and BA. A Stanford student claims that we need two sensors placed on the roads CB and BA. Is it possible to determine all traffic flows with the Berkeley student s suggestion? How about the Stanford student s suggestion? (c) Suppose we write the traffic flow on all roads as a vector t = t 1 t 2 t 3 t 4 t 5. Show that the set of valid flows (which satisfy the conservation constraints) form a subspace. Then, determine the subspace of traffic flows for the network of Figure 4. Specifically, express this space as the span of two linearly independent vectors. (Hint: Use the claim of the correct student in the previous part.) (d) We would like a more general way of determining the possible traffic flows in a network. As a first step, let us try to write all the flow conservation constraints (one per intersection) as a matrix equation. Find a (4 5) matrix B such that the equation B t = 0: t 1 t 2 0 0 B t 3 t 4 t 5 = represents the flow conservation constraints for the network of Figure 4. (Hint: Each row is the constraint of an intersection. You can construct B using only 0,1, 1 entries.) This matrix s transpose is called the incidence matrix. What does each row of this matrix represent? What does each column of this matrix represent? 0 0 EECS 16A, Spring 2017, Homework 6 4

(e) Notice that the set of all vectors t which satisfy B t = 0 is exactly the null space of the matrix B. That is, we can find all valid traffic flows by computing the null space of B. Use Guassian Elimination to determine the dimension of the null space of B, and compute a basis for the null space. (You may use a computer to compute the reduced row echelon form.) Does this match your answer to part (c)? Can you interpret the dimension of the null space of B, for the road networks of Figure 3 and Figure 4? (f) (PRACTICE) Now let us analyze general road networks. Say there is a road network graph G, with incidence matrix B G. If B T G has a k-dimensional null space, does this mean measuring the flows along any k roads is always sufficient to recover the exact flows? Prove or give a counterexample. (Hint: Consider the Stanford student.) (g) (PRACTICE) Let G be a network of n roads, with incidence matrix B G whose transpose has a k- dimensional null space. We would like to characterize exactly when measuring the flows along a set of k roads is sufficient to recover the exact flow along all roads. To do this, it will help to generalize the problem, and consider measuring linear combinations of flows. If t is a traffic flow vector, assume we can measure linear combinations m T i t for some vectors m i. Then making k measurements is equivalent to observing the vector M t for some (k n) measurement matrix M (consisting of rows m T i ). For example, for the network of Figure 4, the measurement matrix corresponding to measuring t 1 and t 4 (as the Berkeley student suggests) is: [ ] 1 0 0 0 0 M = 0 0 0 1 0 Similarly, the measurement matrix corresponding to measuring t 1 and t 2 (as the Stanford student suggests) is: [ ] 1 0 0 0 0 M = 0 1 0 0 0 For general networks G and measurements M, give a condition for when the exact traffic flows can be recovered, in terms of the null space of M and the null space of B T G. (Hint: Recovery will fail iff there are two valid flows with the same measurements. Can you express this in terms of the null spaces of M and B T G?) (h) (PRACTICE) Express the condition of the previous part in a way that can be checked computationally. For example, suppose we are given a huge road network G of all roads in Berkeley, and we want to find if our measurements M are sufficient to recover the flows. (Hint: Consider a matrix U whose columns form a basis of the null space of B T G. Then {U x : x R k } is exactly the set of all possible traffic flows. How can we represent measurements on these flows?) (i) (PRACTICE) If the incidence matrix s transpose B T G has a k-dimensional null space, does this mean we can always pick a set of k roads such that measuring the flows along these roads is sufficient to recover the exact flows? Prove or give a counterexample. 3. Cell Phone Battery As great as smartphones are, one of the main gripes about them is that they need to be recharged too often. Suppose a Samsung Galaxy S3 requires about 0.4 W to maintain a signal as well as its regular activities (dominated by the display and backlight in many cases). The battery provides 2200 mah at a voltage of 3.8V until it is completely discharged. (a) How long will one full charge last you? EECS 16A, Spring 2017, Homework 6 5

(b) Suppose the cell phone battery is completely discharged and you want to recharge it completely. How much energy (in J) is this? How much charge (in C) must be pumped through the battery? (c) Suppose PG&E charges $0.16 per kwh. Every day, you completely discharge the battery and recharge it at night. How much will recharging cost you for the month of March (31 days)? (d) You are fed up with PG&E, gas companies, and Duracell/Energizer/etc. You want to generate your own energy and decide to buy a small solar cell for $1.50. It delivers 40 ma at 0.5 V in bright sunlight. Unfortunately, now you can only charge your phone when the sun is up. Using one solar cell, do you think there is enough time to charge a completely discharged phone every day? How many cells would you need to charge a completely discharged battery in an hour? How much will it cost you per joule if you have one solar cell that works for 10 years (assuming you can charge for 16 hours a day)? Do you think this is a good option? (e) The battery has a lot of internal circuitry that prevents it from getting overcharged (and possibly exploding!) as well as transfering power into the chemical reactions used to store energy. We will model this internal circuitry as being one resistor with resistance R bat, which you can set to any non-negative value you want. Furthermore, we ll assume that all the energy dissipated across R bat goes to recharging the battery. Suppose the wall plug and wire can be modeled as a 5V voltage source and 200 mω resistor, as pictured in Fig. 5. What is the power dissipated across R bat for R bat = 1mΩ, 1Ω, and 10kΩ? How long will the battery take to charge for each of those values of R bat? 200mΩ 5V + R bat Figure 5: Model of wall plug, wire, and battery. 4. Mechanical Circuits Find the voltages across and currents flowing through all the resistors. R 1 3Ω 10V + R 3 4.5Ω R 2 3Ω R 4 1.5Ω EECS 16A, Spring 2017, Homework 6 6

5. Midterm Problem 3 Redo Midterm Problem 3. 6. Midterm Problem 4 Redo Midterm Problem 4. 7. Midterm Problem 5 Redo Midterm Problem 5. 8. Midterm Problem 6 Redo Midterm Problem 6. 9. Midterm Problem 7 Redo Midterm Problem 7. 10. Midterm Problem 8 Redo Midterm Problem 8. 11. Midterm Problem 9 Redo Midterm Problem 9. 12. Homework process and study group Who else did you work with on this homework? List names and student ID s. (In case of hw party, you can also just describe the group.) How did you work on this homework? Working in groups of 3-5 will earn credit for your participation grade. EECS 16A, Spring 2017, Homework 6 7