Fault diagnostic methods with fuzzy logic methods, SVM, KNN and artificial intelligence systems have been used in complex systems such as wind turbines, gas turbines, power distribution systems, power transformers and rotary machines, but in the specific field of distributed control systems, the vacancy of this topic is strongly felt. Due to the need of the industry to detect faults quickly and in a timely manner in all modes of sensors, actuators, outputs and control logics to maintain expensive, valuable resources, important and complex equipment, it is very necessary to enter this topic. In this paper, a suitable theoretical and practical basis for diagnosing various types of faults in the DCS of a gas refinery is done. The fact that the operator quickly identifies the area and the cause of the fault can avoid huge losses in terms of downtime. Automation of fault diagnosis in DCS has not been explicitly mentioned in any article or book, and here the plan is presented for the first time. In this design, we connect MATLAB classification apps to the industrial system like DCS, then data are analyzed by SVM and KNN methods to detect faults. The results show that faults can be detected with a probability of more than 85% accuracy without the need for on-site expert force and with much less time.