This paper describes an Embedded System (ES) for an inverter. In recent years, there is a worldwide interest in Distributed Generation (DG). This is due to the need to integrate renewable energy sources into the Distribution System. This paper proposes the development of a platform to the safe and intelligent management of the DG in the grid. The proposed system requires a platform to integrate, among others, innovative technologies of processing multifunctional, synchronization and communication, in a way that to perform the requirements of DG grid connection. The work here deals with the detection of power quality events, in particular sags, swells, transients and faults. Different statistical estimators have been used (skewness and kurtosis) to enhance characterization of these anomalies. Additionally, a real-time CUSUM algorithm for early detection of these events, have been implemented.