Index: firmware/App/Services/PIControllers.c =================================================================== diff -u -rd830f37cf6a42a16399c87985bd51dfd9312ced3 -r55a6adaf81175d25c1d9cc4c96d7dfda84eede16 --- firmware/App/Services/PIControllers.c (.../PIControllers.c) (revision d830f37cf6a42a16399c87985bd51dfd9312ced3) +++ firmware/App/Services/PIControllers.c (.../PIControllers.c) (revision 55a6adaf81175d25c1d9cc4c96d7dfda84eede16) @@ -1,12 +1,12 @@ /**********************************************************************//** * - * @file PIControllers.c - * * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. * * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * + * @file PIControllers.c + * * @date 18-Dec-2019 * @author L. Baloa * @@ -21,10 +21,17 @@ #include "SystemCommMessages.h" #include "PIControllers.h" +/** + * @addtogroup PIControllers + * @{ + */ + // ********** private definitions ********** +/// minimum integral coefficient - cannot be zero #define MIN_KI NEARLY_ZERO +/// record for PI controller typedef struct { // -- PI's parameters -- F32 Kp; /// Proportional Value @@ -38,7 +45,7 @@ F32 errorSumBeforeWindUp; /// error signal before windup correction F32 errorSum; /// error integral after windup correction F32 controlSignal; /// actual control signal -} PI_CONTROLLER_T; /// record for PI controller +} PI_CONTROLLER_T; #define SET_CONTROLLER( c, id ) ((c) = &piControllers[id]) /// macro to set a local controller pointer to a given piController @@ -52,6 +59,8 @@ { 0.0, 0.0, 0.90, 0.10, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 } // PI_CONTROLLER_ID_DIALYSATE_FLOW }; +/**@}*/ + /*********************************************************************//** * @brief initializePIController * Initialize controller before operation. Make sure to call it before