Internal Mechanics change for joint block in mid-simulation with function - Simscape

Hi all,
my question is: is it possible to modify some parameters in internal mechanics box of a joint block (like a prismatic joint) in Simulink, for example the spring stiffness, to let it assume a value dynamically during the simulation, using a function? This function must receive as input some values that I cannot pass it directly.. Reading other topics it would not seem possible, but does anyone know some tricks?
Thanks in advance!

 Respuesta aceptada

The internal mechanics of a joint cannot change during simulation. They assume constant spring stiffness and damping. One solution for developing a variable spring and damper is to sense the position and velocity of the joint primitive in question and then develop a force law in Simulink that follows the desired behavior. That force can be provided as input to the joint primitive via the Actuation settings of the primitive. This strategy allows users to develop their own custom force laws. The MATLAB Function block in Simulink provides a nice interface for writing a custom force law.

3 comentarios

Thanks for the answer, Sam! I had thought of something similar.
This is my doubt: I already have as input in other revolute joints the kinematic angular positions, while in the prismatic joint I should have introduce a variable spring stiffness depending on the output of the previous prismatic joints (power and torque, just for example). For the moment, I inserted manually every value for each simulation in order to find the best case scenario. Even in this situation is it possible to develope a force law? I mean, every revolute joints have their kinematic input and every prismatic joint should have... what type of input? Alway a force or something else? In this scenario, how can the spring stiffness change?
Sorry for the trouble, best regards!
I don't understand your specific situation so it is difficult to say exactly what you need to do. The general strategy is to derive the force-law equations by hand on paper. You then sense relevant quantities from the Simscape Multibody blocks that are required by the force law. You then apply the forces via the Actuation settings in the joint blocks or via equal and opposite External Force and Torque blocks.
I see, Sam. I'll try this solution in my future work, because for the moment it requires many changes to my model and I cannot do it right now. I hope for the best!
Thanks for all!

Iniciar sesión para comentar.

Más respuestas (0)

Productos

Versión

R2020b

Preguntada:

el 1 de Feb. de 2021

Comentada:

el 15 de Feb. de 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by