Fast Digital Servo: 
DAC Converter Module
T2400200-v1

Initialization

Needs["Controls`LinearControl`"]

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

plotopt=Sequence@@{GridLines->Automatic,Frame->True,FrameStyle->Thickness[0.0025],BaseStyle->{FontSize->12}};

plotoptn[n_Integer?(#>0∧#<9&)]:=Sequence@@{GridLines->Automatic,Frame->True,FrameStyle->Thickness[0.0025],PlotStyle->Take[{Black,Gray,Darker[Yellow],Purple,Brown,Darker[Green],Blue,Red},-n],BaseStyle->{FontSize->12}};
plotoptn[n_Integer?(#≤0∨#≥9&)]:=plotopt

mylegend[labels_List,pos_:Right]:={Placed[LineLegend[labels,LabelStyle->{FontSize->11},LegendMargins->2,LegendFunction->(Framed[#,Background->White]&)],pos]}

Parallel and Serial Impedance

par[r1_,r2_]:=(1/((1/r1)+(1/r2)))
par[r1_,r2_,r3_]:=(1/((1/r1)+(1/r2)+(1/r3)))
par[r1_,r2_,r3_,r4__]:=(1/((1/r1)+(1/r2)+(1/r3)+Plus@@((1/(List[r4])))))
ser[r1_,r2_]:=r1+r2
ser[r1_,r2_,r3_]:=r1+r2+r3
ser[r1_,r2_,r3_,r4__]:=r1+r2+r3+Plus@@List[r4]

fourkt={FourKT->1.62*^-20};(* (V^2)/Hz/Ohm; room temperature 20C *)

Pole/Zero

pole[f_,p_]:=(1/(1+I f/p))
zero[f_,p_]:=1+I f/p
pole[f_,p_,Q_]:=(1/(1+I(1/Q)(f/p)-(((f/p))^2)))
zero[f_,p_,Q_]:=1+I(1/Q)(f/p)-(((f/p))^2)

Parallel Capacitors

Calculations

Cpar=Simplify[par[(Subscript[R1, ESR])+(1/(I s C1)),(Subscript[R2, ESR])+(1/(I s C2))]]

Re[Cpar]//ComplexExpand//Simplify
LogLinearPlot[%/.{C1->10*^-6,(Subscript[R1, ESR])->0.015,C2->47*^-6,(Subscript[R2, ESR])->0.002,s->2π f},{f,1*^4,1*^6},PlotRange->All,Evaluate[plotoptn[1]]]

(Re[Cpar]//ComplexExpand//Simplify)/.s->0
%/.{C1->10*^-6,(Subscript[R1, ESR])->0.015,C2->47*^-6,(Subscript[R2, ESR])->0.002}

Im[(1/(s Cpar))]//ComplexExpand//Simplify
LogLinearPlot[%/.{C1->10*^-6,(Subscript[R1, ESR])->0.015,C2->47*^-6,(Subscript[R2, ESR])->0.002,s->2π f},{f,1*^4,1*^6},PlotRange->All,Evaluate[plotoptn[1]]]

(Im[(1/(s Cpar))]//ComplexExpand//Simplify)/.s->0
1*^6%/.{C1->10*^-6,(Subscript[R1, ESR])->0.015,C2->47.*^-6,(Subscript[R2, ESR])->0.002}

Approximate  Formulae

cappar[c1_,c2_]:=c1+c2 
esrpar[r1esr_,r2esr_,c1_,c2_]:=(((c1^2) r1esr+(c2^2) r2esr)/(((c1+c2))^2))

Pole/Zero Notation

par[(1/(s C1))+R1ESL,(1/(s C2))+R2ESL]//Together
Solve[Numerator[%]==0,s]
Solve[Denominator[%%]==0,s]

(1/(s C1))+R1ESL//Together
Solve[Numerator[%]==0,s]
Solve[Denominator[%%]==0,s]

Transfer Function of an OpAmp

This function computes the transfer function of an idealized OpAmp circuit
g: +1 for non-inverting configuration or -1 for inverting configuration, 0 for differential configuration
z2: Impedance in feedback path [Ohm]
z1: Impedance of input path (inverting) or impedance to ground (non-inverting) [Ohm]

OpAmp[g_,z1_,z2_]:=
Which[g>0,1+(z2/z1),g<0,-(z2/z1),True, (z2/z1)]

Noise of an OpAmp

This function computes the equivalent input noise of an OpAmp circuit
g: +1 for non-inverting configuration or -1 for inverting configuration, 0 for differential configuration
z1: Impedance of input path (inverting) or impedance to ground (non-inverting) [Ohm]
z2: Impedance over feedback path [Ohm]
en: voltage noise [Volt]
in: current noise [Ampere]

OpAmpNoise[g_,z1_,z2_,en_,in_]:=
Which[g>0,If[z1==Infinity,(Sqrt[(en^2)+FourKT Abs[z2]+(((in Abs[z2]))^2)]),(Sqrt[(en^2)+FourKT Abs[par[z1,z2]]+(((in Abs[par[z1,z2]]))^2)])],
g<0,√(((Abs[1+(z1/z2)])^2)(en^2)+((Abs[z1])^2)((in^2)+Abs[(FourKT/z1)]+Abs[(FourKT/z2)])),
True, √(((Abs[1+(z1/z2)])^2)(en^2)+2((Abs[z1])^2)((in^2)+Abs[(FourKT/z1)]+Abs[(FourKT/z2)]))]

Flicker Noise: The variable $Flicker determines if flicker noise is added or not. It can also be explicitly specified with the option Flicker.

$Flicker=True;
Clear[OpAmpNoiseFlicker];
Options[OpAmpNoiseFlicker]={Flicker:>$Flicker};
OpAmpNoiseFlicker[f_,fknee_,opts___]:=If[Flicker/.{opts}/.Options[OpAmpNoiseFlicker],(Sqrt[(fknee/f)+1]),1]
OpAmpNoiseFlicker[f_,fknee_,floor_,opts___]:=floor OpAmpNoiseFlicker[f,fknee,opts]

Series Product of OpAmps

Computes the transfer function of several OpAmps circuits in series.

OpAmpProduct[t_,m_]:=Product[t[i],{i,m}]

Computes the equivalent input noise of several OpAmps circuits in series.

NoiseSum[prev_,{t_,n_}]:=(Sqrt[(prev^2)+(n^2)])Abs[t]
OpAmpNoiseProduct[t_,n_,m_]:=((Fold[NoiseSum,0,Table[{t[i],n[i]},{i,m}]])/(Abs[OpAmpProduct[t,m]]))
OpAmpNoiseProductOut[t_,n_,m_]:=Fold[NoiseSum,0,Table[{t[i],n[i]},{i,m}]]

Spectrum Math

Propagate noise spectrum

SpecProp[prev_,t_]:={#[[1]],Abs[t/.s->2.π#[[1]]]#[[2]]}&/@prev
SpecProp[noise_,t_,m_]:=FoldList[SpecProp,noise,Table[t[i],{i,m}]]

RMS of spectrum

Clear[SpecRMS];
SpecRMS[l_List?(MatrixQ[#,NumberQ]&)]:=Block[{i,sqr=0},
For[i=1,i<Length[l],++i,
sqr+=(l[[i+1,1]]-l[[i,1]])(((((l[[i,2]]+l[[i+1,2]])/2)))^2)];
(Sqrt[sqr])]

Integrated RMS spectrum

Clear[RMSSpec];
RMSSpec[l_List?(MatrixQ[#,NumberQ]&),dir_:(-1)]:=Block[{i,sqr=0,r=N[l]},
If[dir≥0,
For[i=2,i≤Length[l],++i,
r[[i,2]]=(Sqrt[((r[[i-1,2]])^2)+((r[[i,2]])^2)(r[[i,1]]-r[[i-1,1]])])],
For[i=Length[l]-2,i>=1,--i,
r[[i,2]]=(Sqrt[((r[[i+1,2]])^2)+((r[[i,2]])^2)(r[[i+1,1]]-r[[i,1]])])]];
r]

OpAmp Parameters

Clear[AD829,OP27]
AD829[f_]:={s->2π I f,en->enAD829,in->inAD829,
enfloor->enfloorAD829,infloor->infloorAD829}//.{enAD829->OpAmpNoiseFlicker[f,ekneeAD829,enfloorAD829],inAD829->OpAmpNoiseFlicker[f,ikneeAD829,infloorAD829],
ekneeAD829->50,ikneeAD829->100,(*guess*)
enfloorAD829->1.7*^-9,infloorAD829->1.5*^-12};
OP27[f_]:={s->2π I f,en->enOP27,in->inOP27,
enfloor->enfloorOP27,infloor->infloorOP27}//.{enOP27->OpAmpNoiseFlicker[f,ekneeOP27,enfloorOP27],inOP27->OpAmpNoiseFlicker[f,ikneeOP27,infloorOP27],
ekneeOP27->2.7,ikneeOP27->140,
enfloorOP27->3.0*^-9,infloorOP27->0.4*^-12};
LT1028[f_]:={s->2π I f,en->enLT1028,in->inLT1028,
enfloor->enfloorLT1028,infloor->infloorLT1028}//.{enLT1028->OpAmpNoiseFlicker[f,ekneeLT1028,enfloorLT1028],inLT1028->OpAmpNoiseFlicker[f,ikneeLT1028,infloorLT1028],
ekneeLT1028->3.5,ikneeLT1028->250,
enfloorLT1028->0.85*^-9,infloorLT1028->1*^-12};
LT1128[f_]:={s->2π I f,en->enLT1128,in->inLT1128,
enfloor->enfloorLT1128,infloor->infloorLT1128}//.{enLT1128->OpAmpNoiseFlicker[f,ekneeLT1128,enfloorLT1128],inLT1128->OpAmpNoiseFlicker[f,ikneeLT1128,infloorLT1128],
ekneeLT1128->3.5,ikneeLT1128->250,
enfloorLT1128->0.85*^-9,infloorLT1128->1*^-12};
LT1007[f_]:={s->2π I f,en->enLT1007,in->inLT1007,
enfloor->enfloorLT1007,infloor->infloorLT1007}//.{enLT1007->OpAmpNoiseFlicker[f,ekneeLT1007,enfloorLT1007],inLT1007->OpAmpNoiseFlicker[f,ikneeLT1007,infloorLT1007],
ekneeLT1007->2.0,ikneeLT1007->120,
enfloorLT1007->2.5*^-9,infloorLT1007->0.4*^-12};
LT1037[f_]:={s->2π I f,en->enLT1037,in->inLT1037,
enfloor->enfloorLT1037,infloor->infloorLT1037}//.{enLT1037->OpAmpNoiseFlicker[f,ekneeLT1037,enfloorLT1037],inLT1037->OpAmpNoiseFlicker[f,ikneeLT1037,infloorLT1037],
ekneeLT1037->2.0,ikneeLT1037->120,
enfloorLT1037->2.5*^-9,infloorLT1037->0.4*^-12};
AD797[f_]:={s->2π I f,en->enAD797,in->inAD797,
enfloor->enfloorAD797,infloor->infloorAD797}//.{enAD797->OpAmpNoiseFlicker[f,ekneeAD797,enfloorAD797],inAD797->OpAmpNoiseFlicker[f,ikneeAD797,infloorAD797],
ekneeAD797->50,ikneeAD797->100,(*guess*)
enfloorAD797->0.9*^-9,infloorAD797->2*^-12};
LT1012[f_]:={s->2π I f,en->enLT1012,in->inLT1012,
enfloor->enfloorLT1012,infloor->infloorLT1012}//.{enLT1012->OpAmpNoiseFlicker[f,ekneeLT1012,enfloorLT1012],inLT1012->OpAmpNoiseFlicker[f,ikneeLT1012,infloorLT1012],
ekneeLT1012->2.5,ikneeLT1012->120,(*guess*)
enfloorLT1012->14*^-9,infloorLT1012->6*^-15};
LT1792[f_]:={s->2π I f,en->enLT1792,in->inLT1792,
enfloor->enfloorLT1792,infloor->infloorLT1792}//.{enLT1792->OpAmpNoiseFlicker[f,ekneeLT1792,enfloorLT1792],inLT1792->OpAmpNoiseFlicker[f,ikneeLT1792,infloorLT1792],
ekneeLT1792->30,ikneeLT1792->0,(*guess*)
enfloorLT1792->4.2*^-9,infloorLT1792->10*^-15};
ADA4625[f_]:={s->2π I f,en->enADA4625,in->inADA4625,
enfloor->enfloorADA4625,infloor->infloorADA4625}//.{enADA4625->OpAmpNoiseFlicker[f,ekneeADA4625,enfloorADA4625],inADA4625->OpAmpNoiseFlicker[f,ikneeADA4625,infloorADA4625],
ekneeADA4625->15,ikneeADA4625->0,(*guess*)
enfloorADA4625->3.3*^-9,infloorADA4625->4.5*^-15};
ADA4522[f_]:={s->2π I f,en->enADA4522,in->inADA4522,
enfloor->enfloorADA4522,infloor->infloorADA4522}//.{enADA4522->OpAmpNoiseFlicker[f,ekneeADA4522,enfloorADA4522],inADA4522->OpAmpNoiseFlicker[f,ikneeADA4522,infloorADA4522],
ekneeADA4522->0,ikneeADA4522->0,(*chopper*)
enfloorADA4522->7*^-9,infloorADA4522->1.2*^-12};
ADA4898[f_]:={s->2π I f,en->enADA4898,in->inADA4898,
enfloor->enfloorADA4898,infloor->infloorADA4898}//.{enADA4898->OpAmpNoiseFlicker[f,ekneeADA4898,enfloorADA4898],inADA4898->OpAmpNoiseFlicker[f,ikneeADA4898,infloorADA4898],
ekneeADA4898->10,ikneeADA4898->20,
enfloorADA4898->0.9*^-9,infloorADA4898->2.4*^-12};
PA98A[f_]:={s->2π I f,en->enPA98A,in->inPA98A,
enfloor->enfloorPA98A,infloor->infloorPA98A}//.{enPA98A->OpAmpNoiseFlicker[f,ekneePA98A,enfloorPA98A],inPA98A->OpAmpNoiseFlicker[f,ikneePA98A,infloorPA98A],
ekneePA98A->100(*guess*),ikneePA98A->120,(*guess*)
enfloorPA98A->4*^-9,infloorPA98A->1*^-12 (*guess*)};

ADA4898

LogLogPlot[1*^9 en//.ADA4898[f],{f,1,10*^3},FrameLabel->{"Hz","nV/(Sqrt[Hz])"},Evaluate[plotoptn[1]]]

LogLogPlot[1*^12 in//.ADA4898[f],{f,1,10*^3},FrameLabel->{"Hz","pA/(Sqrt[Hz])"},Evaluate[plotoptn[1]]]

DAC Whitening and Gain

Parameters

dacdewhite={w1->False,w2->False};
(*ADA4898[f] or AD829[f]*)

DAC (AD3552R) & Driver (AD8065)

Assume this is all part of the DAC output noise which is specified at ~95dB THD for ±10V range.

prmAD3552R={FS->10,THD->(10^(95/20)),BW->(2^22),flicker10->400*^-9};

dacnoise[f_]:=(Sqrt[((flicker10^2)/(f/10))+((((FS/((Sqrt[2])THD))(1/(Sqrt[BW]))))^2)])/.prmAD3552R (* nV/(Sqrt[Hz]) *)

LogLogPlot[1*^9 dacnoise[f],{f,1,100*^3},PlotRange->{50,1000},FrameLabel->{"Hz","nV/(Sqrt[Hz])"},Evaluate[plotoptn[1]]]

Snubber

prmSnubber={R->50,L->1.*^-6,R2->330,C->47*^-12};

Series resistor:

Abs[Simplify[par[2 π f I L, R]]]/.prmSnubber/.f->{10*^3,10*^6}

Voltage divider:

snubberz1[f_]:=par[2 π I f L, R]
snubberz2[f_]:=R2+(1/(2π I f C))
snubber[f_]:=Simplify[((snubberz2[f])/(snubberz1[f]+snubberz2[f]))]

BodePlotEx[snubber[f]/.prmSnubber,{f,1*^4,1*^9},plotoptn[1]]

BodePlotEx[{snubberz2[f],snubberz1[f]}/.prmSnubber,{f,1000,1*^9},plotoptn[2]]

First Stage: Dewhitening

z1A[1]:=1580+(1/(s 10*^-6))
z2A[1]:=par[15000,4990+(1/(s 24.7*^-12))]
z1B[1]:=∞
z2B[1]:=50
opamp[1]:=If[w1,((z1A[1])/(z1A[1]+z2A[1]))OpAmp[1,z1B[1],z2B[1]],1]
opampnoise[1]:=If[w1,Abs[((z1A[1]+z2A[1])/(z1A[1]))](Sqrt[((OpAmpNoise[1,z1A[1],z2A[1],en,in])^2)+FourKT Abs[z3]+(((in Abs[z3]))^2)])/.z3->par[z1A[1],z2A[1]],0]

LogLogPlot[1*^9 opampnoise[1]/.w1->True//.ADA4898[f]/.fourkt,{f,1,100*^3},PlotRange->{50,500},FrameLabel->{"Hz","nV/(Sqrt[Hz])"},Evaluate[plotoptn[1]]]

Second Stage: Dewhitening

z1A[2]:=1580+(1/(s 10*^-6))
z2A[2]:=par[15000,4990+(1/(s 24.7*^-12))]
z1B[2]:=∞
z2B[2]:=50
opamp[2]:=If[w2,((z1A[2])/(z1A[2]+z2A[2]))OpAmp[1,z1B[2],z2B[2]],1]
opampnoise[2]:=If[w2,Abs[((z1A[2]+z2A[2])/(z1A[2]))](Sqrt[((OpAmpNoise[1,z1A[2],z2A[2],en,in])^2)+FourKT Abs[z3]+(((in Abs[z3]))^2)])/.z3->par[z1A[2],z2A[2]],0]

Input Referred Noise

LogLogPlot[Evaluate[1*^9 {dacnoise[f],opampnoise[1],OpAmpNoiseProduct[opamp,opampnoise,2]}/.{w1->True,w2->True}//.ADA4898[f]/.fourkt],{f,1,100*^3},PlotRange->{50,2000},FrameLabel->{"Hz","nV/(Sqrt[Hz])"},Evaluate[plotoptn[3]],PlotLegends->mylegend[{"DAC noise","1 dewhitening stage","2 dewhitening stages"}]]

Output Referred Noise

LogLogPlot[Evaluate[1*^9{dacnoise[f],
OpAmpNoiseProductOut[opamp,opampnoise,2]/.{w1->True,w2->False},
OpAmpNoiseProductOut[opamp,opampnoise,2]/.{w1->True,w2->True}}//.ADA4898[f]/.fourkt],{f,1,10*^3},PlotRange->{5,500},PlotLabel->"Output Referred Noise",FrameLabel->{"Hz","nV/(Sqrt[Hz])"},Evaluate[plotoptn[3]],PlotLegends->mylegend[{"DAC noise","1 dewhitening stage","2 dewhitening stages"}]]

LogLogPlot[Evaluate[1*^9{dacnoise[f],Abs[OpAmpProduct[opamp,2]]dacnoise[f]/.{w1->True,w2->False},
Abs[OpAmpProduct[opamp,2]]dacnoise[f]/.{w1->True,w2->True}}//.ADA4898[f]/.fourkt],{f,1,10*^3},PlotRange->{1,1000},PlotLabel->"Output DAC Noise",FrameLabel->{"Hz","nV/(Sqrt[Hz])"},Evaluate[plotoptn[3]],PlotLegends->mylegend[{"Raw DAC noise","1 dewhitening stage","2 dewhitening stages"}]]

Differential Driver

Schematics

Negative Leg

zz1[1]:=R1
zz2[1]:=R2
oopamp[1]:=OpAmp[-1,zz1[1],zz2[1]]
oopampnoise[1]:=OpAmpNoise[-1,zz1[1],zz2[1],en,in]

PowerExpand[((OpAmpNoise[-1,zz1[1],zz2[1],0,0])^2),Assumptions->{R1>0,R2>0,FourKT>0}]
Simplify[%/.R1->2 R2]

PowerExpand[((OpAmpNoise[-1,zz1[1],zz2[1],en,0])^2)/.FourKT->0,Assumptions->{R1>0,R2>0}]
Simplify[%/.R1->2 R2]

PowerExpand[((OpAmpNoise[-1,zz1[1],zz2[1],0,in])^2)/.FourKT->0,Assumptions->{R1>0,R2>0}]
Simplify[%/.R1->2 R2]

Positive Leg

Equations

eq1=((vin-v1)/R3)+((-v1)/R4)+((v2-v1)/R5)==0
eq2=((vout-v2)/R6)+((v1-v2)/R5)==0
Solve[{eq1,eq2,v1==v2},{vout},{v1,v2}]
(vout/vin)/.%[[1]]

Noise

ipp=((vin-v1)/R3)+((-v1)/R4)+((v2-v1)/R5)+g3(Sqrt[(FourKT/R3)])+g4(Sqrt[(FourKT/R4)])+g5(Sqrt[(FourKT/R5)])==0;
inn=((vout-v2)/R6)+((v1-v2)/R5)+g5(Sqrt[(FourKT/R5)])+g6(Sqrt[(FourKT/R6)])==0;
sol=Solve[{ipp,inn,v1==v2},{vout},{v1,v2}][[1]]
gain=(vout/vin)/.sol/.{g3->0,g4->0,g5->0,g6->0}
t3=Simplify[(vout/gain)/.sol/.vin->0/.{g3->1,g4->0,g5->0,g6->0}];
t4=Simplify[(vout/gain)/.sol/.vin->0/.{g3->0,g4->1,g5->0,g6->0}];
t5=Simplify[(vout/gain)/.sol/.vin->0/.{g3->0,g4->0,g5->1,g6->0}];
t6=Simplify[(vout/gain)/.sol/.vin->0/.{g3->0,g4->0,g5->0,g6->1}];
FullSimplify[(t3^2)+(t4^2)+(t5^2)+(t6^2)]
%/.{R3->R6,R4->R6,R5->R6}
%%/.{R3->(4/3)R6,R4->(4/3) R6,R5->(4/3) R6}

ipp=((vin-v1)/R3)+((-v1)/R4)+((v2-v1)/R5)==0;
inn=((vout-v2)/R6)+((v1-v2)/R5)+in==0;
sol=Solve[{ipp,inn,v1==v2+en},{vout},{v1,v2}][[1]]
gain=(vout/vin)/.sol/.{in->0,en->0}
t1=Simplify[(vout/gain)/.sol/.vin->0/.{en->0}];
t2=Simplify[(vout/gain)/.sol/.vin->0/.{in->0}];
FullSimplify[(t1^2)+(t2^2)]
PowerExpand[%/.{R3->R6,R4->R6,R5->R6},Assumptions->R6>0]
PowerExpand[%%/.{R3->(4/3)R6,R4->(4/3)R6,R5->(4/3)R6},Assumptions->R6>0]

Total

OpAmpNoiseDiffDriverPos[r3_,r4_,r5_,r6_,en_,in_]:=√(((((r4 (r5+r6)+r3 (r4+r5+r6)))^2)/((r5^2)(r4^2)))(en^2) +(in^2)((((r3+r4))^2)/(r4^2))(r6^2)+FourKT (r3+((r3^2)/r4)+(((((r3+r4))^2) r6)/(r4^2))+((((r3 r4-(r3+r4) r6))^2)/((r4^2) r5))))
OpAmpNoiseDiffDriver[r1_,r2_,r3_,r4_,r5_,r6_,en_,in_]:=(Sqrt[((OpAmpNoise[-1,r1,r2,en,in])^2)+((OpAmpNoiseDiffDriverPos[r3,r4,r5,r6,en,in])^2)])

Gain (1/2) Differential Driver

noise=FullSimplify[PowerExpand[OpAmpNoiseDiffDriver[2 R,R,R,R,R,R,en,in],Assumptions->{R>0,FourKT>0}]]

Evaluate[1*^9{OpAmpNoise[-1,R,R,en,in],noise/.R->1000}//.ADA4898[f]/.fourkt]

1*^9 noise/.R->1000//.ADA4898[f]/.fourkt/.f->1000
LogLogPlot[Evaluate[1*^9{OpAmpNoiseDiffDriverPos[R,R,R,R,en,in],OpAmpNoise[-1,2R,R,en,in],noise}/.R->1000//.ADA4898[f]/.fourkt],{f,1,10*^3},PlotRange->{5,50},PlotLabel->"Differential Driver Noise (gain (1/2), input referred)",FrameLabel->{"Hz","nV/(Sqrt[Hz])"},Evaluate[plotoptn[3]],PlotLegends->mylegend[{"Positive Leg","Negative Leg","Total"}]]

Gain 1Differential Driver

noise1=FullSimplify[PowerExpand[OpAmpNoiseDiffDriver[R,R,0,r4,R,R,en,in],Assumptions->{R>0,FourKT>0}]]

Evaluate[1*^9{OpAmpNoiseDiffDriverPos[0,r4,R,R,en,in],OpAmpNoise[-1,R,R,en,in],noise1}/.R->2000//.ADA4898[f]/.fourkt]

1*^9 noise/.R->2000//.ADA4898[f]/.fourkt/.f->1000
LogLogPlot[Evaluate[1*^9{1.02
OpAmpNoiseDiffDriverPos[0,r4,R,R,en,in],OpAmpNoise[-1,R,R,en,in],noise1}/.R->2000//.ADA4898[f]/.fourkt],{f,1,10*^3},PlotRange->{5,50},PlotLabel->"Differential Driver Noise (gain 1, input referred)",FrameLabel->{"Hz","nV/(Sqrt[Hz])"},Evaluate[plotoptn[3]],PlotLegends->mylegend[{"Positive Leg","Negative Leg","Total"}]]

Whitening/Dewhitening  Filters

Whitening

prmWhitening={r1->15*^3,c1->33*^-12,r2->1.58*^3,c2->10*^-6};
sol=Together[1+((par[r1,(1/(s c1))])/(r2+(1/(s c2))))]
Solve[Numerator[sol]==0,s];
((-s)/(2.π))/.%/.prmWhitening
Solve[Denominator[sol]==0,s];
((-s)/(2.π))/.%/.prmWhitening

Dewhitening

prmDewhitening={r1->15*^3,r3->5*^3,c1->22*^-12+2.7*^-12,r2->1.58*^3,c2->10*^-6};
sol=Simplify[((r2+(1/(s c2)))/(par[r1,(1/(s c1))+r3]+r2+(1/(s c2))))]
Solve[Numerator[sol]==0,s]
((-s)/(2.π))/.%/.prmDewhitening
Solve[Denominator[sol]==0,s];
((-s)/(2.π))/.%/.prmDewhitening

Plots

Show[BodePlotEx[{Together[1+((par[r1,(1/(s c1))])/(r2+(1/(s c2))))]/.s->2π I f/.prmWhitening,Simplify[((r2+(1/(s c2)))/(par[r1,(1/(s c1))+r3]+r2+(1/(s c2))))]/.s->2π I f/.prmDewhitening,(Together[1+((par[r1,(1/(s c1))])/(r2+(1/(s c2))))]/.s->2π I f/.prmWhitening)(Simplify[((r2+(1/(s c2)))/(par[r1,(1/(s c1))+r3]+r2+(1/(s c2))))]/.s->2π I f/.prmDewhitening)},{f,0.1,1*^8},PlotRange->{5,50},PlotLabel->"Whitening/Dewhitening Transfer Function",Evaluate[plotoptn[3]],PlotLegends->mylegend[{"Whitening","Dewhitening","Combined"}],ImageSize->350],ImageSize->500]