Equations of Motion: Constrained Hybrid Dynamics

In summary, the conversation discusses the implementation of a model-based dynamics software in MATLAB and the process of solving for accelerations and generalized forces in a constrained system. The speaker seeks input and feedback on their implementation and expresses uncertainty about a potential error in their code. They are advised to double check their constraint equations and seek help from other experts or online communities.
  • #1
Liferider
43
0
Hi all, I've tried to figure this out for some time without luck. Hope you might be able to give some input.

I've implemented a model-based dynamics software in MATLAB based on the works of Roy Featherstone's Springer book "Rigid Body Dynamics Algorithms".

So, I have the EoM of an unconstrained system:
\begin{equation*} \mathbf{H}(\mathbf{q})\ddot{\mathbf{q}} + \mathbf{C}(\mathbf{q},\dot{\mathbf{q}}) = \boldsymbol{\tau}
\end{equation*}
where i used the composite rigid body algorithm to find H and C. The system is constrained so I supplied the following state vector and its derivative:
\begin{align*} \mathbf{q} &= \boldsymbol{\gamma}(\mathbf{x}) \\
\mathbf{\dot{q}} &= \mathbf{G}\mathbf{\dot{x}}
\end{align*}
So far so good, but now I want to eliminate the constrained variables and solve for accelerations only for some joints while solving the inverse, ie, for the generalized forces for the other variables. To do this I constrain the matrices H and C with G and [tex] \mathbf{g} = \mathbf{\dot{G}\dot{x}} [/tex](still following Featherstone):
\begin{align*}
\mathbf{H_G} &= \mathbf{G^T}\mathbf{H}\mathbf{G} \\
\mathbf{C_G} &= \mathbf{G^T}(\mathbf{C} + \mathbf{H}\mathbf{g}) \\
\boldsymbol{\tau_G} &= \mathbf{G^T}\boldsymbol{\tau}
\end{align*}
to obtain the new constrained EoM:
\begin{equation*} \mathbf{H_G}\ddot{\mathbf{x}} + \mathbf{C_G} = \boldsymbol{\tau_G}
\end{equation*}
Note that I got the unconstrained generalized force via
[tex] \boldsymbol{\tau} = \mathbf{G}\boldsymbol{\tau_x} [/tex]
where \tau_x is the generalized force vector of my independant variables.

I then proceed "by the book" to separate inverse and forward dynamics variables, solve first for the forward dynamics accelerations and then inversely for the remaining generalized forces. I just have a feeling that I ****ed up somewhere here. Maybe its somwhere else in my code but will this work? When I simulate the system it seems to work fine as long as I don't choose inverse dynamics for joints that are part of the constraint function.. when I do the motion becomes obviously wrong.

Anyways, thank you for any replies!
 
Physics news on Phys.org
  • #2


Hi there,

It seems like you have a good understanding of the mathematical principles involved in your model-based dynamics software. However, without seeing your code or knowing more details about your specific system, it's difficult for me to give you specific feedback on where you may have gone wrong.

One thing I would suggest is to double check your constraint equations and make sure they are accurately representing the constraints in your system. It's possible that there may be an error in how you are constraining the matrices H and C.

Another thing to consider is the stability of your system. If your system becomes unstable when you try to solve for the inverse dynamics of constrained joints, it could be an indication that something is not quite right in your implementation.

I would also recommend reaching out to other experts in the field or seeking help from online communities where you can share your code and get more specific feedback on potential errors.

Overall, it seems like you have a good understanding of the principles involved and are on the right track. I wish you luck in finding the solution to your problem. Keep persevering and seeking help when needed.
 

FAQ: Equations of Motion: Constrained Hybrid Dynamics

1. What are the main principles behind equations of motion in constrained hybrid dynamics?

The main principles behind equations of motion in constrained hybrid dynamics are based on Newton's laws of motion and the principle of virtual work. These principles state that the total force on a system is equal to its mass times its acceleration, and that the work done by external forces is equal to the change in kinetic energy of the system.

2. How are equations of motion used in constrained hybrid dynamics?

Equations of motion are used to model the behavior of systems with multiple constraints, such as mechanical systems with rigid bodies connected by joints. They are used to calculate the motion of these systems over time, taking into account the various forces and constraints acting on them.

3. What is the difference between constrained and unconstrained dynamics?

Constrained dynamics refers to systems with multiple constraints, such as mechanical systems with joints and rigid bodies. These constraints restrict the motion of the system and must be taken into account when calculating its motion. Unconstrained dynamics, on the other hand, refers to systems with no constraints and can be described using simpler equations of motion.

4. Can equations of motion be used for both linear and nonlinear systems?

Yes, equations of motion can be used for both linear and nonlinear systems. Linear systems follow a simple relationship between inputs and outputs, while nonlinear systems have more complex relationships. The equations of motion for nonlinear systems may be more complicated, but they still follow the same principles of constrained hybrid dynamics.

5. How do initial conditions and parameters affect the equations of motion in constrained hybrid dynamics?

Initial conditions and parameters, such as the mass and geometry of the system, can greatly impact the equations of motion in constrained hybrid dynamics. These values are used as inputs in the equations and can significantly alter the behavior and motion of the system. Therefore, it is important to accurately measure and consider these factors when using equations of motion in constrained hybrid dynamics.

Back
Top