This preview has intentionally blurred sections. Sign up to view the full version.
View Full 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 2ndorder ODE ¨ θ + sin( θ ) = 0 which can be expressed as two 1storder ODEs by forming the state vector x = parenleftbigg θ ˙ θ parenrightbigg and writing the statespace 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.
 Spring '10
 Prof.Bitmead
 Controls

Click to edit the document details