SimMechanics Second Generation
SimMechanics users, the first time you opened the Simulink Library Browser in R2012a, you probably noticed a big change: SimMechanics Second Generation
SimMechanics Second Generation is a complete redesign of SimMechanics. Let's see what this means.
A new way of thinking: Frame Centered
In the First Generation, all rigid body coordinate systems are defined in the Body block, using a dialog. Coordinate systems can be defined relative to different frames, including both local and the global World frame.
In SimMechanics Second Generation, each coordinate frame is defined locally, using a Rigid Transform block:
Notice that the lines in the diagram correspond to coordinate frames in your model. This makes reusing coordinate frames much easier – you just branch the line any time you want to connect something new to that frame.
Improved Joints
Let's look at the dialog of the Revolute Joint:
We can see that:
- Standard Z axis: In SimMechanics Second Generation, the revolute joint has a standard convention for its degree of freedom that is always defined locally by the parts it connects. This local definition makes it easy to reuse mechanisms in other configurations. Other joints have similar standardized axes, following the standards used in robotics.
- State Target Priority: When designing complex closed-loop mechanisms, it can be difficult to specify the initial condition of joints consistently. With the low priority, you can specify a value close to the desired configuration and SimMechanics will calculate the exact consistent initial condition for you.
- Internal Mechanics: No more need to connect sensors and actuators to add stiffness and damping to your joints!
- Integrated Sensors: No need for joint sensor blocks anymore.
Mechanics Explorer
Compared to the First Generation visualization, the Mechanics Explorer offers a lot advantages:
- Speed: Negligible effect on the simulation speed. No more need to close the visualization to speed up your simulation.
- Control Animation Speed: Many options to display the animation: as fast as possible, real-time, step-by step, etc.
- Replay: Replay the animation without re-running the simulation... this can save a lot of time!
- Multiple Views Simultaneously: You can view your system from multiple viewpoints at the same time.
- Tree Browser: Easily navigate through complex models with a tree structure that matches your block diagram hierarchy
Here is what it looks like:
Interface to Simscape
SimMechanics Second Generation is built on the Simscape Engine. This means that you can directly connect Simscape components to SimMechanics joints, without going through Simulink signals.
I am not going into details here because I am planning a future post on this topic, but I think this is a significant advantage.
Upgrading
In need to warn you that some features from First Generation are not yet available in Second Generation.
Before converting your models to Second Generation, I recommend going through the documentation to verify it meets your needs.
Now it's your turn
Give SimMechanics Second Generation a try by opening some demonstration models, including sm_stewart_platform and sm_wing_landing gear.
You can also watch a video, such as Modeling an Engine, or download an example from MATLAB Central like Mini Golf.
Let us know what you think by leaving a comment here.- Category:
- Physical Modeling,
- Rapid Prototyping
Comments
To leave a comment, please click here to sign in to your MathWorks Account or create a new one.