Documente Academic
Documente Profesional
Documente Cultură
Lall
where σ > 0 is the self-noise power of the receivers (assumed to be the same for all
receivers). The signal to interference plus noise ratio (SINR) at receiver i is defined as
Si = si /qi .
(a) Explain how to determine if there is a power allocation (i.e., a vector p) that
satisfies the constraints 0 ≤ pi ≤ P max and achieves Si = S target for i = 1, . . . , n,
where S target is a (positive) target value of SINR. Explain how to find such a
power allocation when it exists. You can assume that a matrix appearing in your
analysis is full rank, but please make this assumption explicit.
(b) Among the SINR target values S target = 2, 2.1, 2.2, . . . , 3.9, 4, find the largest for
which there is a power allocation that satisfies the constraints 0 ≤ pi ≤ P max and
achieves Si = S target for i = 1, . . . , n, for the problem data
1 .2 .1
G = .1 2 .1 , σ = 0.01, P max = 0.1.
.3 .1 3
Remarks.
• This problem is related to, but independent of, homework exercise 2.1; for exam-
ple, there is no time or power update algorithm in this problem. (And no, you
cannot solve this problem by simply running the algorithm from exercise 2.1.)
• Yes, this problem includes constraints on p (i.e., that its entries are nonnegative
and no more than P max), which we have not covered in EE263. Still, you can
solve it (with material we have covered).
• If you solve this problem using methods that are more advanced or complicated
than needed, we will deduct points.
Solution.
1
(a) We want to find p such that si /qi = S target for each i. We restate this as si =
S target qi for each i. This occurs if and only if
X
Gii pi = S target σ + Gij pj
i6=j
which we write as X
Gii pi − S target Gij pj = S target σ.
i6=j
0.11
p1
0.1 p2
p
3
0.09
Pmax
0.08
Power allocation
0.07
0.06
0.05
0.04
0.03
0.02
0.01
2 2.2 2.4 2.6 2.8 3 3.2 3.4 3.6 3.8 4
Starget
2
n = 3;
G = [1 .2 .1; .1 2 .1; .3 .1 3];
% H = G_d - S_target*G_o
G_d = diag(diag(G));
G_o = G - diag(diag(G));
S_target = 2:.1:4;
k = length(S_target);
sigma = 0.01;
p_max = 0.1*ones(n,1);
feasible = false(k,1);
ps = zeros(n,k);
for i = 1:k
g = S_target(i)*sigma*ones(n,1);
H = G_d - S_target(i)*G_o;
ps(:,i) = H\g;
feasible(i) = all(0 <= ps(:,i)) && all(ps(:,i) <= p_max);
end
i = find(feasible,1,’last’);
p_star = ps(:,i);
S_star = S_target(i);
plot(S_target’,ps’)
hold on
plot(S_target’,0.1*ones(k,1),’k--’)
legend(’p_1’,’p_2’,’p_3’,’P^{max}’,’Location’,’NorthWest’)
ylabel(’Power allocation’)
xlabel(’S^{target}’)
3.30 Checking some range and nullspace conditions. Explain how to determine whether or
not the following statements hold:
3
Your answer can involve standard matrix operations on the matrices above, such as
addition, multiplication, transposition, concatenation (i.e., building block matrices),
and inversion, as well as a function Rank(X), that gives the rank of a matrix X, and
det(X), which gives the determinant of a (square) matrix X.
For example, you might assert that (a) holds if and only if Rank([A B]) = m. (This
is not correct; it’s just an example of what your answer might look like.)
You do not need to give a proof or long justification that your conditions are correct;
a short one or two sentence explanation for each statement is fine. Points will be
deducted from correct answers that are substantially longer than they need to be, or
are confusing (to us).
Solution.
4
if and only if x = 0 and z = 0, which is the same as saying that the columns of
[QA QB ] are linearly independent, or [QA QB ] has full rank. That is,
(Each of these matrices is full rank, so the rank is just the number of columns.)
Now, we can finally conclude that R(A) ∩ R(B) = R(QA ) ∩ R(QB ) = {0} if and
only if
Solution.
(a) To prove that UV is orthogonal we have to show that (UV )T (UV ) = I given
U T U = I and V T V = I. We have
(UV )T (UV ) = V T U T UV
= V TV (since U T U = I)
= I (since V T V = I)
5
Since a2 + c2 = 1 we can take a and c as the cosine and sine of an angle α
respectively, i.e., a = cos α and c = sin α. For a similar reason, we can take
b = sin β and d = cos β. Now ab + cd = 0 becomes
or
sin(α + β) = 0.
The sine of an angle is zero if and only if the angle is an integer multiple of π. So
α + β = kπ or β = kπ − α with k ∈ Z. Therefore
" #
cos α sin(kπ − α)
U= .
sin α cos(kπ − α)
Clearly, from the lecture notes, this represents a rotation. Note that in this
case det U = cos2 α + sin2 α = 1.
• k is odd so sin(kπ − α) = sin α and cos(kπ − α) = − cos α, and therefore
" #
cos α sin α
U= .
sin α − cos α
From the lecture notes, this represents a reflection. The determinant in this
case is det U = − cos2 α − sin2 α = −1.
Therefore we have shown that any orthogonal matrix in R2×2 is either a rotation
or reflection whether its determinant is +1 or −1 respectively.
6
• By = 0 for any y which is consistent.
• By 6= 0 for any y which is inconsistent.
If we find such a matrix B, we can quickly check whether y is consistent; we can send
an alarm if By 6= 0. Note that the first requirement says that every consistent y does
not trip the alarm; the second requirement states that every inconsistent y does trip
the alarm. Finally, the problem. Find an integrity monitor B for the matrix
1 2 1
1 −1 −2
A=
−2 1 3 .
1 −1 −2
1 1 0
Your B should have the smallest k (i.e., number of rows) as possible. As usual, you
have to explain what you’re doing, as well as giving us your explicit matrix B. You
must also verify that the matrix you choose satisfies the requirements. Hints:
• You might find one or more of the matlab commands orth, null, or qr useful.
Then again, you might not; there are many ways to find such a B.
• When checking that your B works, don’t expect to have By exactly zero for a
consistent y; because of roundoff errors in computer arithmetic, it will be really,
really small. That’s OK.
• Be very careful typing in the matrix A. It’s not just a random matrix.
Solution.
The key challenge in this problem is to restate everything in common linear algebra
and matrix terms. We need to find B ∈ Rk×m such that the following hold:
Let’s analyze the conditions, starting with the first one. The set of consistent mea-
surements is exactly equal to the range of the matrix A; so say that By = 0 for every
consistent y is the same as saying R(A) ⊆ N (B), i.e., every element in the range of
A is also in the nullspace of B. In terms of matrices, the first condition means that
for every x, we have BAx = 0. That’s true if and only if BA = 0. (Recall these
are matrices, so we can have BA = 0 without A = 0 or B = 0.) We now consider
the second condition. To say that every inconsistent y has By 6= 0 is equivalent to
saying that whenever By = 0, we have y is consistent. This is the same as saying
N (B) ⊆ R(A). Putting this together with the first condition, we get a really simple
condition: N (B) = R(A). In other words, we need to find a matrix B whose nullspace
is exactly equal to the range of A. Now to find such a B with smallest possible num-
ber of rows, we need B to be full rank. Its rank must be m minus the dimension of
7
the range of A, i.e., m − Rank(A). Now that we know what we’re looking for, there
are several ways to find such a B, given A. Note that whatever method we end up
using we can check that we’ve got a solution by checking that BA = 0 and B is full
rank. One method relies on the fact from lectures that for any matrix C, N (C) and
R(C T ) are orthogonal complements. It follows that N (B) and R(B T ) are orthogonal
complements, and so are R(A) and N (AT ). We require that N (B) = R(A), so this
means their orthogonal complements are equal, i.e., R(B T ) = N (AT ). In matlab, we
can compute a basis for the nullspace of AT using the command null. (In fact null
gives us an orthonormal basis for the nullspace, but for this problem all we care about
is that we get a basis for the nullspace.) This approach can be implemented with the
simple matlab code:
The matrix BA does turn out to be zero for all practical purposes; the entries are
very, very small, but nonzero because of roundoff error in computer arithmetic. One
subtlety you may or may not have noticed is that A is not full rank; it has rank 2. In
fact, its third column is equal to its second column minus its first column. That’s why
we end with k = 3, and not 2, as you might have expected. Another way to find such
a B uses the full QR factorization of A. If we have QR factorization
" #
R1
A = [Q1 Q2 ] ,
0
where [Q1 Q2 ] is orthogonal and R1 is upper triangular and invertible, then the columns
of Q1 are an orthonormal basis for the range of A, and the columns of Q2 are an
orthonormal basis for the orthogonal complement. Therefore we can take B = QT2 .
This approach can be carried out in matlab via
[Q,R]=qr(A);
Q2 = Q(:,[3,4,5]); % get the last three columns of Q
B = Q2’;
B*A rank(B)
8
5.1 Least-squares residuals. Suppose A is skinny and full-rank. Let xls be the least-squares
approximate solution of Ax = y, and let yls = Axls . Show that the residual vector
r = y − yls satisfies
krk2 = kyk2 − kyls k2 .
Also, give a brief geometric interpretation of this equality (just a couple of sentences,
and maybe a conceptual drawing).
Solution.
Let us first show that r ⊥ yls . Since yls = Axls = AA† y = A(AT A)−1 AT y
9
y
✂❊❊
✂ ❊
✂ ❊ −→ By Pythagoras’ theorem, kyk2 = kyls k2 + krk2
✂ ❊
✂ ❊
✂ ❊
✂ ❊
✂ ❊ krk
✂ ❊ R(A)
✂ ❊
kyk ✂ ❊
✂ ❊
✂ ❊
✂ ✏✏❊
✂ ❊ ❊
✂ ✏ ✏❊ ✏yls = Axls
✏
✂ ✏✏✏
✂✏✏ ky ls k
0
6.5 Image reconstruction from line integrals. In this problem we explore a simple version
of a tomography problem. We consider a square region, which we divide into an n × n
array of square pixels, as shown below.
x1 xn+1
x2
xn x2n xn2
The pixels are indexed column first, by a single index i ranging from 1 to n2 , as shown
above. We are interested in some physical property such as density (say) which varies
10
over the region. To simplify things, we’ll assume that the density is constant inside
2
each pixel, and we denote by xi the density in pixel i, i = 1, . . . , n2 . Thus, x ∈ Rn is
a vector that describes the density across the rectangular array of pixels. The problem
is to estimate the vector of densities x, from a set of sensor measurements that we now
describe. Each sensor measurement is a line integral of the density over a line L. In
addition, each measurement is corrupted by a (small) noise term. In other words, the
sensor measurement for line L is given by
n2
X
li xi + v,
i=1
where li is the length of the intersection of line L with pixel i (or zero if they don’t
intersect), and v is a (small) measurement noise. This is illustrated below for a problem
with n = 3. In this example, we have l1 = l6 = l8 = l9 = 0.
line L
x1 x4 l7
l4
x2 x5 x8
l5
l2
x3 x6 x9
l3
lij , i = 1, . . . , n2 , j = 1, . . . , N,
where lij gives the length of the intersection of line Lj with pixel i. Then, the whole
set of measurements forms a vector y ∈ RN whose elements are given by
n 2
X
yj = lij xi + vj , j = 1, . . . , N.
i=1
And now the problem: you will reconstruct the pixel densities x from the line integral
measurements y. The class webpage contains the M-file tomo_data.m, which you
should download and run in matlab. It creates the following variables:
11
• N, the number of measurements (N),
• n_pixels, the side length in pixels of the square region (n),
• y, a vector with the line integrals yj , j = 1, . . . , N,
• lines_d, a vector containing the displacement dj , j = 1, . . . , N, (distance from
the center of the region in pixels lengths) of each line, and
• lines_theta, a vector containing the angles θj , j = 1, . . . , N, of each line.
The file tmeasure.m, on the same webpage, shows how the measurements were com-
puted, in case you’re curious. You should take a look, but you don’t need to understand
it to solve the problem. We also provide the function line_pixel_length.m on the
webpage, which you do need to use in order to solve the problem. This function com-
putes the pixel intersection lengths for a given line. That is, given dj and θj (and the
side length n), line_pixel_length.m returns a n × n matrix, whose i, jth element
corresponds to the intersection length for pixel i, j on the image. Use this information
to find x, and display it as an image (of n by n pixels). You’ll know you have it right.
Matlab hints: Here are a few functions that you’ll find useful to display an image:
• A=reshape(v,n,m), converts the vector v (which must have n*m elements) into
an n × m matrix (the first column of A is the first n elements of v, etc.),
• imagesc(A), displays the matrix A as an image, scaled so that its lowest value is
black and its highest value is white,
• colormap gray, changes matlab’s image display mode to grayscaled (you’ll want
to do this to view the pixel patch),
• axis image, redefines the axes of a plot to make the pixels square.
Note: While irrelevant to your solution, this is actually a simple version of tomography,
best known for its application in medical imaging as the CAT scan. If an x-ray gets
attenuated at rate xi in pixel i (a little piece of a cross-section of your body), the j-th
measurement is 2
n
e−xi lij ,
Y
zj =
i=1
n2
X
yj = xi lij .
i=1
Solution.
The first thing to do is to restate the problem in the familiar form y = Ax + v. Here,
2
y ∈ RN is the measurement (given), x ∈ Rn is the physical quantity we are interested
2
in, A ∈ RN ×n is the relation between them, and v ∈ RN is the noise, or measurement
12
error (unknown, and we’ll not worry about it). So we need to find the elements of A
. . . how do we do that?
n2 n2
X X
Comparing y = Ax, i.e., yj = Aji xi with our model yj = lij xi + vj
i=1 i=1
tomodata
A=zeros(N,n_pixels^2);
for i=1:N
L=line_pixel_length(lines_d(i),lines_theta(i),n_pixels);
A(i,:)=L(:)’;
end
x_ls=A\y;
X_ls=zeros(n_pixels,n_pixels);
X_ls(:)=x_ls;
figure(1)
colormap gray
imagesc(X_ls)
axis image
13
5
10
15
20
25
30
5 10 15 20 25 30
14