You are on page 1of 24

Integrated Securities, Inc.

1015 North Quincy Street


Arlington, VA 22201
November 5, 2013
To:

David Levinson, Director, Research and Development

From:

Ali Alhamaly

Subject:

Experimental Investigation and Verification of Single-Motor Padlock


Unlocking control system for the EX-7 Bomb Disposal Robot

Summary and Introduction


As requested by the memo sent on September 2, 2013, several tests were performed to
investigate the effectiveness of using control system with single-motor to unlock school
looker padlocks. Experimental investigations suggest that using feedback control system with
a DC motor is both quick and reliable in opening small padlocks.
The motivation behind the current study is to develop and verify a controller design
for a single motor to open a combination padlock. The single motor will be used as
attachment to the EX-7 Bomb Disposal Robot. The Market Research Department of our
company believes that if the motor attachment to the robot can open combination padlocks
reliably and rapidly then the company has a big chance to expand its sales by capturing the
state-police market. The state-police forces will be interested in buying the EX-7 robot
because it can operate in school scenarios where there are bomb threats.
The experimental setup that was used consists of a single DC motor that is connected
to a combination padlock. The motor is connected to a controller which controls the motion
of the motor. The response of the motor which is the position of the padlock dial is recorded
as a function of time using integrated LabVIEW data collection software. The experimental
setup was used to test and validate the response of the motor for different controller
configurations.
Dynamic model for the motor-lock system was derived to be used in analytical
controller design. The model was simulated in a negative feedback closed loop that replicates
that actual physical test setup. The derived dynamic model was verified using experimental
data. The comparison between model response and the experimental response suggests that
the model represents the actual physical system with high accuracy. The validated model was
used to design analytical PID controller that improves the dynamic response of the system.
The PID gains for the final analytical PID controller were found to be: Kp= 1.5, Ki=1.4, and
Kd= .007. This particular PID configuration achieves large improvement in the transient
response compared to the system initial controller.
The analytically determined PID gains were tested in the physical setup to validate the
performance of the system. Discrepancies were found between the analytical performance
and the actual performance. Due to these discrepancies, the PID gains were tuned
experimentally until the desired dynamic performance of the system achieved. The final PID
experimental gains were: Kp= 1.5, Ki=1.3, and Kd= .009. This PID configuration when
tested on the system with 100 step input gave rise time of .04 seconds, settling time of .08
seconds, and overshoot of 4%. The system was tested with these gains to see if it can open a
padlock with combination of 12-18-00. The system was successful in opening the lock each
1

time it was tested. Reliability of the system was further investigated by measuring the true
mean of the steady state error of the system response at a 360 degrees step input. The system
was tested for ten different trails and the results show that the true mean of the steady state
error is .02 .04 degrees. The error bound was found using 95% confidence interval.
This report presents the detailed experimental and analytical approach that was used
to develop and verify controller design for the EX-7 robot attachment. The report starts by
describing the basic control theory. The different control system terminology and components
are explained. In addition, step response performance parameters are explained and their
physical interpretation is discussed as well. The control theory section concludes by
explaining the PID controllers and how they work. Next, the experimental setup is described
including the apparatus and data acquisition system. After that, the report discusses the
derivation of the dynamic model of the system with experimental data verification. Next, the
analytical controller design procedure is explained and the results of the system response
using the designed controller are presented. The next section presents the experimental tuning
of the PID controller and the final PID gains that was used to open the padlock. Finally, the
report concludes by general comments about the performance of the system as a whole.
Introduction and Background of Control System Theory
This section presents brief overview of control system components and the feedback
control principles that will be used throughout this report. The section also discusses the basic
PID controller and how it is used to control a physical system.
Control Systems Overview . Physical systems require some sort of process control
in order to achieve what the user wants in terms of operation performance. It is known that
the performance of physical dynamic systems without external control can be undesirable and
for this reason control systems are important to achieve desirable performance operation of
the physical system. The physical system can be any device or process that performs certain
task when given a user input. The control system connected to the physical system insures
that the operation characteristics of the physical system are what the user wants. For instance,
if the physical system is the car and the control system is the cruise control, then the cruise
control insures that the car follows the speed that the driver set as input.
Control systems can be divided into closed loop and open loop systems. The main
physical difference between the two divisions is that the closed loop systems have detection
device that tells the controller what the physical system response is whereas in the open loop
systems there is no detection device and hence the controller is clueless of what the physical
system response is. There are other differences between the two divisions based on the
response of the physical system the being controlled. In general sense, open loop systems
usually have slow response, very sensitive to external disturbances, might be unstable, and
limited in the ability of tweaking the transient response of the controlled systems. On the
other hand, closed loop systems can be designed to achieve fast response and have fast
response. In addition, closed loop systems are very flexible in terms of tuning the transient
response of the physical systems and can be designed to achieve high stability margins.
The main components of a controlled system are: plant, actuator, controller, and
sensor. The plant is the physical system that needs to be controlled. The actuator is what
changes the state of the plant given controller input. The controller is the part where the user
input is converted into a proper signal to the actuator to achieve certain performance criteria
of the plant response. Finally, the sensor is the device that senses the response of the plant
and feed the information back to the controller for active control of the plant. Figure 1 shows
a block diagram of both open and closed loop control system with the major components
2

indicated. The block diagram also shows the flow of signals between the different parts of the
system.
In terms of mathematical modeling of the control system, each component of the
system can be considered as a process that relates the input signal to the output signal. Each
component can be described in terms of equations that relate the dynamics of that component
to the input signal. By coupling the entire system components with each other, the
characteristics of the whole system can be described in terms of governing deferential
equations. Upon solving these equations, the response of the plant can be found and suitable
controller can be designed to change the behavior of the plant response as desired.

Figure 1. Block diagram of open and closed loop control systems.

As mentioned earlier, the main purpose of a controller is to control the response of the
plant to the desired characteristic that user wants. The performance of the controller is usually
measured against some design specifications for the plant response due to a sudden change in
the operating condition i.e. a step response. The response specifications due to a step
response contains: rise time, settling time, percent overshot, and the steady state error. The
rise time is the time it takes the plant response to go from 10% to 90% of final desired step
value. The settling time is the time that the pant response remains between 2% of the final
desired value. The percent overshoot is the maximum deviation in percent of the plant
response with respect to the desired final value. Finally, the steady state error is the actual
difference between the desired output and the plant output at long time after the initial
response has begun.
Once the desired response specifications are obtained, then the controller need to be
designed to achieve these specifications. Depending on the plant that being controlled,
achieving all the design specifications might not be feasible and hence the design process of a
controller usually contains tradeoff between robustness, speed, and steady state errors. Figure
2 shows a typical second order plant response with the several response specifications
indicated. From figure 2 it can be seen that the rise time and settling time are measure of the
speed of the response. The steady state error is a measure of the accuracy of the controller to
achieve the desired final output.
There are varieties of the mathematical forms that the controller can be represented
by. Different forms of the controller depend on the type of the application and the design
requirements for a given application. One of the popular controller designs is the
Proportional Integral Derivative (PID). PID controller takes the error between the desired
output response and the actual plant output response as the input signal and performs some
3

mathematical operation on the error to obtain the output controlling signal to the actuator.
The PID controller acts as a superposition of three main outputs. The proportional output
depends on the value of the current error. The Integral output depends on the sum of the
cumulative errors from the beginning of the input command to the current time. The
derivative output depends on the rate of change of the current error. The three outputs of the
PID controller establish the controlling signal at any given instant of time. The PID controller
can be tuned to achieve specific design characteristics of the plant response by changing the
different gains that are associated with each output. The gains are referred to as: Kp, Ki, and
Kd. These gains correspond to the proportional, integral, and derivative terms in the PID
controller respectively. Each gain is responsible of altering some of the dynamic
characteristic of the plant response. By choosing the correct values of the gains, the desired
performance response can be obtained. Figure 3 shows the block diagram of a typical PID
controller with the mathematical operation that each part is performing on the error signal.

Figure 2. Step response of a typical second order plant showing the different performance
metrics

Figure 3. Block Diagram of a typical PID controller.


4

Experimental Setup
This section presents the experimental apparatus and the test procedures that were
used to investigate the motor lock system for the purpose of designing a controller. The
section discusses the physical components in the system and the different experiments and
data collection methods.
Experiment Apparatus. The main objective of this experimental investigation is to
design a controller that moves a padlock to a desired location in timely and consistent
manners. In order to test the controller performance, a test setup that contains a DC motor
connected to the padlock is used. The control system is connected in a closed loop setup as
indicated in figure1. The system contains: the padlock which is the plant, DC motor with
reduction gear box set which corresponds to the actuator, encoder (as a feedback sensor), NI
cRIO-9024 real time fast controller, NI 9505 H bridge DC motor drive and a 24V DC power
supply. Figure 4 shows a picture of the test setup with the different components labeled.

Figure 4. Padlock test setup.

The encoder that was used is an optical incremental encoder in which it measures the
relative position of the padlock for initial reference position. The reference position was set
always to be zero. LabVIEW software was used for data acquisition and for sending
commands to the controller. The LabVIEW software can set the gain values of the PID
controller based on the user input. In addition, the software allows the test of any step input
values to the system. The LabVIEW was used as well to collect the data that corresponds to
the response of the padlock as function of time for different step inputs. All the data were
sampled using a .01 seconds sampling time.
Test Procedures. The tests that were conducted using the system mentioned earlier
serve two main purposes. The first is to collect data and use it to assess the derivation of the
system dynamic model and to verify quality of the model. The second is to test the system to
evaluate its performance and its ability to satisfy the design requirements. For the first
purpose, the system was tested for five different step inputs correspond to: 90,180,360,720,
and 1080 degrees. The response of the padlock as a function of time is collected and saved
5

for later processing. The values of the controller gains for this test were: Kp=1.2, Ki=2, and
Kd=.02. For the second purpose, the testing was about evaluating the final controller design
performance in opening the padlock successfully. Three trials were conducted to test the
reliability of the system to open the lock successfully. Finally, the system was tested for the
evaluation of its repeatability. The test consists of measuring the steady state error for a step
input of 360 degrees ten times. The results of the different tests will be shown in later
sections of this report.

Derivation of the Lock-Motor Dynamic Model


This section presents the derivation of the transfer function for the padlock-DC motor
system. The section discusses the governing equations of the system that describe the
dynamics response. Comparison between the derived model response with experimental data
is shown to assess the accuracy of the overall model.
Open Loop Transfer Function . In order to quantify how the padlock-DC motor

system (will be referred as the system from now and on) responds to a given controller signal,
a model describing the dynamic behavior and the interactions between the various
components of the system is needed. The system we are dealing with has two main
interactions. The first is the electrical interaction between the controlling and energizing
source with the various electrical components in the DC motor such as the motor windings,
resistance, and inductance. The second is the mechanical interaction between the motor rotor
and the connecting load which is in this case the gearbox and the attached padlock. Both
electrical and mechanical characteristics of the system are coupled and their interactions
determine the overall performance of the system.
The system interaction between its components can be described using a set of two
coupled ordinary differential equations. The two equations describe the coupling between the
electrical and mechanical characteristic of the system. Figure 5 shows a schematic of the
system that relates the electrical and mechanical parts together. As can be seen in the figure,
the applied voltage (V) causes a current (i) to flow throughout the various system components
such as the motor terminal resistance (R) and the motor terminal inductance (L). Due to the
current flowing in the motor internal windings, the padlock rotates to an angular position ()
and a torque () is developed to move the external load represented by the total mass moment
of inertia (J) and to overcome the internal fiction and viscous damping in the system (b).
Because the rotor windings of the DC motor rotate through the magnetic field of the stator, a
back EMF (Vemf) is developed across the motor terminal to resist the change in the magnetic
flux through the rotor windings.
The model in figure 5 was chosen to represent the system for couple of reasons. First,
the sets of equations that relate the voltage to the angular position in this particular model are
linear which simplifies the method of solutions. Second, the motor that was used in the
experiment has both terminal resistance and inductance and that is why the model in figure 5
includes resistance and inductance as system components. In addition, the resistance and
inductance affect the transient response of the system and hence including them in the overall
model enhances the accuracy of the model. Third, any DC motor that is driven by a voltage
source has a back EMF resisting the applied voltage. This is due to the construction of the
motor itself and how the magnetic flux is changed through the rotor windings. Having back
EMF in the model is important because it exists in the real motor under study and hence it
needs to be accounted for and because it represents a coupling between the rotation speed of
the motor and the electrical load of the motor on the applied voltage. Finally, the mechanical
6

load on the motor is related to the physical components that the motor needs to move and
rotate. The resistance of these components to the rotation can be represented by the mass
moment of inertia and the damping that results from friction between the different parts. So to
account for the mechanical load in the real system, the model in figure 5 includes the total
mass moment of inertia and the total damping of the system. Quantitative justification of the
model will be shown in the next subsection in which experimental response is compared with
the model response.

Figure 5. Schematic showing the system components and the interaction between the
mechanical part and the electrical part

As mentioned earlier, there are two equations that relate the controlling signal which
is the applied voltage to the output angular position of the padlock. The two equations based
on the schematic of figure 5 are given by
= +
=

2
2

(1)
(2)

Equations 1 and 2 represent the dynamic model of the whole system. These two equations
can relate the input of the system which is the applied to the output angular position of the
padlock directly if the equations are transformed to the Laplace domain. The relation between
the output to the input of the system in the Laplace domain is referred to as the open loop
transfer function. Full derivation of the open loop transfer function for the system can be
found in appendix A. Table 1 shows a summary of the physical parameters of the system
along with their symbols. The nominal numeric values of the parameters in table 1 can be
found in appendix B.
Table1. Summary of the physical parameters of the system with their corresponding symbols

Parameter name
Applied motor voltage
Motor terminal Resistance
Motor terminal inductance
Applied torque to the padlock
System total mass moment of inertia
Motor mass moment of inertia
Viscous damping coefficient
Gear box efficiency

Symbol
V
R
L

J
Jm
b
g

Parameter name
Gear box mass moment of inertia
Gear box ratio
Motor constant
Back EMF voltage
Current
Angular position of the padlock
Motor efficiency

Symbol
Jg
Kg
K
Vemf
i

From the derivation in appendix A, the open loop transfer function for the system is
given by
()
()

(180 )

(3)

3 +2 ( +) +( 22+)

The system open loop transfer function as shown in equation 3 relates the output to the input
through the internal properties of the physical system. Since the transfer function describes
the dynamics of the actual physical system, this means that the actual response of the physical
system to a controller signal can be simulated and hence a suitable controller can be designed
to meet specific performance characteristics of the overall system. But before using the
transfer function to design the controller, validation of the accuracy of the transfer function
and how representative it is to the performance of the actual physical system is necessarily.
For this reason, the simulated response using equation 3 is compared with experimental
system response. Discussion about the verification of the transfer function is included in the
next subsection. It is worth to notice that equation 3 describes the open loop transfer function
for the actuator and the plant combined, the actuator being the motor with the gear box and
the plant being the padlock.
Model Verification. The approach to verify the derived transfer function is to

compare the system closed loop experimental response to the modeled closed loop response.
The experimental setup shown in figure 4 is used in closed loop with a PID controller to test
the system response for multiple of step inputs. The inputs were 90, 180, 360, 720, and 1080
degrees. The PID gains for the controller were: Kp= 1.2, Ki= 2, Kd=.02. The experimental
step response for each input was recorded using LabVIEW.
The closed loop analytical response is obtained by using the analytical transfer
function in a closed loop model like the one shown in figure 1. Simulink was used to
implement the transfer function in a closed loop model that has a PID controller and a unity
gain negative feedback loop. Simulink is able to obtain the step response of the overall
system as a function of time which simulates the actual physical system. The closed loop
block diagram Simulink model is shown in figure 6.

Figure 6. Block diagram of the Simulink model that used to simulate the system response

Numeric values of the parameters in the transfer function can be found in Appendix
B. using these values equation 3 becomes
()
()

180

)23.0234(. ).85.75

3 5.72104 ( 2 )2.38104 ()+2 (2.38104 ()2.37104 (..)+5.72104 ( 2 )2.32())+(.85.75232 (.0234(. )) +2.32()2.37104 (..))

The damping coefficient (b) was used as the inverse of the speed/torque constant in appendix
B. The mass moment of inertia for the padlock was not given to us and hence it is not
included in the total moment of inertia for the system. The fact that the inertia of the padlock
is negligible compared to the motor and gear box inertias makes the effects of neglecting its
inertia on the system response very minimal. Figure 7 shows a plot of the experimental
response and the modeled response for a step input of 1080 degrees. The figure shows that
the modeled response is in great agreement with the experimental response. It can be seen
also that the modeled response has a lower percent overshoot than the experimental data and
also has some oscillations near the peak of the response that are not present in the
experimental data. The good match between the experimental data and the model suggests
that the overall model captures the dominant dynamics of the system and hence the derived
transfer function represents the system very well.

Figure 7. Experimental and analytical step response of the system

The differences in the response between the model and the actual system can be
reduced by changing the values of some parameters in the transfer function. The parameters
that can be changed to increase the quality of the model are: the damping coefficient (b), the
motor efficiency m, and the gear box efficiency g. The reason for choosing these parameters
in particular is because damping coefficient is given only for the motor and not for the whole
system and the efficiencies are given in terms of their maximum values and not the value
representing the operating condition that we are dealing with. The three parameters were
changed to investigate the effects on the analytical response and its relation with the
experimental data. It was found after analyzing the analytical response that changing the
damping coefficient has very negligible effect on the overall response while changing the
values of the efficiencies have a relatively larger effects on the response. After several trials
of changing the parameters and analyzing the response in comparison with experimental data,
it was found that setting the motor efficiency to .45 and gear box efficiency to .15 increased
the accuracy of the model response and reduced the differences between the model and
experimental data. Figure 8 shows a plot similar to figure 7 but with the new values of
efficiencies. It can be seen that the model response match the experimental data better than
the response in figure 8. In addition, the oscillations near the peak response that exists in
9

figure 7 is now suppressed which means that the new model with the tuned parameters is
better in estimating the performance of the system from the model in figure 7.

Figure 8. Experimental and analytical step response of the system after changing
efficiency values

In order to quantitatively assess the quality of the model response with respect to the
experimental data, performance parameters like the rise time and percent overshoot need to
be compared. Since the performance parameters characterize the response of the system in
general sense, they are good indicators of how the model represent the general characteristics
of the actual system being modeled. Built in function in Matlab was used to obtain the
performance parameters of the experimental and modeled response. Table 1 shows a
comparison between the experimental performance parameters and the analytical
performance parameters. The table shows parameter for model of figures 7 and 8 to show the
advantages of changing efficiencies.
Table1. Performance parameters comparison for 1080 degrees step input

Performance parameter
Rise Time (s)
Settling Time (s)
Percent Overshoot (%)
Steady state error (Degrees)

Experimental data Model (figure 7) Model (figure 8)


.346
1.67
12.9
.31

.339
1.52
11.2
.008

.346
1.60
12.8
.01

Results of table 1 show that the modified model (figure 8) performance parameters
are closer to the experimental data from model (figure 7). Hence, the model in figure 8 will
be used as the model that represents the actual physical system and will be referred to as the
model in the rest of this report. The response of the system to the other step inputs (90, 180,
360, and 720) were analyzed. The analytical response for all these step inputs shows a good
match to the experimental data. Table 2 shows a comparison between the model and
experimental performance parameters for step inputs of 360 and 720. Tables 1 and 2 show
that the model is a good representative of the actual physical system which means that the

10

model can be used to investigate the effects of changing the controller gains on the
performance of the actual physical system.
Table2. Performance parameters comparison for 720 and 360 degrees step inputs

720 Step input


Performance parameter Experimental data Model
Rise Time (s)
.231
.235
Settling Time (s)
1.43
1.32
Percent Overshoot (%)
10.6
10.4
Steady state error (Degrees)
.31
.004
360 Step input
Performance parameter Experimental data Model
Rise Time (s)
.117
.125
Settling Time (s)
1.18
.956
Percent Overshoot (%)
7.27
6.85
Steady state error (Degrees)
.51
.001
Very important point to notice about the performance of the system to different step
input values is that the performance parameter changes between the different inputs. This is
in contrast with linear control theory in which the performance of the system doesnt change
with the value of the input. The reason for this variation is that the motor has limits on its
maximum torque and speed and hence higher step inputs will have longer rise and settling
times. In the Simulink model, the motor limitation is taken into account by limiting the
voltage output from the PID controller to be 24V which is the actual motor voltage rating.

Analytical Controller Design


This section presents the approach to design a PID controller for the system to meet
certain design specifications about the system step response. The section starts by defining
the design goals that need to be met. Then, controller design procedure is explained and the
final design results are presented. Lastly, the section concludes by commenting on the
differences between the analytical performance and the performance of the actual system
using the designed controller.
Design Specification . Opening the padlock using the system we have requires some

specification on the step response. As can be seen in figure 8, the system desired position was
1080 degrees, however, the system overshot 1080 degrees by large amount (about 13%)
which indicates that the current system controller is unable to control the transient behavior
of the system as necessarily. In addition, the current system response suffers from relatively
large settling time which causes long time to open the padlock. In order to use the current
system to open a padlock reliably and in a timely manner, the system step response need to be
changed. For this reason, we were given set of design goals that the system should achieve to
open the lock accurately. The design goals were based on the response of the system to a step
input. The design goals are: rise time of about .05 seconds, settling time of .2 seconds and
percent overshoot of less than 10%. In addition, the steady state error of the system should be
as small as possible. The Simulink model shown in figure 6 was used to design a controller
11

that meets the mentioned design goals. The Simulink model allows for changing the PID
gains in the controller block to change the dynamic response of the system.
Controller Design . The approach to change the dynamic response of the system is
based on changing the PID gains in the PID controller. Changing the PID gains can make
wide changes to the response of the system and depending on the choice of several gain
values, the desired dynamic response of the system can be obtained.
The Simulink model in figure 6 was used to investigate the behavior of the system
while changing the PID gains. Having the design goals in mind, built-in Matlab function was
used to tune the PID controller to achieve the design goals. The Matlab function pidtune
can change the response of the system to the desired characteristic by changing the multiple
gains in the PID block in the Simulink model. pidtune was used initially to obtain the PID
gain values that satisfy the design goals. pidtune analyzes the unit step response of the system
and allows the user to change performance parameters like the rise time and the overshoot
until the desired performance is achieved, from there pidtune outputs the values of the
different PID gains that cause the system response to behave as desired. Pidtune is very
efficient and fast tool to design a controller because it takes into account the tradeoffs
between changing different gains and hence the function changes all different gains
simultaneously to achieve the desired performance. The only disadvantage of pidtune is that
the PID controller it produces is based only on the unit step response of the system and the
step input value cannot be changed from unity. It was shown earlier in the previous section
that the response of the system is slightly dependent on the value of the step input which
means that designing a controller based on the unit step input might not be adequate for
higher value of the step input and in the application we are interested in the values of the
command step input is always high compare to unity. For this reason, the results of the
pidtune produce unwanted dynamic behavior for the higher value of the step response. This
problem was tackled through using the PID gain values obtained from pidtune as only an
initial estimate of the final PID gains. This means that pidtune was used initially to improve
the response of the system by making it faster and having low percent overshoot, and then a
manual tuning of the PID gains based on the initial estimate of the results from pidtune was
used to obtain the desired performance for the higher value of the step input. This approach is
better and more efficient than tuning the PID gains manually from the beginning because
pidtune has optimization algorithms that produce an excellent estimate of the PID gains that
require only few modifications to be applicable for high values of the step input.
The manual tuning of the PID gains from the initial results of the pidtune function
was based on some rules of thumb on how each PID gain alter the response of the system.
Table 3 shows the effect of increasing each gain on the response of the system. These general
rules were used to tune the PID gains manually to achieve the desired performance.
Table3. PID gains effect on the system response parameters
Gain
Kp
Ki
Kd

Rise Time
Decrease
Decrease
Small Change

Overshoot
Increase
Increase
Decrease

Settling Time
Small Change
Increase
Decrease

Steady State Error


Decrease
Eliminate
Small Change

After several trial and error and tradeoff decisions between the different design goals, a final
set of analytical gains was chosen. The gains are: Kp = 1.5, Ki= 1.4, and Kd = .007. The resulting
response of the system suing the final PID gains for a step input of 1000 degrees is shown in figure 9.
It can be seen in figure 9 that the response time is much faster than the initial response shown in
figure 8. The percent overshoot also decreased a lot in comparison with figure 8.
12

Figure 9. Analytical system response for a step input of 1000 degrees using the tuned PID
gains.

As discussed earlier, the system response is slightly sensitive to the value of the step
input, for this reason the performance of the system with the new controller need to be
investigated across multiple values of the step input. Table 4 shows a comparison between
the system response parameters for different values of the step input.
Table4. Comparison between the system performance for different step input values
Step
Input
(degrees)
100
180
360
720
1080

Rise
Time(s)

Settling Overshoot
Time(s) (%)

.047
.071
.125
.235
.347

.28
.27
.26
.39
.45

22.1
14.1
6.99
3.22
1.8

Steady
State Error
(degrees)
Zero
Zero
Zero
Zero
Zero

Table 4 shows that for low step input the value of the overshoot is relatively high
which means that the designed controller has better performance at higher values of the step
input. This result is expected because it is hard to have a fast rise response and still achieve
low overshoot for small inputs, because the system needs to accelerate very sharply and then
in very short time needs to decelerate to prevent the overshoot. It is possible to design a
controller to achieve fast response and low overshoot for the small input values, but this
controller will have undesired dynamic response for any relatively large input.
The motivation behind choosing this particular configuration of the controller has to
do with the low value of the percent overshoot among wide range of the step inputs. In
addition, the resulting rise and settling times of the system are very short. Most importantly,
the chosen controller always yields a zero steady state error which is important characteristic
in order to be able to open the lock successfully. The major disadvantage of the chosen
13

controller is the large overshoot for the low step input values which might cause a problem
when attempting to open the lock.
Experimental Results Using the Designed Controller . The designed PID
controller was tested using the actual physical system to assess the performance of the system
and to investigate how well the controller achieves the desired dynamic response. The
designed controller was tested using a step input of 100 and 1000 degrees. Figure 10 shows a
plot for the experimental and analytical system response to a 1000 degrees step input using
the same PID gain values. Table 5 presents a comparison summary between the model
response and the experimental response for the 100 and 1000 degrees step input.

Figure 10. Experimental and analytical system response for a step input of 1000 degrees
using the same PID gains.
Table5. Experimental and model performance parameters comparison for 1000 and 100 degrees step
inputs using same PID gain values

1000 Step input


Performance parameter Experimental data Model
Rise Time (s)
.319
.322
Settling Time (s)
.402
.423
Percent Overshoot (%)
1.81
1.97
Steady state error (Degrees)
.4
zero
100 Step input
Performance parameter Experimental data Model
.047
Rise Time (s)
.038
Settling Time (s)
2.1
.28
Percent Overshoot (%)
11.1
22.1
Steady state error (Degrees)
.03
zero
Figure 10 and table 5 show that there are differences between the responses of the
analytical and the actual system. Discrepancies between the model and the actual system are
14

clearly apparent from table 5 for the step 100 case. The 1000 step analytical and experimental
responses agree with each other in terms of the performance parameters but figure 10 shows
that the actual transient dynamic behavior of the two responses are different after the peak
time. These differences are caused by several factors.
First, the model that was chosen to represents the system (which is figure 5 and
equations 1 and 2) doesnt take into account all the interactions and the physical processes
that happen between the motor and the energizing circuit. In addition, the relations that were
used to relate the mechanical behavior of the motor to the electrical voltage and current are
all simple linear relations, where in fact it is expected that nonlinear terms be present in these
relations. Not accounting for nonlinear system interactions cause the analytical response to
have some discrepancies in compared with the actual system response. Example for nonlinear
process in the system is the friction between several system components. The friction is
modeled as linear viscous damping and the value of the damping coefficient was given only
for the motor. In reality, the friction exists between all the system components that rotate and
it is nonlinear and cannot be described simply by a viscous damping term.
Second, in modeling the closed loop system it was assumed that the output angular
position when sent back through the feedback loop is known precisely and instantly.
However, in the actual system the output is measured by a sensor so depending on the
accuracy of the sensor and the speed in which it processes the measuring signals, the output
might not be known instantly or precisely. Inaccuracies in the measured output will cause the
error signal going to the controller to be different from the modeled error signal, and hence
the PID controller output signal for the case of actual system will be different from the model
system and this might cause some of the discrepancies between the two responses.
Third, the system internal parameters such as the values of the inertia and the
electrical components that was used in the transfer function is based on the manufacturer data
sheet for the motor. These values for the system that is being tested might not be exactly the
same as the data sheet suggests because the specifications given on data sheet are not 100%
accurate. Any discrepancy between the value of the parameters between what is used in the
transfer function and what is actually presents in the real system will cause differences
between the model and experimental responses.
Lastly, noise generated by the power supply and the DC motor H bridge drive can
affect the controller signal in the actual system. The controller signal in the model is assumed
to be a pure controlling signal with zero noise which is not the situation in the real system.
Any of the above mentioned factors can be a cause to discrepancies between the model and
experimental responses. The list of possible factors that might cause differences between the
two responses is not limited to what is mentioned here, but these reasons are believed to be
the most dominant among all factors.

Results of Implementing the System in Opening the Padlock


This section presents the results of using the system with appropriate PID controller to
open the padlock. The section starts by describing the experimental tuning of the PID gains to
improve the response of the system compared with the analytically found PID gains. The
section concludes by presenting the results of using the final gains to open the padlock given
the lock three combinations.
Experimental Tuning of the Controller . It was shown in the last section that the

analytically determined PID gains for the system controller produce slightly different
response in reality that what is expected. The differences in the expected response and the
15

real response get larger for low input values as explained earlier. In addition, the analytic PID
gains led the response of low input values to have large overshoot which is undesirable
characteristic for the purpose of opening the padlock. For these reasons, the analytically
determined PID gains when used in the physical system to control the DC motor led to
response characteristics that were not successful in opening the padlock.
The padlock that was used in the testing system is shown in figure 11. The padlock
has 40 digit combinations which means that each digit is spaced by 9 degrees from each
other. The lock combinations for the padlock that was used were set to 12-18-00. In order to
open the padlock, the motor needs to turn the padlock clockwise for two full revolutions and
then stop at the digit 12. Then, the motor needs to turn the padlock counter-clockwise for one
full revolution while passing the digit 12 and then stop at the digit 18. Finally, the motor
needs to turn the padlock clockwise from the digit 18 until it reaches the digit 00. This
process can be interpreted as a set position sequence in degrees of: (-972) (-558) (-720).
This set position sequence requires that the padlock starts at zero.

Figure 11. Picture of the padlock used in testing the system.

As mentioned earlier, the analytic PID controller when used in the system to control
the motor for the purpose of opening the lock results in failure to open the lock. The reason
behind the failure is that the motor overshot the last digit (which is zero) by almost a two
digit. This is actually expected because the motor in the last set position needs to move from
-558 to -720 degrees which corresponds to a step input of 162 degrees. Table 5 shows that for
low step inputs the overshoot is about 10% which leads for a step of 162 degrees to overshoot
of about two digits.
The PID gains need to be tuned slightly to compensate for the large overshoot that
causes system failure. Information in table 3 was used as a guideline to make the necessarily
changes on the analytical gains. Since the desired change in the performance is to decrease
the overshoot, the derivative gain (Kd) was increased. It was found also that the settling time
for the system need to be decreased and hence the integral gain (Ki) was decreased. After
some trial and error with changing Kd and Ki, a final set of PID gains was chosen. The gains
were: Kp = 1.5, Ki = 1.3, and Kd = .009. These final gains when used in the system controller
allow the motor to open the lock successfully and repeatedly in each trial. In addition, the
new gains improve the transient response characteristics of the system for both the high and
low inputs. It is worth to notice that differences between the analytical and final experimental
controller gains are in Ki and Kd only. The changes made to these gains were for the purpose
of decreasing the overshoot and settling time. Table 6 shows a comparison between the
analytical and final experimental controller gains.

16

Table6. Comparison between the analytical and final experimental controller gains

Gain
Kp
Ki
Kd

Analytical

Experimental

1.5
1.4
.007

1.5
1.3
.009

Figure 12 shows a plot comparing the experimental responses for a step input of 100
degrees before and after the experimental tuning of the PID gains. The figure shows clearly
how the transient response of the system improved in terms of both the overshoot and the
settling time. Table 7 shows the performance parameters comparison between the
experimental responses for a step input of 100 and 1000 degrees before and after the
experimental tuning of the PID gains. Table 7 shows quantitatively how the response of the
system improved in terms of its performance parameters especially for the case of 100 step
input.

Figure 12. Comparison between experimental responses before and after experimental
tuning of controller gains for100 degrees step input.

17

Table7. Experimental performance parameters comparison for 1000 and 100 degrees step inputs
before and after experimental tuning of the PID gains.

1000 Step input


Performance parameter Before Tuning After Tuning
Rise Time (s)
.319
.321
Settling Time (s)
.402
.405
Percent Overshoot (%)
1.81
.407
Steady state error (Degrees)
.4
.5
100 Step input
Performance parameter Before Tuning After Tuning
.039
Rise Time (s)
.038
Settling Time (s)
2.1
.08
Percent Overshoot (%)
11.1
4.36
Steady state error (Degrees)
.03
.08
The system with the final experimental controller gains were tested for several trials
to insure repeatability in opening the padlock. The padlock was successfully opened for all
the trials that were tested. The average time for opening the padlock using the system is 2.81
seconds. This opening time was compared with manually opening the padlock using hand it
was found that the system is faster in opening the lock than hand by at least 2.5 seconds.
Figure 13 shows the experimental response of the system while opening the lock
successfully.

Figure 13. Response of the system while opening the lock.

Evaluation of Using the System to Open a Padlock for Bomb Disposal Robot
This section aims to discuss the feasibility of using the system as attachment to bomb
disposal robot. The section starts with evaluation of the repeatability and reliability of the
system by considering the random error in the response. The section concludes with brief

18

discussion about the system advantages and its performance when used with different lock
combinations.
Repeatability of the System. The use of the current system in bomb disposal robot
for purpose of opening school looker padlocks requires high reliability in the system.
Reliability means that the system works as designed for every time it is used. In other words,
the system operation needs to be repeatable within certain allowable limits.
The repeatability of the system can be determined by measuring the change in certain
parameter during a repeated process of the system. The system parameter that was chosen to
measure the repeatability is the steady state error of the angular position of the lock. The
steady state error was measured ten times for a step input of 360 degrees. From the ten
measurements that were taken, we are interested in finding the true mean of the steady state
error. The true mean will be given in terms of upper and lower limits that are based on the
standard error. The width of the limits of the true mean can be used to estimate how
repeatable the system is.
The steady state error was calculated as the difference between the input set point and
the value of the response after 8 seconds from the start of the input step. In terms of equation,
the steady state error is given by

= 360

(4)

is the steady state error in degrees. Equation 4 was applied to the entire ten measured
trials t0 find the individual steady state error for each measurement. The mean value of the
steady state error from the ten trials is given by
= =10

=1

(5)

10

Where
is the mean value of the steady state error from the ten trials and is the steady
state error for each individual trial. The standard error in the ten trials is given by

109

=10
)
=1 (

(6)

Finally the true mean of the steady state error is given by


=

(7)

Where is the true mean of the steady state error and t is value of the student t distribution
that is based on the number of measurements and the confidence interval that the true mean is
wanted to be estimated in. the value of t in our case is dependent of the confidence interval
only because the number of the measurements is known which is ten. The confidence interval
was chosen to be 95%. The choice of the confidence interval was based on the idea that with
ten measurements it is possible to estimate true mean with high confidence without causing
the upper and lower limits of the true mean to be large. The value of t in equation 7 with 95%
confidence interval is 2.262. Table 8 shows a summary of the statistical quantities of
interests. Figure 14 presents the information in table 8 pictorially with the measured raw data.

19

Table8. Summary of the statistical parameters for determining the true mean of the steady state error.

Mean (degrees)
Standard Error (degrees)
True Mean Upper Limit (degrees)
True Mean Lower Limit (degrees)

.0195
.0192
.0629
-.0239

Figure 14. Steady state error for ten trials for a 360 degrees step input.

Table 8 and figure 14 show that the true mean of the steady state error with 95%
confidence interval is .02 .04 degrees. This means that the true steady state error mean for
the system is always known to be within .02 .04 with a 95% confidence interval. Note that
this interval represents only the range in which the mean of the steady state error lays in but
not the individual measurement of the steady state error.
The low value of the true mean range which is much less than a degree tells that the
system is reliable and accurate when it comes to moving the lock to a certain position. It is
important for the system to be highly accurate and repeatable within tight limits to open
padlocks for bomb disposal robot application. The system given the information figure 14 is
believed to be both reliable and repeatable which is important advantage in the current
system.
Overall System Performance Evaluation . The performance of the system was

tested with different step input values ranging from low inputs to high inputs. The overall
performance of the system among the range of input values that was tested seems to be very
consistent and provide desirable results. That being said, the system response overshoot for
low step inputs seems to get higher as the input value gets smaller. It was explained in earlier
section that large overshoot leads to error in opening the lock because the motor miss the
desired digit by more than the allowable limit. For this reason, the current system might be
unable to open padlocks in which their combinations require low value of the command step
input. The current system has an overshoot of about 4% for a 100 degrees step input which
means a 4 degrees overshoot in total. 4 degrees overshoot is acceptable because the digits in
the tested padlock are spaced with 9 degrees so as long as the lock position is within 4.5
20

degrees from the desired final value the lock will still open, but if a padlock has combinations
that require a step input of less than 100 degrees, problems in opening the lock might be
expected. The current system controller needs some modifications that aim to decrease the
overshoot for low inputs. These modifications are believed to be possible and achievable with
carful investigation of the response of the system to low input values.
There are couples of advantages of using the current system as attachment to bomb
disposal robots. The main advantage is that the system is very reliable and accurate in doing
what is being asked. In addition, the system transient response is very short for the entire step
inputs of interest in real application which insures fast opening time of the lock. In terms of
ease of modifications to the system controller, the system gain parameters can be changed
and tested easily using the test setup presented in the report. So any modifications in the
response of the system can be made easily and can be tested to grantee the performance and
reliability as shown in the report.

Conclusions
The main focus of this experimental work was to investigate the effectiveness of
using control system with single-motor to unlock school looker padlocks. Experimental and
analytical results prove that the current system with the designed PID controller is both quick
and reliable in opening small padlocks.
Analytical modeling of the system was found to be useful in obtaining the final PID
controller configuration. The analytically determined PID gains produce response
characteristics that are closely related to what the physical response characteristics are. This
means that the analytical model can be used as a design tool to get a good estimate of the PID
configuration. From the PID configuration determined analytically, it was shown that only
small changes need to be made on the controller configuration in order to get the desired
response characteristics in actual system.
The final PID gains that were determined experimentally are: Kp= 1.5, Ki=1.3, and
Kd= .009. This PID configuration when tested on the system with 100 step input gave rise
time of .04 seconds, settling time of .08 seconds, and overshoot of 4%. These performance
characteristics are considered to be rapid due to the low rise and settling times and robust due
to the low overshoot. In addition, the system with this PID configuration was able to open the
padlock with combinations 12-18-00 in each time it was tested which proves the reliability of
the system. It was found also that true mean of the steady state error with 95% confidence
interval is .02 .04 degrees. This low value of the true mean insures the reliability of the
system as well.

Attachments:
Appendix A: Open loop transfer function derivation
Appendix B: Data sheet of system components

21

Appendix A: Open loop transfer function derivation


This appendix presents the detailed derivation of the open lop transfer function for the
motor-lock system.

The derivation starts with equations 1 and 2 which are repeated here for convenience
= +
2

(A-1)

(A-2)

Three extra equations are needed to relate different parameters with each other
=

(A-3)

(A-4)

= (1 + 2 ) +

(A-5)

Substituting equation A-4 into A-1 yields


= +

(A-6)

Substituting equation A-3 into A-2 yields


=

2
2

(A-7)

Taking Laplace transform of equation A-6 yields


() () = () + ()

(A-8)

Taking Laplace transform of equation A-7 yields


() = 2 () + ()

(A-9)

Solving for () in equation A-9 yields


() =

22

(2 +)()

(A-10)

Substituting equation A-10 into A-8 yields


() = ( +

(+) (2 +)

)()

(A-11)

Rearranging equation A-11 yields


() =

2 2+ (+) (2 +)

()

(A-12)

Expanding the numerator in equation A-12 yields


() =

3 +2 ( +) +( 22+)

Flipping equation A-13 and multiplying by (

()

(A-13)

180

) to convert from radians to degrees yields

the final results of the open loop transfer function


()
()

(180 )

3 +2 ( +) +( 22+)

23

(A-14)

Appendix B: Data Sheet of System Components

24

You might also like