Software Development of a Digital Servocontrol System
|School||Nanjing University of Technology and Engineering|
|Course||Control Science and Engineering|
|Keywords||Simulator AC servosystem ARM7 real-time control PID controller USB|
This paper is the synthesis of six months of work for a master thesis at the university Nanjing University of Science and Technology (NJUST) located in China in the city of Nanjing during the school year 2010-2011. The project was proposed for replacing an old servocontrol system for controlling the position of an AC motor used in some laboratories of NJUST by students during practical exercises. However the new system met some technical problems and the finality of the project was changed at the last moment and the software development result is a sort of digital servocontrol system simulator (although the original project was modified, this paper also describes a part of the software development of the new servocontrol system for replacing the old system).An evaluation board based on processor Philips LPC2142 (processor ARM7) is used for emulating the position of an alternative current motor (AC motor) to control while a PC is used as graphical user interface (GUI used for setting controller parameters and observing the system performances) and as digital controller. The data transfer between the PC and the evaluation board is ensured by Universal Serial Bus (USB). Then the software development is composed of the development of a graphical user interface using GTK+2 library package, the implementation of an AC motor model (to control in position) into the evaluation board, the development of a digital PID controller with feedforward command with six levels of error correction (one level of error correction corresponds to one set of controller’s gains for correcting a certain range of error) on the PC side, and the establishment of a USB data transfer between the PC and the evaluation board.The realization of this project is mainly divided into five steps:(1) Gathering of knowledge about the programming and the use of the hardware (understand the functioning and the programming of the evaluation board based on the processor ARM7, understand the USB norm and the USB firmware/driver programming, choose the library for designing the graphical user interface);(2) Planning of the software development and establishment of the global system functioning;(3) Programming of the graphical user interface;(4) Programming of the USB data transfers between the PC and the evaluation board, and test the display of curves in real time; (5) Implementation of the AC motor model in the evaluation board side and implementation of the digital PID+feedforward controller on the PC side;(6) General software debugging and testing of the controller performances.The simulations ran show the good functioning of the graphical user interface and the good data transfer between the PC and the evaluation board. The simulations’results show that a PID+feedforward controller with six levels of error correction permits to get better performance in the case of a slope input but in the case of a step or sine input signals it does not bring any improvement and the use of a classical PID+feedforward controller with one level of correction is sufficient.Generally speaking, the design of a graphical user interface in system control applications is useful for the tuning of the controller parameters and for observing the system performances while the use of the Universal Serial Bus in the project shows the possibility to establish data transfer between a PC and any embedded systems via USB instead of using classical interfaces such as ISA interface (Industry Standard Architecture bus interface) or RS-232 interface which are not provided on most of the recent PCs.