# DC Motor Using Fuzzy Logic Technique Computer Science Essay

**Published:** **Last Edited:**

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

Fuzzy Logic is basically a multivalued logic that allows intermediate values to be defined between conventional evaluations like yes/no, true/false etc. Commercially, fuzzy logic has been used with great success to control machines and consumer products. The fuzzy logic controller is incorporated in order to achieve quick control of motor speed smoothly, The logic controller enhances the robustness of the motor control system, which can handle abrupt load variation and exhibit good disturbance behavior.

This paper presents a fuzzy control approach to the speed control of DC shunt motor. In usual Fuzzy Logic Controller design, inputs to the controller are generally error (e) and error derivative (de/dt) . This paper presents another concept of development and design of a fuzzy logic controller applicable to DC Motor Speed Control System (MSCS) with high performance of the Fuzzy Logic controller. Since armature voltage supply has a major influence in controlling speed, therefore one of the input to the proposed Fuzzy Logic Controller will be actual armature voltage supply (Va) while another input will be error (e) in speed. The transfer function model of the DC shunt motor has been obtained via experimentation and calculations and simulated and then as per requirement and specification, the proposed fuzzy logic controller has been designed and simulated using Fuzzy Logic and Simulink Toolboxes of MATLAB. Results show robustness against changing loading conditions.

INTRODUCTION

A large number of DC motors operated at variable speeds are being employed in modern industry. In rolling mills, each shape to be rolled will necessitate an optimum operating speed to get maximum productivity of the mill and a very high quality product [1]. In the application mentioned above as well as in most of the other industrial drives, speed control is necessary to attain high productivity, proper operation and high quality products. Therefore we need fast operating and high performance controllers to control the speed of the motor. The limitations of the conventional controls viz., Proportional, Integral and Derivative (PID) are slow and lack of efficiency in handling system non-linearities [2]. Experience has shown that a fuzzy controller is often more robust than a PID controller in the sense that it is less susceptible to noise and system parameter changes [3]. In our case the problem is to control the speed of DC shunt motor by controlling the input applied armature voltage. By experimentation and calculations we can develop the transfer function model (Objective Knowledge [4]) of the motor. But if the applied armature voltage is fluctuating then the output speed of the shaft of the motor will also be unregulated. Also with the variation of the shaft loading, speed of the shaft of the motor will change. So now we can employ subjective information [4] about the system in such a way so that we can achieve our goal and specifications. Example of subjective information is:

If speed is different than the desired speed Then change the input applied armature voltage (Va) so that speed comes closer to the desired speed. For example:

. If (speed is higher than the desired) and (Va is high) Then (Va must be decreased)

. If (speed is lower than the desired) and (Va is low) Then (Va must be increased)

Subjective knowledge is usually ignored at the front end of the engineering designs, but it is frequently used to evaluate such designs. We will show in this paper that both types of knowledge are utilized to solve real system and as a consequence we get improved performance of the system in hand. We have used model based approach (MBA) in which 'Objective Information' is represented by matematical model (in our case transfer function model) and 'Subjective' information is represented by linguistic statements that are converted to rules which are then quantified using fuzzy logic [5,6].

The application of fuzzy logic is an effective tool in problems where logical inferences can be derived on the basis of causal relationships. FL attempts to quantify linguistic terms so that the variables thus described can be treated as continuous, allowing the system's characteristics and response to be described without the need for exact mathematical formulations. The attention of the paper is concentrated to the fuzzy logic aspects of the problem rather than upon the complexities of the model.

In the proposed concept, another design strategy for FL Controller applicable to DC Motor control has been presented. Generally for designing FL Controllers for systems the error from the desired output, e and error derivative (de/dt) are taken as inputs to the controller. But in this concept, since armature voltage has a major influence in controlling the speed of the DC shunt motor (Armature Controlled), one of the input to the FL Controller will be actual armature voltage supply (Va) while another input will be error (e) in speed.

2. DESIGN

2.1 Motor Model

The resistance of the field winding and its inductance of the motor used in this study are represented by Rf and La respectively in dynamic model. Armature reactions effects are ignored in the description of the motor. This negligence is justifiable to minimize the effects of armature reaction since the motor used has either interpoles or compensating winding. The fixed voltage Vf is applied to the field and the field current settles down to a constant value.Schematic diagram of armature controlled DC shunt motor is shown in Fig.1 [7]. The fundamental equations governing the operation of shunt DC motor are as follows:

Eb = K1.ï·

Td = K1.Ia

Va = Eb+Ra.Ia +La dIa/dt

J dï·/dt + f. ï· =Td = K1.Ia

Fig.1. Schematic diagram: Armature

Controlled shunt DC Motor

By taking Laplace transforms of these equations and manipulating, we get the transfer function of the motor

G(s)= ï· (s)/Va(s) = K1/((Ra + sLa)(f + s J) + K1^2)

The block diagram representation of T/F is as shown in Fig.2.

Fig.2. Block Diagram T/F Model

From experimentation, DC test (Table 1) and AC test (Table 2) we get Ra=1.32 ohms, La=0.046 H.

TABLE 1

DC TEST

volts

amps

Ra

15.05

11.6

1.29

13.42

10.3

1.30

10.75

8.2

1.31

6.10

4.5

1.35

5.90

4.4

1.34

3.17

2.3

1.37

## .

TABLE 2

AC TEST

volts

amps

Z

134.7

9.2

14.64

112.5

7.6

14.80

92.6

6.2

14.93

76.9

5.2

14.78

59

4

14.75

30.42

2.1

14.48

Using retardation test and following equations

Eb = K1. ï·, Eb.Ia = Td. ï· = (f. ï·).ï· and Eb.Ia = J. ï·.dï·/dt,

we have got K1=1.41 , J=0.0772 , f=0.00381. Using these data, simulation of the T/F model has been developed. From simulation we get information and data about the system given in Table3.

TABLE 3

EFFECT OF CHANGING LOAD

Va

(volts)

Load

(N-m)

Speed

(rad/s)

Error (e)

Va (volts) so that Speed matches the set speed

214.8

0

152

0

214.8

214.8

1

151.4

0.6

215.75

214.8

2

150.8

1.2

216.7

214.8

3

150.1

1.9

217.6

214.8

4

149.5

2.5

218.6

214.8

5

148.8

3.2

219.61

214.8

6

148.1

3.9

220.3

214.8

7

147.5

4.5

221.4

214.8

8

146.8

5.2

222.5

214.8

9

146.1

5.9

223.3

214.8

10

145.5

6.5

224.2

214.8

11

144.8

7.2

225.15

214.8

12

144.2

7.8

226.1

214.8

13

143.5

8.5

227

214.8

14

142.8

9.2

228

214.8

15

142.2

9.8

229

214.8

16

141.5

10.5

229.7

214.8

17

140.9

11.1

230.8

214.8

18

140.3

11.7

231.7

214.8

19

139.5

12.5

232.6

214.8

20

138.9

13.1

233.5

2.2. FLC DESIGN AND DEVELOPMENT

Knowledge base has been formed by considering 230 V motor (Line voltage=230V) with rated speed of 1450 RPM (151.84 rad/sec). Since increasing shaft loading condition results in decreased shaft speed. At armature voltage Va = 214.8 volts, with various shaft load from 0-20 N-m, we get different speeds (Table 3). Set speed is 152 rad/sec, which we want to maintain. To get the set speed at these various loading conditions, Va has to be modified to as in the last column of Table 3.

How to get that desired armature voltage (Vad) when input supply to the armature is varying in a wide range? It necessitates introduction of a controller, whose input will be the input supply to the armature and output will be the desired armature voltage. Another input to the controller will be the error in speed e=ï·sp-ï·. The Block diagram of the proposed FL Controller is shown in Fig.3.

Fig.3. Block Diagram of Proposed FLC

Let us say that applied armature voltage varies by 50 volts each side of Va=214.8 volts then the range of applied armature voltage Va is [164.8 264.8]. From T/F simulation, error in speed ranges [-35.3 35.4], when applied armature voltage Va varies [164.8 264.8] volts. Output of fuzzy controller desired armature voltage Vad ranges [314.8 233.5] volts (from Table 3 last column). Fuzzy variable associations and numerical ranges for both input variables of the controller, Va and error in speed (e) and for the output variable Vad are defined in Table 4. Using the notation of Table 4, the fuzzy sets required for the controller are depicted in Fig.4.

TABLE 4(a).

FUZZY INPUT VARIABLE 1 :

Va (APPLIED ARMATURE VOLTAGE)

## Range

## Description

## Fuzzy

## Association

164.8-195

Very Low

VL

185-215

Low

L

205-235

Medium

M

225-255

High

H

245-264.8

Very High

VH

TABLE 4(b).

FUZZY INPUT VARIABLE 2: ERROR (e) IN SPEED

## Range

## Description

## Fuzzy

## Association

-35.3 : -20

Negative Very Big

NVB

-25 : -10

Negative Big

NB

-15 : -3

Negative Small

NS

-5 : 5

Moderate

M

3 : 15

Positive Small

PS

10 : 25

Positive Big

PB

20 : 35.4

Positive Very Big

PVB

TABLE 4(c).

FUZZY OUTPUT VARIABLE 1:

Vad (DESIRED ARMATURE VOLTAGE)

## Range

## Description

## Fuzzy Association

214.8-219.8

Very Small

VS

218.3-222.3

Small

S

221.8-226.8

Medium

M

225.3-229.3

Big

B

228.8-233.5

Very Big

VB

Fig.4 (a). Membership Function plot for error, e

Fig.4 (b). Membership Function plot for input applied

armature voltage

Fig.4(c). Membership Function plot for output desired armature voltage

The purpose of fuzzy logic controller is to maintain a fairly constant speed of the motor as load is varied. Speed control is accomplished by adjusting the armature voltage. Fuzzy rules for this problem appears in the form: -

If (Va is L1 and e is L2) then Vad is L3 where L1,L2 and L3 are linguistic terms.The fuzzy inference system is represented by a Fuzzy Association Memory (FAM) mapping that associates the input variables to the output variables as shown in Table 5.

TABLE 5

FUZZY ASSOCIATION MEMORY (FAM) TABLE

## e

## Va

NVB

NB

NS

M

PS

PB

PVB

VL

## VS

## B

## VB

## VB

L

## S

## M

## B

## VB

M

## VS

## VS

## M

## M

## B

## B

H

## VS

## VS

## S

## B

## S

## M

## B

VH

## VS

## S

## M

## VB

## VS

## S

## M

Based on the relationship between input and output variables a total of 28 rules (corresponding to the 28 meaningful states in the FAM table) are composed from the FAM table. There is a reason for 'missing' rules in the FAM table and this should be pointed out. For example: If Va is VL and error is NVB then error, e = ï·sp-ï· ïƒ ï·>ï·sp ïƒ ï· has to be reduced ïƒ Va has to be reduced. But Va is already in lowest state i.e. VL, so no further reduction is possible. Such deletion of rules from the FAM table allows the designer to eliminate the conflicting or noncausal relationships. In classical expert systems theory, this is often referred to as 'conflict resolution'.

Some examples of the use of FAM table. If eïƒ PVB & Vaïƒ VL Then Vadïƒ VB

eïƒ PVB means ï· is very much less than set speed, so Va has to be increased very much. Therefore when Va is VL then Vad must be set to VB. If eïƒ NVB & Va ïƒ H Then Vadïƒ VSeïƒ NVB means, the motor is running in over speed, so to bring the speed to normal position, Va should be lowered therefore Vad is set to VS.

In the design of fuzzy logic controller membership functions are of triangular type and the defuzzification method used is of centroid type.

3. SOFTWARE DESIGN

The operation of a FLC is based on heuristic knowledge and linguistic description to perform a task.The performance of the FLC is then improved by adjusting the rules and membership function. The designed FLC consists of three components.

* Fuzzification of input values

* Fuzzy inference

* Defuzzification of fuzzy output

Fuzzification block transforms crisp input signal to linguistic variable, fuzzy inference handles the rules to infer the output contributed from each rule and

defuzzification block transforms linguistic output to

crisp output signal. FLC designed in LabVIEW is based on mamdani

fuzzy type. The details of the designed controller are, Two Input: Error and Change of Error One Output: Change of Alfa (Duty cycle)

And Method: minimum

Or Method: maximum

Implication Method: minimum

Aggregation Method: maximum

Defuzzification Method: Center of Gravity

In this FLC, the triangle membership functions are used to subdivide the input and output universes and to

define the degree of membership

## 4. SIMULATION RESULTS

Simulation of system using fuzzy logic controller has been developed. For the uncompensated MSCS, the response characteristics are shown in Fig.5 and Fig.7 for sudden load change to 10 N-m and 15 N-m respectively, while response characteristics using proposed FLC are shown in Fig.6 and Fig.8. Fig.9 presents the characteristics of input applied armature voltage (Va) and output desired armature voltage (Vad) of the FLCr. Table 6 presents the performance of the system with proposed FLC against the uncompensated system.

Fig. 5. Speed Characteristic for Uncompensated

System for Load=10 N-m

Fig.6. Speed Characteristic of MSCS using Proposed FLC

for Load=10 N-m

Fig. 7. Speed Characteristic for Uncompensated

System for Load=15 N-m

Fig.8. Speed Characteristic of MSCS using Proposed

FLC for Load=15 N-m

Fig.9. Applied Armature Voltage (Va) and Desired Armature Voltage (Vad) of Proposed FLC for Load=15 N-m

Steady State Error (SSE)%

Over

shoot %

Rise Time(tr)

in sec

Settling Time

(ts) in sec

Uncompensated

System

6.56

1.94

0.1443

Infinite

With proposed FL Controller

2.14

6.2

0.1255

0.43

TABLE 6

PERFORMANCE OF FLC AGAINST

UNCOMPENSATED SYSTEM

5. CONCLUSIONS

A design concept of fuzzy logic controller, applicable to DC Motor Speed Control System (MSCS) has been shown in this paper . In the proposed controller inputs to the controller were taken Va and e, rather than usual, error e and error derivative de/dt The results of experiment on the real plant demonstrate that the proposed fuzzy logic controller is able to sensitiveness to variation of the reference speed attention. The results of the control are as follows.

1. The speed control of dc motor showed the proposed controller gains optimal performance.

2. The proposed controller achieved to overcome the disadvantage of the use conventional control sensitiveness to inertia variation and sensitiveness to variation of the speed with drive system of dc motor.