To implement MPC first you need to obtain state space model of the system. suppose it is a Buck converter obtain inductor current capacitor voltage. Let your application might be current ripple reduction, choose discretised model of Inductor current by Forward Euler's discretization. Get the current error and apply switching.
Poondla Dharmendra Kumar dear please explain this in more details " Let your application might be current ripple reduction, choose discretised model of Inductor current by Forward Euler's discretization. Get the current error and apply switching."