Polynomial-Fit FB dialog-box

Toolbar-Modelling-FB-PolyFit

The data at the output-connector from Polynomial-Fit FB is a series of concatenated [joined end-to-end] polynomials that are a 'best-fit' to motion-values at its input-connector.

You can output the 'best-fit' as:

'motion-values' at its output-connector
to a .csv file, or
the format required for a Schneider-Electric® servo-controller.

See: Add Polynomial Fit Function-Block

STEP 1: Connect a wire from the output-connector of a different FB to the input-connector of the Polynomial-Fit FB.

STEP 2: Open the Polynomial-Fit FB dialog-box:[See 'How to open a dialog-box']

Polynomial-Fit dialog-box

dialog-r12-polyfit1_zoom45

The Polynomial-Fit dialog-box:

1-R-RED   Toolbar to 'get '1-cycle', 'run', 'stop', 'save' and 'auto-run'

2-R-Red Three[3] dialog separators:

Polynomial Parameters
Motion Function-Blocks
Solve Values

3-R-RED Graph-Area

4-R-RED Toolbar to save, print and control how to view the:

data at the input-connector

and the

'solved-data'.

Polynomial-Fit toolbar

Dialog-R12-Polyfit-toolbar

Polynomial Fit toolbar

After you edit the 'Polynomial Parameters', then you can press the different buttons in the toolbar.

The toolbar has these buttons:

1-R-RED 'Acquire' ['Capture', 'Get One Cycle'] button : Click each time you edit 'Polynomial Parameters' or change the data at the input connector.

2-R-Red 'Fit Polynomials to Data' button: Click each time you want to fit the polynomials to the input-data.

3-R-RED  'Stop the 'Polynomial Fit algorithms'. Click if the algorithms cannot find a good solution quickly.

4-R-RED 'Save Coefficients' : Click to save the results to a CSV file, or a EPAS4 file THAT IS suitable for a Schneider Electric servo-controller.

5-R-RED (2)  'Auto-Run': Immediately allow the algorithms to run until the polynomials fit the data to the accuracy as specified, and with less or equal to the maximum number of Polynomials in the 'best-fit'.

Polynomial Parameters 

Dialog-PolynomialFit-PolyParameters

Parameters to enter before you do 'Polynomial Fit' [button 2s above]

Number-of-Points :

... you want in the output motion, should you want to save the fit as a series of data points.

Pts. in Tol Sample :

... that the algorithm will use to calculate the error between the 'output motion' and the input motion'.

Maximum Number of Polynomial :

... to 'best-fit' to the 'input data'.

Position Tolerance %; Velocity Tolerance %; Acceleration Tolerance %

... the difference [error] between the 'best-polynomial-fit' and the 'input-data' within the number of samples in the 'Sample Count'. These are scaled to the range of the input to the Poly-Fit FB.


Polynomial-Fit algorithm:

1.Does the algorithm to fit the Polynomial, using number of points as specified in the 'Tolerance Sample Count', and then...
2.Shifts the data point by one data point, and then...
3.Repeats the calculation, and then...
4.Repeats 1 to 3 again and again by the total 'number of points':
until the errors are less than the 'Tolerances' specified below

or

the number of Polynomials exceed the 'Maximum Polynomial Count' value

or

you use the 'Stop the Polynomial Fit algorithm' button - see toolbar above.

Motion Function-Blocks 

Dialog-PolynomialFit-MotionFBs

The Motion name, associated with the Motion FB, helps the algorithms to do the Polynomial-Fit.

The  X-axis values of the Blend-Points in the motion should be at the same timing as the input to the Polynomial-Fit FB.

This is especially useful when the motion-values at the input to the Poly-Fit FB and the Motion name both have dwells with the same X-axis timing.

To add a Motion FB:

1.Unlock the data-box
2.Click a Motion FB in the Assembly-Tree or the graphic-area.

Example:

When the Polynomial Fit FB must find Polynomials that are equal to a servo's motion that controls a Tool-Part, but via a kinematic-chain.

Add the same Motion FB [with associated FBs] that controls the motion of the Tool-Part.

Solve Values 

Dialog-PolynomialFit-SolveValues

RMS Position Error, RMS Velocity Error, RMS Acceleration Error [Read-Only].

They give the RMS [Root, Mean Square] error values of the Position, Velocity and Acceleration between the 'best-polynomial-fit' and the 'input-motion-data', as percentage of the maximum range of each motion-derivative.

# of Polynomials in Fit

The number of Polynomials in the solution.

See also: 'Maximum Polynomial Count'. in the  Polynomial Parameters  separator.

Tutorial and Reference Help Files for MechDesigner and MotionDesigner 13.2 + © Machine, Mechanism, Motion and Cam Design Software by PSMotion Ltd