#### 5.1. Comparison between Block Diagram and Bond Graph Models

The simulation results from the block diagram and bond graph models are presented and discussed in this section. While the block diagram dynamic model of the exoskeleton robotic system is simulated via MATLAB software, the simulation of the bond graph modeling is carried out via 20-sim software [

7]. The results from both simulation softwares are plotted with MATLAB.

The exoskeleton system, presented and discussed in previous sections, has been fed with an input torque of $0.1$ $\left[\mathrm{N}\right]$ and a human trunk velocity of $0.05$ $[\mathrm{rad}{\mathrm{s}}^{-1}]$ with a delay of $0.1$ $\left[\mathrm{s}\right]$. The simulations are carried out based on the torque sensed by the torque sensor as an effort variable in the terminology of the bond graph modeling and also the rotational velocity of the brushless DC motor shaft (gearbox transmission input velocity) is a flow variable in the terminology of the bond graph modeling. However, the simulation tests can be extended and implemented for all the system variables.

A comparison between the torque applied on the torque sensor through results from block diagram and bond graph models is demonstrated in

Figure 10. From

Figure 10, it can be inferred that the results from the bond graph model for the torque implemented on the torque sensor is very similar and close to that from the block diagram; however, the accuracy is slightly reduced as the robotic platform (human trunk) moves. The whole average error for the simulation test is around

$0.09$ $\left[\mathrm{N}\right]$ over 1

$\left[\mathrm{s}\right]$.

In addition, the difference between the rotational velocity of the brushless DC motor shaft through results from block diagram and bond graph models is shown in

Figure 11. It can be concluded from

Figure 11 that the two models are very close to each other and the overall average error is about

$0.07$ $[\mathrm{rad}{\mathrm{s}}^{-1}]$ during the first second. Accordingly, the error at the start of the movement slightly increases, but then it starts to approach zero over time.

Finally, an excellent agreement between the block diagram model developed in MATLAB and bond graph model developed in 20-sim can be inferred from both

Figure 10 and

Figure 11. It should be pointed out that using different numerical differential equation solvers with diverse configurations by MATALB and 20-sim is the main reason of the small errors between the simulation results [

7].

#### 5.2. Implementation of Kalman Filter Observer and Performance Analysis

The theory described in the forgoing sections means that both the dynamic model of the exoskeleton and Kalman observer can be implemented. The performance of the observer has been evaluated by comparing the values of the state variables computed by the simulator with the observer estimates on a test case using of a linear quadratic regulator (LQR) controller [

31] with integral action. It is important to note that the synthesis and application of the Linear-Quadratic-Integral control is not described in detail as it is not pertinent to the Kalman observer design and performance assessment. All the simulation results have been executed by means of MATLAB.

The following state-space equations for the LQR controller with integrator action are taken into consideration:

where

${\tau}_{ref}$ is the reference torque of the closed-loop control system and

z is the auxiliary state corresponding to

${y}_{b}$. Thereby, the optimal state-feedback control law is obtained in the form:

where

${F}_{i}^{\prime}$ represents the optimal feedback matrix gain,

${F}_{ix}^{\prime}$ is the proportional matrix gain and

${F}_{iz}^{\prime}$ indicates the integral gain.

${\mathbf{Q}}_{\mathbf{c}}^{\prime}\in {\mathbb{R}}^{7\times 7}$ and

${\mathbf{R}}_{\mathbf{c}}^{\prime}\in {\mathbb{R}}^{1\times 1}$ are positive definite symmetric weighing matrices of the LQR cost function corresponding to the states from the Kalman observer and the human trunk velocity. It is worth mentioning that the states from the observer contains estimated values corresponding to

${\theta}_{m},{\dot{\theta}}_{m},\theta {s}_{int},\dot{\theta}{s}_{int},\theta {s}_{ext},\dot{\theta}{s}_{ext}$ and the estimated torque on the human body.

Varying

${Q}_{c}^{\prime}$ and

${R}_{c}^{\prime}$ matrices cause changes in the location of the closed-loop poles which effects the performance of the system. While the large value of

${R}_{c}^{\prime}$ causes smaller control inputs and thereby larger values of the states, a faster convergence of the states could be obtained by larger elements of

${Q}_{c}^{\prime}$. The following consideration are used to achieve a proper feedback matrix:

where

${e}_{\tau}$ is equal to the difference between estimated and reference torque on the human body. To reject the ramp trajectories arising from the human trunk position during the constant human velocity, the LQR requires a double integrator. Hence, the following formulation is derived:

The LQR optimal control law of Equation (

12) can be written as:

in which

t represents the instantaneous time and

$\tau $ is the variable of the integration associated with the time.

The controllability condition of the pair (

${A}_{i},{B}_{i}$) is an adequate condition for the presence of a state feedback gain

${F}_{i}$ in a way that (

${A}_{i}-{B}_{i}{F}_{i}$) be asymptotically stable.

${F}_{i}$, the controller matrix, can be calculated by minimizing the quadratic performance index of the LQR controller for Equation (

12).

Figure 12 demonstrates the block diagram of the closed-loop control system. In

Figure 12,

${F}_{iz}$ is the gain related to the integrator term corresponding to the torque on the human trunk (last array of

${F}_{i}$) while the estimated torque on the human trunk is indicated by

$\widehat{{y}_{b}}$.

A simulation to evaluate the observer performance has been carried out. The main assumption of this simulation is that the exoskeleton works in assistive mode. That is, the human trunk moves with a constant velocity (${\dot{\theta}}_{h}=0.1$ $[\mathrm{rad}{\mathrm{s}}^{-1}]$) and an assistive torque is applied on the human body by the exoskeleton. This simulated scenario is archived by applying a step reference as the system input with an amplitude of ${\tau}_{ref}=$ 10 $[\mathrm{N}\mathrm{m}]$ and a delay of $0.1$ $\left[\mathrm{s}\right]$ for a time period of $0.5$ $\left[\mathrm{s}\right]$.

It is worth noting that the resulting

${Q}_{c}^{\prime}$ and

${R}_{c}^{\prime}$ matrices and weighting matrices (

${\mathbf{Q}}_{\mathbf{c}}\in {\mathbb{R}}^{8\times 8}$ and

${\mathbf{R}}_{\mathbf{c}}\in {\mathbb{R}}^{1\times 1}$) associated with LQR related to Equation (

12) are:

The final state feed-backs are extracted as follows:

Essentially, controllers based on state feedback which are implemented through state observers can have disappointing properties regarding relative stability even when the state feedback and state observers demonstrate good and robust stability characteristics [

32]. On this basis, stability margins have been evaluated by Nyquist plot (

Figure 13 and

Figure 14) of the loop gain, from the motor plant input (point

${P}_{in}$ in

Figure 12) to the computed torque signal from the controller (point

${P}_{out}$ in

Figure 12). We can see that the plot in

Figure 13, does not encircle the critical point (

$-1+0j$), so the system is stable.

Figure 14 shows the Nyquist plot in the neighborhood of the critical point. The nominal design has a minimum gain margin of approximately

$8.46$$\left[\mathrm{dB}\right]$ and minimum phase margin of about 59

$\left[{}^{\circ}\right]$ with a delay margin of around

$0.007$$\left[\mathrm{s}\right]$ which indicates that the minimum sampling frequency of the control unit should be almost 143

$\left[\mathrm{Hz}\right]$ to guarantee stability.

The bode plot of the transfer function from the input disturbance (human trunk velocity) to the estimated torque on the human body is shown in

Figure 15 to assess the disturbance rejection bandwidth. This determines how quickly the effects correlated with the human trunk motion decline to an acceptable level, for the exoskeleton platform. By considering the bandwidth as the first frequency in which the gain descends to below

$-3\mathrm{dB}$ of its DC value, it can be inferred that the bandwidth for tracking disturbance (human trunk velocity) rejection is almost 52

$\left[\mathrm{Hz}\right]$; nevertheless, it can be concluded that the human motion with the frequency range of 4∼6.2

$\left[\mathrm{Hz}\right]$ has the most destructive effect on the estimated torque.

The first evidence of the observer’s effectiveness is reported in

Figure 16 where a comparison is made between the step responses of the closed-loop control system using the proposed state observer and the linear dynamic model of the system. As it can be inferred from

Figure 16, the step response of the observer and the linear model are very similar.

Figure 17 shows the error on

$\delta {y}_{b}={y}_{b}-\widehat{{y}_{b}}$ that is, the error between the linear model and the estimator in terms of torque on the human body. This is very small with the mean-squared error of about

$0.1\times {10}^{-3}$ $\left[\mathrm{N}\mathrm{m}\right]$ and approaches zero over time. Another interesting finding from

Figure 16 is the undershoot at the beginning of the human motion. This occurs because of the phase delay between the human trunk motion velocity and the estimated torque (non-minimum phase system).

The DC motor velocity is shown by

Figure 18 and

Figure 19. While

Figure 18 shows a comparison between the measured and estimated values of the motor velocity, the error between these values (

$\delta {\dot{\theta}}_{m}$) over time is reported in

Figure 19. Regarding these figures, the mean-squared error is around

$3\times {10}^{-6}$ $[\mathrm{rad}{\mathrm{s}}^{-1}]$ which implies a good agreement between the measured and estimated variables.

Furthermore, according to

Figure 20, the overall torque produced by the brushless DC motor is in the defined torque limit range (

$\pm 0.56$ $[\mathrm{N}\mathrm{m}]$).