Phát Triển Thuật Toán Điều Khiển Phân Tán Cho Cần Cẩu Lật Ngược

Tài liệu nghiên cứu Development and realization of a distributed control algorithm for an inverted rotary pendulum, tổng hợp lý thuyết và thực hành, cung cấp kiến thức chuyên sâu

Trường đại học

Universität Siegen

Chuyên ngành

Embedded Systems

Người đăng

Ẩn danh

Thể loại

master thesis

2014

104
2
0

Phí lưu trữ

35 Point

Mục lục chi tiết

1. CHƯƠNG 1: INTRODUCTION

1.1. Introduction

1.2. Master thesis objectives

1.3. Report’s structure

2. CHƯƠNG 2: BASIC CONCEPTS AND RELATED WORKS

2.1. Related Work

2.1.1. The mechanical design

2.1.2. The results from the student work

2.2. Basic concepts in Embedded C

2.2.1. Basic concepts in Embedded C

2.2.2. Control Statements

3. CHƯƠNG 3: MODELING AND MICROCONTROLLER’S STRUCTURES

4. CHƯƠNG 4: IMPLEMENTATION IN PROGRAMMING LANGUAGE

5. CHƯƠNG 5: RESULTS AND DISCUSSION

6. CHƯƠNG 6: CONCLUSION

Declaration, Reference and Appendix

Tóm tắt

I. Tổng Quan Về Phát Triển Thuật Toán Điều Khiển Phân Tán

Phát triển thuật toán điều khiển phân tán cho cần cẩu lật ngược là một lĩnh vực nghiên cứu quan trọng trong công nghệ điều khiển tự động. Sự phát triển này không chỉ giúp cải thiện hiệu suất của các hệ thống điều khiển mà còn tối ưu hóa quy trình làm việc trong các ứng dụng công nghiệp. Việc áp dụng FreeRTOS trong phát triển thuật toán này mang lại nhiều lợi ích, bao gồm khả năng quản lý đa nhiệm và giao tiếp hiệu quả giữa các nút điều khiển.

1.1. Khái Niệm Cơ Bản Về Cần Cẩu Lật Ngược

Cần cẩu lật ngược (Inverted Rotary Pendulum - IRP) là một hệ thống điều khiển phi tuyến tính, yêu cầu sự phối hợp giữa nhiều lĩnh vực như cơ khí, lý thuyết điều khiển và khoa học vi điều khiển. Hệ thống này có khả năng giữ thăng bằng trong trạng thái đứng thẳng, điều này đòi hỏi thuật toán điều khiển chính xác.

1.2. Lợi Ích Của FreeRTOS Trong Điều Khiển Phân Tán

FreeRTOS là một hệ điều hành thời gian thực, cho phép phát triển các ứng dụng nhúng với khả năng quản lý đa nhiệm. Việc sử dụng FreeRTOS giúp tối ưu hóa hiệu suất của thuật toán điều khiển phân tán, đồng thời giảm thiểu độ trễ trong giao tiếp giữa các nút điều khiển.

II. Thách Thức Trong Phát Triển Thuật Toán Điều Khiển

Phát triển thuật toán điều khiển phân tán cho cần cẩu lật ngược gặp phải nhiều thách thức, bao gồm việc xử lý tín hiệu từ cảm biến, quản lý thời gian thực và đảm bảo độ ổn định của hệ thống. Những thách thức này cần được giải quyết để đảm bảo rằng hệ thống hoạt động hiệu quả và chính xác.

2.1. Vấn Đề Xử Lý Tín Hiệu Từ Cảm Biến

Việc xử lý tín hiệu từ cảm biến là một trong những thách thức lớn nhất trong điều khiển phân tán. Các tín hiệu này cần được xử lý nhanh chóng và chính xác để đảm bảo rằng hệ thống có thể phản ứng kịp thời với các thay đổi trong trạng thái của cần cẩu.

2.2. Quản Lý Thời Gian Thực Trong Hệ Thống

Quản lý thời gian thực là yếu tố quan trọng trong phát triển thuật toán điều khiển. Hệ thống cần phải đảm bảo rằng các tác vụ được thực hiện đúng thời gian để duy trì sự ổn định và hiệu suất của cần cẩu lật ngược.

III. Phương Pháp Phát Triển Thuật Toán Điều Khiển Phân Tán

Để phát triển thuật toán điều khiển phân tán cho cần cẩu lật ngược, cần áp dụng các phương pháp khoa học và công nghệ hiện đại. Việc xây dựng mô hình toán học chính xác và sử dụng các thuật toán điều khiển tiên tiến là rất cần thiết.

3.1. Mô Hình Toán Học Của Cần Cẩu Lật Ngược

Mô hình toán học của cần cẩu lật ngược cần phải phản ánh chính xác các đặc tính phi tuyến tính của hệ thống. Việc xây dựng mô hình này sẽ giúp trong việc phát triển các thuật toán điều khiển hiệu quả.

3.2. Ứng Dụng Các Thuật Toán Điều Khiển Tiên Tiến

Các thuật toán điều khiển như PID, LQR và các phương pháp điều khiển phi tuyến khác có thể được áp dụng để tối ưu hóa hiệu suất của cần cẩu lật ngược. Việc lựa chọn thuật toán phù hợp sẽ ảnh hưởng lớn đến khả năng duy trì thăng bằng của hệ thống.

IV. Kết Quả Nghiên Cứu Và Ứng Dụng Thực Tiễn

Kết quả nghiên cứu cho thấy rằng việc phát triển thuật toán điều khiển phân tán cho cần cẩu lật ngược sử dụng FreeRTOS đã mang lại những cải tiến đáng kể về hiệu suất và độ ổn định. Các ứng dụng thực tiễn của nghiên cứu này có thể được áp dụng trong nhiều lĩnh vực công nghiệp.

4.1. Đánh Giá Hiệu Suất Của Hệ Thống

Đánh giá hiệu suất của hệ thống điều khiển phân tán cho thấy rằng thuật toán đã cải thiện đáng kể khả năng duy trì thăng bằng của cần cẩu lật ngược. Các thử nghiệm thực tế cho thấy hệ thống hoạt động ổn định trong nhiều điều kiện khác nhau.

4.2. Ứng Dụng Trong Ngành Công Nghiệp

Nghiên cứu này có thể được áp dụng trong nhiều lĩnh vực công nghiệp, từ tự động hóa nhà máy đến các hệ thống robot công nghiệp. Việc áp dụng công nghệ IoT trong điều khiển cũng mở ra nhiều cơ hội mới cho các ứng dụng trong tương lai.

V. Kết Luận Và Tương Lai Của Nghiên Cứu

Nghiên cứu về phát triển thuật toán điều khiển phân tán cho cần cẩu lật ngược đã đạt được nhiều thành tựu quan trọng. Tương lai của nghiên cứu này hứa hẹn sẽ mang lại nhiều cải tiến hơn nữa trong công nghệ điều khiển tự động.

5.1. Tóm Tắt Các Kết Quả Đạt Được

Các kết quả đạt được từ nghiên cứu cho thấy rằng việc phát triển thuật toán điều khiển phân tán đã mang lại những cải tiến rõ rệt về hiệu suất và độ ổn định của hệ thống.

5.2. Hướng Nghiên Cứu Tương Lai

Hướng nghiên cứu tương lai có thể tập trung vào việc tối ưu hóa hơn nữa các thuật toán điều khiển và áp dụng công nghệ mới như trí tuệ nhân tạo để nâng cao khả năng tự động hóa của hệ thống.

09/07/2025
Development and realization of a distributed control algorithm for an inverted rotary pendulum using freertos with ttcan communication

Trích đoạn nội dung tài liệu

h­íng dÉn ®äc toµn v¨n b¸o c¸o KQNC ! B¹n muèn ®äc nhanh nh÷ng th«ng tin cÇn thiÕt ? ! H∙y ®äc qua Môc lôc bªn tay tr¸i b¹n tr­íc khi ®äc b¸o c¸o ( víi Acrobat 4.0 trë lªn, cho trá chuét vµo mçi ®Ò môc ®Ó ®äc toµn bé dßng bÞ che khuÊt ) ! Chän ®Ò môc muèn ®äc vµ nh¸y chuét vµo ®ã ! B¹n muèn phãng to hay thu nhá trang b¸o c¸o trªn mµn h×nh ? ! Chän, nh¸y chuét vµo 1 trong 3 kÝch th th­­íc cã s½n trªn thanh Menu , hoÆc ! Më View trªn thanh Menu, Chän Zoom to ! Chän tû lÖ cã s½n trong hép kÝch th th­­íc muèn,, NhÊn OK hoÆc tù ®iÒn tû lÖ theo ý muèn Chóc b¹n hµi lßng víi nh÷ng th«ng tin ®®­­îc cung cÊp UNIVERSITÄT SIEGEN Institut für Embedded Systems Master Thesis Development and Realization of a distributed control algorithm for an inverted rotary pendulum using FreeRTOS with TTCAN communication Submitted by: Bui, Hoang Dung Matr.: 976477 Supervised by: Prof. Roman Obermaisser Dr.2014 Master Thesis’s Report Development and Realization of a distributed control algorithm for an inverted rotary pendulum using FreeRTOS with TTCAN communication i Table Content 1 Introduction.2 Master thesis objectives .3 2 Basic concepts and Related Works.1 The mechanical design .2 The results from the student work.1 Basic concepts in Embedded C .3 Pointer, Arrays and Structures .2 Used FreeRTOS Library Classes .4 CAN and Time Trigger CAN .1 Controller Area Network – CAN .2 Time Trigger CAN – TTCAN .5 AT90CAN128 Microcontroller .1 The specific knowledge about AT90CAN128.2 CAN Controller in AT90CAN128. 28 3 Modeling and Microcontroller’s Structures .1 The nonlinear IRP Model .2 Time Trigger Matrices.3 TTCAN_Scheduler Task and CAN ISR .1 Nonlinear IRP model.2 The common parts .1 Specific External Interrupt Service Routines .2 Data_Preparation() Task. 63  Data_Reception() Task.

63  LCD_Display() Task. 65  PWM_Calculation() Task. 65  PushedButton_Detection() Task.1 Timer/Counter 3 Compare Match Interrupts .2 DC-motor Control Tasks .1 The IRP parameters .3 PWM and Sampling frequencies. 77 5 Results and Discussion .1 The nonlinear IRP model behavior .2 The IRP machine Operation.1 Sampling and PWM frequency.

90 iii Chapter 1 Introduction 1 Introduction The Inverted Rotary Pendulum - IRP is a machine which is invented in 1992 by Katsuhisa Furuta. It contains a driven arm and a pendulum which is attached on the arm. Both the arm and pendulum can rotate freely in the horizontal and vertical plane respectively. In order to control the IRP, it is needed the cooperation of several different fields such as mechanics, control theory and microcontroller science.

From the mechanical field, the IRP is a machine which transmits the energy by an input – the DC-motor to control two rotations. In the control system theory’s view, the IRP is nonlinear system and only two states can be measured directly. From the microcontroller science side, microcontrollers should be fast enough to produce appropriate actions to response any variation of the IRP. The IRP is considered to work well if its pendulum can stays at upright position forever.

Therefore this project’s goal is step by step to find a solution which makes the IRP operating well in the specific requirements. In this chapter would give an overview idea about the real IRP machine, the master thesis goal in detail and the report’s structure.1Overview This master thesis project is the step to go further from the student work “Modeling and Simulation of an Inverted Rotary Pendulum” [Bui, 2013]. In the student work, the approximate linear model of the IRP had built. Moreover, the control theory which controls IRP had also established, it was State Space method.

That method was applied to the Simulink model then the model’s response was stable and worked at upright position. However, there are differences between the model and the machine. That is the built model was linear model whereas the machine contains nonlinear parts. That issue would be solved in this thesis.

Moreover, this project would go deeper to the control problem of the machine. The IRP machine is shown on the figure 1.1 the IRP Overview 1 Chapter 1 Introduction On the figure 1.1, the main parts of the IRP can be seen: the pendulum/mass M, the gearbox and DC-motor, belt transmission, the Frame, tow sensor and the foundation. The IRP movement begins from the DC-motor. The movement is transferred to the Frame via the gearbox and belt transmission.

When the Frame rotates, it makes the mass/pendulum swinging up to the upright position. The two movements which are measured by two encoders are the angle positions of the Frame and the mass M. The two measured angles are called Arm angle and Pendulum angle respectively. Signals from both encoders which are primitive processed by circuit 1 are sent to the integrated circuit 2.

The integrated circuit 2 is a compound circuit board which consists of four microcontrollers AT90CAN128 and several equipment such as a LCD DOGS102-6, pushed button matrix, LEDs, signal ports, fours PCA82C250, L6205D. The four microcontrollers process the data which are used to control DC-motor. The pushed button matrix and LCD DOGS102 are used to communicate with users (Human Machine Interface – HMI). The LCD shows the information of the IRP system.

The button matrix receives the commands from users then manipulates the state of the IRP system. Four PCA82C250s are the bridge between the CAN controller and the CAN Bus. The L6205D receives the signal PWM from I/O port of microcontroller and add more energy to control DC-motor directly. There are four microcontrollers used to control the IRP.

The first microcontroller detects the movements of Arm angle and Pendulum angle and transmits the new angles to other microcontroller. The second microcontroller displays all the IRP information on the LCD. The third one receives signal from the button matrix and control the IRP working or stopping. The last microcontroller controls the rotation of DC motor, thereby control the IRP movement.2 Master thesis objectives As mentioned earlier, this thesis is completed the work-in-progress from the student work.

The basic and critical duty is to write the codes for four microcontrollers to control the IRP machine working at upright position and is stable there. In order to implement that duty, some minimum objectives should be fulfilled. They are: - Build nonlinear model of IRP. - Define constraint times which can keep the system working stable.

- Handle with the sensor signal and the backlash. - Check capacity of Microcontrollers to meet the IRP control requirements. 2 Chapter 1 Introduction - Write the program to control the IRP working at upright position with the stability time about 5 seconds. As the basic objectives are completed, the master thesis goals are extended.

There are some extra parts which would be added to the system to make it friendly to human. The additional objectives are: - Establish two separate programs to control IRP in two phases: Swing up phase and Upright phase. - Human – Machine Interface (HMI): show IRP information on LCD, and some buttons to control IRP - Be able to change the reference input of arm angle. - Be able to transmit the signal of IRP angles to computer, and shown it graphically.

That is the objectives of this master thesis project. Subsequently, the report structure would be introduced.3 Report’s structure The report included six chapters. Chapter sequence was formed to assist reader in understanding step by step how the student’s work was implemented. Knowledge was presented in appropriate chapters and described how they can be applied to this specific IRP.

Chapter 1 presents general knowledge about IRP, objectives and report’s structure. Chapter 2 describes the related works and basic concepts which would be used to control the IRP machine. Chapter 3 introduces the designed work on each microcontroller. It starts with the general structures in the four microcontroller such as the Scheduler, the CAN message, TTCAN_Scheduler task and CAN ISR.

Then it works with the specific tasks which are for the specific microcontrollers. Chapter 4 would implement the design in the programming language. In this chapter, the description of the microcontroller structures are converted to the Embedded C, FreeRTOS code and they will actually control the IRP machine. It also describes the parameter estimation process.

Chapter 5 would present the results from chapter 4. The response in the nonlinear model and the IRP machine will be shown and discussed. The learned knowledge is also discussed here. Chapter 6 concludes about the master thesis project.

The achieved goals were reached in this work. In the end of the work, the declaration, reference and appendix – the program codes in detail of the former chapters are presented. 3 Chapter 1 Introduction The aforesaid information plays as a key role to assist readers in having an overview of this master thesis. The second chapter hereafter presents some basic concepts and related works regarding the IRP.

4 Chapter 2 Basic Concepts and Related Works 2 Basic concepts and Related Works This chapter presents the knowledge which is the foundation to develop the IRP operation. The first section of chapter would recall the related works, which are already completed and their results will be applied in this master thesis. The second section presents the basic concepts which are deployed to program the IRP control code such as Embedded C, FreeRTOS, TTCAN and AT90CAN128 microcontroller. Because of the enormous knowledge of those fields, only the specific knowledge will be introduced.1 Related Work In order to carry out the controlled works of IRP machine in upright position, that is obviously essential to have a foundation.

The first foundation is the existence of a real IRP machine, which is outlined the first chapter. The technical parameters, the engineering drawings would be described in detail in the section 2. The second foundation is the control theory, which is responsible to keep the mass of IRP machine at upright position. That theory was established in my student work [Bui, 2013], and was applied in the IRP model.

The response of that model was satisfied the control requirements in the response time and the stable. The key points of both foundations would be the following sections.1 The mechanical design This section presents the engineering draws of IRP machine’s structure. The overview of the IRP in design phase is shown in the figure below.1: The 3-D draw of the IRP 5 Chapter 2 Basic Concepts and Related Works In this draws the blue item represent for the DC-motor. The belt transmission and the bearing are missing.

From the 3-D view, it is projected in the front and top direction. The results are the top view and front view draws with more detail about the IRP. From the front view of the IRP, its height is 400 mm, the length is 350 mm and the width is 200 mm.2 Front view of the IRP Figure 2.3 Top view of the IRP The front view and the top view give the image of dimension of the IRP, the distance among components. It also gives a visual view of the mechanical structure about the machine.

Based on the dimension, the procurement of the components such as DC-motor, gearbox, belt transmission can perform to meet the requirements. The engineering draws then are sent to the mechanical shop, which is charge of the production and assembly the foundation and other components. 6 Chapter 2 Basic Concepts and Related Works 2.2 The results from the student work The works which were accomplished in the student work would be recalled in this section. In the student work, the linear IRP model was built.

Moreover, the adequate control theory was also found that was State Space Control method. In this method, the system equations were set to become the equation system of the first order. The system states and inputs were set to be respective vectors.

Nội dung được bảo vệ bản quyền — Tải xuống đầy đủ

Tài liệu "Phát Triển Thuật Toán Điều Khiển Phân Tán Cho Cần Cẩu Lật Ngược Sử Dụng FreeRTOS" trình bày một nghiên cứu sâu sắc về việc phát triển các thuật toán điều khiển cho cần cẩu lật ngược, một thiết bị quan trọng trong ngành công nghiệp xây dựng. Bằng cách sử dụng hệ điều hành thời gian thực FreeRTOS, tài liệu này không chỉ cung cấp cái nhìn tổng quan về các phương pháp điều khiển phân tán mà còn nêu bật những lợi ích của việc áp dụng công nghệ này trong việc tối ưu hóa hiệu suất và độ chính xác của cần cẩu.

Độc giả sẽ tìm thấy nhiều thông tin hữu ích, từ lý thuyết đến ứng dụng thực tiễn, giúp họ hiểu rõ hơn về cách thức hoạt động của các thuật toán điều khiển hiện đại. Để mở rộng kiến thức của mình, bạn có thể tham khảo thêm các tài liệu liên quan như Luận văn thạc sĩ hcmute nghiên cứu chế tạo mạch điều khiển phun xăng dùng vi điều khiển, nơi bạn sẽ tìm thấy thông tin về các mạch điều khiển sử dụng vi điều khiển, hay Luận văn thạc sĩ hệ thống điều khiển băng tải và đếm số lượng sản phẩm bằng vi điều khiển, tài liệu này sẽ giúp bạn hiểu rõ hơn về các hệ thống điều khiển tự động trong sản xuất. Cuối cùng, bạn cũng có thể khám phá Luận văn nghiên cứu điều khiển cân bằng robot có sử dụng thuật toán giảm bậc mô hình, nơi cung cấp cái nhìn sâu sắc về các kỹ thuật điều khiển hiện đại cho robot. Những tài liệu này sẽ giúp bạn mở rộng kiến thức và hiểu biết về lĩnh vực điều khiển tự động.