Standalone (off-grid) renewable energy systems supply electricity in places where there is no access to a standard electrical grid. These systems may include photovoltaic generators, wind turbines, hydro turbines or any other renewable electrical generator. Usually, this kind of system includes electricity storage (commonly lead-acid batteries, but also other types of storage can be used). In some cases, a backup generator (usually powered by fossil fuel, diesel or gasoline) is part of the hybrid system. The modelling of the components, the control of the system and the simulation of the performance of the whole system are necessary to evaluate the system technically and economically. The optimization of the sizing and/or the control is also an important task in this kind of system.