modelBattery
Test model for battery
Extends from Modelica.Icons.Example.
Information
This model illustrates use of a battery connected to an DC voltage source and a constant load. The battery is charged every night at 23:00 until it is full. At 14:00, it is discharged until it is empty. This control is implemented using a finite state machine. The charging and discharging power is assumed to be controlled to a constant value of 10,000 Watts.
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Buildings.Electrical.DC.Storage.Battery | bat | Battery | |
| Buildings.Electrical.DC.Sources.ConstantVoltage | sou | Voltage source | |
| Modelica.Electrical.Analog.Basic.Ground | ground | ||
| Buildings.Electrical.DC.Loads.Conductor | loa | Electrical load | |
| Modelica.Blocks.Sources.Constant | const1 | Power consumption of the load | |
| Modelica.Blocks.Sources.SampleTrigger | startCharge | ||
| Modelica.Blocks.Logical.GreaterEqualThreshold | greaterEqualThreshold | ||
| Modelica.Blocks.Sources.SampleTrigger | startDischarge | ||
| Modelica.Blocks.Logical.LessEqualThreshold | lessEqualThreshold | ||
| Modelica.Blocks.Logical.Switch | chaSwi | Switch to charge battery | |
| Modelica.Blocks.Logical.Switch | disSwi | Switch to discharge battery | |
| Modelica.Blocks.Sources.Constant | PCha | Charging power | |
| Modelica.Blocks.Sources.Constant | POff | Off power | |
| Modelica.Blocks.Sources.Constant | PDis | Discharging power | |
| Modelica.Blocks.Math.Add | add | ||
| Buildings.Electrical.DC.Sensors.GeneralizedSensor | powSen | Power sensor | |
| Modelica.StateGraph.InitialStep | off | Off state | |
| Modelica.StateGraph.TransitionWithSignal | toOn | Transition to on | |
| Modelica.StateGraph.StepWithSignal | charge | State to charge battery | |
| Modelica.StateGraph.TransitionWithSignal | toHold | Transition to hold | |
| Modelica.StateGraph.Step | hold | Battery charge is hold | |
| Modelica.StateGraph.TransitionWithSignal | toDischarge | Transition to discharge | |
| Modelica.StateGraph.StepWithSignal | discharge | State to discharge battery | |
| Modelica.StateGraph.TransitionWithSignal | toOff | Transition to off | |
| Modelica.StateGraph.StateGraphRoot | stateGraphRoot |
Revisions
-
April 6, 2016, by Michael Wetter:
ReplacedModelica_StateGraph2withModelica.StateGraph. This is for issue 504. -
January 10, 2013, by Michael Wetter:
First implementation.