A Reinforcement Learning Approach for Frequency Control of Inverted-Based Microgrids