Over the last few decades, desalination has become an effective technique to produce drinkable water, from sea and brackish water, in regions where the fresh water availability is insufficient to fulfil the water demand. From the nineties onwards, Reverse Osmosis (RO) has become the most popular technology for desalination. This is because the RO desalination plants require less energy, investment cost and maintenance than other alternative desalination processes. Around 50% of the plants operating, and most plants under construction, are based on RO technology.This thesis is focused on the modelling, simulation and advanced control of one particular type of RO desalination plants: small-scale plants situated in remote areas. Typically, these plants are powered by renewable energies (such as solar panels and wind turbines) and provide drinkable water for small villages and settlements. They are very popular in arid or semi arid regions, where there is an important availability of solar radiation and wind, such as the Maghreb and the South of Europe. The correct operation of these plants fulfils the water demand and optimizes the use of the renewable energy. Besides, the advanced control deals with other issues, such as the minimization of the consumption of chemicals, the minimization of the volume of stored water, the scheduling of the stops and cleaning of the plant, the design of fault detection tools, etc.The first part of this thesis deals with the modelling of RO desalination plants. In line with this thesis, a dynamic simulation library was developed for RO desalination plants. This library is based on first principles, physical and chemical equations and correlations from the literature. It can be used for different purposes, such as the comparison of control strategies, optimization of variables, testing, capacity design, parameter estimation, data reconciliation, etc. Some of the vi SUMMARY components of the library were validated using an RO pilot plant.The second part of this thesis deals with the advanced control of RO desalination plants, powered by renewable energy. The advanced control was done using the developed simulation library, and it covers several issues, such as the model-based predictive control, the integration of process design and control, the economic optimization of the energy consumption and the cleaning scheduling, etc.The third and last part of this thesis deals with the multi-scale modelling of the RO membranes, which are the core of the RO desalination plants. In particular, the dynamic development of the salt gradient, which takes place in the boundary layer close to the membrane surface, was modelled. This modelling approach presents several improvements over other modelling strategies.