User Tools

Site Tools


system_integration:hub4_grid_parallel_external_control_loop

This is an old revision of the document!


Hub-4 mode 2 and 3

This page explains how to use a Multi/Quattro as a bidirectional inverter operating parallel to the grid, integrated into a customer designed system (PLC or other). In mode 2, Advanced, or more 3, Custom.

Note that it is also possible to run a Victron grid parallel storage system without designing and implementing your own control loop, logic or measurements. See the Hub-4 manual.

For firmware version requirements, refer to the main hub-4 manual.

Three/split-phase systems are not possible yet, expected date is 2016 Q2. No hardware changes will be necessary, there will only be firmware upgrades.

1. Overview of Hub-4 operating modes

1.1 Mode 1 - Standard

Standard
The system runs automatically, and uses excess energy harvested during the day to fill the gaps when there is not enough PV power available. Typically in the evening and night. Easy configuration in Assistants and on the Color Control GX.

Necessary Victron equipment:

  1. Multi or Quattro inverter/charger
  2. Color Control GX
  3. AC sensor used for control loop

For details refer to the main hub-4 manual.

1.2 Mode 2 - Advanced

Same as standard operating mode, but more flexibility is given to implement time shifting, load management or other energy management optimization algorithms. Either by ModbusTCP commands or by running additional self implemented code on the Color Control GX. Often the best of both worlds: complete flexibility and benefit from the VRM Portal and all other functionality already available on the CCGX, without having to add additional cost of extra PLCs or other control modules.

Necessary Victron equipment:

  1. Same as mode 1, Standard.

Available control points:

  • Grid power setpoint
  • Maximum charge percentage
  • Maximum discharge percentage

1.3 Mode 3 - Custom

Customer self implements their control loop and grid measurements, and uses the MultiPlus and/or Quattros as simple, remote controllable, bidirectional inverter/chargers that can be set to either charge or discharge an x amount of Watts. Note that the point of control is the AC-input, not the charger itself.

Power to/from AC-input = Power to/from battery + Power to/from AC-output

Necessary Victron equipment:

  1. Multi or Quattro inverter/charger
  2. Color Control GX
  3. Note that there is no AC sensor necessary, since the inverter/charger will act as a 'dumb' bi-directional inverter/charger. It will act on the external command given, which can for example be 'take 2000W from AC in, or feed back 100W through AC in'.

Available control points:

  • Switch (on, charger-only, inverter-only, off)
  • Power setpoint in Watts: regulates the power on the ac-input.
  • Disable charge flag
  • Disable feedback flag

2. Details of operating mode 2 - Advanced

2.1 Operation

  • Grid power setpoint. A positive value: power is taken from grid. Negative value: power fed back to grid. Note that the maximum charge and discharge percentages documented below have priority over the grid power setpoint.
    • D-Bus: com.victronenergy.hub4 /AcPowerSetpoint
    • Modbus: Register 2700, unit ID 0
  • Maximum charge percentage. Limits the power taken in by the Multi through AC-In.
    • 0%: disable charging. This setting may be used for time shifting. For example by disabling charging the battery when feeding back to the grid is profitable, and leaving battery capacity for later.
    • 100%: no charge power not limited by CCGX (max charge current on multi still applies).
    • >0% and <100%: The maximum allowed AC-In power is
      max charge percentage * max charge current * battery voltage / 100
      The maximum charge current is taken from the settings on the Multi (which can be changed using VE configure).
      Because this setting limits the power taken in on the Ac-In of the multi, it may give unexpected results when the AC-Out of the multi is also in use (for example to connect critical loads).
    • D-Bus: com.victronenergy.hub4 /MaxChargePercentage
    • Modbus: Register 2701, unit ID 0
  • Maximum discharge percentage. Can be used to enabled or disable battery discharge. Value < 50 means that discharge is disabled. Otherwise discharge current is limited only by the battery and/or the Multi.
    • D-Bus: com.victronenergy.hub4 /MaxDischargePercentage
    • Modbus: Register 2702, unit ID 0

2.1 Notes

  • The above settings are intended for power management, and will be overridden by battery safety mechanisms. For example: if the multi is in sustain mode - because the battery is almost empty - it will start charging the battery, event if the grid power setpoint is negative or the maximum charge percentage is set to zero.
  • Sustain will always remain in operation. Disabling charge will not disable sustain. Note that this was added to the Hub-4 Assistant released in january 2016 (version 154).
  • In mode 2 the CCGX will change the Multi's AC-In power setpoint (see Mode 3) continuously, so it does not make sense to change the setpoint in this mode.
  • See modbustcp excel sheet for scaling and data types, available here.

3. Details of operating mode 3 - Custom

3.1 Operation

  • When the grid is available, the Multi will be connected to the grid. You can control its operation with the Power setpoint. When positive, energy will flow to the grid. When negative, energy will be taken from the grid. Some examples:
    • When set to +400W, it will feed 400W back through its input. This energy will be taken from the battery. If there is also a 200W AC load connected to AC output the total energy taken from the batteryt will be 600W. The batteries will always be discharged when the setpoint is positive.
    • When set to -400W, it will take 400W from the AC input. When the load on the output is lower than 400W, it will charge the battery with the difference. When the load on the AC output is higher, it will discharge the battery with the difference. So with a negative setpoint charge/discharge depends also on the connected loads.
    • Important note: When using the CCGX to communicate with the HUB-4 assistant (see further on) you should bear in mind that the CCGX inverts the setpoint. So positive becomes negative and vice versa.
  • Note that it will always remain within battery and maximum inverter power limits: when the battery is full, or when the maximum charge current as configured in VEConfigure is already met, it will not draw more power. And when instructed to discharge with 10000 watt, while it is a 2500W inverter, it will discharge with 2500W, until the battery is empty.
  • To force the Multi to Inverter Mode, set the switch to Inverter-only. Note that when you do that, there will be no grid assist, meaning that on an overload the Inverter will switch off, signalling overload alarm. Instead of switching back to grid.
  • When no grid is available, it will automatically switch to inverter mode (seamless), unless the switch is set to charger-only. While in inverter mode, the Power setpoint is in-effective.

3.2 Notes

If no new value is sent to the Multi for longer than 500 periods (= 10 seconds at 50 Hz), the Multi will automatically fall back to 'bypass' that is: No charge/No discharge. The internal transfer relay is closed when AC input is available. In that case any loads on the AC output are fed by the AC input. If there is no AC input available, the unit will switch to inverter mode. (Unless it is set to 'Charger Only' or receives a 'low cell' signal from the VE.Bus BMS).

  • Send a target value to the CCGX via ModbusTCP:
    • unit-id 246 (= CCGX VE.Bus port)
    • register-id 37 (= /Hub4/AcPowerSetpoint)
      Important: The CCGX inverts the value of the setpoint. So use a positive value to instruct charging and a negative one to tell it to discharge. The unit is Watts.
    • register-id 38 (= /Hub4/DisableCharge)
      Value 0: charge enabled, Value 1: charge disabled.
      Important: Disabling charge will also disable feedback.
    • register-id 39 (= /Hub4/DisableFeedback)
      Value 0: feedback enabled, Value 1: feedback disabled.
      If feedback is disabled, the battery will not discharge. In case of grid failure, this parameter will be ignored and power will be supplied to AC Out.
  • Note that it can very well be that the Multi does not do what you want it to do, because the battery is either empty, or full for example. Therefore, for your control algorithm, read the actual power back from the Multi, unit-id 246 and register-id 12.
  • See modbustcp excel sheet for scaling and data types, available here.
  • Note that the mechanism is slow, which to our opinion is not perfect, but also no problem.
  • The 'VE.Bus to VE.Can interface' does not yet support reading and writing the hub4/grid-parallel setpoint.
  • If your system contains a Hub-4 compatible AC-Sensor which is set up as grid meter, the CCGX will automatically enter mode 1 and start updating the AC power setpoint continuously. You can stop this by setting the value of /Settings/CGwacs/Devices/D<serial>/Hub4Mode in the settings D-Bus service (com.victronenergy.settings) to 3 (=hub4 control disabled). Replace <serial> with the serial number of the grid meter.

3.3 Using the MK2 directly instead of CCGX

In this setup, it is not necessary to use a CCGX. Instead an MK2 is used. We have both MK2-RS232 and an MK2-USB available, see the pricelist. A direct connection to the VE.Bus RS485, without MK2 or CCGX, is not possible.

Note that, as also indicated on the Datacommunication whitepaper, the MK2 protocol is not an easy protocol. That is unfortunate, but it is what it is. And we cannot give support on it unless there is a huge commercial value behind the project, read thousands of Multis or Quattros.

And now, after all the warnings, the information:

Use RAMID 128 and higher.

The assistant RAM will be filled from ID 128 with ‘assistant RAM records’.

Assistant info record:
ID_Size
RAM0
RAM1

RAMn

The ID_Size word contains 0xZZZY, where:

  • ZZZ = the Assistant ID. This is where you can recognize the function of the assistant (HUB4 ID = 3)
  • Y = the number of ramIDs that will follow. This is 2 for HUB-4 now.

So you have to scan the assistant RAM records, search for HUB4, then RAM0 is the setpoint in Watts and RAM1 contains the flags. All these values can be read and written. (Bit0 of RAM1 contains the flag 'disable charge' and bit1 of RAM1 contains the flag 'disable feedback')

Above information is an addendum to the 'Interfacing with VE.Bus products' document. Available from our whitepapers.

4. Combining Hub-4 with Lithium batteries

  • Victron Lithium batteries with a VE.Bus BMS: select this in the Hub4 assistant and all will be done automatically.
  • Non-Victron batteries:
    • when you do not want to discharge, set the switch to charger-only. Note that when the switch is set to charger-only, and there is no grid available, there will still be a small power draw on the battery to power the control board.
    • when you do not want to charge, disable charging via the disable-charge flag.
  • As an alternative to running the control loop externally, using ModbusTCP, it is also possible to run code on the CCGX itself and update the AcPowerSetpoint via D-Bus. We have one customer that is running a MQTT client on the CCGX, written in Python, that gets the control-loop output as updates from a MQTT broker. And the Python script sends them to the Multi, using D-Bus service com.victronenergy.vebus.ttyO1, and path /Hub4/AcPowerSetpoint

DISQUS

~~DISQUS~~

system_integration/hub4_grid_parallel_external_control_loop.1454532017.txt.gz · Last modified: 2016-02-03 21:40 by mvader

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki