Pendulum Dynams Consder a smple pendulum wh a massless arm of lengh L and a pon mass, m, a he end of he arm. Assumng ha he fron n he sysem s proporonal o he negave of he angenal veloy, Newon s seond law gves: ma ma r = Fr radal dreon (1) = F angenal dreon () For a pendulum of fxed lengh, he radal aeleraon s zero; hus here s no moon n he radal dreon -- sne he sum of he fores n he radal dreon always balane (.e. he enson n he pendulum arm mus balane he radally ouward enrfugal fore and gravy fore omponens). Thus, of neres here s he angenal fore balane gven n eqn. (). Fousng on he angenal dreon, we see ha he lef hand sde (LHS) of eqn. () an be wren as dv dω d θ ma = m = ml = ml = ml θ '' (3) d d d where v = angenal veloy = Lω ω = angular veloy = dθ/d θ = angular poson On he RHS we have he fron fore and a fore due o gravy. Sne he fron fore s proporonal o he angenal veloy, we have dθ Ff = v = L = Lθ' (4) d where s he drag or fron oeffen (proporonaly onsan). For he gravy fore, we need he omponen n he dreon angen o he urve raed by he pon mass a he pon (L, θ), or Fg = mgsnθ Therefore, he equaon of moon for a smple pendulum wh a fxed arm of lengh L and pon mass, m, s gven by ml θ '' + L θ ' + mg sn θ= 0 Ths s a nd order nonlnear ODE. Wh gven values for he onsans and wh a se of spefed nal ondons, θ(0) and θ (0), hs nonlnear equaon an be solved numerally usng a sandard ODE solver (suh as ode45 n Malab). (5) (6)
Appled Problem Solvng wh Malab -- Pendulum Dynams If, however, he pendulum moon only produes relavely small angles hen, for θ 0, sn θ θ, and we have a lnearzed verson of he equaon of moon for he pendulum, ml θ '' + L θ ' + mgθ= 0 Ths s now a lnear onsan oeffen sysem ha s relavely easy o solve analyally. To demonsrae, le s assume he followng numeral values for he lnearzed model: m = 1 kg, = kg/s, L = 1 m, and g = 10 m/s along wh nal ondons (ICs) θ(0) = π/6 radans and θ (0) = 0 rad/s whh says ha he pendulum s nally a res a an angle of 30 degrees. Wh hese values, he nal value problem (IVP) beomes θ '' + θ ' + 10θ= 0 wh θ (0) =π 6 and θ '(0) = 0 (8) The unque soluon o hs IVP s gven as follows: r 1. Assume a soluon of he form θ () = e o develop he haraers equaon and s roos, (7) and r + r+ 10=0 ± 4 4(10) r1, = = 1± 3j. The general soluon s hen gven by and ( θ () = e os 3 + sn 3 1 ) θ '() = e 3 sn 3 + 3 os 3 e os 3 + sn 3 1 1 or θ = ( ) ( + ) '() e 3 os 3 3 sn 3 (10) 1 1 3. Now applyng he ICs gves he unque soluon, as follows: π π θ (0) = = (1) 1+ 0 or 1 = 6 6 IC#1: 1 1 π θ '(0) = 0 = (1) 3 1 0 or = 1 = 3 3 6 IC#: whh gves he angular poson versus me as π 1 θ () = e os3 + sn3 6 3 (11) and he angular veloy as (9) Leure Noes for Appled Problem Solvng Wh Malab by Dr. John R. Whe, UMass-Lowell (Sepember 006)
Appled Problem Solvng wh Malab -- Pendulum Dynams 3 10 π 5 ω () =θ '() = e sn3 = πe sn3 3 6 9 These funons, θ() and ω() = θ (), gve he desred angular poson and angular veloy versus me. These represen he sae of he sysem a any me. One he sae s known, we an ompue oher quanes for he sysem as desred. For example, he oal energy n hs mehanal sysem s gven by he sum of he poenal and kne energes, or or 1 Eo = Ep + Ek = mgh+ mv (13) 1 E o = mgl 1 osθ + ml θ ' (14) Thus, wh θ() and θ () known, we an easly fnd E p (), E k (), and E o (). Ths essenally omplees our analyal developmen, and we are now ready o evaluae and plo some of hese expressons o help us vsualze he overall behavor of hs parular sysem. ------------------------ Exra! Exra! Alhough s a lle more edous, s also usually muh more nsghful f he above analyal manpulaons an be done wh symbol varables nsead of numeral values. To gve us full flexbly wh hs problem, we repea he above developmen for he more general ase, as follows: We sar by resang he IVP as θ g '' + ' 0 wh (0) o and (0) '(0) m θ + L θ= θ =θ ω =θ =ω (15) o The haraers equaon s g r + r m + L =0 (16) wh he roos gven by r 1, g = ± m m L Now, one assumpon ha we wll make abou he pendulum s ha wll osllae abou s equlbrum pon (θ eq = 0 and ω eq = 0) afer some nal perurbaon a me zero. Ths means ha he fron, alhough nonzero, s no so grea as o ause over-dampng. In mahemaal erms, hs means ha we assume ha > L m (1) (17) Leure Noes for Appled Problem Solvng Wh Malab by Dr. John R. Whe, UMass-Lowell (Sepember 006)
Appled Problem Solvng wh Malab -- Pendulum Dynams 4 For hs ase, we wll have omplex onjugae roos, where r 1, =α±β α= (real par) (19) m β= L m (18) (magnary par) (0) wh he orrespondng general soluon for he pendulum poson gven as θ () = e osβ + snβ (1) 1 and he pendulum angular veloy gven by ω () =θ '() = e βsnβ + βosβ +αe osβ + snβ 1 1 or ω () = e β +α 1 os3 + α β1 snβ Now, wh he formal expressons for θ() and ω() n eqns. (1) and (), we an apply he nal ondons, as follows: IC#1: θ (0) =θ = or =θ (3) IC#: o 1 1 ω α ω =ω =β +α = β o 1 (0) o 1 or Fnally, pung hese no he general soluon gves he unque soluon for he lnearzed pendulum model. As a summary, we smply rewre he above equaons as par of an algorhm for mplemenng hese equaons no Malab (or any oher ompuaonal ool). The soluon algorhm requres he followng seps: 1. Defne problem parameers: m,, g, L, θ o, and ω o.. Compue real and omplex pars of he roos of he haraers equaon: α= and m 3. Compue he equaon oeffens: o β= L m ωo α1 1 =θ o and = β d =β +α 1 and d = α β 1 1 () (4) Leure Noes for Appled Problem Solvng Wh Malab by Dr. John R. Whe, UMass-Lowell (Sepember 006)
Appled Problem Solvng wh Malab -- Pendulum Dynams 5 4. Dsreze he me doman varable over an approprae doman ( = lnspae(0,5,101), for example, wll defne a dsree me veor wh 101 pons evenly spaed wh 0 and 5 seonds as he end pons). 5. Evaluae he angular poson and veloy a eah me pon (use veor arhme): θ () = e osβ + snβ 1 ω () = e d os 3 + d snβ 1 6. Evaluae he ndvdual omponens of he oal energy n he sysem [as mpled n eqns. (13) and (14)]. 7. Plo and nerpre he soluons as needed. Ths algorhm s really que sraghforward o mplemen n Malab. Noe ha here s no reason o subsue long algebra expressons no every equaon. Jus as we do n mahemas, we defne nermedae varables as needed o smplfy he mah. In programmng, we smply do he same hng when aually odng he equaons. Of ourse, we mus be sure ha all he nermedae erms are ompued before hey are used n subsequen evaluaons. Followng he above algorhm, sep by sep, should guaranee suess n our goal for evaluang and vsualzng he dynams of hs smple lnearzed pendulum model. Please see pendulum_1.m for he aual mplemenaon of he above algorhm Leure Noes for Appled Problem Solvng Wh Malab by Dr. John R. Whe, UMass-Lowell (Sepember 006)