Key Features

  • Blocks and modeling constructs for simulating and analyzing 3D mechanical systems in Simulink
  • Rigid body definition using standard geometry and custom extrusions defined in MATLAB
  • Automatic calculation of mass and inertia tensor
  • Simulation modes for analyzing motion and calculating forces
  • Visualization and animation of multibody system dynamics with 3D geometry
  • SimMechanics Link utility, providing an interface to Pro/ENGINEER®, SolidWorks®, and Autodesk® Inventor®, and an API for interfacing with other CAD platforms
  • Support for C-code generation (with Simulink Coder)

Modeling a Piston
Model a piston using multibody dynamics. Bodies, joints, and 3D visualization are defined and simulated.

SimMechanics is used to optimize system-level performance and to create plant models for control design. The models you create support your entire development process, including hardware-in-the-loop simulations.

SimMechanics model of landing gear with a 3D visualization.
SimMechanics model of landing gear. Left: 3D visualization generated automatically from the model. Right: Portion of the model.

Modeling Multibody Systems

SimMechanics enables you to create libraries of components that can be reused in many different designs. You define bodies in terms of their mass, inertia, and connection points. To create complex shapes, you assemble sets of simple geometries, such as spheres, cylinders, and extrusions defined in MATLAB, and SimMechanics calculates the resulting mass and inertia automatically. The diagram that defines the body clearly indicates all connections to the body, making it easy to see your system’s topology. Parameters such as length and mass can be calculated using MATLAB scripts and assigned using MATLAB variables.

Parameterizing Bodies
Parameterize bodies with MATLAB® variables. Reuse components and mechanisms to build a scissor lift.

You connect bodies using joints and constraints. These define the degrees of freedom permitted between the bodies in your system, which dictate how your system can move. You can define and connect actuators to these joints to enable your system to move. Actuating these joints with electrical, hydraulic, pneumatic, or other physical systems modeled using Simscape enables you to model your entire multidomain physical system within the Simulink environment.

Actuating and Sensing Joints
Actuate joints and send measured values to Simulink® scopes. A hydraulic system modeled in Simscape™ actuates a scissor lift.

SimMechanics models can be connected to control systems modeled in Simulink and Stateflow®. You can measure quantities such as force, torque, and velocity, and pass this information to Simulink blocks. Motion, force, and other results calculated in Simulink can be used to control your mechanical system.

SimMechanics model of four-bar linkage components.
SimMechanics model of four-bar linkage components. Links are composed of connected solids (left) that are defined by a preselected shape (bottom) and MATLAB variables; components are connected by joints with specified state targets (right).

Importing CAD Models

You can import a CAD assembly into SimMechanics using SimMechanics Link. The mass and inertia of each part in the assembly are imported as rigid bodies in SimMechanics. Geometry from the CAD assembly is saved to geometry files and associated with the proper body in SimMechanics. The mate definitions in the CAD assembly are imported as joints in the SimMechanics model.

Importing a CAD Suspension Assembly into SimMechanics
Import a CAD assembly to SimMechanics™ using SimMechanics Link. Add tire model and steering system, and automate toe and camber tests using MATLAB®.

For SolidWorks, Pro/ENGINEER, and Autodesk Inventor models, you install a plug-in that lets you save the CAD assembly as an XML file that can be imported into SimMechanics. For other CAD systems, SimMechanics Link provides an API that you can connect to the API of your CAD system. Download SimMechanics Link.

The SimMechanics Import XML Schema enables you to import models into SimMechanics from any CAD system or modeling environment that exports an XML file that follows this schema. View and download SimMechanics Import XML Schema.

Piston model imported from CAD into SimMechanics.
Piston model imported from CAD into SimMechanics. After the CAD model of the piston (top left) is saved as an XML file, and imported into SimMechanics (bottom), the visualization is generated from the STL files automatically exported from the CAD system (right).

Simulating Models

SimMechanics provides specialized solver technology for simulating multibody mechanical systems. You can perform different types of analyses, including forward dynamics, inverse dynamics, and kinematics. You can apply forces and torques to your machine and see the resulting motion, or specify motions and calculate the forces and torques required to produce that motion. With these capabilities, you can generate and test requirements for actuation systems, or see how a prosthetic limb would move.

Using state targets, you can guide the assembly of your mechanism, specifying only key information. You can provide optional target joint positions and velocities and specify whether the targets should be met exactly or approximately. SimMechanics uses these values and priorities to automatically assemble and determine the initial state of your mechanism. A report informs you how closely SimMechanics met your state targets and the assembled values.

Guiding Mechanism Assembly
Specify exact and approximate initial states, including positions and velocities. Review assembly results in a model report.

SimMechanics automatically creates a 3D animation during simulation. You can replay it without rerunning the simulation. You can also display your simulation results during simulation using Simulink scopes. You can use MATLAB scripts to postprocess and plot the data.

SimMechanics model of a four-bar linkage.
SimMechanics model of a four-bar linkage. The simulation results can be reviewed in a 3D animation (top left) or on Simulink scopes (top right), while a Model Report (bottom) shows details about the assembly of your model, including initial conditions.

Visualizing Models

SimMechanics automatically creates a 3D visualization of all bodies in your model. During simulation, an animation of the machine is generated, showing you the motion of the system. You can replay the animation without rerunning the simulation, and save the animation to a file.

Exploring SimMechanics Models
Replay 3D animations and configure the views. Explore the model from the 3D representation and via the tree browser.

You can adjust the color, opacity, and other visual properties of the bodies. For help in verifying locations and orientations, you can display the frames and the center of mass associated with the body. Multiple view angles can be shown simultaneously, enabling you to see how your mechanism looks and moves from different angles.

To help navigate and explore your model, the 3D view of your mechanism contains a tree browser. You can view the parameters for the elements in your mechanism by selecting them in the tree browser or the 3D view. The combination of the 2D block diagram and 3D visual representation of your mechanism lets you verify connections in your model and see how the system behaves.

SimMechanics 3D animation and Mechanics Explorer tool.
SimMechanics 3D animation and Mechanics Explorer tool. You can review simulation results in an automatically generated 3D animation (left), and use a tree browser to navigate and explore your model (right).

Deploying Models

You can deploy SimMechanics models using code generated with Simulink Coder. The generated code lets you:

  • Build standalone executables of SimMechanics models that can be integrated into C programs or other MATLAB and Simulink models
  • Run hardware-in-the-loop (HIL) simulations by deploying SimMechanics plant models onto real-time processors that interface directly with other hardware
  • Improve simulation speed by compiling the C code
  • Share models without exposing your intellectual property

Hardware-in-the-loop (HIL) Testing
Use HIL testing instead of hardware prototypes to test control algorithms. Convert physical model to C code and simulate in real time on controller hardware.

Sharing Models

You can share SimMechanics models with Simscape users who have not purchased SimMechanics. Simscape users can view, simulate, and change parameter values in SimMechanics models with the Simscape Editing Modes. As a result, your team can share SimMechanics models with a larger group of engineers who use Simscape.

Sharing Models Using Simscape Editing Mode
Share models without requiring licenses for Simscape™ add-on libraries. Open models in Restricted Mode and perform tasks such as simulation, parameter tests, and code generation.

Working with SimMechanics Models
Task Model Developer
(Purchases Simscape and SimMechanics)
Model User
(Purchases Simscape)
Log data or change visualization
Change numerical parameters
Generate code with Simulink Coder
Change block parameterization options  
Make or break physical connections  

SimMechanics in Academia

SimMechanics can help you teach how theory relates to system behavior. Animations produced from SimMechanics simulations illustrate a system’s motion and give students a better understanding of the laws of physics. To demonstrate how effects such as friction influence the mechanical system represented by your SimMechanics model, you can implement equations for these effects in the Simscape language.

Using simulation, your students can prototype in a virtual environment, which encourages them to try out new designs and to explore the entire parameter space. Simulation enables them to optimize their designs in research projects and student competitions.

Because SimMechanics is used widely across industries such as automotive, aerospace, and robotics, graduating students who have experience with this multibody simulation tool are in demand by employers.

Integrating Physical Systems and Controller
Detect system integration issues in simulation. Mechanical, hydraulic, electrical, and control systems are gradually integrated into a full system model.

Learn more about engaging students with modeling and simulation.

SimMechanics Technologies

SimMechanics includes both First-Generation and Second-Generation technologies. Second-Generation technology offers a redesigned block diagram language focused on local component definitions to support reusability and library development. It also offers more advanced 3D visualization and animation capabilities that are tightly connected to the block diagram representation. You have the option to create and simulate a mechanical model using First- or Second-Generation technology.

For more information on the difference between these two technologies, see the SimMechanics documentation and Release Notes.

SimMechanics Introduction
Create part definitions parameterized with MATLAB® for multibody simulation. Reuse parts using copy and paste.

Analisi Statica del Codice con i prodotti Polyspace

View webinar