The energy demand is increasing due to population growth and economic development. To satisfy this energy demand, the use of renewable energy is essential to face global warming and the depletion of fossil fuels. Photovoltaic energy is one of the renewable energy sources, widely used by several countries over the world. The integration of PV energy into the grid brings significant benefits to the economy and environment, however, high penetration of this energy also brings some challenges to the stability of the electrical grid, due to the intermittency of solar energy. To overcome this issue, the use of a forecasting system is one of the solutions to guarantee an effective integration of PV plants in the electrical grid. In this paper, a PV power ultra short term forecasting has been done by using univariate and multivariate LSTM models. Different combinations of input variables of the models and different timesteps forecasting were tested and compared. The main aim of this work is to study the influence of the different combinations of variables on the accuracy of the LSTM models for one-step forecasting and multistep forecasting and comparing the univariate and multivariate LSTM models with MLP and CNN models . The results show that for one step forecasting, the use of a univariate model based on historical data of PV output power is sufficient to get accurate forecasting with 28.98W in MAE compared to multivariate models that can reach 35.39W. Meanwhile, for multistep forecasting, it is mandatory to use a multivariate model that has historical data of meteorological variables and PV output power in the input of LSTM model. Moreover, The LSTM model shows great accuracy compared to MLP and CNN especially in multistep PV power forecasting.