PID Voltage Control For DC Motor Using MATLAB Simulink and Arduino Microcontroller
PID Voltage Control For DC Motor Using MATLAB Simulink and Arduino Microcontroller
discussions, stats, and author profiles for this publication at: https://www.researchgate.net/publication/288944297
CITATIONS READS
5 4,332
6 authors, including:
Some of the authors of this publication are also working on these related projects:
EFFECT OF POSTER AND VIDEO INTERVENTION ON THE KNOWLEDGE, ATTITUDE AND PRACTICE (KAP)
LEVEL OF PERSONAL HYGIENE AMONG FOOD HANDLERS IN 24 HOURS MAMAK RESTAURANTS IN SUNGAI
PETANI, KEDAH View project
Trust Aware Recommender System With Distrust In Different Views Of Trusted Users View project
All content following this page was uploaded by Zairi Rizman on 02 January 2016.
ABSTRACT
This paper focuses on the design and implementation of proportional integral derivative (PID) voltage control for
direct current (DC) motor. This controller has been selected due to the ability of the block diagrams that can be
built in the Matrix Laboratory (MATLAB) Simulink. The MATLAB Simulink block will be used as an interface
between the design controller that will be downloaded to the Arduino. The gating signal generation of the Arduino
microcontroller will be observed. This microcontroller is selected due to low cost and easy market availability. DC
motor is a machine that widely used due to excellence speed control for acceleration and deceleration. The PID
controller is employed to control the output voltage of three phase controlled rectifier to run a DC motor. The
modelling, control and simulation of this research has been implemented by using MATLAB Simulink Software
version 2013a. The Pulse Width Modulation (PWM) signals which generated from MATLAB Simulink model
will be burnt into Arduino microcontroller. The Arduino microcontroller board is an interfacing between
MATLAB Simulink model and actual hardware. The PWM signals from Arduino will step up by using a gate
driver and will be sent to power metal oxide semiconductor field effect transistor (MOSFET) gates for triggering
rectifier. The output which produced from this controlled rectifier is in DC form. Simulation analysis of PID
control voltage for the open loop and closed loop were successfully conducted. The results show that the error of
voltage for closed loop is lower compared to the open loop. Furthermore, hardware has been set up to verify the
MATLAB Simulink model.
KEYWORDS: PID, MATLAB Simulink, PWM, Arduino Microcontroller, Voltage Control.
INTRODUCTION
Direct current (DC) motor is a machine that converts electrical energy into mechanical energy. It is a
mechanically commutated electric motor which powered from DC. Two main parts of DC motor are rotor and stator.
Stator is a stationary part while rotor is a rotating part. Nowadays, DC motor plays an important role in research and
laboratory experiments due to its simplicity and low cost. Thus, fine speed control is one of the reasons for the strong
competitive position of DC motors in the modern industrial applications. The speed of the DC motor can be
controlled by changing the voltage applied to the armature (voltage control method) or by changing the field current
(flux control method). The introduction of variable resistance in the armature circuit or field circuit allowed speed
control. Modern DC motors are often controlled by power electronics systems which called DC drives. This research
is to develop proportional integral derivative (PID) voltage control to control the speed of a DC motor.
Problem Statements
DC motor is widely used in speed control systems in industry which needs high control requirement in order to
achieve good production. One of the most common methods to drive a DC motor is by using Pulse Width
Modulation (PWM) signals which respect to the motor input voltage. Manual controller by using a variable resistor
(VR) is also not practical where it can waste time and cost. By varying the applied voltage with a variable resistor,
the speed can be varied from zero to the maximum rotation per minute (RPM) of the motor. Making a controller
Corresponding Author: Nawi Berahim, Department of Mechanical Engineering, Politeknik Sultan Mizan Zainal Abidin,
Dungun, Terengganu, Malaysia, E-mail: [email protected]
166
Berahim et al.,2015
based on a computer can reduce cost and time. The low cost electronic devices can be designed to make a speed
controller system.
Objectives
The objectives of this research are:
i. to develop the PID voltage control for DC motor.
ii. to design three phase rectifier for DC motor.
iii. to design gate driver for three phase rectifier.
iv. to communicate between MATLAB software and Arduino microcontroller.
LITERATURE REVIEW
DC Motor
The DC motors have been popular in the industrial control area for a long time. It has many advantages such as
high start torque characteristic, high response performance and easier to be linear control. The combination of
proportional, integral and derivative control action is called PID control action. PID controllers are commonly used
to regulate the time domain behavior of many different types of dynamic plants. These controllers are extremely
popular where they can usually provide good closed-loop response characteristics [1]. DC motors are capable for
control capabilities which means the speed, torque and even direction of rotation can be changed. It is used in speed
control applications due to its low cost, excellent drive performance and low maintenance. DC motors can also
provide a high starting torque at low speed, and it is possible to obtain speed control over a wide range. The induced
voltage (E) is generated by the rotation of the electrical coil through the fixed flux lines of the permanent magnets.
This voltage is often referred to as the back electromagnetic field (EMF). The following equations are applicable for
all DC motors
(1)
(2)
(3)
where Φ = flux per pole, Ia = armature current, V = armature voltage, Ra = resistance of the armature circuit, ωm =
speed of the motor, T = tork h developed by the motor and Ke = motor constant.
DC motors are seldom used in ordinary applications where all electric supply companies furnish alternating
current (AC). However, for special applications such as in steel mills, mines and electric trains, it is advantageous to
convert AC into DC in order to use DC motors. The reason is that speed/torque characteristics of DC motors are
much more superior to that of AC series-wound, shunt-wound and compound wound. The use of a particular DC
motor depends upon the type of mechanical load that it has to drive [2].
Motors that operate from DC power sources have many applications where speed control is desirable. The most
desirable characteristic of DC motors is their speed control capability. By varying the applied voltage with a rheostat
(variable resistor), speed can be varied from zero to the maximum RPM of the motor [3].
167
J. Appl. Environ. Biol. Sci., 5(9)166-173, 2015
Gate Driver
The basic concepts of circuits and technologies for gate drivers in power converters are focusing on voltage
controlled devices like power MOSFETs. Global trends towards energy efficiency over the last three decades have
facilitated the need for technological advancements in the design and control of power electronic converters for
energy processing. Voltage controlled devices are semiconductors which require a constant voltage drive on the gate
control terminal in order to remain in conduction. The input drive requirements of these devices are substantially
lower than their current driven counterparts, and are the preferred choice in modern power electronics. Two such
devices are the power MOSFET and the insulated-gate bipolar transistor (IGBT) which are forced commutated
switching devices that being fully controlled at the gate terminal under normal operating conditions. Both
MOSFETs and IGBTs require sufficient charge deposited into their gate junctions, whilst maintaining a minimum
gate threshold voltage in order to remain in conduction. When designing a gate driver, it is always important to
understand both static and dynamic behavior of the semiconductor devices used as it aids the effectiveness of the
design for a given gate driver system [5].
METHODOLOGY
This research is to develop PID voltage control for the purpose to control the speed of a DC motor. The main
contribution is the algorithm of PID controller. PID controller will be developed in MATLAB Simulink. An
Arduino board is as an interfacing between MATLAB Simulink and outside world (rectifier, gate driver and DC
motor). This research is divided into two parts that consists of controller development in MATLAB Simulink and
hardware development for verification. The works include designing, modelling, simulation and verification. Three
phase rectifier and gate driver are designed by using Proteus software. Modelling and simulation were conducted by
using MATLAB Simulink software.
168
Berahim et al.,2015
From the block diagram below, three phase rectifier circuit will convert three phase input to DC output for
supplying voltage to DC motor. Six PWM signals from gate driver will be used for triggering gates MOSFETs of
rectifier. The purpose of gate driver is to power up PWM signal that produced from Arduino from 5V to 15V.
Modelling and simulation were done in MATLAB Simulink part. In this motor control system, PID controller was
used using the voltage control technique. The controller will compare the motor voltage with the reference voltage.
If there is an error, the controller will generate the pulse width modulation (PWM) to feed into the three phase
controlled rectifier. This process will continuous until the error nearly zero to give high performance of the DC
motor.
(4)
Figure 3 shows the block of PID in Matlab Simulink. The output of this controller is the summation of
Proportional, Integral and Derivative. The required output of the controller will be getting by adjusting the
proportional, integral and derivative gain. The “three-term” functionalities are highlighted by the following [6].
169
J. Appl. Environ. Biol. Sci., 5(9)166-173, 2015
Experimental Setup
The experimental set up for testing the PID control voltage is shown in Figure 4. This is the integration of three
phase AC source, Arduino Uno microcontroller, gate driver, three phase rectifier, voltage sensor and multi-function
DC motor. Multimeter is used to measure the the voltage output of the rectifier that is fed to the DC motor while
oscilloscope is used to measure and display the waveform of three phase rectifier.
170
Berahim et al.,2015
Time (s)
Figure 6: Output voltage versus time for target voltage 30V for open loop system
171
J. Appl. Environ. Biol. Sci., 5(9)166-173, 2015
Figure 7: MATLAB Simulink Model for closed loop analysis (with feedback)
Voltage (V)
Time (s)
Figure 8: Output voltage versus time for the closed loop controller for target voltage = 30V
172
Berahim et al.,2015
Hardware Analysis
For hardware analysis, the DC output voltage seen from oscilloscope. The waveform is in pulsated DC that
tried to follow the reference set point. For target voltage of 30V, the output voltage from this controlled rectifier is
approximately 29.5V. Due to the high switching frequency, this controlled rectifier still produced pulsating DC.
However, the desired result still can be achieved and quite close to the reference or target set by the user. Table 1
shows the actual output voltages for three target voltages respectively.
CONCLUSION
This project presents the simulation and hardware results to control voltage for DC motor using PID
Controller. The simulation and hardware analysis for open loop and closed loop systems were successfully
conducted. From the simulation for both open loop and closed loops, the actual voltage is close to a reference
voltage with minimum error. An investigation was carried out to test the controller under the comparison of voltage
measured (output voltage) at the DC motor and the reference voltage (target voltage). Based on the results, the error
in closed loop is lower than open loop. For hardware analysis, the value of output voltage is close to the target or
reference. This output DC voltage is lower than the target but controller tries to follow reference signal. The
difference might be due to switching speed of PWM waveforms from Arduino and power MOSFET. The waveform
pattern of this DC output is not pure with slightly ripple.
It can be concluded that the PID controller had been successfully implemented to control output voltage for DC
motor and performance results shows that the PID controller minimized the error. In conclusion, the main objective
of this project to develop PID control voltage in MATLAB Simulink for DC motor is achieved. This PID control
system is quite robust and practical in implementation for achieving target value as required by the user especially
for voltage control.
REFERENCES
1. Singh, A.P., U. Narayan and A. Verma, 2013. Speed Control of DC Motor using PID Controller Based on
MATLAB. Innovative Systems Design and Engineering, 4 (6): 22-28.
2. Joseph J. Carr, 1996. Elements of electronic instrumentation and measurement. Pearson College Division.
3. Aras, M.S.M., S.N.B.S. Salim, E.C.S. Hoo and M.H. Hairi, 2009. Comparison Of Fuzzy Control Rules using
MATLAB Toolbox and Simulink for DC Induction Motor-Speed Control. IEEE International Conference of Soft
Computing and Pattern Recognition, pp. 711-715.
4. Juan W. Dixon, 2007. Power electronics handbook: Three-phase controlled rectifiers. Academic Press.
5. Rashid, M. H. (2014). Power electronics handbook: Devices, circuits and applications. Academic Press.
6. Ang, K.H., G. Chong and Y. Li, 2005. PID Control System Analysis, Design and Technology. IEEE Transactions
on Control Systems Technology, 13 (4): 559-576.
173