Question: Investigating Power Usage python You are working on a new electronic device. And for this device, it is critical to understand how much power is

Investigating Power Usage

python

Investigating Power Usage python You are working on a new electronic device.And for this device, it is critical to understand how much power

You are working on a new electronic device. And for this device, it is critical to understand how much power is being consumed by each of the 10 components on it But from your test setup, you can not directly measure how much power consumption each component has Instead you can measure how much energy the entire device uses and the duration that each component was operating (e.g. the device consumed 5 millijoules with the microphone operating for 1 second and the screen for 0.5 seconds). Your goal is to calculate the energy consumed per second by each component on the device. You will do this by setting up a linear system and then solving using numpy. nag. solve You will be given a python dictionary called test_data that contains measurements from 10 different tests. Each test is stored as a python list of tuples. (e.g. I'LED,0.58), 'Screen' 'EnergyConsumed',1.2), ...1). The tuple with first entry equal to 'EnergyConsumed' is the energy consumed by the device on that test. The other tuples tell you how much time each component was running for. 24) You will also be given a python list of the components called components. Using these two inputs, build a linear system Ax - b to solve for the energy per second consumption of each component. You may use numpy.linalg.solve to solve your linear system. Return power_usage with entries corresponding to the same order as they show up in components (i.e. if 'Screen' is the first string in components then the first entry of power_usage should be the amount of energy per second that 'Screen' consumes) The setup code gives the following variables: Name test_data components Type a dictionary containing lists of tuples Description see problem statement contains the names of the components a list Your code snippet should define the following variables: Description contains the amount of energy per second used by the corresponding components Name Type power_usag 1D numpy array user_code.py You are working on a new electronic device. And for this device, it is critical to understand how much power is being consumed by each of the 10 components on it But from your test setup, you can not directly measure how much power consumption each component has Instead you can measure how much energy the entire device uses and the duration that each component was operating (e.g. the device consumed 5 millijoules with the microphone operating for 1 second and the screen for 0.5 seconds). Your goal is to calculate the energy consumed per second by each component on the device. You will do this by setting up a linear system and then solving using numpy. nag. solve You will be given a python dictionary called test_data that contains measurements from 10 different tests. Each test is stored as a python list of tuples. (e.g. I'LED,0.58), 'Screen' 'EnergyConsumed',1.2), ...1). The tuple with first entry equal to 'EnergyConsumed' is the energy consumed by the device on that test. The other tuples tell you how much time each component was running for. 24) You will also be given a python list of the components called components. Using these two inputs, build a linear system Ax - b to solve for the energy per second consumption of each component. You may use numpy.linalg.solve to solve your linear system. Return power_usage with entries corresponding to the same order as they show up in components (i.e. if 'Screen' is the first string in components then the first entry of power_usage should be the amount of energy per second that 'Screen' consumes) The setup code gives the following variables: Name test_data components Type a dictionary containing lists of tuples Description see problem statement contains the names of the components a list Your code snippet should define the following variables: Description contains the amount of energy per second used by the corresponding components Name Type power_usag 1D numpy array user_code.py

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!