-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEVMSNR.html
More file actions
121 lines (115 loc) · 9.13 KB
/
Copy pathEVMSNR.html
File metadata and controls
121 lines (115 loc) · 9.13 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<!DOCTYPE html>
<html lang="en">
<head>
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4211938844076974"
crossorigin="anonymous"></script>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-6R4JGG0586"></script>
<script>window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments);}gtag('js',new Date());gtag('config','G-6R4JGG0586');</script>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>EVM ↔ SNR Converter — Error Vector Magnitude | RF Toolbox</title>
<meta name="description" content="Convert between error vector magnitude (EVM) and SNR/MER for digitally modulated signals, and see the densest QAM constellation the link can support.">
<meta name="robots" content="index, follow">
<link rel="canonical" href="https://rftoolbox.ca/EVMSNR.html">
<meta property="og:title" content="EVM ↔ SNR Converter | RF Toolbox">
<meta property="og:description" content="Convert error vector magnitude (EVM) to/from SNR/MER, with a suggested maximum QAM order.">
<meta property="og:url" content="https://rftoolbox.ca/EVMSNR.html">
<meta property="og:type" content="website">
<meta property="og:site_name" content="RF Toolbox">
<script src="MathJax.js"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjs/12.3.2/math.js" integrity="sha512-L6TOvunyzSyFBxlyKEYgAmofV+iAI+J9t3M9lc4smm/FbV8HlzKD+vflXUGjx8puTKzH7o4PCWsR4jDwlHXAHg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
<link rel="stylesheet" href="style.css">
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "SoftwareApplication",
"name": "EVM ↔ SNR Converter",
"description": "Convert between error vector magnitude (EVM) and SNR/MER for digitally modulated signals, with the densest supportable QAM order.",
"url": "https://rftoolbox.ca/EVMSNR.html",
"applicationCategory": "EngineeringApplication",
"operatingSystem": "Web",
"offers": {"@type": "Offer", "price": "0", "priceCurrency": "USD"},
"publisher": {"@type": "Organization", "name": "RF Toolbox", "url": "https://rftoolbox.ca"}
}
</script>
</head>
<body class="no-nav">
<header><h2><a href="index.html" style="color:white;text-decoration:none;">RF Toolbox</a></h2></header>
<section>
<article>
<div class="breadcrumb"><a href="index.html">⌂ Home</a></div>
<h3>EVM ↔ SNR Converter</h3>
<div class="tool-concept">
<p>Converts between error vector magnitude (EVM) and signal-to-noise ratio (equivalently MER) for a digitally modulated carrier. Enter <em>either</em> an EVM or an SNR and press Calculate; the other is computed, along with the densest QAM constellation the link can support. This assumes EVM is dominated by additive noise (it also captures phase noise, distortion and I/Q errors in practice, which only lower the achievable order).</p>
<details style="margin-top:8px;">
<summary style="cursor:pointer;font-size:11px;color:#AA77FF;font-weight:bold;letter-spacing:0.05em;text-transform:uppercase;user-select:none;">Equations & Parameters ▸</summary>
<div style="background:#f0eeff;border-left:3px solid #AA77FF;padding:8px 12px 6px;border-radius:0 4px 4px 0;margin:6px 0 10px;font-size:12.5px;line-height:2.2;overflow-x:auto;">\(\text{EVM}_{\text{rms}} = 10^{-\text{SNR}/20} \qquad \text{SNR (dB)} = -20\log_{10}\text{EVM}_{\text{rms}}\)<br>\(\text{EVM (dB)} = 20\log_{10}\text{EVM}_{\text{rms}} = -\text{SNR (dB)}\)</div>
<table style="font-size:12px;border-collapse:collapse;margin-top:6px;">
<tr><td style="padding:3px 14px 3px 0;font-weight:bold;color:#5533aa;white-space:nowrap;vertical-align:top;">EVM</td><td style="padding:3px 0;">RMS error vector magnitude, as a percentage of the reference constellation's RMS amplitude.</td></tr>
<tr><td style="padding:3px 14px 3px 0;font-weight:bold;color:#5533aa;white-space:nowrap;vertical-align:top;">SNR / MER</td><td style="padding:3px 0;">Signal-to-noise ratio (dB). For an ideal reference constellation the modulation error ratio (MER) equals the SNR.</td></tr>
<tr><td style="padding:3px 14px 3px 0;font-weight:bold;color:#5533aa;white-space:nowrap;vertical-align:top;">Max QAM</td><td style="padding:3px 0;">Densest constellation whose typical EVM limit (approx. 3GPP) is met by this EVM.</td></tr>
</table>
<div style="margin-top:8px;padding-top:6px;border-top:1px solid #e0d8ff;font-size:11.5px;color:#666;"><span style="font-weight:bold;color:#AA77FF;">References: </span>M. D. McKinley et al., "EVM calculation for broadband modulated signals," 64th ARFTG Conf., 2004. · 3GPP TS 38.104 (NR base-station EVM requirements).</div>
</details>
</div>
<div class="sec-lbl">Inputs</div>
<div class="inp-grid">
<div class="inp-row"><label>EVM <span style="color:#aaa;">(or leave blank)</span></label><div class="inp-inline"><input type="text" id="evm" placeholder="e.g. 5.6" data-tip="RMS EVM in percent. Fill this OR the SNR field."><span class="inp-units">%</span></div><span class="inp-hint">RMS, % of reference</span></div>
<div class="inp-row"><label>SNR / MER <span style="color:#aaa;">(or leave blank)</span></label><div class="inp-inline"><input type="text" id="snr" placeholder="e.g. 25" data-tip="SNR (= MER) in dB. Fill this OR the EVM field."><span class="inp-units">dB</span></div><span class="inp-hint">Equivalent SNR</span></div>
</div>
<div style="display:flex;gap:8px;align-items:center;margin:12px 0 6px;"><button class="calc-btn" id="btn">Calculate</button> <button class="example-btn" onclick="loadExample({"snr":"25","evm":""})" title="SNR = 25 dB → EVM">Load Example</button></div>
<div id="error" class="err-msg" style="color:#c0392b;font-size:12px;margin-bottom:6px;min-height:16px;"></div>
<div class="sec-lbl">Results</div>
<div class="res-grid">
<div class="res-card"><h4>Converted</h4>
<div class="res-row"><span class="res-lbl">EVM (rms)</span><span class="res-val" id="rEvm">—</span></div>
<div class="res-row"><span class="res-lbl">EVM (dB)</span><span class="res-val" id="rEvmDb">—</span></div>
<div class="res-row"><span class="res-lbl">SNR / MER</span><span class="res-val" id="rSnr">—</span></div>
</div>
<div class="res-card"><h4>Link capability</h4>
<div class="res-row"><span class="res-lbl">Suggested max QAM</span><span class="res-val" id="rQam">—</span></div>
</div>
</div>
<div class="sec-lbl">Diagram</div>
<div class="schematic-box"><div id="tool-diagram"></div></div>
<script>
function drawDiagram() {
var evm=parseFloat((document.getElementById('rEvm').textContent||'').replace(/[^0-9.]/g,''));
var W=560,H=200,cx=280,cy=100,R=70;
var s='<svg viewBox="0 0 '+W+' '+H+'" width="'+W+'" height="'+H+'" xmlns="http://www.w3.org/2000/svg" style="font-family:monospace;max-width:100%;">';
s+='<rect width="'+W+'" height="'+H+'" fill="#faf9ff" rx="4"/>';
if (isNaN(evm)) { s+='<text x="'+(W/2)+'" y="'+(H/2)+'" text-anchor="middle" font-size="12" fill="#999">Enter EVM or SNR and press Calculate</text></svg>'; document.getElementById('tool-diagram').innerHTML=s; return; }
// ideal symbol at (cx+R, cy), error cloud radius proportional to EVM (clamped)
var ex=cx+R, ey=cy;
var er=Math.min(48, (evm/100)*R*4 + 4); // visual scale
// axes
s+='<line x1="'+(cx-90)+'" y1="'+cy+'" x2="'+(cx+120)+'" y2="'+cy+'" stroke="#ddd" stroke-width="1"/>';
s+='<line x1="'+cx+'" y1="'+(cy-80)+'" x2="'+cx+'" y2="'+(cy+80)+'" stroke="#ddd" stroke-width="1"/>';
s+='<text x="'+(cx+124)+'" y="'+(cy+4)+'" font-size="10" fill="#aaa">I</text>';
s+='<text x="'+(cx+4)+'" y="'+(cy-82)+'" font-size="10" fill="#aaa">Q</text>';
// reference vector
s+='<line x1="'+cx+'" y1="'+cy+'" x2="'+ex+'" y2="'+ey+'" stroke="#5533aa" stroke-width="2"/>';
s+='<circle cx="'+ex+'" cy="'+ey+'" r="3.5" fill="#5533aa"/>';
s+='<text x="'+(ex)+'" y="'+(ey-8)+'" text-anchor="middle" font-size="10" fill="#5533aa">ideal</text>';
// error cloud
s+='<circle cx="'+ex+'" cy="'+ey+'" r="'+er.toFixed(1)+'" fill="#c0392b22" stroke="#c0392b" stroke-width="1.2" stroke-dasharray="3,2"/>';
// one measured point on the cloud edge
var mx=ex+er*0.6, my=ey-er*0.55;
s+='<line x1="'+ex+'" y1="'+ey+'" x2="'+mx.toFixed(1)+'" y2="'+my.toFixed(1)+'" stroke="#c0392b" stroke-width="1.6"/>';
s+='<circle cx="'+mx.toFixed(1)+'" cy="'+my.toFixed(1)+'" r="3" fill="#c0392b"/>';
s+='<text x="'+(cx)+'" y="'+(H-12)+'" text-anchor="middle" font-size="10.5" fill="#c0392b">error vector — EVM = '+evm.toFixed(2)+'%</text>';
s+='</svg>';
document.getElementById('tool-diagram').innerHTML=s;
}
</script>
<div class="wiki-link-hint">📖 <a href="wiki_modulation.html">Learn the theory behind this tool →</a></div>
<script src="EVMSNR.js"></script>
</article>
</section>
<footer><p><a href="index.html">Home</a> · <a href="wiki.html">📖 Wiki</a> · <a href="privacy.html">Privacy</a> · <a href="disclaimer.html">Disclaimer</a></p></footer>
<script src="tool-enhancements.js"></script>
</body>
</html>