L_TB1P_FrictionCompensation

This FB includes the "Friction identification" and "Friction compensation" functions.

 

 

 

L_TB1P_FrictionCompensation

 

 

 

BOOL

-

xIdent

xBusy

-

BOOL

BOOL

-

xFollowerActive

xDone

-

BOOL

LREAL

-

lrActReelSpeedIn

xError

-

BOOL

LREAL

-

lrActTorqueIn

eErrorID

-

L_IE1P_Error

DWORD

-

dwSelectCurve

xStop

-

BOOL

BOOL

-

xEnableFrictionCurve

xEnableFollower

-

BOOL

LREAL

-

lrSetReelSpeed

lrSetReelSpeedOut

-

LREAL

LREAL

-

lrFrictionAdapt

lrSetFrictionTorqueOut

-

LREAL

BOOL

-

xInvertOutput

LREAL

-

lrMaxSpeedIdent

LREAL

-

lrAccDecIdent

LREAL

-

lrFilterTimeSpeed

LREAL

-

lrFilterTimeTorque

LREAL

-

lrFilterTimeReelSpeed

LREAL

-

lrLinearCompStart

LREAL

-

lrLinearCompEnd

ARRAY [1...66] OF LREAL

-

alrFrictionCurve1

ARRAY [1...66] OF LREAL

-

alrFrictionCurve2

ARRAY [1...66] OF LREAL

-

alrFrictionCurve3

ARRAY [1...66] OF LREAL

-

alrFrictionCurve4

 

 

 

 

 

 

 

 

Inputs and outputs

Name

Data type

Information/possible settings

alrFrictionCurve[1...4]

ARRAY [1...66] OF LREAL

Friction characteristics 1 ... 4

Inputs

Name

Data type

Information/possible settings

xIdent

BOOL

TRUE

Friction identification:

Start identification of the friction characteristic.

xFollowerActive

BOOL

Interface for feedback that setpoint generation has been enabled (e.g. SMC_FollowVelocity.bBusy)

lrActReelSpeedIn

LREAL

Current speed of the motor shaft (actual speed value)

  • Unit: rev/s

lrActTorqueIn

LREAL

Current torque (actual torque value)

  • Unit: Nm

dwSelectCurve

DWORD

Friction identification ( xIdent = True)

Selection of the memory area in which the friction values identified are stored.

  • Selection '1' ... '4': memory area 1 ... 4

Friction compensation ( xEnableFrictionCurve = TRUE, xIdent = FALSE)

Selection of the characteristic for friction compensation.

  • Selection '0': linear friction characteristic, adjustable via ...
    • lrLinearCompStart
    • lrLinearCompEnd
    • lrLinearCompEndReelSpeed )
  • Selection '1' ... '4': friction characteristic identified (memory area 1 ...4)

xEnableFrictionCurve

BOOL

Activate friction compensation.

TRUE

Friction compensation is activated.

FALSE

The friction torque is reset to '0'.

lrSetReelSpeed

LREAL

Speed setpoint for the friction characteristic

  • Unit: rev/s

lrFrictionAdapt

LREAL

Value for the proportional evaluation of the friction characteristic

  • Unit: % (1 º 100 %)

xInvertOutput

BOOL

TRUE

The lrSetFrictionTorqueOut output signal is shown in an inverted fashion.

lrMaxSpeedIdent

LREAL

Maximum speed for friction identification

  • Unit: rev/s

lrAccDecIdent

LREAL

Acceleration for friction identification

  • Unit: rev/s 2

lrFilterTimeSpeed

LREAL

Filter time constant for the actual speed value for friction identification

  • Unit: s
  • Initial value: 0.0 (with this value, the filter is not active.)

lrFilterTimeTorque

LREAL

Filter time constant for the actual torque value for friction identification

  • Unit: s
  • Initial value: 0.0 (with this value, the filter is not active.)

lrFilterTimeReelSpeed

LREAL

Filter time constant for the speed setpoint for friction compensation

  • Unit: s
  • Initial value: 0.0 (with this value, the filter is not active.)

lrLinearCompStart

LREAL

Initial friction torque for friction compensation

lrLinearCompEnd

LREAL

End friction torque for friction compensation

lrLinearCompEndReelSpeed

LREAL

Speed at end friction torque for friction compensation

Outputs

Name

Data type

Value/meaning

xBusy

BOOL

TRUE

The "Friction identification" or "Friction compensation" function is active.

xDone

BOOL

TRUE

The "Friction identification" or "Friction compensation" function has been completed successfully.

xError

BOOL

TRUE

An error has occurred. For details see eErrorID .

eErrorID

L_IE1P_Error

If xError = TRUE: Error number for the error that has occurred.

xStop

BOOL

xStop is set to TRUE if the friction identification process is aborted and can be used to control an external STOP function.

xEnableFollower

BOOL

xEnableFollower is set to TRUE for activating a setpoint interface (e.g. SMC_FollowVelocity).

lrSetReelSpeedOut

LREAL

Speed setpoint for friction identification

  • Unit: rev/s

lrSetFrictionTorqueOut

LREAL

Current friction torque

  • Unit: Nm
Identifying the friction characteristic automatically

How to proceed:

  1. Select the memory location for the characteristic.

    Define the memory location (1 ... 4) in which the characteristic is to be saved via the dwSelectCurve input after the identification process has been carried out successfully.

  2. Start identification process.

    Set the xIdent input to TRUE.

Friction identification process
  1. The basic function "Speed follower" is activated.
  1. With the acceleration set in lrAccDecIdent , the drive is accelerated to the maximum speed set in lrMaxSpeedIdent .
  2. When the drive has reached the maximum speed, it is braked to a standstill again with the acceleration set in lrAccDecIdent .
  3. The friction characteristic is saved in the memory area selected via the input dwSelectCurve .
  4. After a successful identification process, ...

The identification is executed according to the following state machine:

State machine for the friction identification

Aborting the friction identification process

If the xIdent input is reset to FALSE, the active identification process is cancelled immediately. Resetting the xFollowerActive input to FALSE also results in the immediate abort of the process.

Smoothing the actual value signals

If incremental encoders are used, it may be required to filter the actual speed value signal.

The time constant for the filter can be set via the lrFilterTimeSpeed input. A setting of '10 ms' is sufficient in most cases.

Filtering the actual torque signal can be also helpful for smoothing the friction characteristic. The time constant for this filter can be set via the lrFilterTimeTorque input.

Activating the friction compensation

Friction compensation is active if the xIdent input is set to FALSE and the xEnableFrictionCurve input is set to TRUE.

The current speed is preselected via the lrSetReelSpeed input.

If the actual speed value exceeds the maximum value defined in the characteristic, the characteristic is extrapolated linearly.

Use of a linear characteristic

If the input dwSelectCurve is = 0 or unassigned, a linear characteristic is used for the friction compensation.

The linear characteristic is defined via parameters lrLinearCompStart , lrLinearCompEnd , and lrLinearCompEndReelSpeed :

Use of a previously automatically identified friction characteristic

If the dwSelectCurve input = 1 ... 4, the friction characteristic saved in the corresponding memory location is used instead of the linear characteristic.

Temperature compensation

Via the lrFrictionAdapt input, a gain for the characteristic on a percentage basis is specified, for instance in order to compensate changes in the friction torque due to temperature changes.

Smoothing the speed setpoint

For smoothing the lrSetReelSpeedOut speed setpoint, a filter time constant can be specified via the lrFilterTimeReelSpeed input.

Display of the precontrol signal

The precontrol signal generated is provided at the lrSetFrictionTorqueOut output. By setting the xInvertOutput input to TRUE, this signal can be output in an inverted manner (change of direction of rotation).