Design and Real Time Implementation of Integrated 2009
-
Upload
naveen-bandaru -
Category
Documents
-
view
222 -
download
0
Transcript of Design and Real Time Implementation of Integrated 2009
-
8/2/2019 Design and Real Time Implementation of Integrated 2009
1/13
International Journal of Electronic Engineering Research
Volume 1 Number 1 (2009) pp. 1325
Research India Publications
http://www.ripublication.com/ijeer.htm
Design and Real Time Implementation of Integrated
Fuzzy Logic Controller for a High
Speed PMDC Motor
S.S. Patil and P. Bhaskar*
Department of Instrumentation Technology, Gulbarga University P. G. Centre,Raichur - 584 133, KA, INDIA
*Corresponding author Email: [email protected]
Abstract
This paper presents the design and implementation of an integrated fuzzy
logic controller (IFLC) for a high-speed permanent magnet DC (PMDC)
motor speed control system. The proposed strategy is intended to improve the
performance of the conventional controller by use of IFLC. The system is
studied for step input with and without load (magnetic) conditions and for
various standard input test commands such as square, triangular, sinusoidal,
and ramp. The experimental implementation demonstrates that IFLC is
particularly effective in speed control of PMDC motor under the above-
mentioned conditions. The graphical results of the proposed controller are
presented and are compared with conventional controllers.
Keywords: Integrated fuzzy logic controller, high speed control, PMDC
motor, analog interface card.
IntroductionThe PMDC motor is one of the most widely used prime movers in industry today.
PMDC motors used in many applications such as steel rolling mills, electric tracking
systems, textile mills -including weaving and spinning, robotic manipulators, defense
etc., require precise speed controllers to perform these tasks. The major problems in
applying the conventional control algorithms in a speed controller are the effects of
non-linearity in a DC motor. The nonlinear characteristics of a DC motor such as
saturation and friction could degrade the performance of conventional controllers [1].
Many advanced model-based control methods such as variable structure control and
model reference adaptive control have been developed to reduce these effects.
-
8/2/2019 Design and Real Time Implementation of Integrated 2009
2/13
14 S.S. Patil and P. Bhaskar
However, the performance of these methods depends on the accuracy of system
models and parameters. Generally, an accurate nonlinear model of an actual DC
motor is difficult to find, and parameter values obtained from system identification
may be only approximated values.
Emerging intelligent techniques have been developed and extensively used to
improve or to replace conventional control techniques, because these techniques do
not require a precise model. One of the intelligent techniques, fuzzy logic developed
by Lotfi A. Zadeh [2], is applied for controller design in many applications. A fuzzy
logic controller (FLC) was proved analytically to be equivalent to a nonlinear PI
controller, when a nonlinear defuzzification method is used [3].
There are many reports [4-12] on implementation of FLC and IFLC on PC, DSP,
and microcontroller for DC motor speed control. These platforms have their own
advantages and disadvantages. In the proposed work we have implemented integratedfuzzy logic controller, which is a combination of both fuzzy logic and PID controllers
(PIDC) [13], on a PC with a new high-resolution, high-speed 16-bit analog interface
card (AIC) designed for parallel port of PC. This approach is novice and makes the
hardware portable. The performance of the proposed controller is studied at high
speed of 5000 rpm and for various linear and nonlinear input test signals. The linear
input commands include triangular and sinusoidal, the non-linear input includes step
and square, and semi-linear input i.e., ramp.
In this paper, the real time implementation of IFLC for high-speed PMDC motor
is discussed. Heuristic knowledge is applied to define fuzzy membership functions
and rules. The membership functions and rules are modified after initially barrowing
the knowledge from PID controller developed from simple linear model. The processof fuzzification is done based on min-max (MOM) method. The defuzzification is
done using centre of gravity (COG) method.
Integrated Fuzzy Logic ControllerThe basic IFLC configuration is shown in Fig. 1, where FLC is used in a
supplementary role to enhance the conventional PIDC. When the control conditions
change, FLCs are easy to realize and the system behavior can be easily redesigned by
modifying the fuzzy logic rules. One does not have to redesign the existing control
system hardware in order to acquire satisfactory response during the change of load
conditions and appearance of disturbances [14].
r(t)y (t)
e(t)
ce(t)
-cu(t)
++ +
-
u(t)
IFLC
FLC PIDC PMDC
Motor
Figure 1: The block diagram of integrated fuzzy logic controller.
-
8/2/2019 Design and Real Time Implementation of Integrated 2009
3/13
Design and Real Time Implementation of Integrated Fuzzy 15
Design of PIDC
The block diagram of PIDC is shown in Fig. 2. The PID controller algorithm is
implemented with the following well-known PID difference equation given by:
Vn = Kp (en - en-1) + Ki en T+ Kd/T [(en - 2en-1 + en-2)] (1)
where, Vn is the control action,
en, en-1, and en-2 are the present, previous, and previous to previous
errors respectively,
and Kp, Ki, and Kd are proportional, integral, and derivative constants
respectively and T is the cycle time.
In the present application, the best-tuned Kp, Ki, and Kd values are found to
be equal to 150.0, 352.0, and 11.0 respectively and T is equal to 10ms.
Reference
signal r
-
uPIDC
PIDCPMDC
Motor
Speed y(t)
Figure 2: The block diagram of PID controller.
Design of FLC
Fuzzy logic uses membership functions to define the degree to which crisp physical
values belong to terms in a linguistic variable set [15-18]. The block diagram of a
basic FLC is shown in Fig. 3. The FL controller consists of mainly three basic
components namely the fuzzification interface, fuzzy inference engine (rule base) and
defuzzification stage. The fuzzification stage converts real number input values into
fuzzy values, the fuzzy inference engine processes the input data and computes the
control outputs using IF and THEN rules. These outputs, which are fuzzy values, are
converted into real numbers in the defuzzification stage.
FLC
Fuzzification
Inference
Rule
Base
Defuzzification
Z-1PMDCMotor
r +
+
-
-
e=r-y
yy
ce
uFLC
Figure 3: Block diagram of fuzzy logic controller.
-
8/2/2019 Design and Real Time Implementation of Integrated 2009
4/13
16 S.S. Patil and P. Bhaskar
The two-input-one-output FLC is designed for the present application. The inputs
to the FLC are error e(k) = (set-point speed measured speed)/set-point speed, and
change-in-error ce(k) = (present error previous error) [19]. These two inputs are
defined on a universe of discourse with the nine membership functions (NL, NM, NS,
NZ, ZE, PZ, PS, PM, and PL). The output of the FLC is CU is given as input to the
PMDC motor. The inputs and controlled output of the FLC are described by,
E = e(k) = r(k) y(k) (2)
CE = ce(k) = e(k) e(k-1) (3)
CU = cu(k) (4)
The triangular membership function is used to fuzzify the error and change-in-
error. The error and change-in-errors are mapped between -1.0 and +1.0 on the
universe of discourse. The membership boundaries for error, change-in-error and
control output are shown in Fig. 4. The fuzzy inference engine is the heart of the FLCcomprises both the knowledge base and decision-making logic. The knowledge base
consists of a data base with necessary linguistic variables (rule set) and decision-
making logic used to decide what control action to be taken. The inference process of
the FLC relates the fuzzy state variables e(k) and ce(k) to the fuzzy controlled action
cu(k) with the help of linguistic rules. The decision-making logic uses IF and THEN
rules to pick up appropriate control action for the process. As an example, the
following is a possible control rule for a FLC
IF e(k) is PM and ce(k) is NS, THEN cu(k) is PS
A control rule can be regarded as an implication, Ei, CEi, Ui
The implementation of the inference mechanism in the present study is using
Mamdanis minimum operation Rc, which is given asRc : Ui=1 , nii (5)
Where i, the weighing factor, is the measure of the contribution of the ith
rule to
the fuzzy control action and is expressed as
i = CiCEi (6)
The output of the fuzzy inference engine is a fuzzy set on the output universe of
discourse, so this needs to convert into non-fuzzy (crisp value).
The centre of gravity (COG) method is used for defuzzification. The defuzzified
output for the process is calculated from the equation
i=1, nU (wi).wi
CU = (7)
i=1, nU (wi)Where, n is the number of elements in control output fuzzy set.
wi is the support member value for the ith element
U (wi) is the value of grade of membership function for ith element
-
8/2/2019 Design and Real Time Implementation of Integrated 2009
5/13
Design and Real Time Implementation of Integrated Fuzzy 17
Grade of membership ( )
NL NM NS ZE PS PM PL
0.0 0.1 0.3 0.6 0.8-0.1-0.3-0.6-1.0
1.0
0.5
1.0
PZNZ
-0.8
Grade of membership ( )
NL NM NS ZE PS PM PL
0.0 0.1 0.3 0.6 0.8-0.1-0.3-0.6-1.0
1.0
0.5
1.0
PZNZ
-0.8
Grade of membership (
)
NL NM NS ZE PS PM PL
0.0 0.05 0.25 0.5 0.75-0.05-0.25-0.5-1.0
1.0
0.5
1.0
PZNZ
-0.75
Figure 4. Triangular membership functions of error, change-in error, and control output.
-
8/2/2019 Design and Real Time Implementation of Integrated 2009
6/13
18 S.S. Patil and P. Bhaskar
Fuzzification stage
The fuzzification stage converts a crisp number (e(k) and ce(k)) into the fuzzy values
within a universe of discourse U. The U is quantified and normalized to [-1, +1] by
scaling factors Ge and Gce. We use the triangle-shaped membership function with
seven terms as shown in Fig. 4. Unlike the traditional digital logic the fuzzy logic
extends the ranges in degree of truth from 0 to100 percent.
Decision logic stage
Basically, the decision logic stage is similar to a rule base, consisting of the fuzzy
control rules, which decide how the FLC works. This stage is the core of the FLC and
is constructed from expert knowledge and experience. With specific reference to the
characteristics of the PMDC motor, we construct the decision-making logic based on
Min-Max operations.
Defuzzification stage
Defuzzification is a mapping from a space of fuzzy control actions defined over an
output universe of discourse into a space of non-fuzzy (crisp) control actions.
Experimental PMDC motor control systemThe block diagram of experimental PMDC motor control system is illustrated in Fig.
5. We have used PMDC motor unit from LUNAR Motors Pvt. Ltd. India. The motor
details are presented in Table I. The system consists of PMDC motor, speed sensor,
analog interface card, personal computer, and driver. An indigenous 16-bit analoginterface card (AIC), designed by the authors [20], is used as the interface for
implementation of digital controller. The card is designed for multi purposes i.e., it
can be used both for measurement, and control. The card mainly consists of a high-
speed four channel 16-bit serial A/D converter AD974 from Analog Devices [21],
and a 16-bit serial D/A converter MAX542 from Maxim [22]. The D/A converter is
operated in bipolar mode in order to drive the motor in both clockwise and anti-clock
wise directions. The control output from PC is a digital data, which is converted into
equivalent analog voltage by D/A converter. The D/A converter is provided with
onboard four channels using analog multiplexer CD4051 to control multiple
parameters. The card is interfaced to PC through parallel port. The AIC is shown in
Fig. 6. The photograph of AIC is shown in Fig. 7. In the present study a PC -IntelPentium-IV processor with 1.7GHz clock frequency, 128MB RAM, 40GB HDD, one
parallel port, and two serial ports is employed for controlling the speed of a PMDC
motor. The PC receives input signals and transmits output control signals through the
AIC. The proposed real-time control algorithms such as PID, FL, and IFL controllers
and other control schemes are implemented on this platform.
The hardware configuration of the experimental system is shown in Fig. 8. The
driver circuit is built with the power transistors to provide enough current to drive the
motor. The control signal from PC does not directly drive the motor. A pre-amplifier
increases the strength of output analog signal to the motor voltage level. It is followed
by a driver circuit consisting of an op-amp (LM356), and Darlington pair (CL100 and
-
8/2/2019 Design and Real Time Implementation of Integrated 2009
7/13
Design and Real Time Implementation of Integrated Fuzzy 19
2N3055) in closed loop. The amplifier included in the closed loop will provide the
compensation for voltage drop across the Darlington pair.
The load is applied in the form of magnetic brake. The magnetic brake works by
means of an aluminum disc, which is mounted on the motor shaft. The aluminum disc
serves two purposes, one as a speed sensor and other as a speed brake. When disc is
rotated between the poles of a magnet, eddy currents form on the disc producing the
effect of frictional load, which in turn retards speed of the motor.
The optical encoder is used as a speed sensor. It converts the speed of the motor
into corresponding frequency with the help of the disc attached to the shaft. The
optical encoder used in this application produces 12 TTL compatible pulses for one
revolution. The frequency of these pulses is further converted into proportional
voltage by a F/V converter, which is constructed using LM2907. Hence, the output
voltage of F/V converter is directly proportional to the speed of the DC motor. Thisproportional voltage is acquired by PC through AIC. The picture of the complete
system is shown in Fig. 9.
PC
AIC
Buffer/
Driver
F/V
Converter
PMDC
Motor
Optical
Encoder
P
arallelPort
IFLC
Algorithms
Figure 5: Block diagram of IFLC based PMDC motor speed control system.
AIC
ADC
DAC MUX
From /ToAnalog Signal
Conditioners10
pinF
RC
Connector
4
4
PC
ParallelPortConnect
or
Figure 6: Block diagram of analog interface card.
-
8/2/2019 Design and Real Time Implementation of Integrated 2009
8/13
20 S.S. Patil and P. Bhaskar
Figure 7: Photographs of analog interface card.
Figure 8: Circuit schematic of PC based PMDC motor speed control system.
-
8/2/2019 Design and Real Time Implementation of Integrated 2009
9/13
Design and Real Time Implementation of Integrated Fuzzy 21
Figure 9: Photographs of experimental setup.
Table I: Specifications of PMDC Motor.
Parameter Unit
Size 35.7mm outer diameter, & 57.0mm
length with 2.3mm shaft diameter
Normal voltage 12 VDC
Power 46.7 Watts
No load speed (Max) 10500 rpm
No load current (Max) 0.270 Amp
Commutation Carbon Brush
Housing material SteelWeight 205 gms
Torque 83.0 gm-cm
Part Number No: CR-505-BS-2835
Experimental results and discussionsThe experimental results of PMDC motor are discussed here for a desired speed (of
5000 RPM), for load (magnetic) conditions, and for various standard input test
commands such as step, square, triangular, sinusoidal, and ramp.
-
8/2/2019 Design and Real Time Implementation of Integrated 2009
10/13
22 S.S. Patil and P. Bhaskar
For desired speed
Fig. 10 shows the step response of PMDC motor for PID, FL, and IFL controllers for
a desired speed of 5000 rpm. The rise time of IFLC is observed to be 0.8 sec and is
better than the FLC, and PIDC.
Response for Step Input without Load
0
1000
2000
3000
4000
5000
6000
0 2 4 6 8
Time in Sec
SpeedinRPM
PIDC
FLC
IFLC
Response for Step Input without Load
0
1000
2000
3000
4000
5000
6000
0 2 4 6 8
Time in Sec
SpeedinRPM
PIDC
FLC
IFLC
Figure 10: Comparison of PIDC, FLC, and IFLC for step input.
Under load condition
Fig. 10 also shows the response of PMDC motor for PID, FL, and IFL controllers for
step input with load variations. The experimental results depict that during the load
conditions the speed corresponding to undershoot and overshoot are less than 2% in
case of PID and 5-6% in case of FLC and IFLC and the settling times are less than 2sec for PIDC and less than 2.6 sec for IFLC and FLC. Therefore the PIDC is the best
controller for load variations. Where as the responses of FL and IFL controllers are
almost similar for load variations.
For various standard input test commands Square
A square input command is applied to all the controllers. Fig. 11 shows the response
of PMDC motor for PID, FL, and IFL controllers for square input command. The rise
time of IFLC is observed to be better than the FLC, and PIDC. It is clear from the plot
that IFLCs trail is close to the input command than the other two.
Triangular and Sinusoidal
Triangular and sinusoidal input commands are applied to all the controllers. Fig. 12
shows the response of PMDC motor for PID, FL, and IFL controllers for triangular
and sinusoidal input commands respectively. In both the cases it is found that PIDC
and IFLCs trails are closer to the input command than the FLC.
Ramp
The performance of the controllers is also studied for a semi-linear input command
such as ramp. The responses of all three controllers are presented in Fig. 13. Here,
PID and IFLC follow the input command in the linear incrementing region of the
-
8/2/2019 Design and Real Time Implementation of Integrated 2009
11/13
Design and Real Time Implementation of Integrated Fuzzy 23
input. But during the trailing region of the waveform FLC and IFLC follow the input
closely than the PIDC.
Response for Square Input
0
1000
2000
3000
4000
5000
6000
0 5 10 15 20 25 30
Time in Sec
Spe
edinRPM
PIDC
FLC
IFLC
Figure 11. Comparison of PIDC, FLC, and IFLC for square input.
Response for Triangular Input
0
1000
2000
3000
4000
5000
6000
0 20 40 60
Time in Sec
SpeedinRPM
PIDC
FLC
IFLC
Response for Sine Input
0
1000
2000
3000
4000
5000
0 10 20 30 40
Time in Sec
SpeedinRPM
PIDC
FLC
IFLC
Figure 12: Responses of PIDC, FLC, and IFLC for (a) triangular input, (b) sine input.
-
8/2/2019 Design and Real Time Implementation of Integrated 2009
12/13
24 S.S. Patil and P. Bhaskar
Response for Ramp Input
0
1000
2000
3000
4000
5000
6000
0 5 10 15 20 25 30
Time in Sec
SpeedinRPM
PIDC
FLC
IFLC
Figure 13: Comparison of PIDC, FLC, and IFLC for ramp input.
Conclusions
By studying the response of PID, FL, and IFL controllers for various inputs, it isconcluded that for non-linear inputs (step and square) the FL and IFL controllers
perform better than the conventional PID controller. Where as for linear inputs
(triangular and sine) PID and IFL controllers are better than FLC. The above
statements can be confirmed by observing the response of ramp input (raising part of
the wave linear and trailing part is non-linear). PIDC response is best for linear
portion of the wave where as it has poor response for non-linear portion of the wave
(changing from max to zero). But for both the cases IFL responds quicker than the
other controller as it contains both the controllers.
References
[1] Liptak, B. G., 1995 Instrument Engineers Handbook Process Control.
Butterworth Heinemann Ltd., Oxford.
[2] Zadeh, Lotfi A., 1965, Fuzzy sets. Information Control, 8, 338-353.
[3] Zheng, Li, 1992, A practical guide to tune of PI like fuzzy controllers, IEEE
Int. Conf. on Fuzzy Systems, 633-640.
[4] Mamdani, E. H. and Assilian, S., 1975, An experiment in linguistic synthesis
with a fuzzy logic controller, Int. J. Man Machine Studies, 7, 1-13.
-
8/2/2019 Design and Real Time Implementation of Integrated 2009
13/13
Design and Real Time Implementation of Integrated Fuzzy 25
[5] Lee, Chun Chen, 1990, Fuzzy logic in control systems: Fuzzy logic
controller Part I, II. IEEE Transactions on Systems, Man and Cybernetics,
20, 2.
[6] Guillemin, P., 1996, Fuzzy logic applied to motor control, IEEE Trans. Ind.
Applications, 32, 51-56.
[7] Tipsuwan, Y. and Chow, M. Y., 1999, Fuzzy logic microcontroller
implementation for DC motor speed control, IEEE IECON99, 3, 1271-1276.
[8] Tan, W. W. and Dexter, A. L., 2000, A self learning fuzzy controller for
embedded applications, Automatica, 36, 1189-1198.
[9] Uma, G. and Chellamuthu, C., 2000, Design and implementation of fuzzy
logic control speed control system for a converter fed DC drive using 8097
microcontroller, in Proc. IEEE ISIE.
[10] Hu, B.-G., George, K. I. M. and Gosine, R. G., 2001, A systematic study offuzzy PID controllers-function based evaluation approach, IEEE Transactions
on Fuzzy Systems, 9.
[11] Bhaskar, P., Parvathi, C. S., Shrimanth Sudheer, L. and Kulkarni, A .B., 2005,
Computer based DC micromotor speed control system, J. Instrum. Soc.
India, 35, 3, 257-265.
[12] Thepsatorn, P., Numsomran, A., Tipsuwanporn, V. and Teanthong, T., 2006,
DC motor speed control using fuzzy logic based on LabVIEW, in Proc.
SICE-ICASE Int. Joint Conf. 18-21.
[13] Shieh, M.-Y. and Li, Tzuu-Hseng S., 1998, Design and implementation of
integrated fuzzy logic controller for a servomotor system, Mechatronics, 8,
217-240.[14] Shieh, M.-Y. and Li, Tzuu-Hseng S., 1993, Integrated fuzzy logic controller
design, in Proc. IEEE Conf. Industrial Electronics, Control &
Instrumentation, 279-284.
[15] Yan, J., Ryan, M. and Power, J. 1994, Using Fuzzy Logic: Towards
Intelligent Systems. PH (I) Ltd., New York.
[16] Govind, N. and Hasan, A. R., 1995, Real time fuzzy logic speed control using
conventional, assembly and simulation methods for industrial DC motors,
IEEE,.
[17] Alexei, Z. and Dr. Halasz Sandor, 1997, Robust speed fuzzy logic controller
for DC drive, in Proc. IEEE Intelligent Eng. Systems,.
[18] Aydemir, S., Sezen, S. and Ertunc, H. M., 2004, Fuzzy logic speed control ofa DC motor, in Proc. IEEE Power Electronics & Motion Control Conference,
766-771.
[19] Bharathi, Y. H. et al, 2008, Multi-input fuzzy logic controller for brushless
DC motor drives, Defence Science Journal, 58, 1, 147-158.
[20] Patil, S. S. and Bhaskar, P., 2008 Design of 16-bit analog interface card for
PC parallel port, Mechatronics, (Communicated).
[21] www.analogdevices.com
[22] www.maximsemiconductors.com
[23] Wu, H., Chen, X. and Hu, L., 2008, Embedded system of DC motor speed
control based on ARM, in Proc. ISECS 123-126.