Current trends in global energy production indicate that renewables will continue to increase their market share due to continuous efficiency improvements and cost reductions. Power converters constitute the interfaces that enable energy transfers in microgrids between sources, storage and loads, playing a fundamental role in their operation. These devices are required to meet particular efficiency, robustness and stability requirements to guarantee a proper operation. The present work is focused on two particular problems present in the operation of power converters: control and observation. These problems are hard to solve because of the nonlinearities and complex behaviors present in power converters. The mathematical model used to represent power converters is the switched system. Based on this model we take elements from subjects like Lyapunov stability, the method of moments, algebraic geometry and direct filtering, and propose novel approaches to control and observation of switched systems. We introduce moment relaxations of switched systems. These representations allow to obtain models where the switching input is mapped to a moment space. This map removes the nonlinearity associated to the switching input and yields a model which is more suitable for performing numerical computations. This is the fundamental idea in the proposed parameter-varying control method. After computing a control signal for the relaxed model, the control signal for the switched system can be recovered. This approach has shown good performance with respect to reference tracking and stability. A data-driven approach for the observation of switched systems is proposed. This method involves the design of a direct filter that computes worst-case bounds on the estimation error. This method is applied to the case of power converters operating in continuous and discontinuous modes. A practical implementation is described, and its performance is compared with other estimation approaches.