An iterative learning control (ILC) technique based on a quadratic optimal criterion is proposed for temperature uniformity control of a wafer under rapid thermal processing (RTP). The proposed technique is based on a time-varying linear state space model which approximates a nonlinear system along a reference trajectory. For effective use of feedback measurements, it employs a periodically time-varying Kalman filter which is based on an augmented model capable of describing the transition behaviors from one run to next, as well as those from one sample time to another. By retaining the relevant information from previous runs in the Kalman state, the control technique is able to make improvements in the control performance from one run to the next and eventually to converge to a minimum-achievable tracking error despite model error. A simple but effective method for identifying a time-varying linear state space model for the RTP system is also proposed. The performance of the proposed technique is evaluated through a simulation study involving the RTP model processing 8-in. silicon wafers.