Renewable energy sources such as wind power and photovoltaic are integrated into the power system in a high proportion and a decentralized manner. Driven by factors such as the privacy of the interests of various power sources, the efficiency of communication and computing and the reliability of transaction security, various forms of power sources are managed and controlled in a decentralized manner. It makes the traditional centralized DC optimal power flow difficult to realize. So, based on Lagrangian algorithm and improving traditional consistency algorithms, a decentralized DC optimal power flow model is proposed. Firstly, the decentralized calculation methods of active power, phase and line active power flow at nodes based on the consensus are presented. Secondly, based on Lagrangian algorithm, an improved DC optimal power flow model considering line constraints is derived. Thirdly, the calculation principle of decentralized DC optimal power flow model is proposed. It consists of two parts: the main iteration and the sub iteration. The main iteration is an iterative process with phase angle as a variable. Sub iteration is a process with Lagrange multipliers as iteration variables and using the Kaczmarz algorithm to prevent non convergence of iterations. Finally, a real system and IEEE14 bus system are taken as an example to demonstrate the accuracy of the proposed method compared to the Matpower and Injection Shift Factors(ISF) method.