Implement discrete PI controller
Motor Control Blockset / Controls / Controllers
The Discrete PI Controller block performs discrete-time PI controller computation using the error signal and proportional and integral gain inputs. The error signal is the difference between the reference signal and the measured feedback. The block outputs a weighted sum of the input error signal and the integral of the input error signal.
You can tune the Discrete PI Controller coefficients (Kp and Ki) either manually or automatically. Automatic tuning requires Simulink® Control Design™ software.