— Transparent interaction, or the reduction of human-robot interaction forces, is an important quality of gait training exoskeletons. In this paper, we investigate the feasibility of using a repetitive controller for reducing impedance of gait training exoskeletons using force feedback. We used a two-mass spring damper model system, and simulated the application of repetitive force controllers with the objective of reducing the end-point impedance of the distal mass. We designed and applied three repetitive controllers: a 1st order, a 2nd order designed for random signal period error, and a 2nd order designed for constant signal period error. We compared these three repetitive controllers subject to plant model parameter error, random signal period error, and constant signal period error. Numerical simulations under nominal conditions show that via repetitive force control, it is possible to reduce the endpoint impedance to the targeted magnitude and RMSE force below the limit achievable with force controllers while guaranteeing passivity. Furthermore, we established that the application of a 2nd order repetitive controller designed for random period error is highly robust to random period error - exceeding the performance of the passive proportional con- troller up to 30% error of nominal frequency. Furthermore, this 2nd order repetitive controller designed for random period error maintains a 100% convergence rate through 60% plant parameter error. I. INTRODUCTION Transparent human-robot interaction, or the achievement of low interaction forces during unassisted movements, is a necessary quality of effective lower extremity exoskeletons. Commonly during gait training protocols there are phases of baseline and after-effect evaluation in which the exoskeleton is set to zero-torque mode and interaction forces are not desired. Force feedback is a simple method implemented on previous robotic platforms [1], [2], but has limitations due to the fact that the input of the plant does not change until error is already observed. Furthermore, stability of force-feedback system crucially depends on an accurate knowledge of the dynamics of the controlled system, knowledge that can be difﬁcult to obtain in practice. In fact, a system using high control gains tuned to achieve high transparency performance may not be passive, and thus could be unstable during inter- action with a percentage of the user population. Passivity is a desirable condition for the dynamics of a human-interacting exoskeleton, as it guarantees the stability of the robot when interacting with a range of environmental conditions [3], This work was supported by the NSF-CBET-1638007 1Department of Biomedical Engineering, University of Delaware, Newark, DE 19713, USA 2Department of Mechanical Engineering, University of Delaware, Newark, DE 19713, USA +Corresponding author - fabs@udel.edu[4]. The trade-off between stability and performance is particularly an issue on robotic platforms with high reﬂected inertia and therefore high end-point impedance [1]. As such, there is a need for novel controllers capable of reducing the robot’s end-point impedance while remaining stable for a robust range of conditions such as those encountered during human-robot interaction. In previous Bowden cable driven exoskeleton work, itera- tive learning control has been utilized to learn periodic cable tensioning patterns for the gait cycle [5]. The implementation of this learning controller was possible due to the cable slacking in the swing phase of the gait cycle, creating a reset point between periods. However, not all exoskeletons have this possibility, and in most cases the interaction forces are continuous signals with the same periodicity as the resulting motion. The repetitive controller (RC), intended for periodic and continuous operation in the time domain, could be a feasible option for gait training exoskeletons during continuous oper- ation [6]. RC is a feedforward control method for reducing error of the current task cycle based on the error observed in the previous task cycles, and is suitable for continuous operations. In robotics, RCs have been applied to trajectory control [7] and we are not aware of any applications of these controllers in force control. RCs require some knowledge of the dynamics of the system they are applied to, and have traditionally been applied to systems with highly regular periodicity. In gait training exoskeletons, the dynamics of the coupled system are usually not known with great accuracy due to between- subject variability. Also, stride-by-stride variation in gait spatiotemporal parameters is on the order of 3-5% [8]. There are formulations of RCs (high-order controllers) which combine information measured on multiple previous cycles to improve robustness input period error [9], [10]. However, the suitability of these controller to be used for gait training exoskeletons has yet to be established. In this work, we present formulations for RCs that use force feedback to reduce the end-point impedance of a gait training exoskeleton. We test the performance of these RCs via simulations applied to a two-mass spring damper system classically used to study controllers for human-interacting robots under force control. We ﬁrst simulate behavior in a case where we assume perfect knowledge of system parameters and perfect periodicity of subject inputs. Then, we conduct simulations in non-ideal conditions to assess the robustness of different formulations of the controller to variations in parameters of the system dynamics, and to variations in the period of the inputs that would be applied by the subject. II. METHODS A. Mechanical System We use a two-mass model classically studied in force control for human-interacting robots [3], [4] to evaluate the behavior of the RCs under force feedback. The mechanical system considered in this paper, shown in Fig. 1, consists of two masses connected by a spring and damper in parallel. In the general case of a robotic exoskeleton, the proximal M1 and distalM2masses are representative of the motor rotor and exoskeleton leg, respectively. The spring Kand damper Bin parallel are representative of the geared transmission dynamics. Fig. 1: Mechanical system of interest The proximal and distal masses each have a position, velocity and acceleration as deﬁned in Fig. 1. The distal mass interacts with an environment modeled as a velocity source V2, as might theoretically be imposed by a human participant, with resulting environmental force FEnv. The proximal mass has an applied control action motor force FActas speciﬁed by controller architecture explained in the following sections. The interaction force FIntis the force that can be measured at the spring and damper, arranged in parallel, between the two masses. B. Passive Impedance Controller We are utilizing impedance control since it allows us to directly specify the desired dynamics we wish to display to the environment through a target impedance transfer function given an environmental velocity [4]. The capability and goal of the proposed impedance controller, shown in Fig. 2, is the reduction of end-point impedance below that of the distal mass alone. As such, the target impedance is given as: ZQ(s) =QM2s (1) In this expression, the target impedance is deﬁned as a fractionQof the physical impedance of the distal mass. Q ranges between 0 and 1 if the goal is to reduce the displayed impedance below the physical value of the distal mass. It is worth noting that a proportional force controller which aims to obtain an impedance in the form of equation 1 with Q < 1will not be passive [3]. The desired environmental forceFEnvDesis derived by passing the prescribed distal Fig. 2: Schematic of the impedance controller. velocityV2through this transfer function block of the desired impedanceZQ(s). The control action motor force FActapplied to the prox- imal mass is obtained by taking the error between the measured environmental force FEnv and the desired envi- ronmental force FEnvDesand passing it through the control block transfer function Cf(s). We are requiring the controller to meet the condition of passivity, to ensure stability when interacting with a range of environmental conditions [4]. As such, the control block transfer function Cf(s)is required to satisfy the passivity requirement of: RefZEnv(jw)g=Re( FEnv(j!) V2(jw)) 08!2R (2) This leads to the following expression for the passive upper limit on the proportional gain KP: Cf(s) =KPM1 M2(1Q)(3) The equation relating the environmental force FEnv to the distal velocity V2and control action motor force FActand plant transfer functions is given as: FEnv=V2PV2(s) +FActPFAct(s) (4) Where the plant transfer functions PV2(s)andPFAct(s) take the form: PV2(s) =(M1M2)s3+B(M1+M2)s2+K(M1+M2)s M1s2+Bs+K(5) PFAct(s) =Bs+K M1s2+Bs+K(6) Although the expressions for the transfer functions are derived in the s-domain, the transfer functions are simulated in the z-domain in the following sections using a zero order hold (Ts= 0:001s) C. Repetitive Force Control In an RC, the error of the previous cycle is applied through a feed-forward system to compensate for the anticipated error of the current cycle. The general form of the ﬁrst order RC [11] is as follows: U(z) =zpI(z)H(z)[U(z) +F(z)E(z)] (7) The RC is designed and implemented in the zdomain. The controller’s output U(z)and errorE(z), operated on by a compensator F(z), from the previous cycle (given delay zp) are combined to produce the output at the current cycle. The interpolator I(z)is necessary if the number of time steps in a cyclepis not an integer and the zero phase low-pass ﬁlter H(z)can be applied if a frequency cutoff of the learning process is necessary. The transfer function form of the general ﬁrst order RC, converting the error input E(z)to control output U(z), is: R1(z) =F(z)I(z)H(z) zpI(z)H(z)(8) Given the context of simulation of this work, the interpola- torI(z)has been set to unity, as the capability of specifying any nominal frequency is not necessary in simulations. This yields the following simpliﬁed transfer function for a ﬁrst order RC: R1(z) =F(z)H(z) zpH(z)(9) It is known that a high-order RC can provide robustness to signal period error through the widening of the notches in the sensitivity transfer function [10], [12]–[14]. The sensitivity transfer function describes the inﬂuence of the command signal on the error signal and is deﬁned as [15]: S(z) =1 R(z)G(z)(10) The closed loop transfer function G(z)is deﬁned as: G(z) =CfPFAct(z) 1 +CfPFAct(z)(11) As such, we implemented an additional controller, a 2nd order RC, with generic transfer function form: R2(z) = F(z)H(z)[ 1zp+ 2] z2pH(z)[ 1zp+ 2](12) The parameter is the learning gain, and parameters 1;2 provide weights to the compensatory action resulting from the previous two cycles. These parameters are constrained such that: 0< < 1 (13) 1+ 2= 1 (14) For this work, we have implemented plug-in type RCs [15], [16], as shown in Fig. 3, where the RC transfer function is located in parallel to a standard feedback loop. Fig. 3: Schematic of the impedance controller with applied plug-in type repetitive control. We opted for this form of controller, as opposed to the cascade-type RC, because the plug-in type could be conveniently enabled or disabled without disruptive transient of force error. This capability was deemed to be essential for safety-critical applications such as human-robot interaction.D. Repetitive Controller Tuning For these RCs, the compensator, a ﬁnite impulse response digital ﬁlter, is speciﬁed by two design terms m&n, where the compensator has mzeros andnmpoles. We know that the closed-loop system with added RC (plug-in or cascade) and zero phase low-pass ﬁlter is stable if the following expression holds: MHFG (!) = H(!) 1 + (1F(!))CfPFAct(!) 1 +CfPFAct(!) <1 (15) where!=ei!Ts. To determine a suitable compensator, the following expres- sion is minimized [17] over the frequency range of interest utilizing fmincon in MATLAB (MathWorks Inc, Natick, MA): J= max(j1F(ei!Ts)G(ei!Ts)j) (16) Two sets of 2nd order RC weight parameters were taken from previous work [12]. These sets of parameters 1;2were designed speciﬁcally for accommodating random period er- ror (RPE) and constant period error (CPE) and assigned as [2/3, 1/3] and [2, -1], respectively. The learning gain for both 2nd order RCs leading to convergence was determined empirically to be 0.5. E. Nominal Performance Evaluation All controller simulations were implemented via Simulink models with an environmental velocity signal obtained as the time integral of a unit magnitude acceleration signal, sampled at a speciﬁed interval ( Ts= 0.001s). Each nominal simulation began with 5 seconds of passive proportional control (PPC) followed by the plug-in type RC engaged for 30 seconds. There are two primary assessment metrics of performance: the ﬁrst is the root mean squared FEnvErr(RMSFE) for each cycle of the source velocity signal (nominal value: 1Hz). The second is the end-point impedance ZEnvover a range of excitation frequencies. The end-point impedance was tested at a set of frequencies that did not require an interpolator in order to be implemented. F . Robustness Analyses 1) Model Parameter Error: The compensator optimiza- tion process, based on a model of the plant transfer function PFAct(s)and the passive control block Cf(s), determines the stability of the RCs. However, in practical implementation of the RCs, there will exist error in the plant transfer function estimate relative to the actual physical plant. As such, it was important to asses the stability of the RC when there was error present in the modeled transfer function. In order to assess the robustness of the RC to model error; we assessed the convergence of the controllers when the compensator was designed with an ideal plant model and was applied to plant models with various magnitude of error applied to the individual parameters (i.e., B;K;M 1;M2). For each of the three RCs, we ran one hundred simulation repetitions for ten values of parameter error (i.e., 0%, 10%, ... , 90%). As such, if a nominal value was 10 kg and the parameter error was equal to 10%, the value simulated in each of the 100 repetitions was randomly sampled from a uniform distribution with margins [9, 11] kg. Each simulation started with ten seconds of PPC followed by 490 seconds of plug-in type RC. The convergence of each simulation was assessed by the relative magnitudes of the RMSFE of early RC (mean of cycles 11-15) and late RC (mean of the last 10 cycles). If the late RMSFE values was less than the early RMSFE value, the simulation was considered to converge. 2) Source Signal Random Period Error: The controller is subject to the imposed environmental velocity source, mod- eled as a sinusoidal waveform. The period of this waveform is analogous to the period of the gait cycle during walking in a lower extremity exoskeleton. In human walking, the gait cycle period is subject to random errors, cycle to cycle. To assess the robustness of the RCs subject to RPE as seen in walking we assessed the RMSFE of the controllers when the period of the input velocity signal varied randomly with a uniform distribution. For each simulation of the RPE analysis, the period of each individual cycle of the applied sinusoid was drawn from a uniform distribution with zero mean and variable half width. The half width was changed in different runs of the simulation, and ranged between 0 Hz to 0.90 Hz (in increments for 0.01 Hz). The period of each individual cycle of the applied sinusoid was drawn from a uniform random distribution speciﬁed by the half width value. Each simulation began with 10 seconds of PPC followed by 190 seconds of plug-in type RC. The RMSFE of each controller was assessed: for PPC (mean of cycles 2-10) and for the RCs (mean of last 100 cycles). 3) Source Signal Constant Period Error: The period of the gait cycle in human walking is subject to CPE as might be observed during sustained gait speed changes. In order to assess the robustness of the RCs to CPE, we assessed the performance of the controllers when the gait cycle period was a consistent non-nominal value for the duration of the simulation. This is a worst-case scenario to assess the robustness of an RC to a discrepancy between the perturbation period and the period assumed by the RC. In practice, RC could be reset after a number of cycles, and the period of their action pcan be updated given measurements of the perturbation period. We assessed RMSFE at a range of 51 different environ- mental velocity frequencies (i.e., 0.75 - 1.25 Hz), with a constant spacing of 0.01 Hz. Each simulation, at a speciﬁed environmental velocity frequency, began with 10 seconds of PPC followed by 90 seconds of plug-in type RC. The RMSFE of each controller was assessed: for PPC (mean of cycles 2-10) and for the RCs (mean of last 5 cycles). III. RESULTS A. Repetitive Controller Tuning Prior to performing simulations, the compensator was designed according to the speciﬁed default set of parameters. This default set of parameters is given in Table I.TABLE I: The default set of simulation parameters Parameter Value Description M1 10kg Proximal mass M2 5kg Distal mass K 200N=m Spring constant B 20Ns=m Damping constant Q 0.10 Desired fraction of distal mass KP 2.2 Passive proportional control gain p 1000 Period in time steps Ts 0.001s Sample interval fv 1Hz Velocity source frequency Av 1=(2)m=s2Velocity source amplitude m 9 Compensator design term #1 n 2 Compensator design term #2 0.5 Learning gain 1;2 [2/3, 1/3] & [2, -1] RPE & CPE RC weights 10-210-110010110200.51Magnitude [abs]|1-F(z)G(z)| MHFG Unity 10-210-1100101102-50050100Magnitude [dB]F(z) 10-210-1100101102 Frequency [Hz]00.511.5Magnitude [abs]H(z) 10-210-1100101102 Frequency [Hz]0100200Phase [deg]F(z) Fig. 4: (Top left) Asymptotic stability of the compensator when coupled with the nominal plant and zero-phase low pass ﬁlter, (bottom left) the magnitude of the low pass ﬁlter, and (top right) the magnitude and (bottom right) phase of the compensator. It is important to note that we designate the value of Qto be 0.10 such that our target end-point impedance is 10% of the natural impedance of the distal mass. In Fig. 4, the optimized compensator is shown and the resulting asymptotic stability obtained when coupling the compensator with the nominal plant is apparent. In Fig. 5 are the sensitivity magnitude plots of the four controllers. These describe the inﬂuence of the controller design on disturbance signals, such that a lower sensitivity, particularly in close proximity to the nominal frequency, is desirable. B. Nominal Performance The nominal simulations for plug-in type 1st order RC, 2nd order RC designed for CPE, and 2nd order RC designed for RPE applied to the passive impedance controller are shown in Figs. 6-8, respectively. As can be seen, the PPC quickly achieves steady state, after which, the RCs are applied and achieve a new steady state after several cycles of learning. The 1st order RC reduces the RMSFE to below 5% of the original passive control RMSFE after 12 cycles of 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 Frequency [Hz]01234 Magnitude [abs]KP Control 1st Order RC 2nd Order RC CPE 2nd Order RC RPEFig. 5: Magnitude plots for the sensitivity transfer functions of the four controllers. 0 5 10 15 20 25 30 35 Time [s]024RMSE FEnv RMSE FEnv Start of RC0 5 10 15 20 25 30 35-505FEnv [N]1st Order RC FEnv FEnv Des FEnv Err Start of RC Fig. 6: (Top) example simulation of the plug-in type 1st order RC applied after 5 seconds of passive proportional control. (Bottom) the RMSE of FEnv for each cycle. learning, where as the 2nd order RC designed for CPE and RPE require 37 and 18 cycles, respectively, of learning. Shown in Fig. 9 are the impedance phase and magnitude of each controller. The magnitude of the passive impedance controller aligned with the theoretical impedance of M2, indicating the same end-point impedance. Most importantly, the impedance of the impedance controller with applied RC at speciﬁed frequencies were close to the theoretical magnitudeZQ(s)indicating the successful reduction in end- point impedance by the 1st order RC controller. For all evaluated controllers, the impedance phase was within the range [-90, 90] deg, indicating passivity of the controlled system. C. Robustness Analyses 1) Model Parameter Error: Depicted in Fig. 10, all con- trollers performed with 100% of simulations converging at nominal parameter values (0% error). The 1st order RC performed with 100% of simulation converging through 20% parameter error and moderately decreasing rates until just un- der 70% at 60% parameter error. The best performance was by the RPE controller which maintained 100% converging simulation rate through 60% parameter error. The 2nd order RC for CPE performed the most poorly of all three RCs. 2) Source Signal Random Period Error: As can be seen in Fig. 11, passive proportional control performed uniformly across all velocity RPE conditions. The 1st order RC and 2nd order RC for RPE perform the best at low error values 0 5 10 15 20 25 30 35 Time [s]024RMSE FEnv RMSE FEnv Start of RC0 5 10 15 20 25 30 35-505FEnv [N]2nd Order RC - RPE FEnv FEnv Des FEnv Err Start of RCFig. 7: (Top) example simulation of the plug-in type 2nd order RC, designed for random period error, applied after 5 seconds of passive proportional control. (Bottom) the RMSE ofFEnv for each cycle. 0 5 10 15 20 25 30 35 Time [s]024RMSE FEnv RMSE FEnv Start of RC0 5 10 15 20 25 30 35-505FEnv [N]2nd Order RC - CPE FEnv FEnv Des FEnv Err Start of RC Fig. 8: (Top) example simulation of the plug-in type 2nd order RC, weighted for constant period error, applied after 5 seconds of passive proportional control. (Bottom) the RMSE ofFEnv for each cycle. until 0.30 Hz. At higher error values the 2nd order RC for RPE performed better than the 2nd order RC for CPE with both inferior to passive proportional control. The 2nd order RC for CPE performed with greatest error at all frequency error values. 3) Source Signal Constant Period Error: Shown in Fig. 12; the performance of the four control conditions reﬂect the sensitivity transfer function plots shown in Fig. 5. The 2nd order RC designed for CPE performed the best at low error values and the 1st order RC performed the best at high error values. The 2nd order RC designed for RPE performed worse than the other two RCs but better than PPC at low error values. IV. DISCUSSION AND CONCLUSIONS In this paper, we showed that repetitive force control can be successfully applied to a passive impedance controller for the reduction of the end-point impedance and root mean squared force error (RMSFE). We have established that there is a wide range of plant parameter error under which the repetitive controllers (RC) will converge. Furthermore, we have established the effects of constant and random period errors on stability and performance of RC based control using force feedback and concluded that a higher-order RC 10010102550 Magnitude [dB] 100101 Frequency [Hz]6080100120 Phase [deg]M2 Q M2 KP Control 1st Order RCFig. 9: The (top) magnitudes and (bottom) phases of the theo- retical distal mass and fractional distal mass impedances and the measured simulation impedance of the passive controller and repetitive controller. 0 10 20 30 40 50 60 70 80 90 Plant Parameter Error [%]020406080100 Converging Simulations [%]1st Order RC 2nd Order RC CPE 2nd Order RC RPE Fig. 10: Rate of convergence of simulations under conditions of parameter error for the three repetitive controllers. can improve both the robustness to parameter error and the performance of force display under variations in input period. Under nominal conditions, the 1st order RC successfully reduced the end-point impedance to the target impedance and reduced the RMSFE in the least number of cycles. We found that the 2nd order RC designed for RPE performed the best of all three RCs for the RPE analysis, particularly at high error values. This ﬁnding is consistent with previous work in a 3rd order RC analysis [12]. Surprisingly, the 2nd order RC designed for RPE performed the best in the robustness to plant model error analysis, with 100% of simulations converging through 60% parameter error. The 2nd order RC for CPE did perform the best in the CPE analysis in the region of low error values, which is consistent with previous ﬁndings at 0.5% period time error [10]. However, the 2nd order RC for CPE performed very poorly in our plant model parameter error and RPE analyses. According to our analyses, we conclude that the optimal form of controller for such an application is a high order RC with positive real fractional weights as in the RPE RC controller. This is due to the fact that we are most concerned with plant model parameter error and random error in signal period, as is practically expected in the implementation of this controller. In regards to CPE, the controller could be reset to a new nominal period, if the CPE exceeds an acceptable value, as might be expected in intentional gait speed changes. 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 Half Width of Velocity Frequency Distribution [Hz]02468RMSE FEnv [N]KP Control 1st Order RC 2nd Order RC CPE 2nd Order RC RPEFig. 11: RMS FEnvErrfor the four force controllers under random error of the period of the environmental velocity signal. 0.85 0.9 0.95 1 1.05 1.1 1.15 Frequency of Velocity [Hz]012345RMSE FEnv [N]KP Control 1st Order RC 2nd Order RC CPE 2nd Order RC RPE Fig. 12: RMS FEnvErrfor the four force controllers under constant period error of the environmental velocity signal. Future work will involve the application of higher order (e.g., 5th order) RCs to our force control application in an effort to increase the robustness beneﬁts of higher order RC. We plan to implement the proposed repetitive force controller for impedance reduction to a single degree of freedom joint of a robotic exoskeleton platform and ultimately in a full exoskeleton [18] for purposes of improved transparency.