A PROJECT REPORT ON Speed Contro Control l of DC Servo Servo Motor Motor using using PID PID Controller Based on MATLAB
SUBMITTED BY: MANVENDRA KUMAR SINGH Reg.No.-120101EER039
Branch –EEE
Under the guidance of Mr.k.dhananjay Rao Assistance professor EEE CUTM, Paralakhemundi
1
Speed Control of DC Servo Motor using PID Controller Based on MATLAB SUBMITTED TO
CENTURION CENTURION UNIVERSITY OF TECHNOLOGY AND MANGEMENT MANG EMENT PARALAKHEMUNDI
SUBMITTED SUBMITTED BY
SUPERVISED BY
Manvendra Kumar singh 120101EER039 Branch: - EEE
Mr.k.dhananjay Rao Assistance professor EEE CUTM, Paralakhemundi Paralakhemundi 2
CENTURION UNIVERSITY OF TECHNOLOGY AND MANAGEMENT :-ELECTRICAL & ELECTRONICS ENGINEERING DEPARTMENT :-
This is to certify that the project report entitled SPEED CONTROL OF DC SERVO MOTOR USING PID CONTROLLER” CONTROLLER ” that is being submitted by Manvendra Kumar singh for the award of the Degree of Bachelor of Technology in Electrical and Electronics Engineering to the CENTURION UNIVERSITY is a record of bonafide work carried out by him under my guidance and supervision. “
Mr. K.madhava Rao HOD, EEE CUTM, Paralakhemundi Paralakhemundi
Mr.k.dhananjay Mr.k.dhananjay Rao Assistance professor EEE CUTM, Paralakhemundi Paralakhemundi 3
Abstract This paper is to design PID controller to supervise and control the speed response of the DC servo motor and MATLAB program is used for calculation and simulation PID controllers are widely used in a industrial plants because of their simplicity and robustness. Industrial processes are subjected to variation in parameters and parameter perturbations. We are choosing PID parameters and discussed
Key words: DC servo motor, PID controller, MATLAB representation
4
INTRODUCTION Electrical motor servo systems are indispensable in modern industries. Servomotors are used in a variety of applications in industrial electronics and robotics that includes precision positioning as well as speed control Servomotors use feedback controller to control the speed or the position, or both. The basic continuous feedback controller is PID controller which possesses good Performance. However is adaptive enough only with flexible tuning. Although many advanced control techniques such as self-tuning control, model reference Adaptive control, sliding mode control and fuzzy control have been proposed to improve system performances, the conventional PI/PID controllers are still dominant in majority of real-world servo systems . To implement a PID controller the proportional gain KP, the integral gain KI and the derivative gain KD must be determined carefully. Many approaches have been developed to determine PID controller parameters for single input single output (SISO) systems.
5
Mathematical Modeling of Armatur Mathematical Armature e Controlled Control led DC Servo Motor DC Servo Motor The motors which are utilized as DC servo motors, generally have
separate DC source for field winding and armature winding. The control can be archived either by controlling the field current field current or armature current. Field control has some specific advantages over armature control and on the other hand armature control has also some specific advantages over field control. Which type of control should be applied to the DC servo motor, is being decided depending upon its specific applications.
The motor is paired with some type of encoder encoder to provide position and speed feedback. In the simplest case, only the position is measured. The measured position of the output is compared to the command position, the external input to the controller. If the output position differs from that required, an error signal is generated which then causes the motor to rotate in either direction, as needed to bring the output shaft to the appropriate position. As the positions approach, the error signal reduces to zero and the motor stops
6
MODELING A DC servo motor is used in a control system where an appreciable amount of shaft power is required. The DC servo motors are either armature-controlled with fixed field, or field-controlled with fixed armature current. DC servo motors used in instrument employ a fixed permanent-magnet field, and the control signal is applied to the armature terminals.
Ra = armature-winding resistance, ohms La = armature-winding inductance, henrys Ia = armature-winding current, amperes If = field current, amperes Ea = applied armature voltage, volts Eb = back emf, volts = angular displacement of the motor shaft, radians T = torque delivered by the motor, lb-ft J = moment of inertia of the motor and load referred to the motor shaft, slug-ft2. f = viscous-friction coefficient of the motor and load referred to the motor shaft, lb-ft/rad/sec
Flux produce is directly proportional to filed current
∅ ∅ = K I
f f
7
Torque produced is proportional to product of flux and armature current
∝ ∅I T K ’∅ ∗I
Tm
a
m=
m
a
Tm = Km’*Kf * If * Ia …………………………………………………………..(2)
Back emf is directly proportional to shaft velocity ( wn) as flux constant
∅ is
∝ () E ∝ n
b
Eb
=
Kb
() ……………………………………………………(3)
Apply KVL to armature ar mature circuit circuit
La
n (s)
+R I + E a a
a
= Ea
Taking a lapalas transfer function (Ra + sLa)*Ia(s) + Eb(s) = Ea(s)
( ()−()…………………………………………(4) + ( ) ( −∗∗() I (s) = + Ia(s) = a
Now
Tm = Tm =
Km’*Kf * Ia*If(s) Km
( ) ( −∗∗() *( ’*K * I *( + )………………(5) f
f
8
Here shaft torque Tm is used for driving load against the inertia and frictional Torque
= J ………………………………………………(6)
Tm
m
Taking lapalas transfer function
() () …………………………….(7)
Tm(s) = Jm
Equating equation (5&7)of Tm Since If is neglected
′() = [ ∗ ∗ ∗ ( )]() () = ∗ () ′ ∗ ∗ ∗ ( )( )( ) Where Km’Kf = Km
() = () ∗ ∗ ( ( )( )( ) ) () = () ∗ ∗ 1 1 motor time constant Where = = Armature time constant () = (1)(1) () 1 (1 (1 )( )(11 ) ) 9
G(s) =
(+)(+)
H(s) = Kb*S DC
Servomotor parameter values.
Parameter
Value
Moment of Inertia( J)
0.001
Damping Coefficient( B)
Nms²/rad
0.1 Nms/rad
Torque constant ( Kt)
0.01 Nm/A
Electromotive force constant (Ke)
0.01 Vs/rad
Electrical Resistance ( R)
1 Ohms
Electrical Inductance( L)
0.5 Henry
The transfer function of the output angular speed is derived using Laplace transform using the second order system equation:
²++²
G(s) =
The resulting Transfer function:
= ...................................................... (v) (+)( +)(+ +))+² ...................................................... From Equation the relationship between the angular position and the
speed can be found by multiplying the angular position by . Our major 10
concern on this research is the proper control of the angular speed o f the motor; since the angular speed is the part that suffers the th e most from the non-linear ties. The angular non-linear effect on the angular position
tends to be less due to the term used to derive de rive it , which adds an integral effect or filter effect to this part. Figure 2 shows the block diagram which represents the servomotor system using MATLAB SIMULINK
DC Servo Motor Response
The response of the DC servo motor can be considered as a second order system. A second order system will have a natural frequency ω, a damping factor ς. The general response of a second order system system with a step input is shown in Figure 3. From the response of the second order system we can get some of the characteristics of the system, and the design criteria can be implemented using these characteristics. Different parameters can be used to evaluate the response of the dc motor; by adjusting the value of these parameters paramet ers we can reach 11
our design goal. M p is the overshoot value, t s is the settling time and β is the allowable error tolerance. These three parameters can define the design criterion and output response of any second order system response. The ideal system response will have a zero overshoot, zero settling time and zero tolerance, but in real life achieving the ideal response will be hard and will have a high cost of implementation. So, the solution can be found by defining an accepted range for the values of the three parameters mentioned before to achieve a good system response for a specific application .
12
CONTROLLER The combination of proportional, integral and derivative control action is called PID control action. PID controllers are commonly used to regulate the time-domain behavior of many different types of dynamic plants. These controllers are extremely popular because they can usually provide good closed-loop response characteristics. Consider the feedback system architecture that is shown in Fig. 1 where it can be assumed that the plant is a DC motor whose speed must be accurately regulated.
The PID controller is placed in the forward path, so that its output becomes the voltage applied to the motor's armature the feedback signal is a velocity, measured by a tachometer .the output velocity signal C (t) is summed with a reference or command signal R (t) to form the error signal e (t). Finally, the error signal is the input to the PID controller.
= ∫ ∫ 13
PROPORTIONAL CONTROL:
The proportional part of PID examines the magnitude of the error and it reacts proportionally. A large error receives a large response. For example, if there is a large temperature error, the fuel valve would be opened a lot. On the other hand, a small error receives a small response. In mathematical term, the proportional term (Pout) is expressed as: Pout = Kp*e Where: Pout: Proportional portion of controller output Kp : Proportional gain e : Error signal, e = Set-point – Process Variable The following figure illustrates a proportional control and shows that there is always a steady state error in proportional control. The error will decrease with increasing gain, but the tendency towards oscillation will also increase
14
There are issues with proportional control only. One of them is that proportional control cannot compensate very small errors (these errors are also known as offset.) Another issue is that it cannot adjust its output based on the rate of change in the measured variable. Proportional controllers only respond to the magnitude of the error, not to its rate of change. INTEGRAL CONTROL:
To address the first issue with the proportional control, integral control attempts to correct correct small error (offset). Integral examines the error error over time and increases the importance of even a small error over time. Integral is equal to error multiplied by the time the error has persisted. A small error at time zero has zero importance. A small error error at time 10 has an importance of 10 times times error. In this manner, integral increases the response of the system to a given error over time until it is corre cted.
Integral can also be adjusted and the adjustment is called the reset rate. Reset rate is is a time factor. The shorter the reset rate the quicker quicker the correction of an error. However, too short a reset rate can cause erratic performance. In hardware-based systems, the adjustment can be done by a potentiometer changing the time time constant of a RC circuit. circuit. Most of today’s applications use software based control such as PLC module in which the engineer changes the parameter of reset rate. The mathematical expression of an integral-only controller ( Iout) is:
15
Where: Iout: Integral portion of controller output Ti: Integral time, or reset time Ki: Integral gain e : Error signal, e = Set-point – Proce P rocess ss Variable
DERIVATIVE CONTROL :
The derivative part of the control output attempts to look at the rate of change in the error signal. Derivative will cause a greater system response to a rapid rate of change than to a small rate of change. In other words, if a system’s error continues to rise, the controller must not be responding with sufficient correction. Derivative senses this rate of change in the error and provides a greater response. Derivative is adjusted as a time fact or and therefore is also called rate time. It is essential that too much derivative should not be applied or it can cause overshoot or erratic control. In mathematical term, the derivative term (Dout) is expressed as:
Where: Dout: Derivative portion of controller output output Td: Derivative time Kd: Derivative gain e : Error signal, e = Set-point – Proce P rocess ss Variable 16
Transfer function for PID is:
C(s)=K (1+ + T ₁ p
d s)
The proportional control (K p) is used so that the control signal u(t) responds to the error immediately. But the error is never reduced to zero and an o mffset error is inherently present. To remove the offset error the integral control action ( ) is used. The Derivative control ( Td) is used to damped out oscillations in the process response. By tuning the gains of the PID controller and producing the optimum response using trial and error method.
₁
17
TUNNING OF PID The second part of setting a PID is to tune or choose the numerical value of the PID parameters. PID controllers are tuned in terms of P, I and D. Tuning the control gains may result in the following improvement of response: Proportional gain (Kp) : Larger proportional gain typically means faster response, since the larger the error, the larger the proportional term compensation. However, an excessively large proportional gain may result in process instability and oscillation. Integral gain (Ki): Larger integral gain implies steady-state errors are eliminated faster. However, the tradeoff may be a larger overshoot, since any negative error integrated during transient response must be integrated away by positive error before steady state can be reached. Derivative gain (Kd): Larger derivative gain decreases overshoot but slow down transient response and may lead to instability due to signal noise amplification in the differentiation of the error.
The following table lists some common tuning methods and their advantages and disadvantages. The choice of method will mostly depend on whether or not the loop can be taken offline for tuning, and the response time of the system. If the system can be taken offline, the best tuning method often involve s subjecting the system to a step change in input, measuring the output as a function of time, and using this response to determine the control parameters. Manual tuning methods can be quite inefficient, especially if the loops have response times on the order of minutes or longer.
18
Ziegler-Nichols (ZN) Method
Ziegler-Nichols (ZN) method is a conventional PID tuning method. This method is widely used for design of various controllers. Ziegler-Nichols presented two methods. Step response method Frequency response method. In this Paper frequency response method is discussed for tuning the PID controller. FIRST METHOD (RECTION CURVE METHOD): In this method, we obtain experimentally the response of the plant to a step input as shown in fig. This method applied if the response to a step input exhibit an s-shaped curve. Such a step response curves may be generated experimentally or form dynamic simulation of the plant.
19
The S-shaped curves may be characterized by two constant delay time ‘L’ and time constant ‘T’the delay time and time constant are determined by drawing a tangent line at the inflection point of the Sshaped curved and determining the intersection of the tangent with the time axis and line C(t) = K as shown in figure. The table gives the value of Kp, Ki and Kd for step response plant. Controller Kp Ki Kd P T/L Infinite 0 PI 0.9*(T/L) L/0.3 0 PID 1.2*(T/L) 2L 0.5L The table shows Ziegler Nichols Tuning Rules Based on step response of plant The transfer function a transport lag as for
() may approximated by first order system with ()
() = () + 20
Ziegler and Nichols suggested to set the value of Kp, Ki and Kd according to the formula shown in table. The PID control tuned by the Ziegler –Nichols rules gives
+Kd S] 0. 5 = 1.2* [1 + + = 0.6*T∗
G(s) = Kp*[1+ G(s) G(s)
In this paper the Second method of Zeigler-Nichols method of
tuning of PID, also called the Continuous cycling method or or Closed loop method, is used SECOND METHOD:
In this method derivative time ( ) is set to zero and integral time ( ) set to infinity. This is used to get the initial PID setting of the systems. The critical gain (Kcr) and periodic oscillations ( cr) are determined by using R-H criteria. Kcr is determined by equating the row containing ‘s’ in R-H row to zero. cr is determined by equating the row containing‘s^2’ in R-H row to zero. Evaluate parameters described by ZN method. Values of p, are determined by using the formulas given in below
Control type Kp Ki Kd P 0.5Kcr infinite 0 PI 0.45Kcr (1/0.2)Pcr 0 PID 0.6Kcr 0.6Kcr 0.5Pcr 0.125Pcr The table shows Ziegler-Nichols Tuning Rules based on critical Gain Kcr and critical Pcr
21
The PID controlled tuned by the continuous cycling method of ZieglerNichols method gives
∗ ∗ ∗ ] 125 ∗ ∗ ] G(s) = 0.6*Kcr*[1+ .∗ 0.125
G(s) = KP*[1+
+ G(s) = 0.075*Kcr*Pcr* Thus the PID controller has a pole at the origin and double zeros at s =
−4
Calculation of Kcr and Pcr :
As we know that the transfer function of dc servo motor
= )(+ ) +(+ Put the value of (La, Ra, Km, Kb, Bm, Jm) By using Ziegler-Nichols second method and we get Kcr = 13.2 Pcr = 0.4236807355 And find Kp, Ti and Td Kp 7.92
Ti 0.2118403678 0.2118403678
Td 0.05296009194 0.05296009194
22
Simulink Model Of DC Servo Motor Control Without PID:
23
With PID:
24
Comparison with PID and without PID:
25
CONCLUSION: This thesis presents study on MATLAB based real-time control implementation of the DC servo motor using PID controller. So, the need for a closed loop control system was realized. For different values of KP, Ki and Kd were implemented & various response were found. It was observed that the speed output of the closed loop control system successfully tracks the reference. Thus, the different controller i.e. PI, PD&PID were implemented &the response for different controller were successfully observed.
26