WDR_MechanicalCompensation (FB)

FUNCTION_BLOCK WDR_MechanicalCompensation


Description:

Calculates and provides mechanical compensation torques (friction and inertia) to improve winder/unwinder motion control accuracy and tension stability. The compensation torque is designed to be used as feedforward control in conjunction with tension PID control.

Key Features :

  • Computes friction compensation torque, both static and dynamic, to overcome resistance in the system.

  • Friction compensation :

    • Calculates static friction torque at low speeds to prevent stalling

    • Computes dynamic friction torque based on speed-dependent lookup table

    • Supports 7-point friction curve (5%, 10%, 20%, 40%, 60%, 80%, 100% speed)

    • Applies user-defined friction torque offset for fine-tuning

    • Optional low-pass filtering to reduce noise and sudden changes

    • Frictional loss torque is scaled by gear ratio. ActRollerTorque contains the scaled value.

  • Inertia compensation :

    • Calculates torque required to accelerate/decelerate roll mass. Inertia compensation provides feedforward torque offset to the motor during acceleration and deceleration.

    • Supports two calculation methods:
      • SCALED_BY_WEIGHT_DIAMETE: Based on Full roll weight and Actual Diameter.

      • ESTIMATED_WEIGHT: Based on Estimated Weight from Actual Radius, Core Radius and Material Thickness.

    • Separate gain factors for acceleration, deceleration, and steady-state.

    • Optional low-pass filtering to reduce angular acceleration noise amplification.

    • Output inertia compensation torque will be scaled to gear ratio. ie, Inertia Compensation := (Total Inertia * Angular Acceleration)* Gear Ratio.

  • Output of block incldues individual friction and inertia compensation values (Nm and %) and Status indication for diagnostics and troubleshooting. Friction and inertia compensation will be set to zero if diameter hold is active.

Note

The mechanical compensation value for friction and inertia is added to the TorqueOffset output of the WDR_WinderControl function block. The output variable from WDR_MechanicalCompensation function block does not need to be mapped elsewhere. The output can be used here for result monitoring and diagnostics. The final feed-forward TorqueOffset also include feed-forward values such as stall torque and trim torque.

Note

Filtering is recommended for motor speed and inertia torque inputs to ensure stable angular acceleration with minimal noise and fluctuations. Since angular acceleration is derived from motor speed, fluctuations in speed directly impact inertia torque calculations. Use combined filtering for optimal results.

Recommended Settings:

  • MotorControlParameter.MotorSpeedLPSTime (Motor Speed Filter): 1000 ms (enabled in Winder Control function block)

  • MechCompenFilterPara.InertiaCompenLPSTime (Inertia Torque Filter): 1000 ms (enabled in Mechanical Compensation function block)

Combined filtering of both parameters produces smoother and more stable inertia torque values.

Note

Fixed Inertia: Sum of constant rotating component inertias from both motor and load sides:

  • Motor Side Components: Motor shaft inertia (J_motor) and Coupling inertia (J_coupling)

  • Load Side Components: Gearbox inertia (J_gearbox) and Empty core roller inertia (J_core)

  • Formula (Load Side Reference): J_fixed_inertia = (J_motor + J_coupling) × GearRatio² + J_gearbox + J_core

  • Empty Core Inertia Calculation, Formula: J_core = (m_core × (R_outer² + R_inner²)) / 2

  • Parameters: m_core = Core mass [kg], R_outer = Core outer radius [m] and R_inner = Core inner radius [m]


InOut:

Scope

Name

Type

Initial

Comment

Input

EnableFrictionCompen

BOOL

[TRUE] Enables/disables friction torque compensation.

StaticFrictionSpeed

LREAL

[%] Minimum speed at which the winder does not stall. Must be below 5%.

StaticFrictionTorque

LREAL

[%] Winder roller friction torque at the static-friction speed. Must be less than the torque at 5%. Can be captured from ActRollerTorque at stall speed.

FrictionTorqueOffset

LREAL

[%] Winder roller friction Torque Additive is an extra torque added to the calculated friction compensation.

DynamicFriction

WDR_DynamicFrictionParameter

[%] Defines the winder roller friction torque at Dyanamic(5%,10%,20%,40%,60%,80% and 100%) of the maximum speed. Can be captured from ActRollerTorque for different speed level.

EnableInertiaCompen

BOOL

[TRUE] Enables/disables inertia-based torque correction.

FixedInertia

LREAL

[kgm²] Fixed inertia includes sum of the inertia of the motor shaft, couplings, gear-box and inertia of an empty roll.

InertiaCalcMethod

WDR_INERTIA_CALC_METHOD

Method used to calculate inertia 1. ESTIMATED_WEIGHT 2.SCALED_BY_WEIGHT_DIAMETER

MaterialWidth

LREAL

[mm] Width of the material.

MaterialLength

LREAL

[mm] Length of the material.

MaterialDensity

LREAL

[kg/m3] Density of the material.

FullRollWeight

LREAL

[kg] Total weight of wound web material on the roll, core weight excluded.

AccCompGain

LREAL

Gain for inertia torque during acceleration

DecCompGain

LREAL

Gain for inertia torque during deceleration

SteadySpeedCompGain

LREAL

Gain for inertia torque during steady speed

AnglurAccThreshold

LREAL

0.1

[RPM] Minimum RPM change per cycle used to detect angular accel/decel state.

MechCompenFilterPara

WDR_MechCompenFilterParameter

Low pass filter parameters for friction and inertia compensation.

Output

Busy

BOOL

[TRUE] Indicates the function block is currently running.

Error

BOOL

Indicates an error occurred in the function block. The error flag resets after the error condition is resolved and when the Enable input transitions from TRUE to FALSE.

AppErrorID

WDR_APP_ERROR_ID

Application-specific error code.

FrictionCompenNm

LREAL

[Nm] Torque compensation needed to overcome static/dynamic friction.

FrictionCompen

LREAL

[%] Torque compensation needed to overcome static/dynamic friction.

TotalInertia

LREAL

[kg/m3] Total calcualte inertia.

AngularAcceleration

LREAL

[rad/s²] Angualr Acceleration.

InertiaCompenNm

LREAL

[NM] Torque compensation calculated from material inertia and scaled for gear ratio.

InertiaCompen

LREAL

[%] Torque compensation calculated from material inertia and scaled for gear ratio.

StatusMessage

WSTRING(255)

“None”

Indicates Mechanical Compentation active status message.

Inout

WinderLink

WDR_WinderLink

Structured data to share common variables between mandatory function blocks.