A device for connecting a multiphase subnetwork to a superordinate multiphase alternating voltage network, wherein the subnetwork has an energy production installation and an energy store, wherein the device is configured to transmit electrical power between the alternating voltage network and the subnetwork and comprises an AC/AC converter having a network connection, two inverter bridge circuits with an interposed intermediate circuit and a subnetwork connection, and a control device which is configured to set the electrical powers flowing via the individual phases of the subnetwork connection of the energy production installation and/or on the basis of power values of the energy store by controlling the inverter bridge circuits of the AC/AC converter.