RLC-calculator for a PCB trace

This article contains MATLAB script for the calculation of the parasitic parameters of the PCB trace.

Script limitations:

  • Valid under 1GHz
  • Skin effect is omitted
  • Copper roughness is omitted
  • Loss tangent is omitted
  • Geometry limitations:
  • W/H < 7.475 - 1.25*(T/H) - for a microstrip
  • W/B < 2.375 - 1.25*(T/B) - for a stripline

First coefficient in equation - conversion from inches to m.

H - height

W - width

Microstrip Equations:

R=1000ρ0(1+α(temp25))TW[mΩ/m]R = 1000 \frac{\rho_0(1 + \alpha (temp-25))}{TW} [m\Omega/m] C=26.378(ϵr+1.41)ln5.98H0.8W+T[pF/m]C = 26.378 \frac{ (\epsilon_r + 1.41)}{\ln{ \frac{5.98H}{0.8W + T} } } [pF/m] L=199.65ln5.98H0.8W+T[nH/m]L = 199.65 \ln \frac{ 5.98 H} {0.8W + T} [nH/m] Z=87ln5.98H0.8W+Tϵr+1.41Z = 87 \frac{\ln{\frac{5.98 H}{0.8W+ T}} }{ \sqrt{\epsilon_r + 1.41}}

Stripline Equations:

R=1000ρ0(1+α(temp25))TW[mΩ/m]R = 1000 \frac{\rho_0(1 + \alpha (temp-25))}{TW} [m\Omega/m] C=39.37ϵr2ln1.9B0.8W+T[pF/m]C = 39.37 \frac{ \epsilon_r \sqrt{2} }{\ln{ \frac{1.9 B}{0.8W + T} } } [pF/m] L=199.8425ln1.9B0.8W+T[nH/m]L = 199.8425 \ln \frac{ 1.9 B} {0.8W + T} [nH/m] Z=60ln1.9B0.8W+TϵrZ = 60 \frac{\ln{\frac{1.9 B}{0.8W+ T}} }{ \sqrt{\epsilon_r}}
1 2%% PCB lumped parameters calculator (microstrip/stripline) 3% Author: A.Sidun 4% Source: AnalogHub.ie 5% Limitations: 6% - Valid under 1GHz 7% - Skin effect is omitted 8% - Copper roughness is omitted 9% - Loss tangent is omitted 10% - Geometry limitations: 11% W/H < 7.475 - 1.25*(T/H) - for a microstrip 12% W/B < 2.375 - 1.25*(T/B) - for a stripline 13% Source: https://resources.system-analysis.cadence.com/blog/msa2021-is-there-a-pcb-trace-inductance-rule-of-thumb 14 15%% Input parameters 16type = "microstrip"; % can be microstrip or stripline 17temp = 25; % temperature [C] 18length = 1e-3; % trace length [m] 19width = 0.5e-3; % trace width [m] 20thickness = 35e-6; % trace thickness [m] 21height = 0.4e-3; % height over a plane [m] 22 23%% Constants 24ro = 1.724e-8; % resistivity of copper [Ohm/m] 25alpha = 3.9e-3; % temperature coefficient of copper 26eps_r = 4.46; % relative permittivity of copper 27 28%% Calculations 29B = 2*height+thickness; % plane-to-plane distance [m] 30switch type 31 case "microstrip" 32 if ( width/height < 7.475 - 1.25*(thickness/height) ) 33 R_lumped = 1e3*ro*(1 + alpha*(temp-25))/(thickness*width); % mOhms/meter 34 C_lumped = 26.378*(eps_r+1.41)/( log( 5.98*height/(0.8*width+thickness) ) ); % pF/meter 35 L_lumped = 199.65*log( 5.98*height/(0.8*width + thickness) ); % nH/meter 36 Z = 87*log(5.98*height/(0.8*width + thickness)) / sqrt(eps_r + 1.41); 37 38 R = R_lumped*length; % mOhm 39 L = L_lumped*length; % nH 40 C = C_lumped*length; % pF 41 42 disp("PCB " + type + " parameters:") 43 disp("R = " + R + " mOhms") 44 disp("C = " + C + " pF") 45 disp("L = " + L + " nH") 46 disp("Z = " + Z + " Ohm") 47 else 48 disp("Please check geometry of the trace.") 49 end 50 case "stripline" 51 if ( width/B < 2.375 - 1.25*(thickness/B) ) 52 R_lumped = 1e3*ro*(1 + alpha*(temp-25))/(thickness*width); % mOhms/meter 53 C_lumped = 39.37*eps_r*sqrt(2) / ( log(1.9*B/(0.8*width + thickness)) ); % pF/meter 54 L_lumped = 199.8425*log( 1.9*B/(0.8*width + thickness) ); % nH/meter 55 Z = 60*log(1.9*B/(0.8*width + thickness)) / sqrt(eps_r); 56 57 R = R_lumped*length; % mOhm 58 L = L_lumped*length; % nH 59 C = C_lumped*length; % pF 60 61 disp("PCB " + type + " parameters:") 62 disp("R = " + R + " mOhms") 63 disp("C = " + C + " pF") 64 disp("L = " + L + " nH") 65 disp("Z = " + Z + " Ohm") 66 else 67 disp("Please check geometry of the trace.") 68 end 69end