320 likes | 537 Views
Dynamics. Kris Hauser I400/B659, Spring 2014. Agenda. Ordinary differential equations Open and closed loop controls Integration of ordinary differential equations Dynamics of a particle under force field Rigid body dynamics. Dynamics.
E N D
Dynamics Kris Hauser I400/B659, Spring 2014
Agenda • Ordinary differential equations • Open and closed loop controls • Integration of ordinary differential equations • Dynamics of a particle under force field • Rigid body dynamics
Dynamics • How a system moves over time as a reaction to forces and torques • Distinguished from kinematics, which purely describes states and geometric paths • Uncontrolled dynamics: • From initial conditions that include state x0 and time t0, the system evolves to produce a trajectory x(t). • Controlled dynamics: • From initial conditions x0, time t0, and given controls u(t), the system evolves to produce a trajectory x(t)
Dynamic equations • x(t): state trajectory • (a function from real numbers to vectors) • Uncontrolled dynamic equation: • An ordinary differential equation (ODE)
Dynamic equations • x(t): state trajectory • (a function from real numbers to vectors) • Uncontrolled dynamic equation: • An ordinary differential equation (ODE) • Example: point mass with gravity g • Position is • Acceleration (f=ma) is
Dynamic equations • x(t): state trajectory • (a function from real numbers to vectors) • Uncontrolled dynamic equation: • An ordinary differential equation (ODE) • Example: point mass with gravity g • Position is • Acceleration (f=ma) is • Uh… how do we work with this? • Second-order differential equation
From second-order ODEs to first-order ODEs • Let with • Then
From second-order ODEs to first-order ODEs • Let with • Then • Here G is the gravity vector • If p is d dimensional, x is 2d-dimensional
From time-dependent to time-independent dynamics • If • Let • Then
Dynamic equation as a vector field • Can ask: • From some initial condition, on what trajectory does the state evolve? • Where will states from some set of initial conditions end up? • Point (convergence), a cycle (limit cycle), or infinity (divergence)?
Numerical integration of ODEs • If and x(0) are known, then given a step size h, • gives an approximate trajectory for k 1 • Provided f is smooth • Accuracy depends on h • Known as Euler’s method
Integration errors • Lower error with smaller step size • Consider system whose limit cycle is a circle • Euler integrator diverges for all step sizes! • Better integration schemes are available • (e.g., Runge-Kutta methods, implicit integration, adaptive step sizes, energy conservation methods, etc) • Beyond the scope of this course
Open vs. Closed loop • Open loop control: • The controls u(t) only depend on time, not x(t) • E.g., a planned path, sent to the robot • No ability to correct for unexpected errors • Closed loopcontrol : • The controls u(x(t),t)depend both on time and x(t) • Feedback control • Requires the ability to measure x(t) (to some extent) • In either case we have an ODE, once we have chosen the control function
Controlled Dynamics -> 1st order time-independent ODE • Open loop case: • If , then let y(t)=(x(t),t)
Controlled Dynamics -> 1st order time-independent ODE • Open loop case: • If , then let y(t)=(x(t),t) • Closed loop case: • If , then let y(t)=(x(t),t)
Controlled Dynamics -> 1st order time-independent ODE • Open loop case: • If , then let y(t)=(x(t),t) • Closed loop case: • If , then let y(t)=(x(t),t) • How do we choose u? A subject for future classes
Rigid Body Dynamics • The following can be derived from first principles using Newton’s laws + rigidity assumption • Parameters • CM translation c(t) • CM velocity v(t) • Rotation R(t) • Angular velocity w(t) • Mass m, local inertia tensor HL
Rigid body ordinary differential equations • We will express forces and torques in terms of terms of H (a function of R), , and • Rearrange… • So knowing f(t) and τ(t), we can derive c(t), v(t), R(t), and w(t) by solving an ordinary differential equation (ODE) • dx/dt = f(x) • x(0) = x0 • With x=(c,v,R,w) the state of the rigid body
Kinetic energy for rigid body • Rigid body with velocity v, angular velocity w • KE = ½ (m vTv + wT H w) • World-space inertia tensor H = R HL RT T w v H 0 0 m I w v 1/2
Kinetic energy derivatives • Force (@CM) • H = [w]H – H[w] • Torque t = = [w] H w + H
Summary Gyroscopic “force”
Force off of COM F x
Force off of COM F x Consider infinitesimal virtual displacement generated by F. (we don’t know what this is, exactly) The virtual work performed by this displacement is FT
Generalized torque f Now consider the equivalent force f, torque τ at COM
Generalized torque f Now consider the equivalent force f, torque τ at COM And an infinitesimal virtual displacement of R.B. coordinates
Generalized torque f Now consider the equivalent force f, torque τ at COM And an infinitesimal virtual displacement of R.B. coordinates Virtual work in configuration space is [fT,τT]
Principle of virtual work F f [fT,τT]= FT Since we have [fT,τT]= FT
Principle of virtual work F f [fT,τT]= FT Since we have [fT,τT]= FT Since this holds no matter what is, we have [fT,τT]= FTJ(q), Or JT(q) F = f τ
Next class • Feedback control • Principles App J