DC Motor Control Predictive Models

DC motor speed and position controls are fundamental in vehicles in general and robotics in particular. This study presents a mathematical model for correlating the interactions of some DC motor control parameters such as duty cycle, terminal voltage, frequency and load on some responses such as output current, voltage and speed by means of response surface methodology. For this exercise, a fivelevel full factorial design was chosen for experimentation using a peripheral interface controller (PIC)based universal pulse width modulation (PWM) H-Bridge motor controller built in-house. The significance of the mathematical model developed was ascertained using regression analysis method. The results obtained show that the mathematical models are useful not only for predicting optimum DC motor parameters for achieving the desired quality but for speed and position optimization. Using the optimal combination of these parameters is useful in minimizing the power consumption and realization of the optimal speed and invariably position control of DC motor operations.


INTRODUCTION
Response surface methodology (RSM) is a technique for determining and representing the cause and effect relationship between true mean responses and input control variables influencing the responses as a two or three-dimensional hyper surface. The steps involved in RSM technique [1] are as follows: (i) designing of a set of experiments for adequate and reliable measurement of the true mean response of interest, (ii) determination of mathematical model with best fits, (iii) finding the optimum set of experimental factors that produces maximum or minimum value of response and (iv) representing the direct and interactive effects of process variables on the best parameters through two dimensional and three dimensional graphs. The accuracy and effectiveness of an experimental program depends on careful planning and execution of the experimental procedure [2] .
A number of researchers have applied RSM to manufacturing environments. Some very useful work reported in the literature include, the investigation of controlled electrochemical machining using the response surface methodology based approach [1] ; application of RSM to the submerged arc welding [2] . For example, in submerged arc welding of pipes of various wall thicknesses, a common problem faced in industry is the selection of suitable values for the process parameters to the required bead geometry and quality, especially the bead penetration, reinforcement, bead width and dilution. The study deals with the application of RSM in developing mathematical models and plotting contour graphs relating important input variables. Another very interesting work reported in the literature is the one that describes an accuracy model for the peripheral milling of aluminum alloys using RSM. Readers interested in the details of the mechanics of response surface methodology may consult an excellent book in the area [3] .
To date, the authors are not aware of the application of RSM to the study of the influences of various DC motor control input parameters such as duty cycle, terminal voltage, frequency and load on the DC motor output current, voltage and speed. In this article, we present the work done in developing a mathematical model for correlating the interactive and higher order influences of various DC motor controller input parameters such as duty cycle, terminal voltage, frequency and load on the DC motor output current, voltage and speed using RSM.
Experimental setup for speed controller: In this experiment a laptop running the Peripheral Interface Controller (PIC) C ™ software was used to program the PIC16F877 bootloader board, which allowed the control frequency and duty cycle of the universal pulse width modulation (PWM) H-Bridge motor controller to be varied. A digital oscilloscope was used to verify the PWM signal generated by the PIC16F877 bootloader board. Power to the DM08GN motor was supplied using a 5-20V, 20A variable power supply and the motor was loaded with weights which were hooked on to a cable tied to a metal sleeve firmly locked on to the shaft of the motor as shown in Fig. 1. The motor current and voltage were measured using two Fluke multi meters and the motor speed was measured using a hand held tachometer.

Fig. 1: Experimental set-up
Response surface methodology: As already mentioned, RSM is the procedure for determining the relationship between various parameters with the various machining criteria and exploring the effect of these process parameters on the coupled responses [3] . The relationship between the DC motor control parameters and the responses is given as The observed response i ŷ as a function of the duty cycle, terminal voltage, load and frequency can be written as where ε is a random error. The first-order model, and second-order model, are generally utilized in RSM problems [4][5][6][7] . The β parameters of the polynomials are estimated by the method of least squares. Equations (3) or (4) can be written in the form of matrix as The normal equations can be written as where β is replaced by b matrix. In the case where ( ) x x T is non-singular, the solution of the normal equations can be written as where T x is the transpose of the matrix x and The details of this solution by this matrix method are fully explained in [8,9] .
The x matrix for fitting the model is Experimental design: The levels of independent variables and coding identifications used in the design of experiment for the speed controller are presented in Table 1. Table 2 shows the experimental conditions for the speed controller. The transforming equations for each of the independent variables are:  Predictive model for current, I: Table 3 shows the results for the speed controller for both clockwise and anticlockwise direction for current output responses.
Model for current for clockwise rotation: Based on the experimental results of Table 3, the first-order current equation for clockwise rotation is given by  The model for the current for clockwise rotation of equation (11) can be transformed using equation (10) into the following form: The model for speed controller current during clockwise rotation shows that voltage is the most significant input variable to the speed controller, while mass has relatively small effect. The output voltage drops slightly as both the duty cycle and frequency are increased.
A second-order model current for clockwise rotation was postulated to extend the variables range in obtaining the relationship between the response and the controller independent variables. The second-order model for current is given by Model for current for counter clockwise rotation: Based on the experimental results of Table 3, the firstorder current equation for counter-clockwise rotation is given by Current model for counter-clockwise rotation of equation (14) can be transformed using equation (10) into the following form: The model for speed controller current during counter-clockwise rotation shows that voltage is the most significant input variable to the speed controller, while mass has relatively small effect. The output voltage drops slightly as both the duty cycle and frequency are increased.
A second-order model was postulated to extend the variables range in obtaining the relationship between the response and the controller independent variables. The second-order model is given by   Table 4 shows the results for the speed controller for both clockwise and anticlockwise direction for voltage output responses.
Model for voltage for clockwise rotation: Based on the experimental results of Table 4, the first-order voltage equation for clockwise rotation is given by The model for voltage for clockwise rotation of equation (17) can be transformed using equation (10) into the following form: A second-order model for clockwise rotation was postulated to extend the variables range in obtaining the relationship between the response and the controller independent variables. The second-order model is given by Model for voltage for counter clockwise rotation: Based on the experimental results of Table 4, the firstorder voltage equation for counter-clockwise rotation is given by The model for voltage for counter-clockwise rotation of equation (20) can be transformed using equation (10) into the following form:      The model for speed controller voltage during counter-clockwise rotation shows that duty cycle is the most significant input variable to the speed controller, while duty voltage follows very closely. The output voltage drops slightly as mass is increased but increases slightly as frequency is increased.
The statistical analysis using log approach shows that the mean of the voltage measurements for clockwise and anti-clockwise measurements are 8.5739 volts and 8.6016 volts, respectively. The errors for clockwise and anti-clockwise measurements are 0.2202 and 0.1276, respectively. The variance or MSE for clockwise and anti-clockwise measurements are 0.1210 and 0.0249, respectively, while the standard deviations for anti-clockwise measurements are 0.3478 and 0.1577, respectively.
Predictive model for speed, N: Table 5 shows the results for the speed controller for both clockwise and anticlockwise direction for speed output responses.
Model for speed for clockwise rotation: Based on the experimental results of Table 5, the first-order speed equation for clockwise rotation is given by (24) The model for speed controller current during clockwise rotation shows that voltage is the most significant input variable to the speed controller, while mass has relatively small effect. The output voltage drops slightly as both the duty cycle and frequency are increased.
A second-order model speed for clockwise rotation was postulated to extend the variables range in obtaining the relationship between the response and the controller independent variables. The second-order model for speed is given by Model for speed for counter clockwise rotation: Based on the experimental results of Table 5, the firstorder speed equation for counter-clockwise rotation is given by A second-order model was postulated to extend the variables range in obtaining the relationship between the response and the controller independent variables. The second-order model is given by The statistical analysis using log approach shows that the mean of the speed measurements for clockwise and anti-clockwise measurements are 29.9379 rpm 31.6921 rpm, respectively. The errors for clockwise and anti-clockwise measurements are 1.5986 and 1.6115, respectively. The variance or MSE for clockwise and anti-clockwise measurements are 6.5554 and 8.0945, respectively, while the standard deviations for clockwise and anti-clockwise measurements are 2.5603 and 2.8451, respectively.
Analysis of results based on developed mathematical models Parametric influence on Current criteria (clockwise rotation): The graph of current against duty cycle, for varying frequencies, shown in Fig. 2 indicates that for any particular frequency, the current reduces appreciably as duty cycle increases. However, as the frequency increases, the current values decrease across all duty cycle levels. The graph of current against input voltage, for varying loads, shown in Fig. 3 indicates that for any particular load, the current does not increase significantly as input voltage increases. However, as the frequency increases, the current values increase across all load levels, but not very significantly.
Parametric influence on Voltage criteria (clockwise rotation): The graph of voltage against duty cycle, for varying frequencies, shown in Fig. 4 indicates that for any particular frequency, the voltage increases quite significantly as duty cycle increases. However, as the frequency increases, the voltage values increase but not significantly across all frequency levels.
The graph of voltage against load, for varying frequencies, shown in Fig. 5 indicates that for any particular frequency, the voltage increases slightly as load increases. However, as the frequency increases, the voltage values decrease across all duty cycle levels.
Parametric influence on Speed criteria (clockwise rotation: The graph of rotation speed against duty cycle, for varying frequencies, shown in Fig. 6 indicates that for any particular frequency, the rotational speed increases significantly as duty cycle increases. However, as the frequency increases, the rotational speed values increase only slightly across all duty cycle levels. This parametric influence is most significant in the research carried out, because rotation (and linear) speed control of a DC motor is normally efficiently achieved via changing the values of the duty cycle. For the implementation of the speed control in hardware, the value of frequency was chosen to be 0.5 kHz, which as could be seen is almost as good as when the frequency is significantly increased to 20 kHz.
The graph of rotation speed against load, for varying frequencies, shown in Fig. 7 indicates that for any particular frequency, the rotational speed decreases significantly as load increases. However, as the frequency increases, the rotational speed values increase only slightly across all duty cycle levels.

CONCLUSION
In this article, the results of extensive experimentation carried out to investigate the influence of four input variables on three output variable have been presented. The output variables in turn have been considered for two operational conditions, namely, clockwise and anticlockwise rotations of the DC motor being investigated, resulting in six responses.
In general, for a DC motor controller, the current that the motor draws reduces appreciably as duty cycle increases.
Observation shows that the motor voltage increases quite significantly as duty cycle increases. Moreover, the motor voltage increases slightly as load increases.
An obvious observation is that rotational speed of the DC motor increases significantly as duty cycle increases. This parametric influence is most significant in the research carried out, because rotation (and linear) speed control of a DC motor is normally efficiently achieved via changing the values of the duty cycle. For the implementation of the speed control in hardware, the value of frequency was chosen to be 0.5 kHz.