[next] [prev] [prev-tail] [tail] [up]
Problem: Generate a Bode plot for the continuous time system defined by the transfer function \[ H(s)=\frac {5s}{s^{2}+4s+25}\]
Mathematica
Clear["Global`*"]; tf=TransferFunctionModel[(5 s)/(s^2+4s+25),s]; BodePlot[tf, GridLines -> Automatic, ImageSize -> 300, FrameLabel -> {{{"magnitude (db)", None}, {None, "Bode plot"}}, {{"phase(deg)", None}, {"Frequency (rad/sec)", None}}}, ScalingFunctions -> {{"Log10", "dB"}, {"Log10", "Degree"}}, PlotRange -> {{{0.1, 100}, Automatic}, {{0.1, 100}, Automatic}} ]
Matlab
clear all; s = tf('s'); sys = 5*s / (s^2 + 4*s + 25); bode(sys); grid; set(gcf,'Position',[10,10,400,400]);
Maple
restart: alias(DS=DynamicSystems): sys:=DS:-TransferFunction(5*s/(s^2+4*s+25)): DS:-BodePlot(sys,output=dualaxis, range=0.1..100);
or can plot the the two bode figures on top of each others as follows
DS:-BodePlot(sys,size=[400,300], output=verticalplot,range=0.1..100);
[next] [prev] [prev-tail] [front] [up]