Studies on the biomedical sensor techniques for real-time and dynamic monitoring of respiratory gases, CO2 and O2