Index: PIControllers.h =================================================================== diff -u -r4f713442a4385395c566c6ca9b161c95e406c1f1 -rc83bc5477fb0d2eabdbc517d08600046982fd9c5 --- PIControllers.h (.../PIControllers.h) (revision 4f713442a4385395c566c6ca9b161c95e406c1f1) +++ PIControllers.h (.../PIControllers.h) (revision c83bc5477fb0d2eabdbc517d08600046982fd9c5) @@ -51,6 +51,8 @@ PI_CONTROLLER_ID_RO_PUMP_PRES, ///< RO pump controller to maximum pressure PI_CONTROLLER_ID_BOOST_PUMP_FLOW, ///< Boost pump controller to flow PI_CONTROLLER_ID_BOOST_PUMP_PRES, ///< Boost pump controller to maximum pressure + PI_CONTROLLER_ID_BICARB_VOL, ///< Bicarb dose volume + PI_CONTROLLER_ID_ACID_VOL, ///< Acid dose volume #endif NUM_OF_PI_CONTROLLERS_IDS ///< Number of PI controllers } PI_CONTROLLER_ID_T; @@ -70,6 +72,20 @@ NUM_OF_CONTROLLER_SIGNAL ///< Number of PI controller signals } PI_CONTROLLER_SIGNALS_ID; +/// Data structure for debugging PI controller signals. +typedef struct DebugControllerSignals +{ + F32 controlSignalReference; ///< Reference value + F32 controlSignalMeasured; ///< Measured value + F32 controlSignalError; ///< Error value + F32 controlSignalErrorSum; ///< Error sum before anti-windup + F32 controlSignalErrorSumAfterWindup; ///< Error sum after anti-windup + F32 controlSignalProportionalOutput; ///< P portion of controller output signal + F32 controlSignalIntegralOutput; ///< I portion of controller output signal + F32 controlSignalFeedDorwardOutput; ///< Feed forward portion of controller output signal + F32 controlSingalControl; ///< Controller output signal + } PI_CONTROLLER_SIGNALS_DATA; + /// Data structure for PI control profiles. typedef struct { @@ -90,6 +106,7 @@ F32 runPIController( PI_CONTROLLER_ID_T controllerID, F32 referenceSignal, F32 measuredSignal ); F32 getPIControllerSignals( PI_CONTROLLER_ID_T controllerID, PI_CONTROLLER_SIGNALS_ID signalID ); void setPIControllerFeedForward( PI_CONTROLLER_ID_T controllerID, F32 feedforward ); +PI_CONTROLLER_SIGNALS_DATA getDebugPIControllerSignals( PI_CONTROLLER_ID_T controllerID ); /**@}*/