Professional Documents
Culture Documents
Experiment No. 6
Aim: To design and tune a Proportional Integral Derivative controller for precise speed control
of a 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.
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
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.
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 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.
In Figure 3, the:
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.
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.
Conclusion
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________