# Modeling of Muscle Activation from Electromyography Recordings in Patients with Cerebral Palsy
## 2 Methods
### Analysis and Modeling  
The EMG signal reflects the sum of muscle fiber action potentials, triggered by the neural activation by the motor neurons innervating those fibers. The absolute magnitude of the EMG voltage, however, depends not only on the magnitude of the original signal but also on the gain of the amplifiers, on the placements of the electrodes relative to the muscles' motor points, and on the amount of tissue between the electrodes and the muscles [20; 21]. Therefore, to be able to compare signals recorded from different muscles and different persons, the EMG signal was normalized to the peak value registered for each muscle during cycling. Although this normalization procedure does not allow comparison of the EMG amplitude values or muscle activity levels between participants, comparison of temporal variations of muscle activity is possible. A mathematical transformation was then applied to the normalized EMG signal that takes into account the delay in the propagation of the action potentials along the muscle that will end up in muscle activation, that is, it takes into account the activation history of the muscle. Following the work of [25], the transformation used here was the approximated form of the first order differential equation for a discretized signal and is expressed as [26; 27]:  
\[n(t) = \alpha_{i}\cdot\ E(t-d)-\ \ \beta_{1}\cdot\ n(t-1)-\ \ \beta_{2}\cdot\ n(t-2), \tag{1}\]  
Figure 2: Definition of crank angle and quadrants during cycling. where \(E(t)\) is the filtered normalized EMG voltage at time t, \(n(t)\) is the output of this transformation, \(d\) is the time delay between EMG recording and motor response, and \(\alpha\), \(\beta_{1}\), \(\beta_{2}\) are the second-order dynamics coefficients. These parameters map the transformation from \(E(t)\) to \(n(t)\) and were chosen such that Equation (1) forms a stable equation. That is, together with the \(\alpha\) parameter, they must satisfy the following relations [20]:  
\[\beta_{1} = \gamma_{1}+\gamma_{2}, \tag{2}\] \[\beta_{2} = \gamma_{1}\times\gamma_{2}, \tag{3}\]  
where \(|\gamma_{1}|<1\), \(|\gamma_{2}|<1\) are real values. Furthermore, in order to make \(n(t)\) not exceed 1, the following condition must also be held:  
\[\alpha-\beta_{1}-\beta_{2}=1. \tag{4}\]  
The value of time delay \(d\) in Equation (1) ranges between 10 ms to 100 ms according to the literature [28; 29]. A second transformation was applied to \(n(t)\) to account for the nonlinear characteristics of muscle activation. This accounts for the fact that increasing stimulation frequency of the muscle fibers does not always lead to a steady increase in muscle activation, but that, beyond a certain stimulation rate, the activation does not continue to increase but remains approximately constant. This nonlinear relation between the transformation term \(n(t)\) and the muscle activation \(a(t)\) can be fitted by an exponential function as follows [30; 31]:  
\[a(t) = \frac{e^{A\,n(t)}-1}{e^{A}-1}, \tag{5}\]  
where \(a(t)\) is the muscle activation at time \(t\), \(n(t)\) is the signal output of Equation (1) and \(A\) is a nonlinear shape factor, limited to \(-3<A<0\). Parameters in Equations (1)-(5) were given the values indicated in Table 1.  
The first two initial values of \(n(t)\) (\(n_{t=0}\) & \(n_{t=1}\)) were chosen to correspond approximately to the resting potential of \(\sim\)\(-\)70 mV of a muscle fiber at time zero, and to a higher value at time \(t=1\) reflecting the rapid change in potential after neuronal stimulation. The magnitude of muscle activation \(a(t)\) at the \(0^{\circ}\) point of the cycling path (Figure 2) was then compared between participants with CP and control participants. For that comparison, norm-distance (ND) was computed as the absolute difference between the muscle activation status of a patient with CP (\(C_{p}\)) at the \(0^{\circ}\) position of the cycle path during the active cycling time and the muscle activation value at the same point, averaged across healthy participants (\(H_{p}\)).