程序代写案例-ELEE 5620

欢迎使用51辅导,51作业君孵化低价透明的学长辅导平台,服务保持优质,平均费用压低50%以上! 51fudao.top
University of Detroit Mercy
College of Engineering and Science
Department of Electrical and Computer Engineering and Computer Science
ELEE 5620: Random Variables and Processes
Final Computer Project
Receiver Operating Characteristic (ROC) Curves for
Binary Hypothesis-Testing Problems
Term I, Fall 2020
Due on Saturday, December 12, 2020, at 11:59 p.m.
Consider a radar system, which operates as follows:
• A known signal is transmitted.
• If a target is present, the signal is reflected back.
• If a target is not present, the signal is not reflected back.
• Noise is present at the receiver, which is usually co-located with the transmitter.
Let Y = [Y1, Y2, . . . , YK ]
T represent the vector of K samples of the received signal. Given the observation vector y =
[y1, y2, . . . , yK ]
T of Y, the goal is to determine which hypothesis is more likely to have resulted in the observation y:
H0 – The null hypothesis, i.e., the hypothesis that the target is not present to reflect the transmitted signal.
H1 – The alternate hypothesis, i.e., the hypothesis that the target is present and will reflect the transmitted signal.
The decision rule is then stated as follows:
• If P [H1|Y = y] > P [H0|Y = y], then decide H1;
• Otherwise, decide H0.
You have to find a rule that will provide a decision for each possible realization of the observation vector y.
Assume that the input to the radar receiver is a random vector Y. Suppose that under hypothesis H1, each component
of the observed vector at the receiver is a noisy version of a constant signal m, whereas each component of the observed
vector under hypothesis H0 is only noise. Each noise sample under any hypothesis is zero-mean, Gaussian random
variable ni with variance σ2. The noise samples at various instants are independent random variables. In summary, each
component of the observation vector under the two hypotheses is
H0 : yi = ni, i = 1, 2, . . . ,K.
H1 : yi = m+ ni, i = 1, 2, . . . ,K.
(1)
In other words, each element of the vector of observations has the following conditional distribution:
Yi|H0 ∼ N
(
0, σ2
)
Yi|H1 ∼ N
(
m,σ2
) (2)
Page 1 of 3
ELEE 5620: Random Variables and Processes | Final Computer Project Fall 2020
Define the signal-to-noise ratio (SNR) as
SNR =
m2
σ2
. (3)
Perform the following tasks, assuming that the a priori probabilities of the two hypotheses are p0 = P [H0] and p1 = P [H1]:
1. Derive the maximum a-posteriori probability (MAP) decision rule discussed above for the given observation model.
Your final decision rule must be in the form of
g(y) = g (y1, y2, . . . , yK)
Hˆ=H1

Hˆ=H0
VT , (4)
where g(·) is a function of all K observations, and the decision threshold VT is a function of p0, K, m, and σ.
2. Using the decision rule derived in Question 1, compute the probability of false alarm (here defined as PFA = P [Hˆ =
H1|H = H0]), the probability of detection (here defined as PD = P [Hˆ = H1|H = H1]), and the average error
probability (defined as Pe = P [Hˆ 6= H]). Your answers must be a function of the decision threshold VT , p0, K, m,
and σ.
Hint: As a first step, you can find the conditional distribution of the decision metric g(y), given each hypothesis.
3. Letm = 1. Write aMatlab function (or class if you prefer), called rocPlot, that accepts two inputs, namely the SNR
value (in dB units) and the number of observation samples K, and plots the receiver operating characteristic (ROC)
curve for the given SNR and K values. In a Matlab script, call the above function for SNRdB = {0, 2, 4, 6, 8, 10} and
K = {1, 2, 3, 4}. For each value of the number of observation samples K, show all six curves for different values of
the SNR on the same plot, making sure to use a descriptive legend to distinguish the curves. Furthermore, for each
value of the SNR from the set SNRdB = {0, 4, 8}, show all four curves for different values of the number of observation
samples on the same plot, making sure to use a descriptive legend to distinguish the curves. Clearly specify the axis
labels and use titles to identify the value of the SNR or K for each graph.
Recall that the ROC curve should show the locus of the probability of detection (PD) versus the probability of false
alarm (PFA) for all possible decision threshold values VT . Note that when the SNR is fixed, then the value of σ can be
found as σ = m/

SNR, where m = 1. To plot each ROC curve for a specific value of SNR, the corresponding value
for σ is found, the decision threshold VT will be changed by covering all possible values of 0 < p0 < 1, and the values
of PD and PFA are found for each possible threshold value VT .
Hint: You can use Matlab’s function qfunc to find the value of the Q(·) function, defined as
Q(x) =
1√
2pi
∫ ∞
x
e−
t2
2 dt.
If you do not have Communications Toolbox installed on your machine, you can use the error function, defined as
follows:
erf(x) =
2√
pi
∫ x
0
e−t
2
dt.
The error function can be accessed inMatlab using erf. The relationship between the error function and Q function
can be proven to be as follows:
Q(x) =
1
2
[
1− erf
(
x√
2
)]
=
1
2
erfc
(
x√
2
)
, (5)
where erfc is the complementary error function (Matlab function erfc) defined as follows:
erfc(x) = 1− erf(x) = 2√
pi
∫ ∞
x
e−t
2
dt.
Page 2 of 3
ELEE 5620: Random Variables and Processes | Final Computer Project Fall 2020
4. For each value of the number of observationsK, what is the minimum SNR (in dB units) that satisfies the specifications
PFA ≤ 10−6 and PD ≥ 0.99? Your answer must be accurate to four digits of precision. What is the corresponding
value of the decision threshold VT ? You must organize your answer in a well-formatted table.
Submission Guidelines
You should turn in the following items:
1. Your detailed derivations to answer Questions 1 and 2.
2. Your Matlab function or class, called rocPlot, to generate the ROC curve for a specific value of the SNR (in dB
units) and K, described in Question 3. Note that your code must be well documented with comments.
3. Your Matlab script that calls rocPlot function to generate all of the figures requested in Question 3. Note that
your code must be well documented with comments.
4. Four figures, each for a specific value of K = {1, 2, 3, 4}, showing the six ROC curves requested for different values
of the SNR. Be sure to label the axes and include a legend for the curves on the figure.
5. Three figures, each for a specific value of SNRdB = {0, 4, 8}, showing the four ROC curves requested for different
values of K. Be sure to label the axes and include a legend for the curves on the figure.
6. Your answer to Question 4 and the detailed process through which you were able to find it. Please summarize the
results in a table and argue how K and the minimum SNR that satisfies the required specifications are related.
Furthermore, include the Matlab code that you used to find the answer.
7. You should create a very short report that explains the Matlab codes that you have developed, describes the
figures, and clearly answers all of the above questions. You should upload your code and report on the course
website on Blackboard.
Honor Code Statement
All of the derivations, codes, figures, and report that you turn in must be entirely your own work. Do not share your
work with someone else, or use anybody else’s work. Failure to follow these guidelines will be dealt with seriously.
Page 3 of 3

欢迎咨询51作业君
51作业君

Email:51zuoyejun

@gmail.com

添加客服微信: abby12468