Abstract
This paper describes the development process of a permanent magnetic direct current (PMDC) motor prototype in details. The designed prototype is used for speed control purposes. The developed model is intended to have two types of inputs: one is analog input which accepts variable direct voltage for system identification purpose, and the other is the pulse width modulation input, which can be used to interface with the outside world such as microcontrollers or programmable logic controllers. A microprocessor (with 8 bit resolution and a high performance RISC CPU) acts as a core of the module as it accepts the inputs and accordingly provides the output. An IR sensor acts as feedback sensor and provides pulses to the microprocessor which performs frequency to voltage (F/V) converting function and gives a variable output direct voltage as the speed of the motor varies. The actuator is a permanent magnetic direct current motor driven using metal oxide semiconductor field effect transistor based driving circuit. A four stages magnetic load mechanism is attached to the motor shaft. For test experiment, an ARDUINO MEGA MATLAB SIMULINK support package-based module is developed to provide the inputs and measure the outputs, then open loop test, system identification and PI controller design are carried out and satisfying results are obtained. Illustrating the detailed procedure and the step by step work of the design process of the PMDC motor prototype is the main contribution of current work.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
Developing a prototype of a PMDC motor makes the control process easier. Due to their efficiency, low cost and simplicity, DC motors are considered as valuable component in many areas of research, laboratory experiments and industrial applications [1]. Many industrial applications are expected from PMDCs due to their big thrust force, high speed and high precision [2,3,4,5]. Ease of controller design and implementation makes DC motors preferable over AC motors [6]. Permanent Magnetic DC (PMDC) motors are small in size and do not have exiting circuit resulting in copper loss reduction. PMDC motors have several applications including, but not limited to, drives in computer, toy industries, automobiles, drilling machines and robotics [7,8,9]. The possibility of developing universal motor drives is enabled by digital current regulation and used software control technologies.
1.1 Related work
Research work includes a variety of methods for using PMDC motors in control systems for speed control, and for this purpose, a computer controlled simulator is designed [10] for real time experiments. To design appropriate controller of a given motor, precise parameters estimation is required, both standard and dynamic particle swarm optimization (PSO), ant colony optimization (ACO), and artificial bee colony (ABC) are used in order to estimate PMDC motor parameters [5]. Direct measurements of armature current, voltage and rotor speed are used to identify the PMDC parameters [6]. A Multi-Objective Optimization (EMOO) algorithm to tune the Proportional Integral (PI) speed regulator in the Permanent Magnet DC (PMDC) motor drive system is used [11]. A fuzzy logic speed controller is employed to a PMDC motor [12]. In some control strategies the mathematical model of the system is not required [13]. The PIC16F877 microcontroller is used to implement the controller algorithm [14], and a similar microcontroller is used for computer communication purpose. From previous mentioned related work and as per our knowledge, there is no detail explanation regarding the used PMDC motor prototype which is used as an actuator in this work. Another important point is that: either the work includes PMDC parameters estimation or PMDC motor speed controller design. This motivates us to carry out an integrated work. Current work includes integrated procedure starting with detailed explanation of developing a speed control prototype for a PMDC motor then performing its open loop test, system identification and finally PI speed controller design. A microprocessor (with 8 bit resolution and high performance RISC CPU) based control circuit is designed to receive two types of input signals, i.e. either analog input or pulse width modulation (PWM) input and accordingly gives an analog output in terms of DC voltage through programmed frequency to voltage (F/V) converter. The PIC16F876SP microcontroller is the brain of the previous mentioned circuit, it is programmed in such a way to convert the frequency of coming pulses from the IR sensor to analog DC voltage. This developed prototype enables the process of system identification of the PMDC motor to be easier and makes controller algorithm implementation to be simpler and more efficient.
2 Proposed block diagram of the developed module
Figure 1 illustrates the block diagram of the designed PMDC motor prototype. Front panel acts as the user interface through which the user can give input or take output to/from the PMDC motor. The input is of two types either analog input in the range of 0–4.5 VDC or pulse width modulation (PWM) input, for this case the real front panel is provided with a switch enables the user to select the input type. If the user selects analog input, then he can vary the input voltage in the previous mentioned rang by using a potentiometer provided in the real front panel, also. Selecting analog input operating situation gives the input voltage to the PIC 16F876SP microcontroller which in its turn converting the analog input to a pulse width modulation signal programmatically. In the case the user selects pulse width modulation input (PWM) operating situation, then the PIC 16F876SP microcontroller gives a logic high (or 1) to an AND gate with two inputs where the other input is the pulse width modulation (PWM) signal from the front panel itself. However, in both cases, i.e. analog input or pulse width modulation input (PWM) the resulted pulse width modulation (PWM) signals will be provided to the gate pin of the IRF 1540 MOSFET transistor, taking into consideration two important points: (1) giving a logic one of an AND gate with any other input will result the other input only as output of this gate, (2) the mentioned MOSFET transistor will accordingly convert the pule width modulation (PWM) signals having range of 0–4.5 VDC on its gate to PWM signals that applied to the PMDC motor armature in the range 0–12 VDC.
Once the PMDC motor starts rotating the IR sensor takes the task of providing the pulses as an input to the PIC 16F876SP microcontroller then the microcontroller performs an important function of converting the frequency of coming pulses into an analog output in the range of 0–4 VDC, so in this case the microcontroller acts as a frequency to voltage (F/V) converter.
From this PMDC motor prototype developed module, the user has a benefit of the possibility of interfacing any other microprocessor (or microcontroller) or programmable logic controller (PLC) with this module and a benefit of measuring the speed of the PMDC motor by that PIC or PLC by simply making calculation of scale speed from the resulted output analog voltage. Figure 2 shows the real front panel of the described PMDC motor prototype module.
Additional components can be recognized from the figure of the real front panel such as ON/OFF switch which used to connect or disconnect the power to the module. And a fuse which will protect the module from any dangerous situation such as high current consumption in the case of short circuit for example. Reference analog input pins are used to supply a voltage of value 4.5 VDC to the analog input pins and with the help of a potentiometer, this analog input can vary between 0 and 4.5 VDC. In addition to that there are two LEDs, the red one is used to indicate the power ON, and the green one is used to indicate the PWM input mode.
3 PMDC motor prototype design: development procedure
Development procedure includes: main circuit design, feedback mechanism design, and magnetic load mechanism design. The PMDC motor kit has the following specification: the speed range is between 0 and 1500 RPM, the input Voltage is between 0 and 12 VDC, and the input current is 1.5 Amp. All mechanical parts are mounted on the top of a metal box and the electrical circuit is fixed inside this box. This will ensure a stable work of the designed prototype. The following paragraphs explain in details the work procedure to integrate them together to come out with the prototype kit.
3.1 Main circuit design
This stage of the work includes the procedure of simulation test of the proposed block diagram using PROTUS program where the code of the PIC 16F876SP microcontroller is written in BASCOM software and the resulted (.exe) file is uploaded inside the microcontroller in PROTUS program. Once satisfying simulation results are obtained the procedure of real circuit design takes place. Figure 3 shows the fabricated real circuit which gives the intelligence to the developed prototype as the PIC 16F876SP microcontroller acts as a core of this smart circuit.
This fabricated circuit is connected with the previous mentioned real front panel from one side and with the IR sensor from the top side. Figure 4 illustrates its connections with the real front panel from inside.
There is a bulky transformer as shown from Fig. 4. It is used to get a 12 VDC from 220 VDC and can provide up to 3 VDC after rectifying. That means the real circuit receives 12 VDC from the secondary coil of the transformer and then rectifying it to get two values in terms of VDC. One value is 5 VDC, this value is used to power the microcontroller side, and the other value is 12 VDC which is used to power the PMDC motor through the MOSFET source pin.
3.2 Feedback mechanism design
The PMDC motor shaft is elongated to be occupied with two mechanisms, one mechanism is the load mechanism (will be explained in the next section), and the other one is the feedback mechanism. A/U/shape IR sensor, with infrared light source from one side and an infrared light detector from the other side, is fixed to allow a slotted disk, with 12 holes, mounted on the shaft to run freely. This will result in 12 pulses per one full rotation to be provided to the microcontroller side which will take the task of F/V converter. Figure 5 depicts the designed feedback mechanism.
3.3 Magnetic load mechanism design
A circular metal plate is mounted on the PMDC shaft as shown in Fig. 6. Circular to linear motion conversion function is developed and fixed on the top of the box; variable number of magnetic pieces can be put in a rectangular metal plate that can be moved linearly opposite of previous mentioned circular metal plate. As the circular metal plate is rotated along with PMDC motor shaft rotation and the rectangular metal plate is moved in a linear way, once the rectangular metal plate reaches against the circular one the magnetic load is applied to the PMDC motor shaft. This load is proportional to the magnetic piece number which fixed on the rectangular plate. This is considered as a kind of speed disturbance and will cause speed reduction of the PMDC motor shaft.
Four load stages are recognized with the above mentioned load mechanism and they are illustrated in Fig. 7. A load stage is nothing but one magnet piece in front of the rotating metal plate which is fixed to the motor shaft, i.e. as the number of the magnetic pieces increase, another load stage comes into consideration.
Each load stage will cause a reduced speed of nearly 150 RPM as it is shown in graphical view (Fig. 8).
4 Test procedure for the designed PMDC motor prototype
The experimental setup is shown in Fig. 9. The Arduino Mega development board is used after installing its MATLAB support package. This board will read the analog output of the designed prototype and it will provide the PWM signal to it.
4.1 Open loop test
As the main goal of the developed prototype is to control the speed of the PMDC motor, it is helpful to find a methodology in such way that enable the user to give an input speed as a command to the PMDC motor and obtain its output speed. However, this designed module accepts inputs in terms of volts, i.e. 0–4.5 VDC and gives a response in terms of volts, i.e. 0–4 VDC also. In order to give an input in terms of speed, one important term is to be derived. This term is the process gain. The process gain is the ratio between the input voltage and the resulted output speed. If the process gain is known then the user will be able to provide an input speed to the PMDC motor. The output speed can be calculated simply by scaling the output voltage: the PMDC motor speed is between 0 and 1500 RPM for output volt between 0 and 4 VDC. For this purpose and with the help of MATLAB SIMULINK and ARDUINO support package for MATLAB SIMULINK, Table 1 is developed after interfacing the Designed PMDC motor Prototype with MATLAB program using ARDUINO mega board. Now the process gain can be computed and it is equal to 0.0028.
The open loop circuit (as shown in Fig. 10) is developed in MATLAB SIMULINK, in this circuit: R (t): reference speed, U (t): input volt, and X (t): Output speed.
Figure 11 shows the open loop output speed of the PMDC motor. This is obtained by providing the input speed followed by the process gain and measuring the output speed by scaling the output voltage.
5 System identification and pi speed controller design
A Pseudo Random Binary Sequence (PRBS) test [15, 16] is used for the system identification process, and this will insure that: the obtained mathematical model of the PMDC motor is a result of random sets of PWM signals applied to the motor armature. During the operation conditions of the motor, it is expected to work with different speed trajectors and in other situations the load disturbance is to be rejected, for those work conditions the PWM signals applied on the motor armature will not be contant and they vary randomly. So the following input signals (as shown in Fig. 12) are applied by using PRBS signals generated in a developed matlab Simulink model and the resulted output signals are captured.
The input PWM signals are given to the motor with the help of ARDUINO support package from MATLAB and the output is obtained using analog read block. Input and output data are imported to the system identification tool, then the following transfer function is obtained by using sampling time equal to 0.001 s:
Then one of the performance indices, i.e. Integral Absolute Error (IAE) [16, 17] is used as an objective function of an optimization tuning algorithm for the PI speed controller design using MATLAB Optimization Tools. The Integral Absolute Error performance index is selected because it results the minimum error area. IAE is given mathematically by the following equation:
The reason of using PI controller instead of PID controller is that: on each evaluation of the objective function, the performance index is calculated based on the multiple-application Simpson’s 1/3 rule [18], which basically intended to calculate the integration numerically, so when the derivative term is included during the tuning procedure its value was negligible and therefore its effect on the motor speed. The equation of the PI controller is:
where kP: is the proportional gain and kI: is the integral gain. Equation (3) can be written in equivalent form as:
where
and
where kc and ti are the proportional gain and the integral time constant respectively. The following circuit diagram shown in Fig. 13 developed in MATLAB SIMULINK, it includes the PI controller along with the PMDC motor.
The resulted proportional gain and integral time constant are kC = 0.1587, ti = 0.0037, respectively, i.e. kP = 1.1587 and kI = 42.8. Both disturbance rejection and set point tracking of a designed PI speed controller are shown in Fig. 14.
Both proportional gain kP and integral gain kI reduce the rise time of the motor speed response. However the integral gain kI keeps the motor speed to follow the new speed trajectory fastly. If the derivative term is included the overshoot will be reduced. For simulation test (Fig. 14), A set point equal to 900 RPM is given to the PMDC motor, then this reference speed is changed to become 1100 RPM at simulation time 5 s and the PMDC motor follows the new speed, after that the reference speed is changed to become 1300 RPM at simulation time equal to 10 s and the controller forces the motor model to run at the new speed. At simulation time equal to 21 s a positive disturbance is applied and the controller rejects this disturbance and comes back to the required speed, then a negative load is applied at simulation time equal to 24 s and the controller makes the motor model to return back to the required speed.
For practical (real time) test (Fig. 15), same above mentioned test sequence is applied practically to check the ability of the designed PI speed controller to make the PMDC motor to track the preferred speed and to reject any disturbance its shaft. Figure 14 shows the practical (real time) response of the designed PI speed controller.
Controller response characteristics are illustrated in Table 2, where RT, ST, OSH and IAE are Rise time, Settling time, Overshoot and Integral Absolute Error performance index, respectively. The unit of Rise time and Settling time is in milliseconds (ms). As the simulation test tends to give ideal response, it is a normal situation to obtain the difference between simulation and real time results. The practical (real time) response is near to simulation response and, from Fig. 15, the controller behavior is acceptable.
6 Conclusion
A detailed explanation of a developed PMDC motor prototype is carried out through this paper. An open loop test, system identification and PI speed controller design are performed to ensure that the designed prototype is working properly and satisfying results are obtained. A PBRS test is used for system identification procedure as it gives the real behavior of the PMDC motor under different working conditions. An optimal controller tuning is performed based on the multiple-application Simpson’s 1/3 rule by using the Integral Absolute Error (IAE) performance index as an objective function of the tuning algorithm. Controller response characteristics for both simulation and real time tests are recorded and reseanable results are obtained. In simulation test, the characteristics is in its ideal case, i.e. smaller values of the characteristics are obtained. However, a larger characteristics values are resulted from real time test and this is expected and reasonable with the physical world. The developed prototype can be used for further research purposes. Multiple numbers of this developed prototype can be used for doing research related to industrial applications such as distributed motion control or any other aspects of the industry. Newly growing technologies such as Industrial Internet of things (IIoT) can be integrated with the industrial research included a multiple number of the PMDC motor prototypes.
References
Angalaeswari S, Kumar A, Kumar D, Bhadoriya S (2016) Speed control of permanent magnet (PM) DC motor using Arduino and LabVIEW. In: IEEE international conference on computational intelligence and computing research. 978-1-5090-0612
Zhang D, Chen Y, Tom KC et al (2007) Compensation scheme of position angle errors of permanent-magnet linear motors. IEEE Trans Magn 43(10):3868–3871
Tan KK, Lee TH, Dou HF, Chin SJ, Zhao S (2003) Precision motion control with disturbance observer for pulse width-modulated driven permanent-magnet linear motors. IEEE Trans Magn 3:1813–1818
Otten G, de Vries TJA, van Amerongen J, Rankers AM, Gaal EW (1997) Linear motor motion control using a learning feed forward controller. IEEE/ASME Trans Mechatron 2(3):179–187
Sankardoss V, Geethanjali P (2017) PMDC motor parameters estimation using bio-inspired optimization algorithms. IEEE Access 5:11244–11254
Salah M, Abdelatif M (2010) Parameters identification of a permanent magnet DC motor. Conference paper. https://doi.org/10.2316/p.2010.675-085
Sharaf M, El-Gammal A (2011) Multi-objective PSO/GA optimization control strategies for energy efficient PMDC motor drives. Eur Trans Electr Syst 1:1. https://doi.org/10.1002/etep.543
Ng KH, Yeong CF, Husain AR (2012) Current sensorless control of a PMDC motor using Kalman filter and cascaded PID controller. In: 4th International conference on intelligent and advanced systems (ICIAS2012), pp 507–512. 978-1-4577-1967-7/12/IEEE
Sharaf AM, Okumus HI (2007) A switched mode simulation model for a PMDC motor scheme controlled by predictive dynamic controller, pp 1711–1715. 1-4244-0743-5/07/IEEE
Altas IH, Aydar H (2008) A real-time computer controlled simulator: for control systems. Comput Appl Eng Educ 16(2):115–126
Kumar CA (2011) Multi-objective PI controller design with an application to speed control of permanent magnet DC motor drives. IEEE, no. ICSCCN, pp 424–429
Eminoglu I, Altas IH (1998) The effects of the number of rules on the output of a fuzzy logic controller employed to a PM D.C. motor. Comput Electr Eng 24:245–261
Erenturk K (2005) MATLAB-based GUIs for fuzzy logic controller design and applications to PMDC motor and AVR control. Comput Appl Eng Educ 13:10–25. https://doi.org/10.1002/cae.20026
Isık A, Eker MK (2009) PMDC motor speed control with fuzzy logic algorithm using PIC16F877 micro controller and plotting data on monitor. 9781-4244-3428-2/09/IEEE
H. J. Vermeulen and J. M. Strauss (1999) Off-line identification of an open-loop automatic voltage regulator using pseudo-random binary sequence perturbations. IEEE, 0-7803-5546-6/99/, pp.799-802
Wasim S et al (2018) Microprocessor based permanent magnetic DC motor system identification and optimal PI controller design. In: Proceedings of the 12th INDIACom, IEEE conference ID: 42835, pp 1020–1026
Martins FG (2000) Tuning PID controllers using the ITAE criterion. Int J Eng Educ 21(5):867–873
Chapram SC, Canale RP (2015) Numerical methods for engineers, 7th edn. McGraw-Hill Education, New York, NY
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of interest
On behalf of all authors, the corresponding author states that there is no conflict of interest.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
About this article
Cite this article
Ghder Soliman, W., Rama Koti Reddy, D.V. Microprocessor based prototype design of a PMDC motor with its system identification and PI controller design. SN Appl. Sci. 1, 549 (2019). https://doi.org/10.1007/s42452-019-0579-0
Received:
Accepted:
Published:
DOI: https://doi.org/10.1007/s42452-019-0579-0