Dynamics (MIT 16.07) - Lecture 4: d'Alembert's Principle and The Euler-Lagrange Equation
Overview
Zac Manchester develops the Euler-Lagrange equation from generalized coordinates, work, and d'Alembert's principle, showing how virtual displacements remove ideal constraint forces and how kinetic and potential energy replace repeated Cartesian acceleration calculations. He applies the method to a pendulum, then begins a cartpole model with coordinates x and θ, deriving its position and velocity expressions before leaving the equations of motion for the next lecture.
Key takeaways
- For ideal constraints, allowable virtual displacements are perpendicular to constraint forces, so d'Alembert's principle can derive motion without explicitly calculating forces such as pendulum tension.
- Generalized forces are obtained by projecting applied Cartesian forces into coordinate directions: Q = (∂r/∂q)ᵀF.
- For a particle system, generalized inertial terms can be written using kinetic energy as d/dt(∂T/∂q̇) − ∂T/∂q, avoiding repeated coordinate-specific acceleration derivations.
- With L = T − U, conservative forces are absorbed into the Lagrangian, leaving nonconservative generalized forces on the right side of the Euler-Lagrange equation.
- The pendulum example yields θ̈ = −(g/l) sin θ from T = 1/2 ml²θ̇² and U = mgl(1 − cos θ), demonstrating the energy-based method in one coordinate.
- The cartpole model uses x and θ as its two generalized coordinates, with the pendulum mass position xₚ = x + l sin θ and yₚ = l cos θ.
Chapters
- The lecture connects prior state-space and numerical integration work to deriving equations of motion from energy.
- For numerical simulation, Zac Manchester recommends adaptive tools such as solve_ivp with RK45 rather than Euler integration.
- Checking energy behavior provides a useful sanity test for a simulated system.
- Generalized coordinates q describe a system's configuration and can include polar coordinates rather than only Cartesian positions.
- A set of n coordinates is minimal when n equals the system's number of degrees of freedom.
- Minimal coordinates can simplify constraints, as θ alone describes a fixed-length pendulum, but Euler angles can create attitude singularities such as gimbal lock.
- For a particle, differentiating T = 1/2 mv² and applying F = ma gives Ṫ = F · v.
- A force changes kinetic energy only through its component parallel to velocity; a perpendicular force contributes zero instantaneous power.
- Integrating power gives work as the kinetic-energy change, W = ∫F · dr, with dr = v dt.
- For a pendulum of length l, the mass position is x = l sin θ and y = l(1 − cos θ), so its velocity is tangent to the circular path.
- String tension points radially inward, perpendicular to the allowed tangential velocity, so its dot product with velocity is zero.
- This illustrates the ideal-constraint principle: constraint forces do no virtual work when they are perpendicular to every allowable displacement.
- For p constrained particles, the principle is expressed as the sum of (Fⱼ − mⱼr̈ⱼ) · δrⱼ equaling zero over allowable virtual displacements.
- A virtual displacement δr is an infinitesimal change in a direction permitted by the constraints.
- Because ideal constraint forces do no work on allowable displacements, the equations can omit explicit constraint-force calculations.
- The chain rule expresses each particle's virtual displacement as δr = (∂r/∂q)δq.
- Choosing coordinates that parameterize only the true degrees of freedom makes the allowed displacement directions explicit.
- For a fixed-length pendulum, the radial displacement is forbidden and the only allowable instantaneous motion is in the θ direction.
- Gravity resolves into radial and tangential components, while the fixed-length constraint permits displacement only along the tangential direction.
- The radial equation can be ignored in the virtual-work expression because its virtual displacement is zero.
- The remaining tangential equation recovers the pendulum dynamics without solving for string tension, though Cartesian-to-polar acceleration calculations are still required at this stage.
- The next derivation rewrites d'Alembert's principle entirely in generalized coordinates q, eliminating explicit Cartesian positions r.
- The acceleration r̈ is cumbersome to derive separately in each coordinate system, as shown by the extra terms in polar-coordinate acceleration.
- The desired formulation should allow convenient coordinate choices while retaining the ability to discard constraint forces.
- For a single particle, virtual work transforms a Cartesian force into generalized coordinates through the position Jacobian.
- The generalized-force components satisfy Q = (∂r/∂q)ᵀF, so each component measures force contribution along a generalized coordinate.
- This transformation is the key input for expressing applied forces in the eventual coordinate-independent equations.
- The coordinate velocity relation is ṙ = (∂r/∂q)q̇, which allows the Jacobian to be related to velocity derivatives.
- The derivation also uses equality of mixed partial derivatives to exchange time and coordinate differentiation.
- Applying the product rule to the mass-acceleration term prepares it to be rewritten using derivatives of kinetic energy.
- The acceleration expression becomes d/dt(∂T/∂q̇) − ∂T/∂q, where T is kinetic energy.
- Because T is a scalar, it can be calculated directly in convenient generalized coordinates rather than by repeatedly transforming Cartesian accelerations.
- Combining this result with generalized forces gives d/dt(∂T/∂q̇) − ∂T/∂q = Q.
- Conservative generalized forces come from potential energy as Qc = −∂U/∂q, with U depending on configuration rather than velocity.
- Defining the Lagrangian L = T − U folds conservative forces into the left-hand side.
- The resulting equation is d/dt(∂L/∂q̇) − ∂L/∂q = Qnc, where Qnc contains nonconservative forces such as friction or control inputs.
- For a pendulum with coordinate θ, T = 1/2 ml²θ̇² and U = mgl(1 − cos θ), so L = T − U.
- Substitution into the Euler-Lagrange equation yields ml²θ̈ + mgl sin θ = 0, or θ̈ = −(g/l) sin θ.
- The method's practical recipe is to select coordinates, compute T and U, add nonconservative generalized forces, and differentiate.
- The cartpole has two degrees of freedom: cart translation x and pendulum rotation θ; the cart receives an applied force Fc.
- For pendulum length l, the mass position is xₚ = x + l sin θ and yₚ = l cos θ.
- Differentiation gives ẋₚ = ẋ + l cos θ θ̇ and ẏₚ = −l sin θ θ̇, which feed into the kinetic energy.
- Manchester begins combining cart and pendulum kinetic energy with gravitational potential energy, but leaves the completed equations of motion for the next lecture.
Transcript excerpt
0:03 So last time we talked about state space which I think everyone had seen before in sort of unified signals controls which is good um and that's how we simulate stuff. We talked about numerical integration a little bit. Um, at least enough to know not to use oiler integration and do use like OD45, solve IVP, those sorts of tools. You know how to set them up now. It's on the homework. Um, but even in that case, you should sanity check stuff. Check your, you know, energies and things like this. Make sure they they do sane things. We talked about energy, talked about kinetic and potential energy. Um, then we talked a little bit about Leoponov stability as a fun bonus topic.
0:53 Uh, and then I kind of like teased at the very end this idea of, you know, getting dynamics from energy and I did a kind of cartoon cartoon trick where I, you know, got the pendulum dynamics out of energy conservation, right? But then we talked about how that doesn't work in general and there's a bunch of gotchas. And so we're going to do today is try to continue that story and put ourselves on firm ground there. Uh so we're going to start off with a little chat about generalized coordinates and what that means and why we care. Then we're going to talk about work. Have people seen work before in like freshman physics? Good.
1:42 Some nods. Then we're going to talk about Dolan Bears's principle. Anyone seen that before? Couple folks. Who? Where'd you see that? >> Sorry. >> Mechanics 2. Where where is that class up? >> In physics. >> It's in physics. Okay, cool. So folks who've seen a mechanics class like past freshman level mechanics have done this.
This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.
In this course
Related notes
Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, MIT Robotic Exploration Lab.