Source Localization with the BLUE Estimator I'm trying to implement BLUE estimator in MATLAB for source localization and after my research I've come up with a theoretical example in Steven Kay's "Fundamentals of Statistical Signal Processing: Estimation Theory" book (Example 6.3).

In this solution, while estimating $\theta$, the Gauss-Markov theorem is used and a point called as nominal source position($R_{n_i}$) is defined rather than real source position($R_i$). There is equation which shows the relation between $R_{n_i}$ and $R_i$ found by first order Taylor series expansion.

I'm confused about finding the value of $R_{n_i}$ variable, can anyone explain me this solution?

This could be a very simple question, but I want to understand the theory and my mind is not clear now. When you look at the solution in the book, I think you will understand better than I wrote.



EDIT:

N = 8; %total number of receivers
var = 1;
c = 3*10^5; % speed of electromagnetic waves
x = [0 8 7 1 5 9 3 1]; %xi receiver location
y = [0 1 9 9 2 5 8 4]; %yi receiver location
xs = 3; ys = 6; %real source location
xn = 6; yn = 10; %nominal source location
Sxs = xs-xn; Sys = ys-yn;
for i=1:N
    R(i) = sqrt((xs-x(i))^2*(ys-y(i))^2);
    Rn(i) = sqrt((xn-x(i))^2*(yn-y(i))^2);
    co(i) = (xn-x(i))/Rn(i); %cosai
    si(i) = (yn-y(i))/Rn(i); %sinai
    noise(i) = var*randn(1,1); %e1,e2,..
end
for i=1:N-1
    e(i) = 1/c*(co(i+1)-co(i))*Sxs+1/c*(si(i+1)-si(i))*Sys+noise(i+1)-noise(i); %linear model (6.26)
end
H = 1/c*[co(2)-co(1) si(2)-si(1);
         co(3)-co(2) si(3)-si(2);
         co(4)-co(3) si(4)-si(3);
         co(5)-co(4) si(5)-si(4);
         co(6)-co(5) si(6)-si(5);
         co(7)-co(6) si(7)-si(6);
         co(8)-co(7) si(8)-si(7)];

A = [-1 1 0 0 0 0 0 0;
     0 -1 1 0 0 0 0 0;
     0 0 -1 1 0 0 0 0;
     0 0 0 -1 1 0 0 0;
     0 0 0 0 -1 1 0 0;
     0 0 0 0 0 -1 1 0;
     0 0 0 0 0 0 -1 1];
inaaT = inv(A*transpose(A));
estTheta = inv(transpose(H)*inaaT*H)*transpose(H)*inaaT*transpose(e); % eq. 6.27


This is not a modular code, I just want to be sure about not missing any point. However, when I run this code I get useless estTheta values. I think again I leave out something in the theory.
One problem with your code is that the range calculations should be

R(i) = sqrt((xs-x(i))^2$\color{red}{\bf +}$(ys-y(i))^2);

Rn(i) = sqrt((xn-x(i))^2$\color{red}{\bf +}$(yn-y(i))^2);

But that doesn't appear to help. 

The thing that seems to be the issue is that your noise variance is way too high.  If I set it to var = 0.00000001 then I get good estimates.

The reason is because you're using this variance (or a standard deviation of 0.0001) to add noise to your H matrix. Looking at the values there:



you can see you're adding something with a variance of 1 (standard deviation of 1), to something of the order of $10^{-5}$.  That means your SNR (signal-to-noise ratio) is about -100dB.  I know of no algorithm that will help you at SNRs that low.



You left out that Kay defines
$$
R_i(x_s,y_s) = \sqrt{(x_s - x_i)^2 + (y_s - y_i)^2}
$$
and
$$
R_{n_i}(x_n,y_n) = \sqrt{(x_n - x_i)^2 + (y_n - y_i)^2}
$$
where $x_s = x_n + \delta x_s$ and $y_s = y_n + \delta y_s$.

Then the aim is to write $R_i$ in terms of $R_{n_i}$.

Wikipedia has an example of Taylor series in two variables, and the first order approximation is just:

$$
f(x,y) \approx f(a,b) + (x-a) \frac{df}{dx} (a,b) + (y-b) \frac{df}{dy} (a,b) + \ldots
$$

Then all you need to do is apply Wikipedia's expression to Kay's to get

$$
R_i \approx R_{n_i} + \frac{x_n-x_i}{R_{n_i}} \delta x_s + \frac{y_n - y_i}{R_{n_i}} \delta y_s. 
$$