Essential Mathematics for Data Scientists Assessment 3: Microchip voltage You are now asked to write some code of your own that will achieve the goals laid out below. The purpose of this exercise is...

1 answer below »
Math lab assignment. Files Attached

Essential Mathematics for Data Scientists Assessment 3: Microchip voltage You are now asked to write some code of your own that will achieve the goals laid out below. The purpose of this exercise is two-fold. It will a) test your skills in designing and implementing a MATLAB program, and b) it should demonstrate some features of ill-conditioned problems. The exercise is to track a power surge in a microchip that is modelled by a linear system of equations. You will ‘evolve’ this system in time. ‘Evolve’ here means to simulate the voltage in the microchip by starting from an initial voltage distribution and then calculating the voltage at later points in time. What follows is a series of steps in the exercise that you should work through and accomplish. Interspersed through the steps are some goals, which are outlined with a box. The goals are the items that you must achieve for the assessment to be complete and receive the total mark. When you submit your completed assessment, you should provide: • The full code • A summary that includes each of the goals, which can be done through: o A word document: include a description of each answer with its corresponding goal number and each plot as an image in the document; or o A series of text files and image files: each one of these should be labelled ‘Goal_x.txt’ or ‘Goal_x.png’ where ‘x’ is the goal number. Steps We need to investigate a complex microchip as a circuit with many different components. Although circuits are usually quite constant, there are many fluctuations for unusual inputs that can have a detrimental effect – this can be referred to as ‘blowing up’ the microchip. Imagine that we have done a long-winded analysis that allows us to write down how the voltage in the circuit changes with time, as a set of equations: ????+1 = A???? where ???? is a vector of voltages at millisecond ??. The elements of the vector correspond to different important locations in the chip, of which there are 21. The first of these has some obvious meaning: it is the input voltage. The remaining 20 locations are certain junctions in the microchip. The initial condition we shall specify is ??0 = [1,0,0,0, … ]??. That is, at the ‘0th’ millisecond, the voltage is 1 at the input and 0 everywhere else. 1. Load the matrix A into MATLAB. This matrix is provided in the file ‘voltage_evolve.csv’. Keep in mind that you must create a script that will perform this, so you should use ‘csvread’ instead of the GUI options. 2. Using the initial condition described above, calculate the voltages of the circuit at all locations for all milliseconds up to the 120th millisecond. 3. GOAL 1: With this information calculated, create a plot of the voltage at the first 5 locations for 0 <>< 120.="" 4.="" goal="" 2:="" save="" a="" text="" file="" with="" all="" 21="" voltages="" corresponding="" to="" the="" 120th="" millisecond="" after="" the="" voltage="" spike="" (??120).="" 5.="" now="" calculate="" the="" eigenvalues="" and="" eigenvectors="" of="" the="" matrix.="" 6.="" identify="" the="" largest="" eigenvalue.="" you="" should="" find="" that="" this="" eigenvalue="" is="" one="" or="" very="" close="" to="" 1.="" don’t="" forget="" that="" -ve="" numbers="" are="" ‘smaller’="" than="" +ve="" numbers.="" e.g.="" −10="">< −5="">< +1. 7. goal 3: compare the values of the eigenvector that corresponds to the largest eigenvalue, with the result from the time evolution. what is the same? 8. now let’s pretend that this is not a simulation, but that we are measuring a set of voltages at the 120th millisecond after a voltage spike into a real circuit. we would like to use this measurement to simulate a ‘backtrack’ to earlier times. this would be useful for us to identify what caused a potential problem in a circuit. to do this, we should ‘invert’ the equation to obtain: ??�?? = a−1??�??+1 you can obtain the matrix a−1 in matlab by running the command ‘inv(a)’. we write this equation with tildes (the ‘~’ on the ??s) to indicate that the result has been calculated a different way. 9. using a−1, work backwards from ??�120 = ??120 that you found in step 2 to obtain the previous 22 values. that is, backtrack until the vector ??�98. 10. goal 4: on a new figure, plot the values of ??�?? as circles, on top of the values of ???? as lines. 11. goal 5: comment on the similarities and differences between the normal calculation forwards in time for the voltages and the backtracked values. 12. you should see that there is a problem – backtracking just does not work very well. this is because the problem is ill-posed. 13. goal 6: calculate the condition numbers for a and a120. 14. goal 7: calculate the largest eigenvalue for a and the largest eigenvalue for a−1. comment on the difference. 15. goal 8: write out the values of ???? and ??�?? to a file called ‘voltages.csv’. essential mathematics for data scientists assessment 3: microchip voltage steps assessment 3 – week 2 marking scheme for students – microchip voltage you are required to write a master program: master.m. 25 marks in total are allocated to programming (comments, structure and use of commands) and answering each goal set out in the assignment sheet. see below for further details master.m • program is structured correctly o programming (commands, logic) 2 marks o comments (introduction/description, throughout code) 2 marks • load matrix a from voltage_evolve.csv – must use csvread command 1 mark • set ?0 = [1,0,0, … ] 1 mark • calculate voltages for 120 miliseconds: ?1 up to ?120 o loop (probably “for” loop) 1 mark o vectors 1 mark • goal_1: figure o voltages at first 5 locations (first 5 elements of each vector ?0 to ?120) o 2 marks – 1 for 5 lines, 1 for actual data • goal_2: text file o text file of ?120: voltages at 21 locations at the 120 th millisecond o 1 mark • calculate eigenvalues and eigenvectors of a (“eigs” command) 1 mark • calculate largest eigenvalue (“sort” or “max” commands) 1 mark • goal_3: text file or figure o comparison of eigenvector corresponding to highest eigenvalue with ?120 o explanation of what is the same? o 2 marks – 1 for values (text or figure), 1 for explanation • calculate inverse matrix: (“inv(a)” command) 1 mark • calculate ?�̃� = ? −1??+1 for n = 120 down to 98 o loop (“for” loop – check index reduces from 120 to 99) 1 mark o calculation of ?�̃� 1 mark • goal_4: figure o figure: ?�̃� as circles on top of ?? as lines o 1 mark • goal_5: text file o comment on similarities and differences for forwards and backwards voltages o 1 mark • goal_6: text file o calculate condition numbers for ? and ?120 o 2 marks – 1 for each condition number • goal_7: text file o calculate the largest eigenvalue for a and the largest eigenvalue for a−1. o comment on the difference. o 2 marks – 1 for values, 1 for comments • goal_8: text file o write out the values of ?? and ?�̃� to a file called “voltages.csv”. o 1 mark 2.3075,6.6241,0.54198,0.23946,-1.6831,-0.81546,-0.021415,-0.070931,1.8112,-3.9547,-0.537,-1.2601,-0.45822,0.89896,0.055165,-0.51583,-1.7292,-0.38859,0.20601,1.9892,-3.5466 0.94922,3.645,0.7951,-0.6818,-0.10908,0.074177,-1.5524,0.71394,1.574,-1.7361,0.73089,0.086439,-1.1146,-0.81163,0.91258,-0.36391,0.84067,-0.84678,-0.86084,-0.57968,-1.6144 1.5381,5.766,0.89055,0.49557,-2.0273,-0.97886,0.31267,-0.91812,1.7422,-3.814,-0.38336,-1.1917,-0.12094,0.94814,0.71278,-0.18627,-2.3286,-0.31053,0.81222,1.6992,-3.1959 1.1784,3.8817,-0.2178,0.28577,-1.5238,-0.31408,0.39291,-0.8361,0.45764,-1.2249,-0.33916,0.75395,-1.556,0.93462,-1.5326,-0.42299,-1.2854,-0.39607,1.1114,1.8418,-1.3676 1.6189,1.9551,0.98135,0.65055,-1.6798,-1.4729,0.78604,0.25028,0.51972,-3.4448,-1.9117,-1.5433,2.343,2.238,0.32918,-1.0428,-3.4091,0.80349,1.2089,2.5034,-2.3026 1.3212,4.6798,1.3666,-0.79431,-0.15547,-0.08487,-1.551,1.317,2.4358,-3.0209,0.33916,-0.96989,-0.67578,-0.52957,1.8649,-0.852,0.17055,-0.60404,-1.2559,-0.60239,-2.7201 1.0478,4.0053,0.036986,0.16406,-1.4067,-0.81556,0.041945,-0.59211,0.85835,-2.1162,0.29944,-0.21629,-0.8425,1.0156,0.033523,-0.30929,-0.94709,-0.45731,0.84959,0.9363,-1.6336 0.45994,6.6138,-0.68234,-0.49239,-1.1974,0.35338,-1.0765,-0.95234,1.091,-0.18716,2.036,2.4055,-4.5239,-0.69328,-1.6006,-0.44287,1.6231,-1.6934,0.48791,0.029077,-1.0176 1.2278,3.6272,0.0069018,0.37731,-1.6577,-0.78601,0.44319,-0.73956,0.84317,-2.3484,-0.12535,-0.31746,-0.33222,1.5409,-0.16775,-0.42852,-1.9098,-0.22813,1.0298,1.8522,-2.1353 1.3987,2.3952,1.3717,-0.4153,-0.39528,-0.4571,-1.1134,0.83683,1.6811,-2.9399,-0.18479,-1.0655,0.9843,0.12943,1.5648,-0.50895,-0.9196,-0.20108,-0.39746,0.16341,-2.3257 1.3403,4.9047,0.17378,0.3254,-1.7224,-0.95447,0.52932,-0.3722,1.0722,-2.9761,-0.31935,-0.75606,-0.32045,1.4994,-0.22392,-0.65013,-2.0799,-0.22827,1.0911,1.8356,-2.5088 1.116,3.6141,0.60636,0.69308,-1.3422,-1.1657,0.0075969,-0.36212,0.83474,-2.8528,-0.53197,-0.63057,0.44625,1.2529,0.42696,-0.39028,-2.162,0.15182,1.0861,1.311,-2.2253 1.4151,1.5924,1.529,-0.26157,-0.16363,-0.56848,-0.88658,1.4304,1.5151,-3.1864,-0.58161,-1.9036,1 +1.="" 7.="" goal="" 3:="" compare="" the="" values="" of="" the="" eigenvector="" that="" corresponds="" to="" the="" largest="" eigenvalue,="" with="" the="" result="" from="" the="" time="" evolution.="" what="" is="" the="" same?="" 8.="" now="" let’s="" pretend="" that="" this="" is="" not="" a="" simulation,="" but="" that="" we="" are="" measuring="" a="" set="" of="" voltages="" at="" the="" 120th="" millisecond="" after="" a="" voltage="" spike="" into="" a="" real="" circuit.="" we="" would="" like="" to="" use="" this="" measurement="" to="" simulate="" a="" ‘backtrack’="" to="" earlier="" times.="" this="" would="" be="" useful="" for="" us="" to="" identify="" what="" caused="" a="" potential="" problem="" in="" a="" circuit.="" to="" do="" this,="" we="" should="" ‘invert’="" the="" equation="" to="" obtain:="" �??="A−1??�??+1" you="" can="" obtain="" the="" matrix="" a−1="" in="" matlab="" by="" running="" the="" command="" ‘inv(a)’.="" we="" write="" this="" equation="" with="" tildes="" (the="" ‘~’="" on="" the="" s)="" to="" indicate="" that="" the="" result="" has="" been="" calculated="" a="" different="" way.="" 9.="" using="" a−1,="" work="" backwards="" from="" �120="??120" that="" you="" found="" in="" step="" 2="" to="" obtain="" the="" previous="" 22="" values.="" that="" is,="" backtrack="" until="" the="" vector="" �98.="" 10.="" goal="" 4:="" on="" a="" new="" figure,="" plot="" the="" values="" of="" �??="" as="" circles,="" on="" top="" of="" the="" values="" of="" as="" lines.="" 11.="" goal="" 5:="" comment="" on="" the="" similarities="" and="" differences="" between="" the="" normal="" calculation="" forwards="" in="" time="" for="" the="" voltages="" and="" the="" backtracked="" values.="" 12.="" you="" should="" see="" that="" there="" is="" a="" problem="" –="" backtracking="" just="" does="" not="" work="" very="" well.="" this="" is="" because="" the="" problem="" is="" ill-posed.="" 13.="" goal="" 6:="" calculate="" the="" condition="" numbers="" for="" a="" and="" a120.="" 14.="" goal="" 7:="" calculate="" the="" largest="" eigenvalue="" for="" a="" and="" the="" largest="" eigenvalue="" for="" a−1.="" comment="" on="" the="" difference.="" 15.="" goal="" 8:="" write="" out="" the="" values="" of="" and="" �??="" to="" a="" file="" called="" ‘voltages.csv’.="" essential="" mathematics="" for="" data="" scientists="" assessment="" 3:="" microchip="" voltage="" steps="" assessment="" 3="" –="" week="" 2="" marking="" scheme="" for="" students="" –="" microchip="" voltage="" you="" are="" required="" to="" write="" a="" master="" program:="" master.m.="" 25="" marks="" in="" total="" are="" allocated="" to="" programming="" (comments,="" structure="" and="" use="" of="" commands)="" and="" answering="" each="" goal="" set="" out="" in="" the="" assignment="" sheet.="" see="" below="" for="" further="" details="" master.m="" •="" program="" is="" structured="" correctly="" o="" programming="" (commands,="" logic)="" 2="" marks="" o="" comments="" (introduction/description,="" throughout="" code)="" 2="" marks="" •="" load="" matrix="" a="" from="" voltage_evolve.csv="" –="" must="" use="" csvread="" command="" 1="" mark="" •="" set="" 0="[1,0,0," …="" ]="" 1="" mark="" •="" calculate="" voltages="" for="" 120="" miliseconds:="" 1="" up="" to="" 120="" o="" loop="" (probably="" “for”="" loop)="" 1="" mark="" o="" vectors="" 1="" mark="" •="" goal_1:="" figure="" o="" voltages="" at="" first="" 5="" locations="" (first="" 5="" elements="" of="" each="" vector="" 0="" to="" 120)="" o="" 2="" marks="" –="" 1="" for="" 5="" lines,="" 1="" for="" actual="" data="" •="" goal_2:="" text="" file="" o="" text="" file="" of="" 120:="" voltages="" at="" 21="" locations="" at="" the="" 120="" th="" millisecond="" o="" 1="" mark="" •="" calculate="" eigenvalues="" and="" eigenvectors="" of="" a="" (“eigs”="" command)="" 1="" mark="" •="" calculate="" largest="" eigenvalue="" (“sort”="" or="" “max”="" commands)="" 1="" mark="" •="" goal_3:="" text="" file="" or="" figure="" o="" comparison="" of="" eigenvector="" corresponding="" to="" highest="" eigenvalue="" with="" 120="" o="" explanation="" of="" what="" is="" the="" same?="" o="" 2="" marks="" –="" 1="" for="" values="" (text="" or="" figure),="" 1="" for="" explanation="" •="" calculate="" inverse="" matrix:="" (“inv(a)”="" command)="" 1="" mark="" •="" calculate="" �̃�="?" −1??+1="" for="" n="120" down="" to="" 98="" o="" loop="" (“for”="" loop="" –="" check="" index="" reduces="" from="" 120="" to="" 99)="" 1="" mark="" o="" calculation="" of="" �̃�="" 1="" mark="" •="" goal_4:="" figure="" o="" figure:="" �̃�="" as="" circles="" on="" top="" of="" as="" lines="" o="" 1="" mark="" •="" goal_5:="" text="" file="" o="" comment="" on="" similarities="" and="" differences="" for="" forwards="" and="" backwards="" voltages="" o="" 1="" mark="" •="" goal_6:="" text="" file="" o="" calculate="" condition="" numbers="" for="" and="" 120="" o="" 2="" marks="" –="" 1="" for="" each="" condition="" number="" •="" goal_7:="" text="" file="" o="" calculate="" the="" largest="" eigenvalue="" for="" a="" and="" the="" largest="" eigenvalue="" for="" a−1.="" o="" comment="" on="" the="" difference.="" o="" 2="" marks="" –="" 1="" for="" values,="" 1="" for="" comments="" •="" goal_8:="" text="" file="" o="" write="" out="" the="" values="" of="" and="" �̃�="" to="" a="" file="" called="" “voltages.csv”.="" o="" 1="" mark="" 2.3075,6.6241,0.54198,0.23946,-1.6831,-0.81546,-0.021415,-0.070931,1.8112,-3.9547,-0.537,-1.2601,-0.45822,0.89896,0.055165,-0.51583,-1.7292,-0.38859,0.20601,1.9892,-3.5466="" 0.94922,3.645,0.7951,-0.6818,-0.10908,0.074177,-1.5524,0.71394,1.574,-1.7361,0.73089,0.086439,-1.1146,-0.81163,0.91258,-0.36391,0.84067,-0.84678,-0.86084,-0.57968,-1.6144="" 1.5381,5.766,0.89055,0.49557,-2.0273,-0.97886,0.31267,-0.91812,1.7422,-3.814,-0.38336,-1.1917,-0.12094,0.94814,0.71278,-0.18627,-2.3286,-0.31053,0.81222,1.6992,-3.1959="" 1.1784,3.8817,-0.2178,0.28577,-1.5238,-0.31408,0.39291,-0.8361,0.45764,-1.2249,-0.33916,0.75395,-1.556,0.93462,-1.5326,-0.42299,-1.2854,-0.39607,1.1114,1.8418,-1.3676="" 1.6189,1.9551,0.98135,0.65055,-1.6798,-1.4729,0.78604,0.25028,0.51972,-3.4448,-1.9117,-1.5433,2.343,2.238,0.32918,-1.0428,-3.4091,0.80349,1.2089,2.5034,-2.3026="" 1.3212,4.6798,1.3666,-0.79431,-0.15547,-0.08487,-1.551,1.317,2.4358,-3.0209,0.33916,-0.96989,-0.67578,-0.52957,1.8649,-0.852,0.17055,-0.60404,-1.2559,-0.60239,-2.7201="" 1.0478,4.0053,0.036986,0.16406,-1.4067,-0.81556,0.041945,-0.59211,0.85835,-2.1162,0.29944,-0.21629,-0.8425,1.0156,0.033523,-0.30929,-0.94709,-0.45731,0.84959,0.9363,-1.6336="" 0.45994,6.6138,-0.68234,-0.49239,-1.1974,0.35338,-1.0765,-0.95234,1.091,-0.18716,2.036,2.4055,-4.5239,-0.69328,-1.6006,-0.44287,1.6231,-1.6934,0.48791,0.029077,-1.0176="" 1.2278,3.6272,0.0069018,0.37731,-1.6577,-0.78601,0.44319,-0.73956,0.84317,-2.3484,-0.12535,-0.31746,-0.33222,1.5409,-0.16775,-0.42852,-1.9098,-0.22813,1.0298,1.8522,-2.1353="" 1.3987,2.3952,1.3717,-0.4153,-0.39528,-0.4571,-1.1134,0.83683,1.6811,-2.9399,-0.18479,-1.0655,0.9843,0.12943,1.5648,-0.50895,-0.9196,-0.20108,-0.39746,0.16341,-2.3257="" 1.3403,4.9047,0.17378,0.3254,-1.7224,-0.95447,0.52932,-0.3722,1.0722,-2.9761,-0.31935,-0.75606,-0.32045,1.4994,-0.22392,-0.65013,-2.0799,-0.22827,1.0911,1.8356,-2.5088="" 1.116,3.6141,0.60636,0.69308,-1.3422,-1.1657,0.0075969,-0.36212,0.83474,-2.8528,-0.53197,-0.63057,0.44625,1.2529,0.42696,-0.39028,-2.162,0.15182,1.0861,1.311,-2.2253="">
Answered 1 days AfterNov 11, 2021

Answer To: Essential Mathematics for Data Scientists Assessment 3: Microchip voltage You are now asked to write...

Nishchay answered on Nov 12 2021
97 Votes
GOAL_1: The plot of first five locations for all calculated time form 0 millisecond to 120
GOAL_2: The voltage for all 21 location at 120th millisecond is saved in a file name
GOAL_3: The table of both eigen vector corresponding to largest eigen value and voltage at
120th millisecond given as below for comparison.

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here