System Description
WARNING: This page is about a different car, the 2004 Lexus ES 330. However, it is still accessible from the selected car via links, so may be relevant.
The ECM uses signals from the vehicle speed sensor to detect the actual gear position (1st, 2nd, 3rd, 4th or 5th gear).
Then the ECM compares the actual gear with the shift schedule in the ECM memory to detect mechanical problems of the shift solenoid valves and valve body.