Versuch 242: Spannungsverstärkung

Needs["ErrorBarPlots`"]

(Subscript[dat1a, 48.7])={
{Quantity[-0.25,"Volts"],Quantity[4,"Volts"]},
{Quantity[-0.20,"Volts"],Quantity[3.24,"Volts"]},
{Quantity[-0.15,"Volts"],Quantity[2.44,"Volts"]},
{Quantity[-0.10,"Volts"],Quantity[1.64,"Volts"]},
{Quantity[+0.10,"Volts"],Quantity[-1.60,"Volts"]},
{Quantity[+0.15,"Volts"],Quantity[-2.36,"Volts"]},
{Quantity[+0.20,"Volts"],Quantity[-3.16,"Volts"]},
{Quantity[+0.25,"Volts"],Quantity[-3.94,"Volts"]}
}

(Subscript[err1a, 48.7])={
{Quantity[0.005,"Volts"],Quantity[0.08,"Volts"]},{Quantity[0.005,"Volts"],Quantity[0.08,"Volts"]},{Quantity[0.005,"Volts"],Quantity[0.08,"Volts"]},{Quantity[0.003,"Volts"],Quantity[0.08,"Volts"]},{Quantity[0.003,"Volts"],Quantity[0.08,"Volts"]},{Quantity[0.005,"Volts"],Quantity[0.08,"Volts"]},{Quantity[0.005,"Volts"],Quantity[0.08,"Volts"]},{Quantity[0.005,"Volts"],Quantity[0.06,"Volts"]}
}

(Subscript[plot1a, 48.7])=With[{d=(Subscript[dat1a, 48.7]),e=(Subscript[err1a, 48.7])},ErrorListPlot[Table[{QuantityMagnitude/@d[[i]],ErrorBar@@QuantityMagnitude/@e[[i]]},{i,1,Length[d]}],ImageSize->Full,AxesLabel->{"(Subscript[U, 1]) [V]","(Subscript[U, A]) [V]"},PlotLabel->Style["Aufgabe 1 (a): (Subscript[R, G]) = 48.7 kΩ",Bold]]];

(Subscript[fit, 1,a,1])=With[{d=(Subscript[dat1a, 48.7]),e=(Subscript[err1a, 48.7])},LinearModelFit[QuantityMagnitude/@d,x,x,IncludeConstantBasis->False,Weights->(1/(Total/@QuantityMagnitude/@(e^2))),VarianceEstimatorFunction->(1&)]]

(Subscript[fit, 1,a,1])["ParameterTable"]

Show[(Subscript[plot1a, 48.7]),Plot[(Subscript[fit, 1,a,1])[x],{x,-1,1}]]

(Subscript[dat1a, 274])={
{Quantity[-0.25,"Volts"],Quantity[14.4,"Volts"]},
{Quantity[-0.20,"Volts"],Quantity[14.4,"Volts"]},
{Quantity[-0.15,"Volts"],Quantity[13.8,"Volts"]},
{Quantity[-0.10,"Volts"],Quantity[9.3,"Volts"]},
{Quantity[+0.10,"Volts"],Quantity[-8.8,"Volts"]},
{Quantity[+0.15,"Volts"],Quantity[-12.8,"Volts"]},
{Quantity[+0.20,"Volts"],Quantity[-12.8,"Volts"]},
{Quantity[+0.25,"Volts"],Quantity[-13.0,"Volts"]}
}

(Subscript[err1a, 274])={
{Quantity[0.005,"Volts"],Quantity[0.4,"Volts"]},{Quantity[0.005,"Volts"],Quantity[0.4,"Volts"]},{Quantity[0.005,"Volts"],Quantity[0.4,"Volts"]},{Quantity[0.003,"Volts"],Quantity[0.4,"Volts"]},{Quantity[0.003,"Volts"],Quantity[0.4,"Volts"]},{Quantity[0.005,"Volts"],Quantity[0.4,"Volts"]},{Quantity[0.005,"Volts"],Quantity[0.4,"Volts"]},{Quantity[0.005,"Volts"],Quantity[0.4,"Volts"]}
}

(Subscript[plot1a, 274])=With[{d=(Subscript[dat1a, 274]),e=(Subscript[err1a, 274])},ErrorListPlot[Table[{QuantityMagnitude/@d[[i]],ErrorBar@@QuantityMagnitude/@e[[i]]},{i,1,Length[d]}],ImageSize->Full,AxesLabel->{"(Subscript[U, 1]) [V]","(Subscript[U, A]) [V]"},PlotLabel->Style["Aufgabe 1 (a): (Subscript[R, G]) = 274 kΩ",Bold]]];

(Subscript[fit, 1,a,2])=With[{d=(Subscript[dat1a, 274])[[3;;6]],e=(Subscript[err1a, 274])[[3;;6]]},LinearModelFit[QuantityMagnitude/@d,x,x,IncludeConstantBasis->False,Weights->(1/(Total/@QuantityMagnitude/@(e^2))),VarianceEstimatorFunction->(1&)]]

(Subscript[fit, 1,a,2])["ParameterTable"]

Show[(Subscript[plot1a, 274]),Plot[(Subscript[fit, 1,a,2])[x],{x,-1,1}]]

(Subscript[dat1b, 274])={
{Quantity[0.15,"Volts"],Quantity[1.30,"Volts"]},
{Quantity[0.30,"Volts"],Quantity[2.63,"Volts"]},{Quantity[0.45,"Volts"],Quantity[3.93,"Volts"]},{Quantity[0.60,"Volts"],Quantity[5.28,"Volts"]},{Quantity[0.75,"Volts"],Quantity[6.58,"Volts"]},{Quantity[0.90,"Volts"],Quantity[7.84,"Volts"]}
}

(Subscript[err1b, 274])={
{Quantity[0.005,"Volts"],Quantity[0.01,"Volts"]},
{Quantity[0.005,"Volts"],Quantity[0.01,"Volts"]},{Quantity[0.005,"Volts"],Quantity[0.01,"Volts"]},{Quantity[0.01,"Volts"],Quantity[0.01,"Volts"]},{Quantity[0.01,"Volts"],Quantity[0.02,"Volts"]},{Quantity[0.02,"Volts"],Quantity[0.02,"Volts"]}
}

(Subscript[plot1b, 274])=With[{d=(Subscript[dat1b, 274]),e=(Subscript[err1b, 274])},ErrorListPlot[Table[{QuantityMagnitude/@d[[i]],ErrorBar@@QuantityMagnitude/@e[[i]]},{i,1,Length[d]}],AxesOrigin->{0,0},PlotRange->{{0,1.0},{0,8}}, ImageSize->Full,AxesLabel->{"(Subscript[U, G]) [(Subscript[V, pp])]","(Subscript[U, A]) [(Subscript[V, pp])]"},PlotLabel->Style["Aufgabe 1 (b): (Subscript[R, G]) = 274 kΩ",Bold]]];

(Subscript[fit, 1,b,1])=With[{d=(Subscript[dat1b, 274]),e=(Subscript[err1b, 274])},LinearModelFit[QuantityMagnitude/@d,x,x,IncludeConstantBasis->True,Weights->(1/(Total/@QuantityMagnitude/@(e^2))),VarianceEstimatorFunction->(1&)]]

(Subscript[fit, 1,b,1])["ParameterTable"]

Show[(Subscript[plot1b, 274]),Plot[(Subscript[fit, 1,b,1])[x],{x,-1,1}]]

(Subscript[dat1b, 680])={
{Quantity[0.15,"Volts"],Quantity[3.27,"Volts"]},
{Quantity[0.30,"Volts"],Quantity[6.44,"Volts"]},{Quantity[0.45,"Volts"],Quantity[9.88,"Volts"]},{Quantity[0.60,"Volts"],Quantity[13.0,"Volts"]},{Quantity[0.75,"Volts"],Quantity[16.2,"Volts"]},{Quantity[0.90,"Volts"],Quantity[19.2,"Volts"]}
}

(Subscript[err1b, 680])={
{Quantity[0.005,"Volts"],Quantity[0.01,"Volts"]},
{Quantity[0.005,"Volts"],Quantity[0.01,"Volts"]},{Quantity[0.005,"Volts"],Quantity[0.04,"Volts"]},{Quantity[0.01,"Volts"],Quantity[0.1,"Volts"]},{Quantity[0.01,"Volts"],Quantity[0.1,"Volts"]},{Quantity[0.02,"Volts"],Quantity[0.1,"Volts"]}
}

(Subscript[plot1b, 680])=With[{d=(Subscript[dat1b, 680]),e=(Subscript[err1b, 680])},ErrorListPlot[Table[{QuantityMagnitude/@d[[i]],ErrorBar@@QuantityMagnitude/@e[[i]]},{i,1,Length[d]}],AxesOrigin->{0,0},PlotRange->{{0,1.0},{0,20}},ImageSize->Full,AxesLabel->{"(Subscript[U, G]) [(Subscript[V, pp])]","(Subscript[U, A]) [(Subscript[V, pp])]"},PlotLabel->Style["Aufgabe 1 (b): (Subscript[R, G]) = 680 kΩ",Bold],ImageSize->Full]];

(Subscript[fit, 1,b,2])=With[{d=(Subscript[dat1b, 680]),e=(Subscript[err1b, 680])},LinearModelFit[QuantityMagnitude/@d,x,x,IncludeConstantBasis->False,Weights->(1/(Total/@QuantityMagnitude/@(e^2))),VarianceEstimatorFunction->(1&)]]

(Subscript[fit, 1,b,2])["ParameterTable"]

Show[(Subscript[plot1b, 680]),Plot[(Subscript[fit, 1,b,2])[x],{x,-1,1}]]

(Subscript[U, 2,a,1])=Quantity[0.03,"Volts"]

(Subscript[dat2a, 48.7])={
{Quantity[0.1,"Kilohertz"],Quantity[0.462,"Volts"]},
{Quantity[0.3,"Kilohertz"],Quantity[0.465,"Volts"]},
{Quantity[0.7,"Kilohertz"],Quantity[0.465,"Volts"]},
{Quantity[1,"Kilohertz"],Quantity[0.465,"Volts"]},
{Quantity[3,"Kilohertz"],Quantity[0.463,"Volts"]},
{Quantity[7,"Kilohertz"],Quantity[0.459,"Volts"]},
{Quantity[10,"Kilohertz"],Quantity[0.456,"Volts"]},
{Quantity[30,"Kilohertz"],Quantity[0.407,"Volts"]},
{Quantity[70,"Kilohertz"],Quantity[0.293,"Volts"]},
{Quantity[100,"Kilohertz"],Quantity[0.235,"Volts"]},
{Quantity[300,"Kilohertz"],Quantity[0.0876,"Volts"]}
}

(Subscript[err2a, 48.7])={
{Quantity[0.0001,"Kilohertz"],Quantity[0.001,"Volts"]},
{Quantity[0.0001,"Kilohertz"],Quantity[0.001,"Volts"]},
{Quantity[0.0001,"Kilohertz"],Quantity[0.001,"Volts"]},
{Quantity[0.0001,"Kilohertz"],Quantity[0.001,"Volts"]},
{Quantity[0.0002,"Kilohertz"],Quantity[0.002,"Volts"]},
{Quantity[0.0002,"Kilohertz"],Quantity[0.002,"Volts"]},
{Quantity[0.001,"Kilohertz"],Quantity[0.002,"Volts"]},
{Quantity[0.001,"Kilohertz"],Quantity[0.001,"Volts"]},
{Quantity[0.001,"Kilohertz"],Quantity[0.001,"Volts"]},
{Quantity[0.001,"Kilohertz"],Quantity[0.001,"Volts"]},
{Quantity[0.02,"Kilohertz"],Quantity[0.0004,"Volts"]}
}

{(Subscript[V, 2,a,48.7]),(Subscript[ΔV, 2,a,48.7])}=With[{f=#/{1,(Subscript[U, 2,a,1])}&},{f/@(Subscript[dat2a, 48.7]),f/@(Subscript[err2a, 48.7])}]

(Subscript[dat2a, 274])={
{Quantity[0.1,"Kilohertz"],Quantity[2.68,"Volts"]},
{Quantity[0.3,"Kilohertz"],Quantity[2.68,"Volts"]},
{Quantity[0.7,"Kilohertz"],Quantity[2.67,"Volts"]},
{Quantity[1,"Kilohertz"],Quantity[2.67,"Volts"]},
{Quantity[3,"Kilohertz"],Quantity[2.55,"Volts"]},
{Quantity[7,"Kilohertz"],Quantity[2.19,"Volts"]},
{Quantity[10,"Kilohertz"],Quantity[1.81,"Volts"]},
{Quantity[30,"Kilohertz"],Quantity[0.826,"Volts"]},
{Quantity[70,"Kilohertz"],Quantity[0.381,"Volts"]},
{Quantity[100,"Kilohertz"],Quantity[0.271,"Volts"]},
{Quantity[300,"Kilohertz"],Quantity[0.0900,"Volts"]}
}

(Subscript[err2a, 274])={
{Quantity[0.0001,"Kilohertz"],Quantity[0.02,"Volts"]},
{Quantity[0.0001,"Kilohertz"],Quantity[0.02,"Volts"]},
{Quantity[0.0001,"Kilohertz"],Quantity[0.02,"Volts"]},
{Quantity[0.0001,"Kilohertz"],Quantity[0.02,"Volts"]},
{Quantity[0.0002,"Kilohertz"],Quantity[0.02,"Volts"]},
{Quantity[0.0002,"Kilohertz"],Quantity[0.02,"Volts"]},
{Quantity[0.001,"Kilohertz"],Quantity[0.01,"Volts"]},
{Quantity[0.001,"Kilohertz"],Quantity[0.002,"Volts"]},
{Quantity[0.001,"Kilohertz"],Quantity[0.001,"Volts"]},
{Quantity[0.001,"Kilohertz"],Quantity[0.001,"Volts"]},
{Quantity[0.02,"Kilohertz"],Quantity[0.0004,"Volts"]}
}

{(Subscript[V, 2,a,274]),(Subscript[ΔV, 2,a,274])}=With[{f=#/{1,(Subscript[U, 2,a,1])}&},{f/@(Subscript[dat2a, 274]),f/@(Subscript[err2a, 274])}]

(Subscript[dat2a, 680])={
{Quantity[0.1,"Kilohertz"],Quantity[6.78,"Volts"]},
{Quantity[0.3,"Kilohertz"],Quantity[6.78,"Volts"]},
{Quantity[0.7,"Kilohertz"],Quantity[6.64,"Volts"]},
{Quantity[1,"Kilohertz"],Quantity[6.52,"Volts"]},
{Quantity[3,"Kilohertz"],Quantity[5.38,"Volts"]},
{Quantity[7,"Kilohertz"],Quantity[3.30,"Volts"]},
{Quantity[10,"Kilohertz"],Quantity[2.50,"Volts"]},
{Quantity[30,"Kilohertz"],Quantity[0.870,"Volts"]},
{Quantity[70,"Kilohertz"],Quantity[0.383,"Volts"]},
{Quantity[100,"Kilohertz"],Quantity[0.274,"Volts"]},
{Quantity[300,"Kilohertz"],Quantity[0.0904,"Volts"]}
}

(Subscript[err2a, 680])={
{Quantity[0.0001,"Kilohertz"],Quantity[0.02,"Volts"]},
{Quantity[0.0001,"Kilohertz"],Quantity[0.02,"Volts"]},
{Quantity[0.0001,"Kilohertz"],Quantity[0.02,"Volts"]},
{Quantity[0.0001,"Kilohertz"],Quantity[0.02,"Volts"]},
{Quantity[0.0002,"Kilohertz"],Quantity[0.02,"Volts"]},
{Quantity[0.0002,"Kilohertz"],Quantity[0.02,"Volts"]},
{Quantity[0.001,"Kilohertz"],Quantity[0.01,"Volts"]},
{Quantity[0.001,"Kilohertz"],Quantity[0.002,"Volts"]},
{Quantity[0.001,"Kilohertz"],Quantity[0.001,"Volts"]},
{Quantity[0.001,"Kilohertz"],Quantity[0.002,"Volts"]},
{Quantity[0.02,"Kilohertz"],Quantity[0.0004,"Volts"]}
}

{(Subscript[V, 2,a,680]),(Subscript[ΔV, 2,a,680])}=With[{f=#/{1,(Subscript[U, 2,a,1])}&},{f/@(Subscript[dat2a, 680]),f/@(Subscript[err2a, 680])}]

(Subscript[U, 2,b,1])=Quantity[0.1,"Volts"]

dat2b={
{Quantity[0.1,"Kilohertz"],Quantity[1.55,"Volts"]},
{Quantity[0.3,"Kilohertz"],Quantity[1.55,"Volts"]},
{Quantity[0.7,"Kilohertz"],Quantity[1.54,"Volts"]},
{Quantity[1,"Kilohertz"],Quantity[1.53,"Volts"]},
{Quantity[3,"Kilohertz"],Quantity[1.38,"Volts"]},
{Quantity[7,"Kilohertz"],Quantity[1.02,"Volts"]},
{Quantity[10,"Kilohertz"],Quantity[0.800,"Volts"]},
{Quantity[30,"Kilohertz"],Quantity[0.310,"Volts"]},
{Quantity[70,"Kilohertz"],Quantity[0.136,"Volts"]},
{Quantity[100,"Kilohertz"],Quantity[0.0964,"Volts"]},
{Quantity[300,"Kilohertz"],Quantity[0.0321,"Volts"]}
}

err2b={
{Quantity[0.0001,"Kilohertz"],Quantity[0.01,"Volts"]},
{Quantity[0.0001,"Kilohertz"],Quantity[0.01,"Volts"]},
{Quantity[0.0001,"Kilohertz"],Quantity[0.01,"Volts"]},
{Quantity[0.0001,"Kilohertz"],Quantity[0.01,"Volts"]},
{Quantity[0.0002,"Kilohertz"],Quantity[0.01,"Volts"]},
{Quantity[0.0002,"Kilohertz"],Quantity[0.01,"Volts"]},
{Quantity[0.001,"Kilohertz"],Quantity[0.004,"Volts"]},
{Quantity[0.001,"Kilohertz"],Quantity[0.002,"Volts"]},
{Quantity[0.001,"Kilohertz"],Quantity[0.001,"Volts"]},
{Quantity[0.001,"Kilohertz"],Quantity[0.0004,"Volts"]},
{Quantity[0.02,"Kilohertz"],Quantity[0.0001,"Volts"]}
}

{(Subscript[V, 2,b]),(Subscript[ΔV, 2,b])}=With[{f=#/{1,(Subscript[U, 2,b,1])}&},{f/@dat2b,f/@err2b}]

(Subscript[U, 2,c,1])=Quantity[0.1,"Volts"]

dat2c={
{Quantity[0.3,"Kilohertz"],Quantity[0.414,"Volts"]},
{Quantity[0.7,"Kilohertz"],Quantity[0.816,"Volts"]},
{Quantity[1,"Kilohertz"],Quantity[1.00,"Volts"]},
{Quantity[3,"Kilohertz"],Quantity[1.31,"Volts"]},
{Quantity[7,"Kilohertz"],Quantity[1.01,"Volts"]},
{Quantity[10,"Kilohertz"],Quantity[0.796,"Volts"]},
{Quantity[20,"Kilohertz"],Quantity[0.446,"Volts"]}
}

err2c={
{Quantity[0.0001,"Kilohertz"],Quantity[0.01,"Volts"]},
{Quantity[0.0001,"Kilohertz"],Quantity[0.01,"Volts"]},
{Quantity[0.0001,"Kilohertz"],Quantity[0.01,"Volts"]},
{Quantity[0.0002,"Kilohertz"],Quantity[0.01,"Volts"]},
{Quantity[0.0002,"Kilohertz"],Quantity[0.01,"Volts"]},
{Quantity[0.001,"Kilohertz"],Quantity[0.004,"Volts"]},
{Quantity[0.001,"Kilohertz"],Quantity[0.002,"Volts"]}
}

{(Subscript[V, 2,c]),(Subscript[ΔV, 2,c])}=With[{f=#/{1,(Subscript[U, 2,c,1])}&},{f/@dat2c,f/@err2c}]

u=0.05;

pa1=With[{r=48.7},With[{v=(Subscript[V, 2,a,r]),Δv=(Subscript[ΔV, 2,a,r])},Show[Table[ListLogLogPlot[QuantityMagnitude/@(v+sgn*Δv),Joined->True,Mesh->If[sgn==0,All,None],ImageSize->Full,PlotStyle->If[sgn==0,ColorData[1,1],Gray],AxesLabel->{"V'","f [kHz]"},PlotLegends->If[sgn==0,Placed[{ToString[r]<>" kΩ Gegenkopplung"},{Right,Top}],None],PlotLabel->Style["Frequenzgang mit "<>ToString[r]<>" kΩ Gegenkopplung",Bold]],{sgn,{-1,0,1}}]]]];

pa2=With[{r=274},With[{v=(Subscript[V, 2,a,r]),Δv=(Subscript[ΔV, 2,a,r])},Show[Table[ListLogLogPlot[QuantityMagnitude/@(v+sgn*Δv),Joined->True,Mesh->If[sgn==0,All,None],ImageSize->Full,PlotStyle->If[sgn==0,ColorData[1,2],Gray],AxesLabel->{"V'","f [kHz]"},PlotLegends->If[sgn==0,Placed[{ToString[r]<>" kΩ Gegenkopplung"},{Right,Top}],None],PlotLabel->Style["Frequenzgang mit "<>ToString[r]<>" kΩ Gegenkopplung",Bold]],{sgn,{-1,0,1}}]]]];

pa3=With[{r=680},With[{v=(Subscript[V, 2,a,r]),Δv=(Subscript[ΔV, 2,a,r])},Show[Table[ListLogLogPlot[QuantityMagnitude/@(v+sgn*Δv),Joined->True,Mesh->If[sgn==0,All,None],ImageSize->Full,PlotStyle->If[sgn==0,ColorData[1,3],Gray],AxesLabel->{"V'","f [kHz]"},PlotLegends->If[sgn==0,Placed[{ToString[r]<>" kΩ Gegenkopplung"},{Right,Top}],None],PlotLabel->Style["Frequenzgang mit "<>ToString[r]<>" kΩ Gegenkopplung",Bold]],{sgn,{-1,0,1}}]]]];

pb=With[{v=(Subscript[V, 2,b]),Δv=(Subscript[ΔV, 2,b])},Show[Table[ListLogLogPlot[QuantityMagnitude/@(v+sgn*Δv),Joined->True,Mesh->If[sgn==0,All,None],ImageSize->Full,PlotStyle->If[sgn==0,ColorData[1,4],Gray],AxesLabel->{"V'","f [kHz]"},PlotLegends->If[sgn==0,Placed[{"48.7 kΩ Gegenkopplung, Tiefpaß"},{Right,Top}],None],PlotLabel->Style["Frequenzgang mit 48.7 kΩ Gegenkopplung und Tiefpaß",Bold]],{sgn,{-1,0,1}}]]];

pc=With[{v=(Subscript[V, 2,c]),Δv=(Subscript[ΔV, 2,c])},Show[Table[ListLogLogPlot[QuantityMagnitude/@(v+sgn*Δv),Joined->True,Mesh->If[sgn==0,All,None],ImageSize->Full,PlotStyle->If[sgn==0,ColorData[1,5],Gray],AxesLabel->{"V'","f [kHz]"},PlotLegends->If[sgn==0,Placed[{"48.7 kΩ Gegenkopplung, Hoch- und Tiefpaß"},{Right,Top}],If[sgn==1,Placed[{"1σ-Konfidenzintervalle"},{Right,Top}],None],None],PlotLabel->Style["Frequenzgang mit 48.7 kΩ Gegenkopplung und Tief- und Hochpaß",Bold]],{sgn,{-1,0,1}}]]];

Show[ListLogLogPlot[{{1,1}},AxesLabel->{"V'","f [kHz]"},PlotLabel->Style["Frequenzgang",Bold],PlotRange->{{1,400},{3,250}}],pb,pa3,pa2,pa1,pc,ImageSize->Full]