  Constant rise in energy consumption that comes with the population growth and
introduction of new technologies has posed critical issues such as efficient
energy management on the consumer side. That has elevated the importance of the
use of renewable energy sources, particularly photovoltaic (PV) system and wind
turbine. This work models and discusses design options based on the hybrid
power system of grid and battery storage. The effects of installed capacity on
renewable penetration (RP) and cost of electricity (COE) are investigated for
each modality. For successful operation of hybrid power system and electricity
trading in power market, accurate predictions of PV power production and load
demand are taken into account. A machine learning (ML) model is introduced for
scheduling, and predicting variations of the PV power production and load
demand. Fitness of the ML model shows, when employing a linear regression
model, the mean squared error (MSE) of 0.000012, root mean square error (RMSE)
of 0.003560 and R2 of 0.999379. Using predicted PV power production and load
demand, reduction of electricity cost is 37.5 % when PV and utility grid are
utilized, and is 43.06% when PV, utility grid, and storage system are utilized.
