RF Filter for TTFSS

Setup

Needs["Controls`LinearControl`"]

$TextStyle={FontFamily->"Helvetica",FontSize->13};

plotopt=PlotStyle->{{Thickness [0.007], RGBColor [1,0,0]},
			    {Thickness [0.007], RGBColor [0,0,1]},
			    {Thickness [0.007], RGBColor [0.1,0.7,0.2]},
			    {Thickness [0.007], RGBColor [0.5,0.5,0.2]}};

Parameters

par[r1_,r2_]:=(1/((1/r1)+(1/r2)))

prm1={R2->R1,C3->C2,L2->L1,RL2->RL1,C6->C5,R4->R3,R6->R5};

Standard

prm2={R1->182+50,C1->150*^-12,C2->0*^-12,L1->10*^-6,RL1->0,C4->1*^-9,R3->8+499,R5->2.00*^3,C5->15*^-12};

High Frequency Modification

Reduce C1 and C4 to 47 pF and reduce C5/C6 to 4.7 pF.

prm3={R1->182+50,C1->47*^-12,C2->0*^-12,L1->10*^-6,RL1->0,C4->47*^-12,R3->8+499,R5->2.00*^3,C5->4.7*^-12};

Equations

The schematics for this filter can be found at D1002471-v1.
The naming is as follows:
R1: "R17" in the schematics (source series resistor), needs to include source resistance!
R2: "R23", same resistor in the inverse input path,
C1: "C15" in the schematics, first filter cap across differential input path,
L1: "L3", series inductor of "cheby" filter,
L2: "L4", same in inverse path,
C2: "C14", series capacitor of "cheby" filter,
C3: "C19", same in inverse path,
C4: "C16", second filter cap across differential path,
C5: "C26", cap in parallel to R5,
C6: "C43", cap in parallel to R6,
R3: "R19", series resistor in diff. OpAmp path,
R4: "R20", same in inverse path,
R5: "R16", feedback resistor,
R6: "R24", equivalent resistor on the other leg,
RL1: ---, series resistance of L1 inductor,
RL2: ---, series resistance of L2 inductor.

eq1=((v1-vinp)/R1)+((v1-v2)/(1/(s C1)))+((v1-v3)/(par[s L1+RL1,(1/(s C2))]))==0
eq2=((v2-vinm)/R2)+((v2-v1)/(1/(s C1)))+((v2-v4)/(par[s L2+RL2,(1/(s C3))]))==0
eq3=((v3-v1)/(par[s L1+RL1,(1/(s C2))]))+((v3-v5)/R3)+((v3-v4)/(1/(s C4)))==0
eq4=((v4-v2)/(par[s L2+RL2,(1/(s C3))]))+((v4-v6)/R4)+((v4-v3)/(1/(s C4)))==0
eq5=((v5-v3)/R3)+((v5-vout)/(par[R5,(1/(s C5))]))==0
eq6=((v6-v4)/R4)+(v6/(par[R6,(1/(s C6))]))==0
eq7=v5==v6

Solutions

sol=(vout/(vinp-vinm))/.Solve[{eq1,eq2,eq3,eq4,eq5,eq6,eq7},vout,{v1,v2,v3,v4,v5,v6}][[1]];

sol2=Simplify[sol/.prm1]

Zeroes

Collect[Numerator[sol2],s]//Simplify
%/.RL1->0
f/.Solve[%==0/.s->-2π  f,f]/.prm2

Poles

Standard

Collect[Denominator[sol2],s]/.RL1->0
f/.Solve[%==0/.s->-2π f,f]/.prm2//N
Abs[%]
((Abs[%%])/(2 Re[%%]))

High Frequency Modification

Collect[Denominator[sol2],s]/.RL1->0
f/.Solve[%==0/.s->-2π f,f]/.prm3//N
Abs[%]
((Abs[%%])/(2 Re[%%]))

DC gain

dcgain=sol2/.s->0
%/.prm2
%%/.prm3

Bandwidth

Standard

FindRoot[Abs[(sol2/dcgain)/.s->2π I f/.prm2]==(1/(Sqrt[2])),{f,1*^6}]//Chop
FindRoot[Abs[(sol2/dcgain)/.s->2π I f/.prm3]==(1/(Sqrt[2])),{f,1*^7}]//Chop

Phase

Standard

{dB[#],((Arg[#])/Degree)}&[-sol2/.prm2/.s->2π I 100*^3]
{dB[#],((Arg[#])/Degree)}&[-sol2/.prm2/.s->2π I 500*^3]
{dB[#],((Arg[#])/Degree)}&[-sol2/.prm2/.s->2π I 1000*^3]
{dB[#],((Arg[#])/Degree)}&[-sol2/.prm2/.s->2π I 2000*^3]

High Frequency Modification

{dB[#],((Arg[#])/Degree)}&[-sol2/.prm3/.s->2π I 100*^3]
{dB[#],((Arg[#])/Degree)}&[-sol2/.prm3/.s->2π I 500*^3]
{dB[#],((Arg[#])/Degree)}&[-sol2/.prm3/.s->2π I 1000*^3]
{dB[#],((Arg[#])/Degree)}&[-sol2/.prm3/.s->2π I 2000*^3]

Plot

trans1=-sol2/.prm2/.s->2π I f;
trans2=-sol2/.prm3/.s->2π I f;
BodePlotEx[{trans1,trans2},{f,1*^3,100*^6},plotopt,BaseStyle->$TextStyle,MagnitudeRange->{-80,20}]