关键词 > EG4217/7217

EG4217/7217 Advanced Communications Coursework 2

发布时间:2022-11-15

Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

EG4217/7217 Advanced Communications

Coursework 2

Making an empirical model

Download the file empirical_data.mat’ from the Advanced Communications Bb site          under  Assessment and Feedback/Coursework Assignments/Matlab software.  Load this file and look at the data-set it contains, using the command whos’ .

It represents the outcome of a measurement campaign to ascertain the strength of a      WiFi signal in an office block.  The WiFi access point was located in the central                 stairwell/lift area on the 5th floor and for each 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’)

•   Length in metres of the line connecting Tx to Rx (i.e. sqrt(dx^2+ dy^2+ dz^2)) (variable dist).

Use the Matlab function fit’ to create an empirical model to predict propagation loss in dB, with input parameters dist, flr and nw.  The command to do this is:

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 or nw or some function of one of these, for example exp(dist) or dist^2. Here, ‘poly1’ determines the type of best-fit line to use.  We will restrict our                        investigations to a polynomial first-order fit (i.e. a straight line), but you can type ‘help  fit’ to see other options.

Once you have typed in the command, Matlab will tell you the gradient (p1) and      intercept (p2) of the best-fit line, along with the confidence intervals for p1 and p2.

plot(fit1,x1,loss)                                                       [2]

,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 part ofthe propagation loss that cannot be       ‘explained’ by variable x1:  Type in the following command:

loss2=loss –  fit1 .p1*x1 –  fit1 .p2;                                [3]

You can see that loss2 has no dependence on x1 by typing the following command fit1test=fit(x1,loss2,’poly1’);                                      [4]

This should give very low values of p1 and p2, indicating minimal correlation between loss2 and x1.  Now choose the next variable for fitting.  We shall call it x2, but again, it  should be one of the remaining variables from dist, flr or nw or somefunction of one of these.  Use the following command to find how loss2 depends on x2:

fit2=fit(x2 ,loss2,’poly1’)                                                [5]

The p1 and p2 values produced will explain the dependence of loss2 on x2.  Again, you can check this visually using a command analogous to line [2]:

plot(fit2,x2,loss2 )                                                    [6]

Now remove the x2 dependence with:

loss3=loss2 –  fit2 .p1*x2 –  fit2 .p2;                                        [7]

and check that you have explained away’ all the dependence of loss on x2 by typing:

fit2test=fit(x2 ,loss3 ,’poly1’);                                      [8]

Now do one more cycle of this process to find the dependence of loss on the third variable, and your final empirical model will be given by:

Estimated_Loss(dB) = fit1.p1*x1+fit2.p1*x2+fit3.p1*x3+(fit1.p2+ fit2.p2+ fit3.p2)  [9]

You must put the numbers you’ve calculated into eq9 to state the explicit dependence of loss on the three independent variables and then plot Estimated_Loss against the              measured loss (the variable loss’ in the data file).  This will show the success of your       model.

You should also calculate the root-mean-square values of loss, loss2,…loss4 using the

command rms (lossn).  These values represent the residual uncertainty that your

model leaves unexplained’ at each stage.  The residual uncertainty should reduce from loss to loss1 to loss2 etc.  This means the ‘randomness of the data is reducing as you      introduce each independent variable.  If the loss does not reduce, it means that no          further predictive power is gained by further correlations.