What is the relationship between oxygen sensors and the car engine performance?

Almost all vehicles manufactured after 1980 have oxygen sensors. A car oxygen sensor on a recent model will be positioned in the engine’s exhaust manifold. It’s a spark plug-shaped mechanism that is a significant component in your vehicle’s emissions control system. It was first introduced in 1976 and was made virtually mandatory on all cars and light trucks built since 1981. Nowadays, with OBD-II regulations, many vehicles are equipped with multiple O2 sensors, some as many as four.
This sensor measures monitor how much unburned oxygen is in the exhaust as the exhaust exits the engine, checking the oxygen content hundreds of times per minute with tremendous accuracy before transmitting the data to your car’s computer. The goal of the sensor is to help the engine run as efficiently as possible and also to produce as few emissions as possible.
A gasoline engine burns gasoline in the presence of oxygen. It turns out that there is a particular ratio of air and gasoline that is perfect for engine cylinder combustion. If this air-fuel ration is higher than the perfect ratio, it implies a lean air-fuel mixture which means that there is excess oxygen. A lean mixture tends to produce more nitrogen-oxide pollutants, and, in some cases, it can cause poor performance and even engine damage. On the contrary, if this ration is lower than the perfect one, then there is too much fuel and it is called a rich mixture. A rich mixture is a waste of fuel and the unburnt fuel creates pollution.
A variety of factors can affect the relative richness or leanness of the fuel mixture, including altitude, air temperature, engine temperature, barometric pressure, throttle position, air flow and engine load. O2 sensor is the master monitor for what’s happening with the fuel mixture and any problems with the O2 sensor can throw the whole system out of whack. To understand this, let’s have a look at how an oxygen sensor works.
First of all, I want to explain to you the meaning of the fuel ‘feedback control loop.’ Actually, the term refers to the process that the computer takes its cues from the O2 sensor and responds by changing the fuel mixture. With the O2 sensor’s input, the computer manages to regulate the fuel mixture. This is referred to as ‘closed loop’, when there’s no signal is received from the O2 sensor, it is an “open loop”. Then problems follow.
Oxygen sensors are essentially chemical generators. They work like a miniature generator and produce its own voltage. For example, by constantly measuring the oxygen content inside the exhaust manifold and comparing it to the air outside the engine, a voltage is generated if the comparison shows little or no oxygen in the exhaust manifold. If the oxygen sensor measures the correct mixture, the voltage drops and an appropriate signal is sent. The fuel injection computer receives the voltage and responds by making necessary adjustments of the overall fuel-air mixture in the engine based on it. The non-stop exchange of signals between the sensor and the computer ensures that the constant adjustments depending on the needs of the engine are made. If the oxygen fails, no voltage signals are received by the fuel injection computer, it ends up guessing, which leads to a rich running engine.