modelBatteryControl

Controller for battery

Information

Block for a battery controller. The battery is charged during night if its charge is below a threshold. It remains charging until it is full. During day, it discharges provided that its charge is above a threshold. It remains discharging until it is empty.

Connectors

TypeNameDefaultDescription
Modelica.Blocks.Interfaces.RealInputSOCState of charge
Modelica.Blocks.Interfaces.RealOutputyPower charged or discharged from battery

Components

TypeNameDefaultDescription
Modelica.Blocks.Logical.LessThresholdlessThreshold
Modelica.Blocks.Logical.GreaterEqualThresholdgreaterEqualThreshold
Modelica.Blocks.Sources.BooleanExpressionisDayOutputs true if it is day time
Modelica.Blocks.Logical.Notnot1
Modelica.Blocks.Logical.Andand1
Modelica.Blocks.Logical.Andand2
Modelica.Blocks.Logical.GreaterThresholdgreaterThreshold
Modelica.Blocks.Logical.LessEqualThresholdlessEqualThreshold
Modelica.Blocks.Math.MultiSwitchmultiSwitch1
Modelica.StateGraph.InitialStepoffOff state
Modelica.StateGraph.StateGraphRootstateGraphRoot
Modelica.StateGraph.AlternativealternativeSplitter for alternative branches
Modelica.StateGraph.TransitionWithSignalt1Transition to charge
Modelica.StateGraph.TransitionWithSignalt2Transition to discharge
Modelica.StateGraph.StepWithSignalchargeCharge battery
Modelica.StateGraph.StepWithSignaldischargeDischarge battery
Modelica.StateGraph.TransitionWithSignalt3Transition to off
Modelica.StateGraph.TransitionWithSignalt4Transition to off

Revisions

  • November 17, 2016, by Michael Wetter:
    Removed output of instance off to avoid an overdetermined system of equations during initialization.
    This is for issue 578.
  • April 6, 2016, by Michael Wetter:
    Replaced Modelica_StateGraph2 with Modelica.StateGraph. This is for issue 504.
  • January 11, 2013, by Michael Wetter:
    First implementation.