## Genetic algorithm for position determination in parallel kinematics

4/9/2012

Technologies: .NET (C #), C ++

Identifying the position and orientation of an end effector relative to the robot base is called "direct kinematic problem" (DKP) in robotics. While this is very easy to determine in the case of serial kinematics, so-called closed kinematic chains, with a parallel arrangement of the mechanical components, lead to calculations becoming very complex. To circumvent this problem, approximate solutions are available that make use of the simple solvability of the reverse inverse kinematic problem (IKP). Description of the functions IKP and DKP for this case:

• IKP (easily detachable)
• Input: Spatial coordinates X, Y, Z, Roll, Pitch, Yaw
• Output: Drive positions on the base platform
• DKP (difficult to detach)
• Input: Drive positions on the base platform
• Output: Spatial coordinates X, Y, Z, Roll, Pitch, Yaw

The calculation of the DKP coordinate vector (6 values) using a so-called real-coded genetic algorithm with the aid of the IKP proceeds as follows:

• Rate a lot of random space co-ordinates with meaningful delimitation of the solution space. This is the initial population of the genetic algorithm.
• The initial population, together with a weighting function (Euclidean distance of two vectors), is the input for the sequence, which is repeated until the accuracy of the best candidate is sufficient, or a maximum number of iterations is achieved:
• Select two good candidates x times random (calculation IKP, comparison with drive positions and rating) from the population, where x is the number of candidates. Form a progeny x times by merging the two candidates (joining 12 coordinates to 6 coordinates with random crossover .
• Mutate the values ​​of the offspring (decision randomly) and put this into a new candidate list.
• Check the result (abort criterion) and use the new list gfs. for the next iteration.

One particular enhancement is the different mutation of coordinates in each iteration, a heuristic technique known as simulated annealing . The algorithm calculates a set of coordinates consisting of 6 values ​​with an accuracy of at least 6 decimal places (nm) in well below 100ms (2.5 GHz CPU).

### Blog

BigDecimal (.NET)
An arbitrary large (or small) decimal number implementation for .NET | 8/3/2019

BigDecimal represents a decimal number with arbitrary precision. It is based on a fraction ... Read More

NanoNet - simple Java neural network library
Using backpropagation and sigmoid activation function. | 4/14/2019

NanoNet is a very simple Java neural network library using backpropagation and sigmoid ... Read More

Java async/await nonblocking code library
Write sequential style nonblocking code using a fixed threadpool with Async-Complete for Java | 4/1/2019

Async-Complete (aka Async-Await) is a library for writing asynchronous code in a more ... Read More

More Blog Entries