-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmin_power_given_error_and_bandwidth.m
executable file
·47 lines (38 loc) · 1.34 KB
/
min_power_given_error_and_bandwidth.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
%%
% What should the minimum power level of the received signal (in dBm) in a receiver
% using equal power signals shown in Fig 1. to provide probability of error no
% higher than:
P_err = 0.15 % - INPUT
%%
% if the bandwidth and noise temperature are:
bandwidth_k = 20 % kHz - INPUT
T_noise = 900 + 25*6 % Kelvin - INPUT
%%
% _Look at the figure provided and determine whether it is antipodal or orthogonal._
%
% _If one signal is just a negative image of the other than they are considered
% *antipodal signals.*
% *Orthogonal signals* are when they have a dot product of zero, they are
% perpendicular, they have no relation.
% different)._
%
% _*Antipodal signals have twice the signal energy than that of orthogonal signals
% so set the below value to 2 if it is antipodal or 1 if it is orthogonal*_
energy_factor = 2 % - INPUT
%%
% Note that energy_factor is not a actual term so while writing this down leave
% it as an unnamed integer.
%
% Answer:
% P_err = Q(sqrt(SNR*energy_factor))
SNR = qfuncinv(P_err)^2 / energy_factor
% Boltzmann constant
k = 1.38e-23;
% Convert from kHz to Hz
bandwidth = bandwidth_k * 1e3;
% P_noise = kTB
P_noise = k * T_noise * bandwidth
% Calculate linear signal power from SNR = Ps / Pn
P_signal = SNR * P_noise
% Convert to dBm Ps_dBm = 10log10(Ps/1mW)
P_signal_dBm = 10 * log10(P_signal / 1e-3) % - OUTPUT ----->