1. A method of controlling corrosion rate of a crude oil refinery process comprising: measuring iron concentration of the crude oil refinery process to establish an initial corrosion rate of the crude oil refinery process; measuring pH of the crude oil refinery process; measuring chloride concentration of the crude oil refinery process; altering the initial corrosion rate of the crude oil refinery process according to the measured pH and the measured chloride concentration and correcting for dynamic state error, thereby determining an altered corrosion rate; comparing the altered corrosion rate to a pre-determined range of acceptable values; if the altered corrosion rate is outside of the pre-determined range of acceptable values, performing a remedial measure to change the altered corrosion rate to a value within the range of acceptable values; and repeating the steps.