Title | Microcontr�ller Performance for DC Motor Speed Control System |
---|---|
Author | Jadhav Sushmita |
Pages | 7 |
File Size | 2.6 MB |
File Type | |
Total Downloads | 203 |
Total Views | 290 |
National Power a nd Energy Conference (PECon) 2003 Proceedings, Bangi, Malaysia 104 Microcontr� ller Performance for DC Motor Speed Control System y. S. E. Ali, S. B. M. Noor, S. M. Uashi and M. K Hassan A bstrat-The electric drive systems used In Industrial for the co ntrol of d c drives. uta, el.a...
Accelerat ing t he world's research.
Microcontr�ller Performance for DC Motor Speed Control System jadhav sushmita
Related papers
Download a PDF Pack of t he best relat ed papers
At mel_ AVR_ Microcont roller_ Primer_ Programming_ and_ Int erfacing Ali Zabih Allah poor MICROCONT ROLLER BASED OPEN-LOOP SPEED CONT ROL SYST EM FOR DC MOT OR Majid Hussain Speed Cont rol of BLDC Mot or Using DSPIC30F4011 Processor IJSRP Journal
National Power a nd Energy Conference (PECon) 2003 Proceedings, Bangi, Malaysia
104
Microcontr� ller Performance for DC Motor Speed Control System y. S. E. Ali, S. B. M. Noor, S. M. Uashi and M. K Hassan
A bstrat-The electric drive systems used In Industrial
for the
co ntrol
performance and reliability requirements. The de 1I10tor Is 111 attractive piece of equipment In many Industrial 8111111c8110n5
control
algor i thms
appllutlons
are
Increasingly
requIred
to
meet
hIgher
requiring varIable speed and load characteristics due to Its ease
of controllability. Mlcrocontrollers provide a suitable means of meeting these needs. Cetainly , pat of the recent activity on mlcrocontrolles tan be ascribed to their newness and challenge. (n this paper, Implementation of the MC68HClI E9 mh:rotontroUer for speed control of de motor fed by a de chopper has been Investigated. The chopper Is driven by \ high
'rrequenty
PWM
sIgnal. Controlling the
PWM
duty eyele Is
equivalent to controlling the motor termin a l voltaRe, which In
turn adJush directly the motor speed. ExperImental resnlts have
been
obtained
that
show
the
employment
of
mlcrocontroller for speed control Bnd over current protection
of a de motor.
Kywords-de
motor
drives,
Mltrocontroller,
Speed
utilized the
are stored and
implemented by the
microprocc�sot of the microcomputer. The system employs the use ofa Thyristor, which is controlled using the sotware
imp le mented on the microcomputer.
The lise of stand-alone microcontroller for the speed contr ol
of dc motor is past gaining ground. Nicolai and Castagnet [5] have shown in t heir paper how a mi cro controller can be used for sp e ed control. The operatio n of the system can be summarized as: the drive fom a
rectiied voltage, it consists
of chopper driven by a PWM signal generated from a microconroller unit (MCU). The motor voltage control is
achieved by measurin g the rectiied mains voltage with the analog to digi t al converter pre sent on the mi crocontroller and adjusting the PWM signal d uty cy cle accordingly �
is reported brief d es c rip tion of
Another system tha t uses a microprocessor
in the work of Khoel and H adid i (6} a
the system is as follows: The microprocessor computes the
1. INTRODUCTION the use of power e lecronics for the control of ele ctric
machines ofers not only better performance c aused by
precise conrol and fast response, but also maintenance, a�d ease of implementation. In parallel with the advance In power elecronic there have been greM advances in microcontroller-based control systems due to the microcontroller flexibility and versatility. This is because al l the control algorituns are implemented in the sotware. [I] For the continuous control system, the commonly used optimum design approach is usually based on frequency response or zeroes-poles pl acement [2,3]' H owever the relationship between the specifications in the frequency doain and that in the time . domain is not straightforward, and som etimes is hard to be pred icted. Adjustable speed ives may be operated over a wide range by conrolling amature or ield excitation. Speeds below rated by armaure voltage control and above rated using field excitation variation, development of various so li d stale ,
sitching devices in the fom of diodes, transistor and
thristo r along with various an alog/d igital chips used in iring/controlling circuits, have made dc drives �ore
l
c o nro
. in i nnumerable areas of apphcahons
A re asonable number of w orks have been found in the literaure, regarding the employment of solid- state devices Y. S. E. Ali. S. B.
Depatment of
[4]
.
control.
accessible for [3].
of d c drives. uta, el.at
microcomputer 10 conlrol the speed of a dc motor. The
M. Nor, S. M. \.,hi and M. K. It""n arc with and Electronic Engineering, Faculty of
Electrical
Engineering Univcsili Pua Malaysia. 43400 UPM Serdang. Selangor. Malaysia (E�all: [email protected], [email protected])
O-?803-8208-0f03/$17.00 ©Z003 IEEE.
actu al speed
of the motor by sensing the
teminal voltage the
and the current, it then compares the acual speed of
motor with the reference speed and generates a suitable
control signal which is fed into the triggering unit. This unit
drives a H-bridge P ower MOSFET amplifier, which in un sup plies a PWM voltage to the dc molor. The objective of this paper is to explore the approach of designing a microcontroller�based closed loop controller. The inte rfa ce circuit and the soware are all designed to achieve a better performance. The system is designed with a
curent flow monitor
that can protect the dc motor from high cutrents due to ov erload ing. he microco ntrol l er system is equipped wi th an LCD display and a kepad and sotware was written to monitor
the registers on the LCD and read commands from the kepad. Thus, by using the u ser interface module (UIM) the operator can view andlor change all the control and monitori ng variables of the controller program.
105
II.
HARDWARE DESIGN
Fig. I shows the schematic diagram of the
automatic speed control system of the de
"
M�sur:d Current lOnVfA
G8HCIIE9
0-220
0-20V Oplinl CUplr
PA5
complet e
motor.
nov
20V
DC SOURCE
CURRENT
PE4
C M',
" OIlp:r
l
OPTO-COUPLER ISOLATION
PAG
SENSOR
'urreni Sensor
Mesured S-�d
Fig. I. Block diagram of automatic speed control system. The 68HClIE9 microeontroller implements the coiltrol
algoritlm1 by conditioning the spe ed and current signals and
perfO1l1S the spee d regulation according to speed reference
Fig. 2. DC motor control hardware block .
fed through the kepad. The software includes a routine to
read the motor current and sends emergency shutdown signal to protect the dc motor from over current, also this
signal can be activated manually by inserting a designated character by the keypad, which causes a software interrupt
and executes the emergency shutdown routine.
and
curre n t
interface. Changing the teninal voltage by means of dc,to
de
The hardware control system includes the dc shunt moto r, power circuit, MC68HCII E9 microcontroller, speed
sensor (shaft,encoder),
The hardware of the microcontroller includes mainly
the MC68HCIIE9 system with LCD and keypad for user
sensor. The system
c hopper
hardware block diagram is shown in Fig. 2.
The conventional dig i tal pro po rtio n MCU technique
and the pulse width modulation (PWM) technique are adopted in dc motor control system. An optical
e ncoder
was
used to measure the speed of the motor. The output of the encoder is a stream of pulses with variable' frequency
according to the speed of the motor. The resolution of the encoder in this work was 500PPR.
current
s ensor .
s ignal
to
It se n ses the current and feeds the
microcontroller.
circuit)
Ill.
Port
PE4
of
that is controlled by the
The
SOFTWAE DESIGN
M68HCl lmicrocontrolier
(MCU)
can
control
speed of a DC motor accurately with minimum hardware at
low cost. The flow chart shown in Fig. 3 describes the main
program. The program is written using assembly. It can be divided into three main parts. The initialization is the
beginning of the software to
The current sensing was accomplished by using Hall
effect current
(the powe r
microcontroller generated PWM signal controls the speed of the motor.
The second part
(lIO
speed from the iD ports
initialize timers, I/O Ports.
scan) is reading the current and a nd
input output capture (IOC)
the
respectively. The microcontroller checks the current and
microcontroller is dedicated for the current signal and a
jump to shutdown routine that stops the motor if over load
ID port. The opto,couplers were used to isolate the high
from the keypad. From the speed sensor and the speed
continuous conversion mode where used to read from the
voltage circuits from the l ow voltage controlling signal s .
The de motor is the plant that will be controlled. The rating
occurs.
Otherwise the microcontroller reads the commands
reference (from keypad) the microcontroller calculates the
error and perfors the calculatio� of the control algorithm
of the motor should be chosen according to the rat ing of the
output and then it calculates the PWM signa, width, this is
ratings 2400RPM, 220V, 2.2A, O.37kW is used.
This part ends by updating the timers and· counters to
power circuit switch. For this study a dc shunt motor with
the last part of the program, which called program scan.
generate the PWM. T hen the microcontroller repeats the 1/0
scan and then the program scan. The motor can be stopped manually by keying a designated character at any time_
106 The MC V has a built-in timer and co unter register
"TeNT" which is a 16-bit register that can be incremented
at 0.5,2,4, or 8.ls by coniguring the prescaler unit. 0.5-1s is selected for .better granularity.
Our objective is how to satisfy the 0% to 100% duty
cycle using the MCV. The TeNT is incremented every 0.5.ls and will rollover every 32.77ms
Initialization Timers,
10
When the contents of TCNT equals the conten ts of OCx register, the control word speciied in TCTLI r egister will
Pot, etc ...
be performed automatically to update the associated pin in
port A, the compare flag OCxF set, and an interrupt will
be
ge nera ted if the OCxl intemtpt enable is set. In the TCTLI register one oflhe following actions con be selected:
•
Dues lIul arecl OCx pin
•
Clear OCx pin on successful compate
Toggle OCx pin on successful compare
•
•
Set OCx pin on successful compare
In implementing the program the following ports and
control words were used: I. Two-output compare register OC2 and OC3 are used and both use the toggle OCx pin action. Two square
waves
at the
same
frequency
generated on OC2 (PA6) and OC3 (PA5).
.
be
PA6 and PA5 will be XORed by an extenal XOR
2.
3
will
.
gate to generate the PWM output (PWMOVT). The duty
cycle
is detenined by the phase shit
between the outputs at PA6 and p A5. PA6 ou put is
ixed while PA5 is shited according to the duty cycle.
4.
Two inteupt service routines TOC21SR and TOC3ISR are programmed to hand le the interrupts ofOC2 and OC3 respectively.
The frequency is conigurable within the range 1KHz to
16Hz.The duty cycle can be changed over a ull span
(from 0% to 100%). Two output compare registers are used
in cooperation with an extenal XOR to generate the output
Yes
PWMOVT.
Cakulate the errot.
Calculate tke Control Algorithm. Update the counter� and timers and generate
PWM.
TeNT
Fig. 3. Main pogram nowcharts E
Clock A.
Full Range Frequency Independent Duy Cycle When designing a PWM unit using the
MeU
two
factors should be considered PWM duy cycle, and PWM
requency. Both are heavily dependent on the operating speed ofthe MCU. The PWM requency, in this work, is kept constant factor.
it
directly afects the
DC motor stability and
sensibility to changes in is input voltage. However th e requency can be
ed
ch ng
anually within ripper and lower
limits to make tne system lexible and able 10 operate
motors with diferent ratings and speeds.
Fig. 4. PWM
interupl service routines.
Fig. 5 shows the isolated PWM block, it accepts two inputs. Duty Cycle that is the output of the speed control
algorithm and inputted to this
block and Frequency, which is and inputted to this block
entered through keypad by user via user interface.
107
\
1 �__J",;.4 .
. . .. .... ... ?A6 XR P&l, " DIy1%
PA6
Speed Measuremellt
C�' .,�:v
T
t t·
Fig. 5 PWM lock B.
r
. r ' ;...!1. i
PWMM
S.OO 1
chI f
M 40] s
i.SO
21 'un 20JJ 0,:$1:33
Pulse width c�n be measured by using the input capture
register that are available in the 68HCllE9 and can be
programmed to capture the positive or negative
e dge
of the
(b)
input signal. Once the edge is detected the value of TNT
will be cop i ed automatically to the TIC
'
fig. 6. (a) Output at PAS and PA6 at duty 10%, {h) The coresponding PWM ompul.
T imer Input
Capture " register lmd will not be overwritten until the next
edge. Two registers
used TIC2 and TIC3. TIC3 is used to
capture the positive edge and save the time Tl, and TtC2 is used to capture the negative edge and save the time T2. The
mea sured speed (MS) can then be calculated using tbe
equation:
MS"( 60* 2)/«T2-T 1 )*PPR) where PPR
=
Chopper Output The dc chopper was driven by
signal
obtained
from the
a
high frequency PWM The voltage
microcontroller.
supplied to the motor is proportional to the PWM duty cycle
generated and fed into the chopper. Figure 7 shows the main
(1)
o utput
obtained
experimentally,
which
calculated value is VouP (79.881100)*254
pulse pear revoluti on
IV.
B.
=
is
The
RESULTS & DISCUSSION Cht Me.n \9.& I
The ha rdw a re system has been developed and tested
under laboratory conditions. The
microcontroller
based
closed loop control was implemented and applied on a dc
shunt motor. The results be discussed as follows.
A.
201 V.
202.89V.
ob
t ained are
:ht �M".n 2Q.t I
as expected which can
ChI +Duty 79,88 "
PWM Oil/pilI
Cht
freq l.oookHZ
Fig. 6(a) shows the output of microcontrolJer generated
square wave signals at port PAS and PA6. The signal at PA6
is shifted by a percentage corresponding to the duty cycle.
Figure 6(b) shows the corresponding PWM output generated
ll IU.GI
M� -C111 j-�l0l j."lo.ooooo 5 I
by XORing the signals at PAS and PA6.
2 J ul 2003 01:31 :22
Fig. 7. DC Chopper Output. i t
. . ·t ..
., I"
'j
:,�,
PAS "
�
"
I"
" . ,' ,., 'iH"
PA6 Shatol by Dy 1%
,.,.,.,.,
",
::
.. .,.
•••
, ' ..I ,
t
'"
"1':'.1
j
t ch'ii '�Y" ''''),u''Y' 'tM�· '!�chl'-'' rso!
The output voltage obtained from chopper is fed into
Ch1 Heq 500.0 Hz Chl +Uu1y 5).00. Ch2 Fr�, SO),Q H' C.,Ul{1 50.00 % .
(a)
s
I
.
Speed Output and Motor Response
This shows the
o
utp ut
of the motor ald its speed
response at diferent conditions.
The
operator inputs the
desired speed through the keypad in the auto-inode. The system will adjust th� duty cycle automatically according to the value inputted tl�rough the keypad.
,
u....I.oOOOQ
the motor.
2Q lun 2JQl 0*: 11:29
Fig. 8 shows the output of motor with speed rising from
zero to a predeterined speed comand of 100Qrpm. It be seen that a
ste ady
can
rise is achieved with almost small
108 overshoot and then the speed settles to required speed in less than 1.0 sec and almost zero ste ady state erro r .
Th e response of motor to sudden change from
a
speed
of 200rpm to 1000rpm is shown in Fig. 10. Percentage overshoot is much less at high speed.
.-- ----,
----�
Response to St ep 1000RPM
� �
.,
11200
"
Speed Respon�c
� �ooo ' �2500
]
-
800
----
�.--
400
Fig. 8.
1500·
Speed Response
500
-- ._-- -"� ----
time(O.3s/div)
o
time( 1 sldiv)
from starling to I OOORPM. Fig. 11. Decreases in speed.