This section addresses the motion control of the AEF swimming robot to reproduce the desired waveform. Firstly, the formulation of the problem under study is explained. Then, two controllers are tuned for robot propulsion, namely a traditional integer order proportional-integral-derivative (PID) and a fractional order integrator. Motion analysis when applying both controllers is then discussed.
5.1. Problem Formulation
Two main issues have to be addressed when trying to generate a non-reciprocal motion, especially a planar traveling wave. Firstly, the desired waveform must be adapted to the swimming robot dynamics and discretized for its geometry, considering that it is necessary to define a reference for each of the robot’s links. This will fulfill the capabilities of the swimming robot in terms of amplitude and velocity. The resulting waves will be the references of the IPMC links. Secondly, a tracking controller needs to be applied to each link to follow the desired deflection.
The methodology applied to discretize the motion is based on [
28], which divides the flagellum into the same number of segments and the same length as the swimming robot has, providing a matrix,
, that contains the trajectory as a function of time and space for the
N links of the robot. However, it should be noted that in this work the above method is modified to obtain the waveform amplitude instead of the link angle. The type of waveform chosen is the linear Carangiform, due to the physical limitations of IPMCs (slow dynamics and low amplitude responses). Therefore, the linear Carangiform waveform may be the most suitable for this type of material in contrast to other ones that require a greater range of motion, which means very low frequencies or the impossibility to perform the motion. The parameters that define the linear Carangiform motion according to the waveform expression (
2) are collected in
Table 4. With respect to the wavelength, it was defined using the criterion applied in [
28], which means it is equal to the robot’s length.
In order to track the calculated references, as commented above, a controller for each link that takes the following considerations into account is required. Firstly, from the identification procedure, it has been deduced that the dynamics of the IPMC links are very similar and that only variations in the gain are observed as a consequence of its strong dependence on the link length. Secondly, it has been found that an equal link length does not provide the optimal waveform and, consequently, the optimal drive for a given number of links [
25]. With this motivation, a controller robust to variations in the system gain is considered to overcome the robot propulsion, so that it can also be applied after a link length optimization process.
5.2. Control Design
The methodology applied to design the controller is based on the reference model strategy proposed in [
57], which adjusts the step response of the controlled system to an ideal closed-loop system. The frequency domain specifications for the ideal closed-loop are:
Based on the above specifications, the ideal Bode transfer function of a non-integer integrator is taken as the ideal reference model, whose open- and closed-loop forms are, respectively:
where
denotes the crossover frequency, and
is the non-integer order of the reference system. The gain and phase of the ideal reference model (
8) are given by [
57,
58]:
The reference model has a constant phase at any frequency to ensure that the controlled system is robust to gain variations and exhibits an iso-damping property at a step response. Then, based on the above relationships, the system must have a crossover frequency of rad/s and a non-integer order of to meet the desired specifications.
In order to achieve this dynamics with the IPMC link model identified (Equation (
7)), a PID controller is considered in parallel form as:
where
,
, and
are the proportional, integral, and derivative gains, respectively. The controller parameters were determined by an optimization process based on the structure presented in [
57], minimizing the following cost function:
where
is the desired output, obtained from the reference model, and
is the output of the controlled swimming robot link with the proposed controller. Note that cost function (
11) is a combination of the integral time absolute error (ITAE), to evaluate the performance of the system over time (it penalizes the errors that are persistent and neglects the initial errors) [
59], and the integral of absolute error (IAE), to quantify the performance to be sensitive at low errors [
59].
The optimization process is divided into two steps and is carried out by combining both MATLAB
® and Simulink
®. The first step is to implement the system (the dynamics of the third link, i.e., model (
7)) controlled by a PID, whose gains are variable, in closed-loop, together with the scheme corresponding to the reference model. The second step is a MATLAB script that implements an iterative process based on the Nelder–Mead simplex search method, through the function
fminsearch, that runs the mentioned Simulink model calculating the cost function
J given by (
11). In particular, this script varies the parameters of the PID controller until the values that minimize
J are found, i.e., the controller optimal values. In order to be able to find a globally optimal solution, the iterative process was applied for a wide number of initial conditions, which were randomly changed for each optimization. The resulting optimal controller is the following:
It is worth mentioning that other performance indices were tried, but results with small variations were obtained with respect to the ones presented.
Upon analyzing the design method for the IPMC link model, which also contains non-integer order dynamics, the conclusion is drawn that the PID controller attempts to approximate the dynamics of a non-integer order integrator with the purpose of approaching the system to the desired dynamics. On this basis, a non-integer integrator is also considered for comparison purposes with the form:
where
is its order. Unlike PID, the parameters of fractional integrator are calculated analytically from the design specifications, which results in
Moreover, this controller was approximated by the Oustaloup method with four poles and four zeros in the frequency range
rad/s as follows:
The Bode plots of the three designed controllers, namely
,
, and
, are shown in
Figure 9. As can be seen, the PID controller provides a phase of
at 5 rad/s and a positive gain to the system at relatively high frequencies, which will increase the speed of the system, but at the same time, the crossover frequency specification will not be met. In contrast, the non-integer integrator has a bit higher phase at 5 rad/s, namely
, and a positive gain of 15 dB, so the design specifications can be better fulfilled. As for the approximation of the fractional integrator, it should be noted that it performs very close to
, with only a small variation in the phase from the desired
being observed.
Figure 10 illustrates Bode plots of the open-loop system when applying the designed controllers and the approximation. From these frequency responses, the first remark that can lay bare is that the PID controller does not meet the design specifications: as it was commented, the controller increases the speed of the system (
rad/s) and the phase margin is
. The reason for the frequency response mismatch is due to the fact that the optimization process was approached from a time perspective, to adjust the time response of the system for a step input. On the contrary, the system fulfills the design specifications perfectly when applying a fractional order integrator. Furthermore, the phase is flat at crossover frequency and almost constant within an interval around it. In other words, the system is robust to gain variations and the overshoot of the response will be almost constant close to
.
The issues mentioned above can be also observed from the results plotted in
Figure 11, which illustrates the step response of the reference model and that corresponding to each link of the robot when applying the PID (see
Figure 11a) and the fractional integrator and its approximation (see
Figure 11b). As far as the PID controller is concerned, the response for the third link shows a good fit with respect to the reference model response. However, the characteristics of this behavior do not hold for the other links: the overshoot increases as the gain decreases, although the system is faster for the second and third links compared to the other control strategy. This behavior is not observed in the system for the fractional integrator, which also approximates the step response of the reference model and, in the case of applying the controller to other links, the overshoot is maintained, ensuring robustness to gain variations. Regarding the integrator approach, the responses show small differences with respect to the ideal case, with the system velocity and overshoot remaining unchanged for all three links.
5.3. Motion Analysis
The swimming robot model was implemented in Simulink
® on the basis of the description given in
Section 4. Three equal IPMC links are concatenated and modeled with the same dynamics since they have the same length. Specifically, the link dynamics is defined as
, where the model parameters of
for each link are contained in
Table 2. The total displacement of a link is calculated by means of its relative displacement and the angle of the previous link end.
Figure 12 shows the displacement of each link tracking its reference for the designed control strategies (see
Figure 12a) and the comparison between the ideal linear Carangiform motion and the motion resulting from the distributed actuation (see
Figure 12b). Firstly, let us comment on the results of
Figure 12a. Independently of the flagellum segment, both controllers track closely the references, although the PID controller achieves better tracking as the controller increases the speed of the system. However, an increase in the tracking error is also observed as a consequence of the amplitude increase in the reference signal and the compensation of the dynamic motion of the previous link. In order to evaluate the tracking performance of the controllers, the ITAE and IAE indices were calculated. The results of the performance indexes obtained from the simulation are given in
Table 5. It is important to remark that the results of the non-integer order controller correspond to its approximation. The indices validate the previous statement: the best performance is achieved in the first link, where the effort demanded by the reference is lower and the second and third links obtain worse tracking, although the error between them is similar, which shows the robustness of the controller. In addition, the PID controller exhibits a better tracking performance, although its behavior at step response is worse.
With respect to the results of
Figure 12b, the ideal linear waveform, the discretized one obtained from the projection method described in [
28] and the realized waveform are illustrated. As can be seen, the swimming robot is able to perform a non-reciprocal motion through a distributed actuation, although there exists a higher amplitude error and lag on the response when applying the fractional integrator, which will affect the robot’s propulsion. The non-reciprocal motion for the ideal waveform and the obtained by applying each designed controller can be observed more clearly in
Figure 13, which represents a three-dimensional graph showing time, the normal and transverse axis of the swimming robot. For the three cases, the ideal and simulated results show that the flagellum motions perform a wave that travels along the flagellum and over time.