Smart green power node

11693376 · 2023-07-04

    Inventors

    Cpc classification

    International classification

    Abstract

    The present invention is directed to an improved smart green power node using predictive switching, predictive operation at a daily and hourly level, and both grid connected and island operating modes with built-in cybersecurity.

    Claims

    1. An energy management method for the energy management control of a smart green power node apparatus, the energy management method comprising: providing control algorithms for a physical layer and a system layer, the physical layer including a converter stage, an input side having an input voltage and an input current, and an output side having an output voltage and an output current, the system layer including power command generation, operational mode determination, and energy-predictive control, first, determining multiple discrete time models for the dual active bridge converter which can be combined to form a dual active bridge continuous time model that specifies the input-output relationship of the input voltage, input current, and output voltage and output current, the discrete time models including a first discrete time model; second, selecting the first discrete-time model to predict the system's future behavior, the behavior prediction including physical circuit layer behavior and system primary and secondary layers behavior, third, providing the circuit layer control by using discrete control in dual-phase shift control in the dc/dc stage which has higher efficiency and transient response capability than single-phase shift; fourth, constructing a Lagrangian function to determine the optimized phase-shift ratio, Di, this is the phase angle that is only for the primary side switches in dual-active bridge; fifth, using the predicted dual-phase shift control to calculate an outer phase-shift ratio, Do, the phase angle between primary side switches and secondary side switches such that the voltage level across the transformer becomes 7-level and produces less current stress to semiconductor switches; sixth, implementing the optimized phase-shift ratio Di and Do to the gate control circuits to operate the dual active bridge converter; seventh, selecting the voltage/power command and operation mode in circuit layer using the system layer control; eighth, controlling in the system layer the energy condition monitoring, energy predictive control, energy storage control, and energy dispatch control; ninth, using communications in the primary layer and secondary layer including connecting to the internet and other power routers in a community, to predict and make a daily operational energy management plan based on time of use pricing, and/or historical usage data and/or weather data indicative of expected irradiance; tenth, the LPPT limitation algorithm in the system layer including the coordinated control with energy storage and renewable energy generation selection in power maximum or limitation mode; eleventh, using an architecture that defines defense-in-depth, multi-layered security protection from the hardware layer, the physical controls layer, and the internal and external communications layers; twelfth, providing an islanded mode of operation for energy management in the event that the electric power grid goes down; and thirteenth, providing an autonomous mode of operation, either grid-connected or islanded, when external communications are absent.

    2. A smart green power node, comprising: a processor providing predictive asset allocation based on weather forecast power.

    3. A smart green power node, comprising: optimization of power management based on power usage predictions coupled with machine learning algorithms based on historical usage data, and back-up power/islanding capability power of the smart green power node.

    Description

    BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

    (1) In the following drawings, which form a part of the specification and which are to be construed in conjunction therewith, and in which like reference numerals have been employed throughout wherever possible to indicate like parts in the various views:

    (2) FIG. 1 is a schematic view of a smart green power router connected to the photovoltaic panels, battery, load, and power grid.

    (3) FIG. 2 is a schematic view of the power routing circuit of the smart green power node.

    (4) FIG. 3 is a schematic view of a dual half bridge circuit.

    (5) FIG. 4 is a graphic view of the operating modes in one switching cycle.

    (6) FIG. 5 is a schematic view of the inductor current controller.

    (7) FIG. 6 is a schematic view of the leakage inductance compensation.

    (8) FIG. 7 is a block diagram of the overall model based predictive dual phase shift control.

    (9) FIG. 8 is a schematic overview of layered, energy predictive control.

    (10) FIG. 9 shows control schemes for grid connected mode.

    (11) FIG. 10 shows control schemes for island connected mode.

    (12) FIG. 11 shows a schematic view of the communication network.

    (13) FIG. 12 shows operating modes in one switching cycle.

    (14) FIG. 13 shows a system level grid connection.

    (15) FIG. 14 shows a typical battery cycle life vs. DoD curve.

    (16) FIG. 15 shows a limited power point tracking limitation algorithm.

    (17) FIG. 16 shows a Smart Green Power Node Basic Functional Block Diagram.

    (18) FIG. 17 shows a detailed functional block diagram.

    (19) FIG. 18 shows the method for controlling the phase shift.

    (20) FIG. 19 shows another version of the smart green power node.

    (21) FIG. 20 shows the control process.

    (22) FIG. 21 shows the limited power point tracking.

    (23) FIG. 22 shows the Model-based Predictive Dual-Phase-Shift Control (MPDPC).

    (24) FIG. 23 shows the Coordination Grid Edge Power Control.

    (25) FIG. 24 shows the Predictive Economic Optimization.

    (26) FIG. 25 shows the Command Validation.

    (27) FIG. 26 shows the Encrypted Communication.

    (28) FIG. 27 shows the Firmware Integrity Check.

    DETAILED DESCRIPTION OF THE INVENTION

    (29) As shown in FIGS. 1-27 of the drawings, one exemplary embodiment of the present invention is generally shown as a Smart Green Power Node 100 with power management and communication capabilities.

    (30) As noted by FIGS. 16 and 17, the smart green power node 100 includes a power routing circuit 200 controlled by a processor 300 using a suite of control methods and algorithms. The power routing circuit 200 is composed of dc/dc converters 210 and an ac/dc inverter 220 and is connected to on-site power generation 20, on-site power storage 30, on-site loads 40, and the power supply grid 10. The suite of control methods and algorithms manage individual converters and circuits, and manage the power flow through the entire system.

    (31) Some basic technologies, circuit topologies, and control algorithms are used in the smart green power node 100. Namely, these are boost converters, buck/boost converters, maximum power point tracking, energy storage, dual active bridge converters, phase shift control, inverters, rectifiers, solar power generation prediction, load prediction, and combinatorial optimization.

    (32) 1. Boost Converters and Maximum Power Point Tricking

    (33) FIGS. 1 and 2 show the on-site power generation 20 with photovoltaic panels 22 in the smart green power node 100 can use a boost converter 212 with maximum power point tracking to manage photovoltaic power from the photovoltaic panels 22. The photovoltaic panels 22 are operated by a maximum power point tracking control such that the panels are operated at a specific voltage to maximize their efficiency and power. This low voltage, dc power is then converted to the appropriate voltage by the boost converter 212. Photovoltaic power can be routed to both the load 40 and the battery 30. The low voltage dc bus 215 of the smart green power node 100 can be energized by this photovoltaic power or other alternative forms such as wind or water turbines, geothermal power, etc.

    (34) 2. Buck/Boost Converters and Energy Storage

    (35) FIGS. 1 and 2 show how the smart green power node 100 can use a buck/boost converter 214 to manage power flow into and out of a battery 32 which can be made as a battery bank 32. This battery bank 32 can be used as energy storage. The battery 32 receives and discharges its power onto the low voltage dc bus 215 of the smart green power node 100. Grid power 10 and photovoltaic power 20 can be stored in the battery bank 32. The usable life of a battery 32 may be extended if the battery 32 is charged or discharged at certain rates, and held between certain states of charge. In case of a loss of grid 10 power, the batteries 32 may be discharged to provide an uninterruptible power supply for the residence load 40.

    (36) 3. Dual Active Bridge Converters and Phase Shift Control

    (37) As shown in FIGS. 1 and 2, power is moved from the low voltage dc bus 215 to the high voltage dc bus 217, and vice versa, through the dual active bridge converter 216. The dual active bridge converter 216 is a switch-mode power converter. The dual active bridge 216 is two sets of switches, a transformer, inductors, and a number of other circuits and elements, e.g. snubbers and voltage sensors. Changes in the timing of the switching are used to control the power flow and the efficiency of the dual active bridge 216. The relative change of this timing between the switches is phase shift control.

    (38) 4. Inverters and Rectifiers

    (39) As shown in FIGS. 1 and 2, the high voltage dc bus 217 interfaces with the power grid 10 through the inverter/rectifier 222. The same topology can act as an inverter or a rectifier, depending on the controls used. The inverter/rectifier 222 converts dc to ac power or ac to dc power, respectively. The inverter 222 used on the smart green power node 100 is split phase, designed to interface with the voltage levels typical of a residence load 40. The inverter and rectifier 222 allow power to flow into or out of the high voltage dc bus 217, and thus into or out of the smart green power node 100 as a whole.

    (40) 5. Solar Power Generation Prediction. Load Prediction, and Combinatorial Optimization

    (41) Both the solar power 22 generated and the load 40 demands can be predicted. These predictions, based on machine learning algorithms of historical usage data and weather forecast data, along with other information such as the Time of Use price from the grid 10 utility, create many options for how to route power for best economy. Combinatorial optimization is a family of methods to select the best option or options from the possible ways to route power. The use of power prediction, information gathering, and optimization provide a scheme for greatest economy.

    (42) Items that distinguish the smart green power node of this invention include:

    (43) 1) a model-based predictive dual-phase-shift control;

    (44) 2) a condition monitoring and layered, energy-predictive control:

    (45) 3) energy market controls, and

    (46) 4) embedded cybersecurity methods.

    (47) 1. Model-Based Predictive Dual-Phase-Shift Control

    (48) For the dual active bridge 216 of FIG. 3, a model-based predictive dual-phase-shift control 1800 as shown in FIG. 18 maximizes the efficiency and provides better dynamic performance. The model-based Predictive Dual-Phase-Shift Control dual active bridge 216 greatly reduces the control error due to variable inductance. Compensation of the predicted current and feedback amplitude reduces the control error. The model-based predictive dual-phase-shift control scheme 1800 maximizes the efficiency and provides better dynamic performance of the dual active bridge 216. Conventional phase-shift control does provide power delivery, but with high power loss and current stress on hardware. The revised phase-shift control reduces the current stress, but the dynamic performance cannot be guaranteed. Model predictive control 1800 specifies the input-output relation of the voltages and currents, and selects the switch position to have the minimum cost function while also providing the preferred dynamic performance of circuit 216. The model-based predictive phase-shift control not only reduces the current stress of switches and improves efficiency, but also ensures the system has the desired dynamic response.

    (49) FIG. 18 shows the method 1800 for controlling the phase shift using the model-based predictive dual-phase-shift controller for the smart green power node 100 system is as follows:

    (50) First 1801, determine the dual active bridge model which specifies the input-output relationship of the currents and voltages by using multiple discrete time models.

    (51) Second 1802, obtain the discrete-time model from the continuous-time model to predict the system's future behavior.

    (52) Third 1803, construct the Lagrangian function to determine the optimized phase-shift ratio of two sides of the Full Bridge.

    (53) Fourth 1804, calculate the outer phase-shift ratio, Do, through the predicted circuit equations.

    (54) Fifth 1805, use another circuit equation to eliminate the leakage inductance error due to the current changing.

    (55) Sixth 1806, implement the phase-shift ratio Di and Do to gate control circuits for the node 100.

    (56) In the SGPN system 100, to cooperate with system level control and achieve the objectives of reducing energy consumption from grid 10 and maximizing the energy cost return, a Model-based Predictive Dual-Phase-shift Control 1800 (MPDPC) is used for the Dual-Active Bridge 216 stage. Three variables are optimized through the MPDPC: (1) Phase-shift ratio Di for each side of Full Bridge in Dual Active-Bridge (DAB); (2) Outer phase-shift ratio Do between the primary and secondary sides of DAB. (3) Those three variables are derived from the real time model of DAB. Not only the current stress of switching device is minimized, but also the transient response can be finished within one switching period to track the reference value from the system layer. The reference value from the system layer can be power command or voltage reference. To further reduce the power loss during power transmission, the power loss is also built in MPDPC.

    (57) Detailed Description of MPDPC:

    (58) As previously noted, there are multi-objectives in the SGPN system. The circuit level control is to maximize the power efficiency and better dynamic performance. Conventional phase-shift control is used to control power delivery but with high power loss and current stress. The revised phase-shift control 1800 is applied to reduce the current stress but as noted the dynamic performance cannot be guaranteed. Model Predictive Control 1800 is based on a circuit model by following KCL and KVL to specify the input-output relation of the voltages and currents, and select the switch position to have the minimum cost function and apply to circuit to achieve the preferred dynamic performance of circuit. However, how to combine high efficiency and good dynamic performance is becoming a challenge. Hence, the Model-based Predictive Phase-shift Control 1800 not only aims to reduce the current stress of the switches and improve efficiency, but also ensures the system has very good dynamic response.

    (59) To predict the current of the leakage inductance 1801, we must first determine the dual active bridge model that specifies the input-output relationship of the currents and voltages by using multiple discrete time models.

    (60) The circuit configuration of the Dual-Active Bridge is given in FIG. 3. The operating mode waveforms for a switching cycle are shown in FIG. 4 and the operating modes of the Dual-Active Bridge under dual-phase-shift control are shown in FIG. 12.

    (61) The equations for each operating mode are given as follows:

    (62) v pri ( t ) = { 0 , t 0 t t 1 V 1 , t 1 < t t 2 V 1 , t 2 < t t 4 V 1 , t 4 < t t 5 0 , t 5 < t t 6 - V 1 , t 6 < t t 7 - V 1 , t 7 < t t 9 - V 1 , t 9 < t t 10 v sec ( t ) = { - NV 2 , t 0 t t 1 - NV 2 , t 1 < t t 2 0 2 , t 2 < t t 4 NV 2 , t 4 < t t 5 NV 2 , t 5 < t t 6 NV 2 , t 6 < t t 7 0 2 , t 7 < t t 9 - NV 2 , t 9 < t t 10 i Lr ( t ) = { i Lr ( t 0 ) + v pri ( t 1 ) - v sec ( t 1 ) L r ( t - t 0 ) , t 0 t t 1 i Lr ( t 1 ) + v pri ( t 2 ) - v sec ( t 2 ) L r ( t - t 1 ) , t 1 t t 2 i Lr ( t 2 ) + v pri ( t 4 ) - v sec ( t 4 ) L r ( t - t 2 ) , t 2 t t 4 i Lr ( t 4 ) + v pri ( t 5 ) - v sec ( t 5 ) L r ( t - t 4 ) , t 4 t t 5 i Lr ( t 5 ) + v pri ( t 6 ) - v sec ( t 6 ) L r ( t - t 5 ) , t 5 t t 6 i Lr ( t 6 ) + v pri ( t 7 ) - v sec ( t 7 ) L r ( t - t 6 ) , t 6 t t 7 i Lr ( t 7 ) + v pri ( t 9 ) - v sec ( t 9 ) L r ( t - t 7 ) , t 7 t t 9 i Lr ( t 9 ) + v pri ( t 10 ) - v sec ( t 10 ) L r ( t - t 9 ) , t 9 t t 10

    (63) Second 1802, we must obtain the discrete-time model from the continuous-time model to predict the system's future behavior.

    (64) At time instances t4 and t9, the current of the leakage inductance iLr is predicted by Eqs. (4) and (5), respectively, iLr(t0) and iLr(t5) are the two current sensing points.

    (65) I pre 1 = i Lr ( t 4 ) = i Lr ( t 0 ) + ( NV 2 L r T hs - V 1 + NV 2 L r T hs + V 1 L r T hs ) D i + V 1 + NV 2 L r T hs D o ( 4 ) I pre 2 = i Lr ( t 9 ) = i Lr ( t 5 ) + ( NV 2 L r T hs - V 1 + NV 2 L r T hs + V 1 L r T hs ) D i + V 1 + NV 2 L r T hs D o ( 5 )

    (66) The inductance current control diagram for the DAB is shown in FIG. 5, where idc is the feed forward signal. This approach results in better transient response performance.

    (67) Third 1803, we construct the Lagrangian function to determine the optimized phase-shift ratio of the two sides of the Full Bridge.

    (68) Through the current equations in each mode, the average transmission power and peak current of the leakage inductance are calculated in Eqs. (6) and (7), respectively. The objective of this calculation is to minimize the current stress in the switches. The Langrangian function is constructed as in Eq. (8).

    (69) P out = { NV 1 V 2 D o ( 2 D i - D o ) 4 f s L r , D o + D i 100 % , D o < D i NV 1 V 2 D o ( 2 D i + 2 D o - 1 - 2 D o 2 - D i 2 ) 4 f s L r , D o + D i > 100 % , D o < D i ( 6 ) i Lr_MAX = NV 2 [ ( D i - D o ) .Math. "\[LeftBracketingBar]" 1 - k .Math. "\[RightBracketingBar]" + D o ( 1 - k ) ] 4 f s L r ( 7 ) L ( D o , D i , λ ) = i LR_MAX ( D o , D i ) + λ [ P out ( D o , D i ) - P out ] ( 8 )
    When the peak current is minimized, we have:

    (70) { L D i = i Lr_MAX D i + λ P out D i = 0 L D o = i Lr_MAX D o + λ P out D o = 0 L λ = P out ( D i + D o ) - P out = 0 ( 9 )

    (71) Fourth 1804, we calculate the outer phase-shift ratio, Do, through the predicted circuit equations.

    (72) If D.sub.i-D.sub.o>100%, D.sub.o can be solved as:

    (73) D o = P out f s L r ( k - 3 ) ( k + 1 ) NV 1 V 2 + ( k 2 - 2 k + 3 ) 2 4 - ( k - 3 ) ) ( k + 1 ) ( k - 1 ) 2 2 k 2 - 2 k + 3 ( 10 )
    If D.sub.i+D.sub.o≤100%. D.sub.o can be solved as:

    (74) D o = 4 P out f s L r ( k - 1 ) N 2 V 2 2 k ( k + 3 ) k 2 - 2 k + 3 ( 11 )

    (75) Fifth 1805, we use another circuit equation to eliminate the leakage inductance error due to the current changing.

    (76) Due to the fact that the leakage inductance of the transformer is always changing due to the current, to modify the inductance in the predicted equations, the control block in FIG. 6 is designed to compensate for the inductance error of the transformer. The leakage compensation circuit equation will correspond to the transformer utilized in the design.

    (77) Sixth 1806, we implement the phase-shift ratio Di and Do to gate control circuits for the node 100.

    (78) The overall circuit level control is illustrated in FIG. 7. In the island mode, idc_ref is calculated by the voltage loop. When in grid-connected mode, idc_ref is calculated by the power loop. The power reference is determined by the system layer control.

    (79) Thus, we end up with FIG. 7 as the block diagram of Model-based Predictive Dual-Phase-shift Control 1800 for a Dual-Active Bridge stage.

    (80) 2) Condition Monitoring and Layered, Energy-Predictive Control

    (81) A general structure of the hierarchical control strategy is shown in FIG. 8. A hierarchical control strategy, including battery 32 condition monitoring and energy prediction, are presented. This control strategy operates the smart green power node 100 and controlled resources to minimize energy costs. Energy prediction includes both generated energy from solar panels 22 and consumed energy 10 at the residence. The condition of the battery 32 storage is monitored. The storage capacity of batteries 32 is diminished with time, rates of charge or discharge, amounts of energy stored within them, and excessive voltages. The health of batteries 32 represents this capacity and the conditions the battery 32 can safely operate within. The amount of energy stored in the batteries 32 and the revenue associated with its distribution to the grid must be balanced with the health of the batteries 32 and the cost of their replacement or maintenance. This hierarchical control strategy uses two layers of controls to create accurate and timely predictions; and optimizes battery 32 use in accord with battery 32 state of charge and state of health.

    (82) The energy predictive control 800 includes a primary control 820 that executes algorithms for the physical level 830 of the smart green power node 100 converters. The secondary control 810 gathers information from the internet such as weather predictions and time of use energy costs, creates an operation plan, and sends orders to the primary control 820. The secondary control 810 uses a primary layer 812 algorithm that generates a twenty-four hour operation plan for the power routing circuit 200 based on the time of use, historical use date based on day of the week, and weather forecast. The secondary layer 814 operates at an hourly level to generate operation plans for the next hour based on the primary layer 812 optimization results and solar illumination forecast in fifteen minute periods.

    (83) The controls operate in either grid-connected mode shown in FIG. 9, or a grid-disconnected aka “islanded mode” shown in FIG. 10.

    (84) As shown in FIG. 9 the target of the grid-connected optimization algorithm 900 is to minimize the daily operation expense of the load 40. There are two ways to minimize operation expense: maximizing the photovoltaic panel 22 generation and leveraging the batteries 32 for energy storage.

    (85) The target of the islanded mode 1000 is to maintain the power balance in the system. Namely, this means managing available energy by 300 operating the battery 32 and photovoltaic panels 22 to meet the demands of the residential load 40. It is possible for photovoltaic power to exceed both the storage capacity of the batteries 32 and the load demands 40. In this case, the power from the photovoltaic panels 22 must be limited as through t limited power point tracking methods 23. Control of loads 40, including load shedding, may be used to balance power. The most important goals in islanded mode 1000 are to maximize the power supplying time and minimize the load 40 power shed.

    (86) A general structure of this hierarchical control strategy 800 is shown in FIGS. 8, 16, and 17 and detailed below. The control 800 could be realized through an MCU or microcomputer 300 such as a Raspberry Pi controller. Its secondary control functions 810 include getting information from the Internet, making the operational energy management plan and sending orders to the primary control 820. The primary control can also be realized through a microcontroller 300 but here we used a Digital Signal Processor (DSP) and Advanced RISC machine (ARM). Its functions are the control algorithm of converters in the power router at the physical layer 830.

    (87) As noted, one function of the secondary control 810 is to make the operational plan for the system 100 based on the optimization results. The microcomputer 300 gets information from the Internet and the system 100. The information includes the predicted solar illumination, time of use electricity price, historical day-of-week usage, the battery state of charge, and power flow in the power router.

    (88) A. Grid-Connected Mode

    (89) The target of the grid-connected optimization algorithm 800 is to minimize the daily operational expense. Therefore, there are two ways to minimize operation expense: maximizing the PV 22 generation and daily cycling of battery 32. Considering the fluctuation of solar illumination, the optimization has two layers. The primary layer 812 is at a single day level making a twenty-four hour operational plan for the power router 100 based on the time of use (TOU) electricity price, historical usage data and weather forecast. The secondary layer 814 is at an hourly level making the operational plan for the next hour based on the primary layer optimization result and solar illumination forecast in fifteen minute periods.

    (90) i. The Primary Layer

    (91) For Grid-connected mode, the Primary layer's objective function of the daily operation plan is calculated as follows:

    (92) M = min ( .Math. t = 1 24 P batt ( t ) × TOU - 2 C 30 % Pr ) ( 12 )

    (93) In (12), P.sub.batt(t) is the output power of the battery. TOU is the time of use electricity price. C30% is the cycle life of the battery when the depth of discharge (DoD) of every cycle is 30%. Generally, it will be provided by the battery manufacturer.

    (94) The constraint conditions include:
    SoH×P.sub.batt_min≤P.sub.batt(t)≤SoH×P.sub.batt_max  (13)
    SoH×|P.sub.batt(t)|≤P.sub.dc_max−P.sub.PV  (14)
    60≤SOC≤90  (15)
    SOC(1)=SOC(24)=75  (16)

    (95) SoH is defined as the ratio of actual battery capacity and maximum battery capacity as shown in (17).

    (96) SoH = C batt C max ( 17 )

    (97) It is used to quantify the health condition of battery. Generally, there are two ways to measure the SoH. It could be derived with DoD and life cycle of the battery. FIG. 14 is a typical curve of battery cycle life and DoD. Another way is to use a coulometer to measure the capacity of the battery Cbatt.

    (98) Eq. (13) is the battery output power. P.sub.batt_min is the maximum battery 32 charging power. Eq. (14) is the power balance, considering the PV generation. P.sub.dc_max is the maximum power delivered by the isolated bidirectional DC/DC converter. P.sub.PV is the average PV generation power in one hour. In order to prevent deep discharge that would damage the battery, the battery state of charge (SOC) limitation should be set as shown in Eq. (15). P.sub.batt_max is the maximum battery discharging power. Eq. (16) is the daily SOC balance. The SOC at the end the one day should be equal to the SOC at the beginning of the next day. The calculation of real time SOC is shown in Eq. (18)

    (99) SOC ( t ) = SOC ( 1 ) + .Math. i = 1 t i ( i ) × V b ( t ) × K ( 18 )

    (100) K is a factor determined by the battery capacity C.sub.batt and rated voltage V.sub.batt. It could be derived as shown in Eq. (19).

    (101) 0 K = 3.6 C batt × V batt ( 19 )

    (102) The optimization could be realized through a genetic algorithm (GA) or particle swarm optimization (PSO) algorithm. The optimization results are the output power of the battery at every hour.

    (103) ii. The Secondary Layer

    (104) The secondary layer 814 considers the fluctuation in one-hour periods. It aims at achieving power balance over one hour. The main control unit 300 (MCU) obtains the solar illumination and temperature for the next four quarter hours.

    (105) Because the TOU in one hour generally remains constant, the total electricity expense during this hour is constant. The main duty of the secondary layer 814 is to minimize the fluctuation of battery 32 output power. The objective function of the hourly operational plan is as follows:

    (106) M = min .Math. t = 1 4 ( .Math. "\[LeftBracketingBar]" P batt ( t ) - P batt .Math. "\[RightBracketingBar]" ) ( 20 )

    (107) In Eq. (20) P.sub.batt is the average power in this hour. It is the result of the Primary layer. P.sub.batt′(t) is the battery output power every quarter hour. The constraint conditions include:

    (108) P batt_min P batt ( t ) P batt_max ( 21 ) .Math. "\[LeftBracketingBar]" P batt ( t ) .Math. "\[RightBracketingBar]" P dc_max - P PV ( 22 ) .Math. t = 1 4 P batt ( t ) 4 = P batt ( 23 )

    (109) Eq. (21) is the limitation of battery output power. Eq. (22) is the limitation of PV. Eq. (23) conveys that the average power in one hour should be equal to the daily operation plan.

    (110) B. Islanded Mode

    (111) In islanded mode, the control target is to maintain the power balance in the system.

    (112) In islanded mode, the PV power should be limited when more power is generated than what is consumed by the loads and the battery. Thus, the Perturbation &(Observation (P&O) based Limited Power Point Tracking (LPPT) control algorithm is utilized.

    (113) The basic working principal is as shown in FIG. 15.

    (114) In FIG. 15, the maximum power of the solar cell P.sub.P_max could be expressed as in Eq. (24)

    (115) P P_max = { P load - P B_max ; SOC < 90 P Load ; SOC 90 ( 24 )

    (116) In Eq. (24), P.sub.Load is the load power. P.sub.P_max is the maximum charging power of the battery.

    (117) 3) Energy Market Controls

    (118) Coordinated Grid-Edge Power Control

    (119) As an overview, FIGS. 11 and 13 show how most grid 10 infrastructure is designed to distribute power from a centralized generator to many loads 40. Generation and distribution of power at the edge of the grid 10, at the conventional site of consumption, presents new issues. The use of many smart green power node 100 devices is an example of a collection of grid-edge devices. The issues requiring attention are: 1) over-voltage of the grid 10, 2) excessive back-feeding of power into the grid 10, 3) balanced power management for the smart green power node 100 devices working together, 4) fair compensation for the operation of these smart green power node 100 devices as a collective, and 5) the communication and coordination of these smart green power node 100 devices.

    (120) Control of this community of smart green power node 100 devices maximizes total photovoltaic panel 22 power within the constraints of voltage range, grid back-feeding limits, and ensured fair demands of the smart green power node 100 devices.

    (121) FIGS. 11 and 13 illustrates a configuration of a community 1100 of smart green power node 100 devices. The community 1100 consists of different houses 40 connected at several points on secondary feeders 1120, and connecting to the grid 1110 through one step-up/step-down distribution transformer 1130.

    (122) An arbitrary portion of residences use a smart green power node 100. The community of residences 40 with and without smart green power node 100 devices are connected to the grid 10 through secondary feeders 1120 and a distribution transformer 1130. Power flow may be between residences 40, from the grid 10 into the residences 40, or from the residences 40 into the grid 10 for reverse power flow operation. The power sent to the grid 10 comes from on-site resources, here, photovoltaic 22 and batteries 32. Usually output power of a photovoltaic panel 22 system is controlled by a maximum power point tracking mechanism in the inverter. Maximum power point tracking may cause over-voltage, if not controlled pro-actively. As a result, multiple photovoltaic system 22 may make contributions to over-voltage at the same point of the secondary feeders 1120. If the power points of these photovoltaic systems 22 are determined in a coordinated way, then over-voltage will occur with a much lower probability. Reverse power flow operation is subject to two constraints: 1) the input voltage level of step-up operation must be controlled strictly within ratings to ensure a safe voltage level at the output side; 2) the reverse power flow needs to be controlled so that it does not damage the distribution transformer 1330. As a result, a threshold must be set for the reverse power flow, and the voltage levels at both sides of the transformer 1130 must be maintained within ratings.

    (123) Utilities compensate users for power supplied to the grid 10. In this community of smart green power node 100 devices, coordination is required to fairly share both the power supplied to the grid 10 and compensation from the utility to the suppliers. The total surplus power that can be supported by the grid is limited due to constraints of voltage and reverse power flow. The fair allocation strategy is determined based on the power rating of on-site resources for each smart green power node 100 device. The share of surplus power is proportional to the size of the generation power from each smart green power node 100 device. If a smart green power node 100 device and on-site resources have a larger generation capacity, it is allocated with a larger share of surplus power. This strategy provides a user with a larger investment in capacity with a proportionally higher revenue.

    (124) The coordination power control consists of a central controller 1150 to coordinate the nodes 100 and the corresponding power points of all the photovoltaic systems 22. It is co-located with the transformer where a smart meter 1145 is added to work together with the central controller 1150. This central controller 1150 needs to communicate with all smart green power node 100 devices. A simple communication pathway is implemented either through the secondary feeders 1120 or an alternative system such as a wired or wireless internet protocol. Through the downlink message flow 1160, the central controller 1150 announces the power point to each smart green power node 100 device respective to the fair weight. The uplink message flow 1170 reports the status of each smart green power node 100 device. Through the communication, the smart green power node 100 device sends status information such as the voltage and power of a user which can be measured by residence level smart meters to the central controller 1150. The central controller 1150 determines the power point of each photovoltaic system 22 and then sends such information hack. Once the smart green power node 100 receives a power point, it executes a power point tracking algorithm to set the output power.

    (125) For layered energy prediction control, in the second layer 814, the Maximum Power Point Tracking (MPPT) is extended to Coordinated Grid-Edge Power control 1150, when considering an ensemble of SGPN devices 100 in the community. Coordinated grid-edge power control 1150 involves the set of optimization algorithms to prevent over-voltage and excessive back-feeding power into the electric power grid.

    (126) Coordinated grid-edge power control is formulated as an optimization problem that maximizes total output power of PV systems subject to the constraints of voltage range, reverse power limit, and fairness. Considering a community 1100 populated along a secondary distribution feeder 1120 after the distribution transformer 1130, a number of users distributed at different locations are connected to the grid through SGPN devices 100 at different connection points. In such a community, the power now is bidirectional. The bidirectional function allows the users to use the power from the grid and send power to the grid from on-site resources (PV and batteries). Sending power to the grid from on-site resources is called “reverse power flow operation”.

    (127) Once the SGPN 100 receives a power point, it executes a power point tracking algorithm to track the output power, and the same power tracking algorithm as that in MPPT can be employed. The difference is that due to the small power transfer and the multiple points of calculation, the computation is much faster. Since the power point is known to the tracking algorithm, the tracking process converges much faster than the entire process of MPPT. For the SGPN 100 devices in the community, the central controller 1150 and the SGPN 100 devices are connected via a wireless network. The delay associated with the communication is critical to the coordination of power control, and, for that reason. WiFi or Zigbee are considered to minimize the communication delay. A two-layer hierarchical wireless network is recommended.

    (128) The optimal algorithm formulation for the coordinated grid-edge power control is as follows: the set of users with SGPN 100 is
    N.sub.1={1, . . . ,n},
    and the set of users without SGPN along the feeder are indexed by the set of
    N.sub.2={n+1, . . . ,m}.

    (129) All connection points in the secondary feeder are
    N=N.sub.1+N.sub.2={1, . . . ,m}.

    (130) The admittance between the connection points, i and j are denoted by y.sub.ij, the admittance matrix of the entire distribution feeder
    Y=[yij]i,j∈N.

    (131) Let V be the voltage vector of all the connection points, where
    V.sub.i=|V.sub.i|<θ.sub.i,
    and θ.sub.i is the phase angle. The complex power is
    S.sub.i=P.sub.i+jQ.sub.iS.sub.i=P.sub.Gi−P.sub.Li+j(Q.sub.Gi−Q.sub.Li).
    where P.sub.Gi and Q.sub.Gi are the active and reactive powers from on-site resources, and P.sub.Li and Q.sub.Li are the active and reactive powers for the loads in the houses. When P.sub.i>0, the SGPN.sub.(i) is injecting power to the grid. When P.sub.i<0, the power is flowing from the grid to the loads, and part of it is being used to charge the batteries on-site through the SGPN.sub.(i) device.

    (132) When the output power of all PV 22 systems is maximized, the power pulled from the grid 10 is minimized. The objective of the optimization problem is to determine the power points of all PV 22 systems such that the power from the grid 10 is minimized. The objective function: .sub.{PG}.sup.minP.sub.O, where P.sub.O is the power pulled from the grid and P.sub.G is the vector of powers generated by the n SGPN 100 devices in the community.

    (133) Moreover, the objective function needs to consider constraints of voltage, reverse power flow and fairness. For the voltage constraint, to ensure the proper operation of the overall community 1100 system, voltages at all connecting points of all users need to be maintained within rating. Given the voltage rating [V.sub.min, P.sub.max], the voltage at each connection point is constrained as
    V.sub.min+Δ.sub.V.sup.lb≤|V.sub.i|≤V.sub.max−Δ.sub.V.sup.ub
    where Δ.sub.V.sup.lb and Δ.sub.V.sup.ub are small values to keep |V.sub.i| from actually reaching the lower limit V.sub.min and the upper limit V.sub.max.

    (134) For the reverse power flow control constraint, there are two purposes, one is to prevent the step-down transformer 1150 from being overloaded. The other is to provide a flexible fine-tuning mechanism for the grid company to control the amount of power flow from distributed generators (PV systems 22 and battery banks 32). The constraints can be applied to both active and reactive power. The following constraint is the active power is P.sub.O≥P.sub.O.sup.lb, where P.sub.O.sup.lb the lower bound for the power flowing from the grid. To protect the transformer, P.sub.O.sup.lb must be set to a value much smaller than the power rating of the transformer P.sub.O.

    (135) For the fairness constraint, the surplus power that can be generated by the SGPN device 100 determines the revenue for the customer's on-site resources. However, the total surplus power that can be supported by the grid 10 is limited due to constraints of voltage and reverse power flow. Thus, the surplus power must be shared by different SGPN devices 100 in a fair way. The fair allocation strategy is determined based on the power rating of on-site resources for each SGPN device as an example. The share of surplus power is proportional to the size of the generation power from each SGPN device
    P.sub.i=k.sub.ic.
    where k.sub.i is the size ratio of i-th SGPN generation capacity, and c is total surplus power. Thus, if i-th SGPN has a larger generation capacity, it is allocated with a larger share of surplus power. This strategy is reasonable, because a user with a larger investment potentially receives a higher revenue. Suppose a user's load is P.sub.Li, the maximum output power of the i-th SGPN device is P.sub.Gi.sup.max, then the surplus power allocated to this user is limited by P.sub.Gi.sup.max−P.sub.Li. Thus, the fairness constraint is
    P.sub.i=min{(P.sub.Gi.sup.max−P.sub.Li),k.sub.ic},c≥0.
    4) Cybersecurity

    (136) A further improvement is the cybersecure smart green power node 100 which is designed around cybersecurity. This security protects data and resources on three different levels: network and external communication, internal communication, and system operation.

    (137) i. Network and External Communication

    (138) Network traffic from the cybersecure smart green power node 100, other devices, and a utility provider uses a robust set of protocols such as Distributed Network Protocol 3. This set of communication protocols is commonly used by supervisory control and data acquisition systems, Remote Terminal Units. and Intelligent Electronic Devices. It provides a reliable means of transmitting data, but security is not provided within this set of protocols. The cybersecure smart green power node 100 encrypts messages and commands that are then communicated using distributed Network Protocol 3. There cybersecure smart green power node 100 therefore provides security while using distributed Network Protocol 3.

    (139) Security features are also built into the communication network created by the cybersecure smart green power node 100. Authorized peers are listed on an internal whitelist. This whitelist is installed on the firmware, and might be updated later by an authorized party. All connections require two-way authentication. Identity can also be verified by a blockchain within a network of cybersecure smart green power node 100. The network created by various cybersecure smart green power nodes 100 is segmented. This segmentation minimizes damage caused by a breach of information. The segmentation also lowers the overhead of traffic within a segment.

    (140) A security module run by the processor 300 inside the cybersecure smart green power node 100 provides many security features. The features relevant to network and external communication are reporting, diagnostics, forensics, command parsing, and authentication. These are features possibly used by a supervisory control and data acquisition systems system to have visibility and control of a cybersecure smart green power node 100. This security module is able to operate during many conditions where the remainder of the cybersecure smart green power node 100 is shutdown or offline. The security module can report the status of the cybersecure smart green power node 100, data collected, the status of various internal subsystems, and network information. The security module is able to run diagnostics on firmware, power electronics, and controls. A log of data can be reported to aid in forensic analysis of system faults, attacks, or other events. The security module can analyze commands sent to the cybersecure smart green power node 100, and filter erroneous or malicious commands. Finally, the cybersecure smart green power node 100, via the security module, is able to process network blockchains, even if other submodules are shutdown or offline.

    (141) ii. Internal Communication

    (142) All internal, digital signals are encrypted. All submodules have unique identifiers, and require authentication before operation. Aside from the initial handshake, no digital communication occurs unless both the sender and receiver are authenticated. After this authentication, all communication that is susceptible to probing or side-channel attacks is encrypted.

    (143) iii. System Operation

    (144) The submodules—the various controllers and converters—are authenticated independently prior to operation. This independent authentication is done by the security module. The security module checks the firmware integrity of the submodules. The identity of the submodules can be verified by the security module and be verified by a blockchain with network peers. If a submodule tails authentication, firmware integrity checks, or diagnostics, it can be locked out and prevented from operation. The remainder of the cybersecure smart green power node 100 can continue operation, assuming the submodule is not necessary.

    (145) Alternative Module Overview

    (146) DC-DC Converter

    (147) Dc-dc converters are used to control a) unidirectional power flow from the photovoltaic (PV) panels to the low voltage bus, b) bidirectional power flow between the batteries and the low voltage bus, and c) bidirectional power flow between the low voltage bus and the high voltage bus.

    (148) Isolated Bidirectional DC-DC Converter

    (149) The dc-dc converter that controls bidirectional power flow between the low voltage bus and the high voltage bus is an isolated bidirectional dc-dc converter (IBDC). The IBDC should use a topology that employs phase-shift control, such as dual active bridge.

    (150) DC-AC Converter

    (151) A dc-ac converter is used to control power flow between the high voltage bus and the grid.

    (152) Energy Storage

    (153) Various devices, such as a battery bank, can be used as energy storage. The energy storage receives and discharges its power onto the low voltage dc bus of the CSPR through a dc-dc converter. Grid power and PV power can be stored in the energy storage. The usable life of this storage may be extended if the storage is charged or discharged at certain rates, and held between certain states of charge. If batteries are used for the energy storage, battery health monitoring may be employed to control the energy storage. In case of a loss of grid power, the energy storage may be discharged to provide an uninterruptible power supply for the ac load. In case of valley filling of grid power, the batteries may be charged to increase the load of the grid.

    (154) Power Router

    (155) A system of dc-dc converters, a dc-ac converter, and relays are used to move power between PV panels, energy storage, the grid, and loads. PV panels deliver power to the low voltage dc bus through a unidirectional dc-dc converter. This unidirectional dc-dc converter uses Maximum Power Point Tracking or Limited Power Point Tracking to control power flow. Energy storage stores or discharges power to and from the low voltage bus through a bidirectional dc-dc converter. This bidirectional dc-dc converter uses Predictive Economic Optimization or emergency modes of operation to control power flow. The high voltage dc bus or low voltage dc bus could provide an extension interface to a dc link, such as dc microgrid or other dc application. A dc-ac converter controls power flow between the high voltage bus and an external distribution board. Relays allow or prevent power flow between the load (or loads) and the distribution board. Relays also allow or prevent power flow between the grid and the distribution board.

    (156) Concurrent Hardware Architecture for Controllers

    (157) Hardware control and any other operation are processed by concurrent, not sequential, computation. This can be accomplished by a primary controller on one processor, and ancillary operations processed by an ancillary processor. The primary and ancillary operations could be processed on one device, if and only if those operations are concurrent.

    (158) Control Coordination

    (159) The controls of the converters coordinate to balance power flow and direction in the CSPR. This coordination allows different control strategies, such as Predictive Energy Optimization or the CSPR acting as an uninterrupted power supply.

    (160) Emergency Backup Operation

    (161) The CSPR is able to use energy from energy storage and power from the PV panels to supply power to the ac load. This operation may require the distribution board to be locked out from the grid by opening a set of switches.

    (162) Failsafe Operation of Controls

    (163) Grid Edge Power Control, Emergency Backup Operation, certain statuses of converters and hardware, or other events may cause the failsafe operation of one or more controls. This failsafe control prevents other forms of operation, such as Predictive Energy Optimization.

    (164) Limited Power Point Tracking

    (165) Limited Power Point Tracking (LPPT) can be used by a dc-dc Converter to set a limited amount of power flow from the PV panels. When there is no limit for the power flow, the PV generation system will work under Maximum Power Point Tracking (MPPT) mode.

    (166) Model-Based Predictive Dual-Phase-Shift Control (MPDPC)

    (167) As understood from FIG. 22, an isolated bidirectional dc-dc converter model specifies the input-output relationship of the currents and voltages. A discrete-time model is derived from the continuous-time model to predict the system's future behavior. A Lagrangian function is derived to determine the optimized phase-shift ratio of the input and output of the dc-dc converter. The Lagrangian function and predictive continuous-time-model are used to find the outer phase-shift ratio, Do. The phase-shift ratio Di is used to control the operation of the dc-dc converter.

    (168) Coordination Grid Edge Power Control

    (169) FIG. 23 shows how network communication and grid voltage can be used by the CSPR to control, partly or fully, grid edge power. Sites of various type, such as residences, commercial buildings, industrial plants, etc., are connected to the grid through secondary feeders, a distribution transformer, a circuit breaker and switches. These sites may or may not have a CSPR. Power flow may be between sites, from the grid into the site, or from the site into the grid (reverse power flow operation). The power sent to the grid comes from the on-site resources, such as energy storage and PV panels. Network communication and a utility grid supervisory computer can be used to set the amount of power flow for each CSPR.

    (170) Generation Prediction

    (171) Weather data, location, time of year, physical orientation, efficiency, and other details can be used to predict on-site energy generation. This energy can be generated by PV panels, wind turbines, generators, or other sources. The energy generation prediction can be used in an optimization of energy use.

    (172) Load Prediction

    (173) Time of year, weather prediction, and the history of energy usage can be used to predict on-site loads. The load prediction can be communicated to the grid and used in an optimization of energy use.

    (174) Time of Use Pricing

    (175) lime of Use pricing from a utility can be internally stored for a year or communicated through a network (e.g. SCADA) connection. This pricing list can be used in an optimization of energy use.

    (176) Battery Health Monitoring

    (177) The storage capacity of batteries diminished with time, rates of charge or discharge, amounts of energy stored within them, and excessive voltages. Battery Health Monitoring uses sensed battery voltages and currents to inform models of the batteries. Sensed battery voltages and currents can also be used by the dc-dc converter controls to prevent or control operations of the batteries.

    (178) Predictive Economic Optimization

    (179) FIG. 24 shows how the Generation Prediction and Load Prediction are summed to create a net energy prediction. The net energy prediction, Time of Use Pricing, and Battery Health Monitoring are constrained by system capabilities. Cost functions are created from these constrained sets. These cost functions and the possible ways of dispatching or storing energy are evaluated by an optimization algorithm. This optimization algorithm finds the most economic method to dispatch or store energy. This method of energy dispatch or storage sets the direction power flow through the dc-dc converters and dc-ac converter. Events, such as emergency backup operation, can interrupt predictive economic optimization operation. Economic optimization operation can be interrupted by various events, including the CSPR acting as an emergency power supply.

    (180) Network Communication

    (181) Network communication allows control of the CSPR by an outside entity, such as a user or power utility. The network may use Ethernet, cellular communication, wireless, or other physical layers. This network communication might use standard communication protocols, such as Modbus or IEC 61850. Payloads of data are encrypted, and are decrypted by the CSPR. Error detection is used to check the integrity of packets of communicated data. Communicated commands are validated before execution.

    (182) Error Detection

    (183) Error detection, such as a cryptographic hash function, is used to check the integrity of received communications.

    (184) Command Validation

    (185) FIG. 25 the shows how received commands are evaluated before execution. The command is checked for syntax errors. The command is evaluated in a system model to determine the expected outcome. If the outcome is part of an approved set, it is then executed.

    (186) Encrypted Communication

    (187) IS FIG. 26 shows the process overview for how all network communication payloads from CSPR are encrypted.

    (188) Encrypted Internal Communication

    (189) All internal communication is encrypted. This includes EEPROM memory access and communication between processors.

    (190) Firmware Integrity Check

    (191) FIG. 27 then shows how error-detection is used on all firmware prior to flashing. A cryptographic hash function is generated from the firmware and compared against the stored hash value. If valid, the firmware is flashed onto the controller.

    (192) From the foregoing, it will be seen that this invention well adapted to obtain all the ends and objects herein set forth, together with other advantages which are inherent to the structure. It will also be understood that certain features and subcombinations are of utility and may be employed without reference to other features and subcombinations. This is contemplated by and is within the scope of the claims. Many possible embodiments may be made of the invention without departing from the scope thereof. Therefore, it is to be understood that all matter herein set forth or shown in the accompanying drawings is to be interpreted as illustrative and not in a limiting sense.

    (193) When interpreting the claims of this application, method claims may be recognized by the explicit use of the word ‘method’ in the preamble of the claims and the use of the ‘ing’ tense of the active word. Method claims should not be interpreted to have particular steps in a particular order unless the claim element specifically refers to a previous element, a previous action, or the result of a previous action. Apparatus claims may be recognized by the use of the word ‘apparatus’ in the preamble of the claim and should not be interpreted to have ‘means plus function language’ unless the word ‘means’ is specifically used in the claim element. The words ‘defining,’ ‘having,’ or ‘including’ should be interpreted as open ended claim language that allows additional elements or structures. Finally, where the claims recite “a” or “a first” element of the equivalent thereof, such claims should be understood to include incorporation of one or more such elements, neither requiring nor excluding two or more such elements.