-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGroupDelay.html
More file actions
111 lines (105 loc) · 8.97 KB
/
Copy pathGroupDelay.html
File metadata and controls
111 lines (105 loc) · 8.97 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
<!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>Filter Group Delay Calculator — Butterworth & Chebyshev Prototypes | RF Toolbox</title>
<meta name="description" content="Band-center group delay of a Butterworth or Chebyshev lowpass filter prototype from its order, ripple and cutoff, computed from the filter poles.">
<meta name="robots" content="index, follow">
<link rel="canonical" href="https://rftoolbox.ca/GroupDelay.html">
<meta property="og:title" content="Filter Group Delay Calculator | RF Toolbox">
<meta property="og:description" content="Band-center group delay of Butterworth/Chebyshev lowpass prototypes from order, ripple and cutoff.">
<meta property="og:url" content="https://rftoolbox.ca/GroupDelay.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": "Filter Group Delay Calculator",
"description": "Band-center group delay of a Butterworth or Chebyshev lowpass filter prototype from its order, ripple and cutoff, computed from the filter poles.",
"url": "https://rftoolbox.ca/GroupDelay.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>Filter Group Delay</h3>
<div class="tool-concept">
<p>Group delay — the delay a filter imposes on the signal envelope — is set by how fast the phase rotates with frequency, which in turn is set by the filter's poles. This tool computes the band-center (DC) group delay of a Butterworth or Chebyshev lowpass prototype directly from its poles. Sharper responses (higher order, more ripple) delay more and ring longer, which matters for pulse and data waveforms.</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;">\(\tau_g(\omega)=-\dfrac{d\phi}{d\omega}=\sum_k\dfrac{-\sigma_k}{\sigma_k^2+(\omega-\omega_k)^2}\)<br>\(\tau_g(0)=\sum_k\dfrac{-\sigma_k}{\sigma_k^2+\omega_k^2}\cdot\dfrac{1}{\omega_c},\quad \omega_c=2\pi f_c,\quad p_k=\sigma_k+j\omega_k\)</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;">Response</td><td style="padding:3px 0;">Butterworth (maximally flat) or Chebyshev (equiripple).</td></tr>
<tr><td style="padding:3px 14px 3px 0;font-weight:bold;color:#5533aa;white-space:nowrap;vertical-align:top;">n</td><td style="padding:3px 0;">Filter order (number of poles).</td></tr>
<tr><td style="padding:3px 14px 3px 0;font-weight:bold;color:#5533aa;white-space:nowrap;vertical-align:top;">R<sub>p</sub></td><td style="padding:3px 0;">Passband ripple (dB) — Chebyshev only.</td></tr>
<tr><td style="padding:3px 14px 3px 0;font-weight:bold;color:#5533aa;white-space:nowrap;vertical-align:top;">f<sub>c</sub></td><td style="padding:3px 0;">Cutoff frequency (MHz) — the prototype's ripple/−3 dB edge.</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;">Reference: </span>Standard lowpass-prototype pole locations; D. M. Pozar, <em>Microwave Engineering</em>, 4th ed. Delay computed at band center (DC) for the lowpass prototype.</div>
</details>
</div>
<div class="sec-lbl">Inputs</div>
<div class="inp-grid">
<div class="inp-row"><label>Response</label><div class="inp-inline"><select id="gd-type" style="font-size:12px;padding:3px;"><option value="butter" selected>Butterworth</option><option value="cheby">Chebyshev</option></select></div><span class="inp-hint">Prototype</span></div>
<div class="inp-row"><label>Order, <span class="var">n</span></label><div class="inp-inline"><input type="text" id="gd-n" placeholder="e.g. 3" data-tip="Filter order (1–12)."></div><span class="inp-hint">Poles</span></div>
<div class="inp-row"><label>Ripple, <span class="var">R<sub>p</sub></span></label><div class="inp-inline"><input type="text" id="gd-rp" placeholder="e.g. 0.5" data-tip="Passband ripple in dB (Chebyshev only)."><span class="inp-units">dB</span></div><span class="inp-hint">Chebyshev</span></div>
<div class="inp-row"><label>Cutoff, <span class="var">f<sub>c</sub></span></label><div class="inp-inline"><input type="text" id="gd-fc" placeholder="e.g. 10" data-tip="Cutoff frequency in MHz."><span class="inp-units">MHz</span></div><span class="inp-hint">Band edge</span></div>
</div>
<div style="display:flex;gap:8px;align-items:center;margin:12px 0 6px;"><button class="calc-btn" id="btn" onclick="gdCalc()">Calculate</button> <button class="example-btn" onclick="loadExample({"gd-type":"butter","gd-n":"3","gd-rp":"0.5","gd-fc":"10"})" title="3rd-order Butterworth, 10 MHz">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>Group delay</h4>
<div class="res-row"><span class="res-lbl">Band-center delay τ<sub>g</sub>(0)</span><span class="res-val" id="gd-tau">—</span></div>
<div class="res-row"><span class="res-lbl">Normalized τ·ω<sub>c</sub></span><span class="res-val" id="gd-norm">—</span></div>
<div class="res-row"><span class="res-lbl">Delay in cycles at f<sub>c</sub></span><span class="res-val" id="gd-cyc">—</span></div>
</div>
</div>
<div class="sec-lbl">Diagram</div>
<div class="schematic-box"><div id="tool-diagram"></div></div>
<script>
function drawDiagram() {
if (typeof gdPoles !== 'function') return;
var type = document.getElementById('gd-type').value;
var n = parseInt(document.getElementById('gd-n').value);
var rp = parseFloat(document.getElementById('gd-rp').value);
if (isNaN(n) || n < 1) return;
var poles = gdPoles(type, n, rp);
var W=560,H=200,cx=280,cy=100,sc=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"/>';
s+='<line x1="60" y1="'+cy+'" x2="500" y2="'+cy+'" stroke="#ccc" stroke-width="1"/>';
s+='<line x1="'+cx+'" y1="20" x2="'+cx+'" y2="180" stroke="#ccc" stroke-width="1"/>';
s+='<text x="496" y="'+(cy-6)+'" font-size="9" fill="#888">σ</text>';
s+='<text x="'+(cx+6)+'" y="28" font-size="9" fill="#888">jω</text>';
for(var i=0;i<poles.length;i++){var px=cx+poles[i][0]*sc,py=cy-poles[i][1]*sc;s+='<text x="'+px.toFixed(1)+'" y="'+(py+4).toFixed(1)+'" text-anchor="middle" font-size="14" fill="#5533aa">×</text>';}
s+='<text x="'+cx+'" y="194" text-anchor="middle" font-size="10" fill="#5533aa" font-weight="bold">pole locations (s-plane, ωc=1)</text>';
document.getElementById('tool-diagram').innerHTML=s+'</svg>';
}
</script>
<div class="wiki-link-hint">📖 <a href="wiki_group_delay.html">Learn about group delay →</a></div>
<script src="GroupDelay.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>