# The DC Servo Motors 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.

Electric motors can be classified by their functions as servomotors, gear motors, and so forth, and by their electrical configurations as DC (direct current) and AC (alternating current) motors. A further classification can be made as single phase and polyphase with synchronous and induction motors in terms of their operating principles for AC motors, and PM (permanent magnet) and shunt DC motors for DC's. Although DC motors are preferred dominantly in the variable speed applications, increasing use of AC motors can be seen prior to improvements in solid state components. Servomotor is a motor used for position or speed control in closed loop control systems. The requirement from a servomotor is to turn over a wide range of speeds and also to perform position and speed instructions given. DC and AC servomotors are seen in applications by considering their machine structure in general [2].

DC servo motors have been used generally at the computers, numeric control machines, industrial equipments, weapon industry, and speed control of alternators, control mechanism of full automatic regulators as the first starter, starting systems quickly and correctly. In the field of control of mechanical linkages and robots, research works are mostly found on DC motors. While some properties of DC servo motors are the same, like inertia, physical structure, shaft resonance and shaft characteristics, their electrical and physical constants are variable. The velocity and position tolerance of servo motors which are used at the control systems are nearly the same. So they must be controlled according to the control system needs.

## 1.1 Literature Review

## D.C. Servo Motor Drive

D.C. Servo technology has existed as an excellent motion control solution in a vast number of industry applications for many decades. In spite of the widespread acceptance of brushless technology, D.C. systems continue to survive and flourish in the industrial marketplace. The success of brush D.C. systems can be attributed to a number of factors:-

Several decades of successful utilization have resulted in a well tried and trusted solution.

D.C. systems are less complex than their brushless counterpart. In particular the drive is more readily understood and fewer wires allows for ease of system commissioning.

The complete system is usually cheaper than its brushless counterpart especially when the

motion demands are relatively simple.

The DC system is a natural choice for battery driven motor.

The permanent magnet brush DC servo motor contains a rotating element with a wound armature terminated on a mechanical commutator. Power is transferred from the motor terminals to the commutator via carbon brushes. The commutator switches the direction of current in specific armature coils depending on the angular position of the armature. In this manner the brushes steer (commutate) the motor current into the armature so that optimum torque is produced. The permanent magnet field is set into the outer, non rotating stator (yoke). The stator completes the magnetic circuit and provides the mechanical support for the machine.

Electric motors can be classified by their functions as servomotors, gear motors, and so forth, and by their electrical configurations as DC (direct current) and AC (alternating current) motors. A further classification can be made as single phase and polyphase with synchronous and induction motors in terms of their operating principles for AC motors, and PM (permanent magnet) and shunt DC motors for DC's. Although DC motors are preferred dominantly in the variable speed applications, increasing use of AC motors can be seen prior to improvements in solid state components.

A servo control system is widely used forms of control system. Any machine or piece of equipment that has rotating parts will contain one or more servo control systems. The job of the control system may include:

Maintaining the speed of a motor within certain limits, even when the load on the output of the motor might vary. This is called regulation.

Varying the speed of a motor and load according to an externally set programme of values. This is called set point (or reference) tracking.

The greatest advantage of D.C. servo motors may be speed control. Since speed is directly proportional to armature voltage and inversely proportional to the magnetic flux produced by the poles, adjusting the armature voltage and/or the field current will change the rotor speed.

## Armature Controlled Drive

In separately excited motor, the armature voltage and field voltages can be controlled independent of each other.

The field current, if , is constant (and hence the flux density B is constant), and the armature voltage is varied. A constant field current is obtained by separately exciting the field from a fixed dc source. The flux is produced by the field current, therefore, essentials constant. Thus the torque is proportional only to the armature current.

## Field Controlled Drive

That is varying its speed by varying the field flux. The method of control is generally used when the motor has to run above its rated speed. To understand the operations of field control suppose that the dc motor running at a constant speed. If the field current is reduced by reducing the voltage across the field coil, the flux density will be reduced. This will reduce the back e.m.f instantaneously and will cause armature current to increase resulting in the motor speed increasing. Consequently the back e.m.f will increase and a new equilibrium will be established at a higher speed. With field control one can achieve as high a speed as five times the rated speed.

The armature current, ia, is kept constant and the flux density B is varied by varying if [4].

## 1.2 Proportional -plus -Integral Controller Review

Proportional -plus -Integral (PI) controllers are widely used in industrial practice for more than 60 years. The development went from pneumatic through analogue to digital controllers, but the control algorithm is in fact the same. The PI(D) controller is standard and proved solution for the most industrial application.

The main reason is its relatively simple structure, which can be easily understood and implemented in practice, and that many sophisticated control strategies, such as model predictive control, are based on it [2].

An application with large speed capabilities requires different PI gains than an application which operates at a fixed speed. In addition, industrial equipment that are operating over wide range of speeds, requires different gains at the lower and higher end of the speed range in order to avoid overshoots and oscillations. Generally, tuning the proportional and integral constants for a large speed control process is costly and time consuming. The task is further complicated when incorrect PI constants are sometimes entered due the lack of understanding of the process [3].

## Fuzzy logic Review

Fuzzy logic began in 1965 with a paper called "Fuzzy Sets" by a man named Lotfi Zadeh. Zadeh is an Iranian immigrant and professor from UC Berkeley's electrical engineering and computer science department.

The first historical connection to fuzzy logic can be seen in the thinking of Buddha, the founder of Buddhism around 500 B.C. He believed that the world was filled with contradictions and everything contained some of its opposite. Contrary to Buddha's thinking, the Greek philosopher Aristotle created binary logic through the Law of the Excluded Middle. Much of the Western world accepted his philosophy and it became the base of scientific thought. Still today, if something is proven to be logically true, it is considered scientifically correct [7].

Prior to Zadeh, a man named Max Black published a paper in 1937 called "Vagueness: An exercise in Logical Analysis" [6]. The idea that Black missed was the correlation between vagueness and functioning systems. Zadeh, on the other hand, saw this connection and began to develop his "fuzzy" ideas and fuzzy sets.

Because fuzzy thinking challenges Aristotelian thinking and therefore scientific logical thinking, Zadeh's ideas experienced much opposition from the Western world. There were three main criticisms. The first was that people wanted to see fuzzy logic applied. This didn't happen for some time since new ideas take time to apply. The second criticism came from probability schools. Fuzzy logic uses numbers between 0 and 1 to describe fuzzy degrees. Probability felt that they did the same thing [6]. The third criticism was the largest. In order for fuzzy logic to work, people had to agree that A-and-not-A was correct. This threatened modern science and math ideas. As a result, the Western world rejected fuzzy logic for a period of time.

The Eastern world, however, embraced fuzzy thinking. By 1980, Japan had over 100 successful fuzzy logic devices [6]. According to Zadeh, in 1994, the United States was only ranked third in fuzzy application behind Japan and Germany [5]. Still today, the United States is some years behind in fuzzy logic development and implementation.

Zadeh recalls that he chose the word "fuzzy" because he "felt it most accurately described what was going on in the theory" [5]. Other words that he thought about using to describe the theory but didn't accurately describe it included soft, unsharp, blurred, or elastic. He chose the term "fuzzy" because "it ties to common sense" [6].

To understand the reasons for this extensive development, there are two main aspects worthy to be mentioned. First, the notion of fuzzy sets is important as a tool for modeling intermediate grades of belonging that occur in any concept, especially from an applications point of view. Second, a variety of tools incorporated in the framework of fuzzy sets, allow the planner to find suitable concepts to cope with reality.

In contrast to classical knowledge systems, FL is aimed at a formalization of modes of reasoning that are approximate rather than exact (Kosko 1992). FL is much closer in spirit to human thinking and natural language than the traditional logical systems. Basically, it provides an effective means of capturing the approximate, inexact nature of the world.

In this respect, what is used in most practical applications is a relatively restricted and yet important part of FL, centering on the use of IF-THEN rules. This part of FL constitutes a fairly self contained collection of concepts and methods for handling varieties of knowledge that can be represented in the form of a system of IF-THEN rules in which the antecedents, consequences, or both, are fuzzy rather than crisp. Viewed in this perspective, the essential part of the FLC is a set of linguistic rules related to the dual concepts of fuzzy implication and the compositional rule of inference (Zadeh 1985, Meredith et al. 1991, Kosko 1992). In essence, then, the FLC provides an algorithm which can convert the linguistic control strategy, based on expert knowledge, into an automatic control strategy. What is of central importance, therefore, is that the fuzziness of the antecedents eliminates the need for a precise match with the input.

According to Zadeh (1985), Mamdani (1975), and others (Sugeno and Murakarni 1985, Evans et al. 1989, Lee 1990, etc.), in a fuzzy rule-based system, each rule is fired to a degree that is a function of the match between its antecedents and the input (the term "fire" refers to the activation of a rule). The mechanism of imprecise matching provides a basic interpolation. Interpolation, in turn, serves to minimize the number of fuzzy IF-THEN rules needed to describe the input/output relationship. Recent applications of fuzzy control, (Pappis and Mamdani 1977, Yasunobuet al. 1983, Sugeno and Murakarni 1985, Yagishita et al. 1985, Lee 1990, Brubaker 1992, Wiggins, 1992, etc), show that FLCs yield results that are superior to those obtained by conventional control algorithms. In particular, the methodology of FLCs appears very useful when processes are too complex for analysis by conventional quantitative techniques or when the available sources of information are interpreted qualitatively, inexactly, or uncertainly. As indicated by Gupta (1980), a FLC can be viewed as a step toward a rapprochement between conventional precise mathematical control and human-like decision making.

## Organization of the Dissertation

The work carried out in this dissertation has been organized in seven chapters as described below.

Chapter 1: In this chapter, a general introduction of D.C. Motor Drive is discussed. Here brief discussion on PI and Fuzzy Logic, and organization of dissertation work are presented.

Chapter 2: This chapter presents a brief detail about mathematical modeling of D.C. Servo Motor Drive. And complete closed loop block diagram is discussed.

Chapter 3: This chapter gives the introduction and designing of controllers used for proposed drive. The brief review of proportional plus integral controller and fuzzy controller which are used for the proposed drive is done. The designing of fuzzy controller is also discussed.

Chapter 4: In this chapter the simulation of proposed drive is discussed. And the responses of proposed drive are drawn in Figures.

Chapter 5: This chapter deals the Analysis of Responses and Comparison of PI, PID & Fuzzy Controller in comparative chart.

Chapter 6: This chapter concludes the dissertation work.

## 1.5 Conclusion

## Chapter 2

## Modeling of System, Parameter Determination and Block Representation of D.C. Servo Motor

## 2.1 Introduction

D.C. machines are characterized by their versatility. By means of various combinations of shunt, series, and separately-excited field windings they can be designed to display a wide variety of volt-ampere or speed-torque characteristics for both dynamic and steady-state operation. Because of the ease with which they can be controlled systems of D.C. machines have been frequently used in many applications requiring a wide range of motor speeds and a precise output motor control.

Here the separately excited D.C. motor (D.C. Servo Motor) model is chosen according to its good electrical and mechanical performances more than other D.C. motor models. The D.C. motor is driven by applied voltage.

## 2.2 Modeling of D.C. Servo Motor

Fig.2. represented the servo motor model with armature controlled. Let's consider:-

Ea (t) =Input voltage

ia (t) =Armature current

Ra = Armature resistance

La = Armature inductance

Eb (t) =Back e.m.f

Tm= Developed Torque

Ï‰m =Motor angular velocity

J=Motor moment of inertia

B=Viscous friction coefficient

Kb=Back e.m.f constant

KT=Torque constant

C:\Documents and Settings\Deepraj05\Desktop\untitledd.bmp

## ia (t) if (t)

## +

## Ef (t)

## Ea (t)

## Eb (t)

## _ Ï‰m

## Tm

## Figure 2.1: Separately Excited DC Motor

Here, the differential equation of armature circuit is-

Ea (t) =Ra.ia (t) + La.dia (t) + Eb (t) (1)

dt

The Torque equation is-

Tm (t) = J.dÏ‰m (t) + B.Ï‰m (t) (2)

dt

The torque developed by motor is proportional to the product of the armature current and field current i.e.

Tm (t) = Kf.if.ia (3)

Where, Kf is constant.

In armature - controlled D.C. motor the field current (if) is kept constant i.e.

Tm = KT.ia (4)

Where, KT = Kf.if is torque constant.

The back e.m.f. of motor is proportional to the speed i.e.

Eb (t) = Kb. Ï‰m (5)

Where, Kb is back e.m.f. constant.

In order to create the block diagram of system initial conditions are zero and Laplace transform is implemented to the equations. i.e.

Ea (s) = Ra.Ia (s) + sLa.Ia (s) + Eb (s)

Ia (s) = Ea (s) - Eb (s) (6)

sLa + Ra

Tm (s) = sJ.Ï‰m(s) + B.Ï‰m (s)

Ï‰m (s) = Tm(s) (7)

sJ + B

Tm(s) = KT.Ia(s) (8)

Eb (s) = Kb. Ï‰m(s) (9)

The block diagram relating the output Ï‰m (s) and the input Ea (s) is drawn.

## 2.3 Closed Loop Block Diagram

From equations (6), (7), (8) & (9), we easily draw the closed loop block diagram is shown in Figure 2.2 which contain three forward path blocks and one have backward path block.

## Figure 2.2: Block diagram of armature controlled D.C. Motor

## 2.4 Conclusion

The mathematical modelling of D.C. Servo Motor is completed. After modelling we seem that, easily draw the block diagram of system. The transfer function of

## Chapter 3

## Controller Designing for Proposed Drive

## 3.1 Introduction

In the earlier chapter the process of modelling a proposed drive has been described, now hereunder design of controller parameters, design of proportional plus integral controller, fuzzy controller designing is dealt with.

The basic type of controller is the Feedback Controller. In feedback control the variable required to be controlled is measured. This measurement is compared with a given set point. The controller takes this error and decides what action should be taken by the manipulated variable to compensate for and hence remove the error.

The advantage of this type of control is that it is simple to implement. Not only does the feedback control system require no knowledge of the source or nature of the disturbances, but it also requires minimal detailed information about how the process itself works. Feedback control action is entirely empirical. So long as an adjustment is being made in the correct sense then the control system should remove the effect of an external disturbance.

The disadvantage is that the disturbance has to enter and upset the system before it is eliminated.

## Proportional Plus Integral (PI) Controller

The control action of a proportional plus integral controller is defined as by following equation:

u(t) = Kp + Ki (3.1)

Where:

u(t) is actuating signal.

e(t) is error signal.

Kp is Proportional gain constant.

Ki is Integral gain constant.

The Laplace transform of the actuating signal incorporating in proportional plus integral control is

U (s) = Kp + Ki (3.2)

The block diagram of closed loop control system with PI control of D.C. Servo Motor System is shown in Figure 3.1. The error signal E(s) is fed into two controllers, i.e. Proportional block and Integral block, called PI controller. The output of PI controller, U(s), is fed to D.C. Servo Motor System. The overall output of D.C. drive, may be speed or position, C(s) is feedback to reference input R(s). Error signal can be remove by increasing the value of Kp, Ki.

## Figure 3.1: Block diagram of PI Control Action with D.C. Servo Motor System

However the feedback of control system is unity. If increases the gain of feedback the stability of system is decreases.

## Fuzzy logic controller

Fuzzy logic imitates the logic of human thought, which is much less rigid then the calculations computers generally perform. Consider the task of driving car. As we drive long, we notice that the stoplight ahead is red and the car in front of us is breaking. We (very rapid) thought process might be something like this: "I see that I need to stop. The road is wet because it's raining. The car is only short distance in front of me. Therefore, I need to apply significant pressure to the brake pedal immediately". This reasoning takes place subconsciously, of course, but that's the way our brains work in fuzzy terms.

Human brains does not base such decisions on the precise distance to the car ahead or the exact coefficient of friction between the tires and the road, as an embedded computer might. Likewise, our brains do not use Kalman filter to drive the optimal pressure that should be applied to the breaks at a given moment. Our brains use commonsense rules, which seem to work pretty well.

But when we finally get around to pressing the brake pedal, we apply an exact force, let's say 23.26 pounds. So although we reason in fuzzy terms, our final action is considerably less so. The process of translating the result of fuzzy reasoning to a non fuzzy action is called "defuzzification".

Fuzzy logic is recently finding wide popularity in various applications that include management, economics, medicine and process control system. The theory was introduced by "Zadeh" around 27 year ago, but only recently its application has received large moment. Fuzzy logic, unlike the crisp logic in Boolean theory, deals with uncertain or imprecise situations which are characterized by linguistic expressions, such as SMALL, MEDIUM, LARGE etc. these linguistic expressions are represented numerically by fuzzy sets (sometimes referred to fuzzy subset). Fuzzy set is characterized by membership function which varies from 0 to 1, unlike 0 & 1 of a Boolean set.

In fact fuzzy logic is a way of interfacing inherently along processes that move through a continuous range of value, to digital computer, that's likes to see things as well-defined discrete numeric values.

Although fuzzy theory deals with imprecise information, it is based on sound qualitative mathematical theory. A fuzzy control algorithm for a process control system embeds the intuition and experience of an operator, designer and researcher. The control does not need accurate mathematical model of a plant, and therefore, it suit well to process where the model is unknown or ill-defined of course, fuzzy algorithm can be refined by adaptation based on learning and fuzzy model of plant. The fuzzy control also works well for complex nonlinear multi-dimensional system, system with parameter variation problems, or where the sensor signals are not precise. Recently, it has been applied to fast response linear servo driving superior results. The fuzzy control is basically nonlinear and adaptive in nature, giving robust performance under parameter variation and load disturbance effect.

## Survey of Fuzzy Control Theory

A "fuzzy set" has a distinct feature of allowing partial membership. In fact, a given element can be a member of fuzzy set, with degree of membership varying from 0 (non-member) to 1 (full-member), in contrast to a "crisp" or conventional set, where an element can either be or not be part of the set. Figure 3.2 illustrates the difference for the case of a hypothetical temperature control system.

Cold Mild Hot

## (0F)

## (a) Crisp Set

Cold Mild Hot

## (0F)

## (b) Fuzzy Set

## Figure 3.2: Representation of Temperature using

## (a) Crisp Set (b) Fuzzy Set

In Figure 3.2 (a) the stator temperature of a motor as a Crisp variable can be defined the qualifying variables Cold, Mild or Hot. For corresponding Boolean values represented by straight-line segment Membership Function (MF), classification of variable is, when the temperature range below 550F, it belongs to the set cold (MF=1); between 550F to 650F, it belongs to the set Mild (MF=1); and above 650F, it belongs to the set Hot only (MF=1). The set are not members (MF=0) beyond the defined ranges.

In Figure 3.2 (b) corresponding, fuzzy values represented by a triangular or straight-line segment. These linguistic variables are defined as fuzzy set or fuzzy subsets. A "Membership Function" is a curve that defines how the values of fuzzy sets can have more subdivision such as Zero, Cold, Medium Cold, Medium Hot, Very Hot, etc. for more precise description of a fuzzy variable.

In Figure 3.2 (b) If the temperature below 400F, it belongs completely to the set cold, that is, the set cold by 30% (MF=0.3) and to the set Mild by 50% (MF=0.5). At temperature 600F, it belongs to the set Mild (MF=1) and not in the set Cold and Hot (MF=0). If the temperature is above 800F, it belongs completely to set Hot (MF=1), where MF=0 for Cold & Mild. The numerical interval (200F to 1000F) that is relevant for the description of a fuzzy variable is defined as universe of discourse in Figure .

A membership functions can have different shapes, the simplest and most commonly used membership function are formed using straight lines. Of these, the simplest is triangular membership function and it shown in Figure 3.2 (b), the other is the trapezoidal membership function. The straight line membership functions have advantage of simplicity. Other membership functions are Gaussian membership function, generalized bell membership function, Sigmiodal membership function, and Polynomial membership functions. In additions to these types, any arbitrary membership function can be generated by the user. In practice one may get along very well with just one or two types of membership functions, for example the triangle and trapezoid functions.

The "if then rule" Statements are used to formulate the conditional statements that comprise fuzzy logic. Hence fuzzy rule typically has an IF-THAN format as follows:

## IF(x is A AND y is B) THAN (z is c)

Where x, y and z are fuzzy variables and A, B and C are linguistic values defined by fuzzy sets on the ranges (universe of discourse) X, Y and Z respectively. The if part of rule "X is A and Y is B" is called the antecedent or premise, while the then-part of the rule "Z is C" is called the consequent. In order to design a fuzzy controller; a fuzzy rule base is consisting of several rules must be constructed. A few operations of Boolean theory are also valid in fuzzy set theory.

As for as the "Fuzzy Interface System" (FIS) is concerned it basically consist of a formulation of the mapping from a given input set to an output set using FL. This mapping process provides this basic form which the interface or conclusion can be made. A fuzzy interface process consists of the following steps:

Step1: Fuzzification of the input variables.

Step2: Application of fuzzy operator (AND, OR, NOT) in the IF (antecedent) part of the rule.

Step3: Implication form the antecedent to the consequent (THEN part of the rule).

Step4: Aggregation from the consequents across the rules.

Step5: Defuzzification is the process of converting a crisp input value to a fuzzy value is called "fuzzification". The result of the implication and aggregation steps is fuzzy output, which is the union of all the output of individual rules that are validated or "fired" conversion if this fuzzy output to crisp output is defined as "defuzzification". The input for the defuzzification process is a fuzzy set (the aggregate output fuzzy set) and the output is a single number. Various methods of defuzzification are:

Center of Area (COA) Method

Height Method

Mean of Maxima (MOM) Method

Sugeno Method

The example show in the Figure 3.3 demonstrates max-min interfacing and centroid defuzzification for a system with input variables "x", "y" and "z" and an output value provides the DOF (Degree of fulfillment) of a particular rule: variable "n". Note that "mu" is standard fuzzy-logic nomenclature ("truth value").

Notice how each rule provides a result as truth value of a particular membership function the output variable. In centroid defuzzification the values are OR'd, that is, the maximum value is used and values are not added, and the results are then combined using a centroid calculation.

## C:\Documents and Settings\Deepraj05\Desktop\3.jpg

## Figure 3.3: Centroid Defuzzification using Max-Min Interfacing

## General structure of fuzzy feedback control system

The General structure of fuzzy feedback control system is shown in Figure 3.4. Considering the fuzzy speed control of a D.C. Motor, where the speed error (E) and change in error (EC) are used to determined changes in the control input (CI).

The loop error (E) and change in error (CE) signals are converted to the respective per unit signals e and ce by dividing by the respective scale factors that is, e =E/GE and ce= EC/GC. Similarly, the output plant control signal U is derived by multiplying the per unit output by the scale factor GU, that is DU=dv*GU, and then summed the U signal. The advantage of fuzzy control in terms of per unit variable is that the same control algorithm can be applied to all the plants of the same family. Besides, it becomes convenient to design a fuzzy controller.

E:\Thesis report\untitled.bmp

## Fuzzy controller designing for the proposed drive

The fuzzy logic control is applied to the speed loop, replace in the conventional PI controllers. The objective is the control robustness in the presence of parameter variations and lode disturbance effect. However, both loops (speed and current) must satisfy the need of fast transient response with minimum overshoot.

The fuzzy system for speed loop is built by using the graphical user interface (GUI) tools provided by the Fuzzy Logic Toolbox in MATLAB environment. There are five primary GUI tools for building, editing and observing fuzzy interface system in fuzzy logic tool box:

Fuzzy Interface System Editor or FIS Editor

Membership Function Editor

Rule Editor

Rule Viewer

Surface Viewer

These GUI are dynamically linked, in that changes made to the FIS using one of them, can affect what can be seen on any of the other open GUI's. Any o all of them can be open for a given system.

## Fuzzy controller designing

The fuzzy interface system used for proposed drive is:

## FIS Name: Speed_Controller

## FIS Type: Mamdani

## Number of Inputs: 2

## Number of Outputs: 1

## Number of Rule: 49

## Defuzzification Method Used: Centroid Defuzzification

The general input variables considered in the fuzzy rule base are:

E(k) = R(k) - C(k)

CE(k) = E(k) - E(k-1)

Where

E(k) = loop error

CE(k) = change in loop error

R(k) = reference signal

C(k) = output signal

K = sampling interval

The structure of a general rule can be given as:

IF E(k) IS X AND CE(k) is Y THEN CI(k) IS Z

Where CI(k) is the change in the control setting X, Y and Z are the fuzzy subsets defined in the universe of discourse of E, CE and CI respectively.

The variable E, CE and CI are expresses in per unit quantities e(pu), ce(pu) and ci(pu). The representation of the variables in terms of per unit values permits flexibility in the design and tuning of the controller. The two input one output fuzzy controller developed by the FIS Editor of MATLAB Fuzzy Toolbox is shown in Figure 3.5.

## Figure 3.5: {FIS Editor} Two Input [error (E) & change in error (CE)] One Output [control input (CI)] Fuzzy System.

## FIS Name: Speed_Con; FIS Type: Mamdani

## (a)

## (b)

## (c)

## Figure 3.6: {Membership Function Editor} Membership Function for Speed Loop: (a) error (e (pu)) (b) change in error (ce (pu)) (c) control input (ci (pu))

Figure 3.6 shows the membership functions of e(pu), ce(pu) and ci(pu) variables. Note that the fuzzy subsets for each variable have symmetrical shape. This permits precision control near the steady state operating point, without unduly increasing the number of subsets. However, a finer partitioning for ci(pu) was necessary considering the sensitivity of this variable. These membership function as shown in Figure are developed in the Membership Function Editor of MATLAB's MATLAB Fuzzy Toolbox.

As fuzzy controller design is based on intuition and experience, instead of the system model, the following considerations were given in the beginning:

If both e(pu) and ce(pu) are zero, then maintain the present control U(k) (i.e., du(pu) = 0).

If e(pu) is not zero, but is approaching this value at satisfactory rate, the maintain the present control setting U(k).

If e(pu) is growing, then change in the control signal ci(pu) is not zero and its value depends on the magnitude and sign of e(pu) and ce(pu) signals.

Table 3.1 gives the rule matrix for speed controller. A close look at the rule base indicates that the auxiliary diagonal consists of Z elements which confirm to the second consideration as given above.

## Table 3.1: Fuzzy Speed Controller Rule Matrix

E

CE

NL

NM

NS

Z

PS

PM

PL

NL

NL

NL

NL

NM

NS

NS

Z

NM

NL

NL

NM

NS

NS

Z

PS

NS

NL

NM

NS

NS

Z

PS

PM

Z

NM

NM

NS

Z

PS

PM

PM

PS

NM

NS

Z

PS

PS

PM

PL

PM

NS

Z

PS

PS

PM

PL

PL

PL

Z

PS

PS

PM

PL

PL

PL

Note that the value assigned to ci(pu) depends on the distance from the auxiliary diagonal. The parameters e1, e2â€¦..., ce1, ce2â€¦â€¦â€¦, ci1, ci2â€¦â€¦â€¦.., are iterated to time the controller performance. The Rule Editor of MATLAB Fuzzy Toolbox is used to develop the rules as shown in Figure3.7.

## C:\Documents and Settings\Deepraj05\My Documents\My Pictures\Final Model\fuzzy\jk.JPG

## Figure 3.7: {Rule Editor} Controller Rules

The Rule Viewer of MATLAB Fuzzy Toolbox allows interpreting the entire fuzzy interface process at once. The rule viewer also shows how the shape of certain membership influences the overall result. The rule viewer shows one calculation at a time and in great detail. In this sense, it presents a sort of micro view of the fuzzy interface system. The rule viewer for the present fuzzy controller is shown in Figure 3.8.

## Figure 3.8: {Rule Viewer} Rule Viewer for Fuzzy Speed Controller Having 49 Rules (only 30 rules can be seen)

To see the entire output surface of the fuzzy system, that is, the entire span of the output set based on the entire span of the input set, the Surface Viewer is used. It gives the graphical representation of the concerned fuzzy controller. As shown in figure 3.9. The surface viewer gives the entire output surface of the present fuzzy speed controller system.

## Figure 3.9: {Surface Viewer} Graphical Representation of Fuzzy Speed Controller:

## X(input) = Error (E); Y (input) = Change in Error (CE);

## Z(output) = Control Input (CI).

## Conclusion

The basic concepts of PI control can be generalized within the same Structure PI controller design method was proposed to deal with both performance and robust stability. PI controller is designed effectively for the system and applied in both simulation and real-time mode. PI controller is commonly used to regulate the time-domain behavior of many different types of dynamic plants. This controller is popular because they can usually provide good closed loop response characteristics, can be tuned using relatively simple rules and are easy to construct. We need to approximate the integral term to form suitable for computation by a computer simulation.

To design the fuzzy logic controller, the speed control of the servo system configuration is designed based on 2 inputs and 1 output. Inputs for this controller are error (E) and change in error (CE) and the output is control input (CI), which is input for the motor. Fuzzification is where the quantization and membership functions for input variable, error (E) change in error (CE) and output variable, control input (CI), motor output in universe of discourse are defined. It involves the conversion of the input and output signals into a number of fuzzy represented values (fuzzy sets). The knowledge based of a fuzzy logic controller consists of a data based and a rule based. The basic function of the rule based is to represent the expert knowledge in the form of if-then rule structure. The fuzzy logic was derived into a 7 Ã- 7 rule which consist of 49 rules. For this system, max-min composition is used for the inference to obtain the fuzzy set describing the fuzzy value of the overall control output. 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 action. For this system, centroid method is used for defuzzification.

## Chapter 4

## Simulation and Response

## 4.1 Introduction

MATLAB, developed by Math Works Inc., is a software package for high performance numerical computation and visualization. The combination of analysis capabilities, ¬‚exibility, reliability, and powerful graphics makes MATLAB the premier software package for electrical engineers. The most important feature of MATLAB is its programming capability, which is very easy to learn and to use, and which allows user-developed functions. It also allows access to FORTRAN algorithms and C codes by means of external interfaces. There are several optional toolboxes written for special applications such as signal processing, control systems design, system identi¬cation, statistics, neural networks, fuzzy logic, symbolic computations, and others.

MATLAB has been enhanced by the very powerful SIMULINK program. SIMULINK is a graphical mouse-driven program for the simulation of dynamic systems. SIMULINK enables students to simulate linear, as well as nonlinear, systems easily and efficiently.

In previous chapters, the modelling, parameter estimation and controller designing of proposed drive are done. The equations developed in these chapters will now be used to simulate the present drive and analyze the responses. The computer simulation of present drive is done using the MATLAB simulator.

The simulation of proposed drive will perform in three modes:

Simulink model of D.C. Servo Motor at no load.

Simulink model of D.C. Servo Motor at constant load.

Simulink model of D.C. Servo Motor at load proportional to speed.

Designing of Simulink model, the PI and fuzzy blocks shown in Figure 4.1, this same Simulink model is designed for all above three modes.

## Simulink Model of Proposed drive for No Load

The Simulink model of proposed drive is shown in Figure 4.1. The parameter of system is same here but the load torque is zero. The step input is given at summing point which is shown in figure 4.1. However the step input is provided by MATLAB library. Although step input and unity feedback of speed is fed to summing point, the output of summing is fed into integral and proportional controller to reduce the steady state error. The output of integral controller and proportional controller, as input for fuzzy controller. Mux block use to combines its inputs into a single output and gave as input of fuzzy logic controller. The gained output from fuzzy controller is as controlled input of system.

This model is designed for No-Load, load torque is zero. The simulation time for this model is 10 sec. When start the simulation, the responses is finding in form of speed, torque and current through scopes as shown in Figure 4.2, Figure 4.3, Figure 4.4 respectively.

## Figure 4.1: Simulink Model for D.C. Servo Motor at No-Load; Simulation Time 10 sec.

## Speed Response

Figure 4.2 show the no load speed response. By analysis of speed response the rise time (tr) is 0.34 sec., peak time (tp) is 0.4 sec., settling time (ts) is 0.6 sec. and maximum overshoot (Mp) % is 0.1164%.

The value of rise time is time for the response to reach 100% of desired value of the output. The first overshoot is reached at 0.4 sec, called peak time, the percentage if overshoot is 0.1164. The settling time is time required to reach steady state at 0.6 sec.

## Figure 4.2: Speed Response of D.C. servo motor at No-Load

## Torque Response

Figure 4.3 show the No-Load torque response of D.C. Servo Motor. This torque also called developed torque or motor torque developed by motor. Due to no load, the influence of load torque does not oppose the developed torque. From equation (8), the developed torque is directly proportional to armature current. At the time of starting the current increases the torque is increases, but speed increases.

By the analysis of Figure 4.2 and Figure 4.3, found that as initially developed torque is zero, the speed is zero. As speed increase the speed the torque is also increase but when speed become constant the torque gradually decreased (minimized) almost zero and become constant.

## Figure 4.3: Torque Response of D.C. Servo Motor at No-Load

## Armature Current Response

The assessment of Figure 4.2 and Figure 4.3, the armature current is directly proportional to the torque. At the time of starting the armature current is high, when motor starts to rotates as speed increases the armature current increases. When speed become constant the armature current fall down and become constant.

C:\Documents and Settings\Deepraj05\My Documents\My Pictures\Final Model\untitled.bmp

## Figure 4.4: Current Response of D.C. servo motor at No-Load

## Simulink Model of Proposed drive for Constant Load

The Simulink model of proposed drive is shown in Figure 4.5. The parameter of system is same here but the load torque is constant. The step input is given at summing point which is shown in figure 4.5. However the step input is provided by MATLAB library. Although step input and unity feedback of speed is fed to summing point, the output of summing is fed into integral and proportional controller to reduce the steady state error. The output of integral controller and proportional controller, as input for fuzzy controller. Mux block use to combines its inputs into a single output and gave as input of fuzzy logic controller. The gained output of fuzzy controller is as controlled input of system.

This model is designed for Constant-Load. The simulation time for this model is 10 sec. When start the simulation, the responses is finding in form of speed, torque and current through scopes as shown in Figure 4.6, Figure 4.7, Figure 4.8 respectively.

## Figure 4.5: Simulink model for D.C. servo motor at Constant Load

## Speed Response

Figure 4.6 show the constant load speed response. By analysis of speed response the rise time (tr) is 0.34 sec., peak time (tp) is 0.4 sec., settling time (ts) is 0.6 sec. and maximum overshoot (Mp) % is 0.1164%.

The value of rise time is time for the response to reach 100% of desired value of the output. The first overshoot is reached at 0.4 sec, called peak time, the percentage if overshoot is 0.1164. The settling time is time required to reach steady state at 0.6 sec.

Here the speed response due to constant load as shown in Figure 4.6 is same as speed response due to no load as shown in Figure 4.2. There is no variation on speed due to change on no load to constant load.

## Figure 4.6: Speed Response of D.C. servo motor at Constant Load

## Torque Response

Figure 4.7 show the Constant Load torque response of D.C. Servo Motor. By the analysis of Figure 4.6 and Figure 4.7, found that as initially developed torque is zero, the speed is zero. As increase the speed the torque is also increase but when speed become constant the torque gradually decreased (minimized) almost zero and become constant.

C:\Documents and Settings\Deepraj05\My Documents\My Pictures\Final Model\untitled.bmp

## Figure 4.7: Torque Response of D.C. servo motor at Constant Load

## Armature Current Response

The assessment of Figure 4.7 and Figure 4.9, the armature current is directly proportional to the torque. At the time of starting the armature current is high, when motor starts to rotates as speed increases the armature current increases. When speed become constant the armature current fall down and become constant.

C:\Documents and Settings\Deepraj05\My Documents\My Pictures\Final Model\untitled1.bmp

## Figure 4.8: Armature Current Response of D.C. servo motor at Constant Load

## Simulink Model of Proposed Drive for Load Torque is Proportional to Speed

The Simulink model of proposed drive is shown in Figure 4.9 this model is designed for load torque is proportional to speed. The parameter of system is same here but the load torque is proportional to speed.

The responses are found when load toque is proportional to speed. This motor model is rotate at rated speed upto 4050 r.p.m. From Figure 4.9 the developed torque and load torque is feed to summing point. The load torque is negative because it opposes the developed torque. The responses found as shown in Figure 4.10, Figure 4.11 and Figure 4.12.

In this model a small changes in gain to get hold of desired output. The output of fuzzy controller feed in the gain block. This gain is augment upto 9.9 to get controlled output. From Figure 4.1 and Figure 4.5, the output value of fuzzy controller is feed in the gain block, the value of gain is 5.2, to boost the output of fuzzy logic controller. Conversely a trivial change in gain to get controlled output.

## Figure 4.9: Simulink model for D.C. Servo Motor at Load Torque Proportional to Speed

## Speed Response

Figure 4.10 show the constant load speed response. By analysis of speed response the rise time (tr) is 0.4 sec., peak time (tp) is 0.43 sec., settling time (ts) is 0.65 sec. and maximum overshoot (Mp) % is 0.0344%.

However, the load torque is proportional to speed, at the time of starting the load torque is high and motor take few time for rotate as shown in Figure 4.10.

## Figure 4.10: Speed Response of D.C. Servo Motor at Load Torque Proportional to Speed

## Torque Response

Figure 4.11 show the torque response when load torque proportional to speed of D.C. Servo Motor. By the analysis of Figure 4.10 and Figure 4.11, found that as initially torque is high, the speed is non zero. As increase the speed the torque is also increase but when speed become constant the torque gradually minimized and almost zero and become constant.

## Figure 4.11: Speed Response of D.C. Servo Motor at Load Torque Proportional to Speed

## Armature Current Response

The assessment of Figure 4.10 and Figure 4.12, at the time of starting the armature current is high, when motor starts to rotates as speed increases the armature current increases. When speed becomes constant the armature current fall down and become constant shown in Figure 4.12.

## Figure 4.12: Armature Current Response of D.C. servo motor at

## Load Torque Proportional to Speed

## 4.4 Conclusion

In this chapter, the simulation is completed for three different modes with three different models shown in Figure 4.1, Figure 4.5, and Figure 4.9, and got their responses. The simulation time is 10 sec. for all three modes. For no load the response of speed is constant. For constant load the response of speed is constant. Here condition no load and constant load the speed responses are same, the value of rise time, peak time, settling time and maximum overshoot are same as stated above. But in case of load proportional to speed, there are some certain changes in Simulink model as gain of fuzzy controller, the response of speed become constant as shown in Figure 4.9 however a small changes in the value of rise time, peak time, settling time and maximum overshoot as stated above.

Despite the fact that by using of Fuzzy Logic Controller the transient state is easily and promptly abolish and steady state come into sight before long.

## Chapter 5

## Analysis and Comparison of PI, PID & Fuzzy Controller with Results

## 5.1 Introduction

In previous chapters the modeling of D.C. Servo Motor, Proportional plus Integral Controller, Fuzzy Logic Controller has been described. The simulation of proposed drive has been completed, where fuzzy logic controller is used as a controller to control the speed of D.C. Servo Motor, in chapter 4.

In this chapter analyzing of conventional controllers i.e. PI & PID and advance controller i.e. Fuzzy Logic Controller (FLC). The Simulink models using PI, PID and FLC are designed for derived proposed drive. Here all models are designed for constant load.

## 5.2 Simulink Model using PI Controller for Derived D.C. Servo Motor Drive

Figure 5.1 show the PI controller Simulink model. In this Model two PI controllers are used. First PI controller is used for speed control and Second PI controller is used for Current Control. This Model is designed for constant load (load torque is constant).

The Integral Gain (Ki) and Proportional Gain (Kp) has same value for both PI controllers. The speed error signal is feed in first PI controller and current error signal is feed second PI controller. PI controller is used to minimize the error signal. The controlled input is found for motor system. The speed response shown in Figure 5.2.

## Figure 5.1: PI Simulink Model for D.C. Servo Motor at Constant Load

## 5.2.1 Result

When start simulation (run) of D.C. servo motor model with PI controller, shown in Figure 5.1, the simulation takes 50 sec. (called simulation time) to complete the process. When simulation is completed the result is found shown in Figure 5.2. By analysis of result the rise time (tr) is 2.0792 sec. peak time (tp) is 4 sec. settling time (ts) is 15.4 sec. and maximum overshoot (Mp %) is 19.02% is obtain.

C:\Documents and Settings\Deepraj05\My Documents\My Pictures\Final Model\untitledpi.bmp

## Figure 5.2: Speed Response of D.C. Servo Motor at Constant Load

## 5.3 Simulink Model using PID Controller for Derived D.C. Servo Motor Drive

The proposed D.C. Servo Motor drive is controlled by PID Controller. The parameter of Proportional Gain (Kp) is 20, Integral Gain (Ki) is 150 and Derivative Gain (Kd) is 25 is used to decrease the transient response. The error signal (difference of step input and feedback) is feed to PID controller.

The PID controller is minimized the error signal. The speed response shown in Figure 5.4.

## Figure 5.3: PID Simulink Model for D.C. Servo Motor at Constant Load

## 5.3.1 Result

When simulation starts the D.C. servo motor model with PID controller, shown in Figure 5.3, gave the response in scope shown in Figure 5.4. The simulation takes 50 sec. to complete the process. By analysis of Figure 5.4, the specifications of transient response are found:-

Rise time (tr) = 2.2395 sec.

Peak time (tp) = 2.75 sec.

Settling time (ts) = 4.4 sec.

Maximum overshoot (Mp%) = 0.6%.

Here the rise time, peak time, settling time and maximum overshoot is minimized.

## Figure 5.4: Speed Response of D.C. servo motor at Constant Load

## 5.4 Simulink Model using Fuzzy Logic Controller for Derived D.C. Servo Motor Drive

The proposed D.C. Servo Motor drive is controlled by Fuzzy Logic Controller. The parameter of Proportional Gain (Kp) is 10, Integral Gain (Ki) is 5, is used to decrease the transient response. The error signal (difference of step input and feedback) is feed to Fuzzy Logic controller through PI controller. The output of fuzzy logic controller is controlled input for D.C. Servo Motor system. By using of fuzzy logic controller the simulation time is minimized, 10 sec. Because of minimized simulation time the system become faster than conventional controllers.

## Figure 5.5: Fuzzy Simulink Model for D.C. Servo Motor at Constant Load

## Result

When simulation starts the D.C. servo motor model with Fuzzy Logic Controller, shown in Figure 5.5, gave the response in scope shown in Figure 5.6. The simulation takes 10 sec. to complete the process. By analysis of Figure 5.6, the specifications of transient response are found:-

Rise time (tr) = 0.34 sec.

Peak time (tp) = 0.4 sec.

Settling time (ts) = 0.6 sec

Maximum overshoot (Mp %) = 0.1164%.

Here the rise time, peak time, settling time and maximum overshoot is minimized.

## Figure 5.6: Speed Response of D.C. servo motor at Constant Load

## Comparative Chart

Reconcile all the result in Table-2. In this chapter three different models are designed and three different transient response specifications are obtained.

Table-5.1: Transient Response Specifications

Rise time (tr) (sec)

Peak time (tp) (sec)

Settling time (ts) (sec)

Max. Overshoot (Mp) %

PI Controller

2.0792

4

15.4

19.02

PID Controller

2.2395

2.75

4.4

0.6

Fuzzy logic Controller

0.34

0.4

0.6

0.1164

The comparative chart for results is shown in Figure 5.7. The chart is drawn in 3D, the Blue cylindrical block show the Rise time, Red cylindrical block show the Peak time, Green cylindrical block show the Settling time and Violet cylindrical block show the Maximum Overshoot.

The height of blue cylindrical block shows the values of rise time, transient specification, for different-2 controller. For fuzzy controller the rise time is minimum then PI and PID controllers. This result is better rise time for proposed D.C. Servo Motor model.

The height of red cylindrical block shows the value of peak time for different controllers. The peak time for PI is greater than PID and Fuzzy Logic Controller. The peak time in fuzzy controller is minimum. The result of Fuzzy Logic Controller show the better peak time for proposed D.C. Servo Motor model.

The height of green cylindrical block shows the value of settling time for different controllers. The settling time for fuzzy controller is minimum than PI and PID controllers. The settling time is time to settle down the aforesaid oscillations. The settling time founded by Fuzzy Logic Controller is better time to reach steady state.

The height of violet cylindrical block shows the percentage value of maximum overshoot for different controllers. The response of PI controller has greater overshoot than PID and Fuzzy Logic Controller.