0% found this document useful (0 votes)
13 views12 pages

dc_motor_controller_report

This paper discusses the design of various controllers for speed and position control of a DC motor, specifically for an engraving laser application. It compares the effectiveness of proportional, PID, lag-lead, and full-state feedback controllers, ultimately selecting the PID controller due to its minimal error. The study includes experimental results from a Quanser Qube Servo and highlights the advantages of genetic algorithms for tuning PID controllers over traditional methods.
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)
13 views12 pages

dc_motor_controller_report

This paper discusses the design of various controllers for speed and position control of a DC motor, specifically for an engraving laser application. It compares the effectiveness of proportional, PID, lag-lead, and full-state feedback controllers, ultimately selecting the PID controller due to its minimal error. The study includes experimental results from a Quanser Qube Servo and highlights the advantages of genetic algorithms for tuning PID controllers over traditional methods.
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/ 12

Speed and Position Control of a DC Motor

Rami Awar, Yahya Khaled Al Ali, Youssef Al Jrab


American University of Beirut
Beirut, Lebanon
[email protected], [email protected], [email protected]

Abstract—This paper will present multiple controller designs encoders of all kinds), and were based on estimating the
for both speed and position control of a direct-current motor, required states.
while abiding to requirements set in order to control an engrav-
ing laser. For both speed and position control, proportional, PID, Thomas et al. worked on designing a position controller
lag-lead, and full-state feedback controllers are investigated, and of a DC motor by tuning a PID controller using a genetic
experimental results from a Quanser Qube Servo that nearly algorithm. The DC motor model is considered a third order
matches the mathematical model are compared with simulation model, thus no approximations have been made to have more
results from that model. The PID controller design in both
systems meets the requirements with the least error and is thus
DOFs. Aside from tuning the PID controller using a genetic
chosen as the final design. algorithm, the paper also discussed designing the controller
using the Ziegler-Nichols method. The second method has
I. I NTRODUCTION shown to be inferior to the genetic algorithm tuner, which is
expected since ZN provides a first guess of the parameters
The Direct Current motor is one of the most widely
needed, and the stochastic nature of genetic algorithms works
used motors in industries worldwide. Even though they are
on minimizing the error between the actual response and
more costly to maintain over induction motors, they are still
desired response. Another advantage of the genetic algorithm
preferred due to excellent speed control characteristics[NT09].
tuning technique is that is could be applied to higher order
In addition to this, speed and position controllers are widely
systems as well, making it a modular multi-purpose algorithm.
available for DC motors of all sizes and power, from toy
motors to industrial grade motors. But even with all these Praesomboon et al. [SP09] proposed a sensorless DC motor
favorable qualities, simply applying constant power to a DC speed controller using a Kalman filter. With the end goal being
motor will not maintain the desired speed[Awa10]. Distur- a system output of estimated speed, this was achieved by
bances taking place at any point inside the motor, whether designing the Kalman filter to reject noise. The error between
a varying load torque on the shaft or electrical noise on the the estimated speed and reference speed is then fed back to the
input, will guarantee that the motor speed drifts away from system and driven to zero by a linear amplifier (proportional
that which is desired. There exists several types of DC motors gain). This method of senseless control based on estimating
such as a stepper motor, a permanent magnet DC motor, states seems to have been popular since the 1970s.
PCB motors, ... Each has its advantages and disadvantages In 1978, Rajaram et al. wrote about a new approach to
over the others, but for the purpose of this laser engraver sensing a DC motor speed without the use of any additional
application, a brushed DC motor will be used. DC motor circuitry, cutting costs and increasing compactness without
shaft rotation speed and position (angle) are mainly measured affecting weight. They aimed to avoid traditional sensing
using encoders, which could be of many types (optical, rotary, methods that involve external additional hardware along with
magnetic, ...). Then encoders issue a stream of pulses with mechanical coupling by basing their measurement on the back
variable frequency according to the motor speed, hence have a EMF of the motor, in addition to a sensing resistor in series
unit of Pulses-Per-Revolution (PPR). [ySEAH03] The encoder with the armature and some simple circuitry. That results in an
in use in the experimental section of this paper is an optical amplifier output that is proportional to the speed of the motor,
encoder mounted on the shaft of the brushed motor. and thus can be used as a sensor measurement [Raj78].
Another intelligent DC motor position controller designed
II. L ITERATURE R EVIEW
by Ohishi et al. is a load insensitive controller, which works
The main purpose of this paper is to investigate the fitness by estimating the load torque [ea02]. By estimating this
of different controllers meeting set requirements for DC motor torque the controller can adjust the torque needed to drive the
speed and position control. The most widespread DC motor system to the required position without any steady state error.
driving method is PWM or Pulse Width Modulation, which This is similar to having a variable parameter mathematical
works by alternating the applied voltage from high to low model, but instead of the controller being affected by each
and vice-versa. This delivery of energy through a succession parameter change, a state estimation is invoked to take away
of pulses allows for speed control by varying the duty cycle of that complexity and overhead in processing.
this alternating signal[SSU16]. The fast switching is seen by
the motor as a Vrms < Vsupply , which allows for voltage
variation digitally, without the use of varying resistances.
Most of the literature focuses on controlling DC motors with III. M ODEL
simple feedback loops, using tunable compensators, and mod-
ern research investigates advanced tuning techniques relating
to artificial intelligence and optimization algorithms. Other The DC Motor dynamics used are based on the motor
interesting control techniques are independent of sensors (i.e. model in Fig. [1]. The derivation
 0   −JR−Lb     
x1 1 x 0
JL 2
= −Rb−K ∗ 1 + K ∗ u(t)
x02 JL
0 x2 JL
 
 x
y(t) = 1 0 ∗ 1

x2
Figure 1. Circuit model of a DC Motor.
IV. A NALYSIS

The equations for the internal generated voltage and the The speed control system is a second order elec-
induced torque developed by the DC Motor are given by: tromechanical system having two poles at s1 =
[J.C12] −7399 and s2 = −16.2. It is seen that the pole
Tind = Kφ IA s2 , which corresponds to the mechanical system
dominates the electro-mechanical system’s response
ea = Kφ ωm because of a difference by a factor of 456 from
the pole s1 , which corresponds to the electrical
Applying Kirchoff’s law and Newton’s law to system.Henceforth, since the factor of difference is
system in Fig.[1]. The following is obtained: greater than five, the system could be approximated
by a first order mechanical system, since the me-
d2 θ dθ chanical response and second order response are
J 2
+ b = Ki
dt dt exactly alike as seen in the following figure.
di dθ
L + Ri = V − K
dt dt
Applying the Laplace transform, the transfer
function Gspeed (s) is obtained, assuming Kb = Km .

K
Gspeed (s) =
JLs2 + (JR + Lb)s + (Rb + K 2 )

Introducing an integrator gives the position θ


as an output, and the transfer function becomes
Gposition (s), assuming Kb = Km .
Figure 3. Comparison between electrical system, mechanical system, and
K electromechanical system.
Gposition (s) =
s[JLs + (JR + Lb)s + (Rb + K 2 )]
2
The red curve represents the mechanical system,
the light blue curve represents the electrical system
The motor block becomes that in Fig.[2], where and the blue dotted curve represents the second
Km , Kb , J, b, Ra , La are the motor parameters pro- order electromechanical system.
vided. In this figure, it is seen that the mechanical and
electromechanical systems overlap however, the
Disturbance second order system is used in both analysis
Vinput e Km 1 θ̇ 1 θ and design since it is intended to have similar
− L a s+R a Js+b s responses to the responses of the Quanser Qube
that are achieved experimentally.
Kb
In the first analysis iteration, it is found that the
Figure 2. Block diagram for the DC motor model.
damping friction coefficient is unrealistic for several
reasons listed below:
The State Space representation of the speed sys- • 10N · m are exerted by the motor shaft at a
tem has been derived to show two states that are speed of 1rd/s which is similar to hanging 10kg
expressed in terms of the given parameters: at the end of a 1 meter long rod, and spinning

2
it at 1rd/s which is 60 degrees per second. This 2) Frequency Domain Analysis: It was verified upon
torque obviously cannot be achieved by a motor simulation via MATLAB that the system’s speed
running at 10-24V with around 2A of current is stable. This is verified with infinite gain margin
and without a gearbox. and a safe phase margin in both the open loop and
• Quanser Qube Servo parameters are similar to closed loop systems. The bandwidth of the closed
the provided parameters in all aspects but the loop system exceeds that of the open loop speed
viscous friction coefficient, which differs by 6 system by a factor of 21.6; which clarifies that the
orders of magnitude. closed loop response is of a better response.
• The proportional gain, which translates into Speed open loop: Phase margin: 90.4648 degrees
voltage required to drive the motor, needed to Gain Margin: Inf dB
track a step response (i.e. 1rd/s) is over 7000. Bandwidth: 16.1278 rad/s
A 7000V input to the motor is impossible
knowing that it operates on 10-24V.

A more reasonable value has been derived by


referring to the Quanser Qube Servo parameters
posted on their website, by using the formula
Tnom = b · ωnom
. It is found that b = 6.88 ∗ 10−5 N · m · s/rad and
the derived value is used throughout the analysis,
simulation, and experimentation.
A. Speed Control System
1) Time Domain Analysis:The time domain analysis
Figure 5. Bode plot of the open loop speed system.
of the speed control system was done via MATLAB
software, ltiview and stepinfo commands. Speed closed loop: Phase margin: Inf dB
The following figure shows both open and closed Gain Margin: Inf
loop response of the speed system in response to a Bandwidth: 348.210 rad/s
step input.

Figure 4. Comparison between open loop speed response and closed loop
speed response.
Figure 6. Bode plot of the closed loop speed system.
It is seen that the closed loop system is better to
meet the speed requirements since it is near 1 at The system is
3) Controllability and Observability:
steady state whereas the open loop is near 20 at composed of two controllable and observable
steady state. states which means that the speed system is both
For open loop, the peak is 19.7 so it is an completely controllable and completely observable
undesired response. However for the closed loop, .Therefore, all states in the system can be modified
the overshoot is 0, the steady state error is 4.8%, to reach a certain desired response, and can all
and the settling time is 0.0113 sec. be sensed, measured, using sensors to know the
estimators for the input of a system.

3
Controllability matrix of the speed system: loop system increases as a ramp nonstop, which
  seems logical since an integrator was added which
1 −7.4176e3 aggravated stability, so it is definitely not desired
0 1 as a system response. However, the feedback in the
closed loop system made the response settle to 1
Uncontrollable states = 0 instead of increasing infinitely which is desired. For
the closed loop, the maximum overshoot is 20%, the
Observability matrix of the speed system: settling time is 0.468 seconds, and a steady state
  error of 0.
0 2.3529e6
2.3529e6 0

Unobservable states = 0 It was verified upon


2) Frequency Domain Analysis:
simulation via Matlab that the system’s speed is
B. Position Control System stable. This is verified with 51.5dB gain margin
1) Time Domain Analysis: The time domain analysis and 48 degrees phase margin in the open loop and
of the position control system was done via MAT- closed loop systems. The bandwidth of the closed
LAB software, LTIVIEW and stepinfo commands. loop system exceeds that of the open loop speed
The following figure shows both open and closed system by a factor of 1.3; which clarifies that the
loop response of the speed system in response to a closed loop response is of a better response.
step input.

Position open loop: Phase margin: 47.8028 degrees


Gain Margin: 51.5259 dB
Bandwidth: 18.4 rad/s

Figure 7. Open loop position step response.

Figure 9. Bode Plot of the open loop position system.

Figure 8. Closed loop position step response. Phase margin: 49.3 Degrees
Position closed loop:
Gain Margin: 51.5 dB
Applying the step for both open loop and closed Bandwidth: 23.5968 rad/s
loop position systems, it is seen that the open

4
From this requirement, it can be deduced that
the maximum overshoot is 100rpm/ωmax =
100rpm/2000rpm = 0.05 which translates to 5%.

1) Proportional Controller:

From these requirements it is found that ζ =


0.4765 from the 5% maximum overshoot criterion.
A 0% overshoot corresponds to ζ = 1.0 and so the
accepted range of zeta would be 0.4765 < ζ < 1.
Plotting the root locus and choosing a gain such
that the chosen roots meet the criteria gives a
gain C = 8.34. A comparison of the proportional
Figure 10. Bode Plot of the closed loop position system. controller step response and the closed loop step
response is found in Fig.[11].
3) Controllability and Observability: The system is
composed of three controllable and observable
states which means that the position system
is both completely controllable and completely
observable .Therefore, all states in the system can
be modified to reach a certain desired response,
and can all be sensed, measured, using sensors to
know the estimators for the input of a system. This
statement, is clarified in both the controllability and
observability matrices respectively. Controllability
matrix of the position system:
 
1 −7.4176e3 5.4902e7
0 1 −7.4176e3 
0 0 1

Uncontrollable states = 0
Figure 11. Comparing Speed Closed Loop and Proportional Step Responses

Observability matrix of the position system:


  It is seen that the maximum overshoot is 0.3%
0 0 2.3529e6 which lies well within the required range.
 0 2.3529e6 0 
6
2.529e 0 0
2) PID Controller:
Unobservable states = 0

In designing the PID controller, MATLAB’s


V. D ESIGN
pidTuner command is used. This allows to
A. Speed Controller customize the transient response speed and con-
In speed control the transfer function Gspeed (s) troller robustness to get the desired response much
is used in designing the speed controller. The quicker than manual tuning using the Ziegler-
four controllers that will be designed are a Nichols method. A comparison of the closed
proportional controller, a proportional-integral- loop step response and the proportional-integral-
derivative controller, a lead-lag controller using derivative controller step response is shown in
root-locus, and a full state feedback controller. The Fig.[12]. A PID controller is chosen over a PI
requirements to be met are the following: controller due to the quicker transient response. A
PI controller will have less of an overshoot at the
• ±100rpm forces the motor speed to stay cost of lost speed. Given that an overshoot of 3%
within this range of the desired input speed. lies well within the allowed range (100rpm), the
focus was chosen to be on speeding up the response.

5
4) Full state feedback controller: In designing the full
state feedback controller, it is assumed that all states
of this system are measurable and available for
feedback. In order to design the full state feedback
controller, it is crucial at first to check if the system
is fully state controllable. As checked before, the
speed system is fully state controllable. The speed
system is known to have the following state space
representation:
 0      
x1 −7415.2 1 x1 0
= ∗ + ∗u(t)
x02 −119614.1 0 x2 2352941.176
 
  x1
y(t) = 1 0 ∗
x2
Figure 12. Comparing Speed Closed Loop and PID Step Responses The state controller will be placed such that to
make the control signal u=-[K]x+k1 r. The gain
matrix [K] will be decided with respect to the
location of the desired closed loop poles of the
3) Compensator Design with Root Locus: system. The specifications for the speed system is to
track the input without exceeding ±100 rpm, so the
It is seen that by simply adjusting the gain (as desired closed loop pole locations will be chosen
done in the preceding proportional controller), the to be s1 = −189 + j169 and s2 = −189 − j169
requirements can be met and thus no lag or lead in order to meet these specifications. Using the
compensator is necessary. To further prove this function place in Matlab we get the gain matrix
point consider the following: to be:  
The transient response of the system settles after [K] = 22.16 −0.003
11.3 ms at a value of 0.952 rad/s when it responds  
to a unit step response, which means that the system −7415.2 1
A − BK =
response is quick enough. Hence, the transient −5.225e7 7038.2
response does not need modification. This is Using u= -[K]x + k1 r and x0 = Ax + Bu so x0 =
verified by the two real closed loop poles that yield (A-BK)x + Bk1 r which will become:
an angle deficiency of zero degrees. Therefore,
any pole-zero placement would not have any effect  0      
x1 −7415.2 1 x1 0
on the transient response. Moreover, because it = ∗ + ∗r
x02 −5.225e7 7038.2 x2 5.214e7
lacks an integrator, it is a type 0 system. This
means that for a given step input, the response
 
  x1
will yields a steady state error that decreases with y(t) = 1 0 ∗
x2
an increase in K, proportional gain. Therefore,
B. Position Controller
with the current system, a lag compensator would
not decrease the steady state error because of the In designing the position controller, the transfer
absence of complex closed loop poles. In addition function Gposition (s) is used. The four controllers
to this, the response has two closed loop real poles that will be designed are a proportional controller,
that are large enough to cancel the effect of the a proportional-integral-derivative controller, a lead-
near origin pole-zero. Hence, the overall angle that lag controller using root-locus, and a full state
would result is zero which means that we don’t feedback controller. The requirements to be met are
have a lagging compensator. With such criteria, the following:
the design of a lag-lead system would not give the • Maximum overshoot and steady state error of
desired response. Hence, the better solution is to 1◦ in order for the laser engraving to be legible

use a proportional gain that decreases the system’s • Ability to travel 50 in 0.5 seconds
steady state error, or a PID compensator that drives The first requirement is clear, while the second must
this error to zero. be met with simulation/implementation and accord-
ing adjustments since the relationship between the

6
degrees turned and the time taken by the motor to
settle is not linear and is slightly complex to derive.

1) Proportional Controller: From these requirements,


it is found that ζ = 0.7796 if we consider the 1◦ rel-
ative to 50◦ which would be an acceptable choice.
A safer choice would be to consider the 1◦ relative
to 360◦ since any rotation greater than this limit
can be broken down into multiple rotations with a
larger modulo. This gives us 0.7796 < ζ < 0.8831,
which would translate into an area to place the poles
in on the root locus. Plotting the root locus using
MATLAB and using the command sgrid, then
choosing any point within the area formed by the Figure 14. 50◦ Step Response of Position Proportional Controller
◦ ◦
two lines forming angles 27.98 and 38.83 with the
real axis, we get Fig.[13]. Decreasing the obtained 2) PID Controller: The PID controller tuning was
gain from 0.344 to 0.3 moves us towards the safer done using MATLAB’s pidTuner command. The
choice of ζ = 0.8831. obtained results meet the 1% overshoot require-
ment, as well as the 50◦ in 0.5 seconds requirement.
Fig.[15] shows the step response of this new system
along with the derived Kp , Ki , andKd values.

Figure 15. Position PID Controller 45◦ Step Response w/ Kp =


6.7498, Ki = 15.8366, Kd = 0.6035

Figure 13. Root Locus of Position Control System


3) Compensator designed via root Upon
locus:
simulation via Matlab, the response to a unit
step has 0.11 s rise time and a steady state error
of zero. A lead compensator was designed with
the intent of changing the rise time to speed up the
transient response. The closed loop poles of the
original system initially were at:

The choice of Kp = 0.3 produces the response to s = −8.06 + j15.9


a 50◦ step input in Fig.[14]. We see that the maxi-
mum overshoot is less than 0.5◦ and the response is s = −8.06 − j15.9
within 2% of its final value in less than 0.5 seconds,
thus meeting our requirements. s = −7401.53

7
Because the complex conjugate poles are complex 4) Full state feedback controller: In designing the full
conjugates, therefore, the zeta and the natural fre- state feedback controller, it is assumed that all states
quency were found as: of this system are measurable and available for
feedback. In order to design the full state feedback
ζ = 0.452
controller, it is crucial at first to check if the sys-
ωn = 17.83rad/s tem is fully state controllable. As checked before,
the position system is fully state controllable. The
Since, the system’s zeta is not in the desired range position system is known to have the following state
[0.7796-0.8831] that corresponds to the intended space representation:
50 degrees and a safe margin of 360 degrees
respectively; The average of both was selected,  0       
x1 −214370 1 0 x1 0
0.83. Therefore the new complex conjugate poles  0  
x2 = −345684.8 0 1∗x2 + 0 ∗u(t)
change to:
x03 0 0 0 x3 6.8e6
 
s = −14.82 + j9.9   x1
y(t) = 1 0 0 ∗ x2 
s = −14.82 − j9.9 x3
The state controller will be placed such that to
The compensator was designed using the angle make the control signal u=-[K]x+k1 r. The gain ma-
deficiency method with an angle of deficiency of trix [K] will be decided with respect to the location
64.26 degrees that relies on one lead compensator of the desired closed loop poles of the system. The
because the angle is strictly less than 65 degrees. specifications for the position system is to track the
This method yields the chosen zero and pole of the input of 50◦ in 0.5 sec without exceeding ±1◦ ,
compensator as follows: so the desired closed loop pole locations will be
z = −11.85; p = −25.8 chosen to be s1 = −10 + j6.7, s2 = −10 − j6.7,
and s3 = −100. A second order approximation was
Moreover, the gain was calculated to be K = used using the fact that the complex conjugate poles
47.03e6 which is unrealistic and drives the response are dominant with a factor of 10 difference from
to instability as shown in Fig.[16]. the third pole, to meet the required specifications.
Using the function place in Matlab we get the gain
matrix to be:
[K] = −1.44e9 6754 3.151e− 3
 

 
−2.14370e5 1 0
A − BK =  −3.456e5 0 1 
1
9.84e 5 4.59e 0 2.14e5
1

Using u= -[K]x + k1 r and x0 = Ax + Bu so x0 =


(A-BK)x + Bk1 r which will become:
  
 0 −2.14370e5 1 0   0
x1 5 x1 
Figure 16. Position system response to a lead compensator. = −3.456e 0 1 ∗ + 0
x02
 
x2
9.84e1 5 4.59e1 0 2.14e5 −9.845e1
Furthermore, because the lag system tends to in-  
crease the maximum overshoot beyond the desired   x1
limitation, and yield a long tail, the lag compensator y(t) = 1 0 0 ∗ x2 
was not used. x3
Hence, with these two types of compensator According to those results, the full state feedback
designs yielding no improvement to the system’s controller shows non-linearity because of the high
response, the lag-lead compensator design would gain values. This issue, is caused by the large gain
not be an improvement either. As a result, no lagor the control signals carry that require larger, more
lead compensator is recommended. expensive, actuators.

8
VI. F INAL D ESIGN in the desired infinite value in the denominator
Relying on the experimental validation, the PID that drives the system’s disturbance to zero. The
controller is chosen to be the final controller design. difference between both PI and PID controllers
For both speed and position, the PID controller was the time each controller’s system would need
showed rejection to any time of noise applied while to eliminate the error. PID controllers’ settling time
meeting the specified criteria for both speed and was less than that of the PI controller by a factor
position control systems. The PID compensated that increased as we increase the magnitude of the
system, is distinguished by a fast transient with disturbance as MATLAB verifies such argument.
a small settling time while maintaining the spec- The maximum value of the response to a unit step
ified maximum overshoot. While on the contrary, disturbance is:
any other controller as P, PI, full state feedback
controllers, reach the desired specifications but the • Speed Response: 7.57rd/s at t=0.00196s. This
difference is best shown in disturbance rejection. value decays exponentially until zero at 0.12s.
The P controller, minimizes the error to zero if • Position Response : 394rd at t=0.201s. This

the proportional gain was large enough but doesn’t value decays exponentially until zero at 2.5s.
respond fast to any disturbance. The PI controller These values are found by observing the step
rejects quite well, but compared to the PID, the PID response to the disturbance transfer function in
controller is better in increasing stiffness against MATLAB Fig.[17].
noise. The lead compensator showed nonlinearity
that corresponds to a large gain in position control
while on the other hand, it was not used in speed
control because, the system consists of two real
roots. The lag compensator increased overshoot
beyond the limit and increased the position’s re-
sponse’s settling time while on the other hand, the
lag compensator was not applied in speed control
because of the two real roots that broke the rule
of thumb that relates to the angle criterion. Full
state feedback controllers, responded well in speed
control, reached specifications, and competed with
the PID controller a lot. But, in position control, the
full state feedback controller showed nonlinearity
because, the system had massive gains within its
state space representation. The thing that makes Figure 17. Position System Response to a Step Disturbance
such system more expensive than a PID controller
whose value is not as high as large actuators. B. Tracking
Henceforth, PID controller met all desired specifi- The PID corrected system lags the the ramp
cations in both speed and position control systems. input by a magnitude of 0.03 and tends to correct
A. Disturbance Rejection its behavior as time increases to ideally track the
input response. The PID controller was designed to
The disturbance to output transfer function can
surpass the given specifications, as the experimental
be represented as follows:
validation proved. No oscillations are shown versus
Ls + R a ramp input. The system is sufficiently damped
Gdisturbance (s) = 2
(Ls + R)(Js + b) + C ∗ K + K so that both control systems meet the maximum
overshoot criteria that limits zeta to a certain range
where C stands for the compensator’s transfer to assure a margin for safety purposes.
function.
VII. E XPERIMENTAL R ESULTS
From the transfer function, it can be noticed that if
we have an infinite value in the denominator then, To simulate the numerical model, MATLAB’s
the output due to the disturbance would converge Simulink is used. Important things to note are the
to zero in steady state. To meet such specification, following:
it was found that the PID controller induces a pole • The process of converting the input from de-
at the origin in its transfer function which results grees to radians (in the case of position) and

9
from RPM to radians per second (in the case of
speed) is done by inserting a scaling gain block
RPM2RDS right after the input, and another
RDS2RPM right before the output. This way,
the system isn’t affected by what the input
unit is, and runs according to its base SI units
which are radians and radians per second. The
conversion provides an interface for the user
to input more familiar units, and observe more
familiar outputs.
By trial and error, in an attempt to minimize
the difference between the mathematical model and
the physical DC motor setup, it is derived that
the damping friction coefficient is b = 20.88e-5
N ·m·s/rad. Using this damping friction coefficient
Figure 18. 1rd/s Step Response of Speed Proportional Controller w/ Kp =
allows the mathematical model responses to most 8.381
precisely match the physical model responses. This
is found after analyzing and designing the above 2) PID Controller:
controllers, so this change in b is not made. All
results will be based on b=6.88e-5N · m · s/rad. Using the parameters derived for the numerical
model, the Quanser Qube produces very fast speed
A. Speed Control changes, which nearly damages the motor. This
is caused by the Kd 0.0006, so it is increased
In speed control, it is important to note that even to 0.5 to stop this destructive behavior. Kp andKi
though the step inputs are speeds of 1 rd/s, the error are the same as the ones derived in our numerical
requirement of 5% will result in this requirement model. This results in the step response observed
being met for any speed from 0 rpm to 2000 rpm, in Fig.[19]. This response doesn’t meet the re-
which is the range of operation of the motor. Thus quirement either, but with some different tuning
step responses of 1 rd/s meeting the 5% error definitely could, at the cost of response time. As
criterion are sure to meeting the requirement for is seen in the figure, the motor takes around 0.5
higher speeds; the unscaled step response is enough seconds to settle, which is arguably large in speed
to portray the behavior of the motor for all operating controlling this motor compared to the responses
speeds. acquired with MATLAB using the mathematical
1) Proportional Controller: model.

Implementing the proportional controller with a


gain Kp = 8.381t results in a very oscillatory
response caused by the variance of the damping
friction coefficient b from its claimed value by
Quanser. This is caused by overuse, lack of lubri-
cant, wearing over time, etc. Decreasing the gain
to Kp = 3 enhances the response by decreasing
the oscillations, but the steady state error increases
significantly. This shows that a gain of 8.381 is
better than a gain of 3 at tracking the step input,
but at the cost of a much larger overshoot and more
sustained oscillations. This is shown in Fig.[18],
and the requirement of ±100rpm cannot be met
using a proportional controller without changing the
damping friction coefficient. In this case, the actual
Figure 19. 1rd/s Step Response of Speed PID Controller w/ Kp = 6, Kd =
response differs greatly from that expected from the 0.5, Ki = 20
mathematical model. Perhaps motor lubrication can
help meet the requirement. The PID controller performs much better than the

10
proportional controller, mainly due to the fact that it
contains an integral term and can drive the error to
zero. Perturbing the shaft with external objects, con-
stant pressure is applied, and the motor increases
its torque to drive its speed towards the desired
speed. This error minimization is not possible using
a simple gain factor.

B. Position Control

In position control, it is important to note that


even if the responses were for a position of 1
degree, the maximum overshoot and steady state
error of 1 degrees is still met, as well as the 50
Figure 21. 45◦ Step Response of Position Proportional Controller w/ Kp =
degrees in 0.5 seconds criterion, since the error 0.5
requirement is derived as a percentage. As long as
the error is within this percentage the requirement 2) PID Controller:
is satisfied for any input less than 360 degrees.
Using a PID controller, the controller exhibits
Implementing the propor-
1) Proportional Controller:
much higher disturbance rejection and response
tional controller with gain Kp = 0.3 on the Quanser speed, as well as less sustained oscillations. By
Qube Servo gives us a significant and visible steady perturbing the shaft with external objects, the motor
state error seen in Fig.[20]. does not fail to return to its preset position without
any error or sustained oscillations. This is seen in
Fig.[22].

Figure 20. 45◦ Step Response of Position Proportional Controller w/ Kp =


0.3
Figure 22. 45◦ Step Response of Position PID Controller w/ Kp =
6.7498, Ki = 15.8366, Kd = 0.6035

This error is corrected by increasing the gain to


VIII. C ONCLUSION
0.5 to account for the different viscous friction coef-
ficient of the Quanser Qube Fig.[21]. A proportional Six controller designs for both speed and po-
controller cannot drive the steady state error to zero sition control systems were designed, simulated,
on its own, and this is seen in the experimental experimented and evaluated against the given re-
results. quirements that limit the transient and steady state

11
responses to maximum overshoot and a desired set-
tling time for phase, angle shift and speed control.
The PID, PI, and full state feedback controllers
competed against each other’s characteristics, as
they all drove the error to zero, met the required
specifications, and met the desired responses upon
simulation and experimentation. The PID controller
was a better design because of its immediate re-
sponse to any kind of disturbance, faster transient
response even though by a difference of 0.05 sec-
onds from its closest competitor,full state feedback,
and relative cost compared to other controllers that
rely on a big budget to satisfy the large gained
control signals by means of large actuators.
N OMENCLATURE
θ̇ Angular Speed in rd · s−1
ω Angular Speed in rd · s−1
ωnom Motor Nominal Angular Speed in rd · s−1
θ Angle in rd
b Motor Viscous Friction Coefficient in N · m ·
s · rd−1
J Moment of Inertia in kg · m2
Km , Kb Motor Constant in N · m · A−1
La Armature Electric Inductance in H
Ra Armature Electric Resistance in ω
T Torque in N · m
Tnom Motor Nominal Torque in N · m
Vrms Root Mean Square Voltage in V
R EFERENCES
[Awa10] Mohd Amir Fikri Bin Awang. DC Motor Speed Controller. BS
dissertation, Universiti Malaysia Pahang, 2010.
[ea02] Kiyoshi Ohishi et al. Microprocessor-Controlled DC Motor for
Load-Insensitive Position Servo System. IEEE Transactions on
Industrial Electronics, 49(2):462 – 473, 2002.
[J.C12] Stephen J.Chapman. Electric Machinery Fundamentals. Mc-
Graw Hill, 1221 Avenue of the Americas, New York, NY 10020,
2012.
[NT09] Dr. P. Poongodi Neenu Thomas. Position Control of DC Motor
using Genetic Algorithm Based PID Controller. Proceedings of
the World Congress on Engineering, 2, 2009.
[Raj78] S. Rajaram. A New Method for Speed Measurement/Control
of DC Motors. IEEE Transactions on Instrumentation and
Measurement, 27(1):99 – 102, 1978.
[SP09] et al. S. Praesomboon, S. Athaphaisal. Sensorless speed control
of DC servo motor using Kalman filter. 7th International Con-
ference on Information, Communications and Signal Processing,
pages 1–5, 2009.
[SSU16] Dinesh Patil Sarita S. Umadi1. DC Motor Speed Control
Using Microcontroller. International Journal of Engineering
and Techniques, 2(6), 2016.
[ySEAH03] S. M. Uashi y. S. E. Ali, S. B. M. Noor and M. K Hassan.
Microcontroller Performance for DC Motor Speed Control Sys-
tem. National Power and Energy Conference Proceedings, pages
104–109, 2003.

12

You might also like