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.
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Blocks.Interfaces.RealInput | SOC | State of charge | |
| Modelica.Blocks.Interfaces.RealOutput | y | Power charged or discharged from battery | |
| Modelica.Blocks.Logical.LessThreshold | lessThreshold | ||
| Modelica.Blocks.Logical.GreaterEqualThreshold | greaterEqualThreshold | ||
| Modelica.Blocks.Sources.BooleanExpression | isDay | Outputs true if it is day time | |
| Modelica.Blocks.Logical.Not | not1 | ||
| Modelica.Blocks.Logical.And | and1 | ||
| Modelica.Blocks.Logical.And | and2 | ||
| Modelica.Blocks.Logical.GreaterThreshold | greaterThreshold | ||
| Modelica.Blocks.Logical.LessEqualThreshold | lessEqualThreshold | ||
| Modelica.Blocks.Math.MultiSwitch | multiSwitch1 | ||
| Modelica.StateGraph.InitialStep | off | Off state | |
| Modelica.StateGraph.StateGraphRoot | stateGraphRoot | ||
| Modelica.StateGraph.Alternative | alternative | Splitter for alternative branches | |
| Modelica.StateGraph.TransitionWithSignal | t1 | Transition to charge | |
| Modelica.StateGraph.TransitionWithSignal | t2 | Transition to discharge | |
| Modelica.StateGraph.StepWithSignal | charge | Charge battery | |
| Modelica.StateGraph.StepWithSignal | discharge | Discharge battery | |
| Modelica.StateGraph.TransitionWithSignal | t3 | Transition to off | |
| Modelica.StateGraph.TransitionWithSignal | t4 | Transition to off |
Revisions
-
November 17, 2016, by Michael Wetter:
Removed output of instanceoffto avoid an overdetermined system of equations during initialization.
This is for issue 578. -
April 6, 2016, by Michael Wetter:
ReplacedModelica_StateGraph2withModelica.StateGraph. This is for issue 504. -
January 11, 2013, by Michael Wetter:
First implementation.