## 2 System Level Analysis of Proposed Converter
### Converter Global Control  
The global controller should ensure the regulation of the bus voltage at desired value and manage the power sharing among the PMs according to the available power from the different PV modules as well as the state of charge (SoC)/state of health (SoH) of the battery modules. This is to ensure maximum power extraction from all the PVs as well as charge/stress balancing among all the battery modules.  
Figure 2: The proposed modular multiport converter architecture.  
The power sharing of the individual PMs is controlled through controlling the ratio of output voltage that each PM contributes, to the fulfillment of required bus voltage (\(V_{\text{bus}}\)):  
\[P_{\text{bus}}=V_{\text{bus}}I_{\text{bus}}=\sum\
olimits_{i=1}^{n}P_{i},\;P_{i }=I_{\text{bus}}V_{i}\;\forall i=1\ldots n \tag{1}\]  
where \(P_{\text{bus}}\) is the bus power, \(I_{\text{bus}}\) is the bus current, \(n\) is number of PMs, \(P_{i}\) is the power contribution of the \(i\)th PM and \(V_{i}\) is its output voltage which estimated as:  
\[V_{i}=K_{i}\frac{P_{PV_{i}}-\frac{\sum_{i=1}^{n}P_{PV_{i}}-I_{\text{bus}}V_{ \text{bus}}}{n}}{I_{\text{bus}}} \tag{2}\]  
where \(P_{\text{pvi}}\) is the power of the PV-module of the \(i\)th PM and \(K_{i}\) is a sharing factor defined based on the SoC of the module's battery and estimated as:  
\[K_{i}=\frac{nSoC_{i}}{\sum_{k=1}^{n}SoC_{k}}\;\text{and}\;\sum\
olimits_{i=1}^ {n}K_{i}(SoC)=n \tag{3}\]  
The global controller then forwards the module's share of the bus voltage \(V_{i}\) as a reference voltage to the module's local output voltage controller.  
During time periods when the PV power exceeds the load and the batteries should be in charging mode, the PMs which interface to the battery modules with lower SoCs should contribute less to the bus voltage/power (smaller \(V_{i}\)) to allow more PV power to be used for charging their battery modules. On the other hand, PMs which interface to the battery modules with higher SoCs contributes higher voltage/power to the bus to maintain the required bus voltage. As a result, a lower PV power will be directed from their PV modules to their battery modules for slower charging.  
During the time periods when the PV power is lower that the load, the battery modules will be in discharging mode to supply the load power. PMs which interface to battery modules with lower SoCs should contributes less to the bus voltage/power to allow slower discharging while PMs which interface to battery modules with higher SoCs should contribute more to the bus voltage/power to compensate, and this will mean faster discharging and reduction of the SoCs imbalances. Through this strategy, charge balancing can be achieved among battery modules that may be at different SoCs due to batteries capacity mismatching. Balancing of thermal stress among battery modules under mismatched equivalent series resistances (ESR) in the battery cells [30] (which can be significant if there are peak charge/discharge power of the battery) can also be achieved by adapting the energy management strategy accordingly; however, this will not be considered further within this paper.