Use the text above how does an airbag work and why does it have to work so quickly?

An airbag is a safety feature in automobiles designed to protect occupants during a collision. It works by rapidly inflating and deflating using a combination of sensors, a crash sensor, and an inflator.

When a collision is detected, the sensors send signals to the crash sensor, which quickly analyzes the severity and type of impact. If the crash sensor determines that an airbag deployment is necessary, it triggers the inflator to generate a controlled explosion. This explosion ignites solid propellant, which produces a large volume of gas, typically nitrogen or argon, within milliseconds. The gas rapidly fills the airbag, causing it to inflate and create a cushioning barrier between the occupant and the vehicle's hard surfaces.

The airbag needs to work quickly to provide protection to the occupants. This is because during a collision, the occupants in the vehicle experience rapid deceleration, where their bodies continue moving forward at the same speed as the vehicle before the impact. The airbag's function is to reduce this acceleration and deceleration by extending the time of the collision. By instantaneously inflating, the airbag softens the impact, allowing the occupant's forward momentum to slow down more gradually and reducing the force exerted on their bodies.

If the airbag didn't work quickly, the occupant's body would collide with the vehicle's hard surfaces before the airbag could fully deploy, greatly increasing the risk of injuries like head, neck, or chest trauma. Therefore, the rapid inflation of the airbag is crucial to maximize its effectiveness in preventing serious injuries during a collision.