Changes

Jump to navigation Jump to search
272 bytes added ,  01:37, 29 September 2015
<!-- {{SyntaxHighlight| -->
{{Code|Creating the transfer function functions for the inverted pendulum|<syntaxhighlight lang="octave" style="font-size:13px">
m = 0.15;
l = 0.314;
g = 9.80665;
b = 20;
c = 0;
G1 = tf([m*l^2+I b -m*g*l],
[(M+m)*(m*l^2+I)-m^2*l^2 (M+m)*b+(m*l^2+I)*c -(M+m)*m*g*l+b*c -m*g*l*c 0])
[(M+m)*(m*l^2+I)-m^2*l^2 (M+m)*b+(m*l^2+I)*c -(M+m)*m*g*l+b*c -m*g*l*c])
</syntaxhighlight>}}
 
and by invoking the bode command
 
<!-- {{SyntaxHighlight| -->
{{Code|Bode plot for the inverted pendulum|<syntaxhighlight lang="octave" style="font-size:13px">
bode(G1);
bode(G2);
</syntaxhighlight>}}
 
One obtains the Bode plots of the two transfer functions.
==References==
501

edits

Navigation menu