The car's ECU stores the unique identity number of each valve. When a valve is replaced, the new identity number has to be programmed into the ECU, however, on some models the car "self-learns" simply by being driven.