Beruflich Dokumente
Kultur Dokumente
A PROJECT REPORT
Submitted by
of
BACHELOR OF TECHNOLOGY
in
ELECTRICAL ENGINEERING
MAY, 2017
Page |2
CERTIFICATE OF APPROVAL
This is to certify that the project entitled Modeling& Compensation of Friction Nonlinearity of
Gear-head DC Servomotor in partial fulfillment of requirements for the award of B.Tech
degree in Electrical Engineering , submitted in the Department of Electrical Engineering at
St.Thomas College of Engineering & Technology, Kolkata under Maulana Abul Kalam Azad
University of Technology , West Bengal is an authentic record of our own work carried out
under the supervision of Mrs. Ananya Bose Department of Electrical Engineering.
The matter presented has not been submitted by me/us in any other University / Institute for
the award of B.Tech. Degree.
1. Aritra Chatterjee
2. Samrat Das .
3. Shubham Anand .
(Signature of students)
This is to certify that the above statement made by the candidates is correct to the best of my
knowledge.
Prof. Ananya Bose
Supervisor:
Dept. of EE
. .
HOD (External Examiner)
(Dept. Of Electrical Engineering)
Date:-
Page |3
ACKNOWLEDGEMENT
WE LIKE TO EXPRESS OUR SPECIAL GRATITUDE AND THANKS TO MRS. ANANYA BOSE FOR
HER GUIDENCE AND CONSTANT SUPERVISION AND PROVIDING NECESSERY
INFORMATIONS REGARDING THE PROJECT.
WE ALSO LIKE TO EXPRESS OUR SPECIAL THANKS TO DR. BIMAL BHUSAN SEN SIR FOR HIS
HELP AND GUIDENCE.
ABSTRACT
CONTENTS
1. INTRODUCTION..................................................................................................................................8
1.1 GEAR MECHANISM AND ITS USE IN SERVO APPLICATION..8
1.2 MODELING OF GEAR MECHANISM.......................8
1.3 MOTIVATION AND OBJECTIVE...........................9
2. LITERATURESURVEY.........................................................................................................................10
2.1 INTRODUCTION.....................10
2.2 GEAR FRICTION MODELS...10
2.3 IDENTIFICATION METHODOLOGIES OF GEAR FRICTION MODELS..11
2.4 COMPENSATION TECHNIQUE......................12
3. GENERALISED MODEL OF GEAR HEAD DC SERVO MOTOR.............................................14
3.1 INTRODUCTION..14
3.2 MATLAB MODEL......15
3.3 OBJECTIVES.....................16
4. SYSTEM IDENTIFICATION USING GREY-BOX MODELING TECHNIQUE......17
4.1 INTRODUCTION......................17
4.2 LINEAR SYSTEM MODELS....18
4.3 NON-LINEAR SYSTEM IDENTIFICATION....19
4.4 EXPERIMENTAL PROCEDURE OF FRICTION ESTIMATION USING NONLINEAR
STRUCTURES.......20
4.5 SIMULATION RESULTS ...23
5. COMPENSATION USING SLIDING MODE CONTROLLER...................................................24
5.1 INTRODUCTION.......24
5.1.1 SLIDING MODE CONTROL BASICS....24
5.1.2 VARIABLE STRUCTURE CONTROLLER25
5.2 FIRST AND SECOND ORDER SLIDING MODE CONTROLLER..................25
5.2.1 FIRST OREDER SLIDING MODE CONTROL.....25
5.2.2 REACHABILITY CONDITION.................26
5.2.3 PROOF OF REACHABILITY CONDITION...............27
5.2.4 ADVANTAGES OF SLIDING MODE CONTROL........27
5.2.5 DISADVANTAGES OF SLIDING MODE CONTROL.27
5.2.6 ROBUSTNESS AGAINST MODEL UNCERTANITY.........27
Page |6
LIST OF SYMBOLS
J MOMENT OF INERTIA
ANGULAR DISPLACEMENT
X LINEAR DISPLACEMENT
U INPUT TO THE SYSTEM
Sign SIGNUM FUNCTION
S SLIDING SURFACE
A CONSTANT MULTIPLIER
T TIME
T0 INSTANT WHEN S GOES TO ZERO
Exp EXPONENTIAL FUNCTION
K INPUT MULTIPLIER
f(X) NONLINEAR FUNCTION OF LINEAR DISPLACEMENT
E ERROR
R REFERENCE SIGNAL
U0 CONSTANT INPUT
V LYAPUNOV FUNCTION
f(t) NONLINEAR FUNCTION OF TIME
A1 CONSTANT MULTIPLIER OF LINEAR DISPLACEMENT
A2 CONSTANT MULTIPLIER OF LINEAR VELOCITY
C CONSTANT MULTIPLIER OF LINEAR DISPLACEMENT
M MULTIPLIER
Ueq EQUIVALENT INPUT
SUPERSCRIPTS MEANING
. FIRST DERIVATIVE WITH RESPECT TO TIME
.. SECOND DERIVATIVE WITH RESPECT TO TIME
Page |8
1. INTRODUCTION
Since 1970's, there have been many approaches to correctly model gear mechanisms. In the
earlier days, usually even in the most complicated applications, only a small number of gears
used to be employed in tandem. With the advent of technology, now-a-days much larger
Page |9
number of gears is used even in very cheap and common applications. The use of so called
gearboxes instead of using separate gears helps in reducing the size of the application.
However, the use of multiple gears has adverse effects in terms of increased complexity of the
design, increased nonlinearity and uncertainty. So, unless, these effects are modeled
accurately and precisely, most control algorithms that rely on the accuracy of the system
models would fail.
To overcome this shortcoming, scientists and engineers have been working on developing
more accurate models of gear box mechanism for the last few decades. While some of these
models are quite accurate and exhaustive, they are too complicated to be implemented in a
standard application. However, there are simpler models too [11], but they fail to correctly
and precisely address all the uncertainties and nonlinearities associated with the gearboxes.
Only mathematical modeling of a system doesn't give the exact representation of the system
because of complexity of the system, limited prior information about the system and
incomplete availability of observed data. Even if full knowledge about the system exists yet
exact description is not desirable as the model may become too complex for further
application. So, system identification is considered as an approximate modeling for specific
application on the basis of observed data and prior information.
From the above discussion it is clear that Gear-head motors introduce several dry friction,
backlash, dead zone kind of nonlinearity into the system and thus precision of the system is
hampered. In the field of mechatronic applications, friction is an impediment that can have
significant negative impact on performance by limiting positional accuracy, causing loss of
energy and potential instability in precision motion control applications. Firstly the
researchers ignored this friction mechanism and presented extensive gear dynamic models.
These produced simplified models but they were not at all realistic and hence could not be
used for any practical application. Then a number of friction models came into existence like
the Coulomb model, Karnopp model, Dahl model, Bristle model etc. [11] , that successfully
modeled the friction nonlinearity in the gearbox of gear-head motors. Moreover, gears not
only exhibit friction nonlinearity, other kinds of nonlinearities such as clearance, spatial
variation and sliding friction also persists. When these nonlinearities are included in the basic
friction model, it complicates even the model of a single mesh gear system. Now, if we try to
extend this model to n number of gears in a gearbox then the whole model becomes more
and more complicated which makes it impossible to be used in real-time applications.
Control of such nonlinearity is also complicated.
P a g e | 10
2. LITERATURE SURVEY
2.1 INTRODUCTION
A comprehensive literature survey has been carried out in order to find out the works
alreadyperformed in gear train / gear box friction modeling and related identification
methodologies. This chapter gives an account of the same. The literature survey has been
presented underthree groups: Gear Friction Models, Identification Methodologies,
Compensation techniques.
This section briefly describes the available friction models as well as friction uncertainty
basedmodels for gear-head motors.Olsson et al [11] described the available classical static
friction models as well as the modernmodels. They include Coulomb friction model, Karnopp
model, and Armstrong's model. Thepaper also describes the dynamic friction models in detail.
Starting off with the most famous Dahl model, it describes Bristle's model, the Reset Integrator
model, the Bilman and Sorinemodel, the LuGre model. The paper also provides a detailed
comparison of the above modelsand propose algorithms for friction compensation.The
Coulomb friction model [11] is based on the idea that friction opposes motion and the
magnitude of this opposing force is independent of area of contact and relative velocity of
thecontact surfaces. It is often described as a scaled signum function. In the nineteenth
centuryafter the development of modern fluid mechanics a new term `viscous friction' was
coined [12].This was for taking into account the effects of viscous force components due to
the presenceof lubricants in the surfaces of contact. Unlike the discontinuous Coulomb
friction model,the viscous friction was assumed to be continuous and directly proportional to
the relativevelocity of the contact surfaces. However, viscous friction is often combined with
Coulombfriction and described by a linearly rising and falling signum function with a certain
scale parameter. The term stiction was introduced to describe the friction force at rest. This
introduced thefact that external forces below a certain level resist a static object from moving.
The force due to stiction is described by a piecewise linear function for external forces less
than a certain threshold level and greater than that.
The Karnopp model [13] takes into account the fact that the static friction models described
P a g e | 11
by piecewise continuous or discontinuous functions are not suitable for control or simulation
purpose. It was developed to overcome the problems with the zero-crossing detection of
sliding velocity and to avoid the switching between stiction dynamics and sliding dynamics.
However this model suffers from the fact that it is strongly coupled with the rest of the
system, especially the external forces, which are not always explicitly given. Thus, the model
needs tremendous makeovers before it can be applied to systems with different
configurations. The classical friction models has been shown to be capable of being modified
further in order to be capable of considering the temporal dependencies of stiction and
Stribeck effect, notwithstanding anything related to the presliding displacement.
Advancement in this direction was proposed by Armstrong [14]. Unlike the Karnopp model, it
considers the switching between stictionand sliding but using a well-defined mechanism to
govern the switching.
Servomotors are widely used in industry. Computer-controlled machines, robots, and process
control valves are some of their applications. Modern Servomotors perform tuning
automatically using real-time data for controlling these actuators. This procedure is
composed of three sequential steps.
. Parameter estimation algorithm identifies a model of the servomotor.
. The parameters obtained in the first step, allows computing a control algorithm.
. The servomotor works using the control algorithm computed in the second step.
Regarding the design of the control law, there exist a great number of designs including
ProportionalDerivative (PD) and Proportional Integral Derivative (PID) controllers. System
identification is a method of using the input and output data of the system to build
themathematical model of the system, which is being widely applied to various fields of
productionand life. Since modern systems are becoming more and more complex, and
eventheir internal mechanisms are unclear in whole, therefore, whether or not researchers
designa rational system identification method to establish the mathematical model of the
systemplays an important role in the process of system identification.
P a g e | 12
For friction compensation numerous applications and variations can be found in literature
which is partly summarized in [14]. These ways of compensation can be divided into model
based and non-model based friction compensation and is discussed next into more detail.
Examples of non-model based friction compensations are classic PD and PID feedback
controllers, impulsive control and dither. Although the position tracking with a PD control is
stable, stick-slip might occur at low velocity. This effect can be eliminated through high
derivative, high proportional feedback or a combination of both but at cost of possible
instability and the need for a strong actuator. Another issue is the steady-state tracking error
which can be solved with integral control. Integral control on the other hand can cause limit
cycling at low or zero velocity and can cause other difficulties at velocity reversals. These
issues can be handled with a dead band and anti-windup at velocity reversal. But
unfortunately these methods also introduce new issues like steady-state errors and decreasing
performance. Impulsive control achieves precise tracking by applying series of small impacts.
This makes combinations of other technologies possible as well. For example the use of the
impulsive control to achieve a controlled breakaway after which another controller takes
over to regulate the macroscopic movements. Dither is a high frequency signal introduced
into a system to modify its behavior which can result into a stabilizing effect. The focus here
is the capability to smooth the discontinuity of friction at low velocity. After this application
other friction compensation can be applied on top of this as would be done normally for the
velocity dependent friction part. For repetitive trajectories the iterative learning controller
can be applied into a feedforward approach in order to compensate for friction and other
undesired effects. Another class of non-model based friction compensators are friction
estimators. Examples of these are the Kalman-based filter, a predictive filter and a local
function estimator which are compared in [15]. The Kalman-based method uses a random
walk model that treats friction as a random constant and which should not be confused with
the structured friction models used in model based observers. Many more non-model friction
compensations are possible but are not further discussedsince the main focus in this study is
model based friction compensation which is discussed next.
P a g e | 13
Model based ways to compensate friction can be subdivided into feed forward and feedback
approaches. The feedback compensation uses the real-time sensed system output while the
feed forward compensation operates with a desired reference. Both systems can be expanded
with adaption mechanisms to cope with changing model-parameters due to varying
circumstances.
P a g e | 14
3.1 INTRODUCTION
A servomotor is a rotary actuator or linear actuator that allows for precise control of angular
or linear position, velocity and acceleration. It consists of a suitable motor coupled to a sensor
for position feedback.Anything which opposes the relative motion of the body is called
friction. It is a kind of non linearity present in the system. The common example in an electric
motoris in which we find coulomb friction drag due to the rubbing contact between the
brushes and the commutator.
Since 1970's, there have been many approaches to correctly model gear mechanisms. In the
earlier days, usually even in the most complicated applications, only a small number of gears
used to be employed in tandem. With the advent of technology, now-a-days much larger
number of gears is used even in very cheap and common applications.
The first and the foremost step for designing a practical controller is the modeling of the
mechanical system. Controller commanding systems where the operating points vary and
where high precision is required, nonlinear modeling is employed. Position and velocity
dependent forces govern the working of industrial mechanical systems. Nonlinear
components of the forces such as coulomb friction, deadzone are present that influence the
operating points of the system adversely while rotation. So, accurate modeling of the plant is
P a g e | 15
required for practical controller design. When uncertainties and time-dependencies prevail
in the system, the parameters of the system must be identified using system identification
technique. Though the system identification technique is very useful and yields accurate
results yet a reasonably simpler model is required so that the identification procedure can be
carried out successfully and each and every parameter of the system may be figured out.
We first did the state space analysis of the considered model & drew the signal flow graph.
From that we later designed the generalized gear head model for n number of gears using
Matlab.
P a g e | 16
3.3 OBJECTIVES
3.3.1 Gear-head motors introduce several dry friction nonlinearity into the system
and thus precision of the system is hampered. In the field of applications,
friction is an impediment that can have significant negative impact on
performance by limiting positional accuracy, causing loss of energy and
potential instability in precision motion control applications. Firstly the
researchers ignored this friction mechanism and presented extensive gear
dynamic models. These produced simplified models but they were not at all
realistic and hence could not be used for any practical application. So our
main objective is to compensate the friction non linearity of the gear head DC
Servomotor to improve its performance to some extent.
3.3.2 Here, firstly we formulate a gear friction model for a spur gear pair under
sliding friction and time-varying mesh parameters. Then we tried to
compensate the friction non-linearity using sliding mode control.
P a g e | 17
A mathematical modeling of a system is not the exact but is an approximate model of the
realsystem. Exact modeling of the system is not always possible because of the system
complexity,limited prior knowledge about the system and also lack of accurate observed data.
But, evenif we have full knowledge of the system with complete experimental data then also
exactmodeling is not desirable as it may lead to a complex model that will make it difficult to
beused for any practical application.
So, system identification may be defined as the process of establishing a mathematical
modelof the system from a set of experimental data. Types of system identification are as
follows:
Linear Systems
To see whether a system is linear, we need to test whether it obeys certain rules
that all linear systems obey. The two basic tests of linearity are homogeneity and
additivity.
Together with the moving-average (MA) model, it is a special case and key component
of the more general ARMA and ARIMA models of time series, which have a more
complicated stochastic structure; it is also a special case of the vector autoregressive
model (VAR), which consists of a system of more than one interlocking stochastic
difference equation in more than one evolving random variable.
A nonlinear system is defined as any system that is not linear, that is any system that does not
satisfy the superposition principle.. This negative definition tends to obscure that there are
very many different types of nonlinear systems. Historically, system identification for
nonlinearsystems has developed by focusing on specific classes of system and can be broadly
categorised into four basic approaches, each defined by a model class:
1. Volterra seriesmodels,
2. block structured models,
P a g e | 20
There are four steps to be followed for system identification: data gathering, model postulate,
parameter identification and model validation. Data gathering is considered as the first and
essential part in identification terminology, used as the input for the model which is prepared
later. It consists of selecting an appropriate data set, pre-processing and processing. It
involves the implementation of the known algorithms together with the transcription of flight
tapes, data storage and data management, calibration, processing, analysis and presentation.
Moreover, model validation is necessary to gain confidence in, or reject, a particular model.
In particular, the parameter estimation and the model validation are integral parts of the
system identification. Validation refers to the process of confirming the conceptual model and
demonstrating an adequate correspondence between the computational results of the model
and the actual data.
The System Identification Toolbox in MATLAB is for building accurate, simplified models
of complex systems from noisy time-series data. It provides tools for creating
mathematical models of dynamic systems based on observed input/output data. The
toolbox features a exible graphical user interface that aids in the organization of data
and models. The identification techniques provided with this toolbox are useful for
applications ranging from control system design and signal processing to time-series
analysis and vibration analysis.
The image below illustrates the fitting of a transfer function, corresponding to a linear time-
invariant dynamic model of vibrations in a flexible structure, to experimental data in the
frequency domain.
Identification Procedure
section gives a brief account of the most important approaches. The procedureto determine a
model of a dynamical system from observed input-output data involves threebasic
ingredients:
The input-output data
A set of candidate models (the model structure)
A criterion to select a particular model in the set, based on the information in the data
(the identification method).
The system identification toolbox is used to find out the linear TF of the motor.
It is worth noting that, the validation process is mandatory in case a nonlinear system is being
identified. If the system that we want to identify is a linear one (which, in ourcase, is true), the
validation process is not absolutely mandatory.
. Then the linear TF of the motor is subtracted from the original TF which results into
separation of the friction nonlinearity.
. Then the System Identification toolbox is used to identify the friction data using
Nonlinear polynomial ARX [10 10 9] model.
In control systems, sliding mode control, or SMC, is a nonlinear control method that alters
the dynamics of a nonlinear system by application of a discontinuous control signal that
forces the system to "slide" along a cross-section of the system's normal behaviour. The state-
feedback control law is not a continuous function of time. Instead, it can switch from one
continuous structure to another based on the current position in the state space. Hence,
sliding mode control is a variable structure control method. The multiple control structures
are designed so that trajectories always move toward an adjacent region with a different
control structure, and so the ultimate trajectory will not exist entirely within one control
structure. Instead, it will slide along the boundaries of the control structures. The motion of
the system as it slides along these boundaries is called a sliding mode and the
geometrical locus consisting of the boundaries is called the sliding (hyper)surface. In the
context of modern control theory, any variable structure system, like a system under SMC,
may be viewed as a special case of a hybrid dynamical system as the system both flows
through a continuous state space but also moves through different discrete control modes.
We know
J U
U
= ...(5.1.1.1)
J
Let X (5.1.1.2)
Variable structure control (VSC) is a form of discontinuous nonlinear control. The method
alters the dynamics of a nonlinear system by application of a high-frequency switching
control. The state-feedback control law is not a continuous function of time; it switches from
one smooth condition to another. So the structure of the control law varies based on the
position of the state trajectory; the method switches from one smooth control law to another
and possibly very fast speeds (e.g., for a count ably infinite number of times in a finite time
interval). VSC and associated sliding mode behaviour was first investigated in early 1950s in
the Soviet Union by Emelyanov and several co researchers.
Lets define
S X AX ....(5.2.1.1)
X = -AX
X = -Sign(S)
Now at the starting time S is non zero. But as time passes S goes to zero gradually.
P a g e | 26
So after T0, Xis going to follow equation (5.2.1.2). As only after S is all the calculations are
going to be valid.
Now any system following the law S S < 0 will surely reach the sliding surface.
Now say at the beginning of the calculation system has some speed, so here X is nonzero
and X is also nonzero at position a in figure 5.2.2.1
So system again comes back to its position b in case of figure 5.2.2.1 It is also true for the
reverse case if S <0 then always S >0.
S X AX (5.2.3.1)
S X AX
S K sign(S ) AX
X f ( X ) U (5.2.6.1)
Now E = R X.(5.2.6.2)
P a g e | 28
V is positive definite
1 2
V E
2
V EE E ( R X ) (5.2.7.1)
= E 0 f X U
= E( f X U 0 sign E )
E ( f 0 U 0 sign E )
0 .as U 0 0
Then it shows that derivative of the energy is always going to be less than zero, means either
energy will reduce or remain constant .Then error term will also come as zero.
So it is clear that only taking the system as a bounded we can still design U and can achieve
the desired result.
P a g e | 29
In figure 5.2.2.1between point a and b its known as Range Space Dynamics and this
design is known as Range space Design.
X A2 X A1 X U f t (5.2.8.1)
S X CX
A2 X A1 X U f t CX
A2 X A1 X CX U f t
Ueq U f t ....(5.2.9.1)
S M sign S f t ...(5.2.9.2)
P a g e | 30
Assume M f t
6. METHODOLOGY
6.2.1.1 Responses
P a g e | 33
6.2.2.2 Then we plot that y vs t means velocity vs time curve and name it as
Original encoder data.
6.2.2.3 So the velocity data have been stored in an array of y.
6.2.2.4 Now we define simulation time Ts.
6.2.2.5 But velocity data s in the array y consists of a huge range of data., that is
unnecessary so we apply the smoothing technique where if velocity more
than 200 we set it as 1 and if smaller than -200 put it as -1 else put it as
0.
6.2.2.6 Then again we plot it with the time and name it as Smoothened encoder
data.
6.2.2.7 In the mean time we define a variable named vel that symbolizes the
position of the servo and a single dimensional array velocity with the
zeros initialized in it.
6.2.2.8 Now if y>0 then surely motor has rotation towards the positive means
clockwise direction. Here the motor used is positional servo. So in total it
has 180 degrotation and has 30 teeth in it.
6.2.2.9 Now for each smoothened y recorded we try to find its position in the
180 deg half cycle.
6.2.2.10 So it comes to Summing up the encoder data where if y comes to be 0 vel
remains unchanged, if y>1 means vel increases by 180/30 deg in the
forward direction and y<1 means 180/30 in the reverse direction.
6.2.2.11 So for each time interval what should be the position of the gearhead we
find and put it in the array named Velocity.
6.2.2.12 Then we plot Velocity with the Time and name it as Motor velocity
response with friction.
6.2.2.13 Now we define an one dimensional array input having length same as
total time samples that has already been recorded in range.
P a g e | 34
6.2.3.1We load two mat files friction data and velocity data in workspace
Consisting of previously saved values.
6.2.3.2 Then separate the denominator and numerator part of the motor_tf .
6.2.3.3 Find the step response of motor_tf and put it in y_ideal.
6.2.3.4 Next step 6.2.2.24 to 6.2.2.31 is again repeated but here only difference that
we store the step response in a variable x.
6.2.3.5 But step response has dc gain but we have to take the postion where it
settles down. means the steady state value .so we subtract the mean of x
from its original value.
6.2.3.6 Then find the length of time t and put it in variable n.
6.2.3.7 Create two matrix y_smcand input of dimension (n*1) and initialize with
zeros.
6.2.3.8 Now x stores time series data for step response of friction_sys and it has
least value of -0.1110 and highest value of 0.0834.
output
6.2.3.9 We know motor_tf
input
a
Let motor_tf be =
bs+c
So here num=a den[1]=b den[2]=c
d
And bs means (b) in time domain in the program that is nothing but
dt
b
Ts
output a
input b
c
Ts
b
Or, ( output) + (c output) = a input
Ts
b
Or, (a input ) (c output) = ( output)
Ts
P a g e | 38
Ts
Or, output = {(a input)(c output)} .(6.2.3.9.1)
b
6.2.3.10 We have assigned two variable discont_in and in and assigned values to
it.
6.2.3.11 In x times series values of step response of friction_sys has been loaded.
6.2.3.12 So if x crosses the limit of 0.01 and -0.01 then we find system to have too
much of friction nonlinearity. That needs compensation.
6.2.3.13 So we change the values of input, if it is more than 0.01 subtract from in
else addAnd put it in input. y_smc means velocity of the motor
Then plot it .
7.1 As we did not have much previous knowledge about the subject of the project as it
is related to mechatronics engineering, we had to spend a lot of time for studying
the subject matters.
7.3 After completing the modeling part, we tried to compensate the friction
nonlinearity of the servomotor using PID controller first but we did not get any
justified output. So we used sliding mode controller to compensate the friction
non-linearity.
P a g e | 40
8. FUTURE EXTENSION
8.1 We have used sliding mode controller of first order only. Higher order extension
of the compensator can be the future extension of this project.
8.2 Hardware model of the project has not been done yet. So it can also be thought of.
P a g e | 41
9. APPLICATIONS
Gear head DC servomotor has various applications in robotics & other industrial purpose
and it is often desired that the nonlinearity of the motor must not exceed a certain level so
that it gives the required performance. So the nonlinearity of the motor can be
compensated by this method and in that case our project will be very much useful.
P a g e | 42
The main aim of the project has been to develop a complete and accurate model of the
gearheaddc servomotor & to compensate the friction non-linearity using sliding mode
controller. The necessity of having this exact model was to have an idea aboutthe
nonlinearities present in the gearbox of the gear-head servomotors that generally
hamperprecision motion control application. In order to achieve the exact nonlinear
model of the gear-head motors, identification techniques were used. This helped in clearly
identifying theparameters of the whole system and also estimating the uncertainty present
in the system.In this work, a systematic procedure has been developed to determine a
friction model thatcharacterizes the real uncertainty in a motor. Accurate model for a
gear-pinion pair hasbeen formulated and then this model has been extended for n number
of gears in action.Generalization makes the model more complicated from the design as
well as the applicationpoint of view. So, in order to have a feasible model of the gear-head
motors the said generalizedmodel was reduced to relatively simpler model. Our work
resulted in a systematic approach to find out a dependable model of the gear-head servo
motor in presence of friction uncertainty.As the proposed approach was generalized in
nature, it could be extended to any type ofgearbox or gear-head and dc motor in
combination.
Now, the accuracy of the model needed to be judged. We have used dataset of 2500
samplesof a small gear-head dcmotor as our system of interest. The gear-head motor's
parameter was to be identified. The first and the foremost step is system identification that
was carried out using grey-box identification technique. Grey-box identification provided
a complete system model along withthe nonlinearities present in the system. Then a robust
controller i.e., sliding mode controller was employed for the compensation.
P a g e | 43
11. BIBLIOGRAPHY
[1]EFFECT OF SLIDING FRICTION ON SPUR AND HELICAL GEARDYNAMICS AND VIBRO-
ACOUSTICSBySong He, B.S., M.S.
[3] I. D. Landau, \System Identification and Control Design Using P.I.M.+ Software,
EnglewoodCli_s," New Jersey: Prentice Hall, 1990.
[4] L. Zadeh, \From circuit theory to system theory," Proc. of the IRE, vol. 50, no. 5, May1962,
pp. 856-865.
[9] P. Eykho_, \System Identification:Parameter and State Estimation," John Wiley & Sons,pp.
555, 1974.
[12]O. Reynolds, \On the theory of lubrication and its application to Mr. Beauchamp
Tower'sexperiments, including an experimental determination of the viscosity of olive oil,"
Phil. Trans. Royal Soc., vol.177, pp. 157{234, 1886.}
[15] A. Ramasubramanian and L.E. Ray. Stability and performance analysis for non-model-
based friction estimators. volume 3, pages 29292935, 2001.
P a g e | 45
12. ANNEXURE
12.1 friction_model.m
%The parameters are to be copied from the thesis of He Song
%Page 21
%The Solution is based on Euler's Method
%viscous damping of tooth (lb-s/in)
c1= 1; c0= 1;
%tooth mesh stiffness (lb/in)
k1= 1; k0=1;
%Moment arm of pinion (in)
Xp1=1; Xp0=1;
%Moment arm of gear (in)
Xg1=1; Xg0=1;
%polar moment of inertia (lb-s^2-in)
Jp=1; Jg=1;
%effective polar moment of inertia (lb-s^2-in)
Je=1;
%radius (in) from base to gear
rbg=1;
%radius from base to pinion
rbp=1;
%angular speed (rad/s)
omegap=1;
%base pitch (/in)
lambda=1;
%coefficient of friction
mu=1;
%Effective Troque (lb-in)
Te=1;
Lap=1;
%----------------------------------------------------%
holdon;
plot(time',x2,'r')
xlabel('Time (s)')
ylabel('$\delta(t)$ and $\dot{\delta}(t)$','Interpreter','latex')
legend('\delta(t)','d\delta(t)/dt')
grid
12.2 friction_model_modified.m
%Spur gear friction gear model
%The Solution is based on Euler's Method
tc=lambda/(omegap*rbp);
%coefficient of friction
mu=0.2;
Lap=lambda*(gamma-1)/(2-gamma);
%----------------------------------------------------%
TSim=.5;
h=0.001;
t=0;
u=Te/deno; % 7 thsem report equation 3.3.10
n=floor(TSim/h); % finding no of looping
x1=zeros(n,1); % initializing values of del
P a g e | 47
clc
for i=1:n-1
t=h*i;
fac1=mu*(Xp1*Jg*rbp+Xg1*Jp*rbg)/deno;
fac0=mu*(Xp0*Jg*rbp+Xg0*Jp*rbg)/deno;
sgn=sign(mod(omegap*rbp*t,lambda)-Lap);
B=c1*(1+fac1*sgn)+c0*fac0;
K=k1*(1+fac1*sgn)+k0*fac0;
x1(i+1)=x1(i)+h*x2(i);
x2(i+1)=x2(i)+h*(-K*x1(i)/Je-B*x2(i)/Je+u/Je);
end
time=linspace(0,t-h,n);
subplot(2,1,1)
plot(time',x1,'b')
xlabel('Time (s)')
ylabel('\delta(t)')
legend('\delta(t)')
grid
subplot(2,1,2)
plot(time',x2,'r')
xlabel('Time (s)')
ylabel('d\delta(t)/dt')
legend('d\delta(t)/dt')
grid
P a g e | 48
12.3 f_motor_data_reco.m
clc;
clear;
load('motor_data.mat')
range = length(t);
vel = 0;
velocity = zeros(range, 1);
Ts = (t(200) - t(100))/100;
subplot(2,3,1)
plot(t,y);
xlabel('time (s)');
ylabel('velocity (rad/s)');
grid;
title('Original encoder data');
%Smoothing
for i = 1:range
if y(i,1)> 200
y(i,1) = 1;
elseif y(i,1)< -200
y(i,1) = -1;
else
y(i,1)= 0;
end
end
subplot(2,3,2)
plot(t,y);
xlabel('time (s)');
ylabel('velocity (rad/s)');
grid;
title('Smoothned encoder data');
velocity(i,1) = vel;
end
input=ones(range,1);
subplot(2,3,3)
plot(t, velocity);
xlabel('time (s)');
ylabel('velocity (rad/s)');
grid;
title('Motor velocity response with friction');
load('velocity_data.mat');
ideal_motor = step(motor_tf,t);
subplot(2,3,4)
plot(t, ideal_motor)
xlabel('time (s)');
ylabel('velocity (rad/s)');
grid;
title('Response of the identified motor');
subplot(2,3,5)
plot(t, friction)
title('Friction dynamics');
xlabel('time (s)');
ylabel('velocity (rad/s)');
grid;
u0 = 1;
[X,~,r] = findop(friction_sys, 'steady', 1); %operating point or equilibrium
point
y0 = r.SignalLevels.Output;
sys = linearize(friction_sys,u0,X);
opt = stepDataOptions;
opt.InputOffset = u0;
opt.StepAmplitude = 0.1;
subplot(2,3,6)
plot(t, friction_identified)
title('Identified Nonlinear Friction Model Response');
xlabel('time (s)');
ylabel('velocity (rad/s)');
grid;
input = ones(length(t),1);
save('friction_data', 'friction_sys', 'friction_identified', 'friction',
'input', 'Ts', 't');
clear
P a g e | 50
12.4 f_motor_smc.m
load('friction_data.mat');
load('velocity_data.mat');
discont_in = 0.1;
num = motor_tf.num;
den = motor_tf.den;
y_ideal = step(motor_tf,t);
u0 = 1;
[X,~,r] = findop(friction_sys, 'steady', 1);
y0 = r.SignalLevels.Output;
sys = linearize(friction_sys,u0,X);
opt = stepDataOptions;
opt.InputOffset = u0;
opt.StepAmplitude = 0.1;
x = step(friction_sys, t, opt);
x = x - mean(x); %dc gain consideration
n=length(t);
y_smc=zeros(n,1);
in = 1.0;
input=zeros(n,1);
clc;
for i=1:n-1
if x(i)>=0.01
input(i) = in - discont_in;
elseif x(i)<=-0.01
input(i) = in + discont_in;
else
input (i) = in;
end
y_smc(i+1) = y_smc(i) + (Ts/den(1))*(-den(2)*y_smc(i)+ num*input(i)); %Js+B
end
plot(t, y_smc)
title('Response of the motor with friction identification and SMC');
xlabel('time (s)');
ylabel('speed (rad/s)');
grid;