EG4217/7217 Advanced CommunicationsCoursework 2Task 1 Making an empirical modelDownload the file ‘empirical_data.mat’ from the Advanced Communications Bb site under Assessmentand Feedback/Coursework Assignments/Matlab software. Load this file and look at the data-set itcontains, using the command ‘whos’.It represents the outcome of a measurement campaign to ascertain the strength of a WiFi signal in anoffice block. The WiFi access point was located in the central stairwell/lift area on the 5th floor and foreach of the 100 measurements, the following data were recorded:• Propagation loss in dB (variable ‘loss’)• Floor on which the receiver was located (variable ‘flr’)• Number of walls between the stairwell and receiver (variable ‘nw’) •LengthinmetresofthelineconnectingTxtoRx(i.e.sqrt(dx^2+dy^2+dz^2))(variable‘dist).UsetheMatlabfunction‘fit’tocreateanempiricalmodeltopredictpropagationlossindB, withinputparameters dist,flrandnw. Thecommandtodothisis:fit1=fit(x1,loss,’poly1’)(1) Choose which parameter you will fit first. In the text above it is denoted ‘x1’, but you will input dist, flr ornw or some function of one of these. Here, ‘poly1’ determines the type of best-fit line to use. We willrestrict our investigations to a polynomial first-order fit (i.e. a straight line), but you can type ‘help fit’ tosee other options.Once you have typed in the command, Matlab will tell you the gradient (p1) and intercept (p2) of thebest-fit line, along with the confidence intervals for p1 and p2. Also, you can observe how good the fit isby typingplot(fit1,x1,loss) ,where again, x1 should be replaced by whatever you used in line 1. Note down the values of p1 and p2,as these will appear in your final model. Next, we create a new variable, loss2, which represents the partof the propagation loss that cannot be ‘explained’ by variable x1: Type in the following command: loss2=loss – fit1.p1*x1 – fit1.p2;Youcanseethatloss2hasnodependenceonx1 bytypingthefollowingcommandfit1test=fit(x1,loss2,’poly1’); This should give very low values of p1 and p2, indicating minimal correlation between loss2 and x1. Nowchoose the next variable for fitting. We shall call it x2, but again, it should be one of the remainingvariables from dist, flr or nw or some function of one of these. Use the following command to find howloss2 depends on x2: fit2=fit(x2,loss2,’poly1’)Thep1 andp2 valuesproducedwillexplainthedependenceofloss2onx2. Again,youcancheckthisvisuallyusingacommandanalogoustoline:plot(fit2,x2,loss2)Nowremovethex2dependencewith:loss3=loss2 – fit2.p1*x2 – fit2.p2;andcheckthatyouhave‘explainedaway’allthedependenceoflossonx2 bytyping:fit2test=fit(x2,loss3,’poly1’); Now do one more cycle of this process to find the dependence of loss on the third variable, and your finalempirical model will be given by:Estimated_Loss(dB) = fit1.p1*x1 + fit2.p1*x2 + fit3.p1*x3 + (fit1.p2+ fit2.p2+ fit3.p2),which you can plot against the measured loss to measure the success of your model. You should alsocalculate the root-mean-square values of loss, loss2,…loss4 using the command rms(lossn). Thesevalues represent the residual uncertainty or extra loss that your model leaves ‘unexplained’.
- Assignment status: Already Solved By Our Experts
- (USA, AUS, UK & CA PhD. Writers)
- CLICK HERE TO GET A PROFESSIONAL WRITER TO WORK ON THIS PAPER AND OTHER SIMILAR PAPERS, GET A NON PLAGIARIZED PAPER FROM OUR EXPERTS