Abstract
Soft gastric simulators are the latest gastric models designed to imitate gastrointestinal (GI) functions in actual physiological conditions. They are used in in vitro tests for examining the drug and food behaviors in the GI tract. As the main motility function of the GI tract, the peristalsis can be altered in some gastric disorders, for example, by being delayed or accelerated. To simulate the stomach motility, a GI simulator must achieve a prescribed healthy or pathological peristalsis. This requires the simulator to be controlled in a closed loop. Unlike conventional controllers that stabilize a controlled plant asymptotically, a finite-time controller regulates state variables to their equilibrium points in a predetermined time interval. This article presents the design and implementation of a finite-time, model-based state feedback controller (based on the differential Riccati equation) on a soft robotic gastric simulator's actuators for the first time. We propose a mass-spring-damper model of a ring-shaped soft pneumatic actuator (RiSPA). RiSPA is a bellows-driven, elastomer-based actuator developed to reproduce motility functions of the lower part of the stomach (pyloric antrum). The proposed model is augmented by a new approach for modeling the soft tissues, where the moments of inertia of the system constituents are considered as time-varying functions. The finite-time controller is successfully applied on the RiSPA in numerical simulation and experimental implementation, and the results were thoroughly analyzed and discussed. Its accuracy and the ability to control in a predetermined time are highlighted in the tracking of peristalsis trajectory and contractive regulations.
Introduction
Food and pharmaceutical industries are demanding gastrointestinal (GI) simulators, because they are cheaper and more efficient on a large scale compared with in vivo tests.1,2 Soft robotic modules and actuators are used to develop the new generation of GI simulators with a near-realistic simulation ability to mimic GI tract functions.1–5 However, due to some difficulties like lacking the rigid skeleton, complex contractive movements, and embodied sensory system, soft robotic GI simulators became challenging in the design, fabrication, and control.
The primary motility function in the GI tract (particularly in the stomach) is called the peristalsis, an advancing wavelike motion that breaks down food particles by continuous radial contractions and relaxations of the muscles. To reproduce a normal peristaltic wave, various actuation strategies like rope driven, syringe driven, or air chamber were introduced for soft robotic stomach simulators, all of which used open-loop control approaches.1–3 However, the stomach's peristalsis and contractive movements have specific dimensions,6,7 which require a feedback system to be reproduced precisely by stomach simulators.
In addition, certain diseases lead to indigestion and disturb the digestion motility process, urging stomach muscles to work with abnormality. Rapid gastric emptying (dumping syndrome) is a stomach abnormality that usually happens to people who have certain types of gastric surgery, leading to the loss of duodenal feedback. 8 Dumping syndrome accelerates the stomach motility and makes the stomach empty its content into the small intestine faster than normal. Gastroparesis (partial paralysis of the stomach) is another disease common in people with diabetes. By damaging the vagus nerve, which is responsible for the contractive movement, gastroparesis prevents stomach muscles from working normally. 9
Another gastric disorder, called functional dyspepsia, disturbs peristalsis during and after a meal. These abnormalities delay or accelerate gastric emptying, induce abnormal antral contractions, and accommodation (the ability of the stomach to spread out appropriately to the size and timing of a meal) issues in the fundus and pyloric antrum. 10 Besides, during the digestion process, the stomach is exposed to a range of disturbances from the food contents, which also demands implementing a closed-loop control system for a stomach simulator. Therefore, if both the healthy and pathologic stomach motilities are of interest, the stomach simulator must be able to generate contractive movements in any fixed time interval.
This can be interpreted as the regulation or tracking problem in finite time in the control perspective. While conventional closed-loop controllers do not guarantee that the system gets regulated to its final (desired) states during a specific time, finite-time controllers can regulate the system in any fixed time interval. Should contractive movements be accelerated or delayed (compared to the normal circumstance), the controller must generate input signals acting in shorter or longer time intervals, respectively.
Finite-time control schemes can stabilize the dynamic system in any finite-time interval, while the state variables remain in a limited bound. Amato et al. solved finite-time output and state feedback problems for systems with uncertainties and unknown disturbances and proposed sufficient conditions for finite-time stability using linear matrix inequalities (LMIs).11–13 Combining the H-infinity method and LMIs, Liu et al. proposed a finite-time control and applied it on a hydraulic turbine governing system model. 14 They showed that the finite-time control has a concise transient state and a stable time. Using the differential Riccati equation, the finite-time H-infinity output controller was designed for continuous linear dynamic systems. 15
The state dependent Riccati equation (SDRE), as a promising model-based feedback control strategy, allows the nonlinearities in the model and possesses the ability to act as a finite-time controller. 16 The conventional SDRE turns the nonlinear structure of the model into a linear form and minimizes a quadratic, infinite horizon performance index to achieve the control law through solving the algebraic Riccati equation. To have a performance in finite time, the conventional infinite horizon performance index is replaced by a finite horizon index along with a penalty term (representing state variable vector in the final time), and the algebraic Riccati equation is converted into a differential equation.17–21 To design and implement the SDRE control, developing the dynamic model is the first step.
Dynamic models for many soft manipulators and actuators (including ring-shaped actuator models to mimic contractive movements) were developed using first principles.22–27 This work develops a nonlinear dynamic model of a bellows-driven, elastomer-based ring-shaped soft pneumatic actuator (RiSPA). RiSPA was designed and fabricated as the primary actuation system for stomach simulators, reproducing the contractive movements of the pyloric antrum. 27 The proposed dynamic model captures all the actuator's behaviors, along with the compliant nature of the elastomer, and can be readily converted into the state-space form. This model makes it possible to apply a wide range of model-based control schemes on the RiSPA. Then, to replicate the contractive motion of stomach muscles in both the healthy and pathologic modes, the finite horizon SDRE (FH-SDRE) strategy is designed and implemented on the RiSPA. This finite-time controller enables the RiSPA to imitate the peristalsis in a wide range of paces with high accuracy.
The remainder of this article is organized as follows. The nonlinear, mass-spring-damper (MSD) based model of the RiSPA is proposed in The
The Dynamic Model Development
The anatomy of the stomach is categorized into four main parts, including the fundus and the body (to store the produced digestion gas and food content), the pyloric antrum (the main part regarding the motility function), and the pyloric sphincter (the lowest part of the stomach) (Fig. 1). While the pyloric antrum generates contractions and propels the food content back and forth, the pyloric sphincter restricts the volume and size of the digesta that can enter the intestine. Figure 1 illustrates how the pyloric antrum was estimated by a physical soft actuator called RiSPA. 27 The RiSPA comprises five silicon bellows (air springs), as the primary actuation system, enclosed in a polydimethylsiloxane frame. When the pneumatic pressure applies on the bellows, the air pressurizes its hollow chamber, leading to symmetrical expansion, mostly in the longitudinal axes. A soft layer connects all five bellows (made of Ecoflex 0030), and a range sensor is installed at the bottom of each bellows to measure the top part's displacement (Fig. 1).

The stomach schematic and its four different main parts. The red-dashed line is the imaginary center line of the stomach. The pyloric antrum is estimated by a ring-shaped actuator with five embedded bellows, with the thickness, inner diameter, and outer diameter of 20, 52, and 82 mm, respectively. A cylindrical soft layer (the green cylinder layer) connects all five bellows, with a diameter of 50 mm, a width of 30 mm, and a thickness of 1 mm.
In previous studies,25,26 the stomach contractions were not assumed lively enough to be considered a dynamic system and categorized as a quasi-static model (with negligible dynamic effects). In quasi-static models, the time dependency is ignored, for such models run really deliberate. However, in the actual stomach, contractions are rapid and time dependent.2,28 In addition, some diseases make the stomach movements slower or accelerated.8–10 Thus, omitting inertia effects and time dependency in the dynamic model makes it unrealistic and incomplete. The finite-time ability, increasing the accuracy, significant reduction in retuning cost and time, the ability to track the undetermined real-time trajectories, dealing with unpredictable changes in the system, and generally achieving better performance demand for designing a finite-time, model-based control, which requires deriving a dynamic model for the system.
Based on the fabricated RiSPA (Fig. 2A), in this article a dynamic model was developed, in which time-dependent movements and deformations were captured. The RiSPA was broken into five 2D hollow circular sectors (HCSs), which were actuated individually. To model the bellows’ deformations, a set of translational springs and dampers was added to the top of each HCS (Fig. 2B). In addition to the radial movements of each HCS (
), the moments of the inertia of each HCS appeared in the dynamic model subsequently.

Although translational and torsional sets of spring/damper imitate the movements of the RiSPA, they do not accurately represent the time-variant geometry and deformability of the compliant material. Addressing this issue, the HCSs’ moments of inertia, as a function of time, were considered in the model, leading to high nonlinearity of the model. Note that the model is considered decoupled, because the soft layer between each two adjacent HCSs is considerably softer than the bellows and has only 1 mm thickness.
To derive the dynamic model of the RiSPA, the Euler–Lagrange method was used as depicted in Equation (1), in which the generalized coordinate vector was defined as
are radial and lateral movements of the ith-HCS, respectively (Fig. 2B). The pneumatic forces applied on each bellows chamber can be presented as
where L is the Lagrangian function, which is the subtraction of the potential energy (Ui) from the kinetic energy (Ti):
Consequently, by combining Equations (1) and (2), and choosing the state variable vector as
, the input-affine, nonlinear dynamic model (of the order of 20) was obtained in the state-space form of
in which:
In Equation (4),
, representing inertia and geometry variations of HCSs:
The RiSPA's specifications are given in Table 1, where its values were obtained from either the physical measurements (dimensions of the bellows and frame) or the model identification (the mass, the stiffnesses, and the damping coefficients). To characterize the model, a unit step function was fed to the RiSPA, and the step response was captured for each HCS individually (Fig. 3). The step response (over 5 s) for each HCS was repeated several times, while the standard deviation turned out negligible. 29

Step response analysis of the RiSPA. The figure includes both the experimental and analytical data for specification of the model. The first five legends represent the data from the experimental step response of the RiSPA. The last two legends are from the analytical solution of the dynamic model, which were tuned until approximately matched the experimental data.
The Physical Characteristic for the Ring-Shaped Soft Pneumatic Actuator
HCS, hollow circular sector.
The lack of information in the experimental data can be substituted with the knowledge about the dynamic model. Thus, the analytical response of the model represented in Equation (3) was calculated, while some of the parameters were fixed due to the physical measurements. The combination of analytical information and experimental data (gray box method) can improve the model's accuracy where prior knowledge of the system is not comprehensive enough for satisfactory modeling. The rest of the model parameters were tuned using the MATLAB curve fitting function (cftool) until the analytical response approximately matched the experimental response (Fig. 3). Consequently, by inserting the values from the gray box method and the physical measurements into the dynamic model [Eq. (3)], the nonlinear, time-variant model of the RiSPA, resembling the pyloric antrum, was obtained.
FH-SDRE Control
The FH-SDRE controller, as a model-based control method, was designed based on the proposed nonlinear model of the RiSPA in Equation (3) to stabilize its state variables (radial and lateral movements of each HCS) concerning the regulation and tracking trajectory problems. Since the RiSPA is a continuous physical system, represented by a set of ordinary differential equations [Eq. (1)], its vector functions, including
In Equation (6) the state cost matrices
where the pair of
is pointwise controllable for all
By constructing the Hamiltonian, including the multiplier
(costate variable),
and using the optimally necessary condition,
the control law which minimizes the cost function of Equation (6) was derived as
By substituting Equation (10) into the Hamiltonian and combining the Hamilton-Jacobi-Bellman equation, the following differential equation was obtained:
To solve Equation (11), which is known as the differential Riccati equation, and find the control gain
which is an ordinary matrix differential equation that can be simply solved by eigenvalues and eigenvectors (leading to an exponential response). Besides, the solution for Equation (12) would have the form of
From the optimal boundary condition (tf free and
Given the fact that the costate variable is a function of
holds, which gives a numerical solution for the differential Riccati equation. To prove the stability, choosing
Results and Discussions
Simulation and implementation architecture
To investigate and analyze the efficiency and practicability of the proposed nonlinear dynamic model and the FH-SDRE controller, the numerical simulation (MATLAB programming) was conducted. The cost matrices [

The numerical simulation and experimental setup architecture.
Should the cost of the process (the control effort) outweigh its time duration (the pace of the peristalsis),
The FH-SDRE control was experimentally implemented on the RiSPA to verify the model and the applicability of the finite-time controller. Figure 4B depicts the various sections and connections among data processing (software) and the physical setup (hardware) for the experimental implementation. The control process initiates in the LabVIEW interface. The control signals (see the control unit in Fig. 4C) are sent to the pneumatic valves through the MyRIO board. Then the pneumatic valves convert the control signal (voltage) into air pressure to actuate the RiSPA. By RiSPA's actuation, the sensory system (range sensor (VCNL4040), Fig. 4B) sends a feedback signal to the LabVIEW (PC) through MyRIO and generates the displacement error. Subsequently, the error is fed to the controller and closed the control loop. To protect the air chambers from rupturing under high pressure, we added a saturation bound before feeding the signal into the pneumatic valves.
The peristalsis trajectory tracking
The RiSPA was used to track a peristalsis trajectory that is defined according to physiological features of the pyloric antrum motility. Given HCSs’ initial position of
where

The numerical simulation results for tracking a peristalsis trajectory for ith-HCS.
To verify the tracking trajectory simulation results and the proposed nonlinear model, an experiment was implemented on the RiSPA with the same peristalsis trajectory [Eq. (17)] and initial condition (Fig. 6). The average RMSE among five HCSs for tracking the peristalsis trajectory was calculated as 1.1 mm, which is 10.3% greater than the error from the simulation in Figure 5. Its main reason is the fluctuations that occurred during the experimental tracking trajectory (Fig. 6A). During the implementation of the FH-SDRE, there was a quick rest between each two-consecutive feedback (20 ms), in which no pressure applies.

The experiment is implemented following the structure depicted in Figure 4.
Since the RiSPA's bellows act like a spring, they tend to retreat instantly when the pressure is discharged between those rests, leading to the fluctuations in Figure 6. Another reason for this difference is that the time-variant FH-SDRE gain,
The control norm (the magnitude of the input signal vector) was used to measure the control effort. Control norm is a dimensionless criterion representing the cost expenditure during the control process. The average of the control norm during the experimental tests (377.11) was less compared with the simulation (1926.8), which also justifies the difference between their RMSEs.
Although the normal frequency of the antral contraction wave is 0.05 Hz, to validate the performance of the FH-SDRE a comparative experiment on higher velocities was implemented. Having a clear comparison, only the movements of 1st-HCS were captured during different frequencies in 100 s time interval. Figure 7 illustrates FH-SDRE's peristalsis trajectory tracking performance for 0.05 Hz (normal wave), 0.5 Hz (rapid wave), and 1 Hz (very rapid wave). According to Figure 7, the HCS successfully follows the peristalsis under the proposed controller by different frequencies.

The comparative experiment test for different frequencies. Three different ranges of frequencies, including 0.05 Hz (20 s period) as the normal speed, 0.5 Hz (2 s period) as the rapid speed, and 1 Hz (1 s period) as the very rapid speed, are compared to each other.
The RMSE was calculated as 1.05, 1.66, and 3.63 mm for 0.05, 0.5, and 1 Hz trajectories, respectively. Due to the actuator's physical limitation and its soft, relatively sluggish nature, the HCS could not retract instantly while tracking the very rapid trajectory, leading to a greater error. Given the average 1.1 mm calculated error and the fact that the entire back and forth stroke of each HCS is 20 mm (Fig. 2A), it can be said that the stomach simulator works averagely with 93% accuracy for 3 to 30 cycles per minute (almost 95% accuracy for normal antral contraction waves). Since the feedback system is of real time, the control system would also deal with variable frequency trajectories within the actuator's physical limitation. This allows us to get real-time trajectories from the actual stomach and feed it to the stomach simulator for mimicking.
Contractive regulation
To show the ability of the FH-SDRE to control the system in finite time, the regulation problem for the contractive movement was solved. Note that cost matrices [Eq. (16)] and physical characteristics (Table 1) were kept the same as the tracking problem. For the simulation, the initial and final state vectors for all HCSs embedded in the RiSPA were chosen

The regulation process for both the conventional SDRE and FH-SDRE in 3 s, where the back-and-forth displacements of HCSs were converted into the radial contraction.
Although in both Figure 8A and B the control laws were the same [Eq. (10)], the control gains were obtained differently in each of them. For the conventional SDRE, the control gain,
The Quantitative Analysis of Each Hollow Circular Sector in the Regulation Problem for Both the Conventional and Finite Horizon State Dependent Riccati Equation Methods in 3 s
FH-SDRE, finite horizon state dependent Riccati equation.
Figure 9A and B illustrates how each state variable, including the angular and translational displacement of ith-HCS in the plane, was regulated to its desired value. A vital criterion in finite-time regulation is the pace of the process. Each state variable must start from its initial position, move toward the final state, and stop there. Otherwise, the system would still have inertia and will not stop moving at the final state. Figure 9C, meanwhile, shows that after finishing the regulation process (in 3 s), the pace of all HCSs turned zero. Figure 9D–F exhibits the reliability test for the regulation problem. To ensure that the FH-SDRE would regulate the RiSPA into any final state, and there is no singularity point while solving the Riccati equation,

The state variables of the dynamic model of the RiSPA, under the FH-SDRE and the reliability test for the contractive regulation.
To highlight the ability to control in finite time, both the FH-SDRE and conventional SDRE methods were experimentally implemented on a single bellows actuator. 29 Figure 10A illustrates that by applying the FH-SDRE, the bellows actuator for the first time reached its desired value (20 mm) in just 1 s (the rise time, which is the response's time to reach the desired value, is 1 s). However, by implementing the conventional SDRE, the rise time was around 2 s. It means that with the same initial and final states, and cost matrices, while the steady-state error is almost the same, the finite-time controller acts faster than the conventional controller. Figure 10B shows the comparison between the control inputs of two controllers. The control norm for the FH-SDRE and conventional SDRE was calculated as 669.96 and 519.69, respectively. In fact, the finite-time control spent 1.3 times more energy (control effort) than the conventional SDRE to compensate for a rapid regulation.

The experimental regulation problem for a single bellows actuator under FH-SDRE and conventional SDRE controllers (following the implementation algorithm depicted in Fig. 4). Single bellows actuator was developed to mimic the stomach muscles. It was made of the same material as RiSPAs.
29
The experimental results were presented for the contractive regulation of the RiSPA under the FH-SDRE in 3 s (Fig. 11). The initial and final states of HCSs were chosen as

The experimental data from the contractive regulation, along with the actual RiSPA,
The Quantitative Analysis of the Experimental Contractive Regulation Problem of the Ring-Shaped Soft Pneumatic Actuator Under the Finite Horizon State Dependent Riccati Equation
Conclusion and Future Works
In this study, we reproduced the peristalsis and contractive movements of the pyloric antrum, the lower part of the stomach, for both the healthy and pathologic states using a RiSPA. The RiSPA was developed with the ability of the contractive movements to be used as the primary actuation mechanism for soft robotic stomach simulators. The FH-SDRE method as a finite-time control scheme was successfully designed and implemented on the RiSPA, providing the entire control system with stability in any predetermined time interval. This makes the RiSPA contract at any desired pace in response to the stomach motility disorders like gastroparesis or functional dyspepsia, potentially in real time or offline. A novel dynamic model was proposed to capture all the deformations and geometry variations of the RiSPA and used in designing the FH-SDRE. In addition to MSD equations, moments of inertia of the RiSPA as time-variant parameters were added to the model to have a near-realistic dynamic behavior.
Experimental tests and numerical simulations were designed and conducted in both the tracking trajectory (where some predetermined state trajectory is to be followed) and regulation (where some steady state is to be maintained) problems to prove the effectiveness and capability of the entire control system in different scenarios. It was shown that the RiSPA follows the peristalsis trajectory successfully under the FH-SDRE control, and its RMSE was insignificant compared to RiSPA's dimensions.
The 1.1 mm RMSE was primarily due to the technical issue regarding the delays (quick rests) while receiving the feedback in implementation structure. The advantage of the FH-SDRE (as a finite-time method) over the conventional SDRE was highlighted in the contractive regulation problem through simulation and experimental results. It was shown that the FH-SDRE could regulate the RiSPA in any predetermined short time interval. In addition, the experimental contractive regulation results were compatible and acceptable compared to the actual pylorus measures and functions. In the future, the FH-SDRE control can be extended and implemented in the whole soft robotic stomach simulator. In addition, the physiological motility data of the pathologic stomach can be fed to the FH-SDRE control loop in real time, and the soft robotic stomach simulator can mimic the motility functions simultaneously. In addition, since the RiSPA is a ring circular soft actuator, it can be used to mimic the heart arrhythmia and irregular intestine and esophagus movements.
Footnotes
Author Disclosure Statement
No competing financial interests exist.
Funding Information
Research was supported by the Riddet Institute, a Centre of Research Excellence, New Zealand.
