Azzera filtri
Azzera filtri

Connecting 2nd gen blocks to 1st gen

1 visualizzazione (ultimi 30 giorni)
Rachel
Rachel il 3 Lug 2012
In the user manual it says the two types of blocks can be connected through a simulink signal.. how does this work exactly?
I have a model built with all first generation blocks and am trying to add Angle constraint and External Force blocks.

Risposta accettata

Ryan G
Ryan G il 3 Lug 2012
I'm not sure you would need or want to use 2nd generation for something like this. Reason being is I believe you will be adding more complexity to your system by switching between the two which should be avoided if not necessary.
You can use something like an Angle Driver instead and add an actuator port.
If you must attempt this you can use a sensor block, such as body sensor, on 1st gen and a combination Simscape-PS Converter connected to the External Force and Torque block. The Converter is needed because the input force is expected to be simscape instead of simulink like first gen.
  2 Commenti
Rachel
Rachel il 3 Lug 2012
Thanks for the tip. I'm having a lot of trouble making the angle Driver block work. The error I keep getting says 'The two body axes in this angle driver are aligned, within tolerance. The motion is singular. The angle between these body axes cannot be zero.'
I've looked at the mech_angle_unact example of the angle driver, and tried inputting similar values for my CS. The body I am trying to connect to ground at a specific angle has its Center of Gravity coordinate system based on the CS of an adjoining body - could this be contributing to the problem?
Ryan G
Ryan G il 3 Lug 2012
If you go to the documentation for the block you will see:
Caution If the two axes come close to aligning, that is, if θ approaches zero, the constraint between the two axes becomes singular, and the simulation slows down. See How SimMechanics Software Works and Handling Motion Singularities in the Running Mechanical Models chapter.
and there is a link for handling the singularity. Which states:
You can alleviate these motion singularities by selecting the Use robust singularity handling on the Constraints tab of the Machine Environment dialog.
I looked at that example and did notice the body's are all defined relative to the world, instead of to adjoining bodies as you describe. I'm not sure how to resolve the issue with your model. I was able to change the coordinate system in the demo such that body1 CS1 was adjoining and CS2 and CG were relative to CS1. Also I changed body2 CS1 top adjoining and changed the other CS and CG to be relative to the CS1 in that body, everything worked ok.

Accedi per commentare.

Più risposte (0)

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by