1. Introduction
Robotics is a field that focuses on the development and study of robots, encompassing the modeling, design, and manufacturing of robotic systems. Industrial robots are extensively employed in the automotive and electronics industries, as well as in other fields [
1]. In today’s manufacturing industry, vision-guided robotic picking systems play a vital role in automating various tasks. However, achieving rapid changeover and adaptability for diverse workpiece types has remained a significant challenge [
2]. Modular robotic systems are systems that are composed of modules that can be disconnected and reconnected in different arrangements to form a new system, enabling new functionalities [
3]. The term “modular robotics” refers to a family of robotic systems composed of interconnected smaller units called “modules”, joined together by docking interfaces [
4]. Modularity offers significant functional and economic advantages over more traditional fixed-structure robots. The ability to reconfigure the morphology by rearranging their parts enables modular robots to adapt to changes in the environment [
4]. The robot’s links are connected in serial by rotary or translatory motion joints, which form a kinematic chain. The kinematic chain end is called the end-effector or gripper, which is modeled on the human hand [
5]. Modularity is a means of decomposing a large and complex system or product into small, simple, independent, and manageable modular units that can be easily composed, decomposed, and replaced, and it can be frequently found in both nature and industrial systems [
6].
Software process simulation modeling is increasingly being used to address a variety of issues, from the strategic management of software development to supporting process improvements [
7]. Not only do modeling and simulation help to provide a better understanding of how real-world systems function, but they also enable us to predict system behavior before a system is built and analyze systems accurately under varying operating conditions [
8]. MATLAB is a powerful environment for linear algebra and graphical presentation that is available on a wide range of computer platforms [
9]. Nowadays, new product development makes strong use of IT tools, such as virtual simulation tools. The main motivation for the introduction of virtual simulation tools in new product development is to speed up development and reduce costs. Virtual simulation tools can achieve much more than simply speeding up product development and reducing the cost [
10,
11,
12,
13]. At the same time, however, they also trigger profound changes in problem solving [
10]. One of the most important motivations for the introduction of virtual simulation tools is that the cost and time requirements of physical experiments are not always compatible with the strict time and cost constraints of the new product development process [
11]. The ability to predict the maximal performance of an industrial robot in executing non-deterministic tasks can improve process productivity through time-based planning and scheduling strategies. These strategies require the configuration and comparison of a large number of tasks in real time for decision making; therefore, an efficient task execution time estimation method is required [
12].
The automotive industry was the first to promote the development of large-scale applications of model-based systems technology and, as a result, produced some of the most advanced prototypes and products [
13]. Model-based systems provide a good basis for problem solving because they are based on the separation of the problem solving algorithm from the model and the compositionality of this model, which addresses the variant problem. Once a library of suitable component models is established, only a structural description of this device (e.g., obtained from design data) is required to automatically generate a system model and, based on it, a dedicated problem solving system for this one device [
13].
Organizations today are facing rising labor costs and a shortage of workers and are therefore investing in robotics. Robots can perform tasks that most humans cannot, such as working in difficult conditions and being able to generate data with the utmost precision [
14]. In the past, robots were predominantly used in manufacturing to perform labor-intensive tasks that were hazardous for humans. As robots’ capabilities rapidly increased, they were used for routine tasks that required speed, agility, and dexterity, such as spot welding, stacking, drilling, cutting, and so on. Today, autonomous cars increasingly incorporate sensors and machine learning, which increase the types of tasks that can be undertaken. Therefore, robots can be used for a growing number of activities within firms, including transporting goods, assessing quality, testing products, and so on. One of the main reasons that firms adopt robots is their performance in terms of productivity and therefore production. Usually, robots can work continuously and perform functions 24 h a day [
15].
In recent years, an increasing emphasis on the modularity of robots has emerged, generating them with the help of command-and-control software. There is a wide range of software that allows the generation and analysis of robots and the possibility of manipulating their individual components.
Computer modeling, simulation, and implementation tools have been widely used to support and develop nonlinear control, robotics, and MATLAB/Simulink courses. MATLAB, with its toolboxes, such as Simulink, is one of the most widely accepted software packages and is used by researchers to enhance teaching regarding the transient and steady-state characteristics of control and robotics [
16].
In Industry 4.0, robots are regarded as one of the key components. In recent years, collaborative robots (cobots) have risen in relevance and have been included in the industry to perform tasks alongside humans [
17].
The digital era necessitates robotic automation, which utilizes intelligent automation technologies to streamline processes and execute tasks according to predetermined programs, thus automating the process. The adoption of robotic process automation fosters significant increases in productivity and efficiency across various sectors [
18].
From the point of view of robot producers, such unprecedented diffusion has necessitated the development of innovative safety features, aimed at making the use of cobots increasingly secure and accessible to the wider public [
19].
In the era of rapid development and prototyping, limitations like multiple software programs used in the calculation and generation of robots, multiple debugging activities, and different software with different language programs make development activities difficult. The need to know the connections between such tools can lead to higher effort and the higher consumption of resources and time to solve errors, as compared to the necessary investments for development and creation. The increased amount of knowledge required, together with the large number of tools, makes development activities more challenging for the user. Starting with these, this paper aims to develop a user-oriented application that will help a user to configure serial robots in an environment, being guided step by step throughout its use.
Considering the computing power and the vast engineering functionalities of the MATLAB Simulink software, MATLAB is the software that the authors propose to use as the source program in the development of this functionality.
In this paper, the main goal is to develop a new modular and compact Simulink function, using the model-based development technique, where the user can configure serial robots starting from the number of kinematic couples, the specific type of movement, the geometric parameters, and the generalized coordinates of each component. After calculating the kinematic couplings and determining the configuration of the serial robot, the end-effector will be attached. This block will calculate the displacements, velocity, and accelerations for the end-effector and for each kinematic coupling separately in the three-dimensional space. These aspects will be represented in specific graphs.
The application will be developed on several layers, each of them having the possibility to be individually managed, giving the application modularity from the beginning.
2. Materials and Methods
The motivation for the development of this application comes from the need to realize a project in a compact and well-structured environment. Moreover, it comes from the need to be able to realize a prototype in an easier way, without requiring a large range of software programs or additional ones to be able to configure and design a complete project.
At the same time, there is the need for an application that is easy to use, in which it is not necessary to invest additional time in its operation or in its connection with other software. The focus has to be oriented towards the realization of the calculations needed for the specific robot, where there are no administrative blocking points caused by the used tools. Finally, there exists the need to bring all of the necessary information into one place, with the possibility of realizing a large project with a focused set of knowledge.
The main goal of this project is to create a function that gives the user the possibility to generate any configuration for a serial robot, with the opportunity to include as many degrees of mobility as needed, having only fifth-class kinematic couples (rotation or translation). Such a function would ultimately enable one to configure, calculate, analyze, and reconfigure as many combinations of robots as possible in the shortest possible time, making it more efficient not only from the point of view of time but also from the point of view of resources.
With advancements in technology, time becomes increasingly compressed. For this reason, users require all components to be accessible and intuitive. Starting with this, this project aims to create a MATLAB Simulink function that requires minimal investment of time in understanding its operation. At the same time, we seek to offer the highest level of capability and performance with minimal knowledge about its implementation. We adopt a user-oriented usability perspective, providing one of the easiest ways to approach building, calculation, and robot configuration. At the same time, this application aims to create a graphical representation of the displacement, velocity, and acceleration of the robot’s kinematic couples and also for its end-effector, in accordance with the design and implementation requirements of a wide range of projects.
2.1. General Information
In the paper “Design and Realisation of the Simulation Model of the Stewart Platform using the MATLAB-Simulink and the Simscape Multibody Library” [
20], written by P. Noskievič and D. Walica, MATLAB’s Simscape Multibody Link is used to create and manipulate a Stewart robot. CAD software is used to generate a 3D model of the Stewart robot. Before being able to implement the robot in Simscape Multibody Link, the generated files from CAD have to be adapted to MATLAB using an add-on, which will transform the information into a format that can be interpreted by the Simscape library. This process prolongs the time required in building the robot, requiring a large amount of time for the projection of the model. After creating the CAD model and transferring the information to the Simscape library, it is necessary to create a Simulink model to be able to control and manipulate the robot. This model needs to be created with the help of the library, which requires particular knowledge. After completing the CAD and creating the Simulink model based on the Simscape Multibody Link library, it is possible to visualize the robot using the Mechanics Explorer interface.
Following this development path, some weak spots have been identified in the use of this workflow. The first is the need for the prototyping of a CAD model and the need of knowledge of the library for Simscape Multibody Link to be able to create the Simulink models from scratch. At the same time, the possibility of connectivity and communication errors between the various programs used is observed. The use of multiple software programs simultaneously to reach the final point of generating the desired robot is not a user-oriented approach. The use of multiple software packages brings the need to have knowledge in their use and to invest time in possible debugging activities, as well as the need for multiple licenses, in addition to the actual time required for the development, generation, calculation, and analysis of the robots. All of these factors lead to the sub-optimal use of resources and time.
In the paper “Implementation of a Two Wheel Self-Balanced Robot using MATLAB Simscape Multibody” [
21], written by S. Mohapatra, R. Srivastava, and R. Khera, the same development path is presented using the MATLAB Simscape Multibody Link library. The first necessary step is to design a CAD model. After this, the CAD is converted using an additional tool into a data type that is read by the MATLAB Simscape Multibody Link library; then, the MATLAB Simulink model will be developed.
The need for knowledge has been identified in the design and prototyping of a robot model in order to create a CAD model. This process is time-consuming. Moreover, there is a need for several tools in creating the CAD model. Furthermore, add-ons to convert CAD files into files that are readable by the MATLAB software are necessary. As a final step, knowledge of the use of the MATLAB Simulink software from scratch is required, as well as an understanding of the use of the MATLAB Simscape Multibody Link library.
For comparison purposes,
Table 1 presents a description of a regular robot’s configuration and simulation using the standard method and the proposed method.
In order to use the application, it is necessary to carry out an analysis of the desired movement, along with the schematization of the robot’s movements, attaching a coordinate system [
]…[
], [n ∊ ℕ| n ≥ 0] to each element. To realize this, the robotic schematic reference shown in
Figure 1 is proposed.
The relative motion between two consecutive elements can be described by a 4 × 4 homogeneous matrix. This matrix is called a transfer/transformation matrix and has the form
where
,
,
represent the coordinates of the origin with the higher index in rank with the coordinate system with the lower index.
The remaining elements of the matrix
are the cosines of the angles between the axes of the system, [
and
, and are given by the relations
- -
The geometric parameters are given for the first kinematic couple that realizes the movement between the systems [] and [].
- -
For the following kinematic couplings, the geometric parameters are required in relation to the kinematic coupling attached to the preceding element.
- -
The geometric parameters of the end-effector will be determined in relation to the coordinate system [] attached to element n.
The matrix
is generated, which is the matrix of the coordinates of point M in relation to the system [
], along with the end-effector (EF), which represents the characteristic point of the robot.
To establish the parking position, the generalized coox1 wzqsa rdinates for each kinematic couple will have a value of 0; later, it is possible to change their values through the user interface.
For the simulation of the robot, homogeneous transfer matrices will be generated, which are calculated with the following formula:
The position of the characteristic point attached to the final effector in relation to the system [
], expressed with the help of the transfer matrices, will be calculated using the relation
The Denavit–Hartenberg homogeneous operator method assumes that the elements of homogeneous transformation matrices of size 4 × 4 can be expressed using four independent parameters, called Denavit–Hartenberg parameters. These are defined as follows:
- -
angle —the angle between the axes and ;
- -
distance —the distance between the origins and measured on the axis;
- -
distance —the distance between the origins and measured on the axis;
- -
angle —the angle between the and axes.
The transformation of the coordinates between the elements and results in a sequence of four elementary movements, namely
- -
a rotation with the angle performed around the axis;
- -
a translation with the distance along the axis;
- -
a translation with the distance along the axis;
- -
a rotation with the angle around the axis.
The homogeneous transformation matrix of size 4 × 4 characterizes the relative movement between the elements
and
. It is obtained after obtaining the product of the homogeneous matrices that characterize the four movements:
2.2. Application Overview
In the following paragraphs, the process of creating the MATLAB Simulink function for the structure of a serial robot will be explained.
Starting with the mathematical models, MATLAB Simulink requires the following system and sub-system blocks to be generated:
Rotation around the X-axis sub-system model;
Rotation around the Y-axis sub-system model;
Rotation around the Z-axis sub-system model;
Translation along the X-axis sub-system model;
Translation along the Y-axis sub-system model;
Translation along the Z-axis sub-system model;
Null sub-system model (matrix unit);
Movement module function sub-system model;
Robotic configuration sub-system model;
End-effector sub-system model;
The sub-system of the input parameters’ manipulation;
Displacement, velocity, and acceleration sub-system model;
Robot generation functionality model.
The robotic generation functionality structure is shown in
Figure 2.
The following steps represent the working method of the functionality.
- Step 1:
The end-user will introduce the inputs through the input port (geometric parameters, generalized coordinates, number of modules, type of movement of the modules).
- Step 2:
The inputs will be processed in the input manipulation sub-system.
- Step 3:
Based on the inputs, the type of movement will be configured and calculated in the movement module sub-system through the null, rotation X, rotation Y, rotation Z, translation X, translation Y, and translation Z sub-systems.
- Step 4:
Based on the inputs, the robot modules will be configured and calculated together with the end-effector inside the robot sub-system.
- Step 5:
The displacement, velocity, and acceleration will be calculated and represented as graphs in the displacement, velocity, and acceleration sub-system.
- Step 6:
The calculated information and graphs will be sent outside, in the robotic generation functionality model, through the output port.
2.3. Development of the MATLAB Simulink Serial Robot Functionality
Simulink is a block diagram environment used to design systems and sub-systems with several domain models, in which the user can create a simulation before moving forward to hardware and deployment without writing code.
In the following paragraphs, the development of the MATLAB Simulink functionality block will be presented.
As a first step, the seven Simulink models (three translations, three rotations, and the null block) used in the motion type model shown in
Figure 2 will be created. The next step is to create the motion type block and incorporate it, together with the final effector block, into the robot block. This will be followed by the development of the displacement, velocity, and acceleration calculation block. Finally, all of these will be incorporated into the modular robot generation and calculation function.
2.3.1. Development of the Movement Sub-System Models
In the following, the rotational and translational motion models will be created, along with the unitary matrix model, to further create the entire motion block.
For the translational couple along the x axis, the homogeneous transfer matrix will be used and converted to Simulink:
The Simulink model in which
is adapted to the block diagram is presented in
Figure 3.
For the translational couple along the y axis, the homogeneous transfer matrix will be used and converted to Simulink:
The Simulink model in which
is adapted to the block diagram is presented in
Figure 3.
For the translational couple along the z axis, the homogeneous transfer matrix will be used and converted to Simulink:
The Simulink model in which
is adapted to the block diagram is presented in
Figure 4.
For the rotation couple around the x axis, the homogeneous transfer matrix will be used and converted to Simulink:
The Simulink model in which
is adapted to the block diagram is presented in
Figure 5.
For the rotation couple around the y axis, the homogeneous transfer matrix will be used and converted to Simulink:
The Simulink model in which
is adapted to the block diagram is presented in
Figure 5.
For the rotational couple around the z axis, the homogeneous transfer matrix will be used and converted to Simulink:
The Simulink model in which
is adapted to the block diagram is presented in
Figure 6.
For the null sub-system, the unit matrix will be used and converted to Simulink.
The Simulink model is presented in
Figure 6.
To create the sub-systems, the following elements are used:
Constant to set the fixed values of the 4 × 4 matrix elements;
Input , , , ) and output ports;
Terminator;
Mux;
Reshape to shape the input to a 4 × 4 matrix;
Display to visualize the matrix.
2.3.2. Development of Movement Module Function
The blocks created in the previous subsection will be used to create the modular movement type selection block. This is presented in
Figure 2 in the movement model sub-system.
To call the blocks already created, the MATLAB Simulink model block will be used, as well as a system constant called “Movement_Type”. This will be generated with values from 0 to 6, as shown in
Figure 7 in the “General Info about Type_of_Movement” box. Using the system’s constant, the type of movement will be selected through a switch block. Once the movement is selected, all of the other unused matrices will result in the unity matrix. Therefore, in the end, all matrices will be multiplied, but the result of the calculation will depend only on the model chosen by the constant. The MATLAB Simulink model of the movement module is presented in
Figure 7.
To create the sub-system, the following elements are used:
Input , , , ) and output ports;
Switch case block;
Switch case action block;
Model block;
Display;
Mux;
Demux;
Matrix multiply block.
2.3.3. Robotic Configuration Sub-System Model
In the following, the robot sub-system block presented in
Figure 2 will be created. In its implementation, all previously developed sub-systems will be called upon.
A new constant will be used for the active number of modules, through which the inserted kinematic couplings will be unlocked. Similarly to the previous point, the Simulink model block will be used to call the module of the modular movement type created. At this point, the number of inputs for the robot block will increase, and they will be created for each individual kinematic couple. For this experiment, three kinematic couples will be used, as shown in
Figure 8. In this system, the geometric parameters of the final effector will be entered as inputs, where a 4 × 4 matrix will be created, with the geometric parameters corresponding to the three-dimensional positioning.
To create the sub-system, the following elements are used:
Input , , , ) and output ports;
Switch block;
Constant block;
Model block;
Mux;
Demux;
Matrix multiply block.
2.3.4. Displacement, Velocity, and Acceleration Sub-System Model
For the development of the next computational block, the output from the robot block will be used. To create the displacement, velocity, and acceleration graphs, the resulting final matrix of the end-effector, as well as each individual kinematic couple, will be analyzed and decomposed in order to perform the necessary calculations for the representation of each individual graph. This calculation module is shown in
Figure 9.
To create the sub-system, the following elements are used:
Input and output ports;
Submatrix block;
Derivative block;
Mux;
Display;
Scope.
2.3.5. Robot Generation Functionality Model
All modules presented in the previous sub-sections are included in the final implementation of the generating function of modular robots, which is presented in
Figure 10. Here, the rotational and translational motion modules are incorporated, along with the motion type modules. All of them are present in the robot sub-system.
Inside this block, all of the presented models in the previous sub-sections, and all of the performed calculations, will be included. Using this module, the construction of modular serial robots will be enhanced in terms of resource optimization and time, as the information is collected in one step. In the end, the development progress, along with the simplified information, will ease the system’s understanding for new users, and even students will have the possibility to improve their knowledge in the calculation and development of serial robots.
3. Results
In order to validate the calculations of the function, the example of the
robot, as shown in
Figure 11, is proposed.
The defining matrices of the robot will be written as follows:
where
In order to complete the input information that will be used to validate the proposed serial robot, the questionnaire presented in
Figure 12 will be completed. Based on the questionnaire answers, the robot drawn in
Figure 11 will be built.
After running the created MATLAB Simulink model, the calculation results for the matrices of the
couples and of the end-effector (the matrix Matrix_EE) will be obtained, as illustrated in
Figure 13.
In order to obtain a visual representation of the
robot,
Figure 14 was generated. In this figure, the plot of the
robot is presented. The kinematic couples
,
, and
are represented by a green sphere. The robot’s end-effector is represented by a red sphere. Next to each kinematic couple and next to the end-effector are the 3D positional values, which are also presented in
Figure 13 in the matrices
,
,
, and
.
In order to validate the calculations performed, together with the implementation of the functionality in MATLAB, additional validation was performed using the Mathcad Prime 7.0.0.0 software. Equations (7), (8), and (17)–(23) were introduced into the Mathcad software. The geometric parameters
,
, and
were introduced, together with the generalized coordinates
,
, and
, with values of zero for generalized coordinates, to calculate the parking position. The calculation of the
,
,
, and
matrices of the robot was performed. Finally, the kinematic couple matrices
,
,
were calculated together with the final effector position matrix
which are presented in
Figure 13. The mathematical validation through the Mathcad software is presented in
Figure 15.
The authors also propose a demonstration of the representation of the displacement, velocity, and acceleration graphs; for this, a repeating signal, as shown in
Figure 16, will be used. It will be attached to the kinematic coupling
and a repetitive movement will be implemented for the generalized coordinate
of the robot. This will be linked to [
] from the robotic questions in
Figure 12.
Considering the repetitive signal 0 [m]–2 [m], which is attached to
, shown in
Figure 16, a displacement on the Z-axis will be observed. Moreover, an associated oscillation on the Z-axis of the end-effector with a displacement of
2 [m] is visible.
In
Figure 17, the displacement on the X-, Y- and Z-axes of the end-effector is represented, along with the variation statistics on the Z-axis.
In
Figure 18, the velocity is represented on the X-, Y-, and Z-axes of the end-effector, along with the variation statistics on the Z-axis.
In
Figure 19, the acceleration is represented on the X-, Y-, and Z-axes of the end-effector, along with the variation statistics on the Z-axis.
In summary, the ease of completing the input values in the application and its user-oriented implementation can be observed. The robot schematization will be created in order to provide an overview of the desired robot and the geometric parameters needed to complete the guidance questionnaire. In a small amount of time, it is possible to obtain the results of the matrix calculations for the serial robot. After performing the parking position calculation, a repetitive motion equation is introduced to demonstrate the calculation of the displacements, velocity, and accelerations of the end-effector. The displacement graphs on X, Y, and Z, together with the velocity and accelerations on the same axes for the end-effector will be accessed instantly for analysis, as shown in
Figure 15,
Figure 16 and
Figure 17. In these analysis windows, the statistics of each signal can be followed. The blocks can be opened and analyzed for each kinematic coupling in particular. Returning to the questionnaire, by modifying the geometric parameters, the equations of motion, the type of movement of the couplings, or even their number, the user has the possibility to reconfigure the robot and analyze different optimal scenarios for the projects in which it will be used. By using this function, the user will no longer need to use multiple software packages for the calculation and analysis of serial robots.
4. Conclusions
Considering the above, using the MATLAB programming environment, the authors of this paper propose the development of a functionality model block developed in MATLAB Simulink, oriented towards the end-user/client, using the model-based development method. This function can be used and incorporated into a real module to streamline and simplify serial robot calculations and optimize the use of resources and time. In order to realize a complex project, the possibility of generating one or more robots whose morphology and implementation are modular can be realized through this function.
In this paper, the aim was to create a function using the MATLAB Simulink software in which the user would have the possibility to configure serial robots containing fifth-class kinematic couplings, rotation, and translation in their structures. The mathematical equations of rotation and translation were modeled on all three axes, X, Y, and Z. A modular movement block and a modular operational block were created for serial robots, which can be accessed with the help of guiding questions. Calculation and representation blocks for the displacement, velocity, and acceleration were created for the final effector and for all individual kinematic couplings.
Using this function, users will no longer need to use additional software or other libraries to calculate robotic matrices, with all of the information being inserted inside the function block. By introducing the inputs, namely the generalized coordinates, the geometric parameters, and the number of kinematic couples and their types, the function can calculate the direct kinematics of the serial robot and create displacement, velocity, and acceleration graphs for the end-effector and for each kinematic couple.
Future Opportunities
As future aspirations, for the generating function for serial robots, a user-oriented interface will be developed. The application will have a user-oriented interface, which will guide the user step by step to introduce the necessary information in the block, in order to achieve the goal of serial robot generation. After obtaining a configuration that complies with the basic requirements of the applied project, a working space will be configured. Both the robot and the working environment will be configured according to the needs of each.
In the next stage, after the generation of the robot is completed, users will have working programs for the functionalities of the robots, graphs to use for the trajectory calculations, and the possibility to generate and simulate them inside a graphic interface. By using this function, a result will be achieved rapidly in terms of the time invested. Users have the advantage of being able to focus on the project, rather than on the administrative aspects regarding the connectivity of the tools and knowledge of the libraries. They will be able to benefit from an application that can easily guide them towards the realization of their projects. Additionally, they will have the possibility to implement the entire workspace in a single environment with high-precision calibration. Design errors will be easily identifiable, with one of the aims being to avoid them starting from the initial steps of the project.