Among distributed energy resources, fuel cells show are particularly promising as they operate on multiple fuels with low to zero emissions, high efficiency (35-60%) and high reliability due to the limited number of moving parts. In this paper, a fuel cell model and control concept are presented for a fuel cell system intended for grid connected operation. First, the physical model of the fuel cell stack is described, to properly represent the slow dynamics associated with the gas flows and the fuel processor operation. Then, a suitable control architecture is presented for the overall system, its objective being to regulate the input fuel flow in order to meet a desirable output power demand, achieving at the same time a near optimal operation of the fuel cells. Then, the power conditioning system, including the DC/DC and DC/AC converters, is presented and typical waveforms are shown from its simulation. The fuel cell system investigated in this paper has a peak power of 1 kW at 50 V and a no load voltage of 95 V. The fuel cell model and its interface to the grid are implemented in Matlab/Simulink