MINISTRY OF EDUCATION AND TRAINING HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY AND EDUCATION GRADUATION THESIS AUTOMATIC AND CONTROL ENGINEERING INTELLIGENT CONTROL SURVEY ON BALL AND BEAM SYSTEM LECTURER: NGUYEN VAN DONG HAI STUDENT: NGUYEN MINH QUAN NGUYEN NGOC SACH SKL012345 Ho Chi Minh City, January 2024 MINISTRY OF EDUCATION AND TRAINING HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY AND EDUCATION FACULTY OF INTERNATIONAL EDUCATION AUTOMATIC AND CONTROL ENGINEERING GRADUATION THESIS INTELLIGENT CONTROL SURVEY ON BALL AND BEAM SYSTEM STUDENTS: NGUYEN MINH QUAN – 18151230 NGUYEN NGOC SACH – 18151033 INSTRUCTOR: NGUYEN VAN DONG HAI Ho Chi Minh City, January 2024 TRƯỜNG ĐH SPKT TP. HỒ CHÍ MINH CỘNG HÒA XÃ HỘI CHỦ NGHĨA VIỆT NAM KHOA ĐÀO TẠO QUỐC TẾ ĐỘC LẬP - TỰ DO - HẠNH PHÚC ----o0o---- Tp. HCM, ngày tháng năm NHIỆM VỤ ĐỒ ÁN TỐT NGHIỆP Họ và tên sinh viên: Nguyễn Ngọc Sách MSSV: 18151033 Ngành: Công nghệ Kỹ thuật Điều khiển và Tự động hóa Lớp: 18151CLA1 Giảng viên hướng dẫn: Nguyễn Văn Đông Hải Ngày nhận đề tài: 20/08/2023 Ngày nộp đề tài: 30/12/202 1. Tên đề tài: Khảo sát điều khiển thông minh trên hệ bóng thanh trục giữa 2.
Các số liệu, tài liệu ban đầu: Mô hình cũ có sẵn. Nội dung thực hiện đề tài: Giải thuật LQR mô phỏng và thực nghiệm “Anfis” và “Neuron Toolbox” học LQR xây dựng bộ điều khiển Fuzzy 81 luật và Neuron, mô phỏng và thực nghiệm. Genetic algorithm tối ưu tiền – hậu xử lý của Fuzzy 81 (của hệ con lắc trên xe) để áp dụng được trên hệ bóng thanh trục giữa, mô phỏng và thực nghiệm Xây dựng Fuzzy 16 luật theo kinh nghiệm điều nghiệm, mô phỏng và thực nghiệm Cải tiến mô hình bóng thanh trục giữa, sửa lỗi nhiễu Encoder, ADC (mà các kỳ trước đều chưa khắc phục được), sửa các lỗi hở mạch, hư thiết bị, giảm rối, tăng thẩm mĩ, … Xây dựng giao diện giám sát hệ thống vận hành Đánh giá, nhận xét, đưa ra kết luận và hướng phát triển 4. Sản phẩm: Mô hình thực tế hệ bóng thanh trục giữa TRƯỞNG NGÀNH GIẢNG VIÊN HƯỚNG DẪN (Ký và ghi rõ họ, tên) (Ký và ghi rõ họ, tên) TRƯỜNG ĐH SPKT TP.
HỒ CHÍ MINH CỘNG HÒA XÃ HỘI CHỦ NGHĨA VIỆT NAM KHOA ĐÀO TẠO QUỐC TẾ ĐỘC LẬP - TỰ DO - HẠNH PHÚC ----o0o---- Tp. HCM, ngày tháng năm NHẬN XÉT CỦA GIẢNG VIÊN HƯỚNG DẪN Họ và tên sinh viên: Nguyễn Ngọc Sách MSSV: 18151033 Ngành: Công nghệ Kỹ thuật Điều khiển và Tự động hóa Tên đề tài: Khảo sát điều khiển thông minh cho hệ bóng thanh trục giữa Họ và tên Giáo viên hướng dẫn: Nguyễn Văn Đông Hải NHẬN XÉT 1. Nội dung đề tài & khối lượng thực hiện ………………………………………………………………………………………. Đề nghị cho bảo vệ hay không? ……………………………………………………………………………………… ………………………………………………………………………………………… 5.
Đánh giá loại: ……………………………………………………………………………………… …………………………………………………………………………………………. Điểm……………………(Bằng chữ: ………………………………………….) …………………………………………………………………………………… GIẢNG VIÊN HƯỚNG DẪN (Ký và ghi rõ họ và tên) TRƯỜNG ĐH SPKT TP. HỒ CHÍ MINH CỘNG HÒA XÃ HỘI CHỦ NGHĨA VIỆT NAM KHOA ĐÀO TẠO QUỐC TẾ ĐỘC LẬP - TỰ DO - HẠNH PHÚC ----o0o---- Tp. HCM, ngày tháng năm NHẬN XÉT CỦA GIẢNG VIÊN PHẢN BIỆN Họ và tên sinh viên: Nguyễn Ngọc Sách MSSV: 18151033 Ngành: Công nghệ Kỹ thuật Điều khiển và Tự động hóa Tên đề tài: Khảo sát điều khiển thông minh cho hệ bóng thanh trục giữa Họ và tên Giáo viên phản biện: Trần Đức Thiện NHẬN XÉT 1.
Nội dung đề tài & khối lượng thực hiện ………………………………………………………………………………………. Đề nghị cho bảo vệ hay không? ……………………………………………………………………………………… ………………………………………………………………………………………… 5. Đánh giá loại: ……………………………………………………………………………………… …………………………………………………………………………………………. Điểm……………………(Bằng chữ: ………………………………………….) …………………………………………………………………………………… GIẢNG VIÊN PHẢN BIỆN (Ký và ghi rõ họ và tên) ACKNOWLEDGMENTS We are grateful for the assistance and support we received in finishing our graduation thesis from the instructors of Automation and Control Engineering, the Faculty of Electrical and Electronics Engineering, and Ho Chi Minh City University of Technology and Education.
We express our profound gratitude to the primary instructor, Mr. Nguyen Van Dong Hai. Thank you so much for all of your enthusiastic help and support while we completed our graduation thesis. Ho Chi Minh City, January 2024 Nguyen Ngoc Sach i ABSTRACT A well-known SIMO (single input multiple output) system in the automatic control sector is the ball and beam (B&B).
The B&B system is widely used in educational institutions and research facilities, but it also has a wide range of real-world uses, including steady ship balancing, aircraft landings with convection air effect,. We carried out a review of smart controllers on this system because we recognized the practical and theoretical value of the B&B system. We then developed and examined the reality and simulation for: LQR controller, Fuzzy controller learning LQR controller with "Anfis" (a tool of Matlab's "Deep Learning" toolkit), The Neuron controller builds a 16-law fuzzy controller based on experience controlling the B&B system, and uses the "Neuron Toolbox" (a tool of Matlab's "Deep Learning" toolkit) to learn the LQR controller. The Neuron controller uses the genetic algorithm GA to optimize pre- and post-processing for the Fuzzy controller, which is 81 laws of the simple pendulum system that can be applied to the B&B system.
The findings of this topic's research will serve as the foundation for designers creating intelligent controllers for B&B systems, which balance ships, airplanes, and other objects before being used in real-world applications. Furthermore, this subject will serve as the starting point for future academic studies on intelligent control or more sophisticated algorithms for B&B systems. ii CONTENTS ACKNOWLEDGMENTS.iii LIST OF TABLES. v LIST OF FIGURES .1 Motivation of research topic.2 Objectives of the study.3 Scope of research .5 Application of the thesis.
4 CHAPTER 2: THEORETICAL FOUNDATIONS .1 Mathematical model of the B&B system .2 LQR control theory .3 Fuzzy Control Theory.4 Matlab Simulink and the "Deep Learning" toolkit .1 Introduction of the tool "Anfis".2 Introducing the "Neuron Toolbox" .5 Genetic algorithm theory .6 Controller Quality Evaluation Standards .1 Build an LQR controller.2 Build a Fuzzy controller using "Anfis”.3 Build a Neuron Controller using the "Neuron Toolbox".4 Optimizing pre-processing, post-processing for Fuzzy controllers - 81 rules.5 Building Fuzzy controller - 16 rules.1 Simulate system stability at equilibrium position .2 Simulate system stability at a location other than 0 .3 Sinusoidal trajectory tracking system control simulation .4 Simulate the control of a square wave trajectory system .5 Evaluate and comment simulation results. 61 CHAPTER 5: EXPERIMENT RESULTS .1 Experimental results stabilize the system at equilibrium .2 Experimental results stabilize the system at a position other than 0 .3 Experimental results of stabilization of sinusoidal trajectory tracking system .4 Evaluation and comment on experimental results. CONCLUSION AND TOPIC DEVELOPMENT DIRECTION.2 Topic development direction. 97 APPENDIX 1: MATLAB PROGRAM SUPPORTS CALCULATIONS APPENDIX 2: SUBSYSTEM HIDDEN STRUCTURE APPENDIX 3: SETUP SIMULINK BLOCK APPENDIX 4: THE HIDDEN PROGRAM IN MATLAB FUNCTION APPENDIX 5: GA IMPLEMENTATION PROGRAM APPENDIX 6: WAIJUNG BLOCKSET LIBRARY APPENDIX 7: USER INTERFACE PROGRAM iv LIST OF TABLES Table 1.
List of abbreviations and their meanings. Table of symbols of component quantities of the B&B system. Results table using GA to find pre-processing, optimal post-processing for Fuzzy controllers - 81 rules. Evaluation of stability criteria of LQR controllers.
Evaluation of Fuzzy controller stability criteria trained by "Anfis". Table of evaluation of stability criteria of Neuron controllers. Evaluation of stability criteria of Fuzzy controllers - 81 laws using GA optimization pre- processing, post-processing. Table of evaluation of stability criteria of Fuzzy controllers - 16 laws according to control experience.
Comparison table of stability criteria of 3 controllers LQR, Fuzzy – "Anfis" and Neuron. Table comparing the stability criteria of 3 LQR controllers, Fuzzy – 81 GA laws and Fuzzy – 16 laws. The table evaluates the quality criteria when simulating the stability of the ball position to 2cm with 5 controllers. Evaluation table of quality criteria when simulating sine trajectory ball position control with 5 controllers.
Evaluation table of quality criteria when simulating the control of the ball position of the square waveform trajectory with 5 controllers. Basic parameter table of STM32F4 Discovery. Basic parameter of bridge circuit H IR2184. Parameter of Nisca NF5475 motor.
Parameter of encoder with Nisca NF5475. Basic parameter of wire resistance sensors. Basic parameters of UART CP2102 Module. Detailed parameter table of control circuit connection.
List of model errors and how to fix. Table of evaluation of stability criteria of LQR controllers in practice. Evaluation of stability criteria of Fuzzy controllers – "Anfis" in practice. Table of evaluation of stability criteria of Neuron controllers in practice.
Evaluation of stability criteria of N Fuzzy controller - 81 laws optimized by GA pre- processing, post-processing in practice. Table of evaluation of stability criteria of Fuzzy controllers - 16 laws in practice. The table evaluates the quality criteria when simulating the stability of the ball position to 2cm with 5 controllers. Evaluation of quality criteria when experimentally stabilizing the ball position to 4cm of 5 controllers.
Evaluation table of experimental quality criteria for ball position stabilization according to sinusoidal trajectories of 5 controllers. 93 v LIST OF FIGURES Figure 1. DC motor structure. Equilibrium position of the B&B system.
LQR controller structure. Genetic Algorithm (GA) flowchart. Collect control data of the LQR controller. Select the data source.
Enter the variable containing the collected data. Define input and output functions. Enter the desired "Epochs". Collect control data of the LQR controller.
The result of the "Neuron Toolbox" creates a Neuron controller that learns according to LQR controller. Simulink collects for GA optimal pre-processing, post-processing of Fuzzy controllers - 81 rules. Input association function. Output association function.
Statuses of the B&B system. Fuzzy Controller Fuzzy Rule - 16 rules according to control experience. Fuzzy Controller Fuzzy Plane - 16 rules according to control experience. LQR controller for B&B system.
Stabilize the ball position of the LQR controller. Bar deflection angle stabilization results of the LQR controller. Control the B&B system with a Fuzzy controller trained by "Anfis". The result of stabilizing the ball position of the Fuzzy controller – "Anfis".
Bar deflection angle stabilization results of the Fuzzy controller – "Anfis". Control the B&B system with a Neuron controller. The results simulate stabilizing the position of the ball using the Neuron controller. The results simulate bar deflection angle stabilization using a Neuron controller.
Control the B&B system with Fuzzy - 81 law - GA controller with 4 pre-processors, post- processing. Ball position stabilization simulation results By Fuzzy controller - 81 laws with 4 pre- processors, post-processing. The result simulates bar deflection angle stability b using Fuzzy - 81 law controller with 4 pre-processing, post-processing. Controlling the B&B system with Fuzzy controllers - 16 rules according to control experience.
Results simulate ball position stabilization using Fuzzy controllers - 16 laws. Results of simulating bar deflection angle stability using Fuzzy controllers - 16 laws. Control the B&B system with 3 LQR controllers, Fuzzy - "Anfis", Neuron. The results simulate the control of ball position over time of 3 controllers LQR, Fuzzy – "Anfis" and Neuron.
The results simulate the time of 3 LQR, Fuzzy – "Anfis" and Neuron controllers. Control the B&B system with 3 controllers LRQ, Fuzzy – 81 GA, Fuzzy – 16 rules. The results simulate the control of ball position over time of 3 controllers LQR, Fuzzy - GA and Fuzzy - 16 rules. The results simulate bar deflection angle control b according to the times of 3 controllers LQR, Fuzzy - GA and Fuzzy - 16 rules.
Simulink compares 5 controllers when stabilizing the ball to a position other than 0 .