You are on page 1of 17

International Journal of Mechanical & Mechatronics Engineering IJMME-IJENS Vol:13 No:02 1

Mechatronics Design of Motion Systems;


Modeling, Control and Verification.
Farhan A. Salem1,2
1
Mechatronics program,. Dept. of Mechanical Engineering, Faculty of Engineering, Taif University, 888, Taif,
Saudi Arabia. 2 Alpha Center for Engineering Studies and Technology Researches, Amman, Jordan.
Email: salem_farh@yahoo.com

Abstract-- To help in facing the two top challenges in and understand the key issues in hardware implementation [1-
developing mechatronic systems, while maintaining desired 6].
accuracy and to optimize system level performance to meet the Motion control is a sub-field of control engineering, in which
design requirements, this paper proposes an accurate the position or velocity of a given machine are controlled using
mathematical and simulink models for accurate mechatronics some type of actuating device. Most used actuating devices
design and verification of both system and control of motions in mechatronics applications are electric actuating machines,
throughout Mechatronics systems design and development which are used in many, if not most, modern machines (e.g.
process, including proper selection, analysis, integration and electric cars, locomotives, fans, turbines, and drills), robotics
verification of the overall system and sub-systems performance (e.g. Mobile robot and robot arm), industrial and
in terms of output speed, angle, torque, current, acceleration manufacturing (e.g. conveyer belts, rolling, cutting, welding,
and signals, resulting in simplifying and accelerating saws and bending machines as well as to spin gears and food
Mechatronics systems design process. The proposed models and medical industry mixers), also, many kitchen appliances
intended to be used for research purposes in mechatronics use DC motors. Two main motion control applications are of
motion systems design, motion control applications, as well as, concern; mobile robots and robot arms.
for the application in educational process. The proposed model Accurate control of motion is a fundamental concern in
can be modified to include any control strategy and/or any mechatronics applications, where placing an object in the
actuator. The model was created and verified using MATLAB exact desired location with the exact possible amount of force
simulink software and torque at the correct exact time, while consuming minimum
power, at minim cost, is essential for efficient system operation,
Index Term— Mechatronics system, Motion control, while maintaining accuracy, to simplify and accelerate
Mathematical and simulink function block models. Mechatronics systems design process, and considering the
two top challenges faced in developing mechatronic systems,
including proper selection, analysis, integration and
I. INTRODUCTION verification of the overall system and sub-systems
performance throughout the development process, and
Mechatronics system design is Modern interdisciplinary
optimize system level performance to meet the design
design procedure; it is a concurrent selection, integration and
requirements, this paper proposes an accurate general
optimization of the system and all its components as a whole
mathematical and simulink models of system, motions and
and concurrently, all the design disciplines work in parallel and
control in mechatronics applications, in terms of output speed ,
collaboratively throughout the design and development
angle, torque, current, acceleration and signals , in terms of best
process to produce an overall optimal design. Mechatronics
selection and integration of system's mechanical parts,
design approach tends to develop products with synergy and
controller and components, as an application example the
integration toward constrains like higher performance, speed,
proposed model will be tested in mechatronics design of two
precision, efficiency, lower costs and functionality. The two
systems a mobile robotic platform and robotic arm systems,
top challenges faced in developing mechatronic systems are
where an electric motor, a motion control system and
the early identifying system level problems and ensuring that
corresponding components are selected, designed and
all design requirements are met, in order to evaluate concepts
integrated to move a given mechanical system to/with a
generated during the design process, without building and
desired output (speed and/or position), corresponding to
testing each one, mechatronics engineer, must be skilled in
applied input voltage ,Vin, achieving and maintaining all design
modeling, simulation, analysis, and control of dynamic systems
requirements.

131402-6565-IJMME-IJENS © April 2013 IJENS


I J ENS
International Journal of Mechanical & Mechatronics Engineering IJMME-IJENS Vol:13 No:02 2

Mobile robot is a platform with a large mobility within its system using different approaches; different simplified and
environment (air, land, underwater) it is not fixed to one accurate models are derived for different application. In [15]
physical location. Mobile robots have potential application in analysis of how to choose DC motor to be balance with their
industrial and domestic applications. Accurate designing and applications for a given mobile robot, also, specification of DC
control of mobile robot is not a simple task in that operation of Motor that can be used with desire mobile robot is determined
a mobile robot is essentially time-variant, where the operation using MATLAB Simulink model. In [16] an accurate general
parameters of mobile robot, environment and the road purpose mobile robotic platform for system and controller,
conditions are always varying, therefore, the mobile robot as selection, design, modeling, testing and validation. In [17] a
whole as well as the controller should be designed to make the model and control of mobile robots are presented. [18]
system robust and adaptive, improving the system on both Addresses mechatronics design, modeling, controller
dynamic and steady state performances [1].Single joint robot selection, design, simulation and analysis issues of a simple
arm system consists of three main parts; arm, connected to robot arm considering all the forces applied upon the system.
actuator through gear train. In [18] a proposed mechatronics design including modeling
The following nominal values for the various parameters of two and control selection are introduced.
different eclectic motor can be used and tested: First motor: Meanwhile Mobile system dynamics depends on dynamics
Vin=12 Volts; J m=0.02 kg·m²; b m =0.03;K t =0.023 N-m/A; K b between the surface, wheels and mobile platform, robot arm
=0.023 V-s/rad; Ra =1 Ohm; La=0.23 Henry; TLoad, gear ratio, dynamics depends on arm's mass, length and shape. The
for simplicity ,n=1. Second motor: Vin=12 Volts; Motor torque geometry of the mechanical part determines the moment of
constant, Kt = 1.1882 Nm/A; Armature Resistance, Ra = inertia, for simplicity, the mobile platform can be considered to
0.1557 Ohms (Ω) ; Armature Inductance, La = 0.82 MH be of the cuboide or cubic shape. Also, arm is considered as a
;Geared-Motor Inertia: Jm = 0.271 kg.m2, Geared-Motor Viscous rod of mass m, length ℓ, (so that m = ρ*ℓ*s), this rod is rotating
damping b m = 0.271 Nms; Motor back EMF constant, Kb = around the axis which passes through its center and is
1.185 rad/s/V, gear ratio, for simplicity , n=1, 10. perpendicular to the rod .The total equivalent inertia, Jequiv and
The robot arm system to be designed, has the following total equivalent damping, b equiv at the armature of the motor
nominal values; arm mass, M= 8 Kg, arm length, L=0.4 m, and with gears attaches, can be calculated from known formulae.
viscous damping constant, b = 0.09 N.sec/m. so that a voltage
range of 0 to 12 volts corresponds linearly of an Robot arm
output angle range of 0 to 180, that is to move the robot arm to
Input units Control unit Output unit
the desired output angular position, θL , corresponding to the
applied input voltage ,Vin . The mobile robot system to be
designed, has the following nominal values wheel radius r
=0.075 m, wheelchair height,h= 0.920 m, wheelchair width ,b =
0.580 m, the distance between wheels centers = 0.4 m, The Sensors Converters Microcontroller Motor driver
most suitable linear output speed of used, domestic, mobile
robot is to move with 0.5 meter per second, (that is ω=V/r = Fig. 1. (a) Motion control system and components
0.5/ 0.075 = 6.6667 rad/s,). Tachometer constant, Ktac = 12 /
6.6667=1.8 (rad/sec)

II. SYSTEM M ODELING


We are to model overall systems and sub-systems including
mechanical system, actuator, system dynamics, control
systems and sensors. The control of mechatronics system's
motion is simplified to electric machines motion control that
may or not include gear sys tem . Motion control system and
components, A negative closed loop feedback control system
with forward controller and corresponding simulink model
shown in Fig.1 are to be used. Electric machine is powered and Fig. 1. (b) motion control using microcontroller, and corresponding
desired output movements will rely on how the electric motor is feedback element.
commanded, by using a simple controller of e.g. PIC
microcontroller, and corresponding feedback element,
interfaces and electric machine, the output movements (the
rotation to a fixed speed or angle) can be controlled easily.
Different researches on this theme, can be found, most of it
study separate systems and control design. In [14] modeling,
simulation and analysis of the basic open loop DC motor

131402-6565-IJMME-IJENS © April 2013 IJENS


I J ENS
International Journal of Mechanical & Mechatronics Engineering IJMME-IJENS Vol:13 No:02 3

d s 
Angle or Speed Error, Volt Controller Motor shaft
us  Rs i s   j  k s 
Control voltage, dt
reference (desired) + (angle, speed) 
Vc d R
ω or θ  j ( k  Pb m ) R 
- (1)
us  RR i R  
dt

 s  Ls i s  L  i R 
 R  LR i R  L i S 
Volt 
Sensor
Where:  k the angular speed of rotating coordinate system
Angle or Speed measure e,.g
Potentiometer, Tachometer (reference frame), Depending on motor construction (AC or
Fig. 1. (c)T wo Block diagram representations of PMDC motor control DC), the method of the supply and the coordinate system
Controller to be
DC Motor (stationary or rotating with the rotor or stator flux) the above
Subsystem
selected and designed mentioned model becomes transformed to the desirable form
Error Angle or speed [16]. To write the equivalent electric actuator model, for output
P(s) In1 Out1
speed control, model of a symmetric half of the mobile robot
Reference input Output shft platform is constructed, the same model is used for output
angle, speed
angle control, as well as for current, torque and acceleration.
Vpot or Vtach The PMDC motor open loop transfer functions without any
-K- Robot.mat
load attached relating the input voltage, Vin(s), to the motor
Kpot or Ktach To File shaft output angle, θm(s), and speed ωm(s), are given by:
Fig. 1. (d) Preliminary simulink model for negative feedback with  (s ) Kt

forward compensation V in (s ) 
 La J m s 3  (R a J m  b m La )s 2  (R ab m  K t K b )s   2  
II.I ELECTRIC MOTOR MODELING  (s ) Kt

The actuators most used in mechatronics motion control V in (s ) 
 La J m s 2  (R a J m  b m La )s  (R ab m  K t K b )  
systems, are DC machines (motors). Because their torque-
The transfer function of PMDC, equivalent to robot arm
speed characteristics are achievable with different electrical
transfer function, in terms of input volt and output angular
configurations and their speeds can be smoothly controlled
position, is given by:
and in most cases are reversible, also, DC Motor and its arm (s )

Kt * n  3
 L J 
features can be analyzed both by Control System design V in (s ) s 3  (R a J equiv  bequiv La  s 2  (R abequiv  K t K b )s 
calculation and by MATLAB software .There are many DC a equiv

motors that may be more or less appropriate to a specific type The transfer function of PMDC, equivalent to mobile robot
of application each has its advantages, limitations and platform transfer function, in terms of input volt and output
disadvantages. The designer must select the best one fo r angular speed is given by:
specific application. In [11] different types of DC machines, are mobile (s ) Kt / n  4

introduced with their mathematical models, current and torque V in (s ) (La J equiv )s 2  (R a J equiv  bequiv La )s  (R abequiv  K t K b ) 
characteristics, it was shown that allmostly, all DC machines Major mechanical and electrical nonlinearities, (e.g. coulomb
has identical models, therefore any DC machine can be used to friction), can be included, in this model, which is considered as
build the proposed motion model, to be accurate for each disturbance torque, and is given by:
particular case, it is required, only, to modify the used actuator Te – Tα – Tω - TEMF - Tf = 0
model. DC motors are an example of electromechanical At steady is given by:
systems with electrical and mechanical components, it turns Tf = Te - b*ω
electrical energy into mechanical energy and produces the In the following calculation the disturbance torque, T, is all
torque required to move the load to the desired output torques including coulomb friction, and given by T=Tload+Tf ,
position, θL, or rotate with the desired output angular speed, and correspondingly, the open-loop transfer function of the
ωL. The produced torque is exerted to accelerate the rotor and PMDC, is given by:
ultimately this mechanical power will be transmitted through a Kt
gear set to mechanical system part. The fundamental system of Gopen (s ) 
electromagnetic equations for any electric motor is given by
 La s  R a  (J equiv s  bequiv s )   La s  R a T   K b K t
2

[14-15]:  5
The geometry of the part determines the moment of inertia (e.g.
cuboide, Cylindrical, rod, disc, sphere etc), equations for the
total equivalent inertia, Jequiv and total equivalent damping,
b equiv at the armature of the motor with gears attaches are given
in tables, for mobile robot the mobile platform can be

131402-6565-IJMME-IJENS © April 2013 IJENS


I J ENS
International Journal of Mechanical & Mechatronics Engineering IJMME-IJENS Vol:13 No:02 4

considered to be of the cuboid or cubic shape and calculated Equation relating the torque developed by the motor and the
by Eq.(6), also the total inertia can be calculated from the motor shaft angle is given by:
energy conservation principle.  m (s ) 1

T m (s )  J equiv s 2  bequiv s 
2 2
N  N 
bequiv  b m  b Load  1   J equiv  J m  J Load  1 
N2  N2 
bh 3
1  6 II.II SYSTEM DYNAMICS MODELING
J mobile   J arm  ml
2

12 12 When deriving an accurate mathematical model for motion


0.5 * m total *  2  0.5 * J load *  2 system it is important to study and analyze dynamics between
system and surroundings, and considering all the forces
m total *  2
J load  applied upon the system. The suggested model will tested for
2 mechatronics motion control design applications of two
Considering that linear velocity of platform, depends on
systems mobile robot and robot arm. For other systems the
motor's angular speed, wheels radius, r, and gear ratio, n,
proposed model will include a separate block for load torques
substituting, gives:
of particular application form and dimensions , such that the
n r
  shaft * n    , model can be applied to any motion control system.
r n For robotic arm; Torque, T is defined as a turning or twisting
m * r 2 *  2 m total * r 2 force and is calculated as given next: T  F * L , Where: F The
J load  total 2 
n *2 n2 force acts at a length, L, from a pivot point. The torque
Form robot arm application: The moment of inertia of the required to hold a mass, m, at a given distance from a pivot is
robot arm can be found by computing the following integral: therefore:
l /2
x3 m l3 /8 1 T  (m * g ) * L
  x 2 sdx   s   ml
l /2 2

 l /2
s2
 l /2
3 sl 3 12 To calculate the extra torque required to move (i.e. create an
Calculating and substituting values in (6) gives: angular acceleration), we calculate the moment of inertia of the
JLoad= (8*(0.4) ^2)/12 = 0.106666666666667 kg.m2 part from the end to the pivot. For mobile robotic platform; In
Substituting, we obtain, Jequiv ,to be : [4,13,17] an accurate derivation of all forces acting on mobile
Jequiv = Jm + Jload *(1/1) platform system, when it is running are introduced. For mobile
Jequiv =0.02+0.107= 0.1267 kg·m² robot, considering dimensions, and the following most acting
Obtaining the total damping, b total , gives: forces and corresponding torques, can be considered:
b equiv = b m + b load(1/1) Rolling resistance force,
b equiv_arm = 0.03 + 0.09 = 0.12 N.sec/m FR  Fnormal _ force Cr  MgCr cos( ) 7
Form mobile robot application: The total equivalent inertia, In terms of the vehicle linear speed Eq.(7) becomes:
Jequiv and total equivalent damping, b equiv at the mobile robot FR  M *g *  Cr0 -Cr1 *  * sign ( )
armature of the motor are ,Jequiv =0.2752 kg.m2 , b equiv = 0.3922
The rolling resistance torque is given by:
N.m.s. Neglecting the DC motor’s inductance, by assuming L
≈0, we have, transfer function relating input voltage and
TR   M * g *Cr *cos( )  * rw 8
output speed: The hill-climbing resistance force is given by:
 (s ) K t / R a J equiv Fclimb  M * g *sin( ) 9

V (s ) 1  Kt Kb  The hill-climbing resistance, slope, torque, is given by:
s  bequiv  
J equiv  Ra  10  Tclimb  Tslope =  M * g *sin( ) * rwheel
Transfer function relating input Vin (s) and output current: The total inertia force of the mobile platform,
d
 1 bequiv  Finertia  Fslope =M
 s   dt
I (s ) Ra J equiv 
 The inertia torque is given by:
V (s ) 1  Kt Kb  d
s  bequiv   Finertia  Fslope =r 2 M
J equiv  Ra  dt
The transfer function relating the input voltage, Vin (s), to the Aerodynamic Drag force, given by:
output armature current, Ia(s), directly follows: Faerod  0.5 ACdvehicl 2

1  La  The aerodynamics torque is given by:


s  
I a (s ) La  Jm  1 
 Taerod    ACdvehicle 2  rw
V in (s ) R bequiv   R abequiv K K  2 
s2 s  a      b t 
L La J equiv  The angular acceleration force is given by:
 a J equiv   La J m

131402-6565-IJMME-IJENS © April 2013 IJENS


I J ENS
International Journal of Mechanical & Mechatronics Engineering IJMME-IJENS Vol:13 No:02 5

G2 because of its simplicity and ease of design. PI controller


Facc _ angle  J
2
 11 transfer function is given by:
rwheel
K I K P s  K I 
The angular acceleration torque is given by: G PI (s )  K P   
G2 G2
s s 15
12  T acc _ angle  rw J   J   K 
rw2 rw K P s  I 
 K P  K s  Z o 
G PI (s )   P
s s
III. CONTROLLER SELECTION AND DESIGN Where, Zo: Zero of the PI-controller, KP : The proportional gain.
The goal for a control system is to achieve a fast response to a The PI zero, Zo=- KI/ KP, will significantly and inversely effect
step command with minimal overshoot, and minimum error or the response and should be cancelled by prefilter given by
follow a given reference input signal [17]. The modern (13).
advances in electric motors and controllers improve motors
speed, acceleration, controllability, and reliability; also allow Proportional -Derivative - PD controller: The transfer
designers a wider choice of power and torque. The term function of PD-controller is given by Eq.(15) :
control system design refers to the process of selecting
KP
feedback gains that meet design specifications in a closed-loop G PD (s )  K P  K D s  K D (s  )  K D (s  Z PD ) 16 
control system. Most design methods are iterative, combining KD
parameter selection with analysis, simulation, and insight into The PD-controller is equivalent to the addition of a simple
the dynamics of the plant [18]. There are many motor motion zero at: Z PD  K P / K D
control strategies that may be more or less appropriate to a The required prefilter transfer function to cancel the PI- zero at
specific type of application each has its advantages and ZPI=KI/ KP is given by:
disadvantages. The designer must select the best one for G PI _ Pr efilter (s )  Z PI /  s  Z PI  (17)
specific application, in [11] most suitable control strategies for
DC motor motion control, are suggested, were different control For systems with PD compensators, a prefilter is used to
strategies were selected, designed, applied and their action eliminate any undesired effects of the term s + z introduced in
were compared to select the most suitable control of a given the closed-loop transfer function, the required prefilter transfer
DC motor in terms of output speed and angle, Most of these function is given by:
Z PD
suggested control strategies will be applied in suggested G PI _ Pr efilter (s ) 
system model, mainly PID, PI, PD as separate blocks to be  s  Z PD 
applied with and without deadbeat response, also lead and lag Lead compensator: Lead compensator is a soft approximation
compensators, the designer must select the best controller for of PD-controller, the following approximated controller transfer
specific application. function of PD controller, and called lead compensator is given
by:
Systems design with prefilter: Prefilter is defined as a transfer s  Zo
G (s )  K C  Where : Z o  Po 18
function Gp(s) that filters the input signal R(s) prior to s  Po
calculating the error signal. Adding a control system to plant, If Z < P this controller is called a lead controller (or lead
will result in the addition of poles and/or zeros, that will effect compensator). If Z > P : this controller is called a lag controller
the response, mainly the added zero, will significantly inversely (or lag compensator) .
effect the response and should be cancelled by prefilter,
therefore the required prefilter transfer function to cancel the Lag compensator; The Lag compensator is a soft
zero is given by (13). In general. The prefilter is added for approximation of PI controller, The Lag compensator transfer
systems with lead networks or PI compensators. A prefilter for function is given by.
a system with a lag network, mainly, is not, since we expect the
19 
s  Z o 
effect of the zero to be insignificant. G lag (s )  K c
(s  Po )
G Pr efilter (s )  Z O /  s  Z O  13
Where: Zo > Po, and Zo small numbers near zero and Zo =KI/KP
, the lag compensator zero. Po: small number ,The smaller we
PID controller design: PID controllers are most used to
make Po, the better this controller approximates the PI
regulate and direct many different types of dynamic plants the
controller.
time-domain, The PID gains are to be designed and tuned to
obtain the desired overall desired response. The PID controller
Lead integral compensator controller transfer function is given
transfer function is given by:
by:
K K s 2  KPs  KI
G PID  K P  I  K D  D 14  1 (s  Z o ) (s  Z o )
s s G Lead _ Integral (s )  K C  KC
s (s  Po ) s (s  Po )
Proportional Integral - PI controller is widely used in variable
speed applications and current regulation of electric motors,

131402-6565-IJMME-IJENS © April 2013 IJENS


I J ENS
International Journal of Mechanical & Mechatronics Engineering IJMME-IJENS Vol:13 No:02 6

Eliminating the steady state error, but disturb transient Taking Laplace transform, and separating we have:
response settling time, and overshoot. Ve (s) = Vin(s) - θL(s) *(K pot - Ktac *s)
θL(s) = Ve (s)* Kcon *Garm (s)
III.I POSITION AND VELOCITY FEEDBACK SENSORS Substituting, Ve , we have:
MODELING; POTENTIOMETER AND TACHOMETER θL(s) = Ve (s)*Kcont* Garm (s)= K*G(s)[ Vin (s) - θL(s) *( K pot -
To calculate the error, we need to convert the actual output Ktac *s)]
(position, speed, torque, current) into voltage, V, then compare θL(s) = Kcont * Garm (s)*[ Vin (s) - θL(s) *( Kpot + Ktac *s)]
this voltage with the input voltage Vin, the difference is the θL(s) = Kcont * Garm (s)* Vin (s) - Kcont * Garm (s)* θL(s) *( Kpot +
error signal in volts. Ktac *s)
Potentiometer is a sensor used to measure the actual output θL(s) + Kcont * Garm (s)* θL(s) *( K pot + Ktac*s ) = Kcont *
robot position, θ L ,convert into corresponding volt, Vp and Garm (s)* Vin (s)
then feeding back this value to controller, the Potentiometer θL(s) [ 1 + Kcont * Garm (s)*( Kpot + Ktac *s )] = Kcont * Garm (s)* Vin
output is proportional to the actual position, θ L, this can be (s)
accomplished as follows: The output voltage of potentiometer
is given by: The overall transfer function in terms of input voltage and
Vp = θL * Kpot output angular position
Where: θL :The actual position. Kpot the potentiometer  L (s ) K con * G arm (s )
TF  
constant; It is equal to the ratio of the voltage change to the V in (s ) 1  K cont * G arm (s )  K pot  K tac * s 
 
corresponding angle change, and given For this transfer function, if given the DC motor transfer
by: Kpot  (Voltage change) / (Degree change) . Depending on functions and parameters, controller transfer function and
maximum desired output arm angle, the potentiometer can be sensors gains Kpot, Ktac , we can evaluate the behavior of our
chosen. for our case, input volt range Vin= 0:12, and input system
angle range θ= 0:180 degrees, substituting, we have:
K pot  12  0  / 180  0   0.0667 V / degree
Potentiometer constant Kpot = 0.0667 V/degree. This value
(0.0667), means that each one input volt corresponds to
180/12= 15 output angle in radians , to obtain a desired output
angular position of 180 , we need to apply 12 volts, to obtain
an angular position of 90 we need to apply
( 90*0.0667= 6.0030 Volts).
Tachometer is a sensor used to measure the actual output
mobile robot angular speed, ωL .. Dynamics of tachometer can
Fig. 2. T he control of output position with position and velocity
be represented using the following equation:
feedback.
V out t   K tac * d  t  / dt  V out t   K tac * 
The transfer function of the tachometer is given by: IV. SYSTEM SIM ULATIONS
Vout(s) / ω(s) =K tac In the proposed model the following sub-systems will be
A suitable linear output speed of domestic mobile robot is to simulated; electric actuator, input signals, most used and
move with 0.5 m/s, that is: proved control strategies for motion control, dynamics
  V/r  0.5/0.075  6.6667 rad / s, between system and surroundings considering all the forces
Tachometer constant, Ktac = 12 / 6.6667=1.8 applied upon the system. Based on derived equations, the
driving torques, can be simulated, with function block model as
shown in Fig. 3(a)(b) , also a repeating sequence stair model
can be used to simulate different disturbance torques. Different
inputs can be applied to the suggested model, to simulate
III.II THE CONTROL OF OUTPUT POSITION (ROBOT different real life inputs including; constant input, step, ramp,
ARM) WITH POSITION AND VELOCITY FEEDBACK. motion reference profile, the simulation of motion profile is
shown in Fig. 3(d). PM Motor subsystem simulation is shown
For the feedback system shown in Fig.2, a velocity feedback is in Fig. 4(a). The proposed model for mechatronics motion
used to stabilize systems that tend to oscillate, for this system control applications in terms of output speed and/or angle, as
the output is the angular displacement, θL, the rate of change of well as torque, current, acceleration and controller action, is
angular position , dθL(s) /dt, is actual output angular speed, shown in Fig. 4(b), While maintaining accuracy, this model will
and the error signal , Ve ,is given by: simplify as well as accelerate Mechatronics systems design
V e V in  K pot o  K tac * d o / dt process, both mechanical system and controller selection,
analysis, design and validation. This model can be used for

131402-6565-IJMME-IJENS © April 2013 IJENS


I J ENS
International Journal of Mechanical & Mechatronics Engineering IJMME-IJENS Vol:13 No:02 7

any mechatronics motion control application the use PM motor motor Torque, Kt*i
6

as prime mover. The model allows designer, using manual Product3 bm


7
switches, to select each of the following; system to be deigned Coloumb friction

and tested, (e.g. mobile robot, robot arm, conveyer ), select Product13 Rolling friction coefficient
1
control strategy ( PID, PI, PD, PI, with or without dead beat
response, lead or lag as well as lead integral compensator), Product1
Derivative1

du/dt
also, select input and disturbances type. The model, also, Angular speed
4

allows visual readings of output speed, angle, as well as r^2*m*g/2 0.5

torque, current, acceleration and controller action. It is Product2

m ,Load mass 2
important to consider that this model can be modified to Product4

include any control strategy, as well as, any DC machine,


depending on particular application, it is required, just to -C-

modify, the used actuator model. The presented model allows g

Inclination angle
sin(u)
the use of MATLAB PID block, to be used as PI, PD and PID 5
cos(u)
SinCos
controller with tuning capabilities, also a separate PD, PI
controllers models are included, as well as prefilter. Also, the Load torqe 1 3 r, wheel radius

presented is support with MATLAB m.file to define and select Fig. 3. (b) Load torque simulation, considering and not considering
all system's parameters, dimensions and coefficients; that is coulomb friction
PMDC, mobile robot, robot arm, sensor, system dynamics and
Rolling f riction coef f icient
controllers gains, poles and zeros, also this m.file can be used
separately to design, analyze derive and plot system's open
loop and closed loop transfer function in terms of output m ,Load mass
speed and/or angle, as well as torque, current and acceleration.
Rolling friction coefficient 1
Product13 Load torqe r, wheel radius

Derivative1
Product1
du/dt
Angular speed

r^2*m*g/2 0.5
Product2
Inclination angle
Angular speed
m ,Load mass 2 4
Product4
Load Subsystem

Fig. 3. (c) Load torque function block model


-C-

Inclination angle
sin(u)
12 1
5
cos(u)
Out1
SinCos Switch1
Constant
7.999 Switch

Load torqe 1 3 r, wheel radius


Clock

Fig. 3. (a) Load torque simulation, considering and not considering


Ramp Ramp
coulomb friction slope=1 slope=2

Fig. 3. (d) motion profile simulation.

131402-6565-IJMME-IJENS © April 2013 IJENS


I J ENS
International Journal of Mechanical & Mechatronics Engineering IJMME-IJENS Vol:13 No:02 8

POSITION LINEAR Acceleration 11

13 POSITION linear speed

La 1 du/dt ,
8
Kt, Torque constant 4 Jm 2 SPEED LINEAR Acceleration 5
controller singal 12 mobile linear speed 2 Angular position
du/dt ,1
3 Curent 4 Torque Angular speed 1
11 10
n, Gear ratio 12 du/dt .
From PI filter Controller output
Current Product12 Product13
5 1 Torque
Input Voltage s 1 1
Product4 Integrator.2 Product11 s s
Product8 Integrator..1 Product3 Integrator..4
Sum.1 Product7
From input Volt to PI filter 7
7 Sum.4
6 OUTPUT from summing to controller Product9
Ra T, Load torque
6
bm 15 Wheel radius
Product10
8

Kb, EMF constant Product5


3 OUTPUT from speed feedback
9
Ktach, speed feedback
14 sensor output 13
Product2
OUTPUT from angle feedback
10
Kpot, angle feedback
9

Fig. 4. (a) Motor subsystem model.

IV.I MATLAB M.FILE


V.I.I SUPPORTING MATLAB PROGRAM Cr= 0.014; % Rolling Resistance
The model is support with, written below, MATLAB Coefficient
m.file to define and select all system's parameters, inclination_angle=45;
dimensions and coefficients, controller selection (PID, PI M= 8 ; Length=0.4 ; b_arm = 0.09 ;
with deadbeat, PD with deadbeat) analyze, derive and to plot angle_max=90;V_max =12;
system's response output results in terms of speed and/or Ktach =Vin/ desired_angular_speed;
angle, as well as torque, current and acceleration. Also this Kpot=V_max /angle_max;
m.file can be used separately to design, motion system and Kp_PI=2;Kd_PD=2;Zo=0.1;Po=0.2;
controller selection (PID, PI with deadbeat, and PD with Kp_compensator=2;Tl=10;inclination_angle
deadbeat) analyze, derive and plot system's open loop and =45;
closed loop transfer function and corresponding plots of Cr= 0.014; % Rolling Resistance Coe.
response curves: % Jm = input(' Enter Motor armature
moment of inertia (Jm) :');
clc, close all, clear all % bm = input(' Enter damping constant
format short of the the motor system (bm):');
% First DC motor (used)parameters % Kb = input(' Enter ElectroMotive
% Vin=12 ; Kt= 1.1882 ; Ra = 0.1557; La Force constant (Kb):');
= 0.82; Jm = 0.271; bm=0.271; Kb = % Kt = input(' Enter Torque constant
1.185; Jm =0.271 ;n=1; (Kt):');
%Second DC motor (used) parameters % Ra = input(' Enter electric
Vin=12 ;V=12; Kt= 0.023 ; Ra = 1; La = resistance of the motor armature (ohms),
0.23 ; Jm = 0.271; bm=0.03; Kb = 0.023; (Ra):');
n=1;Jm =0.02 ;n=1; % La =input(' Enter electric
r=0.075;% m wheel radius inductance of the motor armature
g=9.79379 ;% m/s^2, grav. acc. ,Henry,(La) :');
mobile_robot_wedth=0.580 ;% m % inclination_angle=input(' Enter
mobile_robot_height=0.920 ;% m inclination angle :');
desired_linear_speed=0.5;% m/s disp(' ')
desired_angular_speed= disp( ' ==============================')
(desired_linear_speed)/r; num1 = [1];
m=100;% mobile total mass den1= [La ,Ra];
b_mobile=0.09;rolling_f=0.01;Kp_PI=2;Kd_ num2 = [1];
PD=2;Zo=0.1; den2= [Jm ,bm];
Po=0.11;Kp_compensator=2;Tl=10; A = conv( [La ,Ra], [Jm ,bm]);

131402-6565-IJMME-IJENS © April 2013 IJENS


I J ENS
International Journal of Mechanical & Mechatronics Engineering IJMME-IJENS Vol:13 No:02 9

TF1 =tf(Kt*n, A); % m= input( ' Enter mobile


robot total mass : ' );
%obtaining open loop transfer functions % friction= input( ' Enter
of DC motor system and step response rolling friction coefficient between the
disp('DC motor OPEN loop transfer wheel and road surface : ');
function, Speed/Volt: ') % V = input(' Enter
Gv= feedback(TF1,Kt) applied input voltage Vin :');
disp( ' ==============================')
disp(' DC motor OPEN loop transfer J_mobile =(mobile_robot_wedth*
function, Angle/Volt: ') (mobile_robot_height)^3)/12;
Ga=tf(1,[1,0] )*Gv Jequiv_mobile = Jm+
J_mobile/(n)^2;
subplot(2,1,1),step (V*Ga);title(' bequiv_mobile = bm +
Position step response , open loop DC b_mobile/(n)^2;
motor system') desired_angular_speed=
subplot(2,1,2),step (V*Gv);title(' Speed (desired_linear_speed)/r;
step response , open loop DC motor Ktach =Vin/
system') desired_angular_speed ;%tachometer
disp( ' ==============================') constant
disp( ' DC motor response curves are num_mobile=[ Kt*n];
ploted') den_mobile=[La*Jequiv_mobile
disp( ' ==============================') ,(Ra*Jequiv_mobile+bequiv_mobile*La),(Ra
disp(' click any key to continue * bequiv_mobile+Kt*Kb)];
');pause,home, disp(' ')
disp( ' ==============================')
x=1; disp( ' mobile robot open loop transfer
while 1==1; function and step response')
home disp( ' mobile robot open loop
disp( ' ==============================') transfer function, Omega/Volt')
disp(' It is required to design a
robot ARM or MOBILE robot? ') G_robot_angular_speed_open=tf(num_mobile
disp( ' ==============================') , den_mobile)
AA= input(' Enter (1) for Robot arm disp( ' ==============================')
design and enter (2) for Mobile robot disp( ' mobile robot open loop
design: ','s'); transfer function, linear speed/Volt')
disp( ' ==============================')
if strcmp(AA,'2')==1; G_robot_linear_speed_open=tf(num_mobile,
home, disp( ' ') den_mobile)*r
disp(' YOUR disp( ' ==============================')
choice is Mobile robot design ') disp( ' mobile robot open loop
disp(' Please enter transfer function, Vin/Current')
robot dimensions and parameters :')
disp( ' ==============================') G_robot_volt_current1=tf((1/Ra)*[1,
disp(' click any key to continue bequiv_mobile/Jequiv_mobile ],
'); pause, home [1,(1/Jequiv_mobile)*(bequiv_mobile+(Kt*
% wheel_radius= input( ' Enter Kb)/Ra) ])
mobile robot wheel radius : ' ); disp( ' ==============================')
% mobile_robot_height= input( ' disp( ' mobile robot open loop transfer
Enter mobile robot height : ' ); function, Vin/Current')
% mobile_robot_wedth= input(
' Enter mobile robot wedth : ' ); G_robot_volt_current2=tf((1/La)*[1,
% Dist_wheels= input( ' La/Jequiv_mobile ],
Enter Disttance between wheels : ' ); [1,(Ra/La)+(bequiv_mobile/Jequiv_mobile)
% desired_linear_speed= , (Ra*bequiv_mobile/La*Jequiv_mobile+
input( ' Enter mobile robot desired Kt*Kb/La*Jequiv_mobile) ])
output linear speed : ' ); disp( ' ==============================')

131402-6565-IJMME-IJENS © April 2013 IJENS


I J ENS
International Journal of Mechanical & Mechatronics Engineering IJMME-IJENS Vol:13 No:02 10

disp( ' mobile robot open loop transfer pause(2); home


function, Torque/Angle') disp( ' ==============================')
G_robot_torque_angle=tf([1 ], disp( ' select controller; PID or PI
[(Jequiv_mobile)^2, bequiv_mobile,0 with dead beat response? ')
]) WW= input( ' Enter (1) for PID, enter
disp( ' ==============================') (2) for PI with deadbeat response:
disp( ' mobile robot CLOSED loop ','s');
transfer function, Linear speed/Vin') disp( ' ==============================')
G_robot_linear_speed_closed=feedback(G_r if strcmp(WW,'1')==1;
obot_linear_speed_open, Ktach) home, disp( ' '); disp( '
disp( ' ==============================') ==============================')
disp( ' mobile robot CLOSED loop disp(' YOUR choice is PID controller
transfer function, Vin/Vtach') for mobile robot control ')
G_robot_linear_Vin_V_tach=tf([2*Kt*Ktach disp(' Enter PID gains : ')
],[r^2*m+2*bequiv_mobile,(Ra*(r^2*m+2*be disp(' you can run simulink model and
quiv_mobile))+La*(rolling_f use gain from PID block : ')
+2*Jequiv_mobile),Ra*(rolling_f disp( ' ==============================')
+2*Jequiv_mobile)+2*Kb*Kt ]) Kp= input( ' Enter Proportional gain, Kp
disp( ' ==============================') = ');Kd= input( ' Enter Derivative
disp( ' mobile robot CLOSED loop gain, Kd = ');Ki= input( ' Enter
transfer function, Linear speed/Vin') Integral gain, Ki = ');PID_num=[ Kd Kp
G_robot_linear_speed_closed=feedback(G_r Ki];PID_den=[ 1 0];
obot_linear_Vin_V_tach,Ktach) disp( ' ==============================')
fig., subplot(3,2,1), disp( ' PID transfer function')
step(G_robot_angular_speed_open),ylabel( G_PID=tf(PID_num,PID_den)
'Mobile Angular speed, \omega Rad/s G_forward_PID=
'),xlabel(' Time '), title('Open loop series(G_PID,G_robot_linear_Vin_V_tach);
Mobile Angular speed Rad/s, '), grid, disp( ' ==============================')
subplot(3,2,2),step(G_robot_linear_speed disp( ' mobile robot closed loop with
_open),ylabel('Mobile linear speed, \nu PID transfer function, /linear
Rad/s '),xlabel(' Time '), title('Open speed/Vin')
loopMobile linear speed m/s, '), grid, G_mobile_PID_closed=
subplot(3,2,3),step(G_robot_linear_speed feedback(G_forward_PID, Ktach);fig.
_closed),ylabel('Mobile linear speed, step(G_mobile_PID_closed),ylabel('Mobile
\nu Rad/s '),xlabel(' Time '), Vin vs Vtach '),xlabel(' Time '),
title('Closed loop Mobile linear speed title(' Input volt vs tacho output volt,
m/s, '), grid, '), grid;
subplot(3,2,4),step(G_robot_volt_current step(G_robot_linear_speed_closed),ylabel
1),ylabel('Mobile current Amp ('Mobile speed '),xlabel(' Time '),
'),xlabel(' Time '), title('simplified title(' Input volt vs output speed, '),
Input volt vs current, '), grid grid
subplot(3,2,5),step(G_robot_volt_current else strcmp(WW,'2')=1;
2),ylabel('Mobile current Amp home; disp( ' ')
'),xlabel(' Time '), title(' Input volt disp( ' ==============================')
vs current, '), grid disp(' YOUR choice is PI controller with
subplot(3,2,6),step(G_robot_torque_angle deadbeat response for mobile robot
),ylabel('Mobile torque '),xlabel(' Time control ')
'), title(' Input torque vs angle, '), disp( ' ==============================')
grid, fig. alpha=1.9;bita=2.2;Ts=1.2;omega_n=4.04/T
subplot(2,1,1),step(G_robot_linear_Vin_V s;
_tach),ylabel('Mobile Vin vs Vtach Kp=((bita*(omega_n^2)*n*La*Jequiv_mobile
'),xlabel(' Time '), title(' Input volt )-
vs tacho output volt, '), grid ((n*Ra*bequiv_mobile)+(n*Kt*Kb)))/(Kt*Kt
subplot(2,1,2),step(G_robot_linear_speed ach); Kp_PI=Kp;
_closed),ylabel('Mobile speed Ki=omega_n^3*n*La*Jequiv_mobile/(Ktach*K
'),xlabel(' Time '), title(' Input volt t); ZPI= Ki/Kp; Home, disp(' ')
vs output speed, '), grid disp( ' ==============================')

131402-6565-IJMME-IJENS © April 2013 IJENS


I J ENS
International Journal of Mechanical & Mechatronics Engineering IJMME-IJENS Vol:13 No:02 11

disp( ' PI controller & Deadbeat disp('Arm OPEN loop transfer function :
prefilter gains and zero are :') ')
fprintf(' Kp_PI =%g , Ki=%g Ga_arm_open=tf(num_arm_open,den_arm_open
,ZPI=%g \n',Kp,Ki,ZPI); )
disp( ' ==============================')
num_deadbeat=[Ki*Kt/(n*La*Jequiv_mobile) disp('Arm CLOSED loop transfer function
]; den_deadbeat=[1 , (Ra*Jequiv_mobile : ');
+bequiv_mobile*La)/(La*Jequiv_mobile) , G_close_arm=feedback(Ga_arm_open,(Kpot/n
((n*Ra*bequiv_mobile)+(n*Kt*Kb)+(Ktach*K )); disp( ' Response plots are plotted
p*Kt))/(n*La*Jequiv_mobile) , '); fig.; subplot(2,1,1),
(Ktach*Ki*Kt)/(n*La*Jequiv_mobile)]; step(V*Ga_arm_open);ylabel('Arm
disp( ' ==============================') position, \theta Rad '),xlabel(' Time
disp('Closed loop transfer function with '), title('OPEN loop Arm Angular
PI deadbeat respnse & prefilter ') position Rad/s, '), grid;
T_mobile_deadbeat subplot(2,1,2),step(V*G_close_arm);ylabe
=tf(num_deadbeat,den_deadbeat) l('Arm position, \theta Rad
;fig., step(12*r*T_mobile_deadbeat); '),xlabel(' Time '), title('CLOSED loop
ylabel('Mobile linear speed \nu Arm Angular position Rad/s, '), grid,
'),xlabel(' Time '), title('Mobile home; disp( '
linear, PI with Dead beat response, '), ==============================')
grid, disp( ' select controller; PID, PD with
end dead beat response? ')
else strcmp(AA,'1')==1;home WWW= input( ' Enter (1) for PID, enter
disp( ' ') (2) for PD with deadbeat response:
disp( ' ==============================') ','s');
disp(' YOUR choice is disp( ' ==============================')
Robot arm design ') if strcmp(WWW,'1')
disp(' Please enter Arm home, disp( ' ')
dimensions and parameters :') disp( ' ==============================')
disp( ' ==============================') disp(' YOUR choice is PID
% M= input(' Enter robot controller for robot arm ')
arm mass , M='); disp(' Enter PID gains : ')
% Length = input(' Enter disp(' you can run simulink
robot arm Length, L='); model and use gain from PID block : ')
% b_arm= input(' Enter damping disp( ' ==============================')
factor of robot arm, b_arm ='); Kp= input( ' Enter Proportional gain,
% n= input( 'Enter gear Kp = ');
ratio n = '); Kd= input( ' Enter Derivative gain, Kd =
% V = input(' Enter ');
applied input voltage Vin :'); Ki= input( ' Enter Integral gain, Ki =
% V_max = input(' Enter ');
maximum allowed voltage , V max :'); PID_num=[ Kd Kp Ki];PID_den=[ 1 0];
% Angle_max = input( ' Enter maximum Home, disp( ' ')
allowed angle for robot arm : '); disp( ' ==============================')
Kpot=V_max /angle_max; % pot disp( ' PID transfer function')
constsnt G_PID=tf(PID_num,PID_den)
Jequiv=((M* Length^2)/12)+Jm; disp( ' ==============================')
bequiv= bm + b_arm; disp( ' Closed loop Robot arm transfer
num_arm_open = [Kt*n*(180/pi)]; function with PID')
den_arm_open=[La*Jequiv G_forward_PID=
(Ra*Jequiv+La*bequiv) series(G_PID,Ga_arm_open);
(Ra*bequiv+Kt*Kb) 0]; G_arm_PID_closed=
disp(' '); feedback(G_forward_PID, Kpot)
disp(' click any key to continue '); fig.
pause; home; disp( ' step(V*G_arm_PID_closed),ylabel('Arm
==============================') angle \theta Rad '),xlabel(' Time '),

131402-6565-IJMME-IJENS © April 2013 IJENS


I J ENS
International Journal of Mechanical & Mechatronics Engineering IJMME-IJENS Vol:13 No:02 12

title(' Input volt vs output load model1.mat ,load model2 ,load


Armangle,PID '), grid model3 ,load model4 ,load model5,load
else strcmp(WWW,'2')==1; model6,load model7,load model8,load
home, disp( ' ') model9,load model10,load model11;fig.,
disp( ' ==============================') subplot(2,2,1);plot(model_angular_positi
disp(' YOUR choice is robot arm design on), ylabel('\Theta , Rad'),xlabel('
; PD controller with dead bead '), title('Angular position Rad '), grid
controller response ') subplot(2,2,2);plot(model_angular_speed)
disp( ' ==============================') , ylabel('Angular speed, \omega Rad/s
omega_n=2.4;alpha=1.82 ; '),xlabel(' '), title('Angular speed
disp( ' PD transfer function = Kds + Kp Rad/Time, '), grid; subplot(2,2,4);
is given by :') plot(model_angular_speed_RPM),
Kp=(omega_n*Ra*Jm)/(Kt*Jequiv); ylabel('Angular speed, RPM
Kp_PD=Kp;Kd=(((alpha*omega_n)-(bm/Jm)- '),xlabel('Time(sec)'), title('Angular
((Kt*Kb)/(Jequiv*Ra)))*Ra*Jequiv)/Kt*Kpo speed RPM, '), grid;
t;ZPD=Kp/Kd;ZPI=ZPD;G_PD=Kd*[ 1 ZPD]; subplot(2,2,3);plot(model_current),
num_arm_PD =G_PD* [Kt*n]; ylabel('Current, Amp
den_arm_PD=[La*Jequiv '),xlabel('Time(sec)'), title('Current
(Ra*Jequiv+La*bequiv) Amp/s, '), grid; fig., subplot(2,2,1);
(Ra*bequiv+Kt*Kb) 0]; plot(model_Torque), ylabel('Motor
G_mobile_PD_tf= tf(num_arm_PD, Torque, Nm'),xlabel(' '), title('Motor
den_arm_PD);G_mobile_PD_dead_closed= Torque Nm/Time '), grid; subplot(2,2,2);
feedback(G_mobile_PD_tf, Kpot); plot(load_torque), ylabel('Load Torque,
disp(' ') Nm'),xlabel(' '), title('Load Torque
disp( ' ==============================') Nm/Time '), grid
disp( ' PD controller & Deadbeat subplot(2,2,3);plot(model_linear_acceler
prefilter gains and zero are :') ation), ylabel('Linear speed Accel.,
fprintf(' Kp_PI =%g , Kd=%g ,ZPd=%g M/s^2'),xlabel('Time(sec)'),
\n',Kp,Kd,ZPd); title('Acceleration of Linear speed
disp( ' ==============================') M/Time '), grid; subplot(2,2,4);
disp( ' Prefilter transfer function :'); plot(model_position_linear_acceleration)
prefilter_num=[ZPD];prefilter_den=[1 , ylabel(' Position Accel.,
ZPD];G_prefilter=tf(prefilter_num,prefil M/s^2'),xlabel('Time(sec)'),
ter_den) title('Acceleration of Position /Time
disp( ' ==============================') '), grid, fig., subplot(2,2,1);
disp( ' Robot arm overall closed loop plot(model_linear_speed), ylabel('
transfer function :') Mobile linear speed.,
G_mobile_PD_dead_overall=series(G_prefil M/s'),xlabel('Time(sec)'), title('mobile
ter,G_mobile_PD_dead_closed) linear speed M/s '),
Fig., grid;subplot(2,2,2);plot(model_angel_lin
step(V*G_mobile_PD_dead_overall),ylabel( ear_speed), ylabel(' Angle linear
'Mobile speed \nu'),xlabel(' Time '), speed., M/s'),xlabel(' Time(sec) '),
title(' Arm PD with deadbeat response, title('Angle linear speed M/s '), grid
'), grid subplot(2,2,3); plot(controller_action),
disp(' click any key to continue '); ylabel(' controller_action'),
pause, end, end, end, xlabel('Time(sec)'), title('controller
x=x+1; end signal (mA)'), grid

IV.I.II MATLAB CODE FOR PLOTTING ALL


SIMULATION RESPONSE CURVES V. TESTING AND A NALYSIS
VI.I Mechatronics motion control design in terms of output
By defining blocks in simulink model, running simulation, all linear speed of Mobile robot; plant, components, controller
data will de defined in MATLAB workspace , To plot all selection, design and evaluation of output speed, current,
response curves, run simulation then the next code, can be torque and acceleration and angle.
used: It is required to select, design and integrate a Mobile robot
system, with suitable selection of it's corresponding
mechanical parts, actuator's and sensor's parameters and

131402-6565-IJMME-IJENS © April 2013 IJENS


I J ENS
International Journal of Mechanical & Mechatronics Engineering IJMME-IJENS Vol:13 No:02 13

platform dimensions, to move with linear speed of 0.5 m/s, input voltage in the range of 0 to 12 volts corresponds
(that is with angular speed of ω=V/r = 0.5/ 0.075 = 6.6667 linearly of Robot arm output angle range of 0 to 180, that is
Rad./s,), , here notice that, when defining system to move the robot arm to the desired output angular
parameters, using m.file, designer can chose and define position, θ L , corresponding to the applied input voltage ,Vin
tachometer constant Ktach, corresponding to desired output , Kpot =(12/180=0.0667), Switching the proposed general
linear speed. model to output angle control (robot arm), by switching
Now, switching the proposed model to output speed control sensor to read output angular displacement, s witching load
(mobile robot, conveyer belts, rolling) ,by switching sensor torque ,selecting input signal to step input of 12 volts,
to read output speed, selecting input signal to be step input selecting PID controller, running supporting m.file to define
of 12 volts, selecting PID controller, running supporting system parameters, constrains and parameters, and finally
m.file to define system parameters, dimensions and running simulation, will result in output angular
constrains, and finally running simulation, will result in displacement, current, torque, acceleration and angle
output speed, current, torque, acceleration and angle response curves shown in Fig. 9 . Now, changing the
response curves shown in Fig. 5, also direct visual readings desired output angle output range to 0 to 45. ( for θ = 45,
of all final outputs values can be taken, directly, from the Kpot =12/45=0.2667), Ruining the model, will result in
general model, the simulation results shows that the mobile response curves shown in Fig. 10. Using the resulted
robot system, with selected parameters, dimensions and response curves and/or visual readings from model, we can
applying PID controller with suitable gains, reaches, the evaluate or validate our selection, design and
desired output linear speed of 0.5 m/s, in 0.35s, and zero correspondingly we can or adjust or replace controller or
steady state error, constant current consumption, the PID change system parameters to meet design criteria.
gains are K P=303.417042667051, K I= 414.72923375291, The proposed general model can be used to test, evaluate
KD=18.789820346901 . Now, to test designed system and validate any given mechatronics motion control system
robustness, Keeping the same parameters, but switching the design e.g. electric cars, locomotives, turbines, robotics,
input to profile input signal and applying stair changing conveyer belts, rolling, cutting, welding, saws and bending
disturbance, will result in response curves shown in Fig. 6, machines.
the response curve show that system, while achieving mobile linear speed M/s Angle linear speed M/s
0.6 0.6
Mobile linear speed., M/s

design criteria, maintain design criteria under disturbance

Angle linear speed., M/s


effect. 0.4 0.4
Now, to test and analyze the effect of applying Lead
0.2 0.2
integral compensator, we replace the PID controller, with
Lead integral compensator with Zo=.1; Kp =0.4; Po=0.091; 0 0
Ruining the model, will result in response curves shown in -0.2 -0.2
Fig. 7, the gain , pole and zero can be adjusted for better 0 0.5 1 1.5 0 0.5 1 1.5
Time(sec) Time(sec)
response.
Fig. 5. (a) mobile robot output linear speed, and angle change vs time
Now, to test and analyze the effect of applying PI controller
responses
with deadbeat response, we replace the PID controller with, Angular position Rad Angular speed Rad/Time,
PI with deadbeat response, by switching the system to PI 10 10
Angular speed,  Rad/s

controller and switching-on the prefilter, the PI zero, Zo= KI/


5 5
KP, can be defined from either supporting m.file calculations
 , Rad

results or using modified PID block to simulate PI and


0 0
tuning. Ruining the model, will result in response curves
shown in Fig. 8. -5 -5
0 0.5 1 1.5 0 0.5 1 1.5
Using the resulted response curves and/or visual readings
from model, we can evaluate and/or validate our selection Current Amp/s, Angular speed RPM,
300 100
and design and correspondingly we can or adjust or select
Angular speed, RPM

most suitable controller or change system parameters to


Current, Amp

200 50
meet design criteria. In conclusion the design, modeling,
simulation and evaluation processes of motion control are 100 0
minimized in time, and also simplified.
0 -50
0 0.5 1 1.5 0 0.5 1 1.5
VI.II Mechatronics motion control design in terms of output Time(sec) Time(sec)
angular displacement of a robot arm: plant and controller Fig. 5. (b) mobile robot output angular position, angular speed,
selection, design and evaluation of output angle, current, current vs time responses
torque and acceleration and speed.
It is required to select, design and integrate a single joint
robot arm system, with suitable selection of it's mechanical
part, actuator, sensor parameters and dimensions , so that an

131402-6565-IJMME-IJENS © April 2013 IJENS


I J ENS
International Journal of Mechanical & Mechatronics Engineering IJMME-IJENS Vol:13 No:02 14

Motor Torque Nm/Time Load Torque Nm/Time mobile linear speed M/s Angle linear speed M/s
300 200 0.6 0.6

Mobile linear speed., M/s

Angle linear speed., M/s


Motor Torque, Nm

Load Torque, Nm
200 100
0.4 0.4

0.2 0.2
100 0
0 0

0 -100 -0.2 -0.2


0 0.5 1 1.5 0 0.5 1 1.5 0 2 4 6 0 2 4 6
Time(sec) Time(sec)
Acceleration of Linear speed M/Time Acceleration of Position /Time Fig. 8. Mobile robot
controller output
signal (mA)linear speed vs time response of applying
Linear speed Accel., M/s 2

30 0.6
1000 PI with deadbeat response.
Position Accel., M/s 2
20 0.4 Angular position Rad Angular speed Rad/Time,

controller ction
200
500 100

Angular speed,  Rad/s


a
10 0.2
150
50

 , Rad
0 0 0
100

-10 -0.2 0
0 0.5 1 1.5 0 0.5 1 1.5 -50050
0 2 4 6
Time(sec) Time(sec)
0 Time(sec) -50
Fig. 5. (c) mobile robot output motor torque, load torque, linear 0 5 10 0 5 10
acceleration and acceleration vs time responses. Time(sec)
mobile linear speed M/s Angle linear speed M/s Motor Torque Nm/Time Angle linear speed M/s
0.6 1
Mobile linear speed., M/s

3 10
Angle linear speed., M/s

Angle linear speed., M/s


Motor Torque, Nm
0.4 0.5 2
5
0.2 0 1
0
0 -0.5 0

-0.2 -1 -1 -5
0 2 4 6 0 2 4 6 8 0 5 10 0 5 10
Time(sec) Time(sec) Time(sec) Time(sec)

Fig. 6. (b) mobile robot output linear speed, and angle change vs time Fig. 9. (a) Robot arm response; output position, torque, speed vs
responses applying motion profile input . time response curves
Angular position Rad Angular speed Rad/Time, Acceleration of Position /Time Current Amp/s,
30 10 6 100
Position Accel., M/s 2
Angular speed,  Rad/s

Current, Amp
20
5 50
 , Rad

10 2

0 0
0 0

-10 -5 -2 -50
0 2 4 6 0 2 4 6 0 5 10 0 5 10
Time(sec) Time(sec)
4
Current Amp/s, Angular speed RPM, x 10 controller signal (mA) Angular speed RPM,
150 100 15 1000
Angular speed, RPM
Angular speed, RPM

controller ction

10
Current, Amp

100 50 500
a

50 0 0
0

0 -50 -5 -500
0 2 4 6 0 2 4 6 0 5 10 0 5 10
Time(sec) Time(sec) Time(sec) Time(sec)
Fig. 6. (b) mobile robot output angular position, angular speed and Fig. 9. (b) Robot arm response ; acceleration, current and speed vs
current response curves applying motion profile. input time response curves
mobile linear speed M/s Angle linear speed M/s Output Angle Output speed
0.6 0.6 60 150
Mobile linear speed., M/s

Angle linear speed., M/s

0.4 0.4 40 100


omega
Angle

0.2 0.2 20 50

0 0 0 0

-0.2 -0.2
0 5 10 15 20 0 5 10 15 20 -20 -50
0 1 2 3 4 0 1 2 3 4
Time(sec) Time(sec)
Time (seconds) Time (seconds)
Fig. 7. Mobile robot;
controller signallinear
(mA) speed vs time response applying Lead
15 Torque Current
integral compensator Fig.
200010. Robot arm output position and150
Speed vs time response curves
for desired output of 45, K pot =0.2667
controller ction

10 100
a

Amplitude

Amplitude

1000
50
5
0 © April 2013 IJENS
131402-6565-IJMME-IJENS
0 I J ENS
0
0 5 10 15 20
-1000 -50
Time(sec) 0 1 2 3 4 0 1 2 3 4
International Journal of Mechanical & Mechatronics Engineering IJMME-IJENS Vol:13 No:02 15

Position linear acceleration m/s^2


ANGULAR speed in RPM

.1 in RPM

position linear speed m/s


Mobile linear speed m/s
speed LINEAR acceleration m/m^2
model10.mat

ANGULAR speed in rad/sec


Angular speed

Angular position in rad

Current in Amp

Controller action
speed LINEAR accelerationTorque in N/m

Position linear acceleration

To File4 Position linear speed


Mobile linear speed
Angular position.

controller signal
9.55

Current.

Torque
Angular speed.

model7.mat

model8.mat
model11.mat

model6.mat

To File5
To File3
model2.mat

model3.mat

model4.mat

model5.mat

.2
model1.mat

,.

,,
.

Torque
Angular speed

controller singal

mobile linear speed


SPEED LINEAR Acceleration

POSITION linear speed


From input Volt to PI filter

OUTPUT from summing to controller

POSITION LINEAR Acceleration


Curent

OUTPUT from speed feedback

OUTPUT from angle feedback


Angular position

speed sensor
agle sensor
ACTUATOR Subsystem
Kt*i

Ktach, speed feedback


Kpot, angle feedback
Kt, Torque constant
Kb, EMF constant

Controller output

6
T, Load torque

sensor output
From PI filter
Input Voltage

Wheel radius
n, Gear ratio
Jm

bm
Ra
La

7
wheel radius
Ktach

Ktach
Kpot

Kpot
La

La

r
Jm

Jm

2
bm

Bm
Kb

Kb

Ra

Ra

Dead beat PI-prefilter


Kt

Kt

9
Dead beat PD-prefilter
s+ZPI
ZPI
Load torque

s+ZPD
ZPD
8

3
Repeating
Sequence

10
Stair
inclination_angle

,,.1

5
0
Cr

Bm.
m
.-

-C-

bm
,

Tload
Tl

Lead integral comp.


4

Gain Derivative
Angular speed

Inclination angle

motor Torque, Kt*i

bm
Rolling friction coefficient

m ,Load mass

r, wheel radius

`
s
1
du/dt
Load torque Subsystem
Load torque

s+Po
s+Zo
-K-..
-K-
PID Controller
s+ZPI

_Lead or lag
s
., PI Controller-
PID(s)
Load torqe

PD-Controller

-K-
-K-
..,
Load torque,.
model9.mat
Load torque.,

.,.
REFERENCE INPUT ( SPPED or ANGLE)

...
Input Volt (0:12)
profile input_1

Prfile input_2
Out1

Out1
36

,,.

Fig. 4. T he general purpose model, for mechatronics motion control applications in terms of output speed and/or angle, as well as torque, current and
acceleration
VI. SCOPE AND LIM ITATIONS throughout Mechatronics systems design and development
The proposed model with load torque models is limited to process, including proper selection, analysis, integration
motion control systems design, and tested particularly, for and verification of the overall system and sub-systems
mobile robotic platforms speed and single joint robotic arms performance in terms of output speed, angle, torque, current,
position using electric actuators as prime mover, but can, acceleration and signals , resulting in simplifying and
also, be used for system and motions control design and accelerating Mechatronics systems design process. The
verification of any given system, considering system's load proposed models intended to be used for research purposes
torque and inertia. The proposed model can be modified to in mechatronics motion systems design, motion control
include any control strategy and/or any actuator model applications, as well as, for the application in educational
process. The proposed model can be modified to include
CONCLUSION any control strategy and/or any actuator. The model was
To help in facing the two top challenges faced in developing created and verified using MATLAB simulink software.
mechatronic systems, while maintaining desired accuracy The proposed model can be used to select most suitable
and to optimize system level performance to meet the design control strategy (P, PI, PD, PID, lead, lag, lead integral and
requirements, an accurate mathematical and simulink models deadbeat response) for corresponding motion control and
are proposed for accurate mechatronics design and to ensure achieving all design requirements , also test,
verification of both system and control of motions evaluate and validate any given mechatronics motion

131402-6565-IJMME-IJENS © April 2013 IJENS


I J ENS
International Journal of Mechanical & Mechatronics Engineering IJMME-IJENS Vol:13 No:02 16

control system design including; electric cars, locomotives, [15] R.D. Doncker, D.W.J. Pulle, and A. Veltman. Advanced Electri-
turbines, robotics, conveyer belts, rolling, cutting, welding, cal Drives: Analysis, Modeling, Control. Springer, 2011.
saws and bending machines, where designer using the [16] Farhan A. Salem, Mechatronics motion control design of
resulted, from model, response curves and/or visual electric motor for desired deadbeat response specifications,
supported and verified by new MAT LAB built -in function and
numerical readings, can early identifying system level
simulink model, Submitted to Int. J. Intelligent Systems
problems and ensuring that all design requirements are met, Technologies and Applications, 2012
therefore the design, modeling, simulation and verifying [17] Hedaya Alasooly, Control of DC motor using different control
processes of motion control are minimized in time and also strategies, global journal of technology and optimization, volum
simplified. 2 , 2011.
[18] MathWorks, 2001, Introduction to MAT LAB, the MathWorks,
REFERENCES Inc. Control System T oolbox, the MathWorks, Inc.
[1] Wilfried Voss, ''A Comprehensible Guide to Servo Motor Sizing'', [19] Richard C. Dorf, Robert H. Bishop, Modern Control Systems 12
Published by Copperhill T echnologies Corporation, Ed, Pearson Education, Inc., 2001
Massachusetts, 2007.
[20] T homas R. Kurfess, “Robotic and Automation Handbook,”
[2] Devdas Shetty, Richard A. Kolk, Mechatronics System Design, Washington, D.C., United States of Amarica, 2005.
Second Edition, SI, Cengage Learning, 2011.
[21] M.P.Kazmierkowski, H.T unia "Automatic Control of
[3] K. Craig, F. Stolfi, “ T eaching control system design through Converter-Fed Drives", Warszawa 1994.
mechatronics: academic and industrial perspectives.”
Mechatronics, Vol 12, No. 2, pp. 371-381, 2002.
[4] Vasilije S. Vasić , Mihailo P. Lazarević, Standard Industrial
Guideline for Mechatronic Product Design , FME T ransactions,
104 , vol. 36, No 3, 2008.
[5] Grzegorz Seiklucki,Analysis of the T ransfer-Function Models of
Electric Drives with Controlled Voltage Source PRZEGL ˛ AD
ELEKT ROT ECHNICZNY (Electrical Review), ISSN 0033 -
NAMENCLAT URE
2097, R.88NR7a/2012
[6] Yu Wang, Ying Yu,Chun Xie, Xiaoyang Zhang, Weizhi Jiang, A Symbol Quantity UNIT
proposed approach to mechatronics design education:
Integrating design methodology, simulation with projects, Vin The applied input voltage Volte, V
Mechatronics, November 2012. Ra Armature resistance Ohm ,Ω
[7] Ahmad A. Mahfouz, Mohammed M. K. , Farhan A. Salem ia Armature current Ampere, A
Modeling, simulation and dynamics analysis issues of electric Kt M otor torque constant N.m/A
motor, for mechatronics applications, using different Ke M otor back-electromotive force. V/(rad/s)
approaches and verification by MAT LAB/Simulink (I). I.J.
ωm M otor shaft angular velocity rad/s
Intelligent Systems and Applications, 2013, 05, 39-57.
Tm Torque produced by the motor N.m
[8] Wai Phyo Aung, Analysis on Modeling and Simulink of DC
Jm M otor armature moment of inertia kg.m2
Motor and its Driving System Used for Wheeled Mobile Robot,
World Academy of Science, Engineering and T echnology 32 Jtotal Total inertia=Jm+Jload kg.m2
2007 La Armature inductance Henry , H
[9] Farhan A. Salem ; Mechatronics design of general and accurate b Viscousdamping friction coefficient N.m/rad.s
model for Mechatronics mobile robotic platform system and ea ,EMF: The back electromotive force, ea ,EMF:
controller, selection, design, modeling, testing and validation. θm M otor shaft output angular radians
Submitted and under review to Estonian Journal of Engineering, position
2013 ωm M otor shaft output angular speed rad/sec
[10] Bashir M. Y. Nouri ,modeling and control of mobile robots M The mass of the platform and Kg
Proceeding of the First International Conference on Modeling,
cargo
Simulation and Applied Opt imization, Sharjah, U.A.E. February
g The gravity acceleration m/s2
1-3, 2005.
[11] Farhan A. Salem Ahmad A. Mahfouz, Modeling, controller α Road or the hill climbing angle, Rad
selection and design of electric motor for mechatronics motion road slope
applications, using different control strategies and verification Cr The rolling resistance coefficients
using MAT LAB/Simulink (II). Submitted and accepted, , 2012 Cd Aerodynamic drag coefficient
[12] Ahmad A. Mahfouz, Ayman A. Aly, Farhan A.
Zo Zero of the PI-controller
Salem,"Mechatronics Design of a Mobile Robot System", IJISA,
vol.5, no.3, pp.23-36, 2013. Tf coulomb friction torque
[13] Farhan A. Salem, Mechatronics design of Small electric Vehicle's KP The proportional gain,:
,International Journal of Mechanical & Mechatronics KI The Integral gain
Engineering 1310701-5252 IJMME / IJENS
KD The derivative gain
[14] M.P.Kazmierkowski, H.T unia "Automatic Control of
Converter-Fed Drives", Warszawa 1994. KPI The proportional coefficient
K pot The potentiometer constant

131402-6565-IJMME-IJENS © April 2013 IJENS


I J ENS
International Journal of Mechanical & Mechatronics Engineering IJMME-IJENS Vol:13 No:02 17

Ktac The tachometer constant

Farhan Atallah Sale m AbuMahfouz :


B.Sc., M.Sc and Ph.D., in Mechatronics of
production systems. Now he is ass. professor
in T aif University, Mechatronics sec., Dept.
of Mechanical Engineering and director of
alpha center for engineering studies and
technology researches. Research Interests;
Design, modeling and analysis of primary
Mechatronics Machines. Control and algorithm selection, design and
analysis for Mechatronics systems. Rotor Dynamics and Design for
Mechatronics applications

131402-6565-IJMME-IJENS © April 2013 IJENS


I J ENS

You might also like