Transcript for:
Understanding Moving Pendulum Dynamics

[Music] okay so let's continue after drawing equation for pendulum and inverted pendulum let's go ahead with the uh moving pendulum so if this is you when you walk and I can take out your leg with the hip when you walk or dance H and this is move your hip motion X oft is moving and your leg is rotating at the same time okay so this is moving pel problem and you can have it on the r on the Mars one degre of Freedom robot is moving the base and the arm is rotating at the same time this can be also a moving pendulum okay so if is that the case let us draw the equation of the motion see the difference between the fixed pendulum and what make a moving MLB okay here is as you know we have done million times L sin Theta L cosine Theta and mg Point O can be your hip and and now you know this is moving as as a function of time x of T Point O is moving okay so what have to do as I did for the pendulum moving pendulum which equation I have to use which equation look at your notes yeah moment equation right s Point O is i o is it recording yeah okay yes I can use it right everyone can I say yes sir obviously no and you are graduating means that you have to go and retake your me 220 Dynamics course huh this is the result of just being Lum right I'm just writing again on even then to graduate you 30 years engineer in NASA moment equation I always teach in my Dynamic course moment equation is only valid around a fixed point no motion or mass Center Point O is moving I'm telling you because your hip so you cannot apply it you can apply only around the masser here MC in this in this form I applied for the pendulum and inverted pendulum because point0 was fixed right like the clock of your grandparents home just alate you cannot use it cannot can't okay if the point is moving point O is moving so some of the moments around Point O you cannot do that bye-bye we can only use some of the moments here around Point MC Mass center I AMC Theta double dot this is Golden Rule in Trivial Dynamics m220 if you had with me I T it and you forgot it if you didn't have I don't care okay understand so being said now I can apply that from me2 20 and I said this is the particle pulum means has no Dimension so around its own Mass center I IMC is zero remember pulum own Mass C is zero because it's a particle particle has no Dimension page one chapter one of me22 difference between Dynamics and rid Val okay page one chapter one of Dynamics so this side is zero okay now we have to see the other forces because now we are measuring everything with respect to masser here so we have a reaction force here say FX and FY does mg generate any moment around Mass center mg no because p through that point so only FX and FY doesn't okay so you're going to say FX normal distance normal distance is this normal distance here is 90° right L cine Theta as I taugh you and I taugh you how to determine the sign of that it's around Mass center you fix Mass center in the Page by your finger and you up apply FX so if you apply FX around masser it's going to increase Theta or decrease Theta this is just huh increase so going to be positive helping helping from kindergarten helping resisting right everyone so now FY FY in normal distance normal distance is this 90° 9 0 that's right L sin th now again fix Mass center because is around the mass Center if you apply FY it's going to decrease or increase uh F huh decrease decrease means resistance negative that's the Golden Rule clockwise cont clockwise is good for Dynamics and Statics after that you have no vision you are not engineer okay so this is relation number one we want to dve the equation of the motion of this so but the problem is that FX and FY are unknown now you can go to the chapter 2 of m220 and call Mr newon some of the forces in X direction is mass in X Direction sum of the forces in y direction mass in a y direction simple like that whole m220 is are these three equations oh and you know that this equation comes from angular momentum principle that they taught in m220 and angular momentum right yes so what the problem is that I don't know what is a A's acceleration so it's very easy R of Mass center respect to point O position Vector you set up a coordinate system as always here X and Y plus plus here's is minus minus from middle school or fifth grade huh right so what is MC respect to point O respect to the origin going to be L sine Theta in I Direction because its Vector is like this let me change the color this Vector is like this this Vector plus this Vector look at the you at the arrow Direction so this is positive L sign minus looking down right minus L cine Theta in J chapter 2 section 221 of Dynamics says how you find x velocity time derivative from both Sid right so the velocity of the mass Center of this penal respect to point O because r that is velocity going to be L from high school Theta cine Theta in I time dtive of s is Theta cosine plus L Theta do sin Theta in [Music] J you got it how to find acceleration time derivative another right everyone so if you are done I will go to next page so acceleration as we need for the newon second law you have two terms derivative of first in second second in first so you're going to be I'm going to factor out l Theta dou dot cine Theta minus Theta do theta dot going to be Theta dot Square Theta dot Square sin Theta in i unit Vector right everyone now this is the same you have two terms first in second second in first so so you're going to be plus I'm factoring out L bear with me I have a point here I'm not done yet Theta double do sin theta plus Theta do s cine th guys there is a mistake here intentionally what is that I want that to look at the problem look at the problem position Vector of MC re to point O always is moving itself so this going to be L sin Theta + x in I that's right your hip is moving as human being when you walk right so here this going to be plus X do time derivative of you understand and now here you're going to have plus X double dot like this and for God's sake this is a x and this is a y a y in my language means oh my God okay or oh my gosh what you say so now sum of forces in X Direction let's call back Mr newon is M ax so let's go back to the chapter 2 of Dynamics which forces are in X Direction show me which forces only FX X right what's this sign positive or negative negative because looking to negative side - FX is m l th dot cine Theta minus th do sare sin theta plus xou that simple like that some of forces in y direction is m a y which forces on the y direction you tell me and signs Plus FY minus mg so going to be FY - mg is m l Theta dot this sin theta plus Theta s cine Theta relation number two relation number three what was the one this beautiful this one right now we are super smart yes no good oh he is good thank you for catching that until is good you have to do this here we go see and this yes you have to do this thank you for mentioning this here we go okay I'm developing with you types okay so but you have to remove FX and F5 because we don't know it from where from equation number one here I'm going to multiply this by minus L sin cosine Theta I'm going to multiply the both sides by minus L cine Theta and I'm going to multiply this by - L sin Theta and to multiply the both by minus L sin then I'm going to sum both sides right if you do that all of you don't write guys it's going to be positive FX L cosine Theta here we go minus L sin Theta FY how much is that zero we just eliminate after sum right we just sum so that goes away here you're going to get mg L sin Theta multiply yeah mgl sin minus minus minus plus so the other side I'm going to factor out M and the L here don't write just look at here guys minus Theta L cosine Theta minus thet do sin Theta how much is that sin Square thetus th dot right CU sin square + cosine square is 1 yeah right let me write it to you maybe it's confusing going to be minus L Theta do cosine s of theta uh minus L uh CU I'm factoring L from here sorus L th do sin s this is one of those what if you look at here minus the square sorry plus plus s cosine minus cosine they remove that's right byebye simple like that now the remaining here going to be minus l xou dot [Music] cosine forg sake from high school it's going to be minus L th double do because cosine Square sin square is one so if you write like that going to be m g l sin Theta going to be m Min - L Theta do s l s - L xou do cosine this m with this m goes to the nare this L with this score with this L goes to New York uh and I'm going to move this to the other side so you're going to have L Theta double dot plus G e sin Theta = to minus xou do cosine th at the end of the day complet the nonlinear differential equation of your leg when you move by dividing both s by L going to be Theta double dot plus g/ L sin Theta is - x dot or L cosine Bingo right now you know how to model A M you expert with but let's compare this with the pendulum with the static pendulum can I go ahead to next page yes this see differential equation moving this is describe how you move you are the first class you're attending yeah because you had to come from the first class I developed a math lab code and I modeled this this is vibration class so we want to see how vibrates how oscillates yes we did already I sent out how many C you six six codes did you rece it yeah okay did you R it did you R it okay what's the name sir what ibraim your neighbor huh which country you come from Pakistan I'm from Iran so okay abim I'm going to talk to later so um let me uh open this before going ahead because I have lots of points for this problem okay okay ibraim if you if you received the um the codes you had to run it I made it almost the semi large code okay and implemented the equations inside this state space equations okay and uh after that I told to students that when you run doing code you're going to see how you transferred mathematics to coding and the real movie okay and hold on until it comes up oh my today my laptop is very slow okay see that this is pendulum that I model for the students okay and shows the oscillates like as your grandparents clock right understand and I compared linear with nonlinear differential equation and so you have to go to that uh YouTube links that they uploaded yeah application is vibration vibration means everything I told in the first class you sitting there you are vibrating you don't yeah even your sound is vibration if I want to make it it's a good question actually if you want to make an analogy between your sound and the Pendulum they are the same if here is a vacuum and you talk your sound going to vibrate forever I'm going to listen to that forever but why it dance we I want to teach you in chapter three hopefully four okay because what please puse me to your speaker so because air is a damper and eventually in chapter three I'm going to teach you and four that the reality is not this that oscillates forever right right as your leg when you stand up just raise your leg and release it it canate and it stops because you have a friction at the Joint this is a very simplified version of that see what I'm saying okay no problem ibraim by the way your pronunciation is ibraim not ibraim oh we Persians we have the right right we have three how many years 3,000 years civilization oh no what happened it was your fault okay so oh we are done here so we derive this for your oscillation of your leg assumption that in your hip joint there is no friction and the air there's no air there's no it's vacuum so oscillates forever right but now when you walk we drive this but let's compare this with the static pendulum like Abrahim when you raise your hand and just release it with drive this right so your shoulder joint never moves but here your hip was moving right compare this with this what you notice this is a static pendulum means no motion at Point O but here you have motion having motion at Point O what you notice exactly one of them is homogeneous differential equation and other is not right yes so this is homogeneous and this is not homogeneous and a nonlinear obviously when it come to me530 control class with me for more torture m530 control class I'm going to teach you that this term is disturbance disturbance to your system okay not here I'm just naming that so assume God bless Michael Jackson that he was dancing I'm not joking this is reality okay but I'm fun guy when he was dancing assume that he was going back and forth huh and the leg is pendulum that's the disturbance because I want to keep your leg at 5° no 45° constant when you're moving so that's a contral problem that's any 5:30 class problem but until this morning is vibration problem maybe for 520 I'm such a genius Professor right so in reality what your brain does this is reality suppose that you want to keep your say your your leg as a simplified version at desirable this d stands for desirable angle in control class at 45° while you're hip moves huh so your brain applies a torque or moments to your hip joints tow you're going to see an m530 to keep it there P controller but not now next session of torture m53 okay you got it so as we did uh this is nonlinear as you are dealing with uh oh my God so I have to open a new uh this I know the trick okay PowerPoints sometime it happens even power mode cannot analyze my equations okay so um lay out black so because this is pendulum still moving one I T you using the tailor series expansions that you can the ne is run the kuum point of zero so s of theta can be replaced by Theta and the cosine of theta can be replaced by one remember in the second class I Tau you around curium point of which zero star means for equum point I T all of these around here Theta star equum point was Zero we found it right how how we draw theum point I don't want to Rach again being said now you can make it linearized differential equation saying Theta double dot plus G / L sorry guys uh Theta = to- xou dot over L but I told you because this is pendulum still we're going to name this what look at your notes we're going to name this what G L look at your notes all of you this is marginally stable system right means going to oscillate forever huh yes National frequency Square you said National frequency for pendulum is gravity over length of your leg you got it everybody even come your left hand because when you walk your hand is a moving pendulum and you do it every day every second when you walk and this is the equation of see what I'm saying so for example you on a party I never go to party but suppose you are no I never go there I'm Persian okay man we are the best answer what you mean okay so do you know what's nothing okay about supp you're dancing and going back and forth huh this is how you have to learn Jing guys when you go back and forth for a period of time what you doing mathematically what you doing mathematically s or cosine dancing is sign but nobody taught you in high school right I'm teaching you you have to pay me more okay so I'm going to say your hip motion is s of T function of time if you dance faster oh no no okay so you can be S of 10t because this is frequency right why I'm doing that I'm stupid no because I'm going to put in the M code right now okay so when you have X of T you have x dot from high school going to be cosine cosine of time and xou do is how much again minus s of time so I'm going to again develop the code I'm not writing from scratch because the develop I have to just so going to be I'm going to do this minus sin of t/ L this side is Theta the other side is time parameter arrives to the and you cannot believe or not this is simplified version of when you dance and and going back and forth and you isolated but you didn't know now you know because you have Super Genius [Laughter] Professor okay so ah now when I go to code I told you in control class I'm calling this term what disturbance right so in code I'm going to Define as this D disturbance I'm going to keep it for the next class until you come there and we design controller for this okay so being said I'm just skipping how I do it because now you have to know it already taught you at least four times can I go to next page so State space equation of this going to be dm1 again is M2 I'm going to copy from the previous codes and dm2 is minus Omega n² in M1 here minus D / L okay if you don't know go and look at the just i t step by step how to do it to M what is but if you want to have a private class good I'm here pay me I will teach [Laughter] you what after part after party after party is very okay okay so let me take you there um I'm going to work on this code a little more if I cannot finish it um next okay uh I'm pendulum yeah that's fine so I'm going to copy and paste I'm going to share with you after the class don't worry okay uh I'm going to put it here I'm going to say it is inverted moving pendulum and I'm going to save it uh with the same name and I'm going to close this to aoid confusion and also solver I'm going to copy and paste and I'm going to close this I'm going to save the new one [Music] um so of uh moving inverted pendulum CU I'm going to share with you here we go H and I have to change it CU I never have notes in my classes let me can't make mistake okay I'm going to put this here also MH now good I have to revise the code so G is the same L is the same I have to add disturbance as I told you that's right disturbance yes what oh this is okay that's fine naming is fine you cannot defeat me at the end of the day don't try so I'm just kidding okay so D was uh let me bring the notes up [Music] um uh do was um oh we ended up with uh what is what the hell is that oh I said X is this so D is what um what the hell I'm doing oh minus D is s of T that's right I said D is s of t as Matlab knows guys as Matlab knows T you have to try s of T because we already look at here guys we Define t here that's right in od so I'm saying this is because I'm going to share with you this is not iners pendulum he's right but pendulum whatever so uh this says disturbance I comment for you disturbance term you will see in am 530 to design controller here we go and Omega and already defined and remember that this was natural frequency net frequency so linearized oh I selected from inverted penal file that's F okay this oh it's going to be minus and this going to be uh a minus d over L right as we developed look at here what is that no this minus d/ L right minus om this is the same now here guys I'm going to compare this not with uh not with the nonlinear version I'm going to compare with linearized pendulum static pendulum I want to see how they differs when you move the pace or not okay Omega n M1 M3 I'm sorry M M3 so this is M3 and M4 r for r for linearized static pendulum static based pendulum not base is not moving P okay there we go let's me double check everything yeah and the L is there okay uh now I'm going to say starting from two why I'm starting from two because linearized the equation and it's only valid around cuum point right and I'm going to increase decrease this to 10 seconds and I'm going to just uh just comment the simulation file so here is linear moving pendulum and this is [Music] linear static pulum stat static huh and exactly the same Legend here what was that I deleted Legend okay Legend L moving uh Teta double dot and linear not Legend what do you mean by stat Theta double dot okay so let me run it hopefully it's wrong a works let me double check everything I'm human being can make mistake so this is disturbance sign of T and here we go let me double check yeah so this is you see this is nonhomogeneous this is homogeneous okay so when I run it we get B what was that oh time I forgot um here we go when the base of what the hell oh axis off make it comment don't AIS over okay so you see that this is the pendulum starting from 2° as we had in the first class or second class no base motion see the effect of dancing hip on the pendulum on your leg or your hand when you walk okay and and the frequency of your walk or dance back and forth was 1 radian per second because s of T if I increase the speed of your dance to um okay if I um say your sine of x is s of 2T going to be two and four so it going to be four multipli by not four I'm going to make it faster five five it's going to be 5 25 25 because you have time to do this right and here is five right sign five cosign 25 sign see what I'm saying yes so I'm going to make it faster your dance who see the amplitude Okay see the amplitude how it changes and look at the amplity of the static pendulum compare this with right and if you increase um time say to 35 huh who cares there we go this is how your handle leg when you dance with the high frequency the angle of that changes if there is no friction in the should Jordan or hip this is assumption and there's no Air drag or damper in the air lots of assumption that we made and the name of this kind of motion in the nonlinear Dynamics when you go to PhD or grad school is kind of intermittent technical name goes to chaotic system this kind of things and Chaos never happens in the second order system K begins at the third order system means you have the triple dot okay but this can be say kind of interance so if I want to plot it's very interesting let me show you it's very interesting if I plot um uh the phase portrait remember that we were plotting it's going to look very interesting guys uh three and here you have to for um for th one Theta 2 this is for moving pendulum and T three and T 4 for static basement you you're going to see a very interesting graph guys four I don't want to put the Legends I don't care okay yeah it's going to give you an interesting pce boort there you go see when you go to grad school we're going to use ponar map and leop not Le ponar map to see how it behaves they have lots of names I don't want to make you confused you see kind of very interesting pattern of your dancing or you first but this one this is blue uh the overlap oh I seei let me get away from point there we go see this circle that's right is the pendulum that I showed to you previously remember this this ellipsoid but the blue is when you dance interesting right huh I know you culture man don't do that to me I at the same chair when I was in Iran okay ah and interesting to know when I was in Iran on the gr I was hating vibration I wanted to kill my professor in the club what the hell is this and when I came to us as a pH student my adviser that was author of the book that I introduced to you and it was uh I developed the solution Manual of the book he taught us in graduate level vibration that they fell into vibration love I Lov vibration and yeah I was hting my wish what the hell is this okay so I feel you I mean okay uh so if you zoom in see this is the El so that we previously had right but when you change it you get this pattern and if you dance faster and faster like 100 and the frequency of your dancing is 10 Radian per second or you walk fast and this happens like that okay um here we go this is what we get see kind of different patterns we got it so now let's make a movie of that because we already did previously right we have the code here I don't need to generate everything so just uncomment this when I'm sharing with you contrl T un comment the code mat contrl T right so [Music] um case counter oh not this beautiful where is uh here we go okay case counter because I was teaching this right it's here case counter right so everything is the same except there's except Point O is moving right sry so point0 look at here this is not zero anymore this is what this is your this is your what it's what disturbance right was for this is uh let me Define it here disturbance original one for this case is uh um is 10 sine of 10 T I'm getting I cannot see it even okay right disturbance is this originally okay disturbance of X X not X double dot this is X double dot we put here that's right in the previous file look at here this is X double do we put here but this is X x is moving right you got it you had time derivative came up and understand everyone huh so this is 10 sign enough okay so here you're going to put here d d original the D of displacement here we go this and it's Y is zero doesn't change yeah sign what I wrote is sign yeah yeah no because yeah yeah sign of I'm sorry yeah yeah no original is s so minus cosine so it's s of 10 no no no at here bear with [Music] me oh look at here we get s m cosine minus sign we could this minus here inside the code okay you cannot defeat me don't try it don't try it man whatever you think I dream when I was in kindergarten I'm just kidding because I have no notes I can make mistakes thank you for making a mistake okay that's good point Thank you for double checking okay so it's it's DS that's right okay and it's why is why is not changing uh it makes me confused I don't know why oh here also now the pendulum part going to be what l see L sign this yeah you have a plus d of s right DF s clear yes well it's y never changes because we don't have such and uh the also here for the circle so right plus d ofs why never changes I don't want to go to nonlinear because I want to only work on the simulation of uh simulation of uh moving pendulum right yes don't be shameful that [Laughter] happens okay so um yeah I don't need this field I don't need this circle okay what is this oh no here I don't need this I don't need this only secet on that yeah yes everybody yes I just want to just put this as a comments I don't want to I don't know how it works or oh not hold off beautiful okay not you axis off it's enough for now okay let me first over check to make sure this is not stupid what see yeah we Define t here what is the time it's over so you have to put this inside for Loop thank you matla for fixing me okay so you're going to see because you already have T from here right this t total time just put side inside here what is that ah ah ah what is that okay T is total time from OD about and like this again K and one because it's going to be like a counter right already develop and then put DS here DS here and let me double check because I'm developing the code with you hopefully this is right are you stupid oh I didn't remove I'm sorry what oh oh my God this is from the previous code this is um yeah I I have to Define sign a size of that that's right uh length of uh uh what the what the hell is this a length of uh what's that yeah go ahead do you have any comment yes do you have any comment uh length of this and this is two double do all of that right when you copy and paste it's going to happen okay understand enough thank you so first of all I have to increase the axis uh axis is on axis I don't know how much was that oh it's sine of 10 right so you're going to be 5 - 5 on five huh first of all second of all there is a gap for Circle oh we already have DS from here why you have to do that see see you have to deug your code come on stop it so hopefully oh it's going up going down because I see yeah because going up so I have to aess going to be - 4 no - 4 is too much - 3 and three right thank you thank you glad meeting you stop it okay h here we go s it see the effect of motion of the base oh yeah interesting guys you're going to say are you stupid my leg never does it or my hand because you your your hip and shoulder they have friction here A very huge friction right see like a you get it I know you love vibration now [Music] okay on the vacuum and and you and you move your base okay you move your base as a sign yeah right just give me a second give me a sec Okay because I'm going to share this code with you and I'm going to make it beautiful when you're showing to your parents they say oh such a glorious Professor you have okay yes sir I cannot hear you this is just a because length is one meter so it going to if you go this one on that way just put plus one plus one here plus one plus one here so Links of the pul 1 M that's right look at my leg I'm 120 1.2 M see what I'm saying so add the range that's it there there is some codes that you can put in here this is very very preliminary code I'm teaching you when I code by myself for research everything is going to be automatic even the range of the aises okay see what I'm saying so um now uh don't leave um now I can put the text uh and show the angle of that 2 Meers right and I'm going to put on 1.5 and one show it here this here we go now it shows the angle right see the huge angles guys - 200 like that to plus 200 like that angles right see how it works and you can put also angle of velocity plot it for you radian per second whatever you want but as I told you when you graduate and I want to be proud of you everyone first of all we don't have one because this is from previous code we have Theta that's right second of all uh put AIS off because when you save as a as a avi file playing the video player or TV smart TV you can do like this right right everybody so we D from high school s and cosine we went to Dynamics moment equation neon Second Law linearization teror expansion linear differential equation and blah blah I'm going to send it to you but for yourself okay go to home Okay go home work on this code and compare nonlinear moving penal with linear one see how they differs on the motion and start from uh initial condition of 10 as in go so because this is for linear moving pendulum this is ridiculous just have it there instead of this three and four you have to copy one and one and two the same equations but but put uh put s M1 or S M3 see what I'm saying and xou do cosine put cosine here and see how they differ from each other for yourself you got it everybody so almost done with chapter two okay we have nine chapters and this was introduction to what vibration mathematically when we go ahead but I'm going to make it fun to you hopefully okay and just be with