ISSn : 0976-8491 (online) | ISSn : 2229-4333 (print)
Optimizing Nonlinear Oscillators for One
Arm with Two Joints
1
Ltfei Abdalsmd,
2Aybaba HANÇERLİOĞULLARI,
3Hüseyin Demirel
1,2Engineering Faculty, Kastamonu University, Kastamonu, Turkey 3Engineering Faculty, Electrical and Electronics, Karabük, Turkey
Abstract
The main objective in this paper is to illustrate that how the technology of Genetic Algorithm (GA), which included in MATLAB can be used in order to solve optimization problems. The study shows that, generating kinematic motion by optimizing the two Central Pattern Generators (CPGs) can control the one arm motion with two degrees of freedom as dart throwing by using implementation of a genetic algorithm in optimization problems, during different cases uncoupled, unidirectional and bidirectional of CPGs. Furthermore, utilization of one objective function and simple constraints, As well as, analysis and comparison for different scenarios during the optimization are done.
Keywords
Central Patterns Generators (CPGs), Control the arm motion, Optimizing Motion Generation, Genetic Algorithm (GA).
I. Introduction
In the field of robotics, scientists usually, in some extent, looked at nature in order to see how it has solved complex tasks. This
have been done in all areas of robotics, from humanoids, snakes to quadrupeds etc. Mostly, the physical structure of the limps have been modeled, but also the control systems is now being copied, in order to regenerate the same move patterns in the robots as seen in nature and perhaps gain some of the same advantages in
terms of power efficiency as well.
The focus of this study will be on the control side, more specifically
on Central Pattern Generators. Central Pattern Generators are becoming more and more used as the control system for locomotion control on robots, because they provide the same abilities as old well-known systems but also give more advantages. The abilities of CPGs are:
Smooth modulation between input and output.
•
Fast control loops.
•
The CPG neurons are automatically synchronized.
•
CPGs can be added or removed online and the system
•
continues to function.
Online adaptive learning and adjustments to the environment
•
based on sensory input.
Since the area of CPGs controllers have not been fully discovered yet, Interestingly many physical structures of the limbs and legs have been modeled, so this study pay more consideration towered the ability of using CPGs in arm movement model [1].
Central Pattern Generators are biologically inspired networks of nonlinear oscillating neurons that are cable to producing rhythmic patterns without input from higher control centers. They are found in the spine of both vertebrate and invertebrate animals.
In animals it has been known since the beginning of the last century that some form of underling rhythm generation was used to create locomotion in animals [2].
From numbers of studies we know today that CPGs exist in the spine of animals, and many studies purpose that they exist in
humans as well to control our walk [1]. Studies have even shown
that many of the functions in our body that we do not control consciously, are in fact also controlled by CPGs. It could be things like breathing and digestion.
Fig. 1: The Central Pattern Generator Scheme
Figure 1 shows how a basic setup of a CPG works. The central part is the “Command Neurons (CNs)”. This module gets inputs from a”brain” stimuli signal and from sensory inputs. The CNs then gives control signals to the “Local Motion Generating Neurons” generating the output.Where normal control systems depend on feedback signals from sensory input, CPGs are capable of generating rhythmic patterns without any form of sensory feedback. When coupled together in pairs, the CPGs will start to oscillate and synchronize their oscillation [3].
II. How to Implement CPGS
In most cases CPGs are coupled differential equations, that are programmed in software and running on a CPU. In some cases the CPGs have been implemented in hardware. In this section will give a description of how a CPG can be implemented, both in hardware and in software, and the pros and cons of doing the one or another.
A. Hardware Implementation
Studies have been done on how to implement CPGs in pure hardware. The argument for doing so is to minimize power consumption, and simultaneously be able to raise the calculation speed in order to make the control faster and smoother. The problem with the software implementations are that the architectures often used on robots are rather simple, and not cable of running calculations at high speeds.
In the field of hardware implementations, scientists have been
working with two different approaches on how to implement CPGs. One approach is to build the system in an FPGA, the other one is to use a silicon chip capable of producing CPG stimulus signals [4-6]. The simplest and fastest method might be to use a silicon chip capable of generating rhythmic oscillations, but this
solution would also be the most inflexible because the system is
B. Software Implementation
Implementing CPGs in software gives the designer more freedom,
because he is not con-strained by the difficulty of designing e.g.
a differential circuit in hardware. The biggest problem with a pure hardware implementation is that the mathematics are not as straightforward as in software. The level of abstraction is higher, which makes the design implementation easier.
In the software domain, virtually all implementations involve some sort of coupled differential equations, numerically integrated. In software, CPGs have been implemented with the connectionist models, vector maps, and systems of coupled oscillators and in rear cases with spiking neural network.
Connectionist Models are a broad term often used in different
areas of science. Although the term is used in the following fields: “artificial intelligence, cognitive psychology, cognitive science,
neuroscience and philosophy of mind”, the most common form is in Neural Network Models.
Coupled Oscillators are perhaps the most used model for implementing CPGs in robot control systems. These systems functions by having a number of oscillators synchronizing their outputs so that they are in constant phase for a given gait pattern, and then using the output signals of these oscillators to control the motion of the legs of the robots [7-8].
Spiking Neural Networks (SNN) are a more natural type of NN
than multi-layer perception networks, because SNN does not fire each propagation cycle but only fires when the charge over a
membrane have reached a current value. This make these types of net-works a little more realistic. The reason for using this type of network is, that there from biology are given a good description on how CPGs works, but no conclusive description on how to make
such networks as artificial networks have been formalized in the
science of robotics. Therefore, by using a network more similar to what is seen in nature, the design hopefully gets easier [5]. In order to describe the procedure of making a software implementation, I will in the following give an introduction on how to implement a CPG using a system of coupled oscillators, based on work done by Ijspeert et. al. [7-8]. This system is capable of doing both swimming and walking and to change between these two patterns online. The mathematical formulation is given in the following three differential equations.
The mathematical differential equations present the CPGs in general formula [1] [7].
(1)
The state variables 𝜃𝑖 and 𝑟𝑖 represents the phase and the amplitude respectively. The frequency and amplitude, to which the CPG will converge if isolated is described by v𝑖 and R𝑖. The constant a𝑖 determines how fast the amplitude 𝑟𝑖 will converge into R𝑖. When
multiple CPGs exist, they are coupled together by the coupling
weights w𝑖j and phase biases ∅ij.
By deriving the equation (1), we obtain three types of CPGs, Uncoupled, Unidirectional and Bidirectional CPGs respectively.
(2)
(3)
(4)
The output of the systems gives:
Where 𝜃1 and 𝜃2 (defined previously) are said to represent the
angular joints of the shoulder and the elbow respectively and the state variables 𝜑𝑖 and 𝑟𝑖equally represent the phase and the amplitude. The CPG will converge if isolated by 𝑣𝑖 and 𝑅𝑖. The constant 𝑎𝑖 determines how fast the amplitude 𝑟𝑖 will converge to 𝑅𝑖. When multiple CPGs exist, they are coupled together by the
coupling weights 𝑤𝑖𝑗 and phase biases ∅𝑖𝑗, where 𝑖=1,2 and 𝑖≠𝑗. Certain forms of outputs are possible by changing the numerical values of parameters (For more details about different CPGs, see, [9-10].
III. Modeling of Arm with Two Joint
A. Kinematic Model
Kinematic model is derived to perform basic analysis.
Fig. 2 shows the arm movement during dart throwing, where L1 and L2 are presented the lengths of the arm, upper arm and
forearm respectively, the first angle (θ1) is between the body and the upper arm (or whatever it is attached to) for the shoulder joint,
the second angle (θ2) is between the upper arm and the forearm for elbow. Let us also assume that (XS,YS) denotes the first coordinate
of the upper, and (XE,YE) denotes the second coordinate of the shoulder.
ISSn : 0976-8491 (online) | ISSn : 2229-4333 (print)
B. Kinematic Equations The kinematic equations are:
Coordinates the shoulder joint from equations:
(5)
Coordinates the elbow joint from equations:
(6)
C. Moving the Arm
The first angle (θ1) is between the body and the upper arm (zero until 90).
The second angle (θ2) is between the upper arm and the forearm for elbow.
Fig. 3: The Arm Movement During Dart Throwing.
V. Optimizing Motion Generation
Optimization is the searching process of the optimal state of the objective functions. It is based on modifying the input values of
a system mathematical model to obtain minimum or maximum
values of the objective parameters. Optimization methods include
five main phases: collecting data, problem definition, mathematical
model building, performance evaluation and results interpretation. Optimization algorithms can be divided into: linear programming, non- linear programming, geometric programm- ing, dynamic programming, integerprog- ramming, evolutionary algorithm, etc. [11].
Genetic algorithms are a type of optimization algorithm, meaning
they are used to find the optimal solution to a given computational problem that maximizes or minimizes a particular function. Genetic algorithms represent one branch of the field of study
called evolutionary algorithms [12].
Evolutionary algorithms use mechanisms and survival of the
fittest theory in order to refine a set of solution iteratively. Genetic
algorithms are subclass of evolutionary algorithms. In genetic algorithm methods, the elements of the search space are binary
strings or arrays of other elementary types. Genetic algorithms search techniques are based on computer after the genetic mechanisms of biological organisms adapted in changing highly competitive environment.
Many of a genetic algorithm’s processes are random, however this optimization technique allows one to set the level of randomization and the level of control [13].
These algorithms are far more powerful and efficient than random search and exhaustive search algorithms [12]. This feature allows them to find solutions to problems that other optimization methods
cannot handle due to a lack of continuity, derivatives, linearity, or other features. Genetic algorithms are used to optimize the objective variables of many problems quickly, reliably and accurately [11].
We used the following cost function
In this part, we will consider three cases, where each pattern generator outputs angular patterns for each joint. To evaluate
motion generation, we need to find the optimal parameter sets by using central pattern generators, which explains how the angular
of the shoulder and the elbow should vary with time to generate
motion along x-direction. For each case, parameter sets for the
central pattern of each joint is given below:
𝑃1= {𝑎1,𝑣1,𝑅1,𝑎2,𝑣2,𝑅2}. Uncoupled Case
𝑃2= {𝑎1,𝑣1,𝑅1,𝑎2,𝑣2,𝑅2,𝑤12,∅12}. Unidirectional case 𝑃3={𝑎1,𝑣1,𝑅1,𝑤12,∅12,𝑎2,𝑣2,𝑅2,𝑤21,∅21}. Bidirectional case
Used genetic algorithms to find the optimal parameter sets. In
this study, there is only one cost function utilized; the different movement patterns depend on this cost function [14-15]
We have to optimize the objective below, let us consider L1=0.20 and L2= 0.20 in centimeters, let us have 10 desired points in our ellipse or circle go and come back, if the objective function is given by.
xdtemp (xd), is some points circle.
ydtemp (yd), is some points circle.
As artificial points.
Error=dis((xW ,yW ),(xd, yd ))
Then, the objective function will be
J= Sum(Error)
There are three constraints:
.
As seen in figures 4(a, b, c)
0 0.5 1 1.5 2
Time 0
20 40 60 80 100 120 140 160 180
O
ut
pu
t o
f C
PG
th1 th2
0 0.5 1 1.5 2
Time
0 20 40 60 80 100 120 140 160 180
O
ut
pu
t o
f C
P
G
th1 th2
Fig. 4(b): Output of Unidirectional Two CPGs
0 0.5 1 1.5 2 2.5 3
Time 0
20 40 60 80 100 120 140 160 180
O
ut
pu
t o
f C
PG
th1 th2
Fig. 4(c): Output of Bidirectional Two CPGs
We release that the bidirectional two CPGs are able to send a good rhythmic motion for one arm compare with other cases.
-0.2 -0.1 0 0.1 0.2 0.3 0.4 0.5
-0.6
-0.5
-0.4
-0.3
-0.2
-0.1
0
Fig. 5: Animation of One Arm in One Secondofthe Bidirectional Two CPGs
VI. Conclusions and Discussion
The main objective in this paper was to illustrate that how the Central Pattern Generators (CPGs) can control the human arm
motion. Specifically in this study, it showed how the CPGs can
control the one arm motion with two degrees of freedom as dart
throwing by using implementation of a GA in optimization problems during different cases: such as the uncoupled,unidirectional andbidirectional of two CPGs. As well as, analysis and comparison for different scenarios during the optimiza-tion were done. Future research should look whether CPGs can control other functions in human bodies, by using real data for the movement.
References
[1] Elbori, A.E.G., M. Turan, K.B. Arıkan,"Optimization of Central Patterns Generators", 2017.
[2] Brown, T.G.,"The intrinsic factors in the act of progression in the mammal", Proceedings of the Royal Society of London.
Series B, containing papers of a biological character, 1911.
[3] Ijspeert, A.J.,"Central pattern generators for locomotion control in animals and robots: A review. Neural networks",
2008.
[4] Simoni, M.F., S.P. DeWeerth,"Sensory feedback in a half-center oscillator model", IEEE Transactions on Biomedical
Engineering, 2007.
[5] Lewis, M.A., F. Tenore, R. Etienne-Cummings,"CPG design using inhibitory networks", In Robotics and Automation,
2005. ICRA 2005. Proceedings of the 2005 IEEE International Conference on. 2005. IEEE.
[6] Nakada, K., T. Asai, Y. Amemiya,"An analog CMOS central
pattern. generator for interlimb coordination in quadruped
locomotion", IEEE Transactions on Neural Networks,
2003.
[7] Ijspeert, A.J., et al.,"From swimming to walking with a salamander robot driven by a spinal cord model. science",
2007.
[8] Crespi, A., A.J. Ijspeert. AmphiBot II: An amphibious snake robot that crawls and swims using a central pattern generator. in Proceedings of the 9th international conference on climbing and walking robots (CLAWAR 2006). 2006.
[9] Amrollah, E., P. Henaff,"On the role of sensory feedbacks in Rowat–Selverston CPG to improve robot legged locomotion".
Frontiers in neurorobotics, 2010.
[10] Parker, G.A., J.M. Smith,"Optimality theory in evolutionary
biology. Nature, 1990.
[11] Malhotra, R., N. Singh, Y. Singh,"Genetic algorithms: Concepts, design for optimization of process controllers",
Computer and Information Science, 2011.
[12] Kinnear Jr, K.E.,"A perspective on the work in this book",
Advances in Genetic Programming, 1994.
[13] Carr, J.,"An introduction to genetic algorithms", Senior
Project, 2014.
[14] Nolfi, S., D. Floreano,"Evolutionary robotics: The biology, intelligence and technology of self-organizing machines",
2000: MIT press.
[15] Alexander, R.M.,"Optima for animals", 1996: Princeton
University Press.
Journals
[1] Elbori, A.E.G., M. Turan, and K.B. Arıkan, Optimization of
Central Patterns Generators. 2017.
[2] Brown, T.G., The intrinsic factors in the act of progression in the mammal. Proceedings of the Royal Society of London. Series B, containing papers of a biological character, 1911. 84(572): p. 308-319.
ISSn : 0976-8491 (online) | ISSn : 2229-4333 (print)
2008. 21(4): p. 642-653.
[4] Simoni, M.F. and S.P. DeWeerth, Sensory feedback in a half-center oscillator model. IEEE Transactions on Biomedical Engineering, 2007. 54(2): p. 193-204.
[5] Nakada, K., T. Asai, and Y. Amemiya, An analog CMOS central pattern. generator for interlimb coordination in quadruped locomotion. IEEE Transactions on Neural Networks, 2003. 14(5): p. 1356-1365.
[6] Ijspeert, A.J., et al., From swimming to walking with a salamander robot driven by a spinal cord model. science, 2007. 315(5817): p. 1416-1420.
[7] Amrollah, E. and P. Henaff, On the role of sensory feedbacks in Rowat–Selverston CPG to improve robot legged locomotion. Frontiers in neurorobotics, 2010. 4.
[8] Parker, G.A. and J.M. Smith, Optimality theory in evolutionary biology. Nature, 1990. 348(6296): p. 27-33.
[9] Malhotra, R., N. Singh, and Y. Singh, Genetic algorithms: Concepts, design for optimization of process controllers. Computer and Information Science, 2011. 4(2): p. 39. [10] Kinnear Jr, K.E., A perspective on the work in this book.
Advances in Genetic Programming, 1994: p. 3-19.
[11] Carr, J., An introduction to genetic algorithms. Senior Project, 2014: p.1-40.
[12] Nolfi, S. and D. Floreano, Evolutionary robotics: The biology,
intelligence, and technology of self-organizing machines. 2000: MIT press.
[13] Alexander, R.M., Optima for animals. 1996: Princeton
University Press.
Conferences
[1] Lewis, M.A., F. Tenore, and R. Etienne-Cummings. CPG design using inhibitory networks. in Robotics and Automation, 2005. ICRA 2005. Proceedings of the 2005 IEEE International Conference on. 2005. IEEE.
[2] Crespi, A. and A.J. Ijspeert. AmphiBot II: An amphibious snake robot that crawls and swims using a central pattern generator. in Proceedings of the 9th international conference on climbing and walking robots (CLAWAR 2006).2006.
Ltfei Abdalsmd was born in 1977 in Messelata/ Libya.He is from Libya. He graduated fromElmergib University in 1999, his B.S. degree in computer science.After that he got a master degree in 2007 from The Libyan Academy, the M.S. degree was in Information and Communication Technology. He was a teaching lecturer in Department of Computer Science. His research interests include digital signal processing, electronic measurement techniques, information technique.
Assoc. Prof. Dr. Aybaba
HANÇERLİOĞULLARI was born in
1966 Kars / Turkey. In 1992 ,I graduated from Hacettepe University, department of physics engineering in Turkey. I gave
the Green theory a finishing touch on
the application of the electromagnetic
field. I completed my master’s degree
in Gazi University in 1997/Turkey and
started to work in the field of nuclear. I worked in the field of cross sections of
10-20 MeV neutrons nuclear reactions.
In 2003, I completed my doctoral dissertation by working on advanced level APEX fusion technology and modifying the MCNPX simulation code. After my doctorate, I continue my intensive studies in the electrical and electronic parts of nuclear electronics, nuclear environmental radiation and especially energy
efficiency and fusion technology. In this time, I have been working
at academic management and department of physics research center directorate in my University, as Vice Dean. I am a member of American Physics Society and Turkish Physics Society.