1 / 49

Realtime Technologies, Inc. Multi-Body Dynamics Training

March 2005. Realtime Technologies, Inc. Multi-Body Dynamics Training. Purpose. Introduce multi-body dynamics concepts. Train users how to develop multi-body models. Coordinate Systems.

valterra
Download Presentation

Realtime Technologies, Inc. Multi-Body Dynamics Training

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. March 2005 Realtime Technologies, Inc.Multi-Body Dynamics Training

  2. Purpose • Introduce multi-body dynamics concepts. Train users how to develop multi-body models.

  3. Coordinate Systems • Local velocities and accelerations follow the SAE coordinate system: Z down, X forward, and Y out the right side of the vehicle. • Global velocities and accelerations follow SAE: X north, Y east, Z down • Roll, pitch, and yaw velocities and accelerations are defined as right hand rule about the X, Y, and Z axes respectively.

  4. Surge, X Roll Pitch Lateral, Y Yaw Heave, Z Coordinate Systems

  5. Units

  6. Multi-Body Introduction • SimCreator is based on recursive multi-body methods. • Multi-body dynamics is based on classical mechanics. The multi-body method utilizes a finite set of elements including rigid bodies, joints, springs, dampers, and actuators. The following assumptions have been made: • A multi-body system consists of rigid bodies and ideal joints. A body may degenerate to a particle or to a body without inertia. • The topology of the multi-body system is arbitrary. Chains, trees and closed loops are admitted. • Bodies, joints and actuators are summarized in libraries of standard elements.

  7. Multi-Body Introduction • Kecskemethy developed a formalization of representing multi-body elements using a modular dataflow representation. Below are a Rigid Link, Joint, Mass, and Spring.

  8. Multi-Body Introduction • By calculating inside each joint a joint torque  as the dot product between the generalized force Q acting on the joint and the joint axis, the set of joint torques required to generate a particular mechanism acceleration, position and velocity can be determined. • This solves the inverse dynamics problem: what joint torques are required to yield a particular set of positions, velocities, and accelerations of a mechanism. • Introducing a set of generalized coordinates: , that represent joint angles and position, in general the set of joint torques required will take the following form: • where M is defined as the mass matrix, V represents centrifugal and coriolis effects, and G represents gravity and external force effects.

  9. Multi-Body Introduction • Need to solve the forward dynamics problem: solve for the joint accelerations given the joint positions, velocities, and joint torques • Using the joint positions and velocities from the previous step calculate a torque bias vector b that is the torque at each joint required for zero joint acceleration: • With the joint velocities and gravity set to zero (i.e. with the torque bias vector set to zero), calculate the joint torque vector for a unit joint acceleration for each joint separately (i.e. all other joint accelerations set to zero). The joint torques calculated are essentially a column of the mass matrix. Once all the columns of the mass matrix have been computed, and given the actual torques acting at each joint, the acceleration of the joints can be calculated as: The joint accelerations can then be integrated to yield the joint positions and velocities for the next step.

  10. SimCreator Implementation • SimCreator Implements Components Similar to Kecskemethy • LinAccel, LinVel, LinPos, AngAccel, AngVel, TM are equivalent to q. • Force and Moment are equivalent to Q • LinkNumber is for book keeping in the mass matrix • Light red LinAccel is an input, dark red LinAccel is an output

  11. SimCreator Implementation • Force, Moment, Accel, and AngAccel are 60 length vectors. • The multibody components in SimCreator calculate the internal forces and accelerations acting on the system due to gravity, external forces, and velocity with the joint accelerations set to zero and store this in the first three elements of the 60 length vectors in the order X, Y, and Z. • For each degree of freedom in the chain between the base body and the current body they calculate the internal forces and acceleration acting on the system due to a unit (1.0) acceleration of that degree of freedom. The corresponding element in the LinkNumber connector defines the appropriate link in the system. The results of these calculations are stored in the 60 Length Vectors. • IMPORTANT Force, Moment, Accel, and AngAccel are due to a unit acceleration not the actual forces and accelerations.

  12. SimCreator Implementation • 60 Length vectors allow 19 links (19 rows in the mass matrix) to be modeled: • 19 links x 3 DOFs (X, Y, Z) + 3 external forces • The link number has 20 inputs. These are the actual row numbers in the mass matrix. • Each branch in the tree can have up to 19 links • Can have a maximum of 80 rows in the mass matrix

  13. SimCreator Implementation • Vector Storage: • All linear three vectors (LinPos, LinVel) store their values as [X, Y, Z]. All angular three vectors (AngVel) store their values as [Roll, Pitch, Yaw]. The transformation matrix TM is stored: • Pre-multiplying a local vector by the TM will generate the vector in global coordinates.

  14. SimCreator Implementation • For recursive methods you need a base body and multiple bodies that hang off the base body with a set of relative coordinates. • Four component types: • Base Body • Mechanism • Joint • Cut Joint

  15. Base Bodies • All models must start with a base body • EarthModels a base body for multibody simulations with no degrees of freedom. • SixDOFMBModels a base body with six degrees of freedom.

  16. Mechanisms and Joints • Prismatic models a prismatic mechanism • MassMB models a mass • PrismaticJoint models a prismatic mechanism and mass together • Similar for screw, spherical, and revolute mechanisms

  17. Cut Joints • Cut joints allow two chains to be connected. Notice that both sides are light red. • Select the correct joint to cut to reduce the total number of rows in the mass matrix

  18. Double Pendulum Example

  19. Zero Force and Earth Setup • Need DIMA to be 60 and DIMB to be 20 to connect ZeroForce and Earth

  20. BEGIN_INPUTS ; COMPONENT RevoluteJoint LocalJointAxis [0][0] = 0 [ND] Local Joint Axis LocalJointAxis [0][1] = 1 [ND] Local Joint Axis LocalJointAxis [0][2] = 0 [ND] Local Joint Axis Inertia [0][0] = 0.5 [kg-m-m] Inertia of Body Inertia [0][1] = 1.5 [kg-m-m] Inertia of Body Inertia [0][2] = 1.5 [kg-m-m] Inertia of Body Mass [0][0] = 10 [kg] Mass of Body CGOffset [0][0] = 1 [m] CG Offset in Body Coordinates CGOffset [0][1] = 0 [m] CG Offset in Body Coordinates CGOffset [0][2] = 0 [m] CG Offset in Body Coordinates COMPONENT OffsetMB Offset [0][0] = 2 [m] Offset in Local Coordinates Offset [0][1] = 0 [m] Offset in Local Coordinates Offset [0][2] = 0 [m] Offset in Local Coordinates COMPONENT RevoluteJoint1 LocalJointAxis [0][0] = 0 [ND] Local Joint Axis LocalJointAxis [0][1] = 1 [ND] Local Joint Axis LocalJointAxis [0][2] = 0 [ND] Local Joint Axis Inertia [0][0] = 1.5 [kg-m-m] Inertia of Body Inertia [0][1] = 2.5 [kg-m-m] Inertia of Body Inertia [0][2] = 2.5 [kg-m-m] Inertia of Body Mass [0][0] = 20 [kg] Mass of Body CGOffset [0][0] = 1 [m] CG Offset in Body Coordinates CGOffset [0][1] = 0 [m] CG Offset in Body Coordinates CGOffset [0][2] = 0 [m] CG Offset in Body Coordinates COMPONENT OffsetMB1 Offset [0][0] = 1 [m] Offset in Local Coordinates Offset [0][1] = 0 [m] Offset in Local Coordinates Offset [0][2] = 0 [m] Offset in Local Coordinates COMPONENT Pos1Gain Gain [0][0] = 0 [ND] Gain COMPONENT Rate1Gain Gain [0][0] = 0 [ND] Gain COMPONENT PosGain Gain [0][0] = 0 [ND] Gain COMPONENT RateGain Gain [0][0] = 0 [ND] Gain COMPONENT Earth InitPos [0][0] = 0 [m] Initial Position InitPos [0][1] = 0 [m] Initial Position InitPos [0][2] = 0 [m] Initial Position BEGIN_STATES ; COMPONENT RevoluteJoint_RevoluteJoint_RevoluteJointPos SJointAng [0][0] = -0.523598775598299 [rad] Joint Angle SJointAngRate [0][0] = 0 [rad/sec] Joint Angular Rate COMPONENT RevoluteJoint1_RevoluteJoint_RevoluteJointPos SJointAng [0][0] = 0.523598775598299 [rad] Joint Angle SJointAngRate [0][0] = 0 [rad/sec] Joint Angular Rate Double Pendulum Data

  21. Run Dialog Double Pendulum

  22. Double Pendulum Results • Z in SimCreator is–Y in DADS

  23. 4 Bar Example

  24. Cut Joint Parameters • SimRealVar ErrorA - Constraint Error Reduction of q dot (ND)SimRealVar ErrorB - Constraint Error Reduction of q (ND) • ErrorA is 1.6 • ErrorB is 2 • The error feedback gain is based on the maximum frequency of the model. Typically the stiffness of the error must be higher than any stiffness in the model but want it as low as possible to minimize the integrator step size requirements. • Trial and error looking at the position error in the joint is usually best.

  25. BEGIN_INPUTS ; COMPONENT ScrewJoint LocalJointAxis [0][0] = 0 [ND] Local Joint Axis LocalJointAxis [0][1] = 1 [ND] Local Joint Axis LocalJointAxis [0][2] = 0 [ND] Local Joint Axis Inertia [0][0] = 0.5 [kg-m-m] Inertia of Body Inertia [0][1] = 1.5 [kg-m-m] Inertia of Body Inertia [0][2] = 1.5 [kg-m-m] Inertia of Body Mass [0][0] = 10 [kg] Mass of Body CGOffset [0][0] = 1 [m] CG Offset in Body Coordinates CGOffset [0][1] = 0 [m] CG Offset in Body Coordinates CGOffset [0][2] = 0 [m] CG Offset in Body Coordinates GearRatio [0][0] = 0 [m/rad] Gear Ratio COMPONENT OffsetMB Offset [0][0] = 2 [m] Offset in Local Coordinates Offset [0][1] = 0 [m] Offset in Local Coordinates Offset [0][2] = 0 [m] Offset in Local Coordinates COMPONENT UniversalJoint LocalJointAxis [0][0] = 1 [ND] Local Joint Axis LocalJointAxis [0][1] = 0 [ND] Local Joint Axis LocalJointAxis [0][2] = 0 [ND] Local Joint Axis Inertia [0][0] = 0.5 [kg-m-m] Inertia of Body Inertia [0][1] = 1.5 [kg-m-m] Inertia of Body Inertia [0][2] = 1.5 [kg-m-m] Inertia of Body Mass [0][0] = 10 [kg] Mass of Body CGOffset [0][0] = 1 [m] CG Offset in Body Coordinates CGOffset [0][1] = 0 [m] CG Offset in Body Coordinates CGOffset [0][2] = 0 [m] CG Offset in Body Coordinates COMPONENT OffsetMB1 Offset [0][0] = 2 [m] Offset in Local Coordinates Offset [0][1] = 0 [m] Offset in Local Coordinates Offset [0][2] = 0 [m] Offset in Local Coordinates COMPONENT Earth1 InitPos [0][0] = 2 [m] Initial Position InitPos [0][1] = 0 [m] Initial Position InitPos [0][2] = 0 [m] Initial Position COMPONENT Earth2 InitPos [0][0] = 0 [m] Initial Position InitPos [0][1] = 0 [m] Initial Position InitPos [0][2] = 0 [m] Initial Position COMPONENT ScrewRateGain Gain [0][0] = -8 [ND] Gain COMPONENT RevoluteJoint LocalJointAxis [0][0] = 0 [ND] Local Joint Axis LocalJointAxis [0][1] = 1 [ND] Local Joint Axis LocalJointAxis [0][2] = 0 [ND] Local Joint Axis Inertia [0][0] = 0.5 [kg-m-m] Inertia of Body Inertia [0][1] = 1.5 [kg-m-m] Inertia of Body Inertia [0][2] = 1.5 [kg-m-m] Inertia of Body Mass [0][0] = 10 [kg] Mass of Body CGOffset [0][0] = 1 [m] CG Offset in Body Coordinates CGOffset [0][1] = 0 [m] CG Offset in Body Coordinates CGOffset [0][2] = 0 [m] CG Offset in Body Coordinates COMPONENT OffsetMB2 Offset [0][0] = 2 [m] Offset in Local Coordinates Offset [0][1] = 0 [m] Offset in Local Coordinates Offset [0][2] = 0 [m] Offset in Local Coordinates COMPONENT CutSpherical ErrorA [0][0] = 1.6 [ND] Constraint Error Reduction of q dot ErrorB [0][0] = 2 [ND] Constraint Error Reduction of q COMPONENT ScrewPosGain Gain [0][0] = -10 [ND] Gain COMPONENT RevPosGain Gain [0][0] = -8 [ND] Gain COMPONENT RevRateGain Gain [0][0] = -10 [ND] Gain COMPONENT UniversalJoint_RevoluteJoint ExternalJointTorque [0][0] = 0 [Nm] External Joint Torque COMPONENT UniversalJoint_Revolute ExternalJointTorque [0][0] = 0 [Nm] External Joint Torque BEGIN_STATES ; COMPONENT ScrewJoint_ScrewJoint_ScrewVelPos SJointAng [0][0] = 0.523598775598299 [rad] Joint Angle SJointAngRate [0][0] = 0 [rad/sec] Joint Angular Rate COMPONENT UniversalJoint_RevoluteJoint_RevoluteJointPos SJointAng [0][0] = 0.523598775598299 [rad] Joint Angle SJointAngRate [0][0] = 0 [rad/sec] Joint Angular Rate COMPONENT UniversalJoint_Revolute_RevoluteJointPos SJointAng [0][0] = 0 [rad] Joint Angle SJointAngRate [0][0] = 0 [rad/sec] Joint Angular Rate COMPONENT RevoluteJoint_RevoluteJoint_RevoluteJointPos SJointAng [0][0] = 0.523598775598299 [rad] Joint Angle SJointAngRate [0][0] = 0 [rad/sec] Joint Angular Rate 4 Bar Data

  26. 4 Bar Run Dialog

  27. 4 Bar Results

  28. Stanford Arm

  29. Stanford Arm

  30. A2 0.200000E-01 moment of inertia of A (kg-m2) AROT 1.04720 target rotation of A (rad) B1 0.600000E-01 moment of inertia of B (kg-m2) B2 0.100000E-01 moment of inertia of B (kg-m2) B3 0.500000E-01 moment of inertia of B (kg-m2) BROT 1.04720 target rotation of B (rad) C1 .400000 moment of inertia of C (kg-m2) C2 0.100000E-01 moment of inertia of C (kg-m2) C3 .400000 moment of inertia of C (kg-m2) CDISP .100000 target displacement of C (m) D1 0.500000E-03 moment of inertia of D (kg-m2) D2 0.100000E-02 moment of inertia of D (kg-m2) D3 0.100000E-02 moment of inertia of D (kg-m2) DROT 1.04720 target rotation of D (rad) E1 0.500000E-03 moment of inertia of E (kg-m2) E2 0.200000E-03 moment of inertia of E (kg-m2) E3 0.500000E-03 moment of inertia of E (kg-m2) EROT 1.04720 target rotation of E (rad) F1 0.100000E-02 moment of inertia of F (kg-m2) F2 0.200000E-02 moment of inertia of F (kg-m2) F3 0.300000E-02 moment of inertia of F (kg-m2) FROT 1.04720 target rotation of F (rad) K1 3.00000 stiffness coefficient (N-m) K2 5.00000 damping coefficient (N-m-s) K3 1.00000 stiffness coefficient (N-m) K4 3.00000 damping coefficient (N-m-s) K5 .300000 stiffness coefficient (N-m) K6 .600000 damping coefficient (N-m-s) K7 .300000 stiffness coefficient (N-m) K8 .600000 damping coefficient (N-m-s) K9 .250000 stiffness coefficient (N-m) K10 .250000 damping coefficient (N-m-s) K11 30.0000 stiffness coefficient (N/m) K12 41.0000 damping coefficient (N-s/m) L1 .100000 coordinate of center of mass of B in dir 1 (m) L2 .600000 coord. of attachment pt. for E in dir 2 (m) L3 .200000 coordinate of center of mass of F in dir 2 (m) L5 .700000 coordinate of center of mass of D in dir 2 (m) L6 0.600000E-01 coordinate of center of mass of E in dir 2 (m) MA 9.00000 mass of A (kg) MB 6.00000 mass of B (kg) MC 4.00000 mass of C (kg) MD 1.00000 mass of D (kg) ME .600000 mass of E (kg) MF .500000 mass of F (kg) STOPT 10.0000 simulation stop time (sec) Stanford Arm

  31. BEGIN_INPUTS ; COMPONENT RevoluteJoint LocalJointAxis [0][0] = 0 [ND] Local Joint Axis LocalJointAxis [0][1] = 1 [ND] Local Joint Axis LocalJointAxis [0][2] = 0 [ND] Local Joint Axis Inertia [0][0] = 0.01 [kg-m-m] Inertia of Body Inertia [0][1] = 0.02 [kg-m-m] Inertia of Body Inertia [0][2] = 0.01 [kg-m-m] Inertia of Body Mass [0][0] = 9 [kg] Mass of Body CGOffset [0][0] = 0 [m] CG Offset in Body Coordinates CGOffset [0][1] = 0 [m] CG Offset in Body Coordinates CGOffset [0][2] = 0 [m] CG Offset in Body Coordinates COMPONENT RevoluteJoint1 LocalJointAxis [0][0] = 1 [ND] Local Joint Axis LocalJointAxis [0][1] = 0 [ND] Local Joint Axis LocalJointAxis [0][2] = 0 [ND] Local Joint Axis Inertia [0][0] = 0.06 [kg-m-m] Inertia of Body Inertia [0][1] = 0.01 [kg-m-m] Inertia of Body Inertia [0][2] = 0.05 [kg-m-m] Inertia of Body Mass [0][0] = 6 [kg] Mass of Body CGOffset [0][0] = 0 [m] CG Offset in Body Coordinates CGOffset [0][1] = 0 [m] CG Offset in Body Coordinates CGOffset [0][2] = 0 [m] CG Offset in Body Coordinates COMPONENT RevoluteJoint2 LocalJointAxis [0][0] = 0 [ND] Local Joint Axis LocalJointAxis [0][1] = 1 [ND] Local Joint Axis LocalJointAxis [0][2] = 0 [ND] Local Joint Axis Inertia [0][0] = 0.0005 [kg-m-m] Inertia of Body Inertia [0][1] = 0.001 [kg-m-m] Inertia of Body Inertia [0][2] = 0.001 [kg-m-m] Inertia of Body Mass [0][0] = 1 [kg] Mass of Body CGOffset [0][0] = 0 [m] CG Offset in Body Coordinates CGOffset [0][1] = 0.7 [m] CG Offset in Body Coordinates CGOffset [0][2] = 0 [m] CG Offset in Body Coordinates COMPONENT RevoluteJoint3 LocalJointAxis [0][0] = 1 [ND] Local Joint Axis LocalJointAxis [0][1] = 0 [ND] Local Joint Axis LocalJointAxis [0][2] = 0 [ND] Local Joint Axis Inertia [0][0] = 0.0005 [kg-m-m] Inertia of Body Inertia [0][1] = 0.0002 [kg-m-m] Inertia of Body Inertia [0][2] = 0.0005 [kg-m-m] Inertia of Body Mass [0][0] = 0.6 [kg] Mass of Body CGOffset [0][0] = 0 [m] CG Offset in Body Coordinates CGOffset [0][1] = 0.06 [m] CG Offset in Body Coordinates CGOffset [0][2] = 0 [m] CG Offset in Body Coordinates COMPONENT RevoluteJoint4 LocalJointAxis [0][0] = 0 [ND] Local Joint Axis LocalJointAxis [0][1] = 1 [ND] Local Joint Axis LocalJointAxis [0][2] = 0 [ND] Local Joint Axis Inertia [0][0] = 0.001 [kg-m-m] Inertia of Body Inertia [0][1] = 0.002 [kg-m-m] Inertia of Body Inertia [0][2] = 0.003 [kg-m-m] Inertia of Body Mass [0][0] = 0.5 [kg] Mass of Body CGOffset [0][0] = 0 [m] CG Offset in Body Coordinates CGOffset [0][1] = 0.2 [m] CG Offset in Body Coordinates CGOffset [0][2] = 0 [m] CG Offset in Body Coordinates COMPONENT PrismaticJoint1 Inertia [0][0] = 0.4 [kg-m-m] Inertia of Body Inertia [0][1] = 0.01 [kg-m-m] Inertia of Body Inertia [0][2] = 0.4 [kg-m-m] Inertia of Body Mass [0][0] = 4 [kg] Mass of Body CGOffset [0][0] = 0 [m] CG Offset In Body Coordinates CGOffset [0][1] = 0 [m] CG Offset In Body Coordinates CGOffset [0][2] = 0 [m] CG Offset In Body Coordinates LocalJointAxis [0][0] = 0 [ND] Local Joint Axis LocalJointAxis [0][1] = 1 [ND] Local Joint Axis LocalJointAxis [0][2] = 0 [ND] Local Joint Axis COMPONENT BodyOffset1 Offset [0][0] = 0.1 [m] Offset in Local Coordinates Offset [0][1] = 0.1 [m] Offset in Local Coordinates Offset [0][2] = 0 [m] Offset in Local Coordinates Stanford Arm

  32. COMPONENT BodyOffset2 Offset [0][0] = 0 [m] Offset in Local Coordinates Offset [0][1] = 0.6 [m] Offset in Local Coordinates Offset [0][2] = 0 [m] Offset in Local Coordinates COMPONENT T1 Amp [0][0] = -0.12 [ND] Amplitude Freq [0][0] = 0.628318530717959 [rad/sec] Frequency Phase [0][0] = 0 [rad] Phase Angle COMPONENT T3 SigIn2 [0][0] = 0.4 [ND] Input Signal 2 COMPONENT Gain Gain [0][0] = 0.314159265358979 [ND] Gain COMPONENT Gain1 Gain [0][0] = -0.4 [ND] Gain COMPONENT SineWave Amp [0][0] = 0.00022 [ND] Amplitude Freq [0][0] = 0.628318530717959 [rad/sec] Frequency Phase [0][0] = 0 [rad] Phase Angle COMPONENT T5 SigIn2 [0][0] = 0 [ND] Input Signal 2 COMPONENT Gain6 Gain [0][0] = 0.314159265358979 [ND] Gain COMPONENT Gain7 Gain [0][0] = -0.26 [ND] Gain COMPONENT Gain8 Gain [0][0] = -4000 [ND] Gain COMPONENT Gain9 Gain [0][0] = -1800 [ND] Gain COMPONENT Gain12 Gain [0][0] = -150 [ND] Gain COMPONENT Gain13 Gain [0][0] = -50 [ND] Gain COMPONENT T2 SigIn2 [0][0] = -14.678 [ND] Input Signal 2 COMPONENT Gain16 Gain [0][0] = -1 [ND] Gain COMPONENT Gain17 Gain [0][0] = -1 [ND] Gain COMPONENT Sum SigIn2 [0][0] = -1.3107963267949 [ND] Input Signal 2 COMPONENT LookupTable IndexVector [0][0] = 0 [ND] Index Vector IndexVector [0][1] = 0.5 [ND] Index Vector IndexVector [0][2] = 0.75 [ND] Index Vector IndexVector [0][3] = 1 [ND] Index Vector IndexVector [0][4] = 2 [ND] Index Vector ValueVector [0][0] = 0 [ND] Value Vector ValueVector [0][1] = -0.06 [ND] Value Vector ValueVector [0][2] = -0.09 [ND] Value Vector ValueVector [0][3] = -0.1 [ND] Value Vector ValueVector [0][4] = -0.1 [ND] Value Vector Extrapolate [0][0] = 0 [1-No] Extrapolation Flag COMPONENT T4 SigIn2 [0][0] = 0 [ND] Input Signal 2 COMPONENT Earth InitPos [0][0] = 0 [m] Initial Position InitPos [0][1] = 0 [m] Initial Position InitPos [0][2] = 0 [m] Initial Position BEGIN_STATES ; COMPONENT RevoluteJoint_RevoluteJoint_RevoluteJointPos SJointAng [0][0] = 0 [rad] Joint Angle SJointAngRate [0][0] = 0 [rad/sec] Joint Angular Rate COMPONENT RevoluteJoint1_RevoluteJoint_RevoluteJointPos SJointAng [0][0] = 1.5707963267949 [rad] Joint Angle SJointAngRate [0][0] = 0 [rad/sec] Joint Angular Rate COMPONENT RevoluteJoint2_RevoluteJoint_RevoluteJointPos SJointAng [0][0] = 0 [rad] Joint Angle SJointAngRate [0][0] = 0 [rad/sec] Joint Angular Rate COMPONENT RevoluteJoint3_RevoluteJoint_RevoluteJointPos SJointAng [0][0] = 0 [rad] Joint Angle SJointAngRate [0][0] = 0 [rad/sec] Joint Angular Rate COMPONENT RevoluteJoint4_RevoluteJoint_RevoluteJointPos SJointAng [0][0] = 0 [rad] Joint Angle SJointAngRate [0][0] = 0 [rad/sec] Joint Angular Rate COMPONENT PrismaticJoint1_PrismaticJoint_PrismaticJointPos SJointPos [0][0] = 0 [m] Joint Position SJointVel [0][0] = 0 [m/s] Joint Velocity Stanford Arm

  33. Stanford Arm: AutoSim vs. SimCreator

  34. Developing Force Elements • Must develop a standard side interface for connecting your external force to other multi-body components (light red side) • Calculate global forces and moments acting on the upstream component • Can’t use acceleration or angular acceleration to calculate the force and moment • Assign the negative of the force and moment to the first three elements of the Force1 and Moment1 vector outputs

  35. TYPE(ALGEBRAIC) NAME(SimpAero) SIDES(42,42,LRED,NONE,NONE,NONE) BEGIN_DEFINITIONS /* SIDE 1 */ DEFINE_CINPUTV(SimRealVar,LinAccel3,"Global Linear Acceleration","m/s/s",SIDE1,LOCATION1,DIMA) DEFINE_INPUTV(SimRealVar,LinVel1,"Global Linear Velocity","m/s",SIDE1,LOCATION2,3) DEFINE_INPUTV(SimRealVar,LinPos1,"Global Linear Position","m",SIDE1,LOCATION3,3) DEFINE_CINPUTV(SimRealVar,AngAccel1,"Global Angular Acceleration","rad/s/s",SIDE1,LOCATION4,DIMA) DEFINE_INPUTV(SimRealVar,AngVel1,"Global Angular Velocity","rad/sec",SIDE1,LOCATION5,3) DEFINE_INPUTV(SimRealVar,TM1,"Transformation Matrix","ND",SIDE1,LOCATION6,9) DEFINE_OUTPUTV(SimRealVar,Force1,"Global Force","N",SIDE1,LOCATION7,DIMA) DEFINE_OUTPUTV(SimRealVar,Moment1,"Global Moment","Nm",SIDE1,LOCATION8,DIMA) /* SIDE 2*/ DEFINE_INPUT(SimRealVar,FrontalArea,"Frontal Area","m2",SIDE2,LOCATION1) DEFINE_INPUT(SimRealVar,FrontalCd,"Frontal Cd","ND",SIDE2,LOCATION2) DEFINE_INPUT(SimRealVar,LiftCl,"Lift Versus Forward Speed","ND",SIDE2,LOCATION3) DEFINE_INPUT(SimRealVar,SideCd,"Side Cd","ND",SIDE2,LOCATION4) END_DEFINITIONS BEGIN_INIT int i; for(i=0;i<DIMA;i++){ OUTPUT(Force1)[i]=0.0; OUTPUT(Moment1)[i]=0.0; } END_INIT BEGIN_STOP END_STOP BEGIN_RATES END_RATES BEGIN_OUTPUTS SimRealVar lForce[3],lVel[3]; /* forces are purely on a static and dynamic component */ simTransGL(INPUTV(LinVel1), (const SimRealVar (*)[3])INPUTV(TM1),lVel); /** Note this is really the force the system is applying so negated */ lForce[XCOORD]=0.5f*1.225f*INPUT(FrontalArea) *INPUT(FrontalCd)*lVel[XCOORD] *fabs(lVel[XCOORD]); lForce[YCOORD]=0.5f*1.225f*INPUT(FrontalArea) *INPUT(SideCd)*lVel[YCOORD] *fabs(lVel[YCOORD]); lForce[ZCOORD]=0.5f*1.225f*INPUT(FrontalArea) *INPUT(LiftCl)*lVel[XCOORD] *lVel[XCOORD]; /* Now Convert to Global Coords */ simTransLG(OUTPUT(Force1), (const SimRealVar (*)[3])INPUTV(TM1),lForce); OUTPUT(Moment1)[ROLL]=0.0f; OUTPUT(Moment1)[PITCH]=0.0f; OUTPUT(Moment1)[YAW]=0.0f; END_OUTPUTS BEGIN_STATE_OVERRIDE END_STATE_OVERRIDE Developing Force Elements

  36. 18 DOF Vehicle Model

  37. Set Values • Set All Angular Inertias to 5 • Set Offsets to (1.4,.7,0.5): watch out the signs must match for each corner.

  38. Set Values 6 DOF Body

  39. Set Initial Height and Euler Parameters • Set initial height to -0.5 • Set Euler Parameters to 1,0,0,0

  40. Set Relaxation Length

  41. Set Longitudinal Stiffness

  42. Set Camber Stiffness and Magic Formula

  43. Set Collision Mass and Inertia

  44. Set Compile Flags • Add /DVALIDATION to turn off terrain query (flat ground)

  45. Run The Model

  46. View the Vehicle Settling

  47. Load the Output Data File and Resettle

  48. Set Up High Speed with Steering Set 6DOF Velocity Angular Velocities on each Angular Inertia Set the sinewave inputs

  49. Plot Results

More Related