The incorporation of Renewable Energy (RE) into the conventional standalone power system of an Oil and Gas (OG) platform can result in a significant reduction in operational cost and emissions. Whereas, the penetration of renewables into the conventional power system can cause serious instabilities due to the intermittent nature, especially in the standalone hybrid power systems. Therefore, the flexibility of the conventional power system should be assessed before, to accommodate and compensate for the variable renewable power penetration. In this thesis, a novel method is introduced to economically dispatch the generating units of the Standalone Hybrid Power System (SHPS), while ensuring the power system security. This method considers (a). the efficiency curve of Gas Turbine (GT) to simulate the robust real world scenario, (b). the Rate of Change of Frequency (ROCOF) and Spinning Reserves (SR) constraints to enhance the system security by restricting the frequency deviation during the contingency events, and (c). the flexibility analysis of the conventional standalone power system of an OG platform to access the ability of the power system to accommodate the demand and RE variations. A novel method has been developed and implemented in a Python-based tool, LGridPy. This method adopts the Mixed-Integer Nonlinear Programming (MINLP) technique to minimize the overall operational cost (including fuel, startup, shut-down, and maintenance cost) of the power system for the Economic Dispatch (ED) problem. It uses the MindtPy solver, which leverages the Gurobi solver for the MINLP and the IPOPT solver for the NLP. The new method considers various Key Performance Indicators (KPIs) and flexibility indicators for the power system model, to access the response of the system under different conditions and case studies.