Cogeneration is a well-known and cost effective solution for generating power and heat within the same plant, leading to improved overall efficiency and reduced generation cost. Combined heating and power systems can facilitate the penetration of renewable energy sources in medium size applications through the integration of electric and thermal energy storage units. Due to the complexity of the plant as well as significantly variability in power demand and generation, the design and operation of such systems requires a systematic co-optimization of plant and controller for guaranteeing near optimal performance. In this scenario, this paper presents a physics-based parametric modeling approach for the characterization of the main components of a 1MW combined heating and power system that includes renewable sources, electric and thermal storage devices. To demonstrate the model flexibility and potential benefits achieved by an optimal sizing, the system energy management is optimized using Dynamic Programming. The operational costs for different configurations are compared showing that an optimization of the energy management strategy in conjunction with an improved system sizing lead to more than 6% of reduction in the operational cost.