Quasi Newton Method for Dynamics

Download Report

Transcript Quasi Newton Method for Dynamics

ME451
Kinematics and Dynamics
of Machine Systems
Inverse Dynamics
Equilibrium Analysis
November 4, 2013
Radu Serban
University of Wisconsin-Madison
Before we get started…

Last Time:



Today:




Example: numerical solution of a dynamics problem
Inverse Dynamics
Equilibrium Analysis
Assignments:


Numerical integration of DAE initial value problems in multibody dynamics
Newmark integration method
Project 1 – due Wednesday, November 6, Learn@UW (11:59pm)
Midterm 2:



Wednesday, November 6 at 12:00pm in ME1143
Review session – tonight at 6:30pm in ME1143
Everything covered under Dynamics except Newmark integration
Lecture 16 (October 9) – Lecture 23 (October 30)
2
3
Quasi Newton Method for Dynamics
At each integration time step
Increment time: 𝑡𝑛+1 = 𝑡𝑛 + ℎ.
Define the initial guess for 𝐪 and 𝛌 to be the values
from the previous time step.
At the initial time 𝑡0
Find consistent initial
conditions for generalized
positions and velocities.
Update positions and velocities at 𝑡𝑛+1 using the
Newmark formulas using the current accelerations
and Lagrange multipliers.
Calculate the generalized
accelerations and Lagrange
multipliers.
Calculate the approximate Jacobian matrix. Only
evaluate this matrix at the first iteration and reuse it
at subsequent iterations.
Evaluate the EOM and scaled constraints, using
the current values of 𝐪, 𝐪, 𝐪, and 𝛌 at 𝑡𝑛+1. The
resulting vector is called the residual vector.
Compute the correction vector by solving a linear
system. Note that the system matrix is constant
during the iterative process.
NO
Need to further improve
accelerations and
Lagrange multipliers
Is error less than
tolerance?
Correct the accelerations and Lagrange multipliers
to obtain a better approximation for their values at
time 𝑡𝑛+1.
Compute the infinity norm of the correction vector
(the largest entry in absolute value) which will be
used in the convergence test.
YES
Store 𝐪 and 𝛌 at 𝑡𝑛+1. Use the final acceleration values to calculate positions and velocities 𝐪 and 𝐪 at
𝑡𝑛+1. Use the final Lagrange multiplier values to calculate reaction forces. Store all this information.
4
Sample Problem
Find the time evolution of the pendulum

Simple Pendulum:






Mass 𝑚 = 20 𝑘𝑔
Half-length 𝐿 = 2 𝑚
Force acting at tip of pendulum
 𝐹 = 30 sin(2𝜋𝑡) [𝑁]
RSDA element in revolute joint
 𝜙0 = 3𝜋 2
 𝑘 = 45 𝑁𝑚/𝑟𝑎𝑑
 𝑐 = 10 𝑁 𝑠
ICs: hanging down, starting from rest
Steps for Dynamic Analysis:
1.
2.
3.
Derive constrained equations of motion
Specify initial conditions (ICs)
Apply numerical integration algorithm to discretize DAE
problem and turn into algebraic problem
Inverse Dynamics
6
Inverse Dynamics: The idea

First of all, what does (forward) dynamic analysis mean?




In inverse dynamics, the situation is quite the opposite:





Apply some forces and/or torques on a mechanical system and look at how the
configuration of the mechanism changes in time
The mechanism evolution also depends on the specified initial conditions
This is a forward process: forces ⟹ motion
Specify driving constraints on the mechanical system (that is specify the desired
motion) and find the set of forces and/or torques that should have been applied to the
mechanical system to lead to this motion
Note that the ICs are implicitly defined by the specified desired motion
Note that we need to include as many driver constraints as kinematic degrees of
freedom there are (exactly like in Kinematics, we require NDOF = 0)
This is a reverse (inverse) process: forces ⟸ motion
Inverse dynamics is useful in controls

For example in controlling the motion of a robot: we know how we want this robot to
move and we need to figure out what joint torques we should apply to make it move
that way
7
Inverse Dynamics: The Math

When can one talk about Inverse Dynamics?

Given a mechanical system, a prerequisite for Inverse Dynamics is that the
number of degrees of freedom associated with the system is zero



We must have as many generalized coordinates as constraints (THIS IS KEY)
This effectively makes the problem a Kinematics problem
The two stages of the Inverse Dynamics analysis

First solve for accelerations (recall the acceleration equation):

Next solve for the Lagrange multipliers and then the reaction forces:
Inverse Dynamics: Conclusion

Are we done once we computed the reaction forces?



Yes, because among the reaction forces we computed, we get all the
forces/torques that are necessary to enforce the specified driving constraints
D which were used to specify the desired motion
Here, the constraint constraint 𝚽 𝐷 acts between body 𝑖 and some other body.
Reaction forces (induced by the corresponding Lagrange multiplier 𝛌𝐷 ) are
computed as “experienced” by body 𝑖
This gives us the forces/torques that need to be applied to get the prescribed
motion
8
9
Example: Inverse Dynamics

Compute the torque that the electrical motor must
produce to open the door for 2 seconds following the
prescribed motion:
𝜋
𝜋
𝜙 = sin 𝑡
2
4


Half-length: 𝐿 = 0.5
Mass: 𝑚 = 30
Polar moment of inertia: 𝐽′ = 2.5

RSDA spring coefficient: 𝑘 = 8
RSDA free angle: 𝜃0 = 0
RSDA damping coefficient: 𝑐 = 1

All units are SI


Top View
wall

RSDA
Equilibrium Analysis
Equilibrium Analysis: The Idea

A mechanical system is in equilibrium if the following conditions hold:

Equivalently, the system is at rest with zero acceleration

So what does it take to be in this state of equilibrium?
 The system must be in a certain configuration 𝐪


The reaction forces (in other words, the Lagrange Multipliers 𝛌) should
assume certain values
What does “certain” mean?
11
12
Equilibrium Analysis: The Math

Equations of Motion:

Position Constraint Equations:

Velocity Constraint Equations:

Acceleration Constraint Equations:
Equilibrium Analysis: The Math



Approach 1

Simply solve the nonlinear system to find 𝐪 and 𝛌

Problem: need a good initial guess
Approach 2

Add damping in the system and perform dynamic analysis until it stops

Brute force, but effective
Approach 3


Cast it as an optimization problem (minimize potential energy)
Problem: works for conservative systems only
13
14
Example: Equilibrium Analysis

Consider a pendulum connected to ground through a
revolute joint and a rotational spring-damper.

Length: 𝐿 = 1
Mass: 𝑚 = 10
Polar moment of inertia: 𝐽′ =? ? ?



RSDA spring coefficient: 𝑘 = 25
RSDA free angle: 𝜃0 = 0
RSDA damping coefficient: 𝑐 =? ? ?

Gravitational acceleration: 𝑔 = 9.81

All units are SI


RSD