Chulalongkorn University Theses and Dissertations (Chula ETD)
วิธีการป้องกันและลดข้อผิดพลาดในการเขียนโปรแกรมควบคุมมอเตอร์
Other Title (Parallel Title in Other Language of ETD)
Prevention and reduction of errors in motor control programming
Year (A.D.)
2003
Document Type
Thesis
First Advisor
ประภาส จงสถิตย์วัฒนา
Second Advisor
สมบูรณ์ แสงวงค์วาณิชย์
Faculty/College
Faculty of Engineering (คณะวิศวกรรมศาสตร์)
Degree Name
วิทยาศาสตรมหาบัณฑิต
Degree Level
ปริญญาโท
Degree Discipline
วิทยาศาสตร์คอมพิวเตอร์
DOI
10.58837/CHULA.THE.2003.1142
Abstract
การเขียนโปรแกรมควบคุมมอเตอร์มีการนำเข้าข้อมูลจากตัวรับรู้ เพื่อนำมาคำนวณและส่งออกข้อมูลไปควบคุมมอเตอร์ตามที่ต้องการ โปรแกรมการคำนวณตามสมการควบคุม โดยทั่วไปนิยมใช้การคำนวณเลขแบบจุดตรึง เนื่องจากมีข้อดีที่ใช้เวลาในการคำนวณน้อย ใช้ขนาดพื้นที่หน่วยความจำน้อย และสามารถกำหนดช่วงค่าที่ต้องการได้ แต่ก็มีข้อด้อยในเรื่องการเก็บค่าที่จำกัดขึ้นอยู่กับจำนวนบิตที่ใช้ในการเก็บค่าข้อมูล ทำให้มักเกิดปัญหาในการคำนวณ โดยปัญหาที่พบบ่อยได้แก่ ปัญหาการล้น ปัญหาน้อยเกินเก็บ ปัญหาการตัดปลาย ปัญหาการปัดเศษ และปัญหามาตราส่วน ซึ่งล้วนแล้วแต่ทำให้เกิดความคลาดเคลื่อน และความผิดพลาดในการคำนวณทั้งสิ้น งานวิจัยนี้ได้นำเสนอวิธีการวิเคราะห์ค่าผิดพลาดของโปรแกรมในงานควบคุมมอเตอร์ เพื่อป้องกันและลดข้อผิดพลาดในส่วนการคำนวณ โดยใช้วิธีการคำนวณเลขคณิตแบบช่วงกับค่าในรูปแบบเลขทศนิยมและแบบจุดตรึง เพื่อใช้ในการรับประกันผลลัพธ์ที่ได้ว่าจะอยู่ภายในขอบเขตของผลการคำนวณ และเป็นไปตามเงื่อนไขของการคำนวณ แต่ถ้าไม่เป็นไปตามเงื่อนไข หรือเกิดความผิดพลาดขึ้นจะมีการรายงานให้ทราบเพื่อนำไปใช้ปรับปรุงแก้ไขต่อไป งานวิจัยนี้จะเลือกใช้หน่วยประมวลผลของบริษัท Hitachi รุ่น SH1 เป็นหลักในการพัฒนา เนื่องจากมีการใช้งานจริงในอุตสาหกรรมภายในประเทศ
Other Abstract (Other language abstract of ETD)
Motor control programs require taking inputs from sensing devices to perform calculation and output data to control motors. In general, the program which performs the calculation according to control equations employs the fixed-point calculation because of its advantage in terms of speed, its minimal requirement on memory, and its ability to specify the value range. The disadvantage of fixed-point calculation is the limited number of bits to store values, and this causes problems such as overflow, underflow, truncation, rounding-off, and scaling,resulting in tolerance and error in calculation. This research proposes an error analysis of programs in motor control applications to prevent and reduce errors in calculation. The proposed analysis method applies the interval arithmetic calculation to decimal and fixed-point numbers to assure that the results are in the required range and conform to calculation constraints. If the constraints are violated or errors occur, they will be reported to the users to helpthem make the necessary corrections. The application of the proposed analysis is confined to the processor from Hitachi model SH1 because it is widely used in the domestic industry.
Creative Commons License

This work is licensed under a Creative Commons Attribution-NonCommercial-No Derivative Works 4.0 International License.
Recommended Citation
สังขวิจิตร, เฉลิมทรัพย์, "วิธีการป้องกันและลดข้อผิดพลาดในการเขียนโปรแกรมควบคุมมอเตอร์" (2003). Chulalongkorn University Theses and Dissertations (Chula ETD). 64871.
https://digital.car.chula.ac.th/chulaetd/64871