Index: PIControllers.h =================================================================== diff -u -r38a7e5c6f4ecd3f33a54783cfca074af4617053a -rbbe216fe2c07c329d1ff5a3a1b609202006cf87a --- PIControllers.h (.../PIControllers.h) (revision 38a7e5c6f4ecd3f33a54783cfca074af4617053a) +++ PIControllers.h (.../PIControllers.h) (revision bbe216fe2c07c329d1ff5a3a1b609202006cf87a) @@ -7,8 +7,8 @@ * * @file PIControllers.h * -* @author (last) Vinayakam Mani -* @date (last) 14-Apr-2026 +* @author (last) Sameer Kalliadan Poyil +* @date (last) 16-Apr-2026 * * @author (original) Vinayakam Mani * @date (original) 07-Oct-2024 @@ -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 { @@ -91,6 +107,8 @@ 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 ); + /**@}*/ #endif