This work presents a new technique based on modulating the IR absorbance of each element in a mixture in a chirped manner to reduce the effect of their partial spectral absorption overlap on the accuracy of determining their concentrations. This Chirped Spectral Modulation CSM algorithm can deal with mixtures containing unknown elements rather than the elements whose concentrations are aimed. This novel algorithm, when compared to existing pattern recognition techniques, makes it easy to analyze the constituents of a mixture with high accuracy in the presence of traces of unknown components. It is found that the new algorithm can detect the presence of gas pollutants such as sulfur dioxide, carbon monoxide, carbon dioxide, nitrogen dioxide in a sample containing many other unknown polluting elements. This new algorithm is tested on air samples composed of predetermined percentages of air constituents and the results of calculations are compared with those of Classical Least Squares CLS pattern recognition algorithm. The comparison showed that the new algorithm can detect down to very small traces of harmful gases such as NO2, and SO2, at least one order of magnitude less than those detected by the CLS approach. Finally, the new algorithm is used to examine collected air samples from an industrial zone, and in the middle and at the exit of a road tunnel in Riyadh area which showed that the percentages of sulfur dioxide, nitrogen dioxide, and carbon monoxide are well below the safe levels.