You are on page 1of 6

Mechatronics Department of Mechanical Engineering

Experiment No. 6

PID Control Implementation on DC Motor Speed Control System

Aim: To design and tune a Proportional Integral Derivative controller for precise speed control
of a DC motor.

Objectives: The objectives of this lab work are to:

1. Understand the working of a DC motor.


2. Design a PID control algorithm to control the speed of a DC motor.
3. Discuss the effect of P, PI, PD and PID controller on the response of the DC motor.

DC motor:

All conventional electric motors consist of a stationary element and a rotating element, which are
separated by an air gap. In dc motors, the stationary element consists of poles, which are
constructed of laminated assemblies with coils wound round them to produce a magnetic field.
The function of the laminations is to reduce the losses incurred by eddy currents. The rotating
element is traditionally called the “armature” and this consists of a series of coils located
between slots around the periphery of the armature. The armature is also fabricated in
laminations, which are usually keyed onto a location shaft.

Figure 1: Construction and operating principle of DC motor.

The operating principle of a dc motor is illustrated in Figure 1. The single coil is located between
the opposite poles of a simple magnet. When the coil is aligned in the vertical plane, the
conventional flow of electrons is from the positive terminal to the negative terminal. The supply
is through the brushes, which make contact with the commutator segments. From Faraday’s laws
of electromagnetic induction, the “left-hand rule,” the upper part of the coil will experience force

D.Y. Patil College of Engineering, Akurdi, Pune- 44 1


Prepared By: - Mr. A. R. Chaple
Mechatronics Department of Mechanical Engineering

acting from right to left. The lower section will be subject to a force in the opposite direction.
Since the coil is constrained to rotate, these forces will generate a torque, which will tend to
make the coil to rotate.

Speed control of DC motor:

The block diagram for PID based speed control of DC motor is shown in Figure 2. The PID
controller generates a control signal, u, to correct the error, e, between the measured speed and
the desired speed.

Figure 2: Block diagram representation for PID based Speed Control of DC motor.

Simulink model for speed control of DC motor:

®
Simulink is a block diagram environment for multidomain simulation and Model-Based
Design. It supports simulation, automatic code generation, and continuous test and verification of
embedded systems. Simulink provides a graphical editor, customizable block libraries, and
®
solvers for modeling and simulating dynamic systems. It is integrated with MATLAB , enabling
you to incorporate MATLAB algorithms into models and export simulation results to MATLAB
for further analysis.

To know more about Simulink, visit http://in.mathworks.com/products/simulink/

The Simulink model for speed control of DC motor is shown in Figure 3.

Figure 3: Simulink model for PID based speed control of DC motor.

D.Y. Patil College of Engineering, Akurdi, Pune- 44 2


Prepared By: - Mr. A. R. Chaple
Mechatronics Department of Mechanical Engineering

In Figure 3, the:

 Setpoint block is used to assign the desired speed, 


 PID block is used to assign gains of P, I and D, 
 Load Torque block is used to apply load to the DC motor, 

 Scope to visualize output block is used to see the output (control signal, desired speed
 and measured speed) and 
 Saving Ouput block is used to save the output so that it can be plotted separately. 

The model of the DC motor, considered for the simulation purpose, is shown in Figure 4. The
values assigned to the parameters in this model can be seen / edited by double clicking on the DC
motor block (green block) in the Simulink model from Figure 3. Since the DC motor model is
masked, connectors are used to connect to input/output. For e.g. connector 2 is used as a
connector between the Load Torque and the DC motor.

Figure 4: Model of DC motor considered for simulation purpose.

Analysis of speed control using PID:

The comparison between the desired and the measured speed of the DC motor, un-controlled, is
shown in Figure 5. It can be seen that the DC motor, with its inherent dynamics, is not capable
enough to track the desired speed.

The comparison between the desired and the measured speed of the DC motor, Proportional-
controlled (kp=5), is shown in Figure 6. It can be seen that while the measured speed is much
closer to the desired speed and the rise time is fast, some steady state error is still present. Thus,
Intergral term needs to be added. In addition, there is no overshooting of the response and, thus,
there is no need to implement the derivative term.

The comparison between the desired and the measured speed of the DC motor, Proportional
Integral-controlled (kp=5, ki=2), is shown in Figure 7. It can be seen that the steady state error is
now zero.

D.Y. Patil College of Engineering, Akurdi, Pune- 44 3


Prepared By: - Mr. A. R. Chaple
Mechatronics Department of Mechanical Engineering

Figure 5: Comparison between desired and measured speed of DC motor, un-controlled.

Figure 6: Comparison between desired and measured speed of DC motor, P-controlled.

D.Y. Patil College of Engineering, Akurdi, Pune- 44 4


Prepared By: - Mr. A. R. Chaple
Mechatronics Department of Mechanical Engineering

Figure 7: Comparison between desired and measured speed of DC motor, PI-controlled.

Conclusion

__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________

D.Y. Patil College of Engineering, Akurdi, Pune- 44 5


Prepared By: - Mr. A. R. Chaple
Mechatronics Department of Mechanical Engineering

D.Y. Patil College of Engineering, Akurdi, Pune- 44 6


Prepared By: - Mr. A. R. Chaple

You might also like