Skip to main content

Linking fine-scale behaviour to the hydraulic environment shows behavioural responses in riverine fish



Fish migration has severely been impacted by dam construction. Through the disruption of fish migration routes, freshwater fish communities have seen an incredible decline. Fishways, which have been constructed to mitigate the problem, have been shown to underperform. This is in part due to fish navigation still being largely misunderstood. Recent developments in tracking technology and modelling make it possible today to track (aquatic) animals at very fine spatial (down to one meter) and temporal (down to every second) scales. Hidden Markov models are appropriate models to analyse behavioural states at these fine scales. In this study we link fine-scale tracking data of barbel (Barbus barbus) and grayling (Thymallus thymallus) to a fine-scale hydrodynamic model. With a HMM we analyse the fish’s behavioural switches to understand their movement and navigation behaviour near a barrier and fishway outflow in the Iller river in Southern Germany.


Fish were tracked with acoustic telemetry as they approached a hydropower facility and were presented with a fishway. Tracking resulted in fish tracks with variable intervals between subsequent fish positions. This variability stems from both a variable interval between tag emissions and missing detections within a track. After track regularisation hidden Markov models were fitted using different parameters. The tested parameters are step length, straightness index calculated over a 3-min moving window, and straightness index calculated over a 10-min window. The best performing model (based on a selection by AIC) was then expanded by allowing flow velocity and spatial velocity gradient to affect the transition matrix between behavioural states.


In this study it was found that using step length to identify behavioural states with hidden Markov models underperformed when compared to models constructed using straightness index. Of the two different straightness indices assessed, the index calculated over a 10-min moving window performed better. Linking behavioural states to the ecohydraulic environment showed an effect of the spatial velocity gradient on behavioural switches. On the contrary, flow velocity did not show an effect on the behavioural transition matrix.


We found that behavioural switches were affected by the spatial velocity gradient caused by the attraction flow coming from the fishway. Insight into fish navigation and fish reactions to the ecohydraulic environment can aid in the construction of fishways and improve overall fishway efficiencies, thereby helping to mitigate the effects migration barriers have on the aquatic ecosystem.


Migration is an integral part of life for many fish species [1]. Whether for reaching feeding grounds, spawning habitat, or refuge areas, accessibility of different habitats can be crucial for the survival and prosperity of fish communities. As human populations began to develop near riverine ecosystems, so did the impact of human societies on aquatic communities. Human societies began engineering riverine systems as early as 2000BC [2, 3]. Initially, early engineering projects focused on flood protection and irrigation, but as time progressed dam and weir construction for flood control, water storage, and hydropower became more important [3]. Today, rivers in Europe have a barrier every 1.3 km [4]. Fragmentation of water bodies and lack of habitat connectivity is one of the reasons behind an 83% decline in freshwater fish communities and a 76% decline in migratory fish communities since the 1970s [5].

Fishways are often constructed to mitigate migration barriers. Historically, fishway construction has focused on salmon and shad [6] but in recent years a more community-wide approach has begun to emerge [7, 8]. Unfortunately, fishways often do not reach the required efficiencies to support sustainable populations [9,10,11]. One way to improved total fishway efficiency is by improving the fishway attraction, which measures the proportion of fish successfully finding a fishway. Fishway attraction efficiencies are variable and can range from 36 to 60% for different fishways [9]. One issue faced when aiming to improve fishway attraction can be a lack of understanding regarding the navigational cues used by fish to locate passages when confronted with a barrier [12].

Recent developments in telemetry technology allow researchers to track animals on a near-continuous temporal resolution [13, 14]. With this increase in data-collection possibilities, multiple opportunities arise for analysing fish movement and behaviour [15], especially when movement is linked to fine-scale environmental measurements and modelling [13, 16]. The advent of fine-scale tracking data introduces new complexities to datasets and calls for new developments in data analysis tools. Modelling techniques gaining interest are hidden Markov models (HMMs) and state space models (SSMs) [17, 18]. HMMs (a discrete form of SSMs) have been around since the 1990s [19]. One of the first research projects kickstarting the use of SSMs and HMMs was by Morales et al. [20], where they looked at the movements of elk after a translocation. Recent developments in computational power have led to an increased popularity of these models [17].

HMMs can be used to identify hidden states based on observable variables. Traditionally, these observed variables denote a movement speed (usually expressed in step length) and a straightness parameter (usually expressed in turning angle). However, one is not limited to these parameters and in the field of movement ecology a wide array of movement parameters has been developed [21]. In addition to speed, turning, and their derivatives, other variables, such as dive depth or dive length, can be collected and used in the development of HMMs [22].

A drawback of HMMs is that measurement errors should be negligible. Although the spatio-temporal resolution of aquatic telemetry has become finer, positioning errors due to reflections, receiver time drift, etc. can still be of a magnitude comparable to the distance between neighbour track points. Positioning of acoustic telemetry data can be imprecise and often requires serious pre-processing to result in usable tracks [14, 23]. In particular, for stationary behavioural states (e.g. resting) measurement errors can be problematic as in fine-scale telemetry such states assume a star-shaped movement pattern as result of measurement inaccuracies [14]. Using step length as a proxy for movement speed in such cases can create issues, since the error added to the step lengths will blur the differences between step lengths in resting (generally small steps) versus movement (generally longer steps) states. In turn, this blurring can lead to erroneous state assignments, e.g. by assuming resting behaviour is actually movement due to longer step lengths as a result from measurement errors.

Fish navigation in downstream movement has already been linked to flow direction [24], flow velocity [25, 26] and spatial velocity gradient (SVG) [27]. To our knowledge similar work is lacking for upstream fish navigation. Despite this research gap, it is generally assumed that flow velocity and velocity gradients are equally important in upstream migration as they are in downstream migration [7]. In this research we aim to identify searching behaviour as fish undertake their spawning migration. We focus on barbel (Barbus barbus) and grayling (Thymallus thymallus) as these species undertake spawning migration and are often confronted with migration barriers [28, 29]. These two fish species were also chosen due to both their abundance within the study system, and their importance in identifying longitudinal river zones [30]. As these fish are presented with a migration barrier, they need to find a fishway to continue their journey and need to navigate using ecohydraulic navigation cues. By linking behavioural switches to these hydraulic patterns, we try to identify which hydraulic cues influence fish navigating upstream to the fishway entrance.


Study site

The study was carried out in the Iller river, a tributary of the Danube, near the town of Altusried, Germany (Fig. 1A). The total discharge during the study period (April-June 2018) was on average 65 m3/s and ranged from 27 to 214 m3/s. A nature-like fishpass with a discharge capacity of 1 m3/s was constructed to mitigate migration over the barrier. The downstream entrance of the fishpass is situated 250 m below the hydropower plant (HPP) on the same side as the turbine outlet. The upstream fishpass entrance is situated 150 m upstream of the HPP (Fig. 1B).

Fig. 1
figure 1

A location of the study site (red dot) in Germany. The Iller river (blue) is a right tributary of the Danube (orange). B Aerial map of the study site in Altusried overlayed with the simulated flow velocity at a discharge of 50 m3/s. White dots show HR2 receiver locations, red star marks the fishway entrance downstream of the hydropower plant, the yellow triangle marks where fish were caught, and the yellow plus-sign marks the release location. C Shows the bathymetry of the study site at a discharge of 50 m3/s. Water flows from south-east to north-west. Red dotted lines mark the borders of the area for which tag detections were analysed

Hydrodynamic model

A two-dimensional (2D) hydrodynamic model was developed for eight different discharge situations ranging from 10 to 80 m3/s. The modelled values span the range from the minimal discharge needed to operate the HPP, to twice the mean annual flow. Discharge regimes only peaked above these values 3 times within the study period. The model bathymetry is based on echosounder measurements and an aerial drone survey. The computational mesh, consisting of triangle elements, ranging in linear size from 0.25 to 0.5 m, was developed with the pre- and post-processing software SMS [31]. The model Hydro-As_2D [32], based on the Saint-Venant equations, calculates water depths and depth-averaged components of flow velocity for every node of the computation model. Model calibration was done by using water surface elevations at a discharge of 10 m3/s; of which 9 m3/s passed through the hydropower turbines and 1 m3/s through the fishway. In other discharge regimes the fishway remained operating at ~ 1 m3/s with the remaining discharge originating from the HPP turbine and/or associated spill weirs. To derive values of SVG on a regular grid, distributions of flow velocity vectors at every discharge were interpolated into a raster nodes on a cell size of 0.5 × 0.5 m (Fig. 2). The SVG is calculated as follows:

$${SVG}_{x}=\frac{\delta vx}{\delta L}$$
$${SVG}_{y}= \frac{\delta vy}{\delta L}$$
$$SVG= \sqrt{{SVG}_{x}^{2}+ {SVG}_{y}^{2}}$$
Fig. 2
figure 2

Distribution of SVG at 10 m3/s (A) and 80 m3/s (B). At lower discharges the attraction flow of the fishway has a more pronounced effect on SVG than under high discharge conditions

In which SVGx and SVGy are the SVG components in x and y direction respectively. δvx and δvy are the differences in the flow velocity components between neighbour cells in x and y orthogonal direction respectively, δL is the distance between mesh nodes.

Fish tagging and tracking

Twenty-two barbel (TL: 498 ± 73 mm; weight: 1356 ± 592 g) and twenty-five grayling (TL: 367 ± 56 mm; 630 ± 270 g) were caught and tagged between March 28th and May 29th 2018 (Table 5). 30 fish were caught in a counting pool within the fishway (47.82°N, 10.23°E; see Fig. 1B), the remaining fish, all grayling, were caught with electrofishing from a boat downstream of the HPP. Fish tagging was done with VEMCO V9-tags (now InnovaSea; random burst interval PPM: 50–70 s; random burst interval HR: 1.1–1.3 s). Tags were implanted in the abdominal cavity after sedation in a 0.2 ml/l 2-phenoxy-ethanol solution. Fish were held in a recovery tank until normal behaviour was shown, typically between 2 and 11 min (see Table 5 in the appendix). After recovery in a holding tank fish were released just downstream of the 2D telemetry array (47.82°N, 10.22°E; Fig. 1B).

The 2D telemetry array consisted of 16 180 kHz HR2 VEMCO receivers and included 6 reference tags. The array spanned 300 m of the river downstream of the hydropower facility (Fig. 1B). Three additional receivers were placed in a 1D set up outside the 2D receiver array to evaluate the behaviour of fish exiting the study area. One receiver was placed 1500 m downstream of the 2D array to evaluate escapement to the downstream section of the river, and two receivers were placed in the fish pass to evaluate fish passage efficiency (one halfway into the fish pass, and one at the fish pass exit upstream of the hydropower facility; see Fig. 1B for receiver placement). The telemetry array was installed from March 2018 to August 2018, but since this study was focussed on migratory behaviour the tracking data was filtered to reflect the migration period of these fish species (see the section ‘Track filtering and regularisation’).

Data processing and analysis

Fish positioning

Fish positions were calculated using a novel localization algorithm [33] using time of arrival (TOA) of the tag signals at georeferenced acoustic receivers deployed in the study area (see Fig. 1B). Our method is based on a maximum likelihood formulation as described in [34], where a cost function is defined in terms of time of arrival and sound of speed. Using the recorded time of arrival at each receiver, and given the known distances between receivers and synchronization tags, receivers were synchronized by a polynomial fit for receivers and sound of speed that minimized the sum of absolute residuals across all receiver detections. Contrary to other positioning algorithms, such as YAPS [23], UMAP [35], or VPS [36], this method does not depend on tag transmission interval (e.g., fixed, nominal).

Fish locations were estimated in a similar manner to the synchronization process above, with the addition of smooth splines components to the horizontal movement of each fish as done by [37]. Based on model performance, estimated errors, in meters, were calculated for each position in the x- and y-direction as well as the overall Cartesian direction (Fig. 3). Based on a GPS test track, the actual mispositioning (i.e., difference between GPS coordinates and the positioning by the algorithm) was highest towards the edges of the array. This corresponded to the error of the overall Cartesian direction values given by the positioning algorithm (see Fig. 3).

Fig. 3
figure 3

GPS track testing the positioning performance. Error_xy shows higher values towards the edged of the array (A). This corresponds to the actual positioning error (B)

Track filtering and regularisation

To focus on migratory behaviour tracking, data was limited to the spawning period for the two fish species considered in this study. For barbel, tracks between April 20th and June 20th [28] were selected. For grayling, tracks were selected between March 10th to April 20th [29].

Fish positions were retained for the area marked in Fig. 1B. This is the area between the most upstream and downstream receiver in the 2D receiver array. Fish positions outside of this area were removed because the accuracy of the positioning decreases outside of a receiver array [36]. Additionally, positions with an overall calculated Cartesian positioning error (error_xy) exceeding 1.7 m (top 5%) were omitted, to reduce the effect of measurement errors on the subsequent analyses and calculations. Tracks were subdivided and handled as individual tracks if the time-interval between detections exceeded 5 min. Resulting tracks were regularised to a 30 s interval following Lamonica et al. [14]. This was done by fitting a continuous-time correlated random walk to the tracking data and resampling this continuous track with a 30 s interval [38]. The regularised tracks were visually inspected to evaluate potential deviations from the original tracks. Tracks with a duration of less than 10 min or a length of less than 100 m (roughly the distance between the fishway and the edge of the array) were not considered.

State definitions using HMMs

HMMs are widely considered to be useful tools in identifying different behavioural patterns from movement data and can help understand the underlying processes [21]. The premise of an HMM is that an unobservable process can be inferred from observable variables (Fig. 4) [ 39]. In the field of movement ecology, this normally means inferring behaviour from movement speed (usually measured in step lengths) and directionality (usually expressed in turning angles). The HMM is dependent on two components: the state distribution and the transition matrix. The state distribution describes the probability of a value being assigned to one state or the other (see Figs. 6 and 9 for examples). The transition matrix shows the probability of a fish changing from one behavioural state to the other. When assigning states to the actual observation, both processes are taken into consideration in the Viterbi algorithm [39, 40], which is used to calculate the most probable state sequence based on the observation sequence.

Fig. 4
figure 4

Basic dependence structure of an HMM. The state at time t + 1 (St+1) is dependent on the observation at t + 1 (Ot+1) through the state distribution, and the state at the previous observation (St) through the transition matrix. The environment can act on the transition matrix and can thus affect the probabilities of a fish changing behaviour between detections. The Viterbi algorithm calculates the most probable state sequence for St:St+3 based on the observation sequence Ot:Ot+3 and the transition matrix [39]

The straightness index (SI) is a ratio measuring the straightness of a line, where values approaching 0 show complete tortuosity and 1 is perfect straightness. Since it is assumed that resting behaviour is shown as a star-shaped pattern due to telemetry positioning errors, it can be assumed that SI approaches 0 during resting behaviour. Actual movement will be more directed, leading to an SI with higher values. To test the performance of using SI compared to the more commonly used parameter step length, three different 2-state HMMs were developed, one using step lengths as explanatory data stream and two using SI at different time windows (SI_3 with a 3-min window and SI_10 with a 10-min window). In addition to these 2-state models a 3-state model was developed by combining SI_3 and SI_10. The SI was calculated following Batschelet [41] using:


In which D stands for the beeline distance between the first and last detection in a moving window, and L for the total track length in said window.

Model parameterization was done with a non-linear minimization (nlm) using the fitHMM function from the momentuHMM package [42]. In the models, step length was assumed to follow a gamma distribution and SI to follow a beta distribution [18, 42]. The beta distribution for SI was chosen as this distribution accurately represents both the 0 to 1 scale, unlike e.g. gamma-distributions, and the continuous nature of the index, unlike e.g. the Bernoulli-distribution. The models were assumed to have two behavioural states and were fitted 50 times with initial values drawn randomly following the methodology of [43]. For each model the iteration with the highest log-likelihood value was retained for further analysis. An inspection of the Viterbi decoded state sequences of the 2-state models indicated that searching behaviour and true resting behaviour could have been merged due to similar SI_10 values. To separate the searching behaviour from the resting behaviour the 2-state SI_10 model was further developed. The choice to improve the SI_10 model was based on AIC values of the different models (see Tables 2 and 4). The state separation of the 3-state model was done by assuming known states for the detections defined as transit behaviour by the 2-state model based on SI_10 and fitting a new model identifying two new states on the remaining, undefined detections based on SI_3.

To test for individual differences an interaction between the transition matrix and fish ID was added In addition to individual differences the effect of catching method was tested for grayling. This was done by fitting separate HMMs were for fish caught in the upstream counting pool and with electrofishing. No differences were found in these model adaptations and thus all fish were pooled by species for the final models.

To identify the effect of hydraulic parameters (flow velocity, SVG and their respective angles relative to the fish swimming direction), the best performing model for grayling and the best performing model for barbel were refitted while allowing the hydraulic parameter to act on the transition matrix through a regression formula [42]. Since SVG had a heavily right-skewed distribution (Fig. 5), the effect of higher values was tested. This was done by re-fitting the HMM after removing detections with high SVG values based on the IQR rule. This meant removing detection that exceeded Q3 + 3*IQR (the 75th percentile plus 3 times the interquartile range) using the log-transformed data for SVG. As removing these values did not impact the outcome of the HMMs, and SVG values were still within reasonable ranges, it was decided to retain these higher SVG values.

Fig. 5
figure 5

Encountered SVG (A), flow velocity (B), discharge (C), and water depth (D) for grayling and barbel

Apart from the hydrodynamic modelling, all data preparation and analysis was done in RStudio v4.2.2 [44].


Track information

After pre-processing the fish position data according to the criteria listed in the section ‘Track filtering and regularisation’, 50 tracks remained for grayling and 162 tracks remained for barbel. For grayling the average track duration was 233 min and for barbel average track duration was 152 min. The average track lengths were 1087 m for grayling and 774 m for barbel. See Table 6 in the appendix for detailed information on the tracking data used.

The encountered SVG for both grayling and barbel was heavily right skewed. This can be attributed to the localised nature of high SVG values. High SVG values primarily occurred near the fishway entrance, whereas the rest of the study area was characterised by low values (< 0.1 m/s/m) (Fig. 2).


2-state models

All three 2-state models for grayling showed a resting state and a transit state (see Fig. 6). For the model based on step length, behavioural states were assumed to have a gamma distribution. For the models based on SI, the behavioural states were assumed to follow a beta distribution. In the model based on step lengths the resting state was defined as having a mean step length (µ) of 0.29 m and standard deviation (σ) of 0.37 m. The transit state was defined as a having µ = 4.99 m and σ = 4.29 m. In the SI_3 model the resting state was defined as having µ = 0.28 and σ = 0.02, and the transit state was defined as having µ = 0.72 and σ = 0.01. The SI_10 model had a resting state defined as having µ = 0.15 and σ = 0.01 and a transit state having µ = 0.57 and σ = 0.03 (Fig. 6C).

Fig. 6
figure 6

State distributions for the 2-state models (A) step length model, (B) SI_3 model, and (C) SI_10 model for grayling. In all models a resting state (solid lines and black bars) and a transit state (dashed lines and grey bars) could be identified

Based on the AIC values and the log-likelihood, the SI_10 model was the best fit for the data (see Table 2).

3-state model

Fixing the transit state from the SI-3 2-state model enabled separating the resting state into a true resting state and a state characterised by searching behaviour (see Fig. 7). The resulting model identified:

  1. (1)

    A straight state, characterized by high SI_3 and high SI_10 values (SI_3: µ = 0.54, σ = 0.27; SI_10: µ = 0.56, σ = 0.18),

  2. (2)

    A very tortuous state, characterized by low SI_3 and SI_10 values (SI_3: µ = 0.24, = 0.14; SI_10: µ = 0.13, σ = 0.09), and

  3. (3)

    A state with medium tortuosity, characterized by high SI_3 but low SI_10 values (SI_3: µ = 0.63 σ = 0.15; SI_10: µ = 0.17, σ = 0.09).

Fig. 7
figure 7

State distributions of (A) SI_3 and (B) SI_10 for the 3-state model for grayling. In the model we see a transit state (white bars and dashed line), a resting state (black bars and solid line), and a searching state (grey bars and dotted line). Even though this model makes biological sense AIC and LL support the 2-state models over this 3-state model

From here on the three states will be referred to as transit, resting, and searching respectively. The 3-state model had a higher AIC and lower LL, and is thus performing poorer, than the two SI models, though it performed better than the step length model (see Table 2).

Including ecohydraulic variables

Including SVG affected the transition matrix. As SVG increased, the probability of a fish switching to state 1 (resting) increased. SVG angle along with the interaction between SVG value and SVG angle had a limited effect (Table 1). Including flow velocity and flow direction had a very limited effect (Fig. 8B and Table 1). Including an interaction effect between SVG value and flow velocity results in a slight effect of SVG (Fig. 8C1 and Table 1) whereas flow velocity again had no real effect (Fig. 8C2 and Table 1).

Fig. 8
figure 8

Effect of SVG, flow velocity, and their interaction on the transition matrix for grayling with associated 95% confidence interval (CI) (grey bars). Every cluster of four graphs should be read as: top-left) probability of a behavioural switch from behaviour 1 to behaviour 1, top-right) the chance of switching from behaviour 1 to behaviour 2, bottom-left) switching from behaviour 2 to behaviour 1, and bottom-right) switching from behaviour 2 to behaviour 2. SVG had an effect, though CI is relatively wide (A1). SVG relative angle had no effect (A2). Flow velocity had no effect for either absolute values (B1) or relative angle (B2). In the interaction only SVG had an effect (C1)

Table 1 Regression coefficients for the transition matrix when including SVG, flow, and the interaction between SVG and flow velocity


2-state model

For barbel all 2-state models resulted in a resting state and a transit state (see Fig. 9). As with grayling the step length model assumed gamma distributions for the behavioural states and the SI models assumed beta distributions (Tables 2 and 3). In the step length model a resting state found with mean step length of 0.43 m and a standard deviation of 0.51 m and transit behaviour with an average step length of 4.31 m and a standard deviation of 3.55 m. In the SI_3 model the states a tortuous resting state was found with a mean SI of 0.30 m (standard deviation 0.02 m) and a straight transit mode with an average SI of 0.71 m (standard deviation 0.01 m). The SI_10 model also showed a tortuous resting behaviour (µ = 0.14 and σ = 0.01) and a straight transit mode (µ = 0.57 m and σ = 0.02). As with the models developed for grayling the model based on SI_10 performed best with the model based on step length performed poorest (Table 4).

Fig. 9
figure 9

State distributions of the step length model (top), SI_3 model (middle), and the SI_10 model (bottom). All states showed a resting state (black bars and solid lines) and a transit state (grey bars and dashed lines)

Table 2 AIC and log-likelihood (LL) values for the different models for grayling
Table 3 Regression coefficients for barbel when including SVG, flow, and the interaction between SVG magnitude and flow velocity
Table 4 AIC and log-likelihood (LL) values for the different models for barbel

3-state model

Fitting a 3-state model by fixing the transit-state (state 1 in the 3-state model) resulted in three clear states (see Fig. 10):

  1. (1)

    A straight state, characterized by high SI_3 and high SI_10 values (SI_3: µ = 0. 58, σ = 0. 23; SI_10: µ = 0. 57, σ = 0. 17),

  2. (2)

    A very tortuous state, characterized by low SI_3 and SI_10 values (SI_3: µ = 0. 26, σ = 0.14; SI_10: µ = 0.13, σ = 0.09), and

  3. (3)

    A state with medium tortuosity, characterized by high SI_3 but low SI_10 values (SI_3: µ = 0.65, σ = 0.15; SI_10: µ = 0.16, σ = 0.10).

Fig. 10
figure 10

Beta distributions of the 3-state model for barbel. The model could identify resting behaviour based on SI_3 and can differentiate between searching and transit based on SI_10

As with the 3-state model developed for grayling these states will be called transit, resting, and searching respectively. Trying to define a third state decreased the overall performance of the model (Table 4).

Including ecohydraulic variables

The effect of the ecohydraulic parameters were tested on the best performing model, which was the SI_10 model. At high SVG values barbel were more likely to switch behaviour from state 2 (transit) to state 1 (resting). SVG angle (Fig. 11A2), flow velocity (Fig. 11B1), and flow angle (Fig. 11B2) had no effect on the transition probabilities. When testing for the interaction between SVG and flow velocity (Fig. 11C) again only SVG had an effect, but the effect was more pronounced and with a smaller 95% confidence interval, than when testing for SVG and SVG angle.

Fig. 11
figure 11

Effect of SVG, flow velocity, and their interaction on the transition matrix for barbel with associated 95% confidence interval (CI) (grey bars). Every cluster of four graphs should be read as: top-left) probability of a behavioural switch from behaviour 1 to behaviour 1, top-right) the chance of switching from behaviour 1 to behaviour 2, bottom-left) switching from behaviour 2 to behaviour 1, and bottom-right) switching from behaviour 2 to behaviour 2. Absolute values of SVG seemed to have an effect, although a wide CI can be seen (A1). SVG relative angle had no effect (A2). Flow velocity had no effect for either absolute values (B1) or relative angle (B2). In the interaction only SVG had an effect (C1).

Discussion and conclusion

In this paper it is shown that using SI as a data stream to classify behavioural states using HMMs is the better option when compared to using the traditional step length. Based on model AIC and log-likelihood values, the best model for both barbel and grayling was a 2-state model identifying resting and transit behaviour based on a SI calculated over a 10 min window. Trying to identify a third behaviour (searching) diminished model performance.

Linking the behavioural states to ecohydraulic parameters enabled analysing how fish behaviour is affected by the ecohydraulic environment. Surprisingly, fish behaviour was not impacted by flow velocity, contrasting with general assumptions on fish behaviour [7]. The lacking effect of flow velocity might be attributed to the relatively low flow velocities compared to critical swimming speed of the fish species used in this study. Grayling can sustain a swimming speed of 1.3–1.4 m/s for 2 min [45]. For barbel no critical swimming speeds have been found, but the closely related Iberian barbel (Barbus bocagei) has a critical swimming speed between 0.7 and 1 m/s [46]. Looking at the used flow velocities it can be seen that barbel indeed tended to select locations with flow velocities of 0.5–0.7 m/s, and only at higher discharges (> 70 m3/s) barbel started selecting lower flow velocities (see Figs. 12 in appendix). Flow velocities ranged from 0.0 to 1.0 m/s, with the highest values around the fishway entrance. Based on critical swimming speeds, grayling should have no problem overcoming the flow velocities in this system. Barbel could potentially have some issues overcoming the flow velocities found in this study site, but from our analyses it seemed that fish in were not affected by the flow velocities found in the Altusried study site. Theoretically, this could be due to barbel being able to utilize habitat structures (for example large boulders) to shelter from high flow velocities or utilize near-bed velocities instead of the full flow velocities seen higher in the water column [47, 48]. However, since this study did not include depth measurements it is impossible to draw definitive conclusions on this subject. Future studies could account for depth by using 3D acoustic tracking when analysing fish navigation in relation to environmental cues such as flow velocity, SVG, bathymetry and substrate.

SVG did have an impact on the behavioural switches. For both grayling and barbel, an increase in SVG was associated with an increased probability of a fish changing behaviour, from transit to resting. However, due to the large window used to calculate SI what we call resting can also include searching behaviour. This is due to the star-shaped patterns approaching similar SI-values as searching behaviour where fish pace up-and-down an area where they expect passage. The effect of SVG on the transition matrices would suggest that SVG is an important navigational cue for fish. However, it should be noted that these effects are accompanied by a wide confidence interval. The wide confidence interval can be attributed to the localized nature of SVG and limited amount of data at higher SVG values. High SVG values almost exclusively occurred near the fishway and are a result of the attraction flow stemming from the fishway. In the tracking data, higher SVG values accounted for very few detections compared to the entire dataset (only 0.15% above 0.3 m/s/m). The effect of these outliers was tested by removing the most extreme cases and re-fitting the model. Removing outliers did not change the broader pattern found when linking SVG to the transition matrix, which in turn led to the decision to retain these values. Since the high SVG values do not represent unrealistic values and their low abundance in the dataset can be attributed by their low abundance in the study system it was also decided to not apply a transformation to handle outliers.

Something that could not be tested sufficiently is the effect of catch location and catching method. Since all barbel were caught in the counting pool in the upper part of the fishway, it can be assumed that these fish already know where the fishway is located. Grayling catches were more evenly distributed between the counting pool and electrofishing. Developing separate HMMs for the two catching methods did not reveal differences in the state definition, leading to all individuals being pooled in the analyses. Studies investigating the learning process of fish when searching for fishways could reveal very interesting findings as laboratory settings have shown spatial learning behaviour in fish [49]. Additionally, individual variation is not directly accounted for in this study. To fully investigate the effect of individual behaviour, a separate HMM would be required for every individual. Since HMMs are a data-driven method, this would rely on all behavioural types being shown by all fish. As not all fish were exhibiting all different behaviours, and similar behaviour might look different for different fish it is difficult to make individual HMMs universal. Including fish ID as a random variable affecting the transition matrix did not reveal individual differences. This indicates that behavioural switches are similar between different fish of the same species.

For fishway design, results suggest that the focus should be on optimizing SVG rather than flow velocity in the attraction flow. However, given that SVG is a direct effect of (differences in) flow velocity, this does not mean that flow velocity can be completely removed from the equation. First and foremost, attraction flow velocity should not exceed swimming capacities of target fish species [50]. In addition, a high SVG value depends on areas with higher flow velocities adjacent to areas with lower flow velocities. So rather than absolute values, flow velocity should be considered in relation to the surrounding ecohydraulic environment and how target species react to gradients in this flow velocity. In this study, the application of HMMs to fine-scale tracking data is demonstrated. Yet, attributes of fine-scale data still need to be considered. Positioning errors can seriously affect model performance when these models are based on parameters derived from only a few positions. For example, step length only depends on two detections and are prone to error at fine scales [51]. Taking parameters calculated over more detections can smooth the effects of positioning errors. Therefore, we recommend that other movement parameters are used when applying HMMs to fine-scale tracking data, preferably parameters that are calculated over multiple detections. Applying such an approach allows researchers to smooth the tracking data while still retaining valuable information on the very fine scale, enabling links to be made between animal movement and the environment the animal utilizes [15]. SI seems to be a very viable option to use in applying these models, but there is a wide variety of parameters (e.g. net squared displacement, sinuosity, multi-scale straightness index) that can be used in defining behavioural states [21]. Important steps to consider when applying these kinds of models is thoroughly understanding your study system, potential causes of mispositioning, and the effect the temporal resampling and extent of the moving window has when calculating the movement parameters used in the model.

Data availability

Data and code can be requested with the corresponding author.


  1. Lucas MC, Baras E, Thom TJ, Duncan A, Slavik O. Migration of freshwater fishes, Hoboken: Copeia, Blackwell Science Ltd.; 2001. p. 878–9.

    Google Scholar 

  2. Haidvogl G, Hoffmann R, Pont D, Jungwirth M, Winiwarter V. Historical ecology of riverine fish in Europe. Aquat Sci. 2015;77(3):315–24.

    PubMed  PubMed Central  Google Scholar 

  3. Downs PW, Gregory KJ. River channel management: towards sustainable catchment hydrosystems. Milton: Taylor & Francis Group; 2004. p. 395.

    Google Scholar 

  4. Belletti B, Garcia de Leaniz C, Jones J, Bizzi S, Börger L, Segura G, et al. More than one million barriers fragment Europe’s rivers. Nature. 2020;588(7838):436–41.

    CAS  PubMed  Google Scholar 

  5. WWF. Living planet report 2022—Building a nature-positive society. In: Almond REA, Grootse M, Juffe Bignoli D, Petersen T, editors. Gland, Switzerlandp; 2022.

  6. Katopodis C, Williams JG. The development of fish passage research in a historical context. Ecol Eng. 2012;48:8–18.

    Google Scholar 

  7. Williams JG, Armstrong G, Katopodis C, Larinier M, Travade F. Thinking like a fish: a key ingredient for development of effective fish passage facilities at river obstruction. River Res Appl. 2012;28:407–17.

    Google Scholar 

  8. Wagner RL, Makrakis S, Castro-Santos T, Makrakis MC, Dias JHP, Belmont RF. Passage performance of long-distance upstream migrants at a large dam on the Paraná river and the compounding effects of entry and ascent. Neotrop Ichthyol. 2012;10(4):785–95.

    Google Scholar 

  9. Hershey H. Updating the consensus on fishway efficiency: a meta-analysis. Fish Fish. 2021;22(4):735–48.

    Google Scholar 

  10. Noonan MJ, Grant JWA, Jackson CD. A quantitative assessment of fish passage efficiency. Fish Fish. 2012;13(4):450–64.

    Google Scholar 

  11. Bunt CM, Castro-Santos T, Haro A. Performance of fish passage structures at upstream barriers to migration. River Res Appl. 2012;28(4):457–78.

    Google Scholar 

  12. Lennox RJ, Paukert CP, Aarestrup K, Auger-Méthé M, Baumgartner L, Birnie-Gauvin K, et al. One hundred pressing questions on the future of global fish migration science, conservation, and policy. Front Ecol Evol. 2019;7:286.

    Google Scholar 

  13. Capra H, Plichard L, Bergé J, Pella H, Ovidio M, McNeil E, et al. Fish habitat selection in a large hydropeaking river: strong individual and temporal variations revealed by telemetry. Sci Total Environ. 2017;578:109–20.

    CAS  PubMed  Google Scholar 

  14. Lamonica D, Drouineau H, Capra H, Pella H, Maire A. A framework for pre-processing individual location telemetry data for freshwater fish in a river section. Ecol Modell. 2020;431:109190.

    Google Scholar 

  15. Nathan R, Monk CT, Arlinghaus R, Adam T, Alós J, Assaf M, et al. Big-data approaches lead to an increased understanding of the ecology of animal movement. Science. 2022;375(6582):eabg1780.

    CAS  PubMed  Google Scholar 

  16. Szabo-Meszaros M, Forseth T, Baktoft H, Fjeldstad H, Silva AT, Gjelland KØ, et al. Modelling mitigation measures for smolt migration at dammed river sections. Ecohydrology. 2019;12(7):2131.

    Google Scholar 

  17. McClintock BT. Worth the effort? a practical examination of random effects in hidden Markov models for animal telemetry data. Methods Ecol Evol. 2021;12(8):1475–97.

    Google Scholar 

  18. Langrock R, King R, Matthiopoulos J, Thomas L, Fortin D, Morales JM. Flexible and practical modeling of animal telemetry data: hidden Markov models and extensions. Ecology. 2012;93(11):2336–42.

    PubMed  Google Scholar 

  19. Anderson-Sprecher R, Ledolter J. State-space analysis of wildlife telemetry data. JASA. 1991;86(415):596–602.

    Google Scholar 

  20. Morales JM, Haydon DT, Frair J, Holsinger KE, Fryxell JM. Extracting more out of relocation data: building movement models as mixtures of random walks. Ecology. 2004;85(9):2436–45.

    Google Scholar 

  21. Edelhoff H, Signer J, Balkenhol N. Path segmentation for beginners: an overview of current methods for detecting changes in animal movement patterns. Mov Ecol. 2016;4(1):1–21.

    Google Scholar 

  22. van Beest FM, Mews S, Elkenkamp S, Schuhmann P, Tsolak D, Wobbe T, et al. Classifying grey seal behaviour in relation to environmental variability and commercial fishing activity—a multivariate hidden Markov model. Sci Rep. 2019;9(1):5642.

    PubMed  PubMed Central  Google Scholar 

  23. Baktoft H, Gjelland KØ, Økland F, Thygesen UH. Positioning of aquatic animals based on time-of-arrival and random walk models using YAPS (Yet Another Positioning Solver). Sci Rep. 2017;7(1):1–10.

    CAS  Google Scholar 

  24. Piper AT, Manes C, Siniscalchi F, Marion A, Wright RM, Kemp PS. Response of seaward-migrating european eel (Anguilla anguilla) to manipulated flow fields. Proc R Soc B. 2015;282:20151098.

    PubMed  PubMed Central  Google Scholar 

  25. Vowles AS, Anderson JJ, Gessel MH, Williams JG, Kemp PS. Effects of avoidance behaviour on downstream fish passage through areas of accelerating flow when light and dark. Anim Behav. 2014;92:101–9.

    Google Scholar 

  26. Haro A, Odeh M, Noreika J, Castro-Santos T. Effect of water acceleration on downstream migratory behavior and passage of Atlantic salmon smolts and juvenile American shad at surface bypasses. Trans Am Fish Soc. 1998;127(1):118–27.

    Google Scholar 

  27. Vowles AS, Kemp PS. Effects of light on the behaviour of brown trout (Salmo trutta) encountering accelerating flow: application to downstream fish passage. Ecol Eng. 2012;47:247–53.

    Google Scholar 

  28. de Leeuw JJ, Winter HV. Migration of rheophilic fish in the large lowland rivers Meuse and Rhine, the Netherlands. Fish Manag Ecol. 2008;15:409–15.

    Google Scholar 

  29. Ovidio M, Parkinson D, Sonny D, Philippart JC. Spawning movements of European grayling Thymallus thymallus in the River Aisne (Belgium). Folia Zool. 2004;53(1):87–98.

    Google Scholar 

  30. Aarts BGW, Nienhuis PH. Fish zonations and guilds as the basis for assessment of ecological integrity of large rivers. Hydrobiologia. 2003;500:157–78.

    Google Scholar 

  31. Aquaveo. SMS. 2022.

  32. Hydrotec water and environment engineers GmbH. HydroAS. 2022.

  33. Pickholtz R, Pickholtz E. A novel method for estimating positions using acoustic telemetry. In preparation.

  34. Picard JS, Weiss AJ. Time difference localization in the presence of outliers. Signal Process. 2012;92(10):2432–43.

    Google Scholar 

  35. Lotek Wireless Inc. UMAP.

  36. Smith F. Understanding HPE in the VEMCO positioning system (VPS). 2013

  37. Whetten AB. Smoothing splines of apex predator movement: functional modeling strategies for exploring animal behavior and social interactions. Ecol Evol. 2021;11(24):17786–800.

    PubMed  PubMed Central  Google Scholar 

  38. Johnson DS, London JM, Lea MA, Durban JW. Continuous-time correlated random walk model for animal telemetry data. Ecology. 2008;89(5):1208–15.

    PubMed  Google Scholar 

  39. Zucchini W, Macdonald IL, Langrock R. Hidden markov models for time series: an introduction using R. 2nd ed. Boca Raton: CRC Press; 2016.

    Google Scholar 

  40. Viterbi AJ. Error bounds for convolutional codes and an asymptotically optimum decoding algorithm. IEEE Trans Inf Theory. 1967;13(2):260–9.

    Google Scholar 

  41. Batschelet E. Circular statistics in biology. London: Academic Press; 1981.

    Google Scholar 

  42. McClintock BT, Michelot T. momentuHMM: R package for generalized hidden Markov models of animal movement. Methods Ecol Evol. 2018;9(6):1518–30.

    Google Scholar 

  43. Michelot T, Langrock R. A short guide to choosing initial parameter values for the estimation in moveHMM. 2019.

  44. R Core Team. R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. 2022.

  45. Taugbøl A, Olstad K, Bærum KM, Museth J. Swimming performance of brown trout and grayling show species-specific responses to changes in temperature. Ecol Freshw Fish. 2019;28(2):241–6.

    Google Scholar 

  46. Mateus CS, Quintella BR, Almeida PR. The critical swimming speed of Iberian barbel Barbus bocagei in relation to size and sex. J Fish Biol. 2008;73(7):1783–9.

    Google Scholar 

  47. Booker DJ. Hydraulic modelling of fish habitat in urban rivers during high flows. Hydrol Process. 2003;17(3):577–99.

    Google Scholar 

  48. Hockley FA, Wilson CAME, Brew A, Cable J. Fish responses to flow velocity and turbulence in relation to size, sex and parasite load. J R Soc Interface. 2014;11(91):20130814.

    CAS  PubMed  PubMed Central  Google Scholar 

  49. Burt De Perera T, Holbrook RI. Three-dimensional spatial representation in freely swimming fish. Cogn Process. 2012;13:107–11.

    Google Scholar 

  50. Keefer ML, Peery CA, Lee SR, Daigle WR, Johnson EL, Moser ML. Behaviour of adult Pacific lamprey in near-field flow and fishway design experiments. Fish Manag Ecol. 2011;18(3):177–89.

    Google Scholar 

  51. Jerde CL, Visscher DR. GPS measurement error influences on movement model parameterization. Ecol Appl. 2005;15(3):806–10.

    Google Scholar 

Download references


We are very grateful for the great efforts of our colleagues and partners, who performed many hours of fieldwork in harsh weather conditions to test and install the receiver network, and to catch and tag the studied fish. Special thanks for this to the field experts of INBO: Raf Baeyens, Nico De Maerteleire and Sebastien Pieters, and to our PhD student Jenna Vergeynst. We are very grateful to the German catching and tagging experts: Thomas Lechner (IBF Umwelt), Tobias Epple (Augsburg University) and Johannes Naumann (IBF Umwelt), without whom we could not track the fish. A great thanks goes out to Ianina Kopcki from sje Ecohydraulic Engineering GmbH for assisting in the hydrodynamical modelling. Lastly, we thank Dale Webber and Stephanie Smedboll (VEMCO/Innovasea) for their great support in testing and setting up the 2D acoustic receiver array.


This project has received funding from the European Union Horizon 2020 Research and Innovation Programme under the Marie Sklodowska-Curie Actions, Grant Agreement No. 860800. The study setup and data collection was funded by the European Union's Horizon 2020 (H2020) research and innovation program FITHydro (, under Grant Agreement No. 727830.

Author information

Authors and Affiliations



JE, RM, SP, and IP were involved in data processing and data analysis. IP and JC were involved in the fish tagging and data collection. MS developed the hydrodynamical model. EP and RP calculated the fish positions from the telemetry data. PG was involved in writing the final manuscript. All authors reviewed and contributed to the final manuscript.

Corresponding author

Correspondence to J. Elings.

Ethics declarations

Ethics approval and consent to participate

The experiments with wild fish performed in this study are approved by the Ethical Committee of the Research Institute for Nature and Forest (ECINBO09).

Consent for publication

Not applicable as no data on individual persons has been used.

Competing interests

The authors declare that there is no conflict of interest influencing the results or conclusions coming from this research.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.



See Fig. 12.

Fig. 12
figure 12figure 12figure 12

Habitat use (black) and available habitat (white) for grayling and barbel

See Tables

Table 5 Information on the tagged fish in this study

5 and

Table 6 Information on the individual tracks used in the analyses


Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit The Creative Commons Public Domain Dedication waiver ( applies to the data made available in this article, unless otherwise stated in a credit line to the data.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Elings, J., Mawer, R., Bruneel, S. et al. Linking fine-scale behaviour to the hydraulic environment shows behavioural responses in riverine fish. Mov Ecol 11, 50 (2023).

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: