As one of the key components in sixth-generation (6G) wireless networks, ultra-reliable low latency communications (URLLC) can facilitate the realization of real-time wireless control systems. For such systems, the wireless communication in URLLC scenarios and the control process are no longer independent and jointly affect the overall performance. Therefore, this paper introduces digital twins (DT) to model the wireless control systems and investigates the joint optimization of the communication resources and the control performance. To maintain the control stabilization of DT in the power system while improving the transmission efficiency, we propose a joint beamforming and transmission power optimization algorithm for uplink transmission to minimize the total transmission power. Then we solve the beamforming vector and power by sequential convex approximation method, and optimize them iteratively. The simulation results illustrate that the proposed algorithm can effectively guarantee the stability and transmission efficiency of DT system, and it has better performance than other resource allocation schemes.