Changes
Jump to navigation
Jump to search
← Older edit
Newer edit →
Control package
(edit)
Revision as of 01:37, 29 September 2015
272 bytes added
,
01:37, 29 September 2015
→Inverted Pendulum
Line 560:
Line 560:
<!-- {{SyntaxHighlight| -->
<!-- {{SyntaxHighlight| -->
−
{{Code|Creating the transfer
function
for the inverted pendulum|<syntaxhighlight lang="octave" style="font-size:13px">
+
{{Code|Creating the transfer
functions
for the inverted pendulum|<syntaxhighlight lang="octave" style="font-size:13px">
m = 0.15;
m = 0.15;
l = 0.314;
l = 0.314;
Line 567:
Line 567:
g = 9.80665;
g = 9.80665;
b = 20;
b = 20;
+
c = 0;
G1 = tf([m*l^2+I b -m*g*l],
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 0])
Line 572:
Line 573:
[(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])
[(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>}}
</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==
==References==
Rezahousseini
501
edits
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
Variants
Views
Read
Edit
View history
More
Search
Navigation
🏠 GNU Octave Wiki
⚙️ Installing
📦 Packages
📝 Contributed Code
🔬 Development
❓ FAQ
Wiki
Recent changes
Random page
Index
Help
Tools
Special pages
Printable version