Quantum key distribution (QKD) is an ingenious technology utilizing quantum information science for provable secure communication. However, owing to the technological limitations and device non-idealities it is important to analyze the system performance critically and carefully define the implementation security. With an acceleration in the commercial adoption of QKD, a simulation toolkit is requisite to evaluate the functional architecture of QKD protocols. We present a simulation framework to model optical and electrical components for implementing a QKD protocol. The present toolkit aims to model and simulate the optical path of the DPS-QKD protocol with its imperfections and eventually characterize the optical path. The detailed device-level modeling and analysis capabilities of the present toolkit based on Simulink and MATLAB have the potential to provide universal toolkit for practical design and implementation of generalized QKD protocols compared to earlier works. We report a novel work on the implementation of a QKD protocol on Simulink and MATLAB platform. Further, the absence of any modeling framework for DPS QKD and its simplistic optical schematic made it an obvious choice for the authors. We are hopeful that this work will pave way for simulating other QKD protocols from the DPR family.