Chip junction temperature is a key factor affecting the normal operation of the chip. The development of integrated circuit technology brings about high integration and low cost, but it also puts forward higher requirements for the cooling system. This paper focuses on the air cooling of the chip, builds a hardware test platform based on MCS-52, the general name of the intel series microcontroller unit, and sets up a mathematical model of the air cooling process of the chip on the matlab platform based on the principle of energy conservation, heat transfer theory and finite element method. By proposing the equivalent convective heat transfer coefficient, the thermal resistance of the system can be well estimated. This model can easily realize the joint simulation of chip, heat radiator, and control strategy, which overcomes the disadvantage that traditional finite element simulation software are difficult to combine with control strategy. In addition, based on the model, the proportional integral differential (PID) control parameters are automatically optimized, achieving excellent temperature control effect, and proving the feasibility of optimizing the control parameters through the model.