+ All Categories
Home > Documents > EECS 16A Designing Information Devices and …PRINTyour name and student ID: Waiver Option At our...

EECS 16A Designing Information Devices and …PRINTyour name and student ID: Waiver Option At our...

Date post: 10-Feb-2020
Category:
Upload: others
View: 1 times
Download: 0 times
Share this document with a friend
25
EECS 16A Designing Information Devices and Systems I Spring 2017 Babak Ayazifar, Vladimir Stojanovic Final Exam Exam location: 145 Dwinelle, last SID# 2 PRINT your student ID: PRINT AND SIGN your name: , (last) (first) (signature) PRINT your Unix account login: ee16a- PRINT your discussion section and GSI (the one you attend): Name and SID of the person to your left: Name and SID of the person to your right: Name and SID of the person in front of you: Name and SID of the person behind you: Please write all your work within the box provided for a corresponding question. ONLY the work in that box will be graded. We will not be able to assign any credit for the work outside of the bounding boxes for the corresponding question. Section 0: Pre-exam questions (2 points) 1. Where can you write your answer? (1 pt) 2. What are your plans for summer break? (1 pt) EECS 16A, Spring 2017, Final Exam 1
Transcript
Page 1: EECS 16A Designing Information Devices and …PRINTyour name and student ID: Waiver Option At our discretion, we have provided you with the option to waive (or opt out of) one or more

EECS 16A Designing Information Devices and Systems ISpring 2017 Babak Ayazifar, Vladimir Stojanovic Final Exam

Exam location: 145 Dwinelle, last SID# 2

PRINT your student ID:

PRINT AND SIGN your name: ,(last) (first) (signature)

PRINT your Unix account login: ee16a-

PRINT your discussion section and GSI (the one you attend):

Name and SID of the person to your left:

Name and SID of the person to your right:

Name and SID of the person in front of you:

Name and SID of the person behind you:

Please write all your work within the box provided for a corresponding question. ONLY the work inthat box will be graded. We will not be able to assign any credit for the work outside of the boundingboxes for the corresponding question.

Section 0: Pre-exam questions (2 points)

1. Where can you write your answer? (1 pt)

2. What are your plans for summer break? (1 pt)

EECS 16A, Spring 2017, Final Exam 1

Page 2: EECS 16A Designing Information Devices and …PRINTyour name and student ID: Waiver Option At our discretion, we have provided you with the option to waive (or opt out of) one or more

PRINT your name and student ID:

Waiver OptionAt our discretion, we have provided you with the option to waive (or opt out of) one or more parts of theexam, in exchange for a baseline partial credit. You can identify each part that has been so designated quiteeasily; you’ll notice a blank box awaiting your initials, with the following short declaration: “By my initialsin the box, I waive this part and accept 10% of the credit.”

If you find that you are unable to tackle the designated part with a reasonable level of fluency, it may beto your advantage to simply indicate to us—by signing your initials in the waiver box—that you want tosimply forgo the work asked of you for that part. This is designed to save you time and allow you to focuson doing your best on other parts of the exam.

For example, suppose a part that involves a proof has 10 points of credit associated with it. You havepractically no idea how to carry out the proof asked of you in that part. Instead of spending time writingpotentially meritless work for us to evaluate, you choose to sign your initials in the waiver box, and get 10%of the credit, which is 1 point. This saves you time.

Be aware that for each waiver box that you sign with your initials, you are, in effect, declaring the following:

By signing my initials in the box to the left, I hereby waive my right to tackle thispart of the exam. In exchange for my waiver, you will grant me 10% of the creditfor this part of the problem. I acknowledge that nothing I write elsewhere for thispart will be graded, and that there are no exceptions. I acknowledge, too, that thesubject matter (including any result) addressed by this part may be needed in otherparts of the exam, and that I may use, without penalty, elsewhere on the exam anyresult needed from this part.

If you choose, or otherwise fail to, sign your initials in a waiver box, you might lose anywhere from zero tothe maximum number of points for that part. If you do sign the waiver box for a particular part, you will beguaranteed the 10% baseline credit for that part; in that case, no work that you show in the blank area forthat part will be evaluated. No exceptions!

EECS 16A, Spring 2017, Final Exam 2

Page 3: EECS 16A Designing Information Devices and …PRINTyour name and student ID: Waiver Option At our discretion, we have provided you with the option to waive (or opt out of) one or more

PRINT your name and student ID:

This page has been left intentionally blank. No work written here will be graded.

EECS 16A, Spring 2017, Final Exam 3

Page 4: EECS 16A Designing Information Devices and …PRINTyour name and student ID: Waiver Option At our discretion, we have provided you with the option to waive (or opt out of) one or more

PRINT your name and student ID:

3. (40 Points) Are you sleepy? Let’s see what your brainwaves say ...

In this problem, you will design circuitry to record and analyze your brain signals. The technique, knownas electroencephalogram (EEG), detects tiny voltage signals in your brain using small, flat metal discs(electrodes) attached to your scalp. Since you are designing a circuit for detecting drowsiness, you placedtwo electrodes at the front of the skull (locations 1 and 2 with potentials U1 and U2).

(a) (10 Points) For the circuit block given below, express V1,2 as a function of R4, R5, U1, and U2. Assumethat the op-amp supplies are ±1V, and R1 = R2 and R3 = R4.

Solutions:Left op amp is used as an inverter block:

Vx =�R2

R1U1

Right op amp is used as an adder block:

V1,2 =�R5

R4Vx +

�R5

R3U2

=�R5

R4

�R2

R1U1 +

�R5

R3U2

=R5

R4(U1 �U2) setting R1 = R2 and R3 = R4

EECS 16A, Spring 2017, Final Exam 4

Page 5: EECS 16A Designing Information Devices and …PRINTyour name and student ID: Waiver Option At our discretion, we have provided you with the option to waive (or opt out of) one or more

PRINT your name and student ID:

(b) (5 Points) Locations 1 and 2 are typical EEG electrode placement locations and provide U1 �U2 =10µV oscillating signal with 10Hz frequency (Fig. Before Amplification). Since this is a tiny signal,you need to amplify it. Use the circuit in part (a) to amplify the signal such that V1,2 becomes a 10mVoscillating signal (Fig. After Amplification). Recall that 1mV = 1000µV. If R1 = R2 = R3 = R4 =100W, find R5.

Solutions:Gain = 1000. R5

R4= 1000. Using R4 = 100W, R5 = 100kW.

EECS 16A, Spring 2017, Final Exam 5

Page 6: EECS 16A Designing Information Devices and …PRINTyour name and student ID: Waiver Option At our discretion, we have provided you with the option to waive (or opt out of) one or more

PRINT your name and student ID:

(c) (15 Points) For redundancy you added three additional sets of electrodes at locations 3 to 8, whichbehave similar to the previous pair at locations 1 and 2. Utilizing the circuit from part (a) now youhave four measurements:

V1,2 = Gain · (U1 �U2)

V3,4 = Gain · (U3 �U4)

V5,6 = Gain · (U5 �U6)

V7,8 = Gain · (U7 �U8)

Remember, you already amplified the signal to 10mV level in part (b) (Fig. Before Averaging andAmplification). With this amplification the signal now comes up to 250mV level (Fig. After Averagingand Amplification).Now draw out a circuit that takes average of all four signals and amplifies the average by a factorof 25.

Vavg,scaled = 25 · V1,2 +V3,4 +V5,6 +V7,8

4Use one op amp and six resistors for the circuit. Label all circuit elements. Provide the ratio ofthe resistors, e.g. R1 : R2 : R3 : R4 : R5 : R6

EECS 16A, Spring 2017, Final Exam 6

Page 7: EECS 16A Designing Information Devices and …PRINTyour name and student ID: Waiver Option At our discretion, we have provided you with the option to waive (or opt out of) one or more

PRINT your name and student ID:

Solutions:

+

OA

+1V

�1V

Vavg,scaled

R5R6

R1V1,2

R2V3,4

R3V5,6

R4V7,8

R1 �R4 need to be the same. Then, 1+ R5R6

= 25, R5 : R6 = 24 : 1.

Common mistakes:1. Using multiple op-amps, or more than 6 resistors. The question specifically says that you are allowedto use only 1 op-amp. A maximum of 5 points were awarded in this case for the rubric item "a) AddingV1,2,V3,4,V5,6,V7,8 (both inverting and non-inverting config)." In most cases, this was assigned if thevoltages were correctly connected to an inverting op-amp, and 2 inverting op-amps were used. In veryrare cases, if one or two extra resistors were used, we gave more points.

2. Writing the ratio in an expression form, as opposed to an equation form. The expression R1 : R2 : R3 :R4 : 24R5 : R6 has no meaning. It should be written as R1 : R2 : R3 : R4 : R5 : R6 = 1 : 1 : 1 : 1 : 24 : 1. Wewere lenient about this, and only deducted 2 points in the event that the ratio between R5 and R6 wasambiguous but with correct values.

3. Using the gain for non-inverting op-amp to be R2/R1 instead of 1+R2/R1

4. Not realizing that by connecting 4 voltages with resistors to the input, the end node will have avoltage that is equal to V1,2,V3,4,V5,6,V7,8

4

5. Connecting multiple voltage inputs directly onto a node (without a resistor).

6. Flipping the value for the non-inverting op-amp gain. The gain is 1 + R2/R1 where R2 is theresistor connected directly to the output, and R1 is the resistor connected directly to ground

7. Flipping the polarity on the op-amp. Since flipping the polarity means that the op-amp is notin non-inverting configuration, points were not awarded for being in non-inverting configuration or forthe resistor ratios for R5 : R6 (even if the ratios were correct).

EECS 16A, Spring 2017, Final Exam 7

Page 8: EECS 16A Designing Information Devices and …PRINTyour name and student ID: Waiver Option At our discretion, we have provided you with the option to waive (or opt out of) one or more

PRINT your name and student ID:

(d) (10 Points) One of the artifacts of drowsiness is slow rolling of the eyes, which produces an EEG asshown in the graph marked Sleepy. Here the amplitude is 3 times larger than the Awake signal. Nowthat you have a robust signal acquisition system in place, you can detect if the subject is drowsy usingthe EEG signal. Draw out a circuit to generate a positive (+1V) output if Sleepy and a negative (�1V)output if Awake.You don’t need to output a positive signal the whole time, outputting a couple of times in a second willsuffice. Use Vavg,scaled , a reference voltage Vre f , and a single op amp to implement your circuit. What’sthe range of Vre f to distinguish between Awake and Sleepy?

Solutions:

+

OC

+1V

�1V

Vre f

Vavg,scaled

Vout

The comparator uses non-inverting configuration with 375mV > Vre f > 125mV. If the average goesover max(Awake) then comparator hits the positive rail, i.e. 1V at the output, else goes to �1V. Any375mV >Vre f > 125mV will do the job.

EECS 16A, Spring 2017, Final Exam 8

Page 9: EECS 16A Designing Information Devices and …PRINTyour name and student ID: Waiver Option At our discretion, we have provided you with the option to waive (or opt out of) one or more

PRINT your name and student ID:

This page has been left intentionally blank. No work written here will be graded.

EECS 16A, Spring 2017, Final Exam 9

Page 10: EECS 16A Designing Information Devices and …PRINTyour name and student ID: Waiver Option At our discretion, we have provided you with the option to waive (or opt out of) one or more

PRINT your name and student ID:

4. (40 Points) Brain-on-a-Chip with 16A Neurons

Neurelic Inc, is a hot new startup building chips that emulate some of the brain functions (for exampleassociative memory). As an intern, fresh out of 16A you get to implement the neural network circuits onthis chip. The neural network consists of neurons that consist of the following blocks shown on the figurebelow.

+...

Vin1

Vin2

VinM

w1

w2

w3

v f(v)Vout

Input signals Vini are voltages from other neurons, which are multiplied by a constant weight wi in eachsynapse and summed in the neuron. Each neuron also contains a nonlinear function (called a sigmoid)which is defined as

f (v) =

8><

>:

�1, v �1v, �1 < v < 1+1, v �+1

where v is the internal neuron voltage after the synapse summer and f (v) is the neuron voltage output.

(a) Your mentor suggests that you warm-up first by analyzing the circuit below to use as neuron with asingle synapse. f1 and f2 are non-overlapping clock phases that control the circuit switches.

Vin

f1

f2

C1

f1

f2

f1

+

�Vout

C2

+

EECS 16A, Spring 2017, Final Exam 10

Page 11: EECS 16A Designing Information Devices and …PRINTyour name and student ID: Waiver Option At our discretion, we have provided you with the option to waive (or opt out of) one or more

PRINT your name and student ID:

i. (5 Points) Draw an equivalent circuit during f1 and write an expression for Vout as a function ofVin, C1 and C2.

Solutions: Vout = 0

Vin

C1

+

�Vout

C2

+

ii. (5 Points) Draw an equivalent circuit during f2 and write an expression for Vout as a function ofVin, C1 and C2.

Solutions:

VinC1 =VoutC2

Vout =C1

C2Vin

Vin

C1

+

�Vout

C2

+

EECS 16A, Spring 2017, Final Exam 11

Page 12: EECS 16A Designing Information Devices and …PRINTyour name and student ID: Waiver Option At our discretion, we have provided you with the option to waive (or opt out of) one or more

PRINT your name and student ID:

(b) (5 Points) Write an equation for Vout during f2 as a function of Vin for C1 = C2 and op-amp supplyvoltages of ±1V. Briefly explain how this circuit implements the sigmoid function.

Solutions: From part (a)(ii) we know Vout =C1C2

Vin.Setting C1 = C2, we find Vout = Vin. Because ofthe rails of the op amp, once the Vin exceeds 1V, the output will be 1V. From this, we see the circuitimplements the sigmoid function:

Vout =

8><

>:

�1, Vin �1Vin, �1 <Vin < 1+1, Vin �+1

(c) Then, your mentor shows you the following neuron circuit, which can realize both positive and negativesynapse weight and create Vout = w1Vin in f2.

Vin

f1

f2

C1

f1

f2

f1

+

�Vout

C2

f2C3

f1

+

EECS 16A, Spring 2017, Final Exam 12

Page 13: EECS 16A Designing Information Devices and …PRINTyour name and student ID: Waiver Option At our discretion, we have provided you with the option to waive (or opt out of) one or more

PRINT your name and student ID:

i. (5 Points) Draw an equivalent circuit during f1 and write an expression for Vout as a function ofVin, C1, C2, and C3.

Solutions:In phase 1, Vout = 0.

Vin

C1

+

�Vout

C2

C3

+

ii. (5 points) Draw an equivalent circuit during f2 and write an expression for Vout as a function ofVin, C1, C2, and C3.

Solutions:In phase 2, Vout =

C1�C3C2

Vin.

Vin

C1

+

�Vout

C2

C3

+

EECS 16A, Spring 2017, Final Exam 13

Page 14: EECS 16A Designing Information Devices and …PRINTyour name and student ID: Waiver Option At our discretion, we have provided you with the option to waive (or opt out of) one or more

PRINT your name and student ID:

(d) (15 Points) Now it is your turn to implement a neuron that realizes the following function Vout =w1Vin1 +w2Vin2 . Draw the circuit, such that w1 = 1/2 and w2 = �1/4. Label all circuit elementsappropriately. You should use a single op-amp and as many capacitors and switches as you need. Allcapacitors must be of size Cunit . Assume that the op-amp power supplies are ±1V (no need to drawthem in the circuit). The circuit should operate in 2 phases, with Vout = w1Vin1 +w2Vin2 in the secondphase (f2), and reset in f1.

Solutions:

Vin1

f1

f2 f1

f2

f1

+

�Vout

Vin2

f2

f1

+

EECS 16A, Spring 2017, Final Exam 14

Page 15: EECS 16A Designing Information Devices and …PRINTyour name and student ID: Waiver Option At our discretion, we have provided you with the option to waive (or opt out of) one or more

PRINT your name and student ID:

5. (40 Points) Lateration with Linear Systems of Equations

In the lab, we used a microphone and several transmitters to find the microphone position. In this problem,we’ll set up the system of equations you need in order to uniquely determine the microphone position. Wewill use 5 beacons for the setup on this exam.

All beacons transmit their unique signal at time 0 that each arrive at the microphone at different time Tm

depending on the microphone position. Let tm = Tm �T0 be the time difference of arrival between beaconm and beacon 0.

(a) (8 Points) Using the fact that Rm = vTm, where Rm is the distance of the microphone from beacon mand v is the speed of the audio signals in air, show that we can write:

0 = vtm +2R0 +R2

0�R2m

vtm(1)

where tm is the time difference of arrival for beacon 0 and beacon m.

By my initials in the box, I waive this part and accept 10% of the credit.Solutions: We can write:

vtm = Rm �R0

Next, we re-arrange and square to get:R2

m = (vtm +R0)2

R2m = (vtm)

2 +R20 +2(vtm)R0

0 = (vtm)2 +2(vtm)R0 +R2

0 �R2m

0 = vtm +2R0 +R2

0 �R2m

vtm

QED

EECS 16A, Spring 2017, Final Exam 15

Page 16: EECS 16A Designing Information Devices and …PRINTyour name and student ID: Waiver Option At our discretion, we have provided you with the option to waive (or opt out of) one or more

PRINT your name and student ID:

(b) (8 Points) We introduce coordinates based on beacon 0. Beacon 0 is located at (0,0), beacon mis located at known positions (xm,ym). We try to find the microphone position in the sensor plane,given by (x,y). We see that Rm, the distance of the microphone from beacon m, is a function of themicrophone position:

Rm =p(x� xm)2 +(y� ym)2 (2)

By plugging the relationship from eq. 2 into eq. 1 above for R0, R1, and R2, we can write a system ofequations with two equations and two unknowns:

0 = vt1 +2p

x2 + y2 + 2x1x�x21+2y1y�y2

1vt1

(3)

0 = vt2 +2p

x2 + y2 + 2x2x�x22+2y2y�y2

2vt2

(4)

What is the minimum number of beacons you can use to create this system of equations? Justify whyyou cannot use linear algebra methods to solve the system of equations in this part.

Solutions: In order to create this system of equations, we would need 3 beacons: beacon 0 and 1to generate coefficients in the first equation, and beacon 0 and 2 to generate coefficients in the secondequation.As written, the system of equations requires us to evaluate the square root of the sum of the squares of ourunknowns. This operation cannot be expressed by in a linear form. In effect,

px2 + y2

cannot be written askxx+ kyy+ kc

This needs to be true in order to write a matrix equation, A~x =~b where~x = [x,y]T .

EECS 16A, Spring 2017, Final Exam 16

Page 17: EECS 16A Designing Information Devices and …PRINTyour name and student ID: Waiver Option At our discretion, we have provided you with the option to waive (or opt out of) one or more

PRINT your name and student ID:

(c) (8 Points) We can use extra information to make the system linear. Subtract Eq. 3 from Eq. 4. This isa linear equation, and should have the form of

ax+by+ c = 0 (5)

How many linear equations of this form can we construct with 3 beacons, and how many unknownsdo we have? Can you use this system to find a unique solution for (x,y) using linear algebra methods?Why or why not?

By my initials in the box, I waive this part and accept 10% of the credit.Solutions: We can start with the equations given in the previous parts.

0 = vt1 +2p

x2 + y2 +2x1x� x2

1 +2y1y� y21

vt1

0 = vt2 +2p

x2 + y2 +2x2x� x2

2 +2y2y� y22

vt2

0 = vt2 � vt1 +2p

x2 + y2 �2p

x2 + y2 +2x2x� x2

2 +2y2y� y22

vt2� 2x1x� x2

1 +2y1y� y21

vt1

a =2x2

vt2� 2x1

vt1

b =2y2

vt2� 2y1

vt1

c = vt2 � vt1 +x2

1 + y21

vt1� x2

2 + y22

vt2

With three beacons, we can only write one linear equation, but we have two unknowns.

ax+by+ c = 0

Therefore, we cannot find a unique solution for x and y, since all solutions along the line described by thisequation are valid.

EECS 16A, Spring 2017, Final Exam 17

Page 18: EECS 16A Designing Information Devices and …PRINTyour name and student ID: Waiver Option At our discretion, we have provided you with the option to waive (or opt out of) one or more

PRINT your name and student ID:

(d) (8 Points) For our microphone lateration system, we can use 5 beacons. Given 5 beacons, how manyunique equations of the form ax + by + c = 0 can you write? (You do not need to write out theexpressions for a, b, and c.) Write a matrix equation, A~x =~b, in terms of an, bn, and cn, where

the subscript n corresponds to one of the unique equations. (Also, use: ~x =

xy

�.)

Solutions: With 5 total beacons, we can write 3 unique sets of coefficients, an, bn, and cn.Therefore, setup of A and~b will be:

A =

2

4a1 b1a2 b2a3 b3

3

5

~b =

2

4�c1�c2�c3

3

5

Written out, 2

4a1 b1a2 b2a3 b3

3

5

xy

�=~b =

2

4�c1�c2�c3

3

5

EECS 16A, Spring 2017, Final Exam 18

Page 19: EECS 16A Designing Information Devices and …PRINTyour name and student ID: Waiver Option At our discretion, we have provided you with the option to waive (or opt out of) one or more

PRINT your name and student ID:

(e) (8 Points) There is always some error in every measurement. In the lateration case, the biggest erroris probably in measuring the time of arrival for different beacons. This error can result in a situationin which A~x =~b has no solutions. Find a matrix expression for ~̂x, an estimate for ~x that minimizeskA~x�~bk.

Solutions: In general, if we have A~x=~b with no solutions for~x, we can find a least-squares minimizationsolution by multiplying both sides of the matrix equation by AT from the left:

AT A~̂x = AT~b

~̂x = (AT A)�1AT~b

EECS 16A, Spring 2017, Final Exam 19

Page 20: EECS 16A Designing Information Devices and …PRINTyour name and student ID: Waiver Option At our discretion, we have provided you with the option to waive (or opt out of) one or more

PRINT your name and student ID:

6. (40 Points) Constrained Least-Squares Optimization

In this problem, you’ll go through a process of guided discovery to solve the following optimization problem:

Consider a matrix A 2RM⇥N , of full column rank, where M > N. Determine a unitvector~x that minimizes kA~xk, where k ·k denotes the 2-norm—that is,

kA~xk2 , hA~x,A~xi= (A~x)T A~x =~xT AT A~x.

This is equivalent to solving the following optimization problem:

Determine ~̂x = argmin~x

kA~xk2 subject to the constraint k~xk2 = 1.

This task may seem like solving a standard least-squares problem A~x =~b, where ~b =~0, but it isn’t. Animportant distinction is that in our problem, ~x =~0 is not a valid solution, because the zero vector does nothave unit length. Our optimization problem is a least squares problem with a constraint—hence the termConstrained Least-Squares Optimization. The constraint is that the vector ~x must lie on the unit sphere inRN . You’ll tackle this problem in a methodical, step-by-step fashion.

Let (l1,~v1), . . . ,(lN ,~vN) denote the eigenpairs (i.e., eigenvalue/eigenvector pairs) of AT A. Assume that theeigenvalues are all real and indexed in an ascending fashion—that is,

l1 · · · lN .

Assume, too, that each eigenvector has been normalized to have unit length—that is, k~vkk = 1 for all k 2{1, . . . ,N}.

(a) (10 Points) Show that 0 < l1.

By my initials in the box, I waive this part and accept 10% of the credit.Solutions:Consider kA~vk2 for eigenvector~v, with eigenvalue l .

kA~vk2 =~vT AT A~v=~vT l~v

l =kA~vk2

k~vk2

So l > 0 since norms are positive if~v 6=~0. Since A is full rank, the numerator is never 0 unless~v =~0.

EECS 16A, Spring 2017, Final Exam 20

Page 21: EECS 16A Designing Information Devices and …PRINTyour name and student ID: Waiver Option At our discretion, we have provided you with the option to waive (or opt out of) one or more

PRINT your name and student ID:

(b) (10 Points) Consider two eigenpairs (lk,~vk) and (l`,~v`) corresponding to distinct eigenvalues ofAT A—that is, lk 6= l`. Prove that the corresponding eigenvectors~vk and~v` are orthogonal: ~vk ?~v`.To help you get started, consider the two equations

AT A~vk = lk~vk (6)

and

~vT` AT A = l`~vT

` . (7)

Premultiply Equation (6) by ~vT` , postmultiply Equation (7) by ~vk, compare the two, and explain how

one may then infer that~vk and~v` are orthogonal.

By my initials in the box, I waive this part and accept 10% of the credit.Solutions: Following the hint:

~vT` AT A~vk =~vT

` lk~vk

~vT` AT A~vk = l`~vT

`~vk

We see the two expressions on the left are equal, so set the two expressions on the right equal to eachother:

lk~vT` ~vk = l`~vT

`~vk

If lk 6= ll , then the only possible solution is that~vT`~vk = 0, which means~v` and~vk are orthogonal.

EECS 16A, Spring 2017, Final Exam 21

Page 22: EECS 16A Designing Information Devices and …PRINTyour name and student ID: Waiver Option At our discretion, we have provided you with the option to waive (or opt out of) one or more

PRINT your name and student ID:

(c) (10 Points) Since the N eigenvectors of AT A are mutually orthogonal—and each has unit length—theyform an orthonormal basis in RN . This means that we can express an arbitrary vector~x 2RN as a linearcombination of the eigenvectors~v1, . . . ,~vN , as follows:

~x =N

Ân=1

an~vn.

i. (5 Points) Determine the nth coefficient an in terms of ~x and one or more of the eigenvectors~v1, . . . ,~vN .

Solutions: Since~vi are orthogonal, the coefficient ai is the projection of~x on to~vi.Since~vi are all unit vectors, the projection is simply the inner product.

ai = h~x,~vii=~xT~vi

ii. (5 Points) Suppose~x is a unit-length vector (i.e., a unit vector) in RN . Show that

N

Ân=1

a2n = 1.

Solutions: Consider k~xk2 = 1.

k~xk2 =~xT~x

= (N

Âi=1

ai~vi)T (

N

Âj=1

a j~v j) = (N

Âi=1

ai~vT

i)(N

Âj=1

a j~v j)

=N

Âi=1

N

Âj=1

ai a j~vT

i~v j

Now since the vi are orthogonal we know: ~vTi ~v j =

(0, i 6= j1, i = j

So k~xk2 = ÂNn=1 a2

n = 1.

EECS 16A, Spring 2017, Final Exam 22

Page 23: EECS 16A Designing Information Devices and …PRINTyour name and student ID: Waiver Option At our discretion, we have provided you with the option to waive (or opt out of) one or more

PRINT your name and student ID:

(d) (10 Points) Now you’re well-positioned to tackle the grand challenge of this problem—determine theunit vector~x that minimizes kA~xk.Note that the task is the same as finding a unit vector~x that minimizes kA~xk2.Express kA~xk2 in terms of {a1,a2 . . .aN}, {l1,l2 . . .lN}, and {~v1,~v2 . . .~vN}, and find an expressionfor ~̂x such that kA~xk2 is minimized. You may not use any tool from calculus to solve this problem—soavoid differentiation of any flavor.For the optimal vector ~̂x that you determine—that is, the vector

~̂x = argmin~x

kA~xk2 subject to the constraint k~xk2 = 1,

determine a simple, closed-form expression for the minimum value

mink~xk=1

kA~xk= kA~̂xk.

By my initials in the box, I waive this part and accept 10% of the credit.Solutions: Note kA~xk2 = xT AT Ax. We express~x in terms of ~vi (the eigenvalues of AT A) and expand.

AT A~x = AT AN

Ân=1

an~vn

=N

Ân=1

an AT A~vn

=N

Ân=1

an ln~vn

Now:

xT AT Ax =~xN

Ân=1

an ln~vn

=N

Ân=1

a2n ln

To minimize, we pick the entire weight of a of the smallest l , i.e. we pick~x to be the eigenvector~vi withthe smallest eigenvalue, and the minimum value is li.

EECS 16A, Spring 2017, Final Exam 23

Page 24: EECS 16A Designing Information Devices and …PRINTyour name and student ID: Waiver Option At our discretion, we have provided you with the option to waive (or opt out of) one or more

PRINT your name and student ID:

7. (20 Points) Tunnel DiodesIntroduced by Leo Esaki in 1958, a tunnel diode is an electronic circuit element whose current-voltage (I-V )curve in a particular circuit (not shown) looks like the one shown in Figure (a) below—an adaptation ofFigure 7.7 on p. 200 of the book It’s a Nonlinear World, by Richard Enns, Springer, 2011. Note that in theplot, the current I can be thought of as a function of the voltage V . For the purposes of this problem, youneed not know anything about diodes.

V1 V2

I1

I2

I

V

(a) I-V Curve (b) Re-centered I-V Curve

As a well-trained UC Berkeley engineer, you decide to recenter the I-V curve to the operating point (V0, I0).That is, you define new variables i and v such that:

i = I � I0 and v =V �V0,

This leads to the i-v curve shown in Figure (b). You’re charged with the task of determining the parametersthat characterize the tunnel diode. In particular, you learn that:

• the diode can be characterized by the cubic polynomial

i =�a v+b v3,

where a,b > 0; and• if you make M voltage current measurements (vm, im) where m = 1,2, . . . ,M, you can then estimate

the unknown parameters a and b .

For simplicity, and without loss of generality, assume throughout this problem that the vector of voltagemeasurements 2

64v1...

vM

3

75

has unit length. That is,M

Âm=1

v2m = 1.

You make all the necessary measurements, and set up a set of M linear equations in two unknowns, asfollows: 2

64�v1 v3

1...

...�vM v3

M

3

75

| {z }A

ab

|{z}~x

=

2

64i1...

iM

3

75

| {z }~b

,

EECS 16A, Spring 2017, Final Exam 24

Page 25: EECS 16A Designing Information Devices and …PRINTyour name and student ID: Waiver Option At our discretion, we have provided you with the option to waive (or opt out of) one or more

PRINT your name and student ID:The columns of the matrix A,

a1 =

2

64�v1

...�vM

3

75 and a2 =

2

64v3

1...

v3M

3

75 ,

are not mutually orthogonal. Orthogonalize them, and determine a QR decomposition of A. Take as yourfirst orthonormal vector q1 the first column of A, which is already of unit length. Determine completely thesecond orthonormal vector q2 and the 2⇥2 upper-triangular matrix R in the decomposition A = QR.

By my initials in the box, I waive this part and accept 10% of the credit.Solutions: Using the Gram-Schmidt process:

~v1 =~a1

~q1 =~v1

k~v1k=

~a1

1= a1

~v2 = a2 �h~a1,~a2ih~a1,~a1i

~a1 =~a2 �h~a1,~a2i~a1 = ~a2 � (�M

Âi=1

v4i )~a1

~q2 =v2

kv2k

The vectors~q1 and~u2 form the columns of the matrix Q. We can find the matrix R by finding QT A.

R = QT A

R =

1 ~qT

1~a20 ~qT

2~a2

EECS 16A, Spring 2017, Final Exam 25


Recommended