org.mbari.siam.foce.devices.controlLoop
Class VEL_PID_Responder

java.lang.Object
  extended by org.mbari.siam.foce.devices.controlLoop.BaseResponder
      extended by org.mbari.siam.foce.devices.controlLoop.VEL_Responder
          extended by org.mbari.siam.foce.devices.controlLoop.VEL_PID_Responder
All Implemented Interfaces:
ControlResponseIF, ProcessParameterIF

public class VEL_PID_Responder
extends VEL_Responder


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.mbari.siam.distributed.devices.ProcessParameterIF
ProcessParameterIF.DummyConstValues, ProcessParameterIF.DummyFIDMap, ProcessParameterIF.DummyIDMap, ProcessParameterIF.DummyIIDMap, ProcessParameterIF.DummyModeNames, ProcessParameterIF.DummyOIDMap, ProcessParameterIF.DummyParamNames, ProcessParameterIF.DummyRIDMap, ProcessParameterIF.DummySIDMap
 
Field Summary
protected static org.apache.log4j.Logger _log4j
          Log4j logger
 
Fields inherited from class org.mbari.siam.foce.devices.controlLoop.VEL_Responder
AFT_THRUSTER_INDEX, FWD_THRUSTER_INDEX, NUMBER_OF_THRUSTER, RECORD_HEADER
 
Fields inherited from class org.mbari.siam.foce.devices.controlLoop.BaseResponder
_attributes, _cfgPacketBuffer, _controlProcess, _correction, _dataPacket, _dataTurbineHost, _doTurbinate, _error, _esw_pump_amode, _esw_valve_amode, _lastDataPacket, _maxDataBytes, _offset, _packetBuffer, _packetParser, _ph_cmode, _ph_rmode, _previousError, _previousProcessValue, _processValue, _rawCorrection, _recordDelimiter, _recordType, _setPoint, _thruster_amode, _turbinator, _velocity_cmode, DELIMITERS
 
Fields inherited from interface org.mbari.siam.distributed.devices.ProcessParameterIF
AC_PH_INT_AFT, ACTUATION_DISABLED, ACTUATION_ENABLED, ACTUATION_MAX, ACTUATION_MIN, BX_PH_ESW, BX_PH_EXT_MID_L, BX_PH_EXT_MID_R, BX_PH_INT_AFT_L, BX_PH_INT_AFT_R, BX_PH_INT_FWD_L, BX_PH_INT_FWD_R, BX_VESWP, BX_VH2O_EXT_X, BX_VH2O_EXT_Y, BX_VH2O_INT_X, BX_VH2O_INT_Y, BX_VTHR_AFT, BX_VTHR_FWD, CONNECTOR_TYPE_EXT_OSDT, CONNECTOR_TYPE_RAW, CONNECTOR_TYPE_SIAM_OSDT, CONNECTOR_TYPE_SIAM_REG, const_mnem2value, CONTROL_MODE_CONSTANT, CONTROL_MODE_DEADBAND, CONTROL_MODE_MANUAL, CONTROL_MODE_MAX, CONTROL_MODE_MIN, CONTROL_MODE_OFFSET, CONTROL_MODE_PANIC, DIR_X, DIR_Y, DIR_Z, EC_PH_EXT, FC_PH_INT_FWD, filter_id2fname, HD_HDG_EXT, HD_HDG_INT, IAC_PH_INT_AFT_L, IAC_PH_INT_AFT_R, IBX_PH_ESW, IBX_PH_EXT_MID_L, IBX_PH_EXT_MID_R, IBX_PH_INT_AFT_L, IBX_PH_INT_AFT_R, IBX_PH_INT_FWD_L, IBX_PH_INT_FWD_R, IBX_VESWP, IBX_VH2O_EXT_X, IBX_VH2O_EXT_Y, IBX_VH2O_INT_X, IBX_VH2O_INT_Y, IBX_VTHR_AFT, IBX_VTHR_FWD, IC_PH_INT, IEC_PH_EXT_MID_L, IEC_PH_EXT_MID_R, IFC_PH_INT_FWD_L, IFC_PH_INT_FWD_R, IHD_HDG_EXT_X, IHD_HDG_EXT_Y, IHD_HDG_INT_X, IHD_HDG_INT_Y, IIC_PH_INT_AFT, IIC_PH_INT_FWD, IMA_MAG_EXT_X, IMA_MAG_EXT_Y, IMA_MAG_INT_X, IMA_MAG_INT_Y, input_id2iname, IVC_VH2O_EXT_X, IVC_VH2O_EXT_Y, IVC_VH2O_INT_X, IVC_VH2O_INT_Y, IVS_ESWV_AFT, IVS_ESWV_FWD, LOC_ESW, LOC_EXT, LOC_INT, MA_MAG_EXT, MA_MAG_INT, mode_id2pname, OUTPUT_AFT_ESW_VALVE, OUTPUT_AFT_THRUSTER_VELOCITY, OUTPUT_ESW_PUMP_VELOCITY, OUTPUT_FWD_ESW_VALVE, OUTPUT_FWD_THRUSTER_VELOCITY, output_id2name, OUTPUT_TYPE_EXT, OUTPUT_TYPE_SIAM, PARAM_CO2_CONCENTRATION, PARAM_DENSITY_SW, PARAM_ESW_PUMP_AMODE, PARAM_ESW_VALVE_AMODE, PARAM_EXP_A, PARAM_EXP_B, PARAM_EXP_H, PARAM_EXP_K, PARAM_FLUME_AREA, param_id2pname, PARAM_MAX_FLOW_CHANGE_PERCENT, PARAM_PH_ABS_MAX, PARAM_PH_ABS_MIN, PARAM_PH_CMODE, PARAM_PH_DEADBAND_HI, PARAM_PH_DEADBAND_LO, PARAM_PH_LIN_FILTER_DEPTH, PARAM_PH_LIN_OFFSET, PARAM_PH_LIN_SLOPE, PARAM_PH_MAX_CORRECTION, PARAM_PH_OFFSET, PARAM_PH_PID_KD, PARAM_PH_PID_KI, PARAM_PH_PID_KP, PARAM_PH_PID_MAX_KI, PARAM_PH_PID_SCALE_FACTOR, PARAM_PH_RMODE, PARAM_PH_SETPOINT, param_pname2aname, PARAM_THRUSTER_AMODE, PARAM_VELOCITY_CAL_A, PARAM_VELOCITY_CAL_B, PARAM_VELOCITY_CAL_C, PARAM_VELOCITY_CMODE, PARAM_VELOCITY_DEADBAND_HI, PARAM_VELOCITY_DEADBAND_LO, PARAM_VELOCITY_MAX_CORRECTION, PARAM_VELOCITY_MAX_RPM, PARAM_VELOCITY_MIN_RPM, PARAM_VELOCITY_OFFSET, PARAM_VELOCITY_PID_KD, PARAM_VELOCITY_PID_KI, PARAM_VELOCITY_PID_KP, PARAM_VELOCITY_PID_MAX_KI, PARAM_VELOCITY_PID_SCALE_FACTOR, PARAM_VELOCITY_RMODE, PARAM_VELOCITY_SETPOINT, POS_AFT, POS_FWD, POS_L, POS_MID, POS_R, PROC_EXCL, PROC_INCL, RESPONSE_MODE_EXP, RESPONSE_MODE_LIN, RESPONSE_MODE_MAX, RESPONSE_MODE_MIN, RESPONSE_MODE_PID, ROLE_AFT_ESW_VALVE, ROLE_AFT_THRUSTER, ROLE_ESW_PH, ROLE_ESW_PUMP, ROLE_EXT_MID_L_PH, ROLE_EXT_MID_R_PH, ROLE_EXT_X_VELOCITY, ROLE_EXT_Y_VELOCITY, ROLE_FWD_ESW_VALVE, ROLE_FWD_THRUSTER, role_id2name, ROLE_INT_AFT_L_PH, ROLE_INT_AFT_R_PH, ROLE_INT_FWD_L_PH, ROLE_INT_FWD_R_PH, ROLE_INT_X_VELOCITY, ROLE_INT_Y_VELOCITY, ROLE_MASK, SIG_AFT_THRUSTER_VEL, SIG_AFT_THRUSTER_VEL_CMD_CHK, SIG_AFT_THRUSTER_VEL_CMD_RAW, SIG_ESW_AFT_VALVE_CMD, SIG_ESW_AFT_VALVE_STATE, SIG_ESW_FWD_VALVE_CMD, SIG_ESW_FWD_VALVE_STATE, SIG_ESW_INJ_VOL, SIG_ESW_PUMP_CMD_CHK, SIG_ESW_PUMP_CMD_RAW, SIG_ESW_PUMP_VEL, SIG_FWD_THRUSTER_VEL, SIG_FWD_THRUSTER_VEL_CMD_CHK, SIG_FWD_THRUSTER_VEL_CMD_RAW, SIG_PH_ERR, SIG_PH_ESW, SIG_PH_ESW_FILT, SIG_PH_EXT_FILT, SIG_PH_EXT_MID_L, SIG_PH_EXT_MID_R, SIG_PH_GRAD, SIG_PH_INT_AFT_FILT, SIG_PH_INT_AFT_L, SIG_PH_INT_AFT_R, SIG_PH_INT_FILT, SIG_PH_INT_FWD_FILT, SIG_PH_INT_FWD_L, SIG_PH_INT_FWD_R, SIG_VH2O_EXT_DIR_FILT, SIG_VH2O_EXT_MAG_FILT, SIG_VH2O_EXT_X_FILT, SIG_VH2O_EXT_X_RAW, SIG_VH2O_EXT_Y_FILT, SIG_VH2O_EXT_Y_RAW, SIG_VH2O_INT_DIR_FILT, SIG_VH2O_INT_ERR, SIG_VH2O_INT_MAG_FILT, SIG_VH2O_INT_X_FILT, SIG_VH2O_INT_X_RAW, SIG_VH2O_INT_Y_FILT, SIG_VH2O_INT_Y_RAW, signal_id2sname, TYPE_ALL, TYPE_ESW, TYPE_MASK, TYPE_MOTOR, TYPE_PH, TYPE_VALVE, TYPE_VELOCITY, VC_VH2O_EXT_X, VC_VH2O_EXT_Y, VC_VH2O_INT_X, VC_VH2O_INT_Y, VS_ESWV_AFT, VS_ESWV_FWD
 
Constructor Summary
VEL_PID_Responder(FOCEProcess controlProcess, ControlLoopAttributes attributes)
           
 
Method Summary
 java.lang.StringBuffer getConfigBuffer()
          Return a sample buffer with current response configuration.
 float getCorrection()
          Calculate correction value (heart of the PID loop) The following variables must be set (e.g.
 void initialize()
          initialize control loop
 
Methods inherited from class org.mbari.siam.foce.devices.controlLoop.VEL_Responder
applyConstraints, getDeadBandCorrection, getSampleBuffer, getSamplePacket, initTurbinator, thrusterCommands, update, updateInputs, updateThrusterOutputs
 
Methods inherited from class org.mbari.siam.foce.devices.controlLoop.BaseResponder
getLastSample, reset, showParsedData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_log4j

protected static org.apache.log4j.Logger _log4j
Log4j logger

Constructor Detail

VEL_PID_Responder

public VEL_PID_Responder(FOCEProcess controlProcess,
                         ControlLoopAttributes attributes)
                  throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

initialize

public void initialize()
initialize control loop

Specified by:
initialize in interface ControlResponseIF
Overrides:
initialize in class VEL_Responder

getCorrection

public float getCorrection()
                    throws java.lang.Exception
Calculate correction value (heart of the PID loop) The following variables must be set (e.g. by update()) prior to calling getCorrection(): _processValue, _previousProcessValue, _error, _maxError,_maxErrorSum, _scaleFactor, _Kp, _Ki, _Kd

Specified by:
getCorrection in class BaseResponder
Throws:
java.lang.Exception

getConfigBuffer

public java.lang.StringBuffer getConfigBuffer()
                                       throws java.lang.Exception
Return a sample buffer with current response configuration. sub-classes should call the base class to get the common data items.

Overrides:
getConfigBuffer in class BaseResponder
Throws:
java.lang.Exception


Copyright © 2003 MBARI.

The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement.