0% found this document useful (0 votes)
27 views18 pages

DC Motor New

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views18 pages

DC Motor New

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

DC Motor Position

ABSTRACT
A speed control system for a DC motor can be considered as a basic example of feedback control when
analyzing dynamic systems. This article investigates a design of a PID controller whose main purpose is
to control the speed of a DC motor while maintaining certain limits: settling time, overshoot, ability to
eliminate steady state error etc. The dynamic behavior of a DC motor is described in the Laplace model
and its transfer function constructed as a function of the electrical and mechanical properties of the motor.
The evaluation of the performance of the defined control system is done in terms of the closed-loop step
response of the system, the Proportional controller response is evaluated first and it is observed that there
is high steady-state error and overshoot performance. Some remedial measures are taken, in that, an
integral term is provided to take care of the steady state error and theopeinc on Kd reduced the overshoot.
The controller PID has three tuning parameters namely; proportional gain (Kp), integral gain (Ki),
derivative gain (Kd) in order to enhance the efficacy these parameters are adjusted. The last controller
design has satisfied the requirements and achieved a steady state error of nearly zero, settling time of less
than 2 seconds and an overshoot of less than 5%. This case study emphasizes on the practice of PID
control in the regulation of motor speed, and the tuning of parameters that a controller can possess to
ensure the system responds as desired in practical situations.

Contents
ABSTRACT .................................................................................................................................................... 1
System modeling........................................................................................................................................... 2
Dc motor in Matlab Simulink ................................................................................................................... 2
Introduction ................................................................................................................................................... 3
Theory and Background ................................................................................................................................ 3
DC Motor Dynamics ................................................................................................................................. 3
System equations ...................................................................................................................................... 3
Step Response of Open loop transfer function of motor through matlab coding .......................................... 5
PID Control ................................................................................................................................................. 12
Conclusion .................................................................................................................................................. 14
References ................................................................................................................................................... 14
Appendix ..................................................................................................................................................... 15
System modeling

Figure 1 Physical setup

Dc motor in Matlab Simulink

Figure 2 Simulink model


Introduction

The applicability of DC motors in different applications is high given that they are user-friendly in design,
control, and even cost. Such motors are important in systems that require specific rotational speeds, for
example, robotics, conveyor systems, and electric vehicles. In many cases, it is particularly important to
control the speed of the motor within performance ranges, such as a fast response time, a small steady
state error, and an overshoot. Therefore, it goes without say that being able to regulate the speed of a DC
motor is pivotal in enhancing the performance of the entire system. Due to its effectiveness and wide
applicability, speed control of DC drives employs the PID (Proportional-Integral-Derivative) controllers
the most. A PID controller calculates an error value as the control tent from the setpoint to the process
variable actual motor shaft speed, and adapts in a proactive way corrective actions to the motor speed
using three terms: proportional, integral and derivative. This is do ne in a bid to eliminate the error with
time, reduce the oscillation and enhance stability which is the other reason why PID controllers are used
in systems where control is quite accurate and active for good performance. The aim of this project is to
carry out a design of a PID controller used for the speed control of a DC motor. Response of closed-loop
system will be assessed by analyzing its performance indices including settling time, overshoot, and
steady-state error. The design includes adjusting the Parameters of the PI Controller (Kp, Ki, and Kd) in
order to give the best result when the System is subjected to different load conditions. This project
mirrors how PID control can be applied in the day to day running of motor control systems ‘real life’
situations..

Theory and Background


DC Motor Dynamics
Mechanical energy may also be described using an electric motor which converts the electrical energy of
direct current (DC) into rotational energy. The performance capability in turn of a DC motor which may
also include speed control is of importance in a wide range of applications from building a robot to line
automation in factories. The speed of the motor on the other hand is dependent on various factors such as
input voltage, load and motor characteristics, among others.The motion of a DC motor may also be
described in a linear fashion by a set of differentials that connects the input voltage, speed of the electric
motor and the resulting torque. In the case of a rudimentary DC motor, two major variables are of interest,
namely the armature current i(t) as well as the angular velocity ω(t).

System equations
The governing equations for a DC motor are

1. Voltage Equation: The voltage applied to the motor V(t) is related to the armature current i(t)
and the back EMF Eb(t)
here

 V(t) is the input voltage,

 R is the resistance of the armature,

 L is the inductance of the armature,

 i(t) is the armature current,

 Eb(t) is the back electromotive force (EMF), which is proportional to the motor speed

2. Back EMF Equation: The back EMF is

here

1. Ke is the motor constant (back EMF constant),

2. ω(t) is the angular velocity of the motor.

3. Mechanical Equation: The motor’s mechanical behavior is governed by Newton’s second law
for rotation:

Where:

1. J is the moment of inertia of the motor's rotor,

2. b is the damping coefficient (friction),

3. T(t) is the torque generated by the motor, which is related to the armature current.

4. Torque Equation: The torque generated by the motor is proportional to the armature current:

Where:

1. Kt is the motor constant (torque constant).


By combining these equations, we can derive the transfer function of the DC motor, which relates
the input voltage to the output angular velocity

Solving for the Transfer Function

Multiply through by Kt to simplify

The transfer function

Putting values

Step Response of Open loop transfer function of motor through matlab coding

Figure 3 step response of transfer function


State-Space Representation

Define the state variables as

1. x1=θ (angular position)

2. x2=θ˙ (angular velocity)

3. x3=i (armature current)

Then

From the mechanical equation

From the electrical equation

Now by putting values in equations

J=3.2284×10−6kg⋅m2

b=3.5077×10−6N⋅m⋅s

K=0.0274Nm/A (we’ll use K for both motor torque constant and back emf constant)

R=4Ω

L=2.75×10−6H
State-Space Matrices

Now, we can write the state-space representation


Bode Plot of Dc motor

Figure 4 Bode plot

Step Response with pid

Figure 5 Response with PID


Loot Locus of Dc Motor

Figure 6 root locus

Step response with Root Locus with Controller

Figure 7 response with Root Locus with Controller


Step Response with Digital PID

Figure 8 response PID Controller

Figure 9 System Information


Observer design

Figure 8 observer performance


PID Control
The Proportional-Integral-Derivative (PID) control is a very popular type of feedback control
strategy designed to adjust the control input to the system in an attempt to achieve a desired state
by means of three terms: the proportional, integral, and derivative terms.

In terms of closed loop control systems the most fundamental is proportional control, whose
output is a linear function of the present error at any time instant. The error determines the
amount of the corrective action taken; the bigger the error, the more appropriate actions are taken.
The proportional gain Kp is the factor that controls this action. Nevertheless in certain systems it
is observed that the use of only a proportional controller may produce an offset known as steady-
state error.In many applications of automatic control an integral response termed as I is utilized. It
works to eliminate steady state errors by allowing the controller to integrate the error over a
period of time. It adds up the previous errors and corrects the control signal to void the persistent
steady state error. The integral gain Ki collaborates in mitigating the effort to control the
persistent error and it Ki also controls the level of integration of the error over time.Derivative
Term (D) The derivative term computes the rate of change of the error to anticipate future
mistakes. It also acts as a damper in the system to oppose the quick alteration of the error thus
enhancing stability and transient response. The strength of this action is defined by the derivative
gain Kd.

PID control law

Where:

 u(t) is the control signal (the voltage applied to the motor),

 e(t) is the error between the desired and actual motor speed.
Figure 10 Step response with different Kp values

Figure 11 Step response with different Ki values


Figure 12 Step response with different Kd values

Conclusion
In this paper, we have investigated the principles behind the control of a DC motor using a PID
(Proportional- Integral-Derivative) controller. DC motors are the building blocks of many
mechanical and robotic devices where speed and position control are of utmost importance.
Owing to the intricate dynamics that exist in a DC motor system, such as input voltage, armature
current, and angular velocity, we have embarked on a control design suitable for that system.The
PID controller explained thoroughly is a desirable solution for the stabilization and control
accuracy of the system in a situation where the motor input is changed depending on the error in
speed from the set level. The three terms of the PID controller: Proportional, Integral, and
Derivative each has its function: Proportional control reduces the error in the short term; the
Integral control removes the static error in the long term, and Derivative control makes the system
more stable against the oscillation due to the abrupt change. This controller, although complex in
nature, can be simplified by tuning its parameters for a good compromise of response time,
overshoot, and the steady-state error. it can be concluded that if all the PID tuning principles are
adhered to, there would be no challenges in implementing DC motor control, thus achieving
effectiveness and efficiency in many applications. This study forms the basis for further
developments in motor control, including the development of more advanced motor controllers
such as adaptive and model-based controllers for more accuracy and quicker response.

References
1. S. A. Nasar, DC Motors, Speed Controls, Servo Systems: An Engineering Handbook.
CRC Press, 1998.
2. K. J. Åström and T. Hägglund, PID Controllers: Theory, Design, and Tuning, 2nd ed.
Research Triangle Park, NC, USA: ISA - The Instrumentation, Systems, and Automation
Society, 1995.
3. R. C. Dorf and R. H. Bishop, Modern Control Systems, 13th ed. Boston, MA, USA:
Pearson, 2017.
4. T. Kailath, Linear Systems. Englewood Cliffs, NJ, USA: Prentice-Hall, 1980.
5. B. C. Kuo and F. Golnaraghi, Automatic Control Systems, 9th ed. Hoboken, NJ, USA:
Wiley, 2014.
6. K. Ogata, Discrete-Time Control Systems, 2nd ed. Upper Saddle River, NJ, USA:
Prentice-Hall, 1995.
7. G. F. Franklin, J. D. Powell, and M. L. Workman, Digital Control of Dynamic Systems,
3rd ed. Menlo Park, CA, USA: Addison-Wesley, 1998.

Appendix
% Parameters of the DC Motor
J = 3.2284E-6; % Inertia
b = 3.5077E-6; % Friction
K = 0.0274; % Motor constant
R = 4; % Resistance
L = 2.75E-6; % Inductance

% Transfer function for the DC Motor (Open-Loop System)


s = tf('s');
P_motor = K / (s * ((J * s + b) * (L * s + R) + K^2));
%% Proportional Control
figure;
Kp_values = [1, 11, 21];
for i = 1:length(Kp_values)
C = pid(Kp_values(i)); % Proportional controller
sys_cl = feedback(C * P_motor, 1); % Closed-loop system with feedback
t = 0:0.001:0.2;
step(sys_cl, t); % Step response
hold on;
end
ylabel('Position, \theta (radians)');
OBSERVER CODE
% Parameters of the DC Motor
J = 3.2284E-6; % Inertia
b = 3.5077E-6; % Friction
K = 0.0274; % Motor constant
R = 4; % Resistance
L = 2.75E-6; % Inductance

% Transfer function for the DC Motor (Open-Loop System)


s = tf('s');
P_motor = K / (s * ((J * s + b) * (L * s + R) + K^2));

% Find poles of the DC Motor


poles = pole(P_motor);
disp('Poles of the DC Motor Open-Loop Transfer Function:');
disp(poles);

You might also like