A method of detecting ground faults in an energy storage and/or generation system, the energy storage and/or generation system including a direct current "DC" energy storage and/or generation system, a DC bus, a DC-to-alternating current "AC" power conversion system, and an isolation transformer, the DC-to-AC power conversion system including a DC-to-AC bidirectional inverter, the DC bus being connected between the DC energy storage and/or generation system and the DC-to-AC bidirectional inverter, and the isolation transformer being connected between the DC-to-AC bidirectional inverter and an AC power grid, the method comprising: monitoring, by analog conditioning circuitry, a level of a first DC voltage on a positive "+DC" side of the DC bus with respect to ground potential, an unbiased, peak amplitude of a first AC voltage on the +DC side of the DC bus with respect to ground potential, a level of a second DC voltage on a negative "-DC" side of the DC bus with respect to ground potential, and an unbiased, peak amplitude of a second AC voltage on the - DC side of the DC bus with respect to ground potential; generating, by the analog conditioning circuitry, a first DC voltage value corresponding to the monitored level of the first DC voltage on the +DC side of the DC bus, a second DC voltage value corresponding to the monitored amplitude of the first AC voltage on the +DC side of the DC bus, a third DC voltage value corresponding to the monitored level of the second DC voltage on the -DC side of the DC bus, and a fourth DC voltage value corresponding to the monitored amplitude of the second AC voltage on the -DC side of the DC bus; determining, by a programmable processor, whether the first DC voltage value and the third DC voltage value satisfy at least one condition for a DC ground fault within the energy storage and/or generation system, and whether the second DC voltage value and the fourth DC voltage value satisfy at least one condition for an AC ground fault within the energy storage and/or generation system; and having determined that at least one of the respective conditions for the DC ground fault and the AC ground fault is satisfied, generating, by the programmable processor, at least one output signal indicative of detection of one or more of the DC ground fault and the AC ground fault within the energy storage and/or generation system. monitoring, by analog conditioning circuitry, a level of a first DC voltage on a positive "+DC" side of the DC bus with respect to ground potential, an unbiased, peak amplitude of a first AC voltage on the +DC side of the DC bus with respect to ground potential, a level of a second DC voltage on a negative "-DC" side of the DC bus with respect to ground potential, and an unbiased, peak amplitude of a second AC voltage on the - DC side of the DC bus with respect to ground potential; generating, by the analog conditioning circuitry, a first DC voltage value corresponding to the monitored level of the first DC voltage on the +DC side of the DC bus, a second DC voltage value corresponding to the monitored amplitude of the first AC voltage on the +DC side of the DC bus, a third DC voltage value corresponding to the monitored level of the second DC voltage on the -DC side of the DC bus, and a fourth DC voltage value corresponding to the monitored amplitude of the second AC voltage on the -DC side of the DC bus; determining, by a programmable processor, whether the first DC voltage value and the third DC voltage value satisfy at least one condition for a DC ground fault within the energy storage and/or generation system, and whether the second DC voltage value and the fourth DC voltage value satisfy at least one condition for an AC ground fault within the energy storage and/or generation system; and having determined that at least one of the respective conditions for the DC ground fault and the AC ground fault is satisfied, generating, by the programmable processor, at least one output signal indicative of detection of one or more of the DC ground fault and the AC ground fault within the energy storage and/or generation system.