top of page

Understanding Matlab Simscape

In the early stages of the project, the individual opted to use Solidwork and Matlab for the robot simulation under the guidance of their supervisors. As they were already familiar with Solidwork, they decided to focus on exploring the Matlab Simulink environment to make progress in the project. They went through relevant resources to gain a better understanding of Simulink and the required tools for the project. It can be stated that the user explored the concept of simscape multibody dynamics and started with a simple tutorial to define parts for multibody simulation.

​​

The link of the tutorial is:

 

After launching Simulink with the command "smnew" in the command window, the user created an updated file for their system. The system consisted of several components, including the world with solver configuration, world frame, and mechanism configuration, a subsystem with a solid brick and solid cylinder, a rigid transform, a brick solid, and a revolute joint. The main system was depicted in a figure for better visualization.

 

The first stage of the control of the wheel-legged biped robot's balance has begun, which involves simulating the system as a simple pendulum. This is an important step in developing a control system for the robot, as it helps in understanding the dynamics of the system and the parameters that affect its behavior. Simscape Multibody provides a variety of standard solids and unique shapes that can be combined to create parts for use in multibody simulation. These solids can be directly connected to define complex component geometries. For instance, consider the scissor lift mechanism. One component of this mechanism can be initially defined using simple solids, such as a block and a cylinder. These solids can then be combined using direct connections to create a more intricate component definition that more accurately represents the part in the multibody model. To parameterize the mechanism in the multibody model, custom parts can be defined in MATLAB. This allows for complete control over the parameters that define the components. Important parameters can be changed in MATLAB, and the components will update immediately to reflect these changes.

 

This flexibility makes it easier to optimize the design of the mechanism and investigate its behavior under different operating conditions. With Simscape Multibody, engineers can create highly detailed multibody models of complex systems, and use these models to analyze the dynamics of these systems in order to identify potential design flaws and improve performance.

Picture1.png

Figure 01: The main system

The subsystem is given in the below diagram. Here there are two brick solids for the outer parts of the pendulum and there is cylinder attach to brick solids to rotate and allowing the pendulum to move.

Picture2.png

Figure 02: The sub system

Defining the blocks with different visual properties is a good way to clearly distinguish between the different parts of the system in a Simscape Multibody model. This allows for easier identification of each part when making changes to the model or analysing simulation results.

 

In this case, the brick solid part for the pendulum has been defined with a realistic geometry to accurately represent the physical object in the simulation. The inertia of the pendulum has also been defined, which is important for accurate modelling of its motion.

 

Defining the inertia of each part of the system is necessary to accurately model the dynamics of the robot. Inertia is a measure of an object's resistance to changes in its motion, and plays a key role in determining how the robot will behave when subjected to external forces. By defining the inertia for each part of the system, the simulation can accurately model the movement of the robot, taking into account the mass and geometry of each component.

 

By defining each block with different visual properties and accurately representing the geometry and inertia of each part, the Simscape Multibody model can provide a realistic simulation of the behaviour of the wheel-legged biped robot.

Picture3.png

Figure 03: The Brick solid 01

In Simulink, a Rigid Transform block defines the position and orientation of a coordinate frame with respect to another coordinate frame. It can be used to transform the motion of a body in one frame to another frame.

 

In this case, the Rigid Transform block is used to define the position and orientation of the brick solid part with respect to the world frame. The axis of rotation for the pendulum is defined as the translation axis (+x direction), which means that the pendulum will rotate around the x-axis. The offset value of 1.2 meters specifies the distance between the origin of the brick solid part and the axis of rotation, which is the distance from the pivot point to the center of mass of the pendulum.

By defining the Rigid Transform block in this way, the pendulum is connected to the world frame and will rotate around the x-axis based on the input torque or force applied to it.

Picture4.png

Figure 04: The rigid transform

In Simscape Multibody, the mechanism configuration block allows the user to specify the global reference frame, the direction and magnitude of gravity, and other properties of the physical system. The uniform gravity block within the mechanism configuration block applies a constant gravitational force in the direction specified by the user.

 

In this case, the simulation is set to run relative to the negative Y-axis, which means that gravity is acting in the negative Y direction. This means that the pendulum, which is defined as a solid brick in the simulation, will experience a constant gravitational force in the negative Y direction. This is important for the simulation to accurately represent the physical behavior of the pendulum in a real-world scenario, where gravity is a fundamental force acting upon all objects.

Picture5.png

Figure 05: The Mechanism Configuration

It is reported that the simulation was fully functioning and the learner was able to gain several learning outcomes. These include knowledge about how to attach systems, defining parts, setting up the geometry and the appearance of solid parts, putting inertia to the body, and putting gravitational force to the system. By following the tutorial step by step, the learner was able to gain hands-on experience with the Simulink environment and Simscape Multibody dynamics.

It's possible that the simulation will loop infinitely, depending on the physics and parameters that were set in the system. The Simulink environment is designed to simulate the behavior of a system over time, and if the physics and constraints are not properly set, the simulation may not converge or may loop infinitely. This could be due to a number of reasons such as incorrect physical properties, improper initial conditions, or incorrect model configuration. It's important to carefully examine the simulation results and make necessary adjustments to ensure that the simulation behaves as intended.

Simscape Multibody

Simscape Multibody is a powerful tool for simulating and analysing the behaviour of mechanical systems such as robots. Here are some of the key things to understand about using Simscape Multibody for robot simulation:

Modeling

To simulate a robot using Simscape Multibody, you will need to create a model that represents the robot's physical structure and components. This typically involves creating a 3D model of the robot, defining its joints and links, and adding sensors, actuators, and other components as needed.

Visualization

 

Simscape Multibody provides powerful visualization tools that allow you to view and analyse the behaviour of your robot in 3D. This includes tools for animating the robot's motion, displaying sensor data, and analysing the performance of the control system.

Dynamics

Simscape Multibody uses physical modelling principles to simulate the dynamics of the robot, including its motion, forces, and torques. This means that you can simulate the robot's behaviour under a wide range of conditions, including different loads, external forces, and environmental factors.

Integration with Simulink

Simscape Multibody integrates seamlessly with Simulink, allowing you to incorporate the robot model into larger simulation models and control systems. This means that you can simulate the behaviour of the robot within the context of a larger system, such as a manufacturing line or a robotic arm.

Control system design

With Simscape Multibody, you can design and test control systems for your robot to improve its performance and stability. This involves creating a control system model that interacts with the robot model, and using simulation to analyse the performance of the system under different conditions.

​

Overall, Simscape Multibody provides a powerful set of tools for modelling, simulating, and analysing the behaviour of robots. By understanding the key principles and features of this tool, you can design and test control systems, analyse the performance of your robot, and integrate it into larger systems to achieve your desired functionality.

bottom of page