# Motion Analysis

In alignment or assembly applications, the final alignment or assembly performance is dependent on not only the repeatability and accuracy of feature finding and pose computation in the vision system, but also depends on the motion device's performance. The motion device's condition significantly affects the final alignment or assembly results, therefore, to evaluate motion device's performance is often a recommended step during machine setup.

Motion analysis is a function in AlignPlus that is designed to serve this purpose. It tracks certain calibration targets while motion device moves the target or camera to a set of given locations to evaluate motion's stability and accuracy, therefore, detects any motion issues including but not limited to vibration, repeatability, or drift.

Motion analysis function is automatically generated under each hand-eye calibration component without having the user configure it during wizard configuration. In run time, motion analysis uses the same motion device that is used in its corresponding hand-eye calibration.

## Motion Analysis Process

Motion analysis process resembles vision-guided hand-eye calibration process in which motion device moves at command of the vision system. The steps are as follows:

1. The calibration target is affixed to the motion device for stationary-camera applications. For moving camera applications, the calibration target is placed on the surface that would contain the part to be aligned
2. The motion device is moved to working position provided by the vision system.
3. At working position, following a settling time, the image of the calibration target is captured, checkers or trained feature are located, and their coordinates are accumulated.
4. The motion device moves to one of the target positions in the position list provided by vision system.
5. After the steps 2- 4 have been repeated sufficient times, the motion analysis results are computed.

## Motion Analysis Setup

Motion analysis setup consists of the following:

1. Setup tracking features
2. Choose coordinate space
3. Chose the test type for motion device performance analysis.

### Setup tracking features

Motion analysis tracks one feature point on calibration target. The calibration target type is dependent on its hand-eye calibration target type set in Setup wizard. If it is calibration plate, motion analysis tool will automatically extract checker features on plate and use the mass center of all extracted features in train time as the point to track; If it is a real part, motion analysis tool will use the origin of trained feature set by user as the point to track.

### Choose coordinate space

There are three different spaces options that motion analysis can choose.

- Raw2D

  When the perspective distortion and lens distortion are negligible in acquired image, one can track feature in Raw2D(raw image space) directly. The motion analysis result report is based on pixel, however this can be converted manually into millimeter using pixel resolution to better interpretation of the results.

- Checkerboard Calibration

  Checkerboard calibration corrects lens distortion and perspective distortion on acquired image and output a distortion free image with selected space as "Checkerboard Calibration". In Checkerboard Calibration space, features can be located more accurately if those distortions are not negligible.

- Home2D

  With hand-eye calibration result applied, the input images for motion analysis will have Home2D space available. If Home2D is chosen, the coordinates of extracted features will be in Home2D.

### Performance Analysis

There are four ways to define how motion device should move during evaluation, each with different evaluation purposes:

- Static Acquisition

  In this mode, motion device stay stationary(which means there is no target positions), and let vision system locates features repeatedly at working position to evaluate whether there is a motion vibration issue.

- Static Motion

  In this mode, motion device moves between working position and a fixed target position, repeatedly or moves between working position and some boundary target positions. This mode is used to evaluate motion device's repeatability.

- Dynamic Motion

  In this mode, motion device moves back and forth between working position and some customized target positions. This is used to check whether there is a backlash in motion device.

- Random target

  In this mode, motion device moves back and forth between working position and some random target positions to check the accuracy of absolute position of motion device.