blockActivePowerController
Controls electrical power of heat pump
Information
Purpose
PI-based power controller for a heat pump. Tracks an external power request P_external within time‑varying limits and enables/disables the output based on a minimum‑power hysteresis and block flags.
Function
- PI control: PID_reset_lim (PI mode) regulates from setpoint P_external and feedback P_measurement.
- Variable limits: Controller output is limited between HP_Q_min and HP_Q_max via the internal variable limiter.
- Enable gating: The final output is switched between the PI value and 0 by a Boolean gate: hysteresis on P_external (uLow=0.95 HP_P_min, uHigh=0.99 HP_P_min) combined with HP_blocked_on/HP_blocked_off. If blocked‑on, the gate is forced on; if blocked‑off, it can be forced off.
- Reset behavior: A rising edge of SignalActive or a change of the output gate triggers a controller reset (reinitMethod = limit2), reinitializing the integrator to the current lower limit to avoid windup/bumps.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| SI.ActivePower | HP_P_min | ||
| SI.ActivePower | HP_P_max |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Blocks.Interfaces.RealOutput | y | ||
| Modelica.Blocks.Interfaces.RealInput | HP_Q_max | ||
| Modelica.Blocks.Interfaces.BooleanInput | SignalActive | ||
| Modelica.Blocks.Interfaces.RealInput | P_external | ||
| Modelica.Blocks.Interfaces.BooleanOutput | Signal | ||
| Modelica.Blocks.Interfaces.RealInput | HP_Q_min | ||
| Modelica.Blocks.Interfaces.RealInput | P_measurement | ||
| Modelica.Blocks.Interfaces.BooleanInput | HP_blocked_on | ||
| Modelica.Blocks.Interfaces.BooleanInput | HP_blocked_off |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Basics.Blocks.PID_reset_lim | control_P | ||
| Modelica.Blocks.Logical.Hysteresis | hysteresis | ||
| Modelica.Blocks.Sources.RealExpression | HP_off | ||
| Modelica.Blocks.Logical.Switch | switch_off | ||
| Modelica.Blocks.Sources.BooleanExpression | Signal_always_on | ||
| Modelica.Blocks.MathBoolean.Or | reinitialize | ||
| Modelica.Blocks.Logical.Edge | edge_reinit1 | ||
| Modelica.Blocks.Logical.LogicalSwitch | logicalSwitch | ||
| Modelica.Blocks.Sources.BooleanExpression | booleanExpression | ||
| Modelica.Blocks.Logical.LogicalSwitch | logicalSwitch1 | ||
| Modelica.Blocks.Sources.BooleanExpression | booleanExpression1 |