Solar energy generation requires photovoltaic (PV) systems to be optimised, regulated, and simulated with efficiency. The performance of PV systems is greatly impacted by the fluctuation and occasionally restricted accessibility of model parameters, which makes it difficult to identify these characteristics over time. To extract the features of solar modules and build highly accurate models for PV system modelling, control, and optimisation, current-voltage data collecting is essential. To overcome these difficulties, the modified particle swarm optimization rat search algorithm is presented in this manuscript. The modified rat search algorithm is incorporated to increase the PSO algorithm’s accuracy and efficiency, which leads to better outcomes. The RSA mechanism increases both the population’s diversity and the quality of exploration. For triple diode model of both monocrystalline and polycrystalline, PSORSA has showed exceptional performance in comparison to other algorithm i.e. RMSE for monocrystalline is 3.21E-11 and for polycrystalline is 1.86E-11. Similar performance can be observed from the PSORSA for four diode model i.e. RMSE for monocrystalline is 4.14E-09 and for polycrystalline is 4.72E-09. The findings show that PSORSA outperforms the most advanced techniques in terms of output, accuracy, and dependability. As a result, PSORSA proves to be a trustworthy instrument for assessing solar cell and PV module data.