| Author |
Comment/Response |
devil
|
02/20/13 07:16am
I found a solution for my problem.
Thanks for the help Bill!
Here the Code that find the cut-off frequency of a given system:
fmin = 10^-1; fmax = 10^5;
R1 = 100*10^3;
R2 = 1*10^3;
C1 = 1*10^-6;
G[s_] := (s*R1*C1)/(1 + s*R1*C1)*1/(100 + s*R2*C1);
fac = Factor[G[s]];
Print["G = ", fac];
ampl[f_] =
Simplify[Sqrt[
Re[ComplexExpand[G[2*Pi*f*I]]]^2 +
Im[ComplexExpand[G[2*Pi*f*I]]]^2 ], f > 0,
Assumptions -> Element[f, Reals]];
LogLinearPlot[20*Log[10, ampl[f]], {f, fmin, fmax},
AxesLabel -> {"f [Hz]", "|G| [dB]"}, GridLines -> Automatic,
ImageSize -> 800, Frame -> False]
ampl[f_] = 20*Log[10, ampl[10^f]];
abl2[f_] = FullSimplify[D[ampl[f], {f, 2}]];
(*Plot[abl2[f],{f,Log[10,fmin],Log[10,fmax]},AxesLabel->{"10^f \
[Hz]","|G|'' [dB]"},GridLines->Automatic, Frame->False]*)
abl3[f_] = FullSimplify[D[abl2[f], {f, 1}]];
(*Plot[abl3[f],{f,Log[10,fmin],Log[10,fmax]},AxesLabel->{"10^f \
[Hz]","|G|''' [dB]"},GridLines->Automatic, Frame->False]*)
fg = Solve[
abl3[f] == 0 && f >= Log[10, fmin] && f <= Log[10, fmax] &&
Element[f, Reals], f];
Do[If[Abs[abl2[f /. fg[[i]]]] > 0.05,
Print["fg_", i, " = ", N[10^f /. fg[[i]], 5], " Hz"]], {i, 1,
Length[nst3]}]
URL: , |
|