Difference between revisions of "AXY:Element Coordination/Multi Dimensional Tracking Algorithm (Position)"

From SoftMC-Wiki
Jump to: navigation, search
m
 
(10 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
This algorithm is used for multi-dimensional '''robot based''' MF tracking.<br>
 
This algorithm is used for multi-dimensional '''robot based''' MF tracking.<br>
 
In this document position-tracking is presented.<br>
 
In this document position-tracking is presented.<br>
Position is considered to be a 3-dimensional vector with it's derivatives (velocity, acceleration, jerk): <math>\vec p </math>  , <math>\vec v</math> , <math>\vec a</math><br>
+
Position is considered to be a 3-dimensional vector with its derivatives (velocity, acceleration, jerk): <math>\vec p </math>  , <math>\vec v</math> , <math>\vec a</math><br>
  
 
<math>\vec p  = (x,y,z)</math><br>
 
<math>\vec p  = (x,y,z)</math><br>
Line 27: Line 27:
 
<table style="float:right" border = "1">
 
<table style="float:right" border = "1">
 
<tr><td>
 
<tr><td>
Value of [[Axystems:MC-Basic:movingFrame.ACCELERATIONMAXTRAN|AccMaxTran]] is used of checking of acceleration limit.
+
Value of [[MC-Basic:movingFrame.ACCELERATIONMAXTRAN|AccMaxTran]] is used of checking of acceleration limit.
 
</td></tr>
 
</td></tr>
 
<tr><td>
 
<tr><td>
Value of [[Axystems:MC-Basic:movingFrame.VELOCITYMAXTRANS|VelMaxTran]] is used of checking of velocity limit.
+
Value of [[MC-Basic:movingFrame.VELOCITYMAXTRANS|VelMaxTran]] is used of checking of velocity limit.
 
</td></tr>
 
</td></tr>
 
</table>
 
</table>
Line 44: Line 44:
 
<table style="float:right" border = "1">
 
<table style="float:right" border = "1">
 
<tr><td>
 
<tr><td>
<math>{sync_{jrk}}</math> defined as  [[Axystems:MC-Basic:robot.JERKSYNCTRAN|SyncJerkTran]]
+
<math>{sync_{jrk}}</math> defined as  [[MC-Basic:robot.JERKSYNCTRAN|SyncJerkTran]]
 
</td></tr>
 
</td></tr>
 
<tr><td>
 
<tr><td>
<math>{sync_{acc}}</math> defined as  [[Axystems:MC-Basic:robot.ACCELERATIONSYNCTRAN|SyncAcclerationTran]]
+
<math>{sync_{acc}}</math> defined as  [[MC-Basic:robot.ACCELERATIONSYNCTRAN|SyncAcclerationTran]]
 
</td></tr>
 
</td></tr>
 
</table>
 
</table>
Line 65: Line 65:
 
<table style="float:right" border = "1">
 
<table style="float:right" border = "1">
 
<tr><td>
 
<tr><td>
DampingFactor -  user defined by: [[Axystems:MC-Basic:movingFrame.DAMPINGFACTOR|MF.DAMPINGFACTOR]]
+
DampingFactor -  user defined by: [[MC-Basic:movingFrame.DAMPINGFACTOR|MF.DAMPINGFACTOR]]
 
</td></tr>
 
</td></tr>
 
</table>
 
</table>
Line 129: Line 129:
 
<table style="float:right" border = "1">
 
<table style="float:right" border = "1">
 
<tr><td>
 
<tr><td>
sync_vel defined as  [[Axystems:MC-Basic:robot.VELOCITYSYNCTRAN|VelSyncTran]]
+
sync_vel defined as  [[MC-Basic:robot.VELOCITYSYNCTRAN|VelSyncTran]]
 
</td></tr>
 
</td></tr>
 
<tr><td>
 
<tr><td>
sync_acc defined as  [[Axystems:MC-Basic:robot.ACCELERATIONSYNCTRAN|AccSyncTran]]
+
sync_acc defined as  [[MC-Basic:robot.ACCELERATIONSYNCTRAN|AccSyncTran]]
 
</td></tr>
 
</td></tr>
 
<tr><td>
 
<tr><td>
sync_jrk defined as  [[Axystems:MC-Basic:robot.JERKSYNCTRAN|JrkSyncTran]]
+
sync_jrk defined as  [[MC-Basic:robot.JERKSYNCTRAN|JrkSyncTran]]
 
</td></tr>
 
</td></tr>
 
<tr><td>
 
<tr><td>
Line 189: Line 189:
 
<table style="float:right" border = "1">
 
<table style="float:right" border = "1">
 
<tr><td>
 
<tr><td>
syncGain defined by the user with: [[Axystems:MC-Basic:movingFrame.FILTERFACTOR|MF.FilterFactor]]
+
syncGain defined by the user with: [[MC-Basic:movingFrame.FILTERFACTOR|MF.FilterFactor]]
 
</td></tr>
 
</td></tr>
 
</table>
 
</table>
Line 218: Line 218:
 
<table style="float:right" border = "1">
 
<table style="float:right" border = "1">
 
<tr><td>
 
<tr><td>
maxFlops defined by the user with: [[Axystems:MC-Basic:movingFrame.MAXFLOPS|MF.MaxFlops]]
+
maxFlops defined by the user with: [[MC-Basic:movingFrame.MAXFLOPS|MF.MaxFlops]]
 
</td></tr>
 
</td></tr>
 
</table>
 
</table>
Line 281: Line 281:
 
</pre>
 
</pre>
  
[[Category:Axystems:Motion:MovingFrame]]
+
[[Category:Motion:MovingFrame]]

Latest revision as of 09:18, 22 May 2014

Multi Dimensional Tracking Algorithm

This algorithm is used for multi-dimensional robot based MF tracking.
In this document position-tracking is presented.
Position is considered to be a 3-dimensional vector with its derivatives (velocity, acceleration, jerk): , ,


The algorithm consist of a state machine with the following states:

  1. Tracking process
  2. Full Synchronization follow the master
  3. Stopping (de-synchronization process)

State: Full Synchronization follow the master

  • Check if master velocity or acceleration exceeds max master frame's values if yes return an error
  • copying all derivatives
  • reset: flopstime = flops = 0

State: Tracking process

Initial Setup and testing

Value of AccMaxTran is used of checking of acceleration limit.

Value of VelMaxTran is used of checking of velocity limit.

  • Check if master velocity or acceleration exceeds max master frame's values if yes return an error
  • Compute differences:

   pure delta-position
   pure delta-velocity

Time-to-Reach initial estimation

defined as SyncJerkTran

defined as SyncAcclerationTran


This is an estimation of time needed to reach the target. It is not an exact formula
if the slave velocity is lower then master's we need more time: once to get to a higher velocity then the masters and once
to get from that (higher) velocity to the masters - therefore the multiplication by 2




where


DampingFactor - user defined by: MF.DAMPINGFACTOR

Additionaly we mutliply by a prediction factor - to decrease acc/jerk
(rounding to integer number of samples):

time_to_reach *= DampingFactor
time_to_reach = T*int(time_to_reach/T+1) 

Prediction of the Rendezvous-Point

The predicted position of the rendezvous (minus T, if it will happen in this sample!)
position prediction assuming constant acceleration
Predicted position difference
velocity prediction







Assuming the acceleration will be zero:


Polynomial coefficients of 5-degree polynom connecting the current p,v,a to the randevous p,v,a
- not used, directly written into code
- not used, directly written into code
- not used, directly written into code



Next Sample Position

The position at the next sample will be:
Initial increment (full displacement): 

The acceleration and jerk increments could be computed in this way also.
But they are computed as average values for the time of sample duration, this approach does fit more to
the tools we are using to test this feature, as they all compute acceleration & jerk by numeric differentiation
inside one sample.
The side effect of all this is that we can have a change in jerk/acc sign inside one sample and the average value we are using
ddp,dddp could have an opposite sign, so we are seeing effects like jerk or acceleration is limited from a "wrong side" i.e. instead
using jmax -jmax is used. There is not much we can do against it, using exact jerk/acc values (from polynom) returns than wrong average values
we observe as jerk/acc exceed over their max values. So the average value approach is not perfect but gives results within the given limits.


Initial setting of predicted time and the filter limit flag (if the filter did work - this flag will be on)

limit        = false 
state.satVel = false 
state.satAcc = false  
state.satJrk = false 

Velocity, Acceleration and Jerk Filter

sync_vel defined as VelSyncTran

sync_acc defined as AccSyncTran

sync_jrk defined as JrkSyncTran

T is sampling time



where i.e. unit vector

Setting Initial velocity delta



Setting Initial acceleration delta



New position is:

If the filter was activated then:

if the velocity,accleration or jerk is limited (limit = true) then the velocity computed using polynomials does



Velocity & Accleration will be computed exactly not using dp and ddp, it has been shown that this approach is much better - means more stable



keep the old values for next sample



System is synchronized if NEW delta's are under certesian thresholds:

; - keep the previous dv


syncGain defined by the user with: MF.FilterFactor


Successful tracking completion

if    and  
Synchronization
Take the middle for an additional smoothing:


ResetFilter();		// Reset the filter
state.tracking     =    MOT_MASTER_SYNC; // System synchronized<br>

else if( dv0*dv < 0)
Check against over-oscillation

if (flops == -1) flops = 0; // ignore the first sample
else	         flops++;
flopstime = 0;

Over-Oscillation Check

maxFlops defined by the user with: MF.MaxFlops


if (flops > maxFlops && (flopstime > maxFlopsTime && fabs(dv) > syncGain * sync_accT2))

state.tracking 	= MOT_MASTER_OSC; // OScilationss

else

flopstime++;

State: Stopping (de-synchronization process)

flopstime = flops = 0;
  • De-Syncing profile, follow the given profile, ignore the real source


  • determine the curvature parameters path:


, ,

or linear movement:


  • initialize stopping profile with current values of curvature angle:

desync.pos =
desync.vel =
desync.acc =

See: Theoretical_Background


  • initialize the profiler for stopping - computing the stopping (deceleration path) ad set as new target position for the profiler.
  • during stopping:
desync.Profile();



or in case of linear motion:


if(desync.path.Status.stop)			// if stopped,change the state to OFF
	 SetState(MOT_MASTER_OFF);