This paper presents a new mathematical framework for obtaining quantitative safety measure using macroscopic as well as microscopic traffic data. The safety surrogate obtained from the macroscopic data is in terms of analysis performed on vehicle trajectories obtained from the macroscopic data. This method of obtaining safety measure can be used for many different types of applications. The safety surrogate for the traffic dynamics are developed in terms of a new concept of Negative Speed Differentials (NSD) that involve a convolution of vehicle speed function obtained from vehicle trajectories and then performing the integration of the square of the output for its negative values. The framework is applicable to microscopic traffic dynamics as well where we can use car following models for microscopic dynamics or the LWR model for macroscopic dynamics. This paper then presents the use of this new safety surrogate on the development of a feedback control law for controlling traffic in work zones using Dynamic Message Signs. A hybrid dynamics model is used to represent the switching dynamics due to changing DMS messages. A feedback control design for choosing those messages is presented as well as a simple simulation example to show its application.