Realization of active power filter with Model Based Design approach is presented in this paper. The approach adopts different modeling platforms as well as selection of proper hardware for step wise verification and testing. The active power filter model is developed using the Matlab/Simulink platform for single phase. The efficiency of the control algorithms such as synchronous detection method and indirect current control for active power filter is analyzed. Efficient control algorithm is developed by Xilinx system generator which is incorporated into Simulink as Xilinx tool box. Xilinx system generator provides a virtual platform for easy and effective design of the required system models in FPGA (field programmable gate array) design environments. Optimized automatic VHDL code is generated for the control algorithm which is simulated using ISE 13.2 for the generation of switching signals for the control of IGBTs of the active power filter. Suitable compensation signal is generated from the active power filter for the better elimination harmonics to improve the power quality. THD is reduced to a considered value which is able to satisfy the limits of the IEEE standard.