(%i1) load("/home/vcaeken/Desktop/rfMaxima.mac")$

Result

Constant-k Section Analysis

(See "Microwave Engineering, 2nd Ed., by D. Pozar, Wiley, 1998, p. 433)

1 Without Assumptions for Z_1 and Z_2

1.1 ABCD-, G-, H-, S-, Y- and Z-Parameters

(%i2) Solution:linsolve([v_in-v_1=Z_1/2*i_in,v_out-v_1=Z_1/2*i_out,v_1=Z_2*i_1,i_in+i_out=i_1],[i_in,i_out,i_1,v_1]);
TwoPortMatrices(Solution);

Result

1.2 Characteristic Impedance, Z_0, and Propagation Constant, %gamma

(%i4) solve(S(s)[1,1]=0,Z_0);
doallmxops:true$
solve(determinant(ABCD(s)-pow_e_gamma*ident(2))=0,pow_e_gamma);

Result

2 Assuming Z_1=s*L and Z_2=1/(s*C)

2.1 ABCD-, G-, H-, S-, Y- and Z-Parameters

(%i7) declare(C,real)$
declare(L,real)$
assume(C>0)$
assume(L>0)$
assume(Z_0>0)$
Z_1:s*L$
Z_2:1/(s*C)$
TwoPortMatrices(Solution);

Result

(%i15) SParameters(S);

Result

(%i16) Stability(S);

Result

2.2 Characteristic Impedance, Z_iT, and Propagation Constant, %gamma

(%i17) solve(ev(S(s)[1,1])=0,Z_0);

Result

(%i18) define(Z_iT(s),rhs(last(%)));

Result

(%i19) doallmxops:true$
solve(determinant(ev(ABCD(%i*%omega))-pow_e_gamma*ident(2))=0,pow_e_gamma);

Result

(%i21) define(pow_e_gamma(%omega),rhs(last(%)));

Result

2.3 A (Attenuation per Section), %phi (Phase Shift per Section) and tau_g (Group Delay per Section)

(%i22) define(A(%omega),realpart(ev(log(pow_e_gamma(%omega)))));
define(%phi(%omega),imagpart(ev(log(pow_e_gamma(%omega)))));

Result

(%i24) %omega_c:2/sqrt(L*C);
A(%omega_c);
%phi(%omega_c);

Result

(%i27) C:5e-15$
L:75e-12$
Z_0:50$

(%i30) PlotSmithChart([
    parametric,
    realpart(S(%i*2*%pi*f)[1,1]),
    imagpart(S(%i*2*%pi*f)[1,1]),
    [f,1e6,20e9],
    [nticks,100]]);
PlotSmithChart([
    parametric,
    realpart(S(%i*2*%pi*f)[1,2]),
    imagpart(S(%i*2*%pi*f)[1,2]),
    [f,1e6,20e9],
    [nticks,100]]);
PlotSmithChart([
    parametric,
    realpart(S(%i*2*%pi*f)[2,1]),
    imagpart(S(%i*2*%pi*f)[2,1]),
    [f,1e6,20e9],
    [nticks,100]]);
PlotSmithChart([
    parametric,
    realpart(S(%i*2*%pi*f)[2,2]),
    imagpart(S(%i*2*%pi*f)[2,2]),
    [f,1e6,20e9],
    [nticks,100]]);

Result

(%i34) wxplot2d(ev(20*log10(Abs_S11(2*%pi*f*1e9))),
[f,0.1,20],
[legend,false],
[xlabel,"Frequency [GHz]"],
[ylabel,"dB20(|S11|)"],
[style,[lines,3,2]],
[gnuplot_preamble,"set grid"])$
wxplot2d(ev(20*log10(Abs_S12(2*%pi*f*1e9))),
[f,0.1,20],
[legend,false],
[xlabel,"Frequency [GHz]"],
[ylabel,"dB20(|S12|)"],
[style,[lines,3,2]],
[gnuplot_preamble,"set grid"])$
wxplot2d(ev(20*log10(Abs_S21(2*%pi*f*1e9))),
[f,0.1,20],
[legend,false],
[xlabel,"Frequency [GHz]"],
[ylabel,"dB20(|S21|)"],
[style,[lines,3,2]],
[gnuplot_preamble,"set grid"])$
wxplot2d(ev(20*log10(Abs_S22(2*%pi*f*1e9))),
[f,0.1,20],
[legend,false],
[xlabel,"Frequency [GHz]"],
[ylabel,"dB20(|S22|)"],
[style,[lines,3,2]],
[gnuplot_preamble,"set grid"])$
wxplot2d(ev(Arg_S11(2*%pi*f*1e9)*180/%pi),
[f,0.1,20],
[legend,false],
[xlabel,"Frequency [GHz]"],
[ylabel,"S11 (°)"],
[style,[lines,3,2]],
[gnuplot_preamble,"set grid"])$
wxplot2d(ev(Arg_S12(2*%pi*f*1e9)*180/%pi),
[f,0.1,20],
[legend,false],
[xlabel,"Frequency [GHz]"],
[ylabel,"S12 (°)"],
[style,[lines,3,2]],
[gnuplot_preamble,"set grid"])$
wxplot2d(ev(Arg_S21(2*%pi*f*1e9)*180/%pi),
[f,0.1,20],
[legend,false],
[xlabel,"Frequency [GHz]"],
[ylabel,"S21 (°)"],
[style,[lines,3,2]],
[gnuplot_preamble,"set grid"])$
wxplot2d(ev(Arg_S22(2*%pi*f*1e9)*180/%pi),
[f,0.1,20],
[legend,false],
[xlabel,"Frequency [GHz]"],
[ylabel,"S22 (°)"],
[style,[lines,3,2]],
[gnuplot_preamble,"set grid"])$

Result

(%i42) wxplot2d(ev((R_IN(2*%pi*f*1e9))),
[f,0.1,20],
[legend,false],
[xlabel,"Frequency [GHz]"],
[ylabel,"R_IN [Ohm]"],
[style,[lines,3,2]],
[gnuplot_preamble,"set grid"])$
wxplot2d(ev((X_IN(2*%pi*f*1e9))),
[f,0.1,20],
[legend,false],
[xlabel,"Frequency [GHz]"],
[ylabel,"X_IN [Ohm]"],
[style,[lines,3,2]],
[gnuplot_preamble,"set grid"]);
wxplot2d(ev((R_OUT(2*%pi*f*1e9))),
[f,0.1,20],
[legend,false],
[xlabel,"Frequency [GHz]"],
[ylabel,"R_OUT [Ohm]"],
[style,[lines,3,2]],
[gnuplot_preamble,"set grid"])$
wxplot2d(ev((X_OUT(2*%pi*f*1e9))),
[f,0.1,20],
[legend,false],
[xlabel,"Frequency [GHz]"],
[ylabel,"X_OUT [Ohm]"],
[style,[lines,3,2]],
[gnuplot_preamble,"set grid"])$
wxplot2d(ev((tau_g(2*%pi*f*1e9))*1e12),
[f,0.1,20],
[legend,false],
[xlabel,"Frequency [GHz]"],
[ylabel,"Group Delay [pS]"],
[style,[lines,3,2]],
[gnuplot_preamble,"set grid"])$

Result

(%i47) load("/home/vcaeken/Desktop/coma")$
step_response(1/ABCD(s)[1,1]);

Result


Created with wxMaxima.