In this paper a MATLAB/Simulink based generalised electrical equivalent model of Vanadium Redox Flow Battery (VRFB) has been proposed with an objective of interfacing VRFB with renewable energy sources. The impact of practical parameters like flow rate, self discharge, pump power loss and charge-discharge current profile has been considered for analysing VRFB performance. The model involves online estimation of VRFB stack terminal voltage and state of charge (SOC) under different constant current charge-discharge profiles. The accurate estimation of electrical characteristics of VRFB leads to a benchmark for selection of the design parameters of an efficient charge controller taking into account the variability of renewable energy sources. An optimal range of variable electrolyte flow rates for dynamic SOC has been estimated to design suitable flow rate controller. This ensures minimum VRFB system power consumption during charging and maximum power output during discharging which leads to maximum overall VRFB system efficiency. A generic MATLAB library has also been created for optimal design of any generalised VRFB system. A practical 20 Cell 1kW 6h VRFB system has been used for experimental validation of simulation results of the proposed model which shows a very good agreement having maximum error within 0.5% and 0.21% for VRFB cell terminal voltage estimation during charging and discharging respectively. The proposed model of the VRFB system is then applied for interfacing and investigating the performance of a 1kW 6h VRFB with a microgrid system comprising of 10kW Solar PV, local loads and distribution grid.