Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

E7 – Prof. Alam - Fall 2019, UC Berkeley E7 Homework Assignment 10: Least Squares and Linear Regression The purpose of this lab is to improve your familiarity with solving least squares problems and...

1 answer below »
E7 – Prof. Alam - Fall 2019, UC Berkeley
E7 Homework Assignment 10:
Least Squares and Linear Regression
The purpose of this lab is to improve your familiarity with solving least squares problems and performing
linear regressions using Matlab.
Note 1: A template will not be provided for this assignment. You still need to publish and submit you
m-file, so neatly organize it using code cells and comments as was done in the previous templates. The
autograder does not rely on the format of this file. You may run the autograder as many times as you
like to check your work as you complete the assignment.
Note 2: Remember to upload the following to the bCourses website:
→ All .m files including the functions that you are asked to create. Specifically:
Problem1.m, compInput.m, simRobot.m, MyPolyRegressor.m, FindPolyfitOrder.m,
PlotPolyregression.m, MMfit.m, and getBasisCombinations.m.
Directions to upload your solutions through bCourses can be found here.
The homework is due at 11:59am on Monday, November 25, 2019.
NO LATE HOMEWORK WILL BE ACCEPTED.
1. One of the first steps to selecting a cell phone signal booster for your home or office, vehicle, o
large building is to determine how strong the outside signal is. When most people talk about cell
phone signal strength, they talk about “bars” in reference to the signal strength bar indicator on
the phone. While bars are an easy way to talk about signal strength, it turns out that it’s not a
very accurate way to signal test. While many phones show the signal strength on a 5-bar scale,
some phones only have 4 bars while others have 8. Even among phones with the same numbe
of bars, there’s no standardization, so the strength of a 4 bar signal on one phone can be very
different than a 4 bar signal on another. Finally, bars are not very granular so for example, saying
3 bars of signal is not being very specific.
When experts discuss cell phone signal strength, they measure the signal in decibels. Decibels
are a logarithmic unit of measuring signal strength and are very precise making them ideal fo
performing a signal test of just how strong of a signal is that you’re cu
ently receiving.
Most phones have a setting we call Field Test Mode that can show you useful information about
your phone, including the signal strength in decibels. You can find the Field Test Mode on you
phone following the instructions here.
Sarah has conducted a simple experiment to find out about the relation between the Received
Signal Strength (RSS) on her phone versus distance into the North
ae tunnel. The results of
her measurements appear below:
1 of 12
https:
guides.instructure.com/m/4212/l/54353-how-do-i-upload-a-file-to-my-assignment-submission
https:
www.ubersignal.com/field-test-mode#ios_always_on
https:
en.wikipedia.org/wiki/North
ae_Tunnel
E7 – Prof. Alam - Fall 2019, UC Berkeley
Distance into the tunnel (steps) Cell phone received signal strength (dB)
0 -92
5 -93
10 -105
15 -121
20 -107
25 -105
30 -101
(a) Store the presented data for “distance into the tunnel” and “cell phone received signal
strength” into row a
ays called “Dist” and “RSS”, respectively. Now, plot the measured
RSS data versus distance. Label the x and y axes with “Distance into the tunnel (steps)”
and “Cell phone received signal strength (dB)”, respectively.
Save the plot as “CellData.png” using the print command.
(b) Use MATLAB’s built-in functions, polyfit() and polyval(), to add linear and quadratic
least squares curves that fit to the data. Plot them on top of the real measured data points,
and use legends to differentiate the measured data from its linear and quadratic fits. Save
this plot as “CellFit.png” using the print command.
(c) As it is apparent from her experimental results, Sarah could not walk through the tunnel
eyond 30 steps. Using the quadratic curve-fit from part (b), estimate the cell phone’s
eceived signal strength (RSS) at DistNew = [35, 40, 45] steps into the tunnel. Store you
esults in a new row a
ay called “RSSEst”.
Note: Save your code for this problem as “Problem1.m” and submit it along with all othe
function files that you are asked to create for other problems.
2. Suppose you work at a robotics company and one of the robots that they make moves back and
forth on a frictionless track, moved by a motor that applies a force to the robot. The robot
is described by its state, which is its instantaneous position p and velocity v. Your task is to
determine the force required to move the robot from its cu
ent state to some desired state in a
specified amount of time.
The motor applies a force for a specified number of time steps. The length of each time step is
the same and the force is constant during each time step. Let ∆ be the duration of one time step
and nSteps be the number of time steps. (For example, if ∆ = 0.1 seconds and nSteps = 10,
then a constant force could be applied to the robot from 0 to 0.1 seconds, a different constant
force from 0.1 to 0.2 seconds, and so on.)
Let p0 and v0 be the initial position and velocity of the robot and pk and vk be the position and
velocity of the robot at the end of the time step k. Then, the position and velocity of the robot
can be described by the difference equations given below.
pk+1 =
∆2uk
2m
+ vk∆ + pk
vk+1 =
∆uk
m
+ vk
(1)
2 of 12
E7 – Prof. Alam - Fall 2019, UC Berkeley
where m is the mass of the robot and uk is the constant force applied to the robot during time
step k. (Think about what these equations are saying in the most general terms: where the robot
is next (pk+1, vk+1) is a function of where the robot is now (pk, vk) and the applied force uk.)
These equations can be rewritten as a matrix equation as shown below.[
pk+1
vk+1
]
=
[
1 ∆
0 1
][
pk
vk
]
+
[
∆2
2m

m
]
uk (2)
Make sure you agree that Equations (1) and (2) are equivalent before continuing.
Now we will make Equation (2) more concise by defining the vector xk :=
[
pk
vk
]
, the ma-
trix C :=
[
1 ∆
0 1
]
, and the vector D :=
[
∆2
2m

m
]
. Then, Equation (2) can be written as
xk+1 = Cxk +Duk (3)
For k = 0 and k = 1 this would give
x1 = Cx0 +Du0
x2 = Cx1 +Du1
Notice that we can plug the equation for x1 into the right hand side of the equation for x2. This
gives
x2 = C
2x0 + CDu0 +Du1
Notice that C2 = C · C is the result of multiplying the matrix C by itself, and it is not an
element-by-element exponentiation. More precisely,
C2 =
[
1 ∆
0 1
]
·
[
1 ∆
0 1
]
=
[
1 2∆
0 1
]
This process can be repeated for each subsequent equation until finally you find an equation fo
xnSteps (the final state of the robot) that depends only on the initial state x0, and the force inputs
uk at each step. For example if nSteps equals 10 then we would have
x1 = Cx0 +Du0
x2 = Cx1 +Du1 = C
2x0 + CDu0 +Du1
x3 = Cx2 +Du2 = C
3x0 + C
2Du0 + CDu1 +Du2
...
x10 = Cx9 +Du9 = C
10x0 + C
9Du0 + C
8Du XXXXXXXXXXCDu8 +Du9
3 of 12
E7 – Prof. Alam - Fall 2019, UC Berkeley
This final equation can be put into the Au = b form where A is a 2-by-nSteps a
ay, b is a
2-by-1 a
ay, and u is a nSteps-by-1 a
ay of the unknown input forces:
[
C9D C8D · · · CD D
]

u0
u1
...
u8
u9
 = x10 − C10x0 (4)
As seen in the lectures, solutions to Eq. (4) can be found by using the backslash operator o
the pinv command in Matlab. Recall that the backslash operator gives a the solution with the
minumum number of nonzero elements and the pinv command gives the minimum norm solution.
(a) Write a function named compInput with the following function declaration line
egin code
1 function [u1, u2] = compInput(m, delta, nSteps, pi, vi, pf, vf)
end code
where the input arguments are
• m: the mass of the robot;
• delta: the time stepsize to be used;
• nSteps: the number of time steps;
• pi: the initial position of the robot;
• vi: the initial velocity of the robot;
• pf: the final position of the robot; and,
• vf: the final velocity of the robot.
The output arguments are both nSteps-by-1 a
ays of the input force at each time step
to be applied to the robot that takes the robot from the initial to the final position in the
specified time. More specifically,
• u1 is the input force with the minimum number of nonzero elements (determined using
the backslash operator); and,
• u2 is the input force with the minimum euclidean norm (determined by using the pinv
function).
(b) Now that the input force to be applied to the robot has been computed, we want to sim-
ulate the robot using Equation 2 to determine its position and velocity at each time step.
This allows us to confirm that the input force does indeed move the robot to the desired
final position and velocity. Write a function named simRobot with the following function
declaration line
egin code
1 function [p, v] = simRobot(m, delta, nSteps, pi, vi, u)
end code
4 of 12
E7 – Prof. Alam - Fall 2019, UC Berkeley
where the input arguments are
• m: the mass of the robot;
• delta: the time stepsize to be used;
• nSteps: the number of time steps;
• pi: the initial position of the robot;
• vi: the initial velocity of the robot; and,
• u: the input force to apply to the robot.
The output arguments are
• p: an (nSteps+1)-by-1 a
ay of the robots position. The first element is the initial
position and the remaining elements are the positions after each time step; and,
• v: an (nSteps+1)-by-1 a
ay of the robots velocity. The first element is the initial
velocity and the remaining elements are the velocities after each time step.
An example of these functions being used to determine the input force and then simulate the
obot is given below.
egin code
1 % Define input parameters
2 m = 2;
3 delta = 0.01;
4 pi = 1;
5 vi = 5;
6 pf = 1.8;
7 vf = 0;
8 nSteps = 10;
9
10 % Determine input force
11 [u1, u2] = compInput(m, delta, nSteps, pi, vi,
Answered Same Day Nov 22, 2021

Solution

Kshitij answered on Nov 25 2021
147 Votes
grey22/1.png
grey22/CellData.png
grey22/CellFit.png
grey22/compInput.asv
function [u1, u2] = compInput(m, delta, nSteps, pi, vi, pf, vf)
c=[ 1 delta; 0 1];
D =[delta^2/2*m; delta/m];
%%
x0=[pi; vi];
xf=[pf;vf];
%%
Cf=c^nSteps;
%%
tt=xf-(Cf*x0);
%%
CC=[];
for i=1:nSteps
k=c^(nSteps-i);
pp=k*D;
pp(:,i)=pp;
end
%%
u1=(tt\pp)';
u2 = (pinv(pp)*tt)';
end
grey22/compInput.m
function [u1, u2] = compInput(m, delta, nSteps, pi, vi, pf, vf)
c=[ 1 delta; 0 1];
D =[(delta^2)/(2*m); delta/m];
%%
x0=[pi; vi];
xf=[pf;vf];
%%
Cf=c^nSteps;
%%
tt=xf-(Cf*x0);
%%
CC=[];
for i=1:nSteps
k=c^(nSteps-i);
pp=k*D;
pp(:,i)=pp;
end
%%
u1=(tt\pp)';
u2 = (pinv(pp)*tt);
end
grey22/createFit.m
function [fitresult, gof] = createFit(Dist, RSS)
%CREATEFIT(DIST,RSS)
% Create a fit.
%
% Data for 'fit' fit:
% X Input : Dist
% Y Output: RSS
% Output:
% fitresult : a fit object representing the fit.
% gof : structure with goodness-of fit info.
%
% See also FIT, CFIT, SFIT.
% Auto-generated by MATLAB on 23-Nov-2019 16:20:16
%% Fit: 'fit'.
[xData, yData] = prepareCurveData( Dist, RSS );
% Set up fittype and options.
ft = fittype( 'poly2' );
opts = fitoptions( 'Method', 'LinearLeastSquares' );
opts.Robust = 'Bisquare';
% Fit model to data.
[fitresult, gof] = fit( xData, yData, ft, opts );
% Plot fit with data.
figure( 'Name', 'fit' );
h = plot( fitresult, xData, yData );
legend( h, 'RSS vs. Dist', 'fit', 'Location', 'NorthEast' );
% Label axes
xlabel Dist
ylabel RSS
grid on
grey22/FindPolyfitOrder.m
%%
function [nMinE , pMinE, MinRelE
or, PolyStruct] = FindPolyfitOrder(x,y,nrange)
% data=[x, y];
for i=1:max(nrange)
[p, RelE
or] = MyPolyRegressor(x,y,i);
pfun=matlabFunction(poly2sym(p));
PolyStruct(i).order=i;
PolyStruct(i).polyfun=pfun;
PolyStruct(i).RelE
or=RelE
or;
PolyStruct(1).data=[x,y];
pstru(i).pcoeff=p;
end
%%
T = struct2table(PolyStruct);
%%
sortedT = sortrows(T, 'RelE
or');
nMinE=sortedT.order(1);
pMinE=pstru(nMinE).pcoeff;
MinRelE
or=sortedT.RelE
or(1);
end
grey22/getBasisCombinations.m
function rfHandle = getBasisCombinations(fBasis,p)
fHandle = @(x)LOCAL_gbc(fBasis,p,x);
function y = LOCAL_gbc(basisCell,weights,x)
N = length(basisCell);
sum = 0;
for k = 1:N
sum = sum + weights(k)*basisCell{k}(x);
end
y = sum;
end
end
grey22/hw.p
v01.00v00.00��Ŕ�Ň�ß±���(��
���"%cšď�g]PÇ…bžiź@„yŻ.ô,Ľő[ł"Ó�”ÝÓ‹±Ç÷uD”‘�řgm]NÓÄĆ^ł¶‚ÝÂIgţó“‰�ł�¸·XÜ™U]4‡™¤�ëiý�­\ď#Ľ2|�Ő0qčň8�Śç�ŠTEř�Ô�¤�„í
xŰ‘´ü#xňŞň}Ś2˛(Řlu(>[ŕÚƧôDÎ=ŕŮ%™¨ĺ¨‰ÉŹdľ^éÁŘÓ/;fb    jÚ"]3Ý`]Ž2‹Ű
����aO�ík�‡ňvWŞşK ĘÖŰľ…6E�q/µE”ż�Kď¨Ę÷4%oĎĺ.+˝­    (v�I@Ž�”Ôµ9ú‚Ů dz��JŤKÎĘ`(�ˇů�ĚŢ&ĺq�m Üa6>Ôô™¨i;2qzboiG2oÍ€Ł”d�U‚)+�ë�PRË-[�ˇá,v]٬1H%ť©    —çh?âDŰĘŞąĂű�z4��EŘę�ś=�MoQ¶�źóć»LĄĄ�s�YśÁÖŽxi´N˝BăŚÄpŕYN’Ěb~†Ŕ�â2ć>VÄ
ĂÎţFO ë^[„�ńţŮ=
M�-ú\[Ô-xI�µ!—–�ŔÔË“s7҇k¦Í^ăĺűD1}‚ĺ†V/˙Hv]�-‰)v‰ă»��Ł    �!±–ź4bcµP}��,—TÂăőy�Çur4Ľâ…†¨…dwÉ÷uo2‰TtS4(pđ˛;^�óĘ&‹Ľ/‚�‘c˙ăę�    �s�×F|�óéĘG‰Ýâę|�3·��”ôčŔòŽ%�ßš�-/„S¶u"Řő§Oe¬x4mÓ1>�ĹŚsL¦�$=�·í��    DsoĽ~¦+�oj‚�«ůüe¸eÜoµö!4›bWř Ďă0đšă5În\ZÄ0µŃVF�Äă¶flvű"‚�#Ç€QV(KS#? ÖP�¦[Gú–śĚV»%FVţ™�0ń`ŕ‰@�Ú�ą¤ľhU�hŞŇ“‹ń}86€‡śÍ�‹8§ćuj�E’�Ë´úNe­4PW0ĐO(��ß_ý˛Z\1�©ä§ö    �Ńn6C>ʇ�}4›ßŤě��C�ű_µ4ě(61§2�~5—�!ă÷:Ţ´öݰsěh�×�"‰Đ©„l5ü#Ľ•Ž~|-.�içVĎŞ4ŰR�ĂȰ0ŹçYRBlŽ_ĺߌ¸ŮSw…®Čď(�k�96¨”u�™ź˘Ŕp±cΉt˝÷vθâ«×�xĆ�rßSZ    Z÷ů‡=Ä�łÚ3Llµ˘$Ń-��ČŠŔ�–źť��ČxV#Óc Ŕç�5¦8�C㦔K9�
çU\Ö$˘ĐU�˝Ŕ®Ŕ��jľ9–ÜÚ®ĽR�e¨€kÍş˘xë-…ť‰PÓ�đ!ăŹAýVrEYO�ďr]EK¤“X@�‡�¸ępÄXRŇő=č‹ El¨«§Y—ę`VR�o¬JŰ�ą$�úł˝ĆËmŤ[ÇĹ”%$čB*X“˘,
ýsô´±€)�ąî�>iŁÓś`�)¸�™d^_¬ůs÷é'´9 ˙%轼–Vüe�Şş×ü���1ń¦Hť={ý{ÍjŽjĽ%­ć�ś`V–•��|Zî"]«ţ}*ÂŰíßkÎ��ü„iAKâÓ�
]°aD^ßÁÉóH�
™_Ś�Ž�ŮlŔ)���“´CÂ;A(�˛řç§w~ějY‰�w†C‰�eŽ'„Ż<’w‚4·kŮx!�đ«˝ÔŔ�"�’çßřď�c”¨�vâąř4lŢ��mßőĎ2îĽËŠŻvü<˘ Ď˝ýÔß?âú\B.źqé�Â�ÜýŔNÓ•_Ó��¶Çő_�‹é�îě(±�É´«nř
̇(¨•J„ÉoʧçëÄé»öőWQ4ä�´É�ÇiŽ“�ď’X€y
ňíĘäĎä,°č[Äľ®ć.÷Açסp݇Ó(�+©-*”Ë�«32�I¬“Ó�"
j›Č;_b�Î�†żÇ;’Ľ�,h&-Ľ�éöörÎ�ÔőSř}đKnŠ$«ç:�ö�ě¸#>Fs0˝O#źh�W'·L‹Í‰
čekč�M>j‘y"ł�˘€ĹÝ{µ�ü÷rmQ“´ń�SŰgôô}ĐAÖQ!ŐM�ÁČćÖö-4BâžčL‘�Ę�'ĐČÍb™"�ë}.Ž��~Ĺ:KŢ=æ·ť�E™BV�V“ń�Żţ@‰©lk&Ħý‹�§QqźXYd{���ÜŽ§Ç=v/wń~ÓhB$Đ(µÍëŢÜE‡Cý��A|#].óŔ·|V>ť‚]k˛¨ŹHX#Ô(ł¸…CwľţŽ�WşkqĄ�IBM­ u\ë4SQ4Ż~5�s…��ńD?·ŞÖÔîç§ŚîrĹč+g�SާDŔí]ó¤˘ă:'îšÍ�ćx�Ž­ü+Ż�öú�‡ő�yg-�ˇŮó�.­ĄÜŞăj�¬‚Ł6´+�C}�xË<ţNYŽš[ŘŔ€đ‘�[(ą‰t�“'Ü9eO˛ÝrglĆ�A'íy�ٱBnÝś\ł©9» yKśŘÝR7¦Ť*�ř_q-Ż©°d�âô8ć#�AŃŢ�2ëgU@bť7)8D­ß (­b�¬ fń\�™Ż˘�zš4Ěȶ_/ĂT�…)ŞĄrL†°ú_�{AĂ<Ňp¬Ď†ąt(yžC`—OŮJ¬˝$Ű�„‡őD���đ
ÚJ@ßďňš–­�Ć�Ţ–ţWw`�?Ff�.�Y/™ľĺµףâç{úż›Ň���őŢŢ>Ý…úÂń�ďéFŠ��¸dľ/}=:.D*D‘…_Ż�=/‡�¤wx��IU,7ý0âTl�1�şë@‹ťfv�CwŹhőěŻĺŇD!ż×�
IILŔO"˱ś«ë ÂxĘ! ć2RD:ŃT±°Cßg�8wŹNć‘E°ôt¬śŃ�č�tąţ瓪ą„A­�+ʶz�[=î 5ćÉ”Bl>ݤě—�oIöŞˇ‘Îţ$S}}´}÷˝‰˙ÓÔěë`•o?ż�„    M’áíšĘ�Tá�Í,ç‡>�F…['�ĹϬůE6Â|Đ-BţžĄwŔ´Nëwóđţ†Ch{Ĺů:—��Q*®��„Vá4�ťß‹�ŃZ6¨-�ięĆśšw0Ff)Ş~ÍE�Í�Ŕ�+��V<ĂdO�ŁÔ_łc–#ă×�YşŔ�§B×ŮŃ�ľlđ¤��}b1��(âąe@çoé�áÍ”ďSäGk§#ßt›¬_Vl6o<ż8iš��eĂ“|’‡OlÜ�ŰÉ´�Šze”řŕďÓ7 kG
ľ<ţłîK�ďcÔ�G\[Z�Z�q�Ë0··N÷�ęp@Ě�đ`g¤J)„Ę˝Ě
=Î2w;�y�¸`ČÉmUĹ�˘®��Öťt}jKsU��Ć~1é.ö·ôŤ­[ŽŕŤLéSĹăׂ-ŻJ�ů�Ł5RWĎh@â7ä�TĎCl“BÄ8 Ţ˘B@ĺ§ËÖÝ}ť�a*í�ň�–Ŕ�y€�§HđÂ܉űóá�ý1QÔ(�(‡«���#3Ź|É@Č  `‡��ů�ě�iËŮă,ó�¶ęUÇö±ĹŕŚ×)ŮR»}XP�ę)Ľ78ü°Ö89ąîI’�G‹eą‰�ȸŤű\
�8s%�Ë:®öę_P�ŕĽg�
ŐŤîňÁqö¨BŤ6ů��o·k×·r2®hě�"`��öë•�şmS®›{
«I�‹H�e6đŘ;Î)gJ�ÂŁóCçę�ĹŁ±    ú��ću1W‹Í1xú�=ě5=[„Ŕ<�vŘ3Âx欫xwM‰‹±Ąě»(ř–‹C@ž�…NÜb;5&`CŔqÁ5��q„Ň/‰Ű�|5e�!0íIIk)öĺtA�/’Ń%�VÖÚîsŃČKa=Š�)H|�©ç¨ň†�IĽFBŚH¸x%¨…1/�B�zĆ�TZžE?¦_�şlňBKé¸#2�cđŻé����8.űj-¸±��‹KjČš�a4Ú�˘�®‘ťÖ�â›i˝,‡—�AnDÄó�ʤ±D�Év±«ĺŻ•†ä4çP5g} /t"÷ľëEŻ`Č~ Y‚#ž �ŕ+3,ňˇáµÁÔi¨��§˝WV�wLĄ˙kéŃíë��Fě o‚’W–ŹQ0QdäW÷:¦üĽI»70šćĚvQµ†t!˘ŔNěŐEÄ–:"Ĺ4ý)äqáŞĹi[Ěě{`°Ď�*.mŇ*¨ÜŠö    ��$řóS��dŔÚĎĘĆjEű1Kóę˙&#ď>‘v¤���ť�¬ĽĄ�tq´â�‚ K�ŔíŃ9Ç•}3H9ű|ä ł»Jö
��ŹN÷›©çc‹xˇ�I.ÔÚĄ"JT%Ý˙•ě;íć´¬Vá+ÜüČ�‰    �×�ůTvu�Ç/2Ž‘�Ź����ö��ç�«�ŁŽ�!Py�ĺŐ�‚S´¤*;›Ň¶�G�r÷/Ň}�ő{Ř®ÍÍTuD�ařhŰ©Y#ńN`Äß*÷9ľâr-�0Ę�0+ÖÖÔś‚ĄÝ…�Î=Ů/÷§łŻ�ś {˝�@c{aĄÜ,Ńé;HgÚµ˛�s˝m8»ř4ęN‹_@ÂîŃjˇ­př“/6VQ��őá§·äća&®ş2Ő{uxq!Ý$Űípëç2Ţň•HHó<    8>„@Ąp:ľÍ»‚E6�Ę&CäRĹtůŔĄXcÍ–LSĐNe�x'Ţ/‚W�îÄS��
grey22/hw10data1.mat
Population:[17x1 double a
ay]
Year:[17x1 double a
ay]
grey22/hw10e72019-tz2fzxf2.pdf
E7 – Prof. Alam - Fall 2019, UC Berkeley
E7 Homework Assignment 10:
Least Squares and Linear Regression
The purpose of this lab is to improve your familiarity with solving least squares problems and performing
linear regressions using Matlab.
Note 1: A template will not be provided for this assignment. You still need to publish and submit you
m-file, so neatly organize it using code cells and comments as was done in the previous templates. The
autograder does not rely on the format of this file. You may run the autograder as many times as you
like to check your work as you complete the assignment.
Note 2: Remember to upload the following to the bCourses website:
→ All .m files including the functions that you are asked to create. Specifically:
Problem1.m, compInput.m, simRobot.m, MyPolyRegressor.m, FindPolyfitOrder.m,
PlotPolyregression.m, MMfit.m, and getBasisCombinations.m.
Directions to upload your solutions through bCourses can be found here.
The homework is due at 11:59am on Monday, November 25, 2019.
NO LATE HOMEWORK WILL BE ACCEPTED.
1. One of the first steps to selecting a cell phone signal booster for your home or office, vehicle, o
large building is to determine how strong the outside signal is. When most people talk about cell
phone signal strength, they talk about “bars” in reference to the signal strength bar indicator on
the phone. While bars are an easy way to talk about signal strength, it turns out that it’s not a
very accurate way to signal test. While many phones show the signal strength on a 5-bar scale,
some phones only have 4 bars while others have 8. Even among phones with the same numbe
of bars, there’s no standardization, so the strength of a 4 bar signal on one phone can be very
different than a 4 bar signal on another. Finally, bars are not very granular so for example, saying
3 bars of signal is not being very specific.
When experts discuss cell phone signal strength, they measure the signal in decibels. Decibels
are a logarithmic unit of measuring signal strength and are very precise making them ideal fo
performing a signal test of just how strong of a signal is that you’re cu
ently receiving.
Most phones have a setting we call Field Test Mode that can show you useful information about
your phone, including the signal strength in decibels. You can find the Field Test Mode on you
phone following the instructions here.
Sarah has conducted a simple experiment to find out about the relation between the Received
Signal Strength (RSS) on her phone versus distance into the North
ae tunnel. The results of
her measurements appear below:
1 of 12
https:
guides.instructure.com/m/4212/l/54353-how-do-i-upload-a-file-to-my-assignment-submission
https:
www.ubersignal.com/field-test-mode#ios_always_on
https:
en.wikipedia.org/wiki/North
ae_Tunnel
E7 – Prof. Alam - Fall 2019, UC Berkeley
Distance into the tunnel (steps) Cell phone received signal strength (dB)
0 -92
5 -93
10 -105
15 -121
20 -107
25 -105
30 -101
(a) Store the presented data for “distance into the tunnel” and “cell phone received signal
strength” into row a
ays called “Dist” and “RSS”, respectively. Now, plot the measured
RSS data versus distance. Label the x and y axes with...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here