RE:EDIT: Replaced sensor for P1131 now getting P0155 and P1151???
From the Ford Maintenance manual:
The OBD II system monitors virtually all emission control systems and components that can affect tailpipe or evaporative emissions. In most cases, malfunctions must be detected before emissions exceed 1.5 times the applicable 50K- or 100K-mile emission standards. If a system or component exceeds emission thresholds or fails to operate within a manufacturer's specifications, a DTC will be stored and the MIL will be illuminated within two driving cycles.
The OBD II system monitors for malfunctions either continuously, regardless of driving mode, or non-continuously, once per drive cycle during specific drive modes. A DTC is stored in the PCM Keep Alive Memory (KAM) when a malfunction is initially detected. In most cases the MIL is illuminated after two consecutive drive cycles with the malfunction present. Once the MIL is illuminated, three consecutive drive cycles without a malfunction detected are required to extinguish the MIL. The DTC is erased after 40 engine warm-up cycles once the MIL is extinguished.
I think it is a good idea to reset the system when ever you are making changes to the harware:
Idle Air Trim
Idle Air Trim is designed to adjust the Idle Air Control (IAC) calibration to correct for wear and aging of components. When engine conditions meet the learning requirement, the strategy monitors the engine and determines the values required for ideal idle calibration. The Idle Air Trim values are stored in a table for reference. This table is used by the PCM as a correction factor when controlling idle speed. The table is stored in Keep Alive Random Access Memory (RAM) and retains the learned values even after the engine is shut off. A Diagnostic Trouble Code (DTC) is output to indicate that the Idle Air Trim has reached its learning limits.
Whenever an IAC component is replaced or cleaned or a service affecting idle is performed, it is recommended that Keep Alive RAM be cleared. This is necessary so the idle strategy does not use the previously learned Idle Air Trim values.
To clear Keep Alive RAM, refer to PCM Reset in «Section 2». It is important to note that erasing DTCs with a scan tool does not reset the Idle Air Trim table.
Once Keep Alive RAM has been reset, the engine must idle for 15 minutes (actual time varies between strategies) to learn new idle air trim values. Idle quality will improve as the strategy adapts. Adaptation occurs in four separate modes. The modes are shown in the following table.