The critical density of a freeway link is subject to changes over time owing to such circumstances as environmental conditions (snow, rain, etc.) and traffic incidents. Because of the critical density impacts on the performance of some ramp metering strategies that make use of it as a threshold value for control action, it is necessary to trace the real value of critical density. This paper presents improvements to the methodology for the online estimation of critical density using the extended Kalman filter (EKF) proposed by Ozbay et al. (2006) . Basically, critical density and density of the freeway section are chosen as the state variables to be determined using the system output, namely the measurement of traffic flow and occupancy on the downstream freeway link. The effectiveness of the proposed method is evaluated using the feedback-based ramp metering strategy ALINEA . A number of simulations are run to investigate the sensitivity of the proposed methodology with respect to initial estimates and time step size selection. Also, the methodology's capability of tracking gradual and sudden changes in real-time critical density is examined. This new methodology provided successful performances based on the macroscopic simulation evaluation using MATLAB.