Attachment 'SNR.m'
Download 1 % This script calculates the SNR along the line that goes from the crystal
2 % oscilaltor to the EOM of the 40 Upgrade RF plan.
3 % It is intended for the RF plan as shown in the yEd schematic;
4
5 s = [];
6 n = [];
7 gdB = [0 -1 8 -3.5 -3 7 -15 11 -3.5 -1.5 28.5];
8 nf = [];
9 numelements = 11;
10
11 nf = zeros(numelements,1);
12 nf(3) = 1.5;
13 nf(8) = 7.5;
14 nf(10) = 9;
15
16 nf = 10.^(nf/10);
17
18 s(1) = dBmtoWatts(13);
19 n(1) = dBmtoWatts(-170 + 10*log10(s(1)*1e3));
20
21 g = 10.^(gdB/10);
22
23 Ptn = 4*1.38e-23*290*1e3; % thermal noise power from a 50Ohm resistor
24
25 for i = 2 : numelements
26 s(i) = g(i) * s(i-1);
27 n(i) = g(i) * ( n(i-1) + nf(i) * Ptn );
28 end
29
30 sdBm = Watts2dBm(s)'
31 ndBm = Watts2dBm(n)'
32 snrdBc = sdBm - ndBm
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.
