Genetic algorithm for position determination in parallel kinematics


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).

Leave Comment


A portable, lightweight, open-source .NET standard library for implementing IEEE 11073 SDC Family devices | 4/29/2021

Honestly, I didn't think I would give it another shot, but here is my latest (and ... Read More

Truly portable, zero-dependency, lightweight .NET standard Http server. | 12/27/2020

HttpIot is my latest project, a truly portable, zero-dependency, lightweight .NET ... Read More

OaSharp (OpenAPI Sharp)
An OpenAPI / Swagger C# REST server code generator and hosting .NET standard library | 5/21/2020

My first attempts with C# server code generation for OpenAPI failed catastrophically. ... Read More

More Blog Entries