.

MEIFilterGainPIDCoeff

Definition

 
typedef		enum {
    MEIFilterGainPIDCoeffGAIN_PROPORTIONAL, /* Kp */
    MEIFilterGainPIDCoeffGAIN_INTEGRAL,     /* Ki */
    MEIFilterGainPIDCoeffGAIN_DERIVATIVE,   /* Kd */

    MEIFilterGainPIDCoeffFEEDFORWARD_POSITION,     /* Kpff */
    MEIFilterGainPIDCoeffFEEDFORWARD_VELOCITY,     /* Kvff */
    MEIFilterGainPIDCoeffFEEDFORWARD_ACCELERATION, /* Kaff */
    MEIFilterGainPIDCoeffFEEDFORWARD_FRICTION,     /* Kfff */

    MEIFilterGainPIDCoeffINTEGRATIONMAX_MOVING, /* MovingIMax */
    MEIFilterGainPIDCoeffINTEGRATIONMAX_REST,   /* RestIMax */

    MEIFilterGainPIDCoeffDRATE,             /* DRate */

    MEIFilterGainPIDCoeffOUTPUT_LIMIT,      /* OutputLimit */
    MEIFilterGainPIDCoeffOUTPUT_LIMITHIGH,  /* OutputLimitHigh */
    MEIFilterGainPIDCoeffOUTPUT_LIMITLOW,   /* OutputLimitLow */
    MEIFilterGainPIDCoeffOUTPUT_OFFSET,     /* OutputOffset */

    MEIFilterGainPIDCoeffNOISE_POSITIONFFT, /* Ka0 */
    MEIFilterGainPIDCoeffNOISE_FILTERFFT,   /* Ka1 */
    MEIFilterGainPIDCoeffNOISE_VELOCITYFFT, /* Ka2 */
} MEIFilterGainPIDCoeff;

Description

MEIFilterGainPIDCoeff is a structure of enums that defines the filter coefficients for the PID filter algorithm.

Sample Code

/* Sets reasonable tuning parameters for a Trust TA9000 test stand */
void setPIDs(MPIFilter filter)
{
MPIFilterGain gain;
long returnValue;
returnValue = mpiFilterGainGet(filter, 0, &gain); msgCHECK(returnValue); gain.coeff[MEIFilterGainPIDCoeffGAIN_PROPORTIONAL].f = (float)100; gain.coeff[MEIFilterGainPIDCoeffGAIN_INTEGRAL].f = (float)0.2; gain.coeff[MEIFilterGainPIDCoeffGAIN_DERIVATIVE].f = (float)1000;
gain.coeff[MEIFilterGainPIDCoeffFEEDFORWARD_POSITION].f = (float)0;
gain.coeff[MEIFilterGainPIDCoeffFEEDFORWARD_VELOCITY].f = (float)45;
gain.coeff[MEIFilterGainPIDCoeffFEEDFORWARD_ACCELERATION].f = (float)101000;
gain.coeff[MEIFilterGainPIDCoeffFEEDFORWARD_FRICTION].f = (float)450;
gain.coeff[MEIFilterGainPIDCoeffINTEGRATIONMAX_MOVING].f = (float)15000;
gain.coeff[MEIFilterGainPIDCoeffINTEGRATIONMAX_REST].f = (float)15000;
gain.coeff[MEIFilterGainPIDCoeffDRATE].f = (float)0;
gain.coeff[MEIFilterGainPIDCoeffOUTPUT_LIMIT].f = (float)32767;
gain.coeff[MEIFilterGainPIDCoeffOUTPUT_LIMITHIGH].f = (float)32767;
gain.coeff[MEIFilterGainPIDCoeffOUTPUT_LIMITLOW].f = (float)-32767;
gain.coeff[MEIFilterGainPIDCoeffOUTPUT_OFFSET].f = (float)0;
gain.coeff[MEIFilterGainPIDCoeffNOISE_POSITIONFFT].f = (float)0;
gain.coeff[MEIFilterGainPIDCoeffNOISE_FILTERFFT].f = (float)0;
gain.coeff[MEIFilterGainPIDCoeffNOISE_VELOCITYFFT].f = (float)0; returnValue = mpiFilterGainSet(filter, 0, &gain);
msgCHECK(returnValue);
}

See Also

MEIFilterGainPID

 

       Legal Notice  |  Tech Email  |  Feedback
      
Copyright ©
2001-2021 Motion Engineering