Group Abstract Group Abstract

Message Boards Message Boards

Bode Plot - Customization of axis

Posted 2 years ago
Attachments:
POSTED BY: Cornel B.
2 Replies
Posted 2 years ago

The code that you posted does not change the display of the frequency axis from w to frequency (w being equal to 2pifreq (w=2pifreq)) - but at least it displays Magnitude[dB], Phase[deg], and Frequency[Hz] as text on the graphs. Anyway, I found how to do it:

H = (0.31831 (1 + 7.95775*10^-8 s))/(1 + 7.95775*10^-8 s + 2.53303*10^-14 s^2)
H = TransferFunctionModel[{H}, s]
BodePlot[H[I*2*\[Pi]*f], {f, 10^1, 1.5*10^6}, GridLines -> Automatic, 
 PlotRange -> {{-20, 15}, {10, -20}}, Frame -> False]

enter image description here enter image description here

POSTED BY: Cornel B.

Looks like it's not easy to fix this. See here and here for more info ?

I have only this:

 H = (0.31831 (1 + 7.95775*10^-8 s))/(1 + 7.95775*10^-8 s + 2.53303*10^-14 s^2);
 BodePlot[TransferFunctionModel[{H}, s], {w, 10^1, 10^7}, 
  PlotRange -> {{-20, 15}, {10, -20}}, GridLines -> Automatic, 
  FrameLabel -> {{"", 
     HoldForm[Text[Magnitude[dB]]]}, {HoldForm[Text[Frequency[Hz]]], 
     HoldForm[Text[Phase [Radian]]]}}, 
  ScalingFunctions -> {{"Log10", "dB"}, {"Log10", "Radian"}}]
 (* Or: *)
 BodePlot[TransferFunctionModel[{H}, s], {w, 10^1, 10^7}, 
   PlotRange -> {{-20, 15}, {10, -20}}, GridLines -> Automatic, 
   FrameLabel -> {{"", 
      HoldForm[Text[Magnitude[dB]]]}, {HoldForm[Text[Frequency[Hz]]], 
      HoldForm[Text[Phase [deg]]]}}, 
   ScalingFunctions -> {{"Log10", "dB"}, {"Log10", "Degree"}}]

Regards M.I.

POSTED BY: Mariusz Iwaniuk
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard