1 Introduction

Lower limbs rehabilitation is an essential physical therapy for stroke patients, especially for those stroke patients after surgery. In Taiwan, the case number of hospitalizations due to cerebrovascular diseases is up to 263,620 [1], and about 50% of them have at least moderate disabilities. Limb dysfunction significantly affects the patient's motor function and exercise tolerance, and also increases dependence on daily living. The current standard treatments for stroke include drug therapy, neurological rehabilitation and exercise training to facilitate the recovery of limb function, improve coordination and balance, and enhance daily life functions. The adult stroke rehabilitation guidelines emphasize that intensive and repetitive functional training can improve walking dysfunction after stroke, and suggests robot-assisted functional training combined with traditional rehabilitation [2]. Since stroke patients cannot control their lower limbs autonomously during the rehabilitation process, physical therapists will perform lower limb exercises on the affected lower limbs with their hands, so as to slow down motor function degradation, rebuild or strengthen the patient's motor function. However, physical therapists who provide stroke rehabilitation treatments in hospitals have to bear a very high work loading due to the dramatically increasing number of stroke patients every year [3,4,5,6,7]. To solve this problem, Technology on Prototyping Ultimate Co., Ltd (TOPU) developed an assistive robot for lower limbs rehabilitation [8, 9] of the stroke patients.

The TOPU-developed robotic rehabilitation robot is a three degrees of freedom assistive robot for lower limbs rehabilitation, which is driven by three servo motor and controlled by a Programmable Logic Controller (PLC) system. And the rehabilitation motion of the robot is converted from the treatment content provided by the medical doctor and physical therapist. According to their clinical experience, motion should be driven from the sole of patient. One of the physical therapy motions is knee flexion, the shank must be kept horizontal in this motion. Therefore, the fuzzy control method was adopted to design a controller to achieve the target.

The fuzzy control method originated from fuzzy logic which was first proposed by L.A. Zadeh in 1964 [10]. In 1985, Takagi and Sugeno proposed T-S fuzzy model to modelling a nonlinear system [11]. The concept of T-S fuzzy model is using sector nonlinearity to establish several linear subsystems from original nonlinear system, and those subsystems can be integrated into a T-S fuzzy model by fuzzy membership functions. Based on the T-S fuzzy model, many studies investigate the controller design with different issues [12,13,14,15,16,17,18,19,20]. And the stability of the whole system with the designed fuzzy controller can be proved by linear matrix inequalities (LMIs) [12]. In 2009, polynomial fuzzy control system was proposed which is a general form of T-S fuzzy control system. However, LMIs approach cannot be used to guarantee the stability of the polynomial fuzzy control system. To solve this issue, a sum-of-square (SOS) based stability analysis approach was proposed to instead of LMIs [21].

In this paper, the sole-driven motion of knee flexion has been formulated as a nonlinear system. Since the actual control system is discrete time form and the sampling time is not constant, the nonlinear system was represented by discrete-time fuzzy model with model uncertainties and disturbances. Then, a Lyapunov function was used to derive a SOS-based stability condition. By solving this condition with SOSTOOLs [22], the control gain was obtained and the fuzzy controller was accomplished.

To validate the design of fuzzy controller and assistive robot, ten stroke patients were recruited for the treatment of rehabilitation in the department of physical medicine and rehabilitation of Kaohsiung Medical University Hospital. They were divided into two groups. All patients received conventional post-stroke rehabilitation, and five of them received additional 15-min per session of lower limb rehabilitation using the assistive robot for a total of 20 sessions in four weeks. Finally, a rating scale, Brunnstrom approach, was used to evaluate the motor recovery stage after rehabilitation. The Brunnstrom approach was developed in the 1960’s by Signe Brunnstrom [23]. With seven stages, the Brunnstrom approach breaks down how motor control can be restored throughout the body after suffering a stroke. Basically, muscle movements are the result of different muscle groups working together. Researchers have termed this collaboration between muscles as “synergies”. The brain has the delicate task of coordinating these movements, many of which become severely affected after a stroke [24].

Some researches indicated that the passive movement treatment showed little therapeutic effect due to patients’ laziness or weary [25, 26]. Therefore, a brain-computer interfaces (BCIs) has been introduced to assist the monitoring of the patient’s brain reaction during the rehabilitation. BCIs has been developed to allow communication between the human brain and the external device, which is established by detecting the electroencephalography (EEG)‐based movement intention such as the cortical neural network and EEG power suppression of brain activity within the alpha (8‐13 Hz) and beta (14‐30 Hz) frequency bands [27,28,29,30]. Moreover, some studies have proposed that using BCIs-based robot to perform the rehabilitation task could enhance the treatment effect of stroke rehabilitation [31, 32]. Therefore, a brain-computer interfaces (BCIs) device will be integrated into TOPU-developed assistive robot in the coming future.

The objective of this paper is to design an assistive robot for lower limbs rehabilitation by using fuzzy control. The robot system is designed to assist stroke patients to rehabilitate their lower limbs properly according to the clinical requirement of physical therapist and medical doctor. A novel discrete-time fuzzy control methodology is used to design a controller for the stability of the robot system. The main contributions of this practical research are not only to fulfil the rehabilitation of stroke patients and physical therapists, but also to collect the data of individual patient for the further diagnosis and improvement of lower limbs rehabilitation.

In the following sections, the design of robot system will be introduced, including mechanism design, electromechanical design, and motions control design. Subsequently, a more suitable form of polynomial fuzzy control system and a novel theorem will be proposed. The control performance of the proposed fuzzy-based motion controller will be validated. Consequently, the preliminary experimental results will demonstrate the effectiveness of lower limbs rehabilitation of the stroke patients.

2 System Descriptions

2.1 Mechanism Description

The assistive robot for lower limbs rehabilitation is a three-degree-of-freedom system, including base, frame, slider, shank support and foot fixture. Figure 1 shows the prototype design of the assistive robot. The frame is driven and rotated by a motor located at the base. The slider is driven by screw shaft and motor inside the frame. The foot fixture is used to constrain the patient’s foot and is rotated around the slider by a motor installed in the slider. A shank support is designed to constrain the patient’s shank. Figures 2 and 3 show the mechanism and ergonomics of the assistive robot. The slider was moved to adjusted its location between Joint 1 and 2 for the individual length from hip joint to ankle joint of different patients. The alignment of hip joint between patient and assistive robot must be settled in the first place. Patient’s shank and foot are then constrained as shown in Fig. 2. The whole low limbs are driven by the three motors to ensure the treatment is conducted on the patient by the sole-driven motion of the assistive robot.

Fig. 1
figure 1

The prototype of the assistive robot

Fig. 2
figure 2

The mechanism and ergonomics of the assistive robot

Fig. 3
figure 3

Simplified mechanism of the assistive robot

The motion of assistive robot can be described in terms of the following parameters as shown in Fig. 3. \(L_{thigh}\) and \(L_{shank}\) denoted length of the thigh and shank, respectively. R denoted length from the joint 1 to the joint 2 which can be controlled by the slider. H denoted length from frame to the joint 2. \(\theta_{F}\) denoted angle of frame. \(\theta_{s}\) denoted angle of shank, which was measured by an angle sensor.

2.2 Control System Description

The sole-driven motion of assistive robot is controlled by a PLC through three servo motors. PLC has been widely adopted for the industrial automation which ranges from small modular devices with tens of inputs and outputs (I/O) to large rack-mounted modular devices with a count of thousands of I/O [33]. In this paper, The PLC used for the robot is MicroLogix 1400 sold by Rockwell Automation. An analogical input module and a digital output module are used to collect the sensors’ data and to send the command to the servo motors, respectively. To operate this robot, the communication between human and machine is realized through a designed HMI. Moreover, the motion of rehabilitation can be collected and become very useful database. Figure 4 is the block diagram of control system of the assistive robot.

Fig. 4
figure 4

The block diagram of control system

2.3 Motion Descriptions

Figure 5 shows the simulation of sole-driven motion for knee flexion. From (a) to (f), the simulation demonstrates this assistive robot can rotate patient’s hip joint, knee and ankle smoothly and can remain patient’s shank horizontal. Consequently, the motion of slider must be controlled and can be presented as the following equation, i.e.

$$\theta_{s} = \theta_{F}$$
(1)
Fig. 5
figure 5

The motion process of knee flexion from a to f

To achieve this function, the control goal is to minimize the error between \(\theta_{s}\) and \(\theta_{F}\). Thus, Eq. (1) can be rewritten as

$$\theta_{Err} = \theta_{F} - \theta_{s}$$
(2)

where \(\theta_{Err}\) denotes the angle error. Assume that lengths of thigh and shank are the same, and the angle of the shank can be presented as

$$\theta_{s} = \alpha - \beta$$
(3)

where

$$\theta_{s} = \alpha - \beta$$
(4)
$$\beta = {\text{cos}}^{ - 1} \frac{R}{{\sqrt {R^{2} + H^{2} } }}$$
(5)
$$R = L_{F} - 0.5L_{SLD} - \frac{180}{{\pi \cdot R_{Screw} }} \cdot \theta_{Mo}$$
(6)

\(L_{F}\) denotes length of the frame. \(L_{SLD}\) denotes length of the slider. \(R_{Screw}\) denotes ratio of the screw shaft. \(\theta_{Mo}\) denotes the angle of the motor which drive the slider. Figure 6 shown the parameters description of the frame.

Fig. 6
figure 6

The parameter description of the frame

The time derivative of Eq. (2) can be expanded as

$$\dot{\theta }_{Err} = \dot{\theta }_{F} - \dot{\theta }_{s}$$
(7)
$$= B\left( {\theta_{Mo} ,L_{shank} } \right) \cdot \omega_{Mo} + \dot{\theta }_{F}$$
(8)

where

$$B\left( {\theta_{Mo} ,L_{shank} } \right) = \frac{d\beta }{{d\theta_{Mo} }} - \frac{d\alpha }{{d\theta_{Mo} }}$$
(9)
$$\omega_{Mo} = \frac{{d\theta_{Mo} }}{dt}$$
(10)

\(\omega_{Mo}\) denotes angular velocity of the second motor.

By Euler discretization method [34], the discrete-time model of Eq. (8) is obtained.

$$\theta_{Err} \left( {k + 1} \right) = \theta_{Err} \left( k \right) + t_{s} \left( k \right) \cdot B \left( {\theta_{Mo} \left( k \right),L_{shank} } \right) \cdot \omega_{Mo} \left( k \right) + t_{s} \left( k \right) \cdot \dot{\theta}_{F} \left( k \right)$$
(11)

where \(t_{s} \left( k \right)\) is sampling time and k is the kth step. In this robot control system, the sampling time is affected by the size of the PLC program, which is between 0.03 s and 0.1 s. Therefor, \(t_{s} \left( k \right) = 0.065 + {\Delta }\left( k \right)\), \({\Delta }\left( k \right) \in \left[ {\begin{array}{*{20}c} { - 0.035} & {0.035} \\ \end{array} } \right]\). Let \(x\left( k \right) = \theta_{Err} \left( k \right)\), \(u\left( k \right) = \omega_{Mo} \left( k \right)\), \(d\left( k \right) = \dot{\theta }_{F} \left( k \right)\), \(x\left( {k + 1} \right) = \theta_{Err} \left( {k + 1} \right)\), \({\varvec{B}} = B\left( {\theta_{Mo} \left( k \right),L_{shank} } \right)\), Eq. (11) can be rewritten as

$$x\left( {k + 1} \right) = x\left( k \right) + \left( {0.065 + \Delta \left( k \right)} \right) \cdot {\varvec{B}} \cdot u\left( k \right) + \left( {0.065 + \Delta \left( k \right)} \right) \cdot d\left( k \right)$$
(12)
$$= {\varvec{A}}x\left( k \right) + \left( {\overline{\user2{B}} + {\varvec{W}}_{b} \Delta \left( k \right){\varvec{Y}}_{b} } \right) \cdot u\left( k \right) + \left( {{\varvec{D}} + {\varvec{W}}_{e} \Delta \left( k \right){\varvec{Y}}_{e} } \right) \cdot d\left( k \right)$$
(13)

where \({\varvec{A}} = 1\), \(\overline{\user2{B}} = 0.065 \cdot {\varvec{B}}\), \({\varvec{W}}_{b} = {\varvec{B}}\), \({\varvec{Y}}_{b} = 1\), \({\varvec{D}} = 0.065\), \({\varvec{W}}_{e} = 1\), \({\varvec{Y}}_{e} = 1\). Finally, the control issue of the knee flexion can be solved by designing a controller for Eq. (13).

Overall, the assistive robot system consists of mechanism, electromechanical devices, and motion controller. The rehabilitation work of physical therapist can be completely replaced by the robot to assist stroke patients rehabilitating their lower limbs properly according to the clinical requirement. The assistive robot can also collect the completed rehabilitation data for the further diagnosis and improvement of lower limbs rehabilitation.

3 Fuzzy-based Motion Control

3.1 Fuzzy Control Systems

Consider the nonlinear discrete-time system (13) which is equal to the Eq. (14).

$$x\left( {k + 1} \right) = f\left( {x\left( k \right),u\left( k \right),d\left( k \right)} \right)$$
(14)

where k denotes the kth step, \(f\left( {x\left( k \right),u\left( k \right),d\left( k \right)} \right)\) denotes nonlinear function, \(x\left( k \right) \in {\Re}^{n}\) denotes state vector \(u\left( k \right) \in {\Re}^{m}\) denotes input vector, \(d\left( k \right) \in {\Re}^{s}\) denotes disturbance input with bounded L2 norm, that is \(d\left( k \right) \in L_{2} \left[ {0,\infty } \right)\). To make the subsequent equation presentation clearer, the following symbols \(x_{ + }\), x, u and d have replaced \(x\left( {k + 1} \right)\), \(x\left( k \right)\), \(u\left( k \right)\) and \(d\left( k \right)\), then a simplified presentation of Eq. (14) was obtained as Eq. (15).

$$x_{ + } = f\left( {x,u,d} \right)$$
(15)

By the concept of sector nonlinearity, Eq. (15) can be expanded as several subsystem, and all the subsystems can be combined into a fuzzy model with fuzzy membership functions. The subsystem with model uncertainties and disturbances is described as follows.

$$\begin{array}{*{20}l} {Subsystem\,i:} \hfill \\ {IF\,z_{1} \,is\,M_{i1}\,AND\,\cdots AND\,z_{p} \,is\,M_{ip} ,} \hfill \\ {THEN\,x_{ + } = {\varvec{A}}_{i} x} \hfill \\ {\, + \left( {{\varvec{B}}_{i} + {\varvec{W}}_{bi} \Delta {\varvec{Y}}_{bi} } \right)u + \left( {{\varvec{D}} + {\varvec{W}}_{ei} \Delta {\varvec{Y}}_{ei} } \right)d} \hfill \\ \end{array}$$
(16)

The whole fuzzy model is

$$\begin{array}{*{20}c} {x_{ + } = \mathop \sum \limits_{i = 1}^{r} h_{i} \left( {\varvec{z}} \right)} \\ \end{array} \left. {\left\{ {{\varvec{A}}_{i} x} \right. + \left( {{\varvec{B}}_{i} + {\varvec{W}}_{bi} \Delta {\varvec{Y}}_{bi} } \right)u + \left( {{\varvec{D}} + {\varvec{W}}_{ei} \Delta {\varvec{Y}}_{ai} } \right)d} \right\}$$
(17)

where \(i = 1,2, \cdots ,r\), \(r\) denotes number of rules, \(p\) denotes number of premise variables, \(M_{ip}\) denotes fuzzy set, \(z_{1,} z_{2} , \cdots ,z_{p}\) denotes premise variables and \({\varvec{z}} = \left[ {z_{1,} z_{2} , \cdots ,z_{p} } \right]\), \(\mathop \sum \nolimits_{i = 1}^{r} h_{i} \left( {\varvec{z}} \right) = 1\), \(h_{i} \left( {\varvec{z}} \right) = \frac{{g_{i} \left( {\varvec{z}} \right)}}{{\mathop \sum \nolimits_{i = 1}^{r} g_{i} \left( {\varvec{z}} \right)}} \in \left[ {\begin{array}{*{20}c} 0 & 1 \\ \end{array} } \right]\), \(g_{i} \left( {\varvec{z}} \right) = \mathop \prod \limits_{j = 1}^{p} \mu_{ij} \left( {z_{j} } \right)\), \(\mu_{ij} \left( {z_{j} } \right)\) denotes grade of the membership of \(z_{j}\) in \(M_{ij}\). \({\varvec{A}}_{i} \in {\Re}^{n \times n}\), \({\varvec{B}}_{i} \in {\Re}^{n \times m}\),\(\user2{ D} \in {\Re}^{n \times s}\), \({\varvec{W}}_{bi} \in {\Re}^{n \times q}\), \({\varvec{Y}}_{bi} \in {\Re}^{q \times m}\), \({\varvec{W}}_{ei} \in {\Re}^{n \times q}\), \({\varvec{Y}}_{ei} \in {\Re}^{q \times s}\) denotes constant matrices. \(\Delta \in {\Re}^{q \times q}\) denotes a symmetric matrix and \(\left\| \Delta \right\| \le \frac{1}{\psi }\). \(\psi\) denotes a constant.

By the concept of parallel distributed compensation (PDC) [12], a fuzzy controller shares the same membership function and number of rules as the given fuzzy model (17) where the fuzzy controller is designed as

$$\begin{array}{*{20}l} {Controller\,i:} \hfill \\ {IF\,z_{1} \,is\,M_{i1}\,AND\,\cdots AND\,z_{p} \,is\,M_{ip} ,} \hfill \\ {THEN\,u = - {\varvec{F}}_{i} x} \hfill \\ \end{array}$$
(18)

and the whole fuzzy controller is

$$u = - \mathop \sum \limits_{i = 1}^{r} h_{i} \left( {\varvec{z}} \right){\varvec{F}}_{i} x.$$
(19)

Final, the overall of the controlled fuzzy system can be obtained as Eq. (20).

$$\begin{gathered} \begin{array}{ll} {x_{ + } = \mathop \sum \limits_{i = 1}^{r} \mathop \sum \limits_{j = 1}^{r} h_{i} \left( {\varvec{z}} \right)h_{j} \left( {\varvec{z}} \right)} \hfill \\ \end{array} \hfill \\ \times \left\{ {\left( {{\varvec{A}}_{i} - \left( {{\varvec{B}}_{i} + {\varvec{W}}_{bi} \left( x \right)\Delta {\varvec{Y}}_{ai} } \right){\varvec{F}}_{i} } \right)x} \right.\left. { + \left( {{\varvec{D}} + {\varvec{W}}_{ei} \left( x \right)\Delta {\varvec{Y}}_{ei} } \right)d} \right\} \hfill \\ \end{gathered}$$
(20)

3.2 SOS-based Stability Conditions

This section proposed SOS-based stability conditions to guarantee the stability of the controlled fuzzy system, i.e. Equation (20), The conditions can be solved by SOSTOOLS [22]. In the process of deriving stability conditions, the disturbance rejection problem in the fuzzy system of Eq. (20) can be formulated as the following inequality.

$${\mathop {\sup }\limits_{{\begin{array}{*{20}c} {{\varvec{d}}\left( k \right) \in L_{2} \left[ {0,\infty } \right)} \\ {\parallel{\varvec{d}}\left( k \right)\parallel_{2} \ne 0} \\ \end{array} }} \frac{{\parallel{\varvec{x}}\left( k \right)\parallel_{2} }}{{\parallel{\varvec{d}}\left( k \right)\parallel_{2} }} \le \gamma}$$
(21)

where \(\gamma\) denotes an H performance index. On the other hand, the following lemmas were used for proofing the proposed theorem.

Lemma 1 [35]

If the following equation holds, the matrix \(G = \left[ {G_{ij} } \right] \in {\Re }^{r \times r}\) is copositive.

$${\varvec{h}}^{T} {\varvec{Gh}} = \mathop \sum \limits_{i = 1}^{r} \mathop \sum \limits_{j = 1}^{r} h_{i} h_{j} G_{ij} \ge 0$$
(22)

where \(h = \left[ {h_{1} ,h_{2} , \cdots ,h_{r} } \right]^{T} \in {\Re}^{r}\) and \(h_{i} \ge 0\). The copositivity of the matrix can be checked by a relaxed approach which is described in Lemma 2.

Lemma 2 [35]

There is a relaxation for lemma 1 if the following inequality is satisfied.

$$f^{\alpha } \left( {\varvec{s}} \right) = \left( {\mathop \sum \limits_{k = 1}^{r} s_{k}^{2} } \right)^{\alpha } \mathop \sum \limits_{i = 1}^{r} \mathop \sum \limits_{j = 1}^{r} s_{i}^{2} s_{j}^{2} G_{ij} {\text{ is SOS}}$$
(23)

where \({\varvec{s}} = \left[ {s_{1} ,s_{2} , \cdots ,s_{r} } \right]^{T}\) and \(\alpha\) is a nonnegative integer.

Theorem 1

With the performance indices \(\gamma\) and \(\psi\), the stability of the closed-loop control system in Eq. (20) can be guaranteed if there exist a positive symmetric matrix \({\varvec{Q}} \in {\Re}^{n \times n}\) and matrices \({\varvec{M}}_{i} \in {\Re}^{m \times n}\) such that Eqs. (24) and (25) are satisfied.

$$\upsilon_{1}^{T} \left( {{\varvec{Q}} - \varepsilon_{1} {\varvec{I}}} \right)\upsilon_{1} {\text{ is SOS,}}$$
(24)
$$\left( {\mathop \sum \limits_{k = 1}^{r} s_{k}^{2} } \right)^{\alpha } \mathop \sum \limits_{i = 1}^{r} \mathop \sum \limits_{j = 1}^{r} s_{i}^{2} s_{j}^{2} \upsilon_{2}^{T} \left( {\left[ {\begin{array}{*{20}c} {\it{\varvec{\varTheta}}_{ij} - \overline{\user2{W}}_{ij}^{T} \overline{\user2{W}}_{ij} } & {*} \\ {\overline{\user2{Y}}_{ij} } & {\it{\varvec{\varPhi}}_{ij} } \\ \end{array} } \right] - \varepsilon_{2ij} {\varvec{I}}} \right)\upsilon_{2} {\text{ is SOS}}$$
(25)

where

$$\overline{\user2{X}}_{ij} = {\varvec{AQ}} - {\varvec{B}}_{i} {\varvec{M}}_{j} ,$$
(26)
$$\it{\varvec{\varPhi}}_{ij} = block - diag\left( {\varsigma_{bi}^{2} \eta^{2} {\varvec{I}},\,\varsigma_{ei}^{2} \eta^{2} {\varvec{I}}} \right),$$
(27)
$$\it{\varvec{\varTheta}}_{ij} = \left[ {\begin{array}{*{20}c} {\varvec{Q}} & {*} & {*} & {*} \\ {\varvec{0}} & {\gamma^{2} {\varvec{I}}} & {*} & {*} \\ {\varvec{Q}} & {\varvec{0}} & {\varvec{I}} & {*} \\ {\overline{\user2{X}}_{{{ij}}} } & {\varvec{E}} & {\varvec{0}} & {\varvec{Q}} \\ \end{array} } \right],$$
(28)
$$\overline{\user2{W}}_{ij} = \left[ {\begin{array}{*{20}c} {\varvec{0}} & {\varvec{0}} & {\varvec{0}} & {\varsigma_{bi} {\varvec{W}}_{bi}^{T} } \\ {\varvec{0}} & {\varvec{0}} & {\varvec{0}} & {\varsigma_{ei} {\varvec{W}}_{ei}^{T} } \\ \end{array} } \right],$$
(29)
$$\overline{\user2{Y}}_{ij} = \left[ {\begin{array}{*{20}c} { - {\varvec{Y}}_{bi} {\varvec{M}}_{j} } & {\varvec{0}} & {\varvec{0}} & {\varvec{0}} \\ {\varvec{0}} & {{\varvec{Y}}_{ei} } & {\varvec{0}} & {\varvec{0}} \\ \end{array} } \right],$$
(30)

\(\varepsilon_{1} > 0\) and \(\varepsilon_{2ij} \ge 0\) are constants. \(\gamma\), \(\psi\), \(\varsigma_{bi}\) and \(\varsigma_{ei}\) are positive parameters. \(\upsilon_{1}\) and \(\upsilon_{2}\) are vectors that are independent of \({\varvec{x}}\). In addition, the matrices \({\varvec{F}}_{i}\) which are the control feedback gains can be obtained from \({\varvec{Q}}\) and \({\varvec{M}}_{i}\) as \({\varvec{F}}_{i} = {\varvec{M}}_{i} {\varvec{Q}}^{ - 1}\).

Proof

The candidate of Lyapunov function is chosen as follows:

$$V = x^{T} {\varvec{Q}}^{ - 1} x$$
(31)

where \({\varvec{Q}} \in {\Re}^{n \times n}\) is a symmetric matrix. The difference of \(V\) is defined as

$${\Delta }V = x_{ + }^{T} {\varvec{Q}}^{ - 1} x_{ + } - x^{T} {\varvec{Q}}^{ - 1} x.$$
(32)

If \({\Delta }V\) satisfies the following inequality

$$- {\Delta }V - x^{T} x + \gamma^{2} d^{T} d \ge 0,$$
(33)

the Eq. (21) can be guaranteed [12]. The Eq. (33) can be expanded as

$$- x_{ + }^{T} {\varvec{Q}}^{ - 1} x_{ + } + x^{T} {\varvec{Q}}^{ - 1} x - x^{T} x + \gamma^{2} d^{T} d = \xi {{\varvec{\Upsilon}}}\xi^{T} \ge 0$$
(34)

where \(\xi = \left[ {\begin{array}{*{20}c} {x^{T} } & {d^{T} } \\ \end{array} } \right]\),

$$\begin{gathered} {{\varvec{\Upsilon}}} = \left[ {\begin{array}{ll} {{\varvec{Q}}^{ - 1} } & {*} \\ \varvec0 & {\gamma^{2} {\varvec{I}}} \\ \end{array} } \right] - \left[ {\begin{array}{ll} {\varvec{I}} \\ \varvec0 \\ \end{array} } \right]\left[ {\begin{array}{ll} {\varvec{I}} & \varvec0 \\ \end{array} } \right] \hfill \\ - \mathop \sum \limits_{i = 1}^{r} \mathop \sum \limits_{j = 1}^{r} h_{i} \left( {\varvec{z}} \right)h_{j} \left( {\varvec{z}} \right)\left[ {\begin{array}{ll} {\left( {{\varvec{A}} - {\varvec{B}}_{i} {\varvec{F}}_{j} - {\varvec{W}}_{bi} {\Delta }{\varvec{Y}}_{bi} {\varvec{F}}_{j} } \right)^{T} } \\ {\left( {{\varvec{D}} + {\varvec{W}}_{ei} {\Delta }{\varvec{Y}}_{ei} } \right)^{T} } \\ \end{array} } \right]{\varvec{Q}}^{ - 1} \hfill \\ \times \mathop \sum \limits_{i = 1}^{r} \mathop \sum \limits_{j = 1}^{r} h_{i} \left( {\varvec{z}} \right)h_{j} \left( {\varvec{z}} \right)\left[ {\begin{array}{ll} {{\varvec{A}} - {\varvec{B}}_{i} {\varvec{F}}_{j} - {\varvec{W}}_{bi} {\Delta }{\varvec{Y}}_{bi} {\varvec{F}}_{j} } & {{\varvec{D}} + {\varvec{W}}_{ei} {\Delta }{\varvec{Y}}_{ei} } \\ \end{array} } \right] \hfill \\ \end{gathered}$$
(35)

By Schur complement, the following matrix inequality is obtained from Eq. (35).

$$\left[ {\begin{array}{*{20}c} {{\varvec{Q}}^{ - 1} } & {*} & {*} & {*} \\ \varvec0 & {\gamma^{2} {\varvec{I}}} & {*} & {*} \\ {\varvec{I}} & \varvec0 & {\varvec{I}} & {*} \\ {\left( {\begin{array}{*{20}c} {\mathop \sum \limits_{i = 1}^{r} \mathop \sum \limits_{j = 1}^{r} h_{i} \left( {\varvec{z}} \right)h_{j} \left( {\varvec{z}} \right)} \\ { \times \left( {\begin{array}{*{20}c} {{\varvec{A}} - {\varvec{B}}_{i} {\varvec{F}}_{j} } \\ { - {\varvec{W}}_{bi} \Delta {\varvec{Y}}_{bi} {\varvec{F}}_{j} } \\ \end{array} } \right)} \\ \end{array} } \right)} & {\left( {\begin{array}{*{20}c} {\mathop \sum \limits_{i = 1}^{r} h_{i} \left( {\varvec{z}} \right) \times } \\ {\left( {{\varvec{D}} + {\varvec{W}}_{ei} {\Delta }{\varvec{Y}}_{ei} } \right)} \\ \end{array} } \right)} & \varvec0 & {\varvec{Q}} \\ \end{array} } \right] \ge \varvec0$$
(36)

Multiplied the both side of the matrix inequality of Eq. (36) by \(block - diag\left( {{\varvec{Q}},{\varvec{I}},{\varvec{I}},{\varvec{I}}} \right)\), the above matrix inequality is equivalent to

$$\left[ {\begin{array}{*{20}c} {\varvec{Q}} & {*} & {*} & {*} \\ \varvec0 & {\gamma^{2} {\varvec{I}}} & {*} & {*} \\ {\varvec{Q}} & \varvec0 & {\varvec{I}} & {*} \\ {\left( {\begin{array}{*{20}c} {\mathop \sum \limits_{i = 1}^{r} \mathop \sum \limits_{j = 1}^{r} h_{i} \left( {\varvec{z}} \right)h_{j} \left( z \right)} \\ { \times \left( {\begin{array}{*{20}c} {\overline{\user2{X}}_{{{\varvec{i}}j}} \left( x \right)} \\ { - {\varvec{W}}_{bi} \Delta {\varvec{Y}}_{bi} {\varvec{M}}_{j} } \\ \end{array} } \right)} \\ \end{array} } \right)} & {\left( {\begin{array}{*{20}c} {\mathop \sum \limits_{i = 1}^{r} h_{i} \left( {\varvec{z}} \right) \times } \\ {\left( {{\varvec{D}} + {\varvec{W}}_{ei} {\Delta }{\varvec{Y}}_{ei} } \right)} \\ \end{array} } \right)} & \varvec0 & {\varvec{Q}} \\ \end{array} } \right] \ge \varvec0$$
(37)

The matrix inequality of Eq. (37) can be rewritten as

$$\mathop \sum \limits_{i = 1}^{r} \mathop \sum \limits_{j = 1}^{r} h_{i} \left( {\varvec{z}} \right)h_{j} \left( {\varvec{z}} \right)\left( {{\it\varvec{\varTheta}}_{ij} + \overline{\user2{W}}_{ij}^{T} {\varvec{R}}_{ij} \overline{\user2{Y}}_{ij} + \overline{\user2{Y}}_{ij}^{T} {\varvec{R}}_{ij}^{T} \overline{\user2{W}}_{ij} } \right) \ge \varvec0$$
(38)

where \({\varvec{R}}_{ij} = block - diag\left( {\frac{\Delta }{{\varsigma_{bi} }},\frac{\Delta }{{\varsigma_{ei} }}} \right)\). The left-side of Eq. (38) can be expanded as

$$\sum \limits_{i = 1}^{r} \mathop \sum \limits_{j = 1}^{r} h_{i}\left( {\varvec{z}} \right) h_{j} \left( {\varvec{z}} \right) \times {\left( {\varvec{\varTheta}}_{ij} - \overline{\varvec{W}}_{ij}^{T} \overline{\varvec{W}}_{ij} - \overline{\varvec{Y}}_{ij}^{T} {\varvec{R}}_{ij}^{T} {\varvec{R}}_{ij} \overline{\varvec{Y}}_{ij} + ( {\overline{\varvec{W}}_{ij} + {\varvec{R}}_{ij} \overline{\varvec{Y}}_{ij} } )^{T} ( {\overline{\varvec{W}}_{ij} + {\varvec{R}}_{ij} \overline{\varvec{Y}}_{ij} } ) \right)}$$
(39)
$$\ge \mathop \sum \limits_{i = 1}^{r} \mathop \sum \limits_{j = 1}^{r} h_{i} \left( {\varvec{z}} \right)h_{j} \left( {\varvec{z}} \right)\left( {{\it\varvec{\varTheta}}_{ij} - \overline{\user2{W}}_{ij}^{T} \overline{\user2{W}}_{ij} - \overline{\user2{Y}}_{ij}^{T} {\varvec{R}}_{ij}^{T} {\varvec{R}}_{ij} \overline{\user2{Y}}_{ij} } \right)$$
(40)
$$\ge \mathop \sum \limits_{i = 1}^{r} \mathop \sum \limits_{j = 1}^{r} h_{i} \left( {\varvec{z}} \right)h_{j} \left( {\varvec{z}} \right)\left( {{\it\varvec{\varTheta}}_{ij} - \overline{\user2{W}}_{ij}^{T} \overline{\user2{W}}_{ij} - \overline{\user2{Y}}_{ij}^{T}{\varvec{\varPhi}}_{ij}^{ - 1} \overline{\user2{Y}}_{ij} } \right) \ge \varvec0$$
(41)

By Schur complement, the following matrix inequality is obtained from Eq. (41).

$$\mathop \sum \limits_{i = 1}^{r} \mathop \sum \limits_{j = 1}^{r} h_{i} \left( z \right)h_{j} \left( z \right)\left[ {\begin{array}{*{20}c} {{\it\varvec{\varTheta}}_{ij} - \overline{\user2{W}}_{ij}^{T} \overline{\user2{W}}_{ij} } & {*} \\ {\overline{\user2{Y}}_{ij} } & {{\it\varvec{\varPhi}}_{ij} } \\ \end{array} } \right] \ge \varvec0$$
(42)

The Eq. (42) is guaranteed if Eq. (43) holds.

$$\mathop \sum \limits_{i = 1}^{r} \mathop \sum \limits_{j = 1}^{r} h_{i} \left( z \right)h_{j} \left( z \right)\upsilon_{2}^{T} \left[ {\begin{array}{*{20}c} {{\it\varvec{\varTheta}}_{ij} - \overline{\user2{W}}_{ij}^{T} \overline{\user2{W}}_{ij} } & {*} \\ {\overline{\user2{Y}}_{ij} } & {{\it\varvec{\varPhi}}_{ij} } \\ \end{array} } \right]\upsilon_{2} {\text{ is SOS}}.$$
(43)

The Eq. (25) implied that Eq. (43) hold by lemma 2. Q.E.D.■

4 Experimental Results

4.1 Verification of Motion Control

In the robot system, \(\theta_{Mo} \in \left[ {\begin{array}{*{20}c} 0 & {209\pi } \\ \end{array} } \right]\), \(L_{shank} \in \left[ {\begin{array}{*{20}c} {364.51} & {443.69} \\ \end{array} } \right]\). Using the fuzzy model, let \({\varvec{z}} = B\left( {\theta_{Mo} ,L_{shank} } \right)\) and \(i = 1,2\), the membership was obtained as

$$M_{1} \left( {\varvec{z}} \right) = \frac{{0.0054 - {\varvec{z}}}}{0.0049}$$
(44)
$$M_{2} \left( {\varvec{z}} \right) = \frac{{{\varvec{z}} - 0.0005}}{0.0049}$$
(45)

and the robot motion system Eq. (13) can be represented as a fuzzy model as follows:

$$x_{+}=\mathop \sum \limits_{i=1}^{2} h_{i} \left( {\varvec{z}} \right) \times \left\{{ {\varvec{A}}x + (\overline{\varvec{B}}_{i} + {\varvec{W}}_{bi} \Delta {\varvec{Y}}_{bi})\cdot u + ( {\varvec{D}} + {\varvec{W}}_{ei} \Delta {\varvec{Y}}_{ei} ) \cdot d} \right\}$$
(46)

where \(h_{1} \left( {\varvec{z}} \right) = M_{1}\)(\({\varvec{z}}\)), \(h_{2} \left( {\varvec{z}} \right) = M_{2} \left( {\varvec{z}} \right)\), \({\varvec{A}} = 1\), \(\overline{\user2{B}}_{1} = 0.065*0.0005\), \(\overline{\user2{B}}_{2} = 0.065*0.0054\), \(\user2{ E} = 0.065\), \({\varvec{W}}_{b1} = {\varvec{W}}_{b2} = {\varvec{W}}_{e1} = {\varvec{W}}_{e2} = {\varvec{Y}}_{e1} = {\varvec{Y}}_{e2} = 1\), \({\varvec{Y}}_{b1} = 0.0005\), \({\varvec{Y}}_{b2} = 0.0054\).

Solving the stability conditions (i.e. Theorem 1) with \(\alpha = 0\), \(\gamma^{2} = 0.8\) and Eq. (46), the control gains were obtained.

$${\varvec{F}}_{1} = 8754$$
(47)
$${\varvec{F}}_{2} = 2175$$
(48)

Let \(L_{shank} = 392\,{\text{mm}}\), \(L_{F} = 948\,{\text{mm}}\), \(L_{SLD} = 150\), \(R_{Screw} = 90^{\circ } /\,{\text{mm}}\), \({\text{H}} = 112.11\,{\text{mm}}\), \({\uptheta }_{F} \left( 0 \right) = 1.875^{\circ }\), and the angular velocity of the first motor was given as follows.

$$\dot{\theta }_{F} = \left\{ {\begin{array}{ll} & \;\;\;{1.3589^{\circ } /{\text{s}}\;,\;} \;{0 \le t < 23} \\ & \;\;\;\;\;\;\;\;\;\;\;{0^{\circ } /{\text{s}}\;,\;} {23 \le t < 29} \\ & { - 1.3589^{\circ } /{\text{s}}\;,\;} {29 \le t \le 53} \\ \end{array} } \right.$$
(49)

Validation test was conducted on a researcher to demonstrate attitude of assistive robot under knee flexion control as shown in Fig. 7, and the system response was shown in Fig. 8. From the system response, the range of \(\theta_{Err}\) is between \(\pm 2^{\circ }\). The test results showed that the knee flexion motion is well controlled and is almost identical to the conventional treatment performed by physical therapists.

Fig. 7
figure 7

The knee flexion process of assistive robot from a to f

Fig. 8
figure 8

The system response

4.2 Validation Tests of Lower Limbs Rehabilitation

To validate the design of fuzzy controller and assistive robot, ten stroke patients were recruited for the treatment of rehabilitation in the department of physical medicine and rehabilitation of Kaohsiung Medical University Hospital. They were divided into two groups. The first group is control group whose patients are only treated conventional post-stroke rehabilitation. The second group is robot group whose patients are treated additional 15-min per session of lower limb rehabilitation using the assistive robot for a total of 20 sessions in four weeks. The patients were evaluated for their Brunnstrom stage at the following time frames:

  • T0: Before using the robot on the 1st day

  • T1: After using the robot on the 1st day

  • T2: After using the robot on the 10th session

  • T2: After using the robot on the 10th session

The sequential changes in the Brunnstrom motor recovery status of the first group (control 01–05) and second group (robot 01–05) was shown in Table 1. The data shows that three of the five patients exhibited improvement in lower limb motor recovery status after 20 sessions of training. However, in the first group, all 5 patients did not show improvement in lower limb motor recovery status.

Table 1 Brunnstrom motor recovery status at different time frames in both groups

4.3 Comparison Study of Motion Control

In fuzzy control, many studies of the discrete-time fuzzy controller design have been investigated [36,37,38,39]. A discrete-time fuzzy model and a controller was proposed in the form of polynomial [36]. Moreover, the designs of SOS-based observer [37] and fault estimator [38] were investigated for discrete-time fuzzy systems. To deal with the discrete-time fuzzy model with model uncertainties and disturbances, a SOS-based fuzzy controller design was proposed in [39]. However, the proposed fuzzy model in [37] is not a suitable form because the model uncertainty is not been considered in the disturbance matrix. Therefore, the proposed model in this paper has avoided this problem. To demonstrate the difference between the method proposed in this paper and the method proposed in the study [37], a simulation has been performed. Since the sampling time could not be setting in physical test, this situation may cause every comparison method to have no same condition. To avoid this problem, the comparison study was performed by simulation with a given same sampling time input.

By the method in the paper [37] with Eq. (12), \(\gamma^{2} = 0.8\) and \(\eta_{bi} = 28.5714\), a two-rule fuzzy controller has been done and the control gains was obtained as follows.

$${\varvec{F}}_{1} = 5169$$
(50)
$${\varvec{F}}_{2} = 2144$$
(51)

Let \(L_{shank} = 392\,{\text{mm}}\), \(L_{F} = 948\,{\text{mm}}\), \(L_{SLD} = 150\), \(R_{Screw} = 90^{\circ } /{\text{mm}}\), \({\text{H}} = 112.11{\text{mm}}\), \({\uptheta }_{F} \left( 0 \right) = 0^{\circ }\), and the angular velocity of the first motor as Eq. (52), the simulation results were rolled out and shown in Fig. 912. Figure 9 shown the system response of the controller design by [39]. Figure 10 shown the system response of the fuzzy SOS-based motion control that proposed in this paper, where the controller parameters were given as shown in Sect. 4.1. Figure 11 shown the sampling time of simulation. Figure 12 shown the comparison of tracking error \({\uptheta }_{Err}\).

$$\dot{\theta }_{F} = \left\{ {\begin{array}{ll}& {11.83^{\circ } /{\text{s}},} {\sin \left( {0.5818t + 0.5498} \right) \ge 0.5225} \\& { - \;11.83^{\circ } /{\text{s}},} {\sin \left( {0.5818t + 0.5498} \right) \le - \;0.5225} \\& {0^{\circ } /{\text{s}},} {{\text{other}}} \\ \end{array} } \right.$$
(52)
Fig. 9
figure 9

The system response of the controller designed by [39]

Fig. 10
figure 10

The system response of the fuzzy SOS-based motion control

Fig. 11
figure 11

The sampling time of the simulation

Fig. 12
figure 12

The comparison of tracking error

In Fig. 12, the tracking error of the motion controller proposed in this paper is smaller than the other one. The main difference is that the proposed fuzzy model has considered model uncertainty in the disturbance matrix, therefore the proposed fuzzy SOS-based motion control method is better.

5 Conclusions

This paper proposed a novel approach of assistive robot design for lower limbs rehabilitation using fuzzy control. The aim of the motion control is to keep the patient’s shank horizontal when knee flexion is performed. In order to satisfy this goal, fuzzy controller method was used to design a two-rules fuzzy controller. By proposing a mathematical theory, the control gain can properly control the slider and to stabilize the system of assistive robot. Validation tests were conducted on researcher to ensure a horizontal shank during the knee flexion motion under this fuzzy controller. Validation tests were also conducted on ten stroke patients for their of lower limbs rehabilitation in the Kaohsiung Medical University Hospital. Apparently, the evaluation data of Brunnstrom stage showed that using the TOPU-developed assistive robot with fuzzy controller can effectively improve the lower limb motor recovery status.

Challenges still lie in the future that the lack of concentration of patients may scarify the effectiveness of rehabilitation and the happening of cramps of patients may hurt patient’s lower limbs during the rehabilitation. To maintain patient’s concentration during the rehabilitation, active control motion accompanying with BCIs will be introduced to assistive robot design in the future work. BCIs can provide assistive robot the monitoring of brain reaction during the rehabilitation; therefore, the motion output of assistive robot can be adjusted to make response through the proper active control design. Cramps usually happened in stroke patients and stiffened their lower limbs. Some clinical experiences used to relief the cramps will be also introduced to assistive robot design in the future work through the detection of sensors and the proper active control design.