{'fraction_non_alphanumeric': 0.040711009174311925, 'fraction_numerical': 0.014334862385321102, 'mean_word_length': 4.23931909212283, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Bayesian LPV-FIR Identification of Wheelchair Dynamics and Its Application to Feedforward Control

This paper constructs a mathematical model of wheelchair dynamics in a data-driven manner. In particular, we focus on the forward-backward movement of the wheelchair, for which we adopt a linear-parameter-varying finite-impulse-response model. To avoid overfitting behavior, we employ the Bayesian estimation method. We show by experimental results that the constructed model reproduces the observed data more precisely than linear models. We also show the identified model is effective for the feedforward input design.


Introduction
The aging of populations has recently been attracting a lot of attention in developed countries. Japan is especially facing a severely aging population, called super-aging society [1]. To cope with such problems in society, the Japanese government has proposed the concept of Society 5.0, also known as supersmart society [2]. It is a vision of the future society of Japan harnessing new technologies such as artificial intelligence, automatic control, robotics, etc. In particular, the technology of autonomous vehicles plays an important role in the super-aging society to realize reliable and safe driving for aged people. In this paper, we focus on electric wheelchairs [3], [4] as a vehicle for this purpose. The development and control of electric wheelchairs have recently been investigated [5], [6].
The key element for the control of an electric wheelchair is its mathematical model. Although the first principle approach is standard in modeling wheelchair dynamics, data-driven modeling (i.e., system identification) is also important for two reasons. First, the data-driven modeling is available for various wheelchairs; the front-wheel-drive case, the rear-wheel-drive case, the case with three wheels, and so on. Second, the datadriven modeling can capture behaviors which are often ignored in the first principle approach. A delay caused by the communication between the PC and the wheelchair is one of such behaviors. The main problem in the identification of a wheelchair is its nonlinearity. The wheelchair dynamics is complex and shows various nonlinearities, and it is not so easy to construct a linear model even for the forward-backward movement dynamics.
Based on these observations, this paper discusses the identification of a wheelchair, WHILL Model CR developed by WHILL Inc., which is shown in Fig. 1. As a model structure, we employ the linear-parameter-varying finite-impulseresponse (LPV-FIR) model [7]. The LPV model is consid- ered as a set of linear models indexed by the so-called scheduling variables [8]. In particular, each linear model is described by the finite impulse response in the LPV-FIR model. When we fix the scheduling variables, the LPV model is reduced to a linear model. The LPV-FIR model has an ability to identify nonlinear systems, and furthermore, its structure is simple and useful; hence many pieces of work were reported on this model [7], [9], [10]. One drawback of the LPV-FIR model is that it has a lot of parameters to be estimated. This leads to overfitting when the data amount is not enough. To avoid overfitting, we employ the Bayesian estimation method for the LPV-FIR model [9].
As a result, we can construct the LPV-FIR model from relatively small I/O data of the wheelchair dynamics. The model can reproduce the observed data more precisely than linear models, while linear (FIR) models in the LPV-FIR model are smooth and converge to zero exponentially. Such a property becomes useful in further analysis like model reduction. In addition, we designed the feedforward input based on the LPV-FIR model, and show the effectiveness by the feedforward control experiments.
This paper is an extended version of the conference paper published in the proceedings of SICE Annual Conference 2019 [11]. In particular, the feedforward input design and its experiments with the identified model, which are not shown in [11], are given. Also, the identification experiment is completely new and discussed in more detail.  [Notation] The (i, j) element of the matrix A is denoted by {A} i, j . The n × n identity matrix is denoted by I n . The Kronecker product of A and B is denoted by A ⊗ B. When x ∈ R n is a Gaussian random variable whose mean and covariance are given bȳ x ∈ R n and Σ x ∈ R n×n , we denote p(x) = N(x, Σ x ). The conditional probability density function of x with given y is denoted by p(x | y).

Target System and Motivating Problem
The target system to be identified in this paper is a wheelchair called WHILL Model CR developed by WHILL Inc., which is shown in Fig. 1. This wheelchair can be controlled by a joystick or signal commands sent via RS232C. We can also obtain sensor outputs from the wheelchair such as the motor angle, the motor speed, the 3D accelerations, and the 3D gyros.
In this paper, we identify the dynamics of the forwardbackward movement of the wheelchair. This is not so simple as it seems. We show a motivating example for this. Figures 2 and 3 show the input signal sent via RS232C and the velocity as the output of the wheelchair, respectively. The horizontal axes show the time, and the vertical axes show the input signal and the velocity of the wheelchair. In the rising phase, the velocity takes about 0.75 s to achieve the steady state output. On the other hand, in the falling phase, the velocity decreases rapidly, and it takes about 0.5 s to achieve the steady state output. These behaviors indicate the nonlinearity of the system; the acceleration and the deceleration show different behaviors. Moreover, such a difference can be found even in accelerations with different step input values. Figure 4 shows the step responses with three step input signals. The horizontal axis shows the time, and the vertical axis shows the velocity normalized by the input values. The thick solid, thick broken, and thin solid lines show the velocities where the input values are 20, 40, and 60, respectively. If the system is linear, these three lines should be identical. However, these three lines do not coincide with each other, which indicates the nonlinearity of the system.
Based on these observations, we construct an LPV-FIR model of the wheelchair. In Section 3, we briefly introduce the Bayesian identification, which is available for identifying the LPV-FIR model.

Bayesian Identification with LPV-FIR Model
In this section, we briefly introduce the Bayesian identification with the LPV-FIR model.
With the LPV-FIR model, the input-output relationship is described as where t ∈ {0, 1, 2, . . . , }, y(t) ∈ R and u(t) ∈ R denote the time step, the output, and the input, respectively. Also, v(t) ∈ {v 1 , . . . , v M } denotes the scheduling variable at time step t, where {v 1 , . . . , v M } is a list of scheduling parameters which appears in the experiment. Note that the scheduling parameter is a discrete value in this setting. This implies that the LPV-FIR model consists of M FIR models. The t th step impulse response with the fixed scheduling variable v is denoted by g v (t) (see Remark 1). The term w(t) is a noise, which is assumed to be generated from an i.i.d. zero-mean Gaussian process whose variance is σ 2 . Let v * be the scheduling variable of interest. Then, the identification problem of the LPV-FIR model is to

Remark 1 Compared to the standard FIR model given by
g v(t) (i) in (1) varies with the scheduling parameter v(t). Hence the LPV-FIR model consists of M sets of n impulse response and uses one of them based on v(t).
Remark 2 Some papers define the impulse response as the response to the input given by where T s denotes the sampling time. On the other hand, the discrete convolution in (1) omits the dependence on the sampling time. For the ease of notation, we employ this definition. Since the transformation between these two definitions is straightforward, this does not lose generality.
To construct the LPV-FIR model, we employ the Bayesian approach [9], [12]. Let g V ∈ R nM be the vector defined as Also let U ∈ R N×nM be the matrix whose t th row U t ∈ R 1×nM is given as where , and e j ∈ R M is the M dimensional unit vector whose j th element is one and whose other elements are all zero. Then, we have where Based on these definitions, we can introduce the joint distribution of g * = g v * and Y as Here, the matrices where K q 1 q 2 ∈ R n×n (q 1 , q 2 ) ∈ {v * , v 1 , . . . , v M } 2 is a positive semidefinite matrix which shows the covariance of impulse responses g q 1 and g q 2 , and determined by the so-called kernel function k(q 1 , q 2 , i 1 , i 2 , η) as where η denotes the parameter of the kernel. With these definitions, the posterior distribution of g * is given as In the Bayesian approach,ĝ * is the estimate of the impulse response. This procedure is easily extended to the case with several scheduling parameters of interest and respectively. Then, the posterior distribution of , . . . , g v * m ] is also given by (12) through (14).

LPV-FIR Identification of Wheelchair Dynamics
In this section, we identify the dynamics of the wheelchair shown in Fig. 1 with the Bayesian method introduced in Section 3. In this work, we assume v o (t) = u(t), which means that the scheduling variable is the latest input. Recall that the dynamics becomes linear in the LPV-FIR model if we fix the scheduling parameter. Also, recall that the step responses of the wheelchair seem to be approximated by linear models in Fig. 4. These observations imply that the assumption v o (t) = u(t) is reasonable. Figures 5 and 6 show the input and the output of the system, respectively. We have selected input signals from the list of scheduling parameters and collected the data using the python software development kit (SDK) [13]. The sampling period is This asymmetry implies that it is not easy to approximate the system with linear models.
• The impulse responses converge to zero exponentially.
• When the scheduling parameters are similar, the corresponding impulse responses show similar behaviors.
See [9] for more detail. We employ η = [10 −6 , 0.85, 0.85, 4.999 × 10 −6 ] and σ 2 = 1 × 10 −2 . The order n of FIR is set to 75. As an interested scheduling variable, we set v * j = 20 j − 80 ( j = 1, . . . , 7). Figure 7 shows the estimated LPV-FIR model. The horizontal axis shows the time, and the vertical axis shows the value of g v . There are seven lines; the thick solid/broken/dot lines, the dash-dot line, the thin solid/broken/dot lines. Each line shows g 60 , g 40 , g 20 , g 0 , g −60 , g −40 , g −20 , respectively. Since the kernel function encodes the smoothness and exponential convergence of the impulse responses, the estimated ones actually show the properties. Two important observations are found in Fig. 7. First, the impulse responses with positive inputs and negative inputs have different amplitudes as we observed in Fig. 6. Second, the convergence of g 0 is faster than that of g 40 , which matches the discussion in Section 2; the deceleration is faster than the acceleration. These observations indicate that the estimated LPV-FIR is reasonable.
For comparison, we also identify the system with the linear FIR model whose order is 75. We employ the least squares method to tune the parameters. Figure 8 shows the obtained linear model. The horizontal axis shows the time, and the vertical axis shows the value of the impulse response. Although   the data is not so small (N = 2100), the identified model shows some oscillations. This does not match our intuition and experience; when we input the impulse signal to the wheelchair, we do not feel such an oscillatory behavior.
To validate the models, we also collected the data with another input. Figures 9 and 10 show the input and output of the validation experiment. The horizontal axes show the time, and the vertical axes show the input command and the velocity, respectively. There are three lines in Fig. 10; the thick solid line, the thick broken line, and the thin solid line. Each line shows the output with the LPV-FIR model, the measured output, and the output with the linear model, respectively. Figure 11 shows the first 7 seconds of the signals shown in Fig. 10. Figure 11 shows that the LPV-FIR model fits the observed data better than the linear model.

Feedforward Control of Wheelchair with Identified Model
To show the effectiveness of the identified LPV-FIR model, we design the feedforward input based on the model. The desired output in this experiment is designed as follows.
Step 1 Let P(s) = 216 (s+6) 3 , where s is the complex frequency of the Laplace transform.
Step 2 Discretize P(s) by the zero-order hold method with the sampling period 0.02 s.
Step 3 Design the pulse signal whose period, duty cycle, and amplitude are 300 steps, 50%, and the sum ofĝ 40 (t), respectively.
Step 4 Input the signal in Step 3 to the reference model designed in Step 2. The corresponding output is defined as the desired output.
The desired output at time step t is denoted by y * (t). Based on the above desired output, we design the feedforward inputũ(t). Let which shows the response to the future and past inputs. The natural number h denotes the horizon. Based on these matrices, the cost function at time step t is defined as where u ∈ {−60, −40, −20, 0, 20, 40, 60}. Here, 1 h denotes the h dimensional vector whose all elements are 1. The cost function J t (u) shows the squared error between the desired output and the predicted output based on the LPV-FIR model. In particular, the input will be fixed to u for h steps. We designed the feedforward inputũ(t) sequentially from t = 1 to 299 bỹ  Note that the feasible set in (21) only includes seven elements. The optimization of J t (u) only requires seven evaluations of the cost function; thus, the optimization is easy. Figure 12 shows the proposed inputũ(t) and the pulse signal. The horizontal axis shows the time, and the vertical axis shows the input signal. The solid and broken lines show the proposed input and the pulse signal with the amplitude 40, respectively. We perform the feedforward control experiments for three times with each input. Figures 13 and 14 show the outputs with the proposed input and the pulse signal, respectively. The horizontal axes show the time, and the vertical axes show the velocity. There are three gray lines which show the observed outputs in each figure. The broken lines show the desired output. The squared error between the desired output and the outputs with the proposed input are 3.23, 3.92, and 3.20, and the ones with the pulse signal are 20.3, 17.5, and 18.0. Hence the squared error is reduced by about 80% on average. These experiments indicate that the identified LPV-FIR model is effective for the control of wheelchair dynamics.

Conclusion
In this work, we considered system identification of the forward movement of the wheelchair WHILL Model CR. In particular, we proposed to use LPV-FIR model structure with the Bayesian method. The estimated model can reproduce the observed output more precisely than linear models. Also, the estimated impulse response shows a smooth behavior, which is derived from the prior distribution. We also give a way to design feedforward input based on the LPV-FIR model. The experiments show that the proposed input improves the ride quality compared to the simple pulse input.
In this work, we only used the pulse input as the identification input. Constructing detailed models by using more appropriate identification input is one of the future work. Moreover, we did not discuss the ride quality, which is also included in our future work.