In this paper we designed a control system of gas flowrate.Applying thermal mass flowmeter to measure gas mass flow directly.Using AT89S51 as CPU of the system and built a fuzzy controller.We also discussed the hardware and software design of the system.