Movement Stabilizing Using Afferent Control of Spinal Locomotor CPG Using Chaotic Takagi-Sugeno Fuzzy Logic Systems : A Simulation Study

Background: External control of the function of the central pattern generators (CPGs), exist in the spinal cord, is possible by electrical or chemical stimulation of some of the spinal Afferents. After restarting the activity of spinal cord CPG, the dynamics of movements such as gait can be changed through the time by controlling the rhythm of the CPG. Methods: The purpose of this study was provision of closed loop control algorithm based on the Takagi-Sugeno fuzzy controller in order to adjust the weight of the spinal cord afferents in a neuromechanical model with the aim of controlling the rhythm of the CPGs. Rhythm control of CPGs has been done with the aim of implementing the process of resetting the phase during gait in order to stabilize the movement against external disturbances. In this paper, the efficiency of a continuous Takagi-Sugeno fuzzy controller with the efficiency of 2 fuzzy Takagi-Sugeno chaotic controllers has been compared. Results: It was shown by the results obtained from the simulation that the process of resetting the motion phase of the skeletal angle in face of applying disturbance in method of chaotic TakagiSugeno fuzzy controller is done with good features in the presence of delayed feedback in decreasing overshoot and undershoot to the amount of 1.982 and 0.17 radians, respectively so that the best amount of afferent to reset the phase and return to the desired angle is provided at the shortest possible time. Conclusion: In this paper, the efficiency of a continuous Takagi-Sugeno fuzzy controller with the efficiency of 2 fuzzy Takagi-Sugeno chaotic controllers has been compared for movement stabilization using spinal cord afferent control. According to the results, the best performance was observed when the chaotic fuzzy Takagi-Sugenocontroller in the presence of delayed feedback was used.


Introduction
][3] CPGs also are capable of producing rhythmic movements like gait. 4,5According to previous research, it was observed that there is a possibility of motion reestablishment after removing stimulation from the upper part of the spinal cord by motion training alone or different combinations of motor training with medication and stimulants of afferents.
7][8][9] But one of the important issues which is still a considered concern is possibility to closed loop control the central pattern generating rhythm with afferents' stimulation which has a crucial role in maintaining balance during gait. 10On the one hand, many different studies on animals and humans have shown that balance in motion during gait is affected by applying an external disturbance with short duration and limited scope, initial stability can be regained using instantaneous reactions (stumbling reactions). 11One of the most well-known type in stumbling reactions is the phase resetting. 12Adjustment and Control of CPG is Movement Stabilizing Using Afferent Control of Spinal Locomotor CPG journals.sbmu.ac.ir/Neuroscience http directly effective in regulating the motion phase. 13Hence, the phase adjustment and control CPG during gait in the motion recovery process is very important.
It should be noted that the neural circuits in the mammal's spinal cord have the ability to control the neural orders associated with the rhythmic movements of the lower part without the presence of nervous inputs related to various parts of the central nervous system as well as sensory feedbacks.Given that sensory feedbacks are required in generating an effective movement, these observations represent the existence of a central motion model of CPG in the spinal cord. 14,15his unit is not exclusive to the spinal cord but it is more dedicated to rhythmic movements.Researchers have shown the role of spinal cord centers in regulating movement. 16,17Reflex arc or response model to stimulus is a fundamental issue to understand the activities of the spinal cord, so that an external stimulus causes a predictable and cliché motion response. 18Based on this, the researchers have proved existence of a central generator at the spinal cord level. 19,20This generator is a neuronal group which does Time alignment and spatial alignment before performing the next moves.This generator can be activated without environmental feedback.The researchers thought that many motion programs such as walking are located in CPG but they observed the evidence that an animal with spinal cord injury can move in their experiments. 21On the other hand, various studies have proven that there are centers of control in the spinal cord which generate motion patterns for walking. 22,23Therefore, these centers which are known as CPG form an important part of models of the walking control system. 24,25lthough the actual performance mechanism of CPG has not been clarified yet, studies of researchers are based on the hypothesis that neural circuits of CPG have been formed from several neural oscillators which generate different types of rhythmic movements in the body. 24,25 periodic signal has three important attributes of amplitude, phase and frequency.
Brain commands and sensory feedback Cause a change in the pattern of motion by changing these attributes. 26n such change, the involvement of brain commands is often more intense than sensory feedback.Therefore, the basic pattern is produced by CPG itself and its changes are done by brain commands and sensory feedback. 27ensory information is applied in the form of feedback.That is, prediction is not conducted based on them but with regard to past experiences, decisions are made. 27The role of afferent feedbacks in control of CPG is such that sensory feedback output adapt CPG to the real world.From another perspective, specific sensory inputs can have a significant effect on CPG rhythm as they can choose, neglect or destroy some rhythm patterns. 28,29Thus, they work like a switch and they can choose a specific pattern or adjust their performance ranges.When the movement starts, afferents' feedbacks can regulate the frequency pattern and the structure and transient state of the subphases.EMG activity range which results from a motor activity pattern can help find a foot position in the rugged land and can also provide a good model for dealing with obstacles. 28,29Hence, phase control and adjustment of CPG during gait in the process of motor recovery is very important but an important issue which was stated in this article, is the possibility to closed loop control of rhythm of CPG which has a determinative role in maintaining balance during gait.In this regard, a closed loop control solution was provided in this article based on the Takagi-Sugeno fuzzy controller in order to adjust the weight of the afferents with the aim of controlling the rhythm of the CPGs.
Accordingly, a controller has been presented in which can control and perform the process of phase resetting in the conditions of mechanical disturbance by adjusting the weight of the afferents after applying perturbation to lower trunk with better characteristics (including lower rate of overshoot, undershoot and resetting speed).The resetting occurs by controlling phase rhythm and CPG through adjusting the weight of the afferents which simulation of electrical stimulation of the afferents.
The capabilities of the biological CPG to generate chaotic as well as periodic behavior provide a ground state for generation of the different types of behaviors by neural activity in these systems. 1 Accordingly, in practice, controlling the phase rhythm of CPG maybe means controlling a chaotic system.In this regard, this research is focused on using the chaotic fuzzy systems to control the rhythm of CPG based on tuning the weight of afferent inputs.

Neural-Mechanical Model
In this study, the simulation studies have been carried out A model of Hodgkin-Huxley type was used here for CPG and it includes a collection of neurons, interneurons and motor neurons as shown in Figure 1. 30,31his collection, as depicted in the Figure 1, is responsible for controlling the muscles of the antagonist GLU and HFL which performs flexion-extension actions.Inhibitory couplings, which reach to opposite neurons through interneurons, create their antagonist function.In other words, when one part is active, corresponding inhibitory interneurons prevents the polarization of the other side. 30,31Of course, sensory feedback signals play an important role in their performance.The Hodgkin-Huxley model has been used for modeling neurons.In this model, neuron membrane is considered as a capacitor in which different electrical streams passes through it.These currents include ionic, synaptic and leakage currents as well as feedback and brain signals.This model is functionally divided into 3 parts consisting of neuromuscular, muscular, and skeletal sections.
The neural section, which is a collection of neurons, interneurons and motor neurons, is of the type of Hodgkin-Huxley model.In this type of the neuron model, how pumps and Ion canals affect membrane potentials and production of action potential has been indicated.Moreover, the muscle fragment has been modeled with a nonlinear while skeletal model has been modeled as a pendulum.
Biomechanical model of single-joint organ consists of a rigid part of the mass (m) and length (l s ) which is connected to a firm rigid base by a hinged joint.
This section on the sagittal plane fluctuates around the suspension point under the control of two muscles of flexor (F) and extensor (E).
The oscillatory motion is described by the second order equation: This section on the sagittal plane fluctuates around the suspension point under the control of two muscles of flexor (F) and extensor (E).
The oscillatory motion is described by the second order equation: .̈= 0.5...  . − .̇+   (, ̇, ).ℎ  () In above-mentioned equations, q is considered as joint angle, I is Inertia torque of the section due to the suspension point in which I = m.Ls 2 / 3. b is angular viscosity in hinged joint, FF is flexing muscle power, FE is extensor of muscle power, he is extensor torque of muscles while hf is flexor torque of muscle.
The following parameters are used in simulation: M = 300g; ls = 300 mm; b = 0.002 g.mm 2 / (ms.rad) Muscle length (L) was calculated as the distance from origin to the connection point and torque arm (h) was computed as the shortest distance from the muscle to the joint.Following equations are utilized for flexor muscles: In these equations, a1 was the distance between the point of suspension and muscle origin (a1=60mm) while a2 was the distance between the point of suspension and the attachment of the muscle to the oscillating portion (a2=7mm).The used equations for extensor muscle are like stated equations above with the difference that the term  −  is implemented instead of q.The In above-mentioned equations, q is considered as joint angle, I is Inertia torque of the section due to the suspension point in which I = m.L s 2 / 3. b is angular viscosity in hinged joint, F F is flexing muscle power, F E is extensor of muscle power, h e is extensor torque of muscles while h f is flexor torque of muscle.
The following parameters are used in simulation: M = 300g; l s = 300 mm; b = 0.002 g.mm 2 / (ms.rad)Muscle length (L) was calculated as the distance from origin to the connection point and torque arm (h) was computed as the shortest distance from the muscle to the joint.Following equations are utilized for flexor muscles: ntioned equations, q is considered as joint angle, I is Inertia torque of the section due sion point in which I = m.Ls 2 / 3. b is angular viscosity in hinged joint, FF is flexing r, FE is extensor of muscle power, he is extensor torque of muscles while hf is flexor scle.
g parameters are used in simulation: = 300 mm; b = 0.002 g.mm 2 / (ms.rad) h (L) was calculated as the distance from origin to the connection point and torque computed as the shortest distance from the muscle to the joint.Following equations or flexor muscles: ations, a1 was the distance between the point of suspension and muscle origin hile a2 was the distance between the point of suspension and the attachment of the e oscillating portion (a2=7mm).The used equations for extensor muscle are like ons above with the difference that the term  −  is implemented instead of q.The le speed is also as follows: ( In these equations, a 1 was the distance between the point of suspension and muscle origin (a 1 = 60 mm) while a 2 was the distance between the point of suspension and the attachment of the muscle to the oscillating portion (a 2 = 7 mm).The used equations for extensor muscle are like stated equations above with the difference that the term π -q is implemented instead of q.The defined muscle speed is also as follows: Muscle length (L) was calculated as the distance from origin to the connection point and torque arm (h) was computed as the shortest distance from the muscle to the joint.Following equations are utilized for flexor muscles: In these equations, a1 was the distance between the point of suspension and muscle origin (a1=60mm) while a2 was the distance between the point of suspension and the attachment of the muscle to the oscillating portion (a2=7mm).The used equations for extensor muscle are like stated equations above with the difference that the term  −  is implemented instead of q.The defined muscle speed is also as follows: Where q represents the angular velocity of the oscillating section and h indicates torque of relevant muscle arm. ( Where q represents the angular velocity of the oscillating section and h indicates torque of relevant muscle arm.

Structure of Fuzzy System Control
As noted earlier, the efficiency of a continuous Takagi-Sugeno fuzzy controller with the efficiency of 2 fuzzy Takagi-Sugeno chaotic controllers in control of the phase reset process based on the weights of the afferents has been evaluated.Regarding the used neuro-mechanical model, complete spinal cord injury has been simulated by eliminating the effect of extracorporeal stimulation.
Presented controller regulates stimulation intensity of IA group afferents when exerting a disturbance as input using the systematic motion information in a way that fuzzy reset process occurs with good quality and motor stability is maintained after eliminating the disturbance effect.The impact level on CPG is very limited and the most important thing is that there is no known and direct correspondence between the amount of weight changes and changes in the rhythm of CPG.Thus, there is a technological limitation on this.
Therefore, the interface between the stimulus and the model of CPG is completely unknown.In general, there is no correct model of CPG system to consider the effect of input electrical stimulation signal.Therefore, utilizing the fuzzy systems for implementation of the controller is preferable.Given the mentioned points, controllers that require a model or need to have a good output have been deleted and the use of fuzzy controllers has been proposed.The chaotic fuzzy system has been also used because of controller capability to produce complex dynamics.
According to the capabilities of the biological CPG to generate chaotic, primary evaluating the chaotic controller can be accountable.Using the chaotic fuzzy system has provided a bed that controller can model CPG behavioral active dynamics in a good way.Then controller performance has been compared with no disturbance mode.The systematic information of movement has been considered as input of controller and the intensity of the afferents' stimulation has been set as controller output.
Due to the controlling structure in the Takagi-Sugeno fuzzy system controller as shown in Figure 2, initially, the neuro-mechanical model was implemented.Then effect of electrical stimulation in the form of variations in the weights of the model afferents has been simulated.By eliminating the effects of spinal cord inputs, the condition Movement Stabilizing Using Afferent Control of Spinal Locomotor CPG journals.sbmu.ac.ir/Neuroscience http of complete spinal cord injury was simulated in the model.Actually, in case of existing external disturbances, afferents' weights were set up in a way that the process of phase resetting occurred with high quality and the motor stability was maintained after removal of the disturbance effect.The fuzzy system was used as a closed loop controller in which outputs of the process were measured and control operations were performed simultaneously.
The goal here is to control the balance but there is no proper feedback to understand the imbalance.Therefore, increasing the range of oscillation of the joint angle is considered as an imbalance and feedback is defined as good or bad for imbalance existence.That is, depending on the location and speed and acceleration of the member, rate of the right balance or the inappropriate balance is specified every moment.The model that is intended to be controlled has an internal control feedback and it creates feedback with sensory-motor afferents.Takagi-Sugeno fuzzy system consists of three inputs and one output.
The first input was considered the joint angle value which is assigned three membership functions of low, medium and high.The second input was the speed of the joint angle which is assigned three membership functions of very positive, very negative and normal angular intensities.The third input is the angular momentum and it is more used to detect instantaneous inserted disturbance which is assigned two membership functions (high and low).The rules were developed in a way that regulating the weight of the aforesaid afferents resulted in a decrease in the angle of deviation, angular velocity changes and acceleration adjustments in an appropriate form.

Takagi-Sugeno Fuzzy System
Fuzzy inference systems have been formed with a set of if-then fuzzy rules.A TSK fuzzy model is in the following form: R j : if x 1 is A 1j and x 2 is A 2j and … and x n is A nj then y = g i (x 1 ,x 2 ,…,x n ) (j=1,2,..,R) In the above relationship is number of input variables, R is the number of fuzzy rules, A ij is the fuzzy set corresponding to the i-th input variable for j-th fuzzy rule and g j is a constant function of x i which usually has a simple linear form as g j (x 1 ,x 2 ,…,x n ) = q 0 + q 1 x 1 + ... + q n x n .
The final output of the above-mentioned fuzzy system is as follows: The final output of the abovementioned fuzzy system is as follows: Where uij is the membership function of the Aij fuzzy set, Mj (1≤mj≤n) is the number of input variables in the foregoing section of fuzzy rules and T is a fuzzy T-norm operator.The TSK fuzzy system is a single fuzzy system.

2-2-2. Chaotic Takagi-Sugeno Fuzzy System
Considering that the continuous Takagi-Sugeno fuzzy system is not capable of producing complex dynamics like chaotic behavior, Controller has faced restriction in controlling the complex system such as CPG of the spinal cord which has high rate of dynamics. 3Therefore, the Takagi-Sugeno fuzzy system was chaotified using 2 methods so that the controller would be more flexible.Conversion methods of continuous Takagi-Sugeno fuzzy system into the chaotic system are as follows:

• In the presence of delayed feedback input
In this section, the system output entered the system as a delayed entry in a moment before.This causes fuzzy system to be capable of generating dynamic behaviors due to having a recursive structure.
In particular, it has been shown that the chaotic dynamics can be also covered by this type of fuzzy system with delayed feedback.In fact, inherent dynamics has been included in this system which can be appropriate method for predicting and modeling dynamic behavior as follows: (4) Where u ij is the membership function of the A ij fuzzy set, M j (1≤m j ≤n) is the number of input variables in the foregoing section of fuzzy rules and T is a fuzzy T-norm operator.The TSK fuzzy system is a single fuzzy system.

Chaotic Takagi-Sugeno Fuzzy System
Considering that the continuous Takagi-Sugeno fuzzy system is not capable of producing complex dynamics like chaotic behavior, Controller has faced restriction in controlling the complex system such as CPG of the spinal cord which has high rate of dynamics. 3Therefore, the Takagi-Sugeno fuzzy system was chaotified using 2 methods so that the controller would be more flexible.Conversion methods of continuous Takagi-Sugeno fuzzy system into the chaotic system are as follows: In the Presence of Delayed Feedback Input In this section, the system output entered the system as a delayed entry in a moment before.This causes fuzzy system to be capable of generating dynamic behaviors due to having a recursive structure.
In particular, it has been shown that the chaotic dynamics can be also covered by this type of fuzzy system with delayed feedback.In fact, inherent dynamics has been included in this system which can be appropriate method for predicting and modeling dynamic behavior as follows: journals.sbmu.ac.ir/Neuroscience http

In the Presence of a Sine Input
In this technique like the previous one, a sine mode feedback was added to the system.It is expected that regulating these parameters is considered as a constraint for optimal performance of the system given the dependence of sin to the values of б and β.Since, the exact values of the parameters б and β are not available and the best value for the controller must be selected with trial and error.

Results
In the simulation studies, at first the model is simulated in the presence of stimuli as well as without the presence of transdermal stimuli (complete spinal cord injury) and ultimately rhythm recovery of CPG with weight increase in afferents is studied.In the next step, adjustment of oscillation period of rhythm generators and oscillator using fuzzy controllers based on adjusting the weight of spinal input afferent were evaluated.The achieved results will be elaborated in the following sections.

Stabilization by Takagi-Sugeno Controller
Regarding the stimulation of afferents by the controller (continuous Takagi-Sugeno), it is obvious that the desired controller should provide the more appropriate value for the weight of afferent immediately after applying the disturbance to reset the phase and return to the preferred angle in the shortest possible time.As a result, reducing the reset time of the phase is very important in the presence of controller.As shown in Figure 3, due to changes in the angle of the skeletal muscle in the presence of the controller, articulation value of angle has been fixed after applying perturbation.
Therefore, the control process was not performed properly.Since the model was a single link and the upper   body was not modeled, the controller has remained constant.Such situation leads to a person falling down in practice.
In the other words, controller failed to cope with complex dynamics of CPG behaviors well.The rules were amended for performance modification of controller.The best obtained result is seen in Figure 4.The number of rules has been increased so that the controller can have more conditions for modeling, yet improving the situation to control balance and reset the phase was not observed.

Stabilization by chaotic Takagi-Sugeno fuzzy Controller
In the next step, the chaotic fuzzy systems, choatified by 2 different were applied.It was expected that such controllers can boost the performance of control system to face with the complex dynamics of CPG.The related results are elaborated in the following sections.

Stabilization by Takagi-Sugeno fuzzy controller with sinusoidal feedback
As seen it was the Takagi-Sugeno fuzzy system as the Movement Stabilizing Using Afferent Control of Spinal Locomotor CPG journals.sbmu.ac.ir/Neuroscience http controller could not achieve appropriate performance even by modifying the rules.Initially, the Takagi-Sugeno fuzzy controller was used with a sinus feedback.The best controller mode was determined with the modifying of the coefficients б and β in equation (6). Figure 5 shows the related result.
As depicted in Figure 5, the controller has managed to have a better performance in comparison to continuous mode but due to its high sensitivity to the values of б and β, finding the optimal amount of weight of afferents to reset the phase and return to the desired angle at the shortest possible time is difficult to work.This sensitivity can cause a constraint for the controller.The amount of phase difference exists between the joint angle trajectory created without controlling the CPG and the joint angle trajectory created with controlling the CPG is very small.As it can be seen in (Table 1), the maximum overshoot and minimum undershoot are 1.972 and 0.8957 radians, respectively.Furthermore, the phase delay between the controlled CPG and common variations of CPG is 36 milliseconds.

Stabilization by Takagi-Sugeno Fuzzy Controller With Delayed Feedback
Another solution to model behaviors and chaotic dynamics is discretization of the system.The system is capable of generating dynamic behaviors due to having a recursive structure by adding system output in a moment before as a delayed entry.Particularly, this fuzzy system with delayed feedback can also cover chaotic dynamics.As shown in figure 6, the measured phase difference between typical and controlled CPG changes in the presence of a sinusoidal feedback (36 ms), was less than the observed value when delayed feedback based technique was adopted (48 ms).
Maximum overshoot and minimum undershoot, without using the controller, are 2.03 and 0.7885 respectively.The amount of phase difference between typical changes of controlled CPG and uncontrolled CPG is 48 milliseconds.Based on Figure 6, the mentioned signal is quickly reset in case of disturbance.Moreover, the observed overshoot and undershoot were 1.98 radians and 1.17 radians, respectively (Table 2).The overshoot and undershoot exist with very small rate of fluctuation relative to the original signal which does not cause an individual imbalance.

Discussion
Performance of continuous and chaotic Takagi-Sogeno fuzzy controller according to computer simulation studies on a neuro-mechanical model encompasses the spinal cord, muscles and skeletal part based on electric stimulation of the afferents in control of the reset phase of the motion has been evaluated in this paper.Combination of fuzzy systems and chaos theory has been used in the current research in a way that system would be capable of   fuzzy reasoning and the production of active and chaotic dynamics so that controller is activated after applying the disturbance to the model and causes the reset of the motion phase in the angular momentum of the organ with proper stimulation of muscle afferents.Using the chaos theory, the designed control system can model a wide range of behaviors in order to optimal adjustment the value of the weight of afferent during the movement.Thus, it seems that the combination of the chaos theory and the theory of the fuzzy set can provide an efficient controller for CPG control based on adjusting the weight of the afferents.Such system not only can enjoy the inference based mechanism of fuzzy system but also can produce chaotic dynamics.In the designed strategy, after applying disturbance the continuous Takagi-Sugeno controller was activated to limit the joint angle deviation with low overshoot and undershoot.
Due to the complexity of the CPG structure, continuous Takagi-Sugeno fuzzy system could not provide the right amount for optimal adjusting the value of the weight of afferent in order to reset the phase and return to the optimal angle in the shortest possible time.This inappropriate performance of the controller causes an imbalance and eventually turns out to fall of the person but in case of using a chaotic fuzzy controller, it has been journals.sbmu.ac.ir/Neuroscience http observed that the system can reset the phase in a short time with low rate of overshoot and undershoot which leads to maintaining individual's balance when applying disturbance and as a result, preventing them from falling.
It was also seen in Figures 5 and 6 that phase reset was done with good speed using Takagi-Sugeno chaotic controller with delayed feedback by applying disturbance to the model in comparison to sinusoidal feedback.Overshoot and undershoot have reached acceptable condition with amounts of 1.982 and 0.17 radians respectively.Phase difference between typical and controlled CPG changes in the presence of a Sinusoidal feedback (36 ms), was less than the observed value when delayed feedback based technique was adopted (48 ms).Accordingly, the achieved results certify the acceptable performance of the chaotic fuzzy controller in stabilizing the neuromechanical system using adjusting the afferent control of spinal CPG.

Figure 2 .
Figure 2. The Structure of the Proposed Control System.

Fuzzy
inference systems have been formed with a set of if-then fuzzy rules.A TSK fuzzy model is in the following form: Rj: if x1 is A1j and x2 is A2j and … and xn is Anj Then y = gi (x1,x2,…,xn) (j=1,2,..,R)In the above relationship is number of input variables, R is the number of fuzzy rules, Aij is the fuzzy set corresponding to the i-th input variable for j-th fuzzy rule and gj is a constant function of xi which usually has a simple linear form as gj (x1,x2,…,xn) = q0 + q1x1 + ... + qnxn.

Figure 3 .
Figure 3.The obtained joint angle, when the continues Takagi-Sugenu fuzzy controller has been used (red trajectory), and without using the fuzzy controller (black trajectory).

Figure 5 .
Figure 5.The obtained joint angle, when no controller has been used (red trajectory), and when the Takagi-Sugenu fuzzy controller with sinusoidal feedback has been used (black trajectory).

Figure 4 .
Figure 4.The obtained joint angle, when the amended continues Takagi-Sugenu fuzzy controller has been used (red trajectory), without using the fuzzy controller (black trajectory).

Figure 6 .
Figure 6.The obtained joint angle, when no controller with sinosidal feedback has been used (red trajectory), and when the discrete Takagi-Sugenu fuzzy controller with delayed feedback has been used (black trajectory).

Table 1 .
The Obtained Maximums Overshoot and Undershoot Incidence When Utilizing Continues Tacagi-Sugeno Fuzzy Controller With Sinusoidal Feedback

Table 2 .
The Obtained Maximums Overshoot and Undershoot Incidence When Utilizing Tacagi-Sugeno Fuzzy Controller With Delayed Feedback