Advanced Control Algorithms and Machine Learning Techniques to Enhance the Resilience of DC/AC Microgrids