pendulum_example

pendulum_example - Pendulum Example Pendulums are very...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Pendulum Example Pendulums are very common to study in controls classes because they exhibit many interesting dynamic phenomena common to more complex systems, yet are very easy to model. Wikipedia has a thorough overview of the pendulum and history in the study of dynamic systems. This file is set up as one large function with no arguments. This lets us define nested functions within the file without having to create new files. (This file also contains embedded LaTeX markup so that it can be easily put into a pdf with equations using Matlab’s ”publish” command.) function pendulum_example A frictionless pendulum can be modeled by the single 2nd-order ODE ¨ θ + sin( θ ) = 0 which can be expressed as two 1st-order ODEs by forming the state vector x = parenleftbigg θ ˙ θ parenrightbigg and writing the state-space equation ˙ x = parenleftbigg x 2- sin( x 1 ) parenrightbigg Translate the above function to a form ode45 can understand. This will function dxdt = pendulum_frictionless(t, x)...
View Full Document

This note was uploaded on 05/27/2010 for the course MAE MAE143B taught by Professor Prof.bitmead during the Spring '10 term at UCSD.

Page1 / 6

pendulum_example - Pendulum Example Pendulums are very...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online