Series RLC Resonance, Q-Factor & Bode Magnitude Workbench
Interactive electrical engineering Bode magnitude sweep across R, L, and C with exact resonant f0 and Q-factor. · Creator: @commons-stem · License: CC-BY-4.0 · Sandbox: opaque-origin + connect-src 'none'
Inspect Verified Source & Ed25519 Receipt (BLAKE3 dbe365466d19ba1a…)
BLAKE3: dbe365466d19ba1a9f57a555347d23f43ecfc604f997790df4b886a607653e49 Ed25519: 22fa0c05ea61c5c846d1de3b3d15a49183dab0b04ffe8ffbbb0c5d054eafb07d0d01d49227fa85795c45f28c9db62a90acac3dbbb07ae86d7c116a010c4cc40a PubKey: fcfa833e7541ffbda4235fa7b41340c52fb1fe76ee7cad14fe0244361d838367
<!doctype html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><style>
*{box-sizing:border-box}
body{margin:0;padding:16px;background:#0a0c10;color:#eceef3;font:14px/1.5 system-ui,sans-serif;overflow-x:hidden}
.ctl{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:10px 14px;margin-bottom:12px}
label{font-size:12.5px;color:#8e97a8;display:flex;flex-direction:column;gap:4px;min-width:0}
input[type=range]{width:100%;min-height:38px;cursor:pointer;accent-color:#46e0c0}
canvas{display:block;width:100%;height:clamp(185px,42vh,280px);background:#131720;border:1px solid #252c3a;border-radius:10px}
</style></head><body>
<div class="ctl">
<label>R (Ω)<input id="r" type="range" min="2" max="150" value="18" oninput="plot()"></label>
<label>L (mH)<input id="l" type="range" min="1" max="50" value="10" oninput="plot()"></label>
<label>C (µF)<input id="c" type="range" min="1" max="50" value="4" oninput="plot()"></label>
</div>
<canvas id="cv" width="760" height="210"></canvas>
<div id="info" style="margin-top:8px;font-family:monospace;font-size:12.5px;color:#46e0c0;overflow-wrap:anywhere"></div>
<script>
function plot(){
const R=+document.getElementById('r').value, L=+document.getElementById('l').value*1e-3, C=+document.getElementById('c').value*1e-6;
const f0=1/(2*Math.PI*Math.sqrt(L*C)), Q=(1/R)*Math.sqrt(L/C);
const cv=document.getElementById('cv'),g=cv.getContext('2d');
g.clearRect(0,0,cv.width,cv.height);
g.strokeStyle='#46e0c0'; g.lineWidth=2.3; g.beginPath();
for(let i=0;i<=720;i+=3){
const f=Math.pow(10,1.5+(i/720)*3.2), w=2*Math.PI*f;
const z=Math.sqrt(R*R+Math.pow(w*L-1/(w*C),2));
const db=20*Math.log10(R/z);
const x=20+i, y=24+(-db/45)*170;
if(i===0)g.moveTo(x,y); else g.lineTo(x,Math.min(200,Math.max(8,y)));
}
g.stroke();
document.getElementById('info').textContent=`f₀ = ${f0.toFixed(1)} Hz · Q = ${Q.toFixed(2)} · Bandwidth Δf = ${(f0/Q).toFixed(1)} Hz`;
}
plot();
</script></body></html>