SciELO - Scientific Electronic Library Online

 
vol.40 issue4Anthropogenic pressure indicators associated with vessel groundings on coral reefs in a marine protected areaGrowth of three subtropical mangrove species in response to varying hydroperiod in an experimental tank author indexsubject indexsearch form
Home Pagealphabetic serial listing  

Services on Demand

Journal

Article

Indicators

Related links

  • Have no similar articlesSimilars in SciELO

Share


Ciencias marinas

Print version ISSN 0185-3880

Cienc. mar vol.40 n.4 Ensenada Dec. 2014

https://doi.org/10.7773/cm.v40i4.2463 

Artículos

 

Comparison of artificial neural networks and harmonic analysis for sea level forecasting (Urias coastal lagoon, Mazatlán, Mexico)

 

Comparación de redes neuronales artificiales y análisis armónico para el pronóstico del nivel del mar (estero de Urías, Mazatlán, México)

 

Erik Molino-Minero-Re1, José Gilberto Cardoso-Mohedano2, Ana Carolina Ruiz-Fernández3, Joan-Albert Sanchez-Cabeza2*

 

1 Instituto de Investigaciones en Matemáticas Aplicadas y en Sistemas, Universidad Nacional Autónoma de México, Circuito Escolar S/N, 04510 México DF, México.

2 Departamento de Procesos Oceánicos y Costeros, Instituto de Ciencias del Mar y Limnología, Universidad Nacional Autónoma de México, Circuito Exterior S/N, Ciudad Universitaria, 04510 México DF, México.

3 Unidad Académica Mazatlán, Instituto de Ciencias del Mar y Limnología, Universidad Nacional Autónoma de México, Mazatlán 82000, Sinaloa, México.

* Corresponding author. E-mail: jasanchez@cmarl.unam.mx

 

Received September 2014,
accepted November 2014.

 

ABSTRACT

Urias Estuary, a coastal lagoon in northwestern Mexico, is impacted by multiple anthropogenic stressors. Its hydrodynamics (and consequent contaminant dispersion) is mainly controlled by tidal currents. To better manage the coastal lagoon, accurate tidal-level forecasting is needed. Here we compare the predictions of sea level rise simulated by a conventional harmonic analysis, through Fourier spectral analysis, and by nonlinear autoregressive models based on artificial neural networks, both calibrated and validated using field data. Results showed that nonlinear autoregressive networks are useful to simulate the sea level over a time scale of several days (<10 days), in comparison to harmonic analysis, which can be used for longer time scales (>10 days). We concluded that the joint use of both methods may lead to a more robust strategy to forecast the sea level in the coastal lagoon.

Key words: sea level forecasting, artificial neural networks, harmonic analysis, coastal lagoon.

 

RESUMEN

El estero de Urías, una laguna costera localizada en el noroeste de México, está sometido a una gran variedad de impactos ambientales. Su hidrodinámica (y la dispersión de los contaminantes) es controlada principalmente por las corrientes de marea. El primer paso para comprender los procesos estuarinos de la laguna costera es contar con una previsión precisa de las elevaciones del nivel del mar. En el presente trabajo se comparan las predicciones del nivel del mar simuladas por un modelo tradicional de análisis armónico, a través de un análisis espectral de Fourier, con modelos autorregresivos no lineales basados en redes neuronales artificiales, ambos validados y calibrados con datos de campo. Nuestros resultados mostraron que las redes autorregresivas no lineales son útiles para simular la elevación del nivel del mar con una escala relativamente corta de tiempo (<10 días), mientras que el modelo basado en el análisis armónico se puede utilizar para simular escalas temporales grandes (>10 días). Concluimos que el uso conjunto de ambos métodos podría conducir a una estrategia más robusta para predecir las elevaciones del nivel del mar en la laguna costera.

Palabras clave: predicción del nivel del mar, redes neuronales artificiales, análisis armónico, laguna costera.

 

INTRODUCTION

Globally, approximately 41% of the human population lives in coastal zones (UNDP 2005), which provide environmental services such as physical protection, water regulation, nutrient cycling, food resources, refugia for aquatic species, and recreational and cultural experiences (Costanza et al. 1997). The feasibility of these services depends largely on tidal levels; consequently, an accurate sea level forecast is important to develop adequate coastal management strategies (Makarynskyy et al. 2004).

Urías Estuary is a tropical coastal lagoon in northwestern Mexico. It shelters the port of Mazatlán, which provides services for commerce, tourism, fishing, seafood processing, naval industry and petroleum transportation (INEGI 2013). The estuary also receives untreated urban wastewater from Mazatlán City, cooling water from a thermoelectric power plant, and shrimp farm discharges (Alonso-Rodrıgueźet al. 2000, Ochoa-Izaguirre and Soto-Jiménez 2013). Its hydrodynamics (and consequent contaminant dispersion) is mainly controlled by tidal currents (Montaño-Ley et al. 2008, Cardoso-Mohedano 2013). Thus, accurate tidal-level forecasting is important to understand many estuarine processes and to manage the port activities.

In order to develop tools for sea level forecasting, we compared two methods commonly used for time series prediction. First, we used harmonic analysis (HA) (Foreman and Henry 1989, Salas-Pérez et al. 2008): the time series was analyzed by a Fourier spectral analysis and the frequencies (constituents) were used to estimate future values. HA is a powerful and widely used technique to forecast variations in sea level, but it has the following shortcomings (Lee and Jeng 2002, Filippo et al. 2012): (i) it does not consider local variations arising from meteorological forcing, which may lead to significant forecasting errors; and (ii) it requires relatively long data series (~1 year) in order to estimate enough harmonics.

For the second method, we used nonlinear autoregressive (NAR) models based on artificial neural networks (ANN) (Lin et al. 1996, Haykin 1999). In this approach, one defines a dynamical model that requires a set of initial conditions, which are past values of the time series, used to predict future values. Applications of ANN for sea level forecasting have been reported by several authors (Lee and Jeng 2002, Salas-Pérez et al. 2008, Filippo et al. 2012, Shetty and Dwarakish 2013). Although NAR networks are versatile modeling tools, they also present drawbacks, such as their sensitivity to data quality and the need of preliminary tests to set up an adequate network. Nevertheless, once the NAR network is trained and validated, the computing effort is similar to the HA model.

 

MATERIALS AND METHODS

Study area

Urías Estuary (23º11' N, 106º22' W) is a subtropical coastal lagoon located in the state of Sinaloa, Mexico, on the southeastern coast of the Gulf of California. It has a surface area of 18 km2 and a length of 17 km. Water circulation is dominated by a mixed tide with an average range of about 1 m, producing a maximum tidal velocity of 0.6 m s–1 in the navigation channel (Montaño-Ley et al. 2008). The annual average surface water temperature is 25 ºC, and the maximum average annual salinity is 39 (during the dry season) and the minimum is 31.7 (during the rainy season). The average annual rainfall in the area is 0.8 m (Ochoa-Izaguirre 1999).

 

Field data

The sea level was measured with a HOBO Titanium Water Level Data Logger (U20-001-01-Ti), located near the lagoon mouth (23º10'53.15'' N, 106º25'25.93'' W; fig. 1). This and other autonomous probes have been deployed in the lagoon in order to provide long-term time series. Water column pressure data were collected every 30 min during a period of 326 days. This sampling period was considered to be adequate to capture diurnal sea level cycles and, at the same time, it allowed extending both the probe internal battery life and memory. The certified instrument uncertainty was ±0.05%. In order to calculate the sea level, the atmospheric pressure was subtracted. Finally, the tidal elevation was referred to mean sea level.

Harmonic analysis

HA refers to the study of waves and their superposition. This method is applied in many areas, such as in oceanography, to perform signal analysis (Foreman and Henry 1989, Pawlowicz et al. 2002, Leffler and Jay 2009), as it provides a tool to divide complex signals into simple components that can be easily analyzed.

Based on Fourier series and transforms theory, a periodic signal can be represented as the sum of sinusoidal functions with different frequencies:

where the sinusoidal component at the angular frequency, ωk = kω0, is the kth harmonic of the function f(t) and t is the time. The first harmonic of the series is the fundamental component of f(t), with an angular frequency of ω0 = 2πf0 = 2π/T (rad s–1), where T is the fundamental period and f0 is the fundamental frequency (in Hz). Coefficients Ak and θk are the kth harmonic amplitude and kth phase angle, respectively, with A0 as a constant.

To estimate the harmonic amplitudes and phases, a Fourier transform needs to be applied, usually through the fast Fourier transform algorithm (Cooley and Tukey 1965). Harmonic components are those with the highest signal intensity and are relatively easy to identify by plotting the transformed series in the frequency domain, commonly as a power spectrum and phase plot. It is worth mentioning that this spectral analysis shows the frequency content of the series with no information of the time line of the events. Consequently, the estimated frequencies are an average value of the frequencies along the whole time period analyzed and the prediction is also an average representation.

In this work, the mean tidal elevation was calculated (A0 amplitude) and subtracted from the data. Then, a fast Fourier transform was performed with MATLAB. The transformed series was plotted in magnitude and phase, and the main harmonics were estimated and used to build the HA model.

 

Artificial neural networks

ANN are powerful tools for signal analysis and system modeling (Bishop 1994, Haykin 1999). They are universal approximators that learn from data, and their nonlinear nature allows them to adapt to nonlinear functions that are difficult or impossible to express mathematically. In this work, we used ANN to forecast values of a time series by analyzing past observations. To accomplish this, NAR networks were used (Lin et al. 1996). NAR networks can be implemented under different configurations, depending on the time series problem. We implemented a simple NAR model that only uses past values of the series, y(t), to forecast future values:

where d is a time-delay parameter that defines the number of past samples, and the function f (·) is the forecasting NAR model.

The inner structure of the NAR network is divided into layers (fig. 2). The first layer defines the delay line, that is, the number of past samples used in the model, which are connected to the input layer. Each neuron has p inputs with an associated weight parameter, w, plus a bias weight input, b. Also, in each neuron there is an activation function, g(uk), that acts on the sums of the weight parameters and the inputs, uk = where k is the number of the neuron in the hidden layer; g is a nonlinear function in the case of the hidden layer neurons, g(uk) = tanh (uk), and it is a linear function in the case of the output neuron, g(uk) = uk.

It has been shown that, due to the nonlinear functions used in the inner layers, neural networks have a universal approximation capacity, and if sufficient neurons are available, the network is able to represent any continuous map (Bishop 1994); however, to reduce computing resources, it is preferable to use the minimum size that provides a satisfactory solution. Experience and preliminary tests are important to design the proper architecture (Haykin 1999). Furthermore, it is also necessary to define both the training data, which should be representative of the whole process, and the training process. A fraction of the dataset can be used for validation.

Training is a cyclic process, where internal weights w and b are modified following a rule that makes the network behave in a specific manner. The rule considers an error signal that is generated by the difference between the actual output of the network and the expected output (i.e., the desired signal). In the case of the NAR network, the set-up consists in training with the feedback loop open (no feedback) and comparing the output y(t + 1) with the same training signal with a shift. Once the error reaches a certain minimum value the training process ends. With the trained network, it is possible to forecast multiple future values by closing the loop, allowing the network to feed back its own predictions.

In this work four different network configurations were tested. The input time-delay layer (TD) and the number of hidden neurons are described in table 1. All networks had one hidden layer, except NAR1, which had two hidden layers to test a different architecture: the first layer with ten neurons and the second with one neuron.

The NAR networks were implemented by using the NARNET function in MATLAB. In contrast with HA, other studies have shown that by training ANN with two to three months of field data, good forecasting results can be obtained (Lee 2004, Shetty and Dwarakish 2013). We used only 8000 samples (166.6 days) to work on the NAR networks, which are nearly half the available field data (15,648 samples in 326 days). Data were split into two groups, one was used for training (70% of the data, 5600 samples), and the other (30% of the data) for validation. No data preprocessing was performed.

 

RESULTS

Harmonic analysis

The HA performed on the 326 days of field sea level data provided the harmonic constituents M2, S2, N2, K2, K1, O1, P1, and Q1 (Foreman and Henry 1989) (table 2). For a 10-day window, the best match of HA forecasted and field data were plotted in the time domain (fig. 3a), together with their difference (error). Under this condition, a good correlation, r = 0.9161, was observed (fig. 3b). When performing a 72-day forecast, the correlation was r = 0.8918, smaller but still close to the 10-day test.

 

Nonlinear autoregressive networks

Four NAR networks were used to forecast future values of sea level. In all cases, they were able to predict future values each half-hour for at least 10 days before missing stability. The forecasted and field data were plotted in the time domain, together with the corresponding error (fig. 4a, c, e, g). In addition, a cross-plot between forecasted and field data and the correlation coefficient is shown for each case (fig. 4b, d, f, h).

The results showed differences in the performance of each NAR configuration. The best result was achieved with NAR2 (r = 0.9707; fig. 4c, d). This network had one hidden layer with 20 neurons and a time delay of 400 samples. The cross-plot shows that data are well spread and close to the diagonal line, indicating a good match between the field sea level data and the forecasted data. The second best result was obtained with NAR1, which had two hidden layers, one with 10 neurons and the other with one neuron, and a time delay of 300 samples. Its performance was similar to that of NAR2 (r = 0.9623; fig. 4a, c). NAR3 (fig. 4e, f) had one hidden layer with 10 neurons and a time delay of 500 samples, and showed a reduced performance compared with the previous networks (r = 0.9030), as observed in the larger dispersion of the cross-plot and the larger error of the time-domain plot. NAR4, with one hidden layer of 30 neurons and a time delay of 300 samples, showed the poorest performance (r = 0.3033; fig. 4g, h). The cross-plot also shows a large dispersion. In order to compare the NAR networks with HA, a longer 72-day forecast was performed, which resulted in significantly smaller correlations of 0.3971, 0.1801, 0.03, and –0.07 for NAR1, NAR2, NAR3, and NAR4, respectively.

These findings show that different configurations can provide different results. Increasing the size of the network (number of neurons, time delays, and/or hidden layers) does not necessarily increase performance. Choosing the right training data and network retraining are necessary to find an appropriate performance. Although this process is time-consuming, neural networks learn from the data and adapt their behavior to complex phenomena.

 

DISCUSSION

The prediction of sea level in coastal lagoons is important for a number of socio-economic activities. In this work, we used two approaches: the conventional HA and the ANN analysis, based on NAR networks. Unprocessed field data from the Urías Estuary (Mexico) were used to evaluate both models. Our results showed important differences between the two methods.

As a general observation, HA uses the average frequency and amplitudes of the series during the period of study and no previous knowledge (initial conditions) is required. The model is stable for long time periods and if enough harmonics are identified and used in the model, it is suitable for predicting values on long time scales. Nevertheless, HA cannot model local distortions, such as those originated by meteorological forcing. The water circulation in Urías Estuary is mostly driven by the Gulf of California tides, which are mainly co-oscillations of the Pacific Ocean tides (Carbajal and Backhaus 1998). Its tidal regimen is mixed semidiurnal (Hendershott and Speranza 1971, Filloux 1973), with M2, S2, K1, O1, N2, K2, and P1 tidal harmonics (Carbajal 1993). In this work, we also found Q1.

In the case of NAR networks, as they adapt to the training data, they represent the general nature of the process. Also, NAR networks are dynamical models that require initial conditions and feedback (past values to predict future ones). This is possible because the output is fed back to the input to make multiple-step forecasts. Consequently, the forecast is in good agreement with the field data, but just for a relatively short period of time (about 10 days in this case), after which the model loses stability. This arises because after a period of forecasted values, which have inherent prediction error, these are fed back to the input and used to predict new values, leading to larger errors that eventually produce prediction instabilities.

In this work, different NAR network configurations were tested by varying the size of the time delay, the number of hidden layers, and the number of neurons. The best configuration, for a 10-day forecast, was found to have a time delay of 400 samples and one hidden layer with 20 neurons; in this case, the correlation coefficient was r = 0.9707. The harmonic model was derived from field data and the main constituents (M2, S2, N2, K2, K1, O1, P1, and Q1) were estimated. For a 10-day forecast, the best match between the HA data and the field data had a correlation coefficient of r= 0.9161. In contrast to HA, the NAR network showed a better agreement with field data for the same period of time. For the long-term forecast (72 days), HA showed a better performance, with r = 0.8918, while the NAR networks reflected the instabilities that arise due to the aforementioned errors.

With these results, it may be possible to optimize the use of both methods for forecasting different time scales, (i) using NAR networks to forecast 10 days based on field data collected from an on-line system, and (ii) using the HA model to forecast larger time windows.

In summary, the harmonic model provides average predictions, whereas the NAR network provides predictions based on specific initial conditions, which can be used to specify a starting forecast date. Likewise, because neural networks learn from the training data, they can reproduce local variations not captured by HA. The use of more complex NAR networks (more complex structure, more neurons, and larger delays) does not necessarily improve the forecasting performance, so different configurations need to be evaluated in order to find the most suitable one. Training is a key process and repletion is needed to find a suitable configuration. Both methods perform well and show advantages and disadvantages. We therefore conclude that the joint use of both methods, taking advantage of the best features of each one, may lead to a more robust strategy to forecast the sea level in Urías Estuary and other tropical coastal lagoons.

 

ACKNOWLEDGMENTS

JGCM and EMMR thank the National Council for Science and Technology (CONACYT, Mexico) for financial support through a postdoctoral fellowship. Partial funding was provided by the following projects: CONACYT 108093, CB2010/153492, and INFR-2013-01 204818; PAPIITDGAPA IN203313, and IB201612; and SEP PROMEP/ 103.5/12/4812. We thank the Dirección General de Cómputo y de Tecnologías de Información y Comunicación of the National Autonomous University of Mexico (UNAM) for the use of the Miztli Cluster, where simulations were performed. We also thank Germán Ramírez Reséndiz (data management), Onésimo López Ramos (data logging), and Paola Rodríguez Reynaga (language usage and editing service).

 

REFERENCES

Alonso-Rodríguez R, Páez-Osuna F, Cortés-Altamirano R. 2000. Trophic conditions and stoichiometric nutrient balance in subtropical waters influenced by municipal sewage effluents in Mazatlán Bay (SE Gulf of California). Mar. Pollut. Bull. 40: 331-339. http://dx.doi.org/10.1016/S0025-326X(99)00225-8        [ Links ]

Bishop CM. 1994. Neural networks and their applications. Rev. Sci. Instrum. 65: 1803-1832. http://dx.doi.org/10.1063/1.1144830        [ Links ]

Carbajal N. 1993. Modelling of the circulation in the Gulf of California. Ber. Zent. Meeres- Klimaforsch. Univ. Hamb. (B Ozeanogr.) 3.         [ Links ]

Carbajal N, Backhaus JO. 1998. Simulation of tides, residual flow and energy budget in the Gulf of California. Oceanol. Acta 21: 429-446. http://dx.doi.org/10.1016/S0399-1784(98)80028-5        [ Links ]

Cardoso-Mohedano JG. 2013. Desarrollo de un modelo para el estudio de la dispersión de contaminantes provenientes de una granja de cultivo de camarón en el complejo lagunar estero de Urías: Una laguna costera urbanizada (México). PhD thesis, Universitat Politécnica de Catalunya, Spain, 145 pp.         [ Links ]

Cooley JW, Tukey JW. 1965. An algorithm for the machine calculation of complex Fourier series. Math. Comp. 19: 297-301. http://dx.doi.org/10.1090/S0025-5718-1965-0178586-1        [ Links ]

Costanza R, d'Arge R, de Groot R, Farber S, Grasso M, Hannon B, Limburg K, Naeem S, O'Neill RV, Paruelo J, Raskin RG, Sutton P, van den Belt M. 1997. The value of the world's ecosystem services and natural capital. Nature 387: 253-260. http://dx.doi.org/10.1038/387253a0        [ Links ]

Filippo A, Rebelo-Torres AJ, Kjerfve B, Monat A. 2012. Application of artificial neural network (ANN) to improve forecasting of sea level. Ocean Coast. Manage. 55: 101-110. http://dx.doi.org/10.1016/j.ocecoaman.2011.09.007        [ Links ]

Filloux JH. 1973. Tidal patterns and energy balance in the Gulf of California. Nature 243: 217-221. http://dx.doi.org/10.1038/243217a0        [ Links ]

Foreman MGG, Henry RF. 1989. The harmonic analysis of tidal model time series. Adv. Water Resour. 12: 109-120. http://dx.doi.org/10.1016/0309-1708(89)90017-1        [ Links ]

Haykin S. 1999. Neural Networks: A Comprehensive Foundation. 2nd ed. Prentice Hall, Upper Saddle River, New Jersey.         [ Links ]

Hendershott MC, Speranza A. 1971. Co-oscillating tides in long, narrow bays: The Taylor problem revisited. Deep-Sea Res. Oceanogr. Abs. 18: 959-980. http://dx.doi.org/10.1016/0011-7471(71)90002-7        [ Links ]

[INEGI] Instituto Nacional de Estadística y Geografía. 2013. México en Cifras. México [cited 1 September 2013]. Available from: http://www3.inegi.org.mx/sistemas/mexicocifras/        [ Links ]

Lee TL. 2004. Back-propagation neural network for long-term tidal predictions. Ocean Eng. 31: 225-238. http://dx.doi.org/10.1016/S0029-8018(03)00115-X        [ Links ]

Lee TL, Jeng DS. 2002. Application of artificial neural networks in tide-forecasting. Ocean Eng. 29: 1003-1022. http://dx.doi.org/10.1016/S0029-8018(01)00068-3        [ Links ]

Leffler KE, Jay DA. 2009. Enhancing tidal harmonic analysis: Robust (hybrid L1/L2) solutions. Cont. Shelf Res. 29: 78-88. http://dx.doi.org/10.1016/j.csr.2008.04.011        [ Links ]

Lin T, Horne BG, Tino P, Giles CL. 1996. Learning Long-Term Dependencies in NARX Recurrent Neural Networks. IEEE Trans. Neural Netw. 7 (6): 1329-38. http://dx.doi.org/10.1109/72.548162        [ Links ]

Makarynskyy O, Makarynska D, Kuhn M, Featherstone WE. 2004. Predicting sea level variations with artificial neural networks at Hillarys Boat Harbour, Western Australia. Estuar. Coast. Shelf Sci. 61: 351-360. http://dx.doi.org/10.1016/j.ecss.2004.06.004        [ Links ]

Montaño-Ley Y, Peraza-Vizcarra R, Páez-Osuna F. 2008. Tidal hydrodynamics and their implications for the dispersion of effluents in Mazatlán Harbor: An urbanized shallow coastal lagoon. Water Air Soil Pollut. 194: 343-357. http://dx.doi.org/10.1007/s11270-008-9721-0        [ Links ]

Ochoa-Izaguirre MJ. 1999. Composición y distribución de macroalgas en el sistema lagunar de Urías (Mazatlán, Sinaloa, México): Variacion estacional de la biomasa en relación con la disponibilidad de nutrientes y algunos factores ambientales. MSc thesis, Universidad Nacional Autónoma de México (UNAM), 99 pp.         [ Links ]

Ochoa-Izaguirre MJ, Soto-Jiménez MF. 2013. Evaluation of nitrogen sources in the Urías lagoon system, Gulf of California, based on stable isotopes in macroalgae. Cienc. Mar. 39: 413-430. http://dx.doi.org/10.7773/cm.v39i4.2285        [ Links ]

Pawlowicz R, Beardsley B, Lentz S. 2002. Classical tidal harmonic analysis including error estimates in MATLAB using T_TIDE. Comput. Geosci. 28: 929-937. http://dx.doi.org/10.1016/S0098-3004(02)00013-4        [ Links ]

Salas-Pérez JJ, Salas-Monreal D, Arenas-Fuentes VE, Salas-deLeón DA, Riveron-Enzastiga ML. 2008. Tidal characteristics in a coral reef system from the western Gulf of Mexico. Cienc. Mar. 34: 467-478. http://dx.doi.org/10.7773/cm.v34i4.1364        [ Links ]

Shetti R, Dwarakish SG. 2013. Prediction of Tides Using Neural Networks at Karwar, West Coast of India. Development and Applications of Oceanic Engineering, Development and Applications of Oceanic Engineering 2 (3). http://www.daoe-journal.org/paperInfo.aspx?ID=5324        [ Links ]

[UNDP] United Nations Development Programme. 2005. Human Development Report 2005: International cooperation at a crossroads: Aid, trade and security in an unequal world. New York [cited 1 september 2014]. Available from: http://hdr.undp.org/en/content/human-development-report-2005        [ Links ]

Creative Commons License All the contents of this journal, except where otherwise noted, is licensed under a Creative Commons Attribution License