This work proposes a control design procedure based on Linear Matrix Inequalities (LMI) for integrating Distributed Energy Resources (DERs) in microgrid systems. Each DER uses local measurements as feedback, so this proposal results in a method to design a decentralized primary control. The dynamic model employed to synthesize such a controller presents an unmeasured state vector, model uncertainties, and random disturbances. To simultaneously deal with all these difficulties while ensuring the closed-loop stability and multiple performance specifications, this work is formulated in terms of a single Lyapunov function. To find this Lyapunov function and synthesize the controller gains, a convex optimization problem that involves LMIs is required to be solved. The controller results in a linear discrete-time output-feedback form, facilitating its implementation. The time-domain simulation of a microgrid system is performed in the software PSCAD/EMTDC with four DERs to validate the control design procedure's effectiveness.