Modeling of the magnetic field errors of RFX-mod upgrade