Project title: Design and Control Gantry Robot Using IPC and Image Processing 2.. THE SOCIALIST REPUBLIC OF VIETNAM Independence- Freedom- Happiness ----***---- Ho Chi Minh city, June 1
Trang 1
TECHNOLOGY AND EDUCATION
HO CHI MINH CITY UNIVERSITY OF
GRADUATION THESIS AUTOMATION AND CONTROL ENGINEERING TECHNOLOGY
LECTURER: PHD TRAN MANH SON STUDENTS: VU DUC HAI
TRAN VU HUNG
S K L 0 1 0 8 3 2
Ho Chi Minh City, July 2023
DESIGN AND CONTROL GANTRY ROBOT
USING TWINCAT3 AND IMAGE PROCESSING
Trang 2HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY AND EDUCATION
FACULTY FOR HIGH QUALITY TRAINING
Ho Chi Minh City, July 2023
Image Processing
Students:
Vu Duc Hai Student ID: 19151054
Tran Vu Hung Student ID: 19151057
Major: AUTOMATION AND CONTROL ENGINEERING
Instructor: PhD Tran Manh Son
Graduation project report
Design and Control Gantry Robot Using TwinCAT3 and
Trang 3GRADUATION PROJECT ASSIGNMENT
Student’s name: Vu Duc Hai Student’s ID number: 19151054
Student’s name: Tran Vu Hung Student’s ID number: 19151057
Major: Automation and Control Technology Class: 19151CLA1
Advisor: PhD Tran Manh Son Phone number:
Date of assignment: 28/02/2022 Date of submission: 28/06/2023
1 Project title: Design and Control Gantry Robot Using IPC and Image Processing
2 Initial materials provided by the advisor:
3 Content of project: Design and control Gantry Robot to classify circular products (classified by diameters) Synchronous and interpolation position control are used to control Gantry Robot TwinCAT3 Motion Control is applied in this project to do the control task The image processing program sent the type of products to the IPC throguh ADS By using TwinCAT3, the connection betweem the driver, I/O module and IPC is using EtherCAT
4 The final results: Gantry Robot, electrical panels and thesis report
THE SOCIALIST REPUBLIC OF VIETNAM
Independence- Freedom- Happiness
***
Ho Chi Minh city, June 1 , 2023
CHAIR OF THE PROGRAM
(Sign with full name)
ADVISOR
(Sign with full name)
Trang 4ADVISOR’S EVALUATION SHEET
Student’s name: Vu Duc Hai Student’s ID number: 19151054 Student’s name: Tran Vu Hung Student’s ID number: 19151057 Major: Automation and Control Technology
Project title: Design and Control Gantry Robot Using IPC and Image Processing
Advisor: PhD Tran Manh Son
Ho Chi Minh City,
ADVISOR
(Sign with full name
THE SOCIALIST REPUBLIC OF VIETNAM
Independence- Freedom- Happiness
***
Ho Chi Minh city, July 1 ,2023
Trang 5PRE-DEFENSE EVALUATION SHEET
Student’s name: Vu Duc Hai Student’s ID number: 19151054 Student’s name: Tran Vu Hung Student’s ID number: 19151057 Major: Automation and Control Technology
Project title: Design and Control Gantry Robot Using IPC and Image Processing
Advisor: PhD Tran Manh Son
THE SOCIALIST REPUBLIC OF VIETNAM
Independence- Freedom- Happiness
***
Ho Chi Minh city, July 1 ,2023
Trang 6EVALUATION SHEET OF DEFENSE COMMITTEE MEMBER
Student’s name: Vu Duc Hai Student’s ID number: 19151054
Student’s name: Tran Vu Hung Student’s ID number: 19151057
Major: Automation and Control Technology
Project title: Design and Control Gantry Robot Using IPC and Image Processing
Name of Defense Committee Member:
(Sign with full name)
THE SOCIALIST REPUBLIC OF VIETNAM
Independence- Freedom- Happiness
***
Ho Chi Minh city, July 1 ,2023
Trang 71
GUARANTEE
We hereby declare that the research results presented in this graduation project are the results obtained during our own research with the guidance of PhD Tran Manh Son, do not copy any research results of other authors The research content has references and uses some information and documents from the sources listed in the list of references If wrong,
we will be subject to all disciplinary measures as prescribed
Trang 93
ABSTRACT
I am pleased to present to you a report on the topic of "Gantry Robot" This is an important and captivating subject in the field of robotics and automation, and I hope that this report will provide you with detailed and insightful information about Gantry Robots and their applications in modern industries
In the era of industrialization and modern technology, Gantry Robots have become vital tools in the process of manufacturing and operating automated assembly lines The flexibility, precision, and ability to work in harsh environments of Gantry Robots have brought significant benefits to businesses, ranging from increased productivity to reduced time and labor
This report is divided into key sections, starting with an overview of the fundamental concepts of Gantry Robots, including their structure, operating principles, and important components Furthermore, we will explore practical applications of Gantry Robots in various industries such as automotive manufacturing, electronics, healthcare, and many others
Finally, I would like to express my sincere appreciation for the interest and support provided by you throughout the research and writing process of this report It is my hope that this report will contribute to enhancing knowledge and understanding of Gantry Robots and their significant role in driving the development of modern industry and technology
Trang 104
LIST OF CONTENTS
GUARANTEE 1
ACKNOWLEDGMENTS 2
LIST OF CONTENTS 4
LIST OF FIGURES 6
LIST OF TABLES 8
Chapter 1 INTRODUCTION 9
1.1 Project aims 9
1.2 Scope of the project 11
1.3 Contents 11
Chapter 2 THEORETIAL FOUNDATIONS 12
2.1 Definitions 12
2.1.1 Robot 12
2.1.2 Types of robots 13
2.2 Project robot 15
2.3 Industry PC (IPC) 16
2.5 Limitations of the topic 18
2.4 Overview about AC servo 19
2.4.1 Servo System 19
2.4.2 Servo motor 21
2.4.3 Encoder 22
2.5 Components information Error! Bookmark not defined. 2.5.1 Servo motor and Servo drive 30
2.5.2 Step motor and Step drive 33
2.5.3 Sensor 35
2.6 TwinCAT 3 Real-time 24
2.6.1 Real-time 24
2.6.2 Real-time capable scheduling 25
2.6.3 Exemplary representation of the call of a PLC task 25
2.6.4 Preemptive multitasking 26
2.6.5 Direct hardware access 26
2.6.6 Schematic representation of the TwinCAT 3 runtime environment 26
Trang 115
2.6.7 Insolated cores 27
2.6.8 Behavior when the cycle time is exceeded 28
Chapter 3 ALGORITHM 29
3.1 Calculation interpolation 36
3.2 Image processing 37
3.2.1 Literature Review and Background 37
3.2.2 Image processing techniques 37
Chapter 4 PROGRAM AND COMMUNICATION 53
4.1 TwinCAT3 Motion control 53
4.1.1 NC Setting (Numeric Control) 53
4.1.2 Inserting an NC configuration in TwinCAT3 54
4.1.3 CANopen protocol 57
4.2 EtherCAT 60
4.2.1 A brief overview of EtherCAT 60
4.2.2 EtherCAT in TwinCAT3 61
Chapter 5 EXPERIMENT RESULTS, COMMENT AND EVALUATION 64
5.1 Result 64
5.2 Comment and Evaluation 66
Chapter 6 CONCLUSION AND RECOMMANDATION 67
6.1 Conclusion 67
6.2 Recommandation 67
REFERRENCES 68
Trang 126
LIST OF FIGURES
FIGURE 2 1: GANTRY ROBOT 13
FIGURE 2 2: MANIPULATOR ROBOTS 14
FIGURE 2 3: MOBILE ROBOT 14
FIGURE 2 4: HUMANOID ROBOT 15
FIGURE 2 5: DRONE 15
FIGURE 2 6: BECKHOFF INDUSTRIAL PC 17
FIGURE 2 7: SERVO SYSTEM DIAGRAM 19
FIGURE 2 8: SERVO MOTOR 21
FIGURE 2 9: STRUCTURE OF ENCODER MOTOR 23
FIGURE 2 10: SERVO MOTOR CSMA 04BT1ANT3 ERROR! BOOKMARK NOT DEFINED FIGURE 2 11: DRIVER CSD7-04BN1 ERROR! BOOKMARK NOT DEFINED FIGURE 2 12: PIN OF CSD7-04BN1 ERROR! BOOKMARK NOT DEFINED. FIGURE 2 13: CONNECTION OF SERVO MOTOR AND DRIVER 33
FIGURE 2 14: STEP MOTOR AM23RS ERROR! BOOKMARK NOT DEFINED. FIGURE 2 15: DRIVER RS-232 34
FIGURE 2 16: CONNECTION OF STEP MOTOR AND DRIVER ERROR! BOOKMARK NOT DEFINED FIGURE 2 17: PNP SENSOR PS-05P ERROR! BOOKMARK NOT DEFINED. FIGURE 2 18: DOUBLE-TICK METHOD DIAGRAM 25
FIGURE 2 19: SCHEMATIC REPRESENTATION OF THE TWINCAT 3 RUNTIME ENVIRONMENT 27
FIGURE 2 20: FISRT-TICK METHOD DIAGRAM 28
FIGURE 2 21: MULTI DOUBLE-TICK 28
FIGURE 3 1: GANTRY ROBOT SIMPLIFIED MODEL 36
FIGURE 3 2 BASIC IMAGE PROCESSING TECHNIQUES 37
FIGURE 3 3: ORIGINAL IMAGE AND RESULT OF HORIZONTAL EDGES DETECTION 38
FIGURE 3 4: VERTICAL EDGES DETECTION 38
FIGURE 3 5: A SINGLE LOCATION IN A 2-D CONVOLUTION 39
FIGURE 3 6: LOGITECH C310 HD WEBCAM 40
FIGURE 3 7: COMMUNICATION BETWEEN BECKHOFF CONTROLLERS 40
FIGURE 3 8: DETECTED CIRCULAR OBJECT 41
FIGURE 3 9: PROCESSED IMAGES ARE AUTOMATICALLY SAVED IN FOLDER “IMAGECAPTURED” 41
FIGURE 3 10: AN EXAMPLE OF SALT AND PEPPER NOISE 42
FIGURE 3 11: PLOTTER OF GAUSSIAN FUNCTION 43
Trang 137
FIGURE 3 12: ORIGINAL IMAGE AND BLURRED IMAGE BY GAUSSIAN FILTER (KERNEL SIZE: 5X5, STANDARD
VARIATION = 0) 44
FIGURE 3 13: BLURRED IMAGE BY GAUSSIAN FILTER HAVING KERNEL SIZE 7X7, STANDARD VARIATION = 0 44
FIGURE 3 14: THE LOCAL MAXIMA OR MINIMA INDICATE EDGES 45
FIGURE 3 15: SOBEL OPERATOR 46
FIGURE 3 16: EDGE DETECTION USING GRADIENT METHOD 46
FIGURE 3 17: ZERO-CROSSING INDICATES EDGES 47
FIGURE 3 18: LAPLACIAN VS GRADIENT EDGE DETECTION 48
FIGURE 3 19: NON-MAXIMUM SUPPRESSION 50
FIGURE 3 20: HYSTERESIS THRESHOLDING 50
FIGURE 3 21: EDGE DETECTION USING CANNY METHOD 51
FIGURE 3 22: ACCUMULATOR IN 3D SPACE 52
FIGURE 3 23: HOUGH GRADIENT IN PARAMETER SPACE 53
FIGURE 3 24: 3 TYPES OF CIRCULAR OBJECTS 53
FIGURE 4 1: INSERT NC CONFIGURATION 54
FIGURE 4 2: INSERT MOTION CONFIGURATION 54
FIGURE 4 3: ADD NEW AXES 55
FIGURE 4 4: SETTING FOR X AND Y AXIS 56
FIGURE 4 5: SETTING FOR Z AXIS 57
FIGURE 4 6: ENCODER TYPE 57
FIGURE 4 7: CAN BUS PROTOCOL CONCEPT 58
FIGURE 4 8: CAN PROTOCOL OVERVIEW 58
FIGURE 4 9: PIN 7, ENCODER SIGNAL IS FED INTO THIS CONNECTOR 59
FIGURE 4 10: ETHERCAT PERFORMANCE 60
FIGURE 4 11: ETHERCAT AND OSI MODEL 61
FIGURE 4 12: ETHERCAT CONNECTION DIAGRAM 62
FIGURE 4 13: SCANNING DEVICE IN TWINCAT 3 62
FIGURE 4 14: DEVICES ARE SHOWN IN I/O 63
Trang 148
LIST OF TABLES
TABLE 2 1: SPEC OF CSMA 04BT1ANT3 31
TABLE 2 2: PIN OF DRIVER CSD7-04BN1 33
TABLE 2 3: SPEC OF STEP MOTOR AM04BN1 34
TABLE 2 4: SPEC OF SENSOR PS-05P 36
TABLE 4 1: HERE IS SOME DEFINITION BEFORE SETTING FOR AXIS 56
Trang 159
Chapter 1 INTRODUCTION 1.1 Project aims
The aim of this project is to explore the integration of image processing techniques with Gantry Robots By leveraging the power of image analysis and computer vision, the project seeks to enhance the capabilities of Gantry Robots in various industrial applications The specific project aims are as follows:
- Investigate image processing algorithms: The project aims to study and evaluate different image processing algorithms, including image filtering, segmentation, feature extraction, and object recognition By understanding these algorithms, we can determine their suitability for enhancing the vision capabilities of Gantry Robots
- Develop image processing modules: The project aims to design and implement specific image processing modules that can be integrated into the Gantry Robot system These modules will enable the robot to capture, analyze, and interpret visual information from its environment, improving its ability to perceive and interact with objects accurately
- Enhance object detection and tracking: By incorporating image processing techniques, the project aims to improve the Gantry Robot's object detection and tracking capabilities This will involve developing algorithms that can identify and locate objects of interest within the robot's working area, allowing for precise manipulation and interaction
- Optimize robot guidance and navigation: The project aims to utilize image processing to enhance the robot's guidance and navigation capabilities This includes developing algorithms that enable the robot to interpret visual cues, such as markers or landmarks, to navigate its surroundings and perform tasks efficiently and safely
- Evaluate performance and applicability: The project aims to assess the performance and applicability of the integrated image processing techniques within the Gantry Robot system Through rigorous testing and experimentation, the project aims to analyze the effectiveness
of the developed modules and algorithms, considering factors such as accuracy, speed, and robustness
By achieving these project aims, we aim to demonstrate the potential of combining Gantry Robots with image processing, ultimately advancing automation in industries that rely on precise object manipulation, quality control, and efficient production processes
1.2 Advantages and Disadvantages of Gantry Robot
Gantry robots, also known as Cartesian robots, are a type of industrial robot that operates
on a three-axis Cartesian coordinate system (X, Y, Z) They differ from other robot types such as articulated robots, SCARA robots, and delta robots in terms of their design and capabilities Let's explore some advantages and disadvantages of gantry robots compared
to other techniques:
Trang 1610
Advantages of Gantry Robots:
- Precision and accuracy: Gantry robots excel at providing high levels of precision and accuracy due to their rigid structure and linear movement This makes them suitable for applications that require tight tolerances
- Workspace coverage: Gantry robots typically have a large workspace, making them ideal for handling and manipulating large objects or covering a broad area in tasks such as material handling and pick-and-place operations
- Simple programming: The Cartesian coordinate system of gantry robots simplifies their programming, making it easier for operators to set up and program these robots for various tasks Programming can often be done using user-friendly software interfaces
- Stability and rigidity: The gantry robot's structure, usually with rigid beams and linear actuators, provides stability during operation, which is beneficial for tasks requiring consistent and repeatable motion
- Customizable end-effectors: Gantry robots can accommodate a wide range of custom end-effectors, such as grippers, suction cups, and specialized tools, making them versatile for various applications
Disadvantages of Gantry Robots:
- Limited mobility: Gantry robots move only along linear axes and lack the flexibility of more complex robot types like articulated robots This limitation makes them unsuitable for certain tasks that require intricate motions or working in confined spaces
- Higher initial cost: The initial investment for gantry robots can be relatively high, especially for larger and more sophisticated models, which may make them less accessible for small businesses with limited budgets
- Footprint and space requirements: Gantry robots require a fixed structure to operate, which means they occupy a significant amount of floor space This can be a challenge in environments with limited space availability
- Slower cycle times: Due to their linear motion, gantry robots may have slower cycle times compared to some other robot types that can perform continuous or articulated motions
- Maintenance complexity: The mechanical complexity of gantry robots can result in higher maintenance requirements and costs, especially if there are multiple linear actuators and motors involved
In summary, gantry robots are well-suited for applications that demand high precision and
a large workspace They offer simplicity in programming and robustness in their design However, their limited mobility, higher initial cost, and maintenance complexity should be considered when evaluating their suitability for a specific application The choice of robot type depends on the specific requirements of the task, available budget, and the workspace's layout and constraints
Trang 1711
1.3 Scope of the project
- Apply Industry PC (IPC) to the project (using laptop as PLC and HMI)
- Build connection between I/O module and computer
- Calculation and design of Gantry robot model
- Design electrical part (electrical cabinet)
- Control the operating position of Gantry robot
- Build HMI to monitor robot activity
- Apply image processing to classify products by diameter
1.4 Contents
Chapter II: Theoretical Foundations Present the requirements of the system to be designed Overview of concepts, problems and applications related to the technologies used in the system
Chapter III: System Design Chapter 3 presents customer requirements, design requirements, selection of suitable electrical equipment and electric tools At the same time, chapter 3 also provides how to install software to set operating modes for the machine
Chapter IV: Results achieved Here, the topic will report that it has fulfilled the set requirements, give an overview image of the machine, provide a dynamics diagram, electrical cabinet diagram, the results that the topic has achieved
Trang 18Robots are programmed to perform specific actions or tasks, and they can operate in a wide range of environments, including industrial settings, homes, hospitals, and space exploration They are built to mimic or augment human capabilities, with the ability to manipulate objects, navigate physical spaces, and perform complex operations
The key components of a robot include:
Sensors: Robots are equipped with various sensors, such as cameras, proximity sensors, force sensors, and temperature sensors, to perceive and collect data about their surroundings These sensors enable the robot to gather information and make informed decisions
Actuators: Robots have actuators, such as motors, pneumatic systems, or hydraulic systems, that allow them to move and manipulate objects These actuators translate the instructions from the control system into physical actions
Control System: The control system of a robot consists of hardware and software components that process sensor data, make decisions, and send commands to the actuators
It determines the behavior and actions of the robot based on the programmed instructions
or artificial intelligence algorithms
Programming: Robots are programmed using specific programming languages or software tools The programming defines the robot's behavior, tasks, and responses to different situations It can range from simple pre-programmed sequences to complex algorithms that enable adaptive and learning capabilities
Robots are employed in various fields, including manufacturing, healthcare, agriculture, exploration, entertainment, and research They are used to automate repetitive tasks, assist
in dangerous or inaccessible environments, enhance productivity, improve precision, and enable new possibilities in human-machine interaction
The development of robotics continues to advance with advancements in artificial intelligence, machine learning, and sensor technologies Robots are becoming more sophisticated, capable of learning, adapting, and collaborating with humans and other robots [6]
Trang 1913
Overall, robots play a significant role in modern society, transforming industries and daily life by performing tasks efficiently, accurately, and with a level of autonomy that improves productivity and expands the range of possibilities
Figure 2 1: Gantry robot
- Manipulator Robots: are mechanical articulated structures with manipulation capacity which are normally used in automated production environments, although there are applications outside the industrial environment
Trang 2014
Figure 2 2: Manipulator Robots
- Mobile Robots: These are robots with mobility that are usually based on wheels This type of robot is used in very different environments
Figure 2 3: Mobile robot
- Humanoid robots: robots that present a certain human appearance It has multiple possible uses as an aid to humans
Trang 2115
Figure 2 4: Humanoid robot
- Drones: An unmanned aerial vehicle (UAV), is an aircraft without a human pilot aboard
It have a lot of applications nowadays
Figure 2 5: Drone
2.2 Project robot
A Gantry Robot, also known as a Cartesian Robot or XYZ Robot, is a type of industrial robot that operates along three orthogonal axes (X, Y, and Z) in a rectangular coordinate system It is characterized by a rigid framework or gantry structure, typically consisting of horizontal beams supported by vertical columns
Gantry Robots are designed for precision positioning and handling of objects in a wide range of industrial applications They are commonly used in manufacturing, assembly,
Trang 22Gantry Robots are often equipped with end-effectors or grippers that enable them to perform specific tasks, such as picking, placing, sorting, or manipulating objects They can
be controlled through various methods, including computer numerical control (CNC) systems, programmable logic controllers (PLCs), or dedicated robotic control systems With their versatile design and precise motion control, Gantry Robots offer advantages such as improved productivity, reduced labor costs, and enhanced process efficiency They can be integrated into automated production lines, working in collaboration with other robotic systems or human operators
Overall, Gantry Robots play a crucial role in industrial automation by providing reliable and accurate positioning and handling capabilities, contributing to increased productivity and quality in various industries [7]
2.3 Industry PC (IPC)
Industry PC, also known as an industrial PC or IPC, refers to a type of computer system specifically designed and built for use in industrial environments Unlike regular personal computers or consumer-grade devices, industry PCs are constructed to withstand harsh conditions, including extreme temperatures, vibrations, dust, and humidity, which are commonly found in industrial settings such as factories, manufacturing plants, and automation systems
Industrial PCs are typically more rugged and durable than standard computers They often feature enhanced protection against environmental factors, such as sealed enclosures to prevent dust or liquid ingress, shock-resistant components, and fanless designs to mitigate the impact of vibrations These features help ensure the reliable operation of the computer
in demanding industrial environments
The hardware specifications of industry PCs vary depending on the specific application requirements They can range from compact and embedded systems for space-constrained installations to more powerful and modular designs for complex industrial processes Common features of industry PCs may include industrial-grade processors, ample memory and storage capacities, multiple expansion slots for additional functionality, and various connectivity options for integration with industrial equipment and networks
Trang 2317
Industry PCs are used for a wide range of industrial applications, including process control, machine automation, data acquisition, monitoring and supervision systems, robotics, and more They are often utilized in industries such as manufacturing, energy, transportation, logistics, and healthcare, where reliable and rugged computing solutions are necessary to ensure operational efficiency, accuracy, and durability in challenging environments
Figure 2 6: Beckhoff Industrial PC Advantages of Industry PCs:
1 Ruggedness and Durability: Industry PCs are built to withstand harsh industrial environments, including extreme temperatures, vibrations, dust, and humidity Their robust construction ensures reliable operation and reduces the risk of system failures or downtime
2 Enhanced Reliability: Industrial PCs are designed for continuous operation in demanding conditions They often incorporate high-quality components and undergo rigorous testing
to ensure reliability, making them suitable for critical applications where system failure can have severe consequences
3 Longevity: Industry PCs are typically designed to have a long lifespan and support extended product availability This is crucial for industrial applications that require stable and consistent computing platforms over many years, reducing the need for frequent system replacements or upgrades
4 Customizability: Industrial PCs offer a high degree of customization to meet specific application requirements They can be tailored to include the necessary connectivity options, expansion slots, specialized I/O interfaces, and computing power needed for a particular industrial process or automation system
5 Compatibility with Industrial Standards: Industry PCs often adhere to specific industry standards, such as shock and vibration resistance (e.g., MIL-STD-810G) or
Trang 242 Limited Availability of Cutting-Edge Technology: Industrial PCs may lag behind consumer-grade computers in terms of adopting the latest technological advancements This is because industrial systems often prioritize stability and compatibility over frequent hardware updates, which can limit access to the newest features and performance improvements
3 Bulkier Design: The ruggedized nature of industry PCs can result in bulkier designs compared to slim and compact consumer PCs While this is necessary for housing robust components and protective enclosures, it may pose challenges in installations with space constraints
4 Increased Complexity: Industrial PCs may require specialized knowledge and expertise for installation, configuration, and maintenance Their customized nature and compatibility requirements with industrial equipment can make them more complex to deploy and troubleshoot, requiring trained personnel or technical support
Overall, industry PCs offer substantial benefits in terms of reliability, durability, and customization for industrial applications However, it's important to carefully assess the specific needs of the industrial environment and balance them against the potential drawbacks, such as higher costs and limited access to cutting-edge technology
2.5 Limitations of the topic
Due to time constraints and different objective conditions, the topic is stopped
In researching and running on the model with technical requirements:
- Build control model, program control model Gantry robot
- Perform product classification by diameter
- Display the HMI screen clearly and accurately
- Control Gantry robot axis model directly with on-demand commands
Trang 25Figure 2 7: Servo system diagram Components of a Servo System:
1 Servo Motor: The servo motor is a specialized motor designed for high-precision motion control It typically consists of a rotor and stator, with the rotor connected to the load or mechanical system Servo motors are known for their ability to deliver high torque, rapid acceleration, and precise positioning
2 Feedback Device: A feedback device, such as an encoder or resolver, is used to provide real-time information about the motor's actual position, speed, or other relevant parameters The feedback device continuously relays this information to the servo control system, allowing it to make adjustments and maintain accuracy
3 Servo Drive: The servo drive, also known as a servo amplifier or servo controller, is responsible for powering and controlling the servo motor It receives the control signals from the servo control system and adjusts the current, voltage, and frequency supplied to the motor accordingly The servo drive interprets the feedback signals and generates the appropriate control signals to maintain the desired motion
4 Control System: The control system consists of hardware and software that governs the operation of the servo system It receives input commands or setpoints specifying the desired position, speed, or torque and compares them with the feedback signals from the
Trang 2620
motor Based on this feedback, the control system generates error signals and adjusts the motor's control signals to minimize the error and achieve the desired performance
Working Principle of a Servo System:
A servo system operates in a closed-loop control configuration, continuously comparing the desired motion parameters (setpoints) with the actual motion feedback from the servo motor The control system calculates the error between the setpoint and the feedback and generates control signals accordingly These control signals are sent to the servo drive, which adjusts the power supplied to the motor to correct the error and achieve the desired motion
The feedback device, such as an encoder, provides accurate position, speed, or other relevant information to the control system This feedback allows the control system to detect any deviations from the desired motion and make precise adjustments in real-time
By continuously monitoring and correcting the motion, the servo system achieves high levels of accuracy, repeatability, and responsiveness
Advantages of Servo Systems:
High Precision: Servo systems offer exceptional precision and accuracy in motion control applications They can achieve precise positioning, smooth velocity control, and accurate torque output, enabling precise control of complex movements
Rapid Response: Servo systems can respond quickly to changes in setpoints or external disturbances The closed-loop control system continuously monitors and adjusts the motor's performance, allowing for fast and dynamic motion control
High Torque and Power: Servo motors can deliver high torque even at low speeds, making them suitable for applications requiring high power output and acceleration
Flexibility and Customization: Servo systems are highly customizable to meet specific application requirements They can be tuned for different motion profiles, speed ranges, and torque demands
Energy Efficiency: Servo systems are designed for optimal energy efficiency By adjusting the motor's power based on the actual motion requirements, they can minimize energy consumption and reduce operating costs
Limitations of Servo Systems:
Cost: Servo systems, especially high-performance ones, can be more expensive than other motion control solutions The cost of servo motors, drives, and control systems should be considered when evaluating the feasibility of a servo system for a particular application
Complexity: Implementing and tuning a
Trang 2721
2.4.2 Servo motor
A servo motor is a type of motor specifically designed for precise control of position, speed, and/or torque in various applications It is a critical component of servo systems used in industrial automation, robotics, CNC machinery, and other fields where accurate motion control is required
Figure 2 8: Servo motor Types of Servo Motors:
There are various types of servo motors, each designed for specific applications:
DC Servo Motors: These motors use a DC power supply and are known for their simplicity, compact size, and cost-effectiveness They are commonly used in small
to medium-sized applications that require moderate levels of precision and control
AC Servo Motors: AC servo motors utilize AC power and often employ more complex control algorithms They offer higher torque and power output compared
to DC servo motors and are suitable for applications requiring high performance and accuracy
High efficiency, resulting in reduced energy consumption and operating costs
Maintenance-free operation due to the absence of brushes, leading to increased uptime
Precise position and speed control, offering accurate and controlled motion
Trang 2822
Disadvantages:
Requires a more complex control system compared to DC servo motors, potentially requiring additional expertise and resources during setup and troubleshooting
Generally more expensive than DC servo motors, primarily due to the complexity
of the control system and higher performance capabilities
May exhibit reduced responsiveness and torque output at low speeds, requiring additional measures in certain low-speed applications
Can be sensitive to electrical noise, particularly in sensorless control configurations
DC Servo Motor:
Advantages:
Precise position control, suitable for applications that require accurate positioning
Fast response time, allowing for quick changes in speed and direction
High torque-to-inertia ratio, enabling fast acceleration and deceleration
Compact size, making them easier to integrate into systems with limited space
Cost-effective compared to AC servo motors, offering a simpler and more affordable option
2.4.3 Encoder
In the context of a servo motor, an encoder is an essential component used to provide feedback on the motor's position, speed, and sometimes direction It allows the control
Trang 29Figure 2 9: Structure of encoder motor There are different types of encoders commonly used with servo motors:
Incremental Encoder: An incremental encoder provides information about the position and movement of the motor relative to a reference point It generates a stream of pulses as the motor rotates, typically in the form of two output channels -
A and B - that produce quadrature signals The phase relationship between these signals determines the direction of rotation, and the pulse count indicates the distance or angle traveled
Absolute Encoder: An absolute encoder provides precise position information without the need for a reference point It assigns a unique digital code to each position, so the control system can determine the motor's exact position within a single revolution Absolute encoders can be single-turn or multi-turn, providing position feedback for both the motor's revolution and the number of rotations it has completed
- Encoder Absolute Multiturn:
An encoder with absolute multiturn capability provides a unique position value for every possible combination of singleturn and multiturn measurements It can accurately measure the absolute position of the shaft even after power loss or when the encoder is turned on
Trang 3024
This is achieved through the use of a secondary, independent sensing technology, such as
a gear mechanism or a battery-powered counter, which keeps track of the number of complete revolutions
- Encoder Absolute Singleturn:
An encoder with absolute singleturn capability provides a unique position value within one revolution of the shaft It does not keep track of the number of complete revolutions and cannot provide absolute position information beyond one revolution To obtain the absolute position of the shaft, it requires a reference point or initialization at a known position
In other words, the output values of an application program (calculated based on the inner state and input values) are made available within a defined and guaranteed time This defined time is also referred to as cycle time .(Infosys Beckhoff Real-time)
The application program itself can consist of several program blocks, which in turn call other programs or function blocks etc (see also IEC 61131-3 standard) The program blocks can be assigned to real-time tasks, which in turn call them with a cycle time to be defined and a defined priority.(Infosys Beckhoff Real-time)
TwinCAT 3 Real-Time is a real-time extension that can be used in the current TwinCAT 3.1 version in Microsoft Windows operating systems from Windows 7 or later TwinCAT 3 Real-Time supports the following features in order to meet the requirements described for the control of industrial processes:
Real-time capable scheduling
Parallel execution of processes
Direct hardware access
In addition, TwinCAT 3 Real-Time also offers multi-core support to meet the increasing demands for high-performance and flexible/expandable control platforms The available cores can either be used exclusively for TwinCAT or shared with Windows In
Trang 31ever-25
the following sections, the cores are therefore referred to as "isolated" or "shared .(Infosys Beckhoff Real-time)
2.5.2 Real-time capable scheduling
TwinCAT 3 Real-Time works with the double-tick method This means that both switching
to real-time mode and switching back is triggered by an interrupt The interrupt when switching to the real-time mode also starts the scheduling at the same time After an adjustable period of time, at the latest after 90% of the set cycle time, TwinCAT switches back to "shared" cores in non-real-time mode, so that the guest operating system has sufficient computing time available to comply with the response times required for hardware functions etc The isolated cores are an exception .(Infosys Beckhoff Real-time) Scheduling refers to the (system) process that determines the processing order and the processing time of the individual tasks, based on the defined cycle time and the defined priority Strict adherence to the processing time ensures that the real-time compliance described above is guaranteed .(Infosys Beckhoff Real-time)
Triggered by a synchronous basic tick on all time kernels, the scheduling for each time kernel is calculated independently in TwinCAT 3 Real-Time This guarantees that real-time tasks running on different cores do not interfere with each other unless this has been explicitly programmed in the user program by using interlocks .(Infosys Beckhoff Real-time)
real-Scheduling in which the priority of a task is derived from its cycle time is also known as rate-monotonic scheduling The TwinCAT 3 Real-Time automatically activates the
"Automatic Priority Management" option Since this is not always the best solution for every application, the priorities can be adjusted manually .(Infosys Beckhoff Real-time)
2.5.3 Exemplary representation of the call of a PLC task
Figure 2 10: Double-Tick method diagram The figure shows the call of a PLC task After the real-time tick has occurred, the PLC task
is called by the scheduler This makes the current input values available to the PLC application (input update), followed by processing of the application program (cycle update) Finally the results are written to the outputs (output update) Once this has been
Trang 3226
completed, the device switches to non-real-time mode (double-tick) As shown in the figure, the execution time of the user program may vary depending on which code is executed based on the internal state of the program Thus the time when the outputs are written also varies Depending on which task a bus system is driven, this can cause the sending of the bus telegrams to vary to the same extent
2.5.4 Preemptive multitasking
Preemptive multitasking means that the current state of a process (the CPU and point registers) is saved in the event of an interrupt (e.g by higher-priority processes), and the current process is paused If this happens, the scheduler determines the (new) process
floating-to be executed, based on the task priorities Once the process floating-to be interrupted is complete, the process context is restored and the "old" process continues
2.5.5 Direct hardware access
In order to achieve deterministic (reproducible) real-time behavior, TwinCAT 3 Real-Time requires direct hardware access For this to be possible, TwinCAT 3 Real-Time must be executed in Windows kernel mode This makes it possible, among other things, for TwinCAT Real-Time to access the network ports directly and send and receive real-time Ethernet telegrams (e.g EtherCAT)
2.5.6 Schematic representation of the TwinCAT 3 runtime environment
The following figure illustrates the structure of the TwinCAT 3.1 runtime environment in relation to scheduling The TwinCAT 3 runtime environment enables user modules to be executed in real-time An essential part of the TwinCAT 3 runtime environment therefore
is the real-time driver, which is executed on the cores that are activated for TwinCAT and handles the scheduling there The latter takes place independently on the individual cores
Trang 3327
Figure 2 11: Schematic representation of the TwinCAT 3 runtime environment
2.5.7 Insolated cores
As described under Real-time capable scheduling, TwinCAT uses a double-tick procedure
to switch back to non-real-time mode at a specified point in time When switching between real-time mode and non-real-time mode, the preceding process state is restored, as described under Preemptive multitasking The restoration takes some time, depending on how intensively the real-time and non-real-time programs use the memory and in particular the cache In order to eliminate these temporal effects, TwinCAT 3.1 Real-Time allows cores to be isolated from the guest operating system This eliminates the need to switch back, resulting in more computing time for the real-time user program and better real-time quality (less jitter) by avoiding the time effects associated with restoring the "old" process state
Trang 3428
Figure 2 12: Fisrt-Tick method diagram
2.5.8 Behavior when the cycle time is exceeded
If the defined cycle time of a task is exceeded, processing of the "old" cycle continues in the next cycle In addition, the task exceed counter is incremented Once processing of the old / previous cycle is complete, the system immediately tries to start processing the tasks
of the current cycle If this is completed within the current cycle, further processing is carried out as shown above
If the second cycle that follows directly is also exceeded (in this case it is irrelevant whether the system is still processing the first cycle or whether the second cycle has commenced), the current processing task is completed, and processing of the next task does not commence until the next possible scheduled cycle start This means that several cycles may
be lost The exceed counter is incremented accordingly
Figure 2 13: Multi Double-Tick
Trang 353.2 Hardware design
3.2.1 Design requirements
For product classification and monitoring systems, due to strict requirements on accuracy, stability, and automation of the system as well as monitoring system operation or malfunction in certain equipment So this system requires the following functions:
a Operate 2 modes Hand and Auto: Hand: allows the operator to monitor and control the devices manually independently without affecting other devices through buttons and indicator lights Auto: allows the system to automatically operate according to pre-programmed procedures
b Monitoring on the HMI screen: all operating status of the system (start, stop, emergency ) will be displayed on the HMI screen so that the operator can monitor the system's operation and promptly handle it
Figure 3 1: Design of Gantry Robot in Solidworks
Trang 3630
3.2.2 Operating Procedure
Figure 3 2: Robot execution diagram
3.3 Components information
3.3.1 Servo motor and Servo drive
3.3.1.1 Servo motor CSMA-04BT1ANT3
The CSMA 04BT1ANT3 servo motor incorporates advanced control technology, enabling precise position and speed control It offers excellent dynamic response, allowing for rapid acceleration and deceleration, which is vital in applications that require quick and precise movements
In addition to its technical capabilities, the CSMA 04BT1ANT3 servo motor is designed for durability and longevity Its construction includes high-quality materials that can withstand harsh operating conditions, including temperature variations, vibrations, and dust This reliability ensures consistent performance and minimizes downtime, contributing to increased productivity and cost-effectiveness in industrial settings
Trang 37Table 3 1: Spec of CSMA 04BT1ANT3
3.3.1.2 Driver CSD7-04BN1
Figure 3 4: Driver CSD7-04BN1 The CSD7-04BN1 driver is known for its advanced features and capabilities that make it suitable for a variety of demanding applications It is compatible with a wide range
of servo motors, allowing for flexibility in system design and integration