(%i1) | load("/home/vcaeken/Desktop/rfMaxima.mac")$ |
Real Transformer
(See: http://www.analog-electronics.eu/analog-electronics/modified-nodal-analysis/modified-nodal-analysis.xhtml)
1 4-Port Model of Real Transformer
4-Port Y-parameters of the real transformer
(%i2) |
declare(k,real)$ declare(L1,real)$ declare(L2,real)$ declare(Z_0,real)$ assume(k>0)$ assume(L1>0)$ assume(L2>0)$ assume(Z_0>0)$ |
k is the coupling factor of the transformer.
M is the mutual inductance of the transformer.
(%i10) | M:k*sqrt(L1+L2); |
(%i11) |
Y_REAL_TRANSFORMER:1/(1-k^2)*matrix( [1/(s*L1),-1/(s*L1),-k/(s*sqrt(L1*L2)),k/(s*sqrt(L1*L2))], [-1/(s*L1),1/(s*L1),k/(s*sqrt(L1*L2)),-k/(s*sqrt(L1*L2))], [-k/(s*sqrt(L1*L2)),k/(s*sqrt(L1*L2)),1/(s*L2),-1/(s*L2)], [k/(s*sqrt(L1*L2)),-k/(s*sqrt(L1*L2)),-1/(s*L2),1/(s*L2)]); |
(%i12) | Y_REAL_TRANSFORMER.matrix([v1],[v2],[v3],[v4]); |
2-Port parameters of the real transformer
(%i13) |
Solution:linsolve([ i1=(k*v4)/((1-k^2)*s*sqrt(L1*L2))-(k*v3)/((1-k^2)*s*sqrt(L1*L2))-v2/((1-k^2)*s*L1)+v1/((1-k^2)*s*L1), i2=-(k*v4)/((1-k^2)*s*sqrt(L1*L2))+(k*v3)/((1-k^2)*s*sqrt(L1*L2))+v2/((1-k^2)*s*L1)-v1/((1-k^2)*s*L1), i3=(k*v2)/((1-k^2)*s*sqrt(L1*L2))-(k*v1)/((1-k^2)*s*sqrt(L1*L2))-v4/((1-k^2)*s*L2)+v3/((1-k^2)*s*L2), i4=-(k*v2)/((1-k^2)*s*sqrt(L1*L2))+(k*v1)/((1-k^2)*s*sqrt(L1*L2))+v4/((1-k^2)*s*L2)-v3/((1-k^2)*s*L2), v2=0, v4=0, i2=-i1, i4=-i3, v1=v_in, v3=v_out, i1=i_in, i3=i_out],[i1,i2,i3,i4,v1,v2,v3,v4,i_in,i_out]); |
(%i14) | TwoPortMatrices(Solution); |
(%i15) | SParameters(S); |
2 2-Port Model of Capacitively-Tuned Real Transformer
(%i16) |
declare(C,real)$ assume(C>0)$ |
(%i18) |
Solution:linsolve([ i1=(k*v4)/((1-k^2)*s*sqrt(L1*L2))-(k*v3)/((1-k^2)*s*sqrt(L1*L2))-v2/((1-k^2)*s*L1)+v1/((1-k^2)*s*L1), i2=-(k*v4)/((1-k^2)*s*sqrt(L1*L2))+(k*v3)/((1-k^2)*s*sqrt(L1*L2))+v2/((1-k^2)*s*L1)-v1/((1-k^2)*s*L1), i3=(k*v2)/((1-k^2)*s*sqrt(L1*L2))-(k*v1)/((1-k^2)*s*sqrt(L1*L2))-v4/((1-k^2)*s*L2)+v3/((1-k^2)*s*L2), i4=-(k*v2)/((1-k^2)*s*sqrt(L1*L2))+(k*v1)/((1-k^2)*s*sqrt(L1*L2))+v4/((1-k^2)*s*L2)-v3/((1-k^2)*s*L2), v2=0, v4=0, i2=-i1, i4=-i3, v_in=v1, v_out=v3, v_in=1/(s*C)*i5, i_in=i5+i1, i_out=i3],[i1,i2,i3,i4,i5,v1,v2,v3,v4,i_in,i_out]); |
(%i19) | TwoPortMatrices(Solution); |
(%i20) | SParameters(S); |
3 2-Port Model of Capacitively-Tuned Real and Lossy Transformer
(%i21) |
declare(R1,real)$ declare(R2,real)$ assume(R1>0)$ assume(R2>0)$ |
(%i25) |
Solution:linsolve([ i1=(k*v4)/((1-k^2)*s*sqrt(L1*L2))-(k*v3)/((1-k^2)*s*sqrt(L1*L2))-v2/((1-k^2)*s*L1)+v1/((1-k^2)*s*L1), i2=-(k*v4)/((1-k^2)*s*sqrt(L1*L2))+(k*v3)/((1-k^2)*s*sqrt(L1*L2))+v2/((1-k^2)*s*L1)-v1/((1-k^2)*s*L1), i3=(k*v2)/((1-k^2)*s*sqrt(L1*L2))-(k*v1)/((1-k^2)*s*sqrt(L1*L2))-v4/((1-k^2)*s*L2)+v3/((1-k^2)*s*L2), i4=-(k*v2)/((1-k^2)*s*sqrt(L1*L2))+(k*v1)/((1-k^2)*s*sqrt(L1*L2))+v4/((1-k^2)*s*L2)-v3/((1-k^2)*s*L2), v2=0, v4=0, i2=-i1, i4=-i3, v0-v1=R1*i_in, v_in=v0, v_out=v5, v5-v3=R2*i_out, v_in=1/(s*C)*i5, i_in=i5+i1, i_out=i3],[i1,i2,i3,i4,i5,v0,v1,v2,v3,v4,v5,i_in,i_out]); |
(%i26) | TwoPortMatrices(Solution); |
(%i27) | SParameters(S); |
(%i28) |
L1:2e-9$ L2:2e-9$ k:0.9$ Z_0:50$ |
(%i32) |
fres:2e9$ C:1/((2*%pi*fres)^2*L1)$ float(C); Q1:10$ Q2:10$ R1:2*%pi*fres*L1/Q1$ float(R1); R2:2*%pi*fres*L2/Q2$ float(R2); |
(%i41) |
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]]); |
(%i45) |
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"])$ |
(%i53) |
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"])$ |