Root Locus and Bode Plots
© 1998 Waterloo Maple Inc.
NOTE: This worksheet demonstrates Root Locus and Bode Plots using Maple.
Introduction
This worksheet demonstrates Maple's ability to plot and display Root Locus and Bode Plots.
> restart: with(plots):
Problem Definition
Define the rational portion of the loop-gain as some function f(s)=G(s)*H(s).
> f:=s->(10*s+100)/(s*(s+2)*(s+5));
Define a function for the root locus gain.
> gain:=s->1+K*f(s);
Plotting the Root Locus
Plot the root locus using the function 'rootlocus' from the plots package.
> rootlocus(f(s),s,-10..10,style=point,color=red,axes=normal);
Creating and Plotting the Bode Plot
Using the mouse pointer choose the root on the locus to be solved. Solve for K in the gain function. (This is a non-elegant method (rather than re-writing the library code) for grabbing the gain off the root locus plot).
> solve(gain(-7.84),K);
Construction of a bode plot is not directly supported by Maple, however, classical corner plot methods may still be employed.
The function would have three corner
frequencies at
= 2, 5, 10 rad/s. The pole at s = 0 gives
an asymptote with slope -20 dB/decade, passing through
rad/s. The other poles are added as follows.
> f1:=semilogplot(-20*log[10](s),s=1..2,y=-100..40):
> f2:=semilogplot(-40*log[10](s)+5,s=2..5,y=-100..40):
> f3:=semilogplot(-60*log[10](s)+20,s=5..1000,y=-100..40):
> display({f1},{f2},{f3});