1 Introduction

The control of voluntary movements is a dual structure consisting of cognitive and physical controls; cognitive control, unlike physical control, requires attentional resources. Various voluntary movements can be performed by combining cognitive and physical controls. The separation of these controls could enable us to predict the level of physical skill acquisition based on the expenditure of attentional resources. The relationship between repetitive body movements and attentional resources has been studied using synchronous tapping tasks [1, 2]. Body movements depending on attentional resources are performed using cognitive control; these movements fluctuate with white noise and their fluctuations gradually become one-over-f fluctuations as the dependence on attentional resources decreases.

Handwriting is a voluntary movement. Maleki et al. focused on the repetitive handwriting task of Chinese kanji characters and developed an experimental system to clarify the relationship between fluctuations and voluntary movements, that is, a dual-task method that combines synchronous tapping and handwriting tasks [3, 4]. The specific method involved repeating and alternating one character handwriting and one tapping in time with auditory stimuli presented at regular time intervals. In their experiment, six types of partial motion times were defined within the single-character handwriting task, which is known as handwriting temporal elements (HTE), and the time series of the six HTEs were measured by repeating the single-character handwriting process. Fluctuation analysis was applied to each of the six measured HTE time series to examine the relationship between the partial motion elements corresponding to each HTE and the attentional resources assigned to it. Differences in the number of strokes between the three focused Chinese kanji characters were associated with differences in handwriting difficulty, and the relationship between handwriting difficulty and the allocation of attentional resources corresponding to each HTE was discussed.

The complexity of the shape of the handwritten characters determines the difficulty of a handwriting task, and stroke counts are one indicator of this. The complexity of the character shape may affect the attention resources consumed during the handwriting process. Probably, the arrangement state (the distribution) of attention resources in one character shape is not uniform, and the arrangement state of attention resources varies from trial to trial, even within an individual, and it may not be uniform. Furthermore, the authors believe that if one wants to handwrite a beautiful character, one must focus on the appropriate part of the character shape. That is, if the arrangement of state of attention resources in the handwriting process of the character is quantitatively evaluated, it will provide a learning guideline in handwriting learning. Furthermore, the increase and decrease in attention resource consumption may be used in handwriting proficiency evaluation.

By the way, principal component analysis (PCA) is a method for reducing the dimensionality of multidimensional data. In this study, PCA is used on a six-dimensional (6D) HTE to filter measurement data into three-dimensional (3D) PCA data. We focused on three Chinese kanji characters, with different numbers of strokes, “den,” “tsu,” and “dai,” and performed fluctuation analysis on the 3D PCA data. Because of the difficulty in ensuring the linearity of HTE data, we followed previous studies [5, 6] and used detrended fluctuation analysis (DFA). Then, we investigated the effectiveness of PCA by evaluating the relationship between the local scaling index on the timescale and the difficulty of the handwriting task. We also evaluated the proficiency of each subject.

2 Experiment

Figure 1 illustrates the configuration of our experimental system [7]. The stroke motion was measured using a pen tablet (PTH860, WACOM Corp.); the coordinate positions of the pen on the pen tablet were recorded on the computer at 200 Hz. Moreover, a trigger signal indicating whether the pen tip is attached to or detached from the tablet was output via a digital-to-analog converter (USB-3105, Measurement Computing Corp.) and recorded at 1 kHz via an analog-to-digital converter (AIO-60/4/1B-USC, Y2 Corp.). The handwriting field on the pen tablet comprised a square area with a 50-mm side on the left (H-area) and a square area with a 10-mm side on the right (T-area). An “x” mark was drawn in the H-area to serve as the subject’s starting point for handwriting the designated kanji character.

Fig. 1
figure 1

Experimental system [7]

The computer outputs a voltage rectangular waveform with a 20-ms width for emitting auditory stimuli through the speaker. Following a previous study by Maleki et al. [3, 4], we measured body temperature to easily assess the autonomic nervous system during the experiment. The body temperature was measured using three contact thermometers (thermistor sensor SZL-64, high-accuracy temperature converter E471-0, Tateyama Kagaku Kogyo); the peripheral skin temperature was measured by attaching a thermometer to the tip of both hands so that it did not impede movement, and another was placed on the abdomen (50-mm above the navel) to monitor the temperature. First, the subjects answered two types of psychological questionnaires; the profile of mood states (POMS) and the state-trait anxiety inventory (STAI) [8, 9]. Then, they were instructed to close their eyes and rest for 150 s. Furthermore, they repeated the character writing and tapping tasks 250 times in time with the auditory stimuli, followed by 150-rest with closed eyes. Finally, the POMS and STAI questionnaires were conducted again. The experiment lasted 6 days and approximately 3 h per day. The POMS and STAI and the body temperature recordings were set up to monitor the subjects’ well-being during the experiment. Therefore, no cases of suspected influence on experimental results were found in any subject.

Figure 2 shows the time chart of the task [7]. We maintained the auditory stimulus until the task was completed, based on the repetitive periods (interstimulus interval, ISI) detected by the preliminary experiment with the task Chinese kanji character “den.” The subjects were required to start writing with the first auditory stimulus. When they finished writing, they tapped the T-area using their pen tips to ensure that they were as in synchrony with the second auditory stimulus as possible. The subjects started writing from the “X” mark in the H-area. They were allowed to complete 250 trials, which comprised one set. The HTE was divided into six components (i.e., “SLs,” “SLe,” “LsT,” “LsLe,” “LeT,” and “ST”), which could be obtained from a single trial. The six HTEs were defined using four times, determined from the relationship between the auditory stimulus and handwriting task flows (Fig. 2). S, T, Ls, and Le mean sound (1st auditory stimulus), tapping, letter start (beginning of writing), and letter end (end of writing). That is, SLs is the time from sound to the beginning of writing, SLe is the time from sound to the end of writing, and ST is the time from sound to tapping. LsLe is the time from the start of writing to the end of writing; LsT is the time from the start of writing to tapping. LeT is the time from the end of writing to tapping. In this research, physical dimension of HTE is time, and the unit of HTE is the millisecond.

Fig. 2
figure 2

Handwriting temporal elements (HTE) [7]

Table 1 summarizes the three characters selected for the handwriting task. They differ in the number of strokes used and in the handwriting ease. There are various possible indicators of handwriting difficulty. However, in this study, the handwriting difficulty level is unimportant, but the differences in the handwriting difficulty between the three characters used in this experiment. The three characters used in this experiment are ranked by the number of strokes. In many cases, handwriting characters with a high stroke count are more tedious than handwriting characters with a low stroke count. The subjects were 28 healthy males and one female (aged 21–25). They were all college students with Japanese as their native language.

Table 1 Chinese kanji characters selected for the handwriting task

3 Analysis method

3.1 Detrended fluctuation analysis

Detrended fluctuation analysis (DFA) was invented by Peng and others in 1994 [10, 11]. The DFA is an effective method for fluctuation analysis in finite-length time series. The time series of the HTEs or HSEs is represented by \({r}_{i}\) (i = 1, 2, 3, …, N − 1, N, where N denotes the number of HTE or samples, that is, \(N=250\)), which is the intended DFA signal. HSE is the data used in the previous study [7]. HSE is not included in the analysis of this research at this time. The definition of HSE is data that captures the size of characters in terms of X and Y coordinates. Full name of HSE is handwriting spatial-series element. Figure 3 shows an example of \({r}_{i}\). This data is the \({r}_{i}\) for subject 1, day 1, ST. The horizontal axis is \(i\) and the vertical axis is \({r}_{i}\). The time series \({s}_{k}\) (k = 1, 2, 3, …, N − 1, N) of the cumulative sum of \({r}_{i}\) was computed as follows:

$$S_{k} = \sum\limits_{i = 1}^{k} {\left( {r_{i} - \overline{r}} \right)}$$
(1)

where \(\overline{r }\) is a mean value of\({r}_{i}\). Value \({s}_{n}^{*}(k)\) is the regression line of the time series (\({s}_{k}\),\({s}_{k+1}\),\({s}_{k+2}\), …,\({s}_{k+n-2}\),\({s}_{k+n-1}\)), where n = 3, 4, 5, …, N − 1, N is the timescale. Its slope on the log–log scale field of the \(F(n)\) characteristic defined by Eq. (2) is known as the scaling index

$$F(n) = \sqrt {\frac{1}{N}\sum\limits_{k = 1}^{N} {\left( {S_{k} - S_{n}^{*} \left( k \right)} \right)^{2} } }$$
(2)
Fig. 3
figure 3

Example of \({r}_{i}\)

If the scaling index is around 1.0, the motion is controlled by physical control. If the scaling index is around 0.5, movement is controlled by cognitive control [1, 12]. Therefore, the more familiar the subject becomes with the task, the larger the value of the scale index.

In this study, the general shape of the \(F\left(n\right)\)- \(n\) characteristics was curved, which is commonly referred to as a crossover phenomenon. The same linearity is limited to a specific timescale for the qualitatively observed crossover phenomenon. To avoid this crossover problem, we focused on local trends and defined a new slope parameter \({\beta }_{m,day}^{knj}\) (\(knj\) = den, tsu, dai; \(day\) = day1, day2, …, day6; \(m\) = 1, 2, 3, …, N–(\(M\)+ 1), N − \(M\)) as a local scaling index. \({\beta }_{m,day}^{knj}\) is the slope of the regression line when \(F\left(n\right)\)- \(n\) is a log–log plotted in the timescale interval [\(m\), \(m+M-1\)]. \(M\) is set to an arbitrary constant. In this study, it was set to 70, approximately 1/4 of the overall length, because of the stability of the DFA [13]. The calculated image of the beta is drawn in Fig. 4. As shown in Fig. 4, the slope of the regression line was calculated on a log–log plot of F(n)-n with the time scale interval fixed at 70, and the value of \({\beta }_{m,day}^{knj}\) is the slope of the regression line.

Fig. 4
figure 4

\({\beta }_{m,day}^{knj}\)

3.2 Evaluation value

The PCA [14, 15] was performed on the six HTEs. PCA is a method to represent the information possessed by variables \(\{{x}_{p}\}(p=\mathrm{1,2},\dots ,P)\) using independent principal components \(\{{z}_{m}\}(m=\mathrm{1,2},\dots ,M)\) given as the first-order combination of PX, while maximizing the loss of information.

$$Z_{m} = \sum\limits_{p = 1}^{p} {\omega_{pm} \chi_{p} }$$
(3)

\({\omega }_{pm}\) is determined to satisfy the following conditions. The variance of first component \({z}_{1}\) is the largest among the variances possessed by all linear expressions of \({x}_{p}\), and the variance of \(m\) th component \({z}_{m}\) is the largest among the variances possessed by all uncorrelated linear expressions of \(\{{z}_{{m}^{^{\prime}}}\}({m}^{^{\prime}}=\mathrm{1,2},\dots ,m-1)\). In addition, Eq. (4) is satisfied.

$$\sum\limits_{p = 1}^{p} {\omega_{pm}^{2} } = 1$$
(4)

The principal component scores of the first through the third principal components were extracted. These were confirmed in the preliminary analysis, demonstrating that they had a principal component ratio above 90%. The results of the preliminary analysis are shown in Sect. 4.1. The first principal component makes the highest contribution and the third principal component has the lowest contribution.

\({\beta }_{m,day}^{knj}\) was calculated using DFA for the first principal component on each experimental day. \({E}^{knj}\) is calculated from the ratio of \({\beta }_{m,day}^{knj}\) in the first half of the experimental days to \({\beta }_{m,day}^{knj}\) in the second half of the experimental days using Eq. (5).

$$E^{knj} = \sum\limits_{m = 1}^{N - M} {\left( {\frac{{\beta_{m,day1}^{knj} + \beta_{m,day2}^{knj} + \beta_{m,day3}^{knj} }}{{\beta_{m,day4}^{knj} + \beta_{m,day5}^{knj} + \beta_{m,day6}^{knj} }} - 1} \right)}$$
(5)

If \({E}^{knj}\) is positive, \({\beta }_{m,day}^{knj}\) increases; if \({E}^{knj}\) is negative, \({\beta }_{m,day}^{knj}\) decreases. That is, if \({E}^{knj}\) is positive, the subject is used in the experimental task; if \({E}^{knj}\) is negative, the subject is not used in the experimental task.

4 Result and discussion

4.1 Cumulative contribution ratio of PCA

We present data on the cumulative contribution obtained from preliminary analysis. By examining this data, we discuss why the 6D HTE data could be converted to 3D PCA data. cumulative contribution ratio results are the task Chinese kanji characters “den,” “dai,” and “tsu,” which are 96% or higher as shown in Fig. 5. Figure 5 shows a bar chart with cumulative contribution ratio on the vertical axis and subjects on the horizontal axis. Result of "den” is shown in red, result of "tsu" in green, and result of "dai" in blue. A horizontal line is drawn where the cumulative contribution ratio is 96%. We found that the three principal components contained sufficient information about the six HTEs. As noted in Sect. 3.2, the cumulative contribution rate was higher than 90%. The 6D HTE data were successfully aggregated into 3D PCA data for all Chinese kanji character tasks for all subjects. We found that the cumulative contribution for PCA data up to 3D exceeds 90% because 6D HTE data can be expressed in terms of HTE up to 3D, as shown in “\(\mathrm{LsLe}=\mathrm{SLe}-\mathrm{SLs}\),” “\(\mathrm{LsT}=\mathrm{ST}-\mathrm{SLs}\),” and “\(\mathrm{LeT}=\mathrm{ST}-\mathrm{SLe}\).”

Fig. 5
figure 5

Cumulative contribution ratio of PCA

4.2 Best scaling index

The best scaling index was examined to determine how far along in the experimental task the subjects were most comfortable with the experimental task. We discuss whether subjects continue to become used to the task over the course of the experiment or they stop being used to the task in the middle of the experiment.

During the experimental task, we investigate when \(m\) subjects become used to the task. We retrieved the maximum value of \({\beta }_{m,day}^{knj}\) for each day. Maximum \({\beta }_{m,day}^{knj}\) of \(m=1,m=180\) is deleted, because it is not a peak. The results are shown in Fig. 6. “den” is shown in the upper red histogram, “tsu” in the middle green histogram, and “dai” in the lower blue histogram. The maximum \({\beta }_{m,day}^{knj}\) counted on the horizontal axis is represented by \(m\). The vertical axis is the counted number.

Fig. 6
figure 6

Histograms of the best \({\beta }_{m,day}^{knj}\)

Figure 6 shows that for “den,” \({\beta }_{m,day}^{knj}\) is at a maximum of around 90, implying that subjects get used to the experiment as the experiment progresses. However this result suggests that no meaning to run the experiment too long. Maximum \({\beta }_{m,day}^{knj}\) for “tsu” is almost flat, implying that there are various tendencies depending on the subject and the number of experiment days. Maximum \({\beta }_{m,day}^{knj}\) for “dai” is at a maximum of around 1, implying that subjects are already used to the experimental task. We consider “dai” is too easy.

4.3 Evaluation value

The results of the Evaluation value \({E}^{knj}\) are discussed. This result allows us to discuss how well the subjects became accustomed to the experiment as a whole.

Figure 7 shows the results of \({E}^{knj}\). The results are shown for \({E}^{den}\) on the left, \({E}^{tsu}\) in the center, and \({E}^{dai}\) on the right. The vertical axis is \({E}^{knj}\) and the horizontal axis is the subject. The color of the graph is changed according to the positive and negative values, with red for positive values and green for negative values.

Fig. 7
figure 7

Result of \({E}^{knj}\)

Figure 7 on the left shows that the \({E}^{den}\) was positive in 23 of 29 subjects. The average \({E}^{den}\) is 24.8. Figure 7 on the right shows that the \({E}^{dai}\) was positive in 10 of 29 subjects. The average \({E}^{dai}\) is − 1.98. Figure 7 in the center shows that the \({E}^{tsu}\) was positive in 13 of 29 subjects. The average \({E}^{tsu}\) is 2.76.

These results show that the subjects became used to the experimental task with “den,” but not with “tsu” and “dai.” The reason they were not used to the experimental task with “tsu” and “dai” is that the preliminary experiment for this study was conducted based on “den.” We consider the experimental task with “tsu” and “dai” too easy.

4.4 Hierarchical cluster analysis

A cluster analysis is applied to the evaluated value E to divide the subjects into three clusters. By dividing the subjects into clusters, we discuss what kind of subjects were present and what characteristics subjects of each cluster has.

The results of \({E}^{knj}\) were discussed using hierarchical cluster analysis. Ward's method [16] and square Euclidean distance [17] were used for the hierarchical cluster analysis. Cluster analysis is a method of classifying a subject by collecting data from a group of people that have similar elements to each other. The results are shown in Fig. 8. Red is the first cluster, green is the second cluster, and blue is the third cluster. This graph shows that the first cluster has 5 subjects, the second cluster has 17 subjects, and the third cluster has 7 subjects. To further examine the contents, we discuss the data for each cluster. The results of \({E}^{knj}\) for each cluster are shown in Fig. 9. The first cluster is at the top, the second cluster is in the middle, and the third cluster is at the bottom.

Fig. 8
figure 8

Results of cluster analysis

Fig. 9
figure 9

Results of \({E}^{knj}\) for each cluster

The first cluster had the highest \({E}^{tsu}\) values, and the subjects were more used to “tsu” than to “den.” The second cluster consists of subjects who took high \({E}^{den}\) values. However, they were not used to \({E}^{tsu}\) and \({E}^{dai}\). The third cluster had high values for both \({E}^{den}\) and \({E}^{dai}\). We assumed that \({E}^{knj}\) is a measure that can be used to evaluate a certain level of proficiency, but that its effectiveness is different for each subject.

5 Conclusion

The 6D data was compressed into 3D data, and the cumulative contribution ratio was examined. We confirmed the effectiveness of PCA for dimensional compression in this way. At the end of the experiment, all the subjects tended to become used to the task. The evaluation value \({E}^{knj}\) created in this study indicated proficiency in the task Chinese kanji character “den.” However, it did not show proficiency for “tsu” and “dai,” which is because the experimental system was constructed based on “den.” We would like to examine the effect of constructing an experimental system based on Chinese kanji characters other than “den” in the future to confirm this hypothesis. We will consider incorporating unlearned task characters into experiments in the future.