Feed-forward motor control of ultrafast, ballistic movements

ABSTRACT To circumvent the limits of muscle, ultrafast movements achieve high power through the use of springs and latches. The time scale of these movements is too short for control through typical neuromuscular mechanisms, thus ultrafast movements are either invariant or controlled prior to movement. We tested whether mantis shrimp (Stomatopoda: Neogonodactylus bredini) vary their ultrafast smashing strikes and, if so, how this control is achieved prior to movement. We collected high-speed images of strike mechanics and electromyograms of the extensor and flexor muscles that control spring compression and latch release. During spring compression, lateral extensor and flexor units were co-activated. The strike initiated several milliseconds after the flexor units ceased, suggesting that flexor activity prevents spring release and determines the timing of strike initiation. We used linear mixed models and Akaike's information criterion to serially evaluate multiple hypotheses for control mechanisms. We found that variation in spring compression and strike angular velocity were statistically explained by spike activity of the extensor muscle. The results show that mantis shrimp can generate kinematically variable strikes and that their kinematics can be changed through adjustments to motor activity prior to the movement, thus supporting an upstream, central-nervous-system-based control of ultrafast movement. Based on these and other findings, we present a shishiodoshi model that illustrates alternative models of control in biological ballistic systems. The discovery of feed-forward control in mantis shrimp sets the stage for the assessment of targets, strategic variation in kinematics and the role of learning in ultrafast animals. Summary: Mantis shrimp raptorial strikes occur too quickly for real-time neural control; instead, control of the strike kinematics occurs before the strikes begin by varying extensor muscle activity and spring compression.


INTRODUCTION
In extremely fast animal systems, muscle contraction occurs prior to movement in order to store elastic potential energy, which is subsequently released through a latching (catch) mechanism (Alexander and Bennet-Clark, 1977;Gronenberg, 1996;Patek et al., 2011). The enhanced conversion rate of elastic potential energy to kinetic energy dramatically increases the power output of the system and reduces the duration of the movements (Patek, 2015), yet often comes at the cost of not permitting real-time neural modifications of the movement. The time scales are too short to permit neural signaling to both monitor and modify the movement once it has begun, thus relegating these systems to a fixed output or variable output through feed-forward control (Dickinson et al., 2000;Ghez et al., 1991;Nishikawa, 1999). Here we examine the mechanisms underlying kinematic variability in extremely fast, ballistic movements, specifically through variation in motor activity prior to the initiation of raptorial strikes in mantis shrimp (Stomatopoda).
Depending on the underlying mechanism, fast, power-amplified systems may or may not be able to generate controlled and variable kinematics (Table 1). In the snapping shrimp Alpheus californiensis, the mechanism for preventing movement during loading of the system is purely mechanical and release occurs through sudden separation of adhesive discs (Ritzmann, 1973). Therefore, it is unlikely that the central nervous system (CNS) can vary behavioral performance. In contrast, in another snapping shrimp species, Alpheus heterochaelis, a second closer muscle contracts to trigger the movement (Ritzmann, 1974). The use of a muscle to release the trigger permits variation in the timing of the trigger release and therefore potentially enables controllable, kinematic variability. Bush crickets generate kinematic variability by adjusting muscle activity prior to movement: tibia velocity is correlated with the number of spikes generated by their fast extensor motor neuron (Burrows and Morris, 2003).
Ballistic toad tongues (Lappin et al., 2006) and salamander tongues (Deban et al., 2007) exhibit correlated motor activity and kinematic output, thus suggesting that these taxa can plan their movements in advance and vary the outcome. Kinematic output is a function of target distance as well as integrated area of electromyographic recordings (EMGs), which can serve as a proxy for the intensity of the muscle activity that builds up elastic potential energy (Deban et al., 2007;Lappin et al., 2006). However, the latch, which should be under neuromuscular control and thus contribute to generate kinematic variation, remains to be identified.
It is not yet known whether mantis shrimp can controllably vary spring-loading and strike kinematics. Variation in muscle activity prior to strikes has been demonstrated in prior research on Squilla empusa and Hemisquilla ensigera (californiensis) (Burrows, 1969;Burrows and Hoyle, 1972); however, the researchers were unable to elicit reliable striking behavior, and thus were not able to determine whether motor control influences strike variability. One spearing mantis shrimp species (Alachosquilla vicina) exhibited correlated strike speed and target distance, suggesting feed-forward control (deVries et al., 2012). While Neogonodactylus bredini kinematics, the focus of the present study, have not been studied previously, the extremely rapid kinematics of other similarly sized smashing mantis shrimp suggest that advance preparation is necessary for kinematic control in N. bredini as well (10 5 m s −2 , 30 m s −1 ; Cox et al., 2014).
Four components are likely to play primary roles in varying the kinematic output of a mantis shrimp raptorial strike: the lateral extensor muscle, the lateral flexor muscle, the latch and the spring ( Fig. 1) (Cox et al., 2014;deVries et al., 2012;Patek et al., 2004Patek et al., , 2007Zack et al., 2009). The lateral extensor and flexor muscles cocontract to prevent movement of the appendage and load the elastic system (saddle and meral-V) (Patek et al., 2007;Rosario and Patek, 2015). The flexor muscle relaxes to release a latch/catch system (Burrows, 1969;Burrows and Hoyle, 1972;McNeill et al., 1972) and the stored elastic energy is converted to kinetic energy of the striking appendage through a four-bar linkage system (Anderson and Patek, 2015;Anderson et al., 2014;Patek et al., 2007). If mantis shrimp utilize a feed-forward system of kinematic variation, then control is likely to originate in muscle activity, spring loading and latch release. The magnitude of action and sequence of activity of these components should ultimately determine whether and how the system could be tuned in advance of a strike.
We tested whether mantis shrimp vary the kinematics of their strikes and whether the magnitude and sequence of motor activity in the flexor and extensor muscles prior to movement are correlated with spring compression and strike kinematics. First, we identified and categorized motor phases prior to strikes. Then, we examined whether strike kinematics and spring compression could be predicted by the duration of particular motor phases, the number of motor spikes during particular motor phases and the timing of spike generation across motor phases. We performed alternative hypothesis testing through the use of Akaike's information criterion (AIC) and linear mixed models (Bolker et al., 2008;Galbraith et al., 2010), thus allowing a robust examination of the key control variables (Gordon et al., 2015;Lu et al., 2015). If mantis shrimp vary their strikes and this variation can be explained by prior variation in motor activity, then these animals exhibit feed-forward control (Dickinson et al., 2000;Kubow and Full, 1999;Nishikawa and Gans, 1996). Already renowned for their visual capabilities (Cronin et al., 2006;Marshall et al., 1996;Schram et al., 2013) and their evolutionary variation in raptorial appendage morphology and mechanics (Anderson and Patek, 2015;Anderson et al., 2014;Blanco and Patek, 2014;Claverie and Patek, 2013;Patek et al., 2013), discovery of feed-forward control in mantis shrimp potentially sets the stage for a new understanding of visual assessment, pre-and post-event learning/ feedback and the evolution of control systems across feeding ecology and kinematics (Nishikawa, 1999).

MATERIALS AND METHODS Animal preparation
Mantis shrimp (Crustacea: Stomatopoda: Gonodactylidae: Neogonodactylus bredini) were collected at the Galeta Marine Station, Smithsonian Tropical Research Institute, Panama, with appropriate collection and export permits. They were then housed individually in artificial saltwater tanks in the Patek Lab at Duke University (44 liter tanks, 12 h:12 h light:dark cycle; 27-28°C, 32-36 parts per thousand) and fed daily with frozen and fresh seafood. Experiments were performed on six animals (five males, one female) held in separate saltwater tanks (8 liters) at room temperature (∼24°C).  (Burrows, 2007); 2 (Ritzmann, 1973); 3 (Ritzmann, 1974); 4 (Gronenberg, 1995a); 5 (Gronenberg, 1995b); 6 (Burrows, 1969); 7 (Burrows and Morris, 2001); 8 (Heitler and Burrows, 1977a); 9 (Burrows and Morris, 2003); 10 (Lappin et al., 2006); 11 (Deban et al., 2007). Mantis shrimp strike using their second thoracic appendages, called raptorial appendages (lateral view, distal to right; scale bar, 5 mm). The elastic mechanism consists of merus exoskeletal structures: the meral-V and saddle. The meral-V rotates proximally and the saddle compresses during spring loading. The striking body (bold outline) consists of the carpus, propodus and dactyl, which rotate distally as a single unit during a strike. The coactivation of the extensor (blue) and flexor (red) muscles pulls a latch that is part of the flexor apodeme (green) into place along the ventral merus (B) and compresses the elastic mechanism (C). (D) Relaxation of the flexor muscle releases the latch and the strike begins. (E-G) These schematics illustrate the actions of the extensor muscle (blue) to compress the elastic mechanism and the flexor muscle (red) to pull the latch on the flexor apodeme (green) over a lump/catch in the ventral merus (F). The schematic 'meral spring' refers to the combined action of the meral-V and saddle springs. Note that the flexor muscle connects the merus to the carpus ( purple), such that when the flexor relaxes, the carpus is freed to move distally (G). 'a' refers to the proximal edge of the saddle; 'b' indicates the ventral joint of the meral-V; 'c' indicates the location at which the meral-V pushes against the carpus during release.
Animal sizes were measured using digital microscopic images (2569×1920 pixels, M165 FC, Leica Microsystems, Buffalo Grove, IL, USA). Merus length was measured as the maximal distal-proximal length of the merus including the meral-V. Propodus length was defined as the distance between the distal propodus-dactyl joint to the most proximal region of the propodus when viewed laterally. Striking body length extended from the attachment site of the lateral extensor muscle on the carpus to the distal-most point on the propodus-dactyl joint (Anderson et al., 2014).

Kinematics
Smashing strikes were elicited by presenting targets that consisted of either the experimenter's finger or a plastic object covered with seafood paste (Fig. 2). The animals either struck with one appendage or both. Given that the high speed video camera was placed laterally, only one appendage was filmed per strike, even though electromyograms (EMGs) were recorded in both appendages for most experiments (see details in 'Electrophysiology'). Animals would often repeatedly strike the target; however, we only analyzed the first strike within a sequence. We then waited 3-5 min before starting the next trial with the total number of trials lasting from 1 to 2.25 h. The individual was kept in its restrained position throughout the tests (Fig. 2) and the experiments were ended when the individual decreased the rate of striking or stopped striking. Spring loading (proximal meral-V rotation), spring release (distal meral-V rotation) and the strike (distal rotation of the propodus) were recorded using high-speed imaging (30,000 frames s −1 , 768×512 pixel resolution, 3-25 μs shutter duration, Fastcam SA-X2, Photron, San Diego, CA, USA). Given that spring compression occurred slowly, these movements were analyzed at 150 frames s −1 ,  The raptorial appendage is shown in lateral view with distal to the right; scale bar, 5 mm. (B) A raptorial strike begins with the sliding phase (1) as the propodus slides distally along the merus followed by the sweep phase (2-5) when the striking body rotates toward the target. During the sweep phase, the meral-V rotates distally, which forces the striking body to rotate distally. Strike kinematics were compared at the 20 deg rotation point of the striking body (4). The strike concludes when the dactyl impacts the target (5). The results of the multi-line method (circles) are similar to those obtained by pivot point method (crosses) (see Appendix, 'Methods: digital image analysis of rotational movements').
whereas the fast spring release and appendage rotation were analyzed at 30,000 frames s −1 . Images were calibrated using landmarks from appendage photographs (M165 FC, Leica Microsystems). EMGs and high-speed images were synchronized using a square wave pulse. Individuals were restrained in a striking position that kept the appendages close to perpendicular to the camera's plane of view (Fig. 2). If strikes moved out of the plane of focus or otherwise appeared off-axis, they were excluded from the analysis.
We digitized two points on the meral-V, at least two points on the merus, and two points on the propodus ( Fig. 3; MTrackJ plugin, ImageJ, v. 1.49c, http://imagej.nih.gov/ij) using natural color patterns or small pieces of electrical tape glued on the merus as the tracking points. Because the entire raptorial appendage was moving during the distal rotation of the meral-V and striking body, we measured the changing orientation of the meral-V and striking body relative to a line drawn along the merus (Fig. 3). The change in angle between these two lines over time was used for the statistical analysis of movement and motor activity. See the Appendix for an explanation of this method and its equivalency to measurements of angular velocity around a specified pivot point. The linear speed of the propodus was calculated as the change in distance across frames of a point digitized at the distal end of the propodus (Fig. 3).
We defined the onset of the strike as carpus rotation, which was then followed by the propodus sliding along the merus. To consistently measure strikes of varying durations, we calculated strike kinematics until the propodus reached 20 deg relative to a line along the merus (Fig. 3). Note that this is a different method than that used in some previous mantis shrimp kinematic analyses, which reported maximal kinematics regardless of the rotational position at the time of impact (Cox et al., 2014;deVries et al., 2012;Patek et al., 2004Patek et al., , 2007. Using two different methods, we smoothed the displacement data to reduce additive noise during subsequent derivative calculations of speed and acceleration. In the first method, a curve was fitted onto the angular displacement data using a generalized additive model (GAM) (Wood, 2006). We used thin plate regression splines for the smoother and varied smoothness [gam function settings: s(time, k=4 or 5); mgcv package v. 1.7.29; R v. 3.1.0; R Core Team, 2015]. Average angular velocity of the meral-V and propodus was calculated using the slope between two interpolated data points (one-tenth of the frame rate) on the fitted curve. The second method entailed performing a 10th-order polynomial curve fit. To reduce spurious end effects on the polynomial fit, we added 10 points at the start and end of the data set, performed the fit, and then removed these extra points. Because we did not find substantial difference between the 10th-order polynomial curve fit and the GAM fit ( Fig. 4), we only report the results of the GAM approach.

Electrophysiology
To investigate the relationships among motor activity, spring loading, spring release and strike kinematics, we analyzed EMGs of 101 strikes (11-24 strikes per individual, six individuals). Within the dataset of strikes with EMG recordings, we also obtained highspeed images of 88 strikes (11-24 strikes per individual, five individuals) with which both spring compression and strike kinematics were analyzed.
The merus contains two flexor muscles (medial and lateral) and at least two extensor muscles (medial and lateral) (Burrows, 1969;Patek et al., 2007). Given that the elastic mechanism is primarily operated by the lateral flexor and lateral extensor, these two muscles were the targets for electrode placement. Two bipolar silver wire electrodes were implanted into the lateral flexor and extensor  (Table 5). (B) As the meral-V rotated distally (spring unloading=negative rotation; crosses), the propodus rotated distally (circles, positive rotation). Tenth-order polynomial curve fitting (red) yielded outputs similar to GAM fitting (black). Kinematics were measured until the propodus rotated 20 deg (horizontal dashed line; Table 3).
muscles, and affixed externally with cyanoacrylate adhesive (Fig. 2) (0.1778 mm PFA coated diameter, A-M Systems, Sequim, WA, USA). Electrical signals were amplified (high pass filter: 300 Hz; low pass filter: 20 kHz; differential AC amplifier 1700, A-M Systems) and digitally sampled at 10 kHz (PowerLab/8SP, AD Instruments, Colorado Springs, CO, USA). Neural spikes in the muscles were detected by visually setting a threshold above noise level. Each time series was smoothed using moving averages to remove high frequency noise (a 1 ms time window was moved from point to point, yielding a 20-point moving average given the 10 kHz sample rate). Using the smoothed time series data, the time stamps at peak spike amplitudes were noted. Pairs of peaks occurring within 1 ms were united as one single spike. This detection process was performed using a custom computer script (v. 3.1.0; R Core Team, 2015).
Crosstalk between the extensor and flexor signals appeared frequently in the EMGs for the flexor, because the extensor is much larger than the flexor and is situated closely to the flexor. We distinguished between flexor and extensor activity by finding simultaneous spike activity in both recordings and comparing their relative amplitude; extensor muscle activity recorded by the flexor electrode occurred simultaneously in both flexor and extensor recordings, but with lower amplitude in the flexor recording. The extensor electrodes did not detect flexor activity. It was not possible to distinguish between medial and lateral flexor motor unit activity; however, contamination by the medial flexor was unlikely, because the lateral extensor is large and the medial flexor is thin and small. Finally, we could not exclude the possibility that spikes were recorded from nerve fibers.

Statistical modeling
To test which muscle activation variables best predicted strike kinematics and spring compression, we performed model comparisons (Fig. 5). Linear mixed effects models for clustered data were used to account for inter-animal variability (Galbraith et al., 2010). Data clusters were defined by each individual's strikes. Individual variability was incorporated as random effects (Venables and Ripley, 2002) into the linear mixed models.
Response variables and explanatory variables were selected for each model and the random effects were incorporated as random slope and random intercept into the model (v. 3.1.0; R Core Team, 2015).
The two response variables and eight explanatory variables comprised the models (Fig. 5). Spring compression was defined as the net proximal rotation of the meral-V and strike velocity was the angular velocity measured when the propodus was oriented at 20 deg relative to the merus. The eight explanatory variables are shown in Fig. 5 and consisted of phase durations, number of spikes across several time windows, and number of spikes divided by different time window durationscalculated as the total number of spikes divided by the duration of the coactivation phase or by the coactivation phase duration plus silent phase duration.
We constructed 19 linear mixed models and two linear models as follows. First, we constructed 16 models consisting of the two response variables (spring compression: proximal meral-V rotation; kinematics: angular velocity) and eight explanatory variables. To test whether the explanatory variables were, in fact, informing the response variable patterns (as opposed to a null model case, in which there is no association between the response and explanatory variables), we constructed two null models consisting of the two response variables, but no explanatory variables. Additionally, to test whether spring compression explained strike angular velocity, we constructed a model for which we switched strike angular velocity as an explanatory variable to a response variable while keeping net spring compression as an explanatory variable. Finally, to compare the best linear mixed model with the best linear model, we constructed two linear models consisting of two response variables (spring compression and angular velocity) and one explanatory variable.
We performed model comparisons from the linear mixed models using AIC scores (Akaike, 1974). Smaller AIC scores indicate relatively better fit and model simplicity than higher AIC scores within each set of comparable models. It should be noted that only the differences between AIC scores, not the absolute AIC scores, are meaningful for model comparisons. There are two different methods for calculating AIC and For the linear model, we selected one of the two response variables and one of the nine explanatory variables. The 'null' in the list of explanatory variables indicates that, for some statistical models, we did not use an explanatory variable. We assumed that the error structure follows a Gaussian distribution. The linear mixed model (outer box), incorporated individual differences (inter-animal variability) as random effects. Data are means±s.d., followed by range. Note that individual 4 performed strikes that were generally not spring loaded, and its meral-V rotation values approached zero (also see Fig. 9). Data are means±s.d., followed by range. Note that individual 4 performed strikes that were generally not spring-loaded, and its meral-V rotation values approached zero (also see Fig. 9).
estimating model parameters: maximum likelihood (ML) and restricted maximum likelihood estimation (REML) (Zuur et al., 2009). To compare the models consisting of different fixed components in mixed models or nested fixed components (but with the same random structure), we used ML (method="ML"; function lme; nlme, v. 3.1-117; R v. 3.1.0; R Core Team, 2015). In contrast, to obtain unbiased parameter estimates and to compare models with nested random structures, we used REML (method="REML"; function lme) (Zuur et al., 2009). We identified the best supported model from these comparisons by their AIC score rank, such that the model with the lowest AIC score was the best supported model and represented the best predictor of the response variable. Datasets and computer code are available from the Dryad Digital Repository: http://dx.doi.org/10.5061/dryad.fk1q6.

RESULTS Kinematics
Spring loading occurred three orders of magnitude more slowly than the angular velocity of spring release and five orders of magnitude more slowly than the angular acceleration of spring release, thus exemplifying the combination of slow spring loading and rapid energy release for power amplification in this system ( Table 2). The amount of spring loading was variable within individuals (Fig. 4), thus setting the stage for variable amounts of elastic potential energy storage. The strikes were predominantly ballistic (i.e. not actively powered by the unloading meral-V), with the peak acceleration of spring unloading occurring prior to peak strike acceleration in 56 of 88 strikes (Fig. 6).
Strike initiation occurred when the carpus began to rotate, the propodus began to slide, and the striking body rotated distally toward its target (Fig. 3). The rotational kinematics reported in Tables 2 and 3 were calculated relative to a line digitized along the length of the merus, rather than by specifying the pivot point of the striking body. This method differs from previous analyses, but it is geometrically equivalent to calculating rotation around a specified pivot point (see Appendix). The results were similar regardless of the method used (Fig. 3).

Motor patterns and movement
Prior to a raptorial strike, motor activity followed predictable patterns that we parsed into five phases: leading phase, coactivation phase, and the silent phase, within which occurred the gap phase and the artifact phase (Fig. 7, Table 4). Extensor muscle activity primarily consisted of large spikes. Flexor muscle activity consisted of both small and large spikes (Fig. 8).
The leading phase was defined as the initial flexor muscle activity prior to a strike, during which time the extensor muscle was silent (Fig. 7, Table 4). Prior to or during the leading phase, the striking body was folded against the merus. During the leading phase, the flexor EMG contained relatively large spikes. Instantaneous flexor spike frequency increased over the duration of the leading phase.
The leading phase ended and the coactivation phase started when extensor activity began during the ongoing flexor activity. During this phase, the meral-V rotated proximally (spring loading). Typically, extensor activity began with a burst of variably sized spikes and then transitioned to more consistent spike sizes at gradually higher rates. In the flexor muscle, large spikes transitioned to smaller spikes during the coactivation phase. The coactivation phase terminated when the extensor muscle spikes ceased. When the extensor motor activity stopped at the end of the coactivation phase, this signaled the start of the silent phase. No movement was visible during the silent phase. The last flexor spike in the silent phase occurred just before strike initiation (Fig. 8). In contrast, the last extensor spike occurred before the last flexor spike, and the timing of the last extensor spike occurred over a wider time range than the final flexor spike (Fig. 8B).
Within the silent phase, two types of EMG traces emerged from the flexor muscle (Fig. 7). The gap phase was defined as the first part of the silent phase, when the flexor muscle sustained highfrequency spikes. During the gap phase, in two animals (35 strikes), small flexor muscle spikes were recorded that might have been obscured in other recordings because of electrical noise. Following the gap phase, the artifact phase consisted of large EMG deflections that ended at the onset of strike initiation. These large deflections occurred at varying frequencies without any particular consistency across strikes.
Across all of these phases, motor activity was variable in terms of duration and discharge rate within and across individuals ( Table 4). The artifact phase was the least variable of all of the phases.
Information regarding motor activity during non-strike behaviors can be found in the Appendix and Figs S2 and S3.

Spring-loading and motor activity
To test which EMG phase best predicts spring compression, we compared linear mixed models (LMMs) and AIC scores of the coactivation phase duration, silent phase duration and a null model (Table 5, Figs 5, 9). The coactivation phase duration model yielded the best AIC score (AIC: 465.4), followed by the silent phase duration model (AIC: 477.3), and both outperformed the null model (AIC: 482.9). Only the coactivation phase yielded a slope significantly different than zero (P=0.0365).
Using extensor spike patterns as predictors of spring compression, we also tested whether the discharge rate during the coactivation phase predicts spring compression better than a null model or a model using the number of extensor spikes before a strike (Table 5, Fig. 9). The number of extensor spikes during the coactivation phase was the best predictor of spring compression (AIC: 461.2), followed by the number of spikes divided by the duration of the coactivation phase (AIC: 482.0) and the null model (AIC: 482.9). Of the three models, only the number of spikes yielded a statistically significant slope (P=0.0249).
To account for possible dynamic changes of extensor motor activity across the coactivation and silent phases, we measured motor activity during four time windows, which yielded decreasing AIC model fits in this order (Table 5) Finally, when we examined individual differences by examining the number of spikes during the coactivation phase versus the number of spikes during the coactivation phase with no random slope or intercept, the former model (AIC: 463.1) substantially outperformed the latter (AIC: 558.6; Table 5). Therefore, incorporation of inter-individual variability enhanced model predictive performance.

Strike velocity and motor activity
We then performed a similar suite of tests to examine the key predictors of strike angular velocity ( Table 6). As in the spring statistical models above, we compared AIC scores across the LMMs of coactivation phase duration, silent phase duration and a null model. Coactivation phase duration was the best predictor of strike angular velocity (AIC: 1263.8), followed by the null model (AIC: 1290.0); the silent phase duration model was the least predictive (AIC: 1291.5; Table 6). Only the coactivation phase duration model had a slope significantly different than zero (P=0.0073). Strike angular velocity was also analyzed in terms of the effects of the number of extensor spikes during the coactivation phase (Table 6, Fig. 9). Strike angular velocity was best predicted by the number of extensor spikes during the coactivation phase (AIC: 1265.8) when compared with spring compression (AIC: 1272.5), the number of extensor spikes divided by coactivation phase duration (AIC: 1292.4) and the null model (AIC: 1290.0). Incorporation of spring compression also markedly improved predictability against the null model; both number of spikes and spring compression yielded slopes significantly different than zero (P=0.0198 and 0.0010, respectively).
We then parsed the explanatory variables into time windows, as described above for the spring compression model tests ( Table 6). The best explanatory model for angular velocity was the number of extensor spikes that occurred 100 ms before strike onset, including the silent phase (AIC: 1275.5), and only this model yielded a slope significantly different than zero (P=0.0253).
Similar to the spring compression results, incorporation of individual differences increased model predictability (AIC: 1265.8) relative to a model not incorporating individual variability (AIC: 1410.6). The individual differences model slope was significantly different than zero (P=0.0198).

DISCUSSION
Mantis shrimp exhibited a consistent pattern of motor activity prior to a strike. Key motor activity variables correlated with spring compression and strike angular velocity. These findings provide a first window into the mechanism by which mantis shrimp adjust their spring loading and strike kinematics prior to movement. In addition, these results raise fundamental questions about the mechanisms that permit animals to strategically plan ballistic strikes that are too fast for real-time neural control.

Kinematics
Spring loading, unloading and striking in N. bredini followed the same sequence and with kinematics similar to other smashers (Table 2, 3) (Cox et al., 2014;Patek et al., 2007). Neogonodactylus bredini strikes began with a sliding phase, when the carpus rotated and the propodus slid along the merus, which then transitioned to a rotational phase (deVries et al., 2012;Patek et al., 2007). Once the propodus rotation began, the peak acceleration of the distal meral-V rotation preceded that of the striking body (Fig. 6), demonstrating that stored elastic potential energy was transmitted from the meral spring to the kinetic energy of the striking body and that the system transitioned to a ballistic, un-powered rotation once spring unloading ceased.

Feed-forward motor control
Similar to the stereotypical 'motor programme' found in locust kicking (Heitler and Burrows, 1977b), mantis shrimp generated a consistent motor pattern prior to a raptorial strike (Fig. 7). The variable spike sizes that occurred prior to strikes (Figs 7, 8) may be explained by regional differentiation of the lateral flexor muscle. Prior research on the phylogenetically basal mantis shrimp species Hemisquilla californiensis revealed two regions in the lateral flexor muscle Porter et al., 2010). The proximal region is composed of electrically passive fibers innervated by a fast excitatory motor neuron. The distal region is composed of spiking fibers innervated by a slower excitatory motor neuron . We found that the small spikes in the flexor present during the pre-strike coactivation phase were not observed in non-strike behaviors. It is possible that the flexor spikes are functionally divisible and that they correspond to the two motor neurons in the flexor as in H. californiensis. Specifically, the large spikes that we recorded in the flexor could be the spikes generated in the proximal region and the smaller spikes could be the ones in the distal region.
Strike angular velocity was predicted by extensor activity and spring compression ( Table 6). The total number of extensor spikes during the coactivation phase best explained both spring compression and strike velocity (Tables 5, 6). This finding suggests that the time constant of the extensor muscle membrane is sufficiently long to allow accumulation of tension as spike Table 5. Using spring compression (rotation of meral-V, deg) as the response variable, alternative motor control models were evaluated using linear mixed models (LMM), linear models (LM) and Akaike's information criterion (AIC) (see Table 4 Intercepts, slopes and their standard errors were calculated using maximum likelihood (ML) except for models in the final question for each response variable (i.e. incorporation of individual variation). Restricted maximum likelihood estimation was used for calculating the LM and LMM model comparisons. ΔAIC was calculated for each question relative to the null model or, when testing for individual effects, relative to the model without random slope and intercept. The best-fit model has the smallest AIC and the greatest ΔAIC relative to the null model. Bold values indicate the best AIC score (smallest value) and the difference between the largest and smallest AIC scores for each question. Table 6. With angular velocity (rad s −1 ) set as the response variable, linear mixed models (LMM), linear models (LM) and Akaike's information criterion (AIC) were used for evaluation of alternative models of motor control (see Table 4 number increases. However, at a finer level, when explanatory variables were examined in particular time windows, the final 100 ms prior to the strike (including the silent phase) best predicted strike velocity and spring compression compared with alternative time windows. These results demonstrate that mantis shrimp can change strike velocity by changing extensor discharge rate at particular time points during muscle activation.

Control of strike release
The meral-V did not move during the silent phase that occurred after the termination of extensor activity and before strike initiation (Figs 4, 7). When the small flexor spikes in the silent phase terminated, a large deflection in the EMGs occurred approximately 10 ms before the strike initiation. Although we only were able to detect small flexor spikes in two of the animals, this sequence suggests that when the flexor motor activity stops, the latch is released and causes the large non-motor spikes just prior to movement (the artifact phase). Given that both the lateral flexor and lateral extensor motor activity turned off prior to a strike, one of two alternative mechanisms likely governs the trigger mechanism. First, sensory receptors, including mechanosensory structures, may determine the timing, similarly to the mandible strike of trap jaw ants (Gronenberg, 1995b;Gronenberg et al., 1993) and locust kicking (Burrows and Pflüger, 1988;Gynther and Pearson, 1986;Heitler and Burrows, 1977a,b;Pearson et al., 1980). Second, selfgenerated interneuronal activity upstream from the reflexive sensori-motor circuit may serve as the trigger Takahata, 2010, 2011). The first option appears most likely in mantis shrimp, given that the sensory signal would thus inform the CNS about the actual motor output, and then the CNS could stop extensor activity before potentially causing muscle or spring damage. Further anatomical and neurophysiological studies are necessary to determine the neural circuit mechanisms underlying the trigger.
One intriguing result is that the extensor and flexor motor activity turned off for a relatively long time period before the strike began. Flexor activity stopped approximately 10 ms before any visible appendage movement. This delay may have been caused by relaxation of an internal spring, such as an apodeme. Alternatively, a snap transition in the spring, torque reversal or shifting lever lengths may delay the spring release (Burrows and Morris, 2003;Cofer et al., 2010;Forterre et al., 2005;Holmes and Crosby, 2007;Noh et al., 2012;Ritzmann, 1974). This delay likely provides the necessary time for the flexor muscle to relax and not tear during the rapid outward rotation of the appendage.

A shishiodoshi model for feed-forward control in ballistic systems
With increasing interest in feed-forward control systems and new discoveries of ultrafast weaponry in animals, we developed a general model that illustrates alternative control mechanisms in mantis shrimp and other ballistic systems. We used a shishiodoshithe classic bamboo device used in Japan to acoustically scare animals away from gardensas a visual and mechanical analogy for these motor mechanisms (Fig. 10). The simplest shishiodoshi has invariant output and moves through action of a single input (Fig. 10B). Single-input control is found in multiple ballistic biological systems. Ultrafast rotation (0.6 ms, 3500 rad s −1 ) and cavitation bubble projection in snapping shrimp are driven by contraction of the claw's closer muscle prior to movement and then movement is initiated either through the sudden separation of adhesive discs or through contraction of a muscle that releases an apodeme latch (Ritzmann, 1973(Ritzmann, , 1974Versluis et al., 2000). In froghopper jumping, a single muscle (the depressor) contracts prior to movement (the muscle antagonist is inconsistently active) and a separate latching system releases the movement (Burrows, 2007).
By adding a 'flexor muscle' (Fig. 10C), one level of control is added that determines whether the system can be loaded: however, this mechanism is still not able to generate controllable variation in movement. Controllable variation becomes possible if the system permits co-contraction of a flexor and extensor (Fig. 10D), because the flexor can be released at varying points during loading, thus changing the outputs. Multiple ballistic biological systems use cocontraction of muscle antagonists to store and release elastic potential energy (Table 1). For example, locusts first co-contract antagonist muscle pairs and then release a kick through relaxation of one of these muscles (Burrows, 1995;Heitler and Burrows, 1977a,b). Similarly, mantis shrimp contract antagonistic muscles in their raptorial appendages and relax the flexors to release a strike (Burrows, 1969;Burrows and Hoyle, 1972;McNeill et al., 1972). Trap-jaw ant mandibles fall somewhere in between: they load the system through activation of closer muscles (i.e. without antagonists), but potentially retain some control by activating a separate trigger muscle to release stored elastic energy (Gronenberg, 1995b).
In the final shishiodoshi modification (Fig. 10E), by pre-setting the amount of extensor activity, a fine-tuned control mechanism can  (Tables 5, 6). Individual 4 ( purple line, x) performed minimal to no spring loading; therefore, meral-V rotation and strike velocity were significantly lower than in the other individuals (Tables 2, 3).
be achieved prior to movement. Similar to the fourth shishiodoshi model (Fig. 10E), mantis shrimp initially activated the flexor muscle to fold the striking body against the merus, and then turned on the extensor muscle during the coactivation phase. After both the flexor and extensor motor activity stopped during the silent phase, strike rotation began (Fig. 7). Analogous to the pre-filled beaker in the fourth shishiodoshi model, the number of extensor spikes and duration of the coactivation phase prior to movement were statistically associated with the amount of spring compression and strike angular velocity. This fourth shishiodoshi model demonstrates how movement can be determined prior to an event while leaving open the interesting question of how mantis shrimp use information, and what type of information, to generate this variation in motor activity and strike kinematics. Internal sensory feedback (for example, proprioceptive feedback) before the initiation of movement likely plays an important role.

Broader implications for behavioral and neural control
The use of internal models in animal movement is a central question, especially in systems with relatively simple neural control mechanisms (Mischiati et al., 2015). For example, the relatively slow reaching movements performed by monkeys that last 100s of milliseconds are likely to be dependent on internal models acquired in advance rather than online sensory feedback control (Desmurget and Grafton, 2000). These alternative mechanisms for real-time control are not possible in ultrafast movements that occur in less than 1 ms, thus allowing exclusive focus on preparatory control. Our findings suggest that strike kinematics by mantis shrimp are controlled in advance of movement, and further studies are needed to identify the neural implementation of the internal model that allows for prior planning and to establish which cues stomatopods are using to vary their strikes. The present study demonstrates variation in strike behavior, but we have not yet established which aspects of the targets elicited the variation in motor activity (Figs 4,8,9).
In conclusion, mantis shrimp can control spring compression and strike velocity in advance of a strike, thus conferring potential damage resistance due to overuse of the hammer, energy savings by using appropriate kinematics for different targets, and the ability to perform strategic kinematics for the various uses of the hammers, such as ritualistic fighting, modifying home sites, knocking out prey, fracturing hardshelled prey and puncturing evasive prey (Adams and Caldwell, 1990;Caldwell and Dingle, 1975;Full et al., 1989;Green and Patek, 2015). Further studies, including the assessment of the risks of striking and the energetics of strikes, will be required to test how mantis shrimp strategically use their lethal weapons safely and effectively (e.g. Green and Patek, 2015). Preparatory control of kinematics raises key questions for future research about the underlying trigger mechanism and the ability to predict the kinematics needed across a range of behavioral and biomechanical contexts.

Appendix Methods: digital image analysis of rotational movements
Digital image analyses of rotational movements are typically performed by calculating the changing angle around a rotating object's fulcrum. Here we illustrate the geometric validity of a simple, alternative method for digitizing and calculating planar, angular rotation. This method does not require specification of a fulcrum and also accounts for overall body motion accompanying the focal rotation of the appendage (Fig. S1).
This method uses two arbitrary linesone reference line on the animal's moving body (line FQ; merus, blue line) and one line placed arbitrarily along the rotating object (line DR: propodus, purple line). The intersection of these two lines occurs at point H and forms the angle φ. The rotating object's fulcrum is located at point A ( pink dot). The blue line FH and the line AB form the intersection Q. The purple line DH and the line AC form the intersection R. These lines form the following angles: The initial angular position of ϕ can be represented as follows using the initial position of θ, α and β: (Fig. S1A): Using the same analysis for the rotated position (Fig. S1B): φ 1 = θ 1 + α + β Therefore, φ 1 -φ=θ 1 -θ, and the two methods yield equivalent angular rotations provided that the body remains stationary in space during the rotation of the appendage. The two-line method can correctly account for planar body movement that may accompany appendage rotation.

Results: non-strike muscle activity
Motor activity during non-strike behaviors followed patterns different than what we observed prior to strikes (Figs S2, S3). In two animals (five strike sequences), motor activity occurred in both appendages, but one appendage did not strike. In the non-striking appendage, flexor motor activity occurred; however, extensor activity was not present in the EMG recording. Thus, coactivation did not occur in the appendage that did not strike. The EMGs in the folded appendage showed flexor activity similar to that in the leading phase, but the extensor and small flexor spikes observed in the coactivation phase of the striking appendage were not present.
When mantis shrimp performed slow movements to dislodge objects (Fig. S2), extensor motor activity was present. Unlike the phasic burst of extensor spikes that occurred at the start of the coactivation phase before a strike, no initial burst occurred during non-strike movements; instead, tonic spikes were present. Small spikes were produced in the flexor, yet the waveforms were qualitatively different from the small flexor spikes during the coactivation phase.