FC_Poly5NormalizedCoefficients

 

FC_Poly5NormalizedCoefficients - General Information

Overview

Type:

Function

Available as of:

V1.0.3.0

Versions:

Current version

Task

Calculates the coefficients of a standardized polynomial from the boundary conditions.

Description

This function fulfils the same task as the function FC_Poly5Coefficients. The only difference is that a transition to a standardized X space is made before calculating the polynomial coefficients. This is effected by the following transformation:

P(X) = Pnorm( (X - i_lrX0) / (i_lrX1 - i_lrX0) )

Pnorm is a polynomial with an X space standardized to the interval [0, 1], for which the following holds:

P(i_lrX0) = Pnorm(0)

P(i_lrX1) = Pnorm(1)

Compared to FC_Poly5Coefficients, this way of proceeding has the advantage of a reduced sensitivity in relation to rounding errors (in particular if i_lrX0 is very large). A disadvantage, however, is that, in addition to the polynomial coefficients, the values i_lrX0 and i_lrX1 must be stored. This is effected in the extended polynomial coefficient structure ST_Poly5NormalizedCoefficients.

Interface

Input

Data type

Description

i_lrX0

LREAl

Left marginal point of the X interval

i_lrY0

LREAl

Required function value of the polynomial at the point i_lrX0

i_lrM0

LREAl

Required slope of the polynomial at the point i_lrX0

i_lrK0

LREAl

Required curvature of the polynomial at the point i_lrX0

i_lrX1

LREAl

Right marginal point of the X interval

i_lrY1

LREAl

Required function value of the polynomial at the point i_lrX1

i_lrM1

LREAl

Required slope of the polynomial at the point i_lrX1

i_lrK1

LREAl

Required curvature of the polynomial at the point i_lrX1

Output

Data type

Description

q_etDiag

GD.ET_Diag

General library-independent statement on the diagnostic.

A value not equal to ET_Diag.Ok corresponds to an diagnostic message.

q_etDiagExt

ET_DiagExt

POU-specific output on the diagnostic.

q_etDiag = ET_Diag.Ok -> Status message

q_etDiag <> ET_Diag.Ok -> Diagnostic message

Return Value

Data type

Description

ST_Poly5NormalizedCoefficients

Structure of the coefficients as well as of the interval limits of the polynomial.

Diagnostic Messages

q_etDiag

q_etDiagExt

Enumeration value

Description

OK

Ok

0

Ok

InputParameterInvalid

DefinitionXInterval

97

The definition of the X interval is invalid.

DefinitionXInterval

Enumeration name:

DefinitionXInterval

Enumeration value:

97

Description:

The definition of the X interval is invalid.

Issue

Cause

Solution

-

The definition of the X interval via i_lrX1 and i_lrX0 is invalid.

The following must hold: i_lrX1> i_lrX0

Ok

Enumeration name:

Ok

Enumeration value:

0

Description:

Ok

The coefficients have been calculated successfully.