Image:Pendulum-plots.png
From Wikipedia, the free encyclopedia
Size of this preview: 800 × 312 pixels
Full resolution (1,076 × 420 pixels, file size: 6 KB, MIME type: image/png)
[edit] Summary
Plots illustrating the behaviour of an inverted pendulum mounted on an oscillatory base. I created this image using Matlab. The following code is used in m-files to simulate the behaviour of the inverted pendulum on an oscillatory base:
The main program that creates the plot:
% initialisation
clear all % erasing all previously used variables
close all % closing open windows
clc %clear command prompt
% simulation
[T, XY] =ode45('diffxy',0,10,[0.1 0]);
%simulate differential equation for time = 0 to 10 sec, initial disturbance angle is 0.1 radian, initial velocity is zero
% plotting commands
plot(T,XY(:,1)*180/pi)
AXIS([0 5 -90 90])
ylabel('\theta [deg]')
xlabel('t [s]')
The program that implements the differential equation:
function dxy= diffxy(t, xy) % parameters g=9.81; %gravitational acceleration [m/s^2] l=1; %length of the pendulum [m] A=.05; %amplitude of the oscillation [m] omega=1000; % frequency of the oscillation [rad/sec] % implementation of the differential equation theta=xy(1); thetadot=xy(2); thetadot=thetadot; thetaddot=1/l*(-sin(theta)*(A*omega^2*cos(omega*t)-g)); % return result dxy=[thetadot, thetaddot]';
[edit] Licensing
| I, the copyright holder of this work, hereby release it into the public domain. This applies worldwide. In case this is not legally possible, |
File history
Click on a date/time to view the file as it appeared at that time.
| Date/Time | Dimensions | User | Comment | |
|---|---|---|---|---|
| current | 10:01, 19 February 2007 | 1,076×420 (6 KB) | Chojitsa (Talk | contribs) | (Plots illustrating the behaviour of an inverted pendulum mounted on a oscillatory base. (I created this image using Matlab)) |
- Search for duplicate files
- Edit this file using an external application
See the setup instructions for more information.
File links
The following pages on the English Wikipedia link to this file (pages on other projects are not listed):

