• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Adams
  3. How to modify the initial position/orientation of the model...

Following Cadence Design Systems’ acquisition of the Design & Engineering (D&E) business, the D&E Community Forum on the Nexus Community Center has been migrated in the Cadence Physical System Simulation Community. For more details and if you have any questions, please refer to the FAQ.

Stats

  • State Not Answered
  • Replies 6
  • Subscribers 3
  • Views 20
  • Members are here 0
More Content

How to modify the initial position/orientation of the model from MATLAB/Simulink?

ryuki
ryuki over 9 years ago
Hello
​
I am using Adams-MATLAB/Simulink co-simulation in order to design the controller for a robot.
And I want to change the initial position/orientation of the parts of the robot model from Simulink to find the best initial position/orientation for the robot control.​
 
Is it possible? and how can I do?
Or, do I need to change the model configuration manually everytime?
 
Thank you
 
  • Sign in to reply
  • Cancel
  • MK202610123211
    0 MK202610123211 over 9 years ago
    You could use GCONS to drive the part motions and the GCONS are allowed to have a VARVAL() as an input. That could be state vars from Matlab, i.e. a desired position.
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Jesper Slattengren
    0 Jesper Slattengren over 9 years ago
    But doing this in one step at the beginning of the simulation might cause ADAMS/Solver to fail. The safe way would be to move the system in a continuous way during some initial time period.
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • ryuki
    0 ryuki over 8 years ago
    Thank you for the good suggestions, @Martin Kieltsch​ and @Jesper Slattengren​ .
    ​
    I learned and tried using the general constraint (GCON), and I found that it allowed me to deal with the position as one of the parameters.
    The Adams plant was exported successfully.
    ​
    But, as @Jesper Slattengren​  said, the simulation was failed.
    Probably it is because the model suddenly moves to the first constrained position from the modeled position.
    ​
    I thought providing the initializing phase is a good idea, but I have a problem.
    My model is not fixed to the ground (Floating model).
    So, I found that it is still hard for me to move the system in a continuous way before main motion simulated.
    If I want to do so, I need to constraint one part to the ground during initializing, and after that unconstraint it.
    Also, I would like to set the joint torque as input signals and the joint angle and angular velocity as output signals of the Plant.
    So it is a little different with what I want to do.
    ​
    I understand that the point is how to change the design-time variables of the model from other software.
    For example, if you use design evaluation tools in ADAMS, you can set the design-time variables (i.e. coordination, mass property, spring coefficient etc) as the design variable.
    If is it possible to set the coordination of the markers belongs to each part at the initial position as state parameter like the design variable (DV) does, I think I can change it from Matlab.
    ​
    Is there a way to do so?
    ​
    Thank you.
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • MK202610123211
    0 MK202610123211 over 8 years ago
    Why so complicated?
    How about trying to use an initial amount of time like 1s or so to move everything to the right position and THEN start the controlling actions ?
    That's easily done by a simple step(time,0,0,1,1)*varval(xxx) in the GCON expression.
     
    Constraining a part to ground and release it at time x:
    Lock position by a GCON with if(time-1,DXYZ(marker on part, marker on ground),0,0)
    That'll make the expression go zero at 1s and thus "release" the part.
    Then do the same with WXYZ to "lock" rotations.
     
    Later on you just plot everything with a 1s offset and everything is fine.
     
    And yes, it's possible to have Matlab create ADAMS command files that can be read to modify models at design time.
    Just haven't used that with a Cosim and thus can't tell if/how it'd work.
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • ryuki
    0 ryuki over 8 years ago
    I didn't know that the model will be released if I make the GCON ​to be ZERO.
    I will try and report it.
    Thank you very much.
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
>
Cadence Guidelines

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2026 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information