International Journal of Electronics Engineering, 4 (1), 2012, pp. 103 107 Serials Publications, ISSN : 0973-7383 Real-Time Angular Position Control of a Faulhaber DC Micromotor through MATLAB Manjunatha Reddy H. K. 1, Parvathi C. S. 2 & P. Bhaskar 3 1 Department of Electronics, Govt. First Grade College, Shikaripura, KA, India. 2, 3 Department of Instrumentation Technology, Gulbarga University Post Graduate Centre, Yerigera, Raichur, KA, India. (E-mail: manjunathareddy_hk@yahoo.co.in) Abstract: The main objective of this paper is the implementation of different controllers through MATLAB software package for real-time angular position control of a Faulhaber DC Micromotor. This work comprises the design of hardware as well as software. The behavioral response of the system for different controllers is obtained. Further, the response of the system is also studied for linear and non linear input functions. The study reveals that the implementation of controllers through MATLAB is easier and quick, in terms of development time, when compared to the implementation of the controllers through other platforms such as microcontroller/dsp/plc. The improved transient and steady state response of the system is observed through this method. Keywords: MATLAB, Angular Position, DC Micromotor, Fuzzy Logic Controller, IFLC. 1. INTRODUCTION The programming paradigms have evolved their transition from machine languages to assembly language, and from these to function, procedural and eventually object oriented and presently high level languages. Because of the advent of the digital computers, the implementation of robust controllers have been possible and made it easier for analysis and design [1]. MATLAB is a very powerful software tool, for solving various types of problems in mathematical engineering and other sciences. Indeed, it incorporates a programming language that is similar in structure to many common languages such as FORTRAN, BASIC, PASCAL, C etc. As MATLAB also includes the various analysis and plot tools, programming, implementation of controllers, analysis of the data and obtaining plots/graphs is easier and faster as compared to the other PC based conventional platforms [2-3]. Motion control systems play an important role in industrial equipment such as machine tools, semiconductor manufacturing systems, robot systems etc. Speed and position control of the motor is the most common parameter controlled in all the sectors of industries and scientific fields. Particularly, the position control system needs a good control to satisfy such requirements as accuracy, quick response, and robustness. It addition, ease of controller design and simplicity of control structure are very important for practical applications [4]. The position control of motion devices had been carried out extensively with various controllers implemented on different platforms such as microprocessors, microcontrollers, digital signal processors, and PC using C language and LabVIEW [5-9]. But the implementation of controllers on PC using sophisticated MATLAB software is rarely reported. The proposed study deals with the implementation of controller through MATLAB software for real time angular position control of a FAULHABER DC Micromotor (264 WZ012 CR). The different control algorithms such as proportional plus integral plus derivative (PID), fuzzy logic (FL) and integrated fuzzy logic (IFLC) controllers are designed through MATLAB software for position parameter control [10-11]. The study is also carried to analyze the response of the system with different controllers for linear and non-linear input functions. 2. HARDWARE DETAILS The block diagram of MATLAB based DC Micromotor angular position control system is shown in Figure 1. The hardware communication between PC through MATLAB and DC Micromotor is accomplished through DIOT card (PCI 1751), analog-to digital converter (ADC), digital-toanalog converter (DAC) circuits and position sensor circuit. 2.1. Principle of Working Initially the position of the gear train Faulhaber DC micromotor is set to a particular reference position through a PID controller implemented on PC in MATLAB m-file program along with the DIOT card, AD-DA board and driver circuit connected to it. The position is manually confirmed by a graduated disc attached to the shaft of a motor and a fixed pointer.
104 International Journal of Electronics Engineering This position is sensed as measured position for a variable defined in m-file through the servo potentiometer, buffer, AD- DA board and DIOT card and displayed on monitor. Then, the motor is subjected to various test input signals such as step, triangular, square and ramp, implemented in the MATLAB m-file. The behavior of the controller i.e., PID controller, FLC and IFLC are studied. The responses thus obtained are plotted in MATLAB environment itself. 2.2. PCI DIOT Card PCI 1751 DIOT card consists of 48 digital I/O lines and three 16 bit counters/ timers. The card emulates two 8255 PPI chips, provides digital I/O bits with buffered mode-0 operation and the output status can be read back. This card uses high density SCSI 68-pin connector for easy and reliable connection to the field device [12]. 2.3. AD-DA Board AD-DA board is the combination of ADC and DAC. It consists of AD1674 a 12-bit monolithic IC with 10 µsec sampling rate and DAC 7541A, a low cost, four-quadrant multiplying digital-to-analog converter IC with relative accuracy of ±1 LSB. Both the ICs are of Analog Devices make [13]. 2.4. Faulhaber Micromotor A DC Micromotor with a gear head, operated over normal voltage of 12V is used. It is a product of FAULHABER Miniature Drive System, USA [14]. The specifications of the Faulhaber DC Micromotor and gear head are provided in Tables (1) and (2). Table 1 Specifications of Faulhaber DCMM 2642W012CR Parameter Figure 1: Block Diagram of MATLAB Based DC Micromotor Angular Position Control System Unit Size 26mm outer diameter, and 42mm length with 4mm shaft diameter Normal voltage 12 V Output power 22.1 W Efficiency 78% No load speed 6400 rpm No load current 0.118 A Rated torque 28 m Nm Angular acceleration 120 x 10 3 rad/sec 2 Operating temperature range -30 to +125 C Commutation Graphite Housing material Steel, black coated Weight 114 g Parameter Size Weight Table 2 Specifications of Faulhaber Planetary Precision Gear Head 26A No. of Gear Stages 4 Unit 26mm outer diameter, and 44.3mm length without motor with 6mm shaft diameter 25 g Speed reduction ratio 124:1 Efficiency 61 % Output torque 3. MATLAB IMPLEMENTATION 900 m Nm for continuous operation1400 m Nm for intermittent operation A software program is written in the MATLAB environment for initialization of AD-DA board and the port lines along with set point and the control algorithm. The initial position of the motor is sensed by the servo potentiometer connected to the shaft of the DC Micromotor, through ADC. Based on the initial position and set position, the control algorithm computes the value for control action to be applied to the DC Micromotor through the DAC and buffer/driver circuit. A precisely graduated circular aluminum disk is connected to the shaft, and to measure the position of the shaft manually through a fixed pointer [15]. The relationship between the angular position of the shaft of the motor and voltage from the potentiometer is given in equation (1). p = a1* v + a0 (1) Where, p angular position of DC Micromotor v digital data from ADC a1 slope of the angular position v/s voltage graph a0 intercept on y-axis. The block diagram of IFLC implemented for the position control is shown in Figure 2 [16]. Figure 2: Block Diagram of an IFLC Controller IFLC is the combination of FLC and PID controller where output of FLC is cascaded to the input of PID. The two-input, one-output FLC is used in the present study. The inputs to FLC are error e(k) and change-in-error ce(k). The output of fuzzy logic controller is taken as cu(k) and r(k),
Real-Time Angular Position Control of a Faulhaber DC Micromotor Through MATLAB 105 y(k) are set point and measured positions respectively. The inputs are defined in universe of discourse with seven membership functions. where - e(k) and ce(k) are obtained using the following relationship e(k) = r(k) - y(k) ce(k) = e(k) - e(k-1) and u(k) = [u FLC (k) +r(k)] y(k) The triangular membership function is used to fuzzify the error and change-in-error and for defuzzification process centre-of-gravity (COG) method is used. The error and change-in error are ranged between -1 to + 1 in the universe of discourse. The membership boundaries of error, change in error and output control action is shown in Figure 3. The output of FLC i.e., u(k) is applied to the input of PID controller to obtain the IFLC as shown in Figure 2. The PID position control algorithm is shown in equation 2. where, V n = K p (e n e n-1 ) + K i e n T+K d / T [(e n -2e n-1 +e n-2 )] (2) V n - control action, e n, e n-1 & e n-2 - error, previous error & previous-to-previous error respectively, K p, K d & K i - proportional, derivative and integral constants respectively, & T-cycle time. The best tuned values of PID controller for present study are given by K p = 2.75, K d = 67.5, K i = 0.01 & T = 1sec. Figure 4 shows the software flow diagram for angular position control of a DC Micromotor. Figure 4: MATLAB m-file Flow Diagram 4. EXPERIMENTAL RESULTS The effectiveness of the different controllers for angular position control of a Faulhaber DC Micromotor is evaluated for step input and also for linear and non-linear set point variations. The transient response parameters of the controllers are tabulated as shown in Table (3). Table 3 Transient Response Parameters of the Controllers for Standard Test Input Signal Results from present study Results of reference [17] Controller Rise Settling Steady Rise Settling Steady Time Time State Time Time State (sec) (sec) Error (sec) (sec) Error PIDC 0.41 0.645 0.1 0.65 0.78 0.16 FLC 0.372 0.572 0.08 0.5 0.73 0.2 IFLC 0.363 0.556 0.05 0.48 0.7 0.14 Figure 3: Triangular Membership Function for (a) Error, (b) Change-in-error and (c) Control Output The results presented in the table justify the superior performance of the proposed controllers implemented in
106 International Journal of Electronics Engineering MATLAB software over the system. The performance indices such as rise time, settling time and steady state error of the proposed controller are studied. The Figure (5) shows the comparison of step input response of PID, Fuzzy and Integrated Fuzzy controller. The performance of the controllers is also studied for different inputs such as, square waveform, triangular waveform, sine waveform and set point variation. Figures 6, 7, & 8 show the tracking performance of integrated fuzzy controller for standard test Figure 8: Ramp Input Response for IFLC Figure 5: Step Input Response of PID, FLC & IFLC input signals i.e., triangular, square and ramp respectively. The system achieved a precession of about 0.1 in controlling the angular position for a step angle of 100. The performance of the controllers in the present work is compared with results obtained for the same motor, with the controllers implemented with C programming [17]. The results show the improvement with respect to rise time, settling time and steady state response. 5. CONCLUSION In the present study, the controllers have been implemented for a DC Micromotor angular position control in the MATLAB programming language (script file). The proposed system has better transient and steady state response for integrated fuzzy logic controller as compared to fuzzy and PID controllers. Good tracking response is observed in case of linear and non linear standard input. Also, the implementation of the controllers in the MATLAB environment is easy and quick as the length of program is reduced many folds as compared to the programs written in C language for the same. Figure 6: Triangular Input Response for IFLC Figure 7: Square Input Response for IFLC Acknowledgement The authors are very thankful to University Grant Commission, New Delhi for funding this project work and also to MATLAB Inc., USA for providing the software & necessary technical support. References [1] Mohd Fua Ad Rahmat and Mariam Md Ghazaly, Performance Comparison between PID and Fuzzy Logic Controllers in Position Control System of DC Servomotor, Journal Teknologi, 45(D) Dis, 2006-17 @ university Feknologi, Malaysia. [2] www.mathwork.com [3] Erin M Harley and Geoffrey R-Loftus, MATLAB and graphical user interfaces: Tools for experimental management, Behavior Research Methods, Instruments and Computers, 2000, 32(2), 290-296.
Real-Time Angular Position Control of a Faulhaber DC Micromotor Through MATLAB 107 [4] Wahyudi, Abdulghani Albagul, Performance Improvement of Practical Control Method for Positioning System in the Presence of Actuator Saturation, in Proceedings of the 2004 IEEE, Taiwan, Sept 2-4, 2004. [5] Christopher Scharrrer, Trinable Command Recognition for a microprocessor controlled prosthetic Arm, Journal of Microcomputer Applications, 16, 287-292, 1993. [6] G. Muscato, Fuzzy Control of an Under Actuated Robot with a Fuzzy Microcontroller, Elsevier, Microprocessor and Microsystems, 23, (1999), 385-391. [7] Faa-Jeng, Lin, Real-time IP Position Controller Design with Torque Forward Control for PM Synchronous Motor, IEEE Transactions on Industrial Electronics, Vol. 44, No. 3, June 1977, pp. 398-407. [8] Jong Sun Ko and Myung Joong Youn, Simple Robust Position Control of FLDD Motors Using Integral-proportional Plus Fuzzy Logic Controller, PERGAMON Mechatronics, 8(1988), Elsevier Science Limited, 65-82. [9] Paul I-Hai Lin, Santai Hwang and John Chou, Comparison of Fuzzy and PID Controllers for a DC Motor Position Controller, IEEE Industrial Applications Society Annual Meeting, 1994, Vol. 3, pp. 1930-1935, 2-6 Oct, 1994. [10] E. Cox, Fuzzy Fundamentals, IEEE Spectrum, 29(10), 58-61, 1992. [11] Christopher T. Kilian, Modern Control Technology Components and Systems, West Publishing Company, Minneapolis/St, Paul 1, 1996. [12] www.advantech.com [13] www.analog-devices.com [14] www.faulhaber.dc.micro.com [15] Manjunatha Reddy H. K., Immanuel J., Parvathi C.S., Bhaskar P. and Sudheer L.S., Implementation of PID Controller in MATLAB for Real-time DC Motor Speed Control System, Sensors & Transducers, 126(3), March 2011, pp. 110-118. [16] M. Y. Shieh and T.H.S.Li, Implementation of Integrated Fuzzy Logic Controllers for Servomotor System, IEEE Int. Conf. on Fuzzy Systems, 4, 1995, pp. 1755-1762. [17] S.S. Patil, P. Bhaskar and L. Shrimanth Sudheer, Design and Implementation of Precise Angular Position Control System Using Faulhaber DC Micromotor, International Journal of Control Theory and Applications, 2(2) December 2009, pp. 73-83.