In a SDNaSch model, vehicles tend to brake sharply, leading to an inherent safety risk cellular automata based on defensive driving, considering the deceleration behavior of the preceding vehicle before the braking process. A numerical simulation is performed to determine the flow-density relationship, average speed-density relationship, emergency brake ratio-density relationship and space-time diagram under different defensive deceleration probabilities, and the safety and stability of the defensive driving model are analyzed. The results show that the use of the defensive driving model improves the traffic flow in the medium-high density area, delays the occurrence of static congestion, considerably reduces the emergency braking behavior of operating vehicles, and improves the stability and safety during transportation. In the medium-high density area, a stable and uniform synchronized flow appears, and the "speed transition" phenomenon consistent with the measured data is observed simultaneously. Compared with the traditional SDNaSch model, the proposed model can better describe the actual running state of the traffic flow.