It is necessary to predict solar photovoltaic (PV) output and load profile to guarantee the security, stability, and reliability of hybrid solar power systems. Severe frequency fluctuations in hybrid solar systems are expected due to the intermittent nature of the solar photovoltaic (PV) output and the unexpected variation in load. This paper proposes designing a PID controller along with the integration of a battery energy storage system (BESS) and plug-in hybrid electric vehicle (PHEV) for frequency damping in the hybrid solar power system. The solar PV output is predicted with high accuracy using artificial neural networks (ANN) given that solar irradiance and cell temperature are inputs to the model. The variation in load is also forecasted considering the factors affecting the load using ANN. Optimum values of the PID controller have been found using genetic algorithm, particle swarm optimization, artificial bee colony, and firefly algorithm considering integral absolute error (IAE), integral square error (ISE), and integral time absolute error (ITAE) objective functions. IAE, ISE, ITAE, Rise time, settling time, peak overshoot and maximum frequency deviation have been measured for comparison and effectiveness. The transient behavior has been further improved by utilizing the power from BESS/PHEV to the power system. The results demonstrate the efficacy of the suggested design for frequency control using the genetic algorithm method along with ISE objective function compared with those obtained from the conventional, particle swarm optimization, artificial bee colony, and firefly algorithm techniques.