Sensorless Pedalling Torque Estimation Based on Motor Load Torque Observation for Electrically Assisted Bicycles

: The need for reducing the cost of and space in Electrically Assisted Bicycles (EABs) has led the research to the development of solutions able to sense the applied pedalling torque and to provide a suitable electrical assistance avoiding the installation of torque sensors. Among these approaches, this paper proposes a novel method for the estimation of the pedalling torque starting from an estimation of the motor load torque given by a Load Torque Observer (LTO) and evaluating the environmental disturbances that act on the vehicle longitudinal dynamics. Moreover, this work shows the robustness of this approach to rotor position estimation errors introduced when sensorless techniques are used to control the motor. Therefore, this method allows removing also position sensors leading to an additional cost and space reduction. After a mathematical description of the vehicle longitudinal dynamics, this work proposes a state observer capable of estimating the applied pedalling torque. The theory is validated by means of experimental results performed on a bicycle under different conditions and exploiting the Direct Flux Control (DFC) sensorless technique to obtain the rotor position information. Afterwards, the identiﬁcation of the system parameters together with the tuning of the control system and of the LTO required for the validation of the proposed theory are thoroughly described. Finally, the capabilities of the state observer of estimating an applied pedalling torque and of recognizing the application of external disturbance torques to the motor is veriﬁed.


Introduction
Presently, the need for air pollution reduction together with the aging of the population have brought research in the mobility field to the development of EABs. In particular, the term EAB refers to bicycles whose motion is assisted by electrical motors. Thus, these vehicles present the advantages of increasing the mobility capabilities of standard bicycles thanks to the electrical assistance and to be environmentally friendly because they are zero-emission vehicles. Therefore, EABs results to be attractive for users who want to reduce the efforts while riding a bicycle such as elderly people. By means of EABs, the moving range of the bicycle can be extended without exhausting the rider and uphill riding efforts are considerably reduced. Moreover, EABs do not require a driving license and thus can be driven by the majority of people. In addition, through EABs one can save costs related to insurance and parking. A massive usage of these vehicles could, therefore, improve also the traffic flow in the cities. Also, riding an EAB reduces the energy cost per distance travelled compared to driving a car [1]. EABs can be divided into many categories depending on the motor type used to provide the electrical assistance, the motor placement, the type of assistance and the type of battery. A comprehensive characterization of different kinds of EABs can be found in [1]. Nevertheless, there are laws which vary from country to country regarding the electrical assistance. In particular, these laws limit the maximum power that can be provided to assist the motion and thus the applicable motor torque and the resulting vehicle speed. Therefore, sensors such as torque and speed sensors are necessary to measure these quantities in order to respect legislation.
Among the different kinds of EABs, there are bicycles which provide the electrical assistance level basing on the pedalling torque and bicycles in which the assistance is related to the speed of the vehicle. However, vehicles which rely on pedalling torque are more appreciated by the users in terms of cycling feeling than the velocity-based ones [2]. Thus, this work focuses the attention on bicycles whose electrical assistance is related to the pedalling torque applied by the rider. For this kind of EABs, a torque sensor is necessary in order to measure the pedalling torque and provide a proper electrical assistance with the objective of achieving certain vehicle dynamics performance. However, torque sensors are usually expensive and increase the overall cost of EABs which are categorized as expensive class bicycles. Moreover, torque sensors are weak against external shocks and risk to be damaged since they are installed directly where the pedalling force is applied. The need for cost and space reduction has led the current research to the development of solutions capable of avoiding the installation of such torque sensors.
Many approaches were proposed to address this issue. A common method is based on Disturbance Observers (DOBs) which were first proposed in [3,4]. The DOBs are widely used to achieve robustness to model uncertainties and disturbances in control systems. Also, a DOB can be used to estimate disturbances without using costly force sensors [5][6][7]. DOBs have been employed in many fields such as motion control [8][9][10], high friction systems [11] and vehicles [12,13]. Moreover, DOBs have been also applied in EABs for the pedalling torque estimation in many works. In [6], a pedalling torque estimation based on a DOB is proposed. Also, in [14][15][16][17] the average pedalling torque is evaluated starting from a Fourier series expansion of the disturbance torque estimated using a DOB. In these works, an estimation of the pedalling torque is obtained combining the information given by the DOB with a Recursive Least Square (RLS) algorithm. However, using this approach, a delay of one pedalling cycle is required to evaluate the Fourier series of the disturbance torque. Therefore, the pedalling torque cannot be estimated in real-time during the first pedalling revolution. Other works based on DOBs investigate the problem of providing a proper electrical assistance starting from the estimated pedalling torque. In particular, in [5], a method which exploits two DOBs is proposed. In this work, one DOB is used to realize a robust control by removing the estimated disturbance whereas an additional DOB estimates the applied pedalling torque in order to provide electrical assistance. Also, in [18], a DOB is designed with the objective of achieving the environmental disturbance rejection in order to obtain an uphill riding feeling equal to the level ground riding.
Many works focus the attention on the analysis of the repetitive nature of the pedalling torque due to the mechanical design of the bicycle crankset. In particular, these works are based on the Repetitive Control (RC) which is a common method used for periodic disturbance rejection or periodic reference signal tracking. The RC was first applied in many motion control problems such as Hard Disk drives [19], Compact Disk players [20] and also in non rotatory motion control applications [21,22]. Afterwards, the aforementioned technique has been employed also in power assist applications to generate the auxiliary torque [23]. Moreover, the RC has been also successfully applied in the field of EABs. In [24,25], a RC is used to reduce the speed fluctuations caused by the pedalling torque that are significant especially in uphill riding with the objective of enhancing the bicycle stability and safety.
In this work, a different approach, which estimates the pedalling torque starting from a motor Load Torque Observer (LTO) and from an estimation of the environmental load torque components that act in the bicycle longitudinal dynamics, is proposed. Thanks to a LTO, the external load torque applied to the motor shaft can be estimated relying on the motor mathematical model and on the rotor position information and, therefore, without using an expensive torque sensor. In recent decades, LTOs have been investigated using classical state observers and exploiting both sensored and sensorless methods. Among the works which rely on sensored techniques, several state observers based on different approaches have been employed. In [26], a nonlinear load torque estimation based on Lyapunov stability is proposed. Also, in [27], the state estimation is achieved considering an adaptive observer which exploits the Fourier analysis of the voltages and the currents of the motor. Another approach based on a Sliding Mode Observer (SMO) has been proposed in [28]. Many works exploit Kalman Filters (KFs) to achieve the motor load torque estimation. In particular, in [29], an Extended Kalman Filter (EKF) which linearizes the mathematical model of the motor has been implemented. However, EKFs do not account for model uncertainties due to parametric variations. Therefore, in order to improve the robustness to parametric variations, a H-Infinity Filter (HIF) has been proposed in [30]. To avoid the installation of encoders or resolvers and, therefore, to save cost and space, many LTOs exploit the rotor position and speed information given by sensorless techniques. In [31], the INFORM sensorless technique has been used to estimate the position information in a full order state observer. Other LTOs based on sensorless techniques are proposed in [32,33]. In these works, an Unscented Kalman Filter (UKF) is employed to reduce the error caused by the linearization performed when using an EKF. Also, in [34], a comparison between sensored and sensorless load torque estimation based on UKFs is reported. Moreover, in [35], several state observers which rely on the position information given by the DFC sensorless technique have been successfully implemented and compared. Also in this work, a LTO which exploits the DFC sensorless technique is proposed showing the robustness of the pedalling torque estimation to errors on the measured mechanical quantities. Therefore, using the proposed approach it is possible to estimate the pedalling torque also considering the information given by sensorless techniques which typically introduce an estimation error on the rotor position compared to high-resolution encoders. Thus, this method allows estimating the pedalling torque removing both the torque and the position sensors.
The objective of this work is to show the possibility of estimating the pedalling torque starting from a motor LTO which relies on sensorless position information. It has to be remarked that the proposed approach is valid for EABs whose motor is installed within the rear wheel of the vehicle. Moreover, the proposed theory has been validated neglecting the influence of the environmental load torque components. Therefore, under this assumption the estimated motor load torque results to be equal to the pedalling torque. Nevertheless, the capability of the LTO to estimate generic external disturbance torques different from the pedalling torque is verified. Eventually, it has to be remarked that the project of a control system able to provide a suitable electrical assistance starting from the estimated pedalling torque is not analyzed within this work.
After a mathematical description of the vehicle longitudinal dynamics, a technique capable of estimating the applied pedalling torque exploiting a LTO is explained. Then, in order to highlight the nature of the signal that has to be estimated by means of the LTO, an analysis of the pedalling torque is reported. Afterwards, the experimental setup used to validate the proposed theory is described. After a brief recall of the DFC sensorless technique, the identification of the machine parameters together with the control system design is reported. Then, a LTO for the pedalling torque estimation is tuned and different experiments that evaluate its load torque estimation capabilities are performed.

Bicycle Longitudinal Dynamics
The design of the control system for an EAB requires the modelling of its vehicle dynamics. Although the effects of the rolling rotation of the vehicle body together with the front fork effect are important in the bicycle stabilization, these effects can be neglected in this analysis since the vehicle stabilization is typically controlled by the human action [24]. Therefore, the analysis of the vehicle dynamics can be reduced to the longitudinal dynamics model of the bicycle described in Figure 1. Considering the dynamics along the x-axis one obtains the following equation: where F drive represents the driving force applied to the vehicle whereas F gravity , F drag , F roll , are respectively the effects of gravity, of the aerodynamic drag and of the rolling friction on the motion of the vehicle. In addition, m represents the global vehicle mass including the mass of the cyclist andv x is the acceleration of the vehicle along the longitudinal direction. In the following, a deeper analysis of the terms of (1) is presented. The driving force can be written as: where F motor is the driving force generated by the motor electrical assistance whereas F pedal represents the human force applied to the pedals and transmitted to the back wheel through the chain. A gravity component in vehicle longitudinal dynamics is due to the presence of a road slope β and it results in a resistive force when going uphill and a driving force in downhill riding. This component has the following expression: where g is the acceleration of gravity. The aerodynamic drag is proportional to the speed squared and depends on the dynamic pressure. As shown in [1], this component can be expressed as: where C a is the aerodynamic drag coefficient, v x is the speed of the vehicle and v w is the speed of the wind. In particular, the coefficient C a depends on the cyclist and its posture while riding. Moreover, the stochastic nature of the speed of the wind and its variable direction can result in a driving or resistive force on the vehicle dynamics. The rolling friction component is an effect of the deformation of the wheels and can be written as: where µ is the rolling friction coefficient which depends on the tire footprint variation due to its deformation in relation to the cyclist mass and the tire pressure. An analysis of the friction components has been presented in [1] leading to the following considerations. In absence of road slope, the influence of the rolling friction is more relevant at low speeds (v x < 3 m s ). At higher speeds (v x > 3 m s ), the aerodynamic drag component overcomes the rolling friction. In presence of road slope, the gravity component is dominant with respect to both the rolling and the aerodynamic friction components.

Pedalling Torque Estimation
Since the objective of this work is to estimate the pedalling torque starting from an analysis of the load torque applied to the electrical motor which provides the motion assistance, an analysis of the motor dynamics is necessary. Let us now consider a bicycle with the electrical motor installed on the back wheel and under the hypothesis of adherence conditions. The system can be considered constituted by three rigid bodies: the two wheels and the bicycle frame plus the cyclist. Since the applied pedalling torque is transmitted through the chain to the back wheel, the evaluation of the pedalling torque can be performed analyzing the back wheel dynamics. Let us consider the electromechanical equation of the motor which provides the electrical assistance to the vehicle: where T motor is the motor torque, T load is the motor load torque due to external forces applied to the motor, J is the inertia of the wheel expressed with respect to the revolute joint which constraints the motion between the back wheel and the bicycle frame,Ω is its angular acceleration and T f riction represents the internal friction torque of the motor. In Figure 2, the dynamics of the back wheel of an EAB is reported. It has to be remarked that for the sake of brevity the reaction force due to the coupling between the wheel and the frame is not explicitly reported because it can be expressed as the sum of the friction and inertia forces acting on each rigid body. Therefore, the global forces acting on the bicycle dynamics, expressed in (1), are reported in the figure and will be considered in the mathematical analysis. Focusing on the motor load torque, the following expression can be obtained: where F ad is the static friction force, r is the radius of the wheel and T pedal is the torque applied to the motor due to the pedalling. It has to be remarked that the pedalling torque has an opposite sign with respect to the global load torque since it is a driving torque for the wheel. Under adherence conditions and considering the dynamics along the x-axis, the static friction force F ad results to be equal to: where F inertia = −mv x is the inertia force. Therefore, the motor load torque results to be: where T gravity = F gravity r, T drag = F drag r, T roll = F roll r, T inertia = F inertia r, T pedal = F pedal r. Starting from (9) the pedalling torque can be expressed as: Thus, given the environmental torque components T gravity , T drag and T roll , the inertia torque T inertia and the motor load torque T load a measurement of the applied pedalling torque T pedal can be obtained. The idea on which this work is based consists in estimating the pedalling torque starting from an estimation of the motor load torque given by a state observer and an estimation of the environmental torque components acting on the back wheel of the vehicle. Therefore, (10) can be written as: where theT pedal is the estimated pedalling torque,T gravity is the estimated gravity component,T drag is the estimated aerodynamic drag component,T roll is the estimated rolling friction component,T inertia is the estimated inertia torque andT load is the estimated motor load torque component given by a state observer.

Motor Load Torque Observation
The estimation of the pedalling torque requires an estimation of the load torque applied to the motorT load . Focusing on (6), a more precise description of the internal friction of the motor is required in order to achieve a proper estimation of the external load torque applied to the motor. This phenomenon has been described considering a traditional Coulomb friction model which takes into account also the viscous friction effect. Thus, the internal friction torque presents the following expression: where T c is the Coulomb friction torque that is equal to the maximum applicable motor torque in static conditions, b is the viscous friction coefficient and Ω is the angular speed of the wheel. Let us now analyze the differential equations that describe the motor dynamics: where (13) has been obtained from the motor electromechanical Equation (6), (14) is the definition of the mechanical speed where Θ is the mechanical rotor position and (15) represents the chosen dynamics for the applied load torque. No assumptions on the behaviour of the applied load torque can be made, since this torque is an external unknown disturbance. Therefore, the only valid assumption is to consider the unknown disturbance applied to the motor to be invariable in a short time interval [32,35]. Considering the mechanical rotor position as the only measurable quantity, (13)- (15) can be written using a continuous-time state-variables representation: The following quantities can be defined: the state vector x = Ω Θ T load T , the input vector u = T motor T c sgn(Ω) T and the output y = Θ equal to the measured mechanical rotor position given by a position sensor or a sensorless technique. Moreover, the following matrices can be defined: where F is the state matrix, G is the input matrix and H is the output matrix. The implementation of a state observer on a microcontroller requires the discretization of the state-variables representation and the selection of a proper sampling period T s . Considering the input to be constant over the sampling period, the system can be discretized as follows: where F d , G d and H d are the discretized state, input and output matrices respectively. These matrices can be obtained as follows: The expression of the discretized matrices can be simplified considering classical discretization methods such as the forward Euler, the backward Euler and the Tustin approximations. In particular, when a sampling time much smaller than the mechanical time constant of the system T s τ m = J b is chosen, the three discretization methods provide the same discretized matrices. Therefore, a forward Euler approximation has been used to simplify (21) and (22) due to the simplicity of its discretized matrices expression: To observe the state using a state observer, the observability of the system must be proved. Therefore, the observability matrix O has been evaluated: Evaluating the rank of the observability matrix, one can conclude that the system is fully observable since the rank of the observability matrix is equal to the number of state variables n: Therefore, given the measured input and output of the system, its state can be estimated using a discrete-time state observer.

Pedalling Torque Analysis
To evaluate the estimated pedalling torque and to choose the proper electrical assistance that the motor has to provide to achieve the desired vehicle dynamics specifications, it is important to analyze the nature of the applied pedalling torque. The pedalling torque is the sum of the torque contributions due to the forces applied to the left and right pedals: where T le f t and T right are the left and right pedalling torques, respectively. To understand the behaviour of the pedalling torque, the forces applied to the pedals have to be analyzed. These forces can be decomposed in two components: a tangential component F pedal T and a radial component F pedal R . The only component which has an effect on the pedalling torque is the tangential one. In particular, its contribution to the pedalling torque is: where l crank is the crank arm lenght and i belongs to the set {le f t, right} in dependence of the pedal on which the pedalling force is applied. Therefore, the pedalling torque presents a behaviour which depends on the direction of the applied force to each pedal and on the crank angle Θ crank . In Figure 3, the pedalling torque generated by a pedalling force applied in a generic direction is shown. Due to the design of the crankset, a typical pedalling torque presents a quasi-periodic profile which is close to a sinusoidal profile plus an offset [15,[36][37][38]. The pedalling torque reaches its maximum and minimum twice during a pedalling cycle. In particular, the maximum is reached when the higher pedalling force tangential component is applied. This condition is typically satisfied when the pedals are close to the horizontal position depending on the direction of the applied pedalling force. In addition, depending on the crank angle, a typical pedalling torque increases in the first quarter period and decreases in the second quarter period. Within the second half period, similar considerations can be done when the pedalling force is applied on the other pedal. Figure 4 shows an example of the resulting pedalling torque obtained when a pedalling force with a constant module and a constant application direction is applied. One can notice that under these conditions the tangential pedalling force component results higher when the pedals are in horizontal position. Therefore, in this position one obtains the maximum value of the pedalling torque. Same considerations can be done when the pedalling torque is applied on the other pedal during the second half period.

Experimental Validation
In this section, a description of the experimental setup used to verify the validity of the proposed pedalling torque estimation method is reported. It has to be remarked that the experimental validation has been conducted neglecting the effects of the environmental torque components on the wheel longitudinal dynamics. Therefore, in this work, methods able to estimate and compensate the aforementioned components have not been analyzed. The objective of this analysis is to demonstrate the possibility of estimating the pedalling torque starting from the motor load torque estimation obtained using a LTO. Thus, a setup constituted by a bicycle with a motor installed on the back wheel has been considered. To evaluate the only effect of the pedalling torque on the motor load torque, all the experiments have been performed avoiding the contact between the wheels and the ground. Under these assumptions, expression (7) can be written as: where T ext represents the generic external load torque applied to the rear wheel. Therefore, the estimated motor load torque given by the LTO can be expressed as: whereT ext is the estimated external disturbance torque.

Experimental Setup Description
This section describes the setup used for the experimental validation reported in Figure 5. The setup is constituted of a bicycle with a motor installed on the rear wheel, a torque sensor necessary for the validation of the estimated pedalling torque and a custom electronic board. In the following, a more detailed description of the components that constitute the setup is provided. The motor under consideration is a star-connected Permanent Magnet Synchronous Machine (PMSM) with 23 pole pairs and surface mounted magnets. The nominal values of this motor are reported in Table 1. However, depending on the legislation of each country, the maximum output power and vehicle speed must be limited, i.e., 250 W and 25 Km h according to the directive 2002/24/EC in the European Union. Therefore, in practical applications the motor will be driven with a reduced output power with respect to the nominal conditions. The torque sensor used for the pedalling torque measurement has been installed within the crankset of the bicycle. In particular, the sensor under consideration is commonly used in commercial EAB applications thanks to its robustness and compactness. This sensor measures the torque evaluating the twist of a torsional element placed in the middle of the sensor which is measured by an Hall effect sensor that evaluates the magnetic displacement. Moreover, the sensor returns a voltage proportional to the measured torque with a sensitivity of 10 mV Nm . As stated in [39], this particular sensor is able to measure only the left pedalling torque. The torque generated by the right pedalling force is not measured due to the presence of the chainwheel on the right part of the pedalling shaft. Therefore, this sensor measures the torque generated by the left pedalling force and the weight of the left leg on the left pedal when the right leg applies a force. In particular, the weight of the left leg generates a negative torque measured by the sensor because non professional cyclists usually do not lift the leg while pushing the other pedal [40]. A reconstruction of the global pedalling torque starting from the measured torque is therefore necessary for the validation of the estimated pedalling torque. The pedalling torque reconstruction process will be described in detail in Section 4.2.
Moreover, an electronic board used for motor control, the torque sensor reading and the pedalling torque observation has been developed. In particular, the board is constituted by a 32-bit microcontroller, a three-phase inverter and sensing circuitry. The motor is driven with a PWM-frequency of 60 kHz whereas the motor control system and the state observer are discretized with a frequency of 10 kHz. Also, the measurements of phase currents and voltages are performed with a 16-bit AD converter and a sampling frequency of 10 kHz. In addition, the designed board allows sensorless operation based on the Direct Flux Control (DFC) sensorless technique. More details about this technique will be provided in Section 3.2. Thanks to an USB communication and a custom software, the useful information can be plotted and analyzed using a PC and exported to MATLAB environment.

Direct Flux Control DFC Sensorless Technique
The aim of this section is to provide a brief description of the DFC sensorless technique used for the estimation of the electrical rotor position. In electrical machines and drives, the position information is typically provided by encoders or resolvers causing an increase in cost and occupied space. In many applications, the cost and space reduction requirements have led to the employment of sensorless techniques. Nevertheless, sensorless operation typically introduces a rotor position estimation error and thus reduce the control performance with respect to high-resolution encoders. Therefore, in order to avoid the installation of a position sensor and to prove the robustness of the proposed pedalling torque estimation technique in presence of rotor position estimation errors, the motor under consideration has been controlled by means of a sensorless technique. However, it has to be remarked that using a sensorless technique to control the motor is not a strict requirement of the proposed pedalling torque estimation method.
DFC is an anisotropy-based sensorless technique able to estimate the electrical rotor position relying on measurements of the machine star-point voltage. This technique is applicable to Synchronous Machines (SMs) with an accessible star-point. The DFC estimated rotor position is obtained by exploiting the dependence of the machine inductances on the rotor position. Considering a SM driven by a power inverter, the DFC measures the difference v NV between the star-point voltage of the machine v N and the voltage of a virtual star-point v V during the transition between the machine excitation states 0 and I. Figure 6  Also, as the figure shows, the virtual star-point is obtained by connecting the machine terminals to three star-connected resistors. In Figure 7, it can be seen that during the machine excitation state 0 all machine terminals are grounded whereas in the excitation state I, a generic phase X, belonging to the set {A, B, C}, switches to the inverter bus voltage V DC . The measurement of the differential voltage v NV necessary to obtain the anisotropy signals from which the electrical rotor position can be estimated requires for example in this specific implementation a modified edge-aligned PWM pattern which drives the machine between the excitation states 0 and I at the beginning of each PWM period. In particular, a new anisotropy signal related to one phase is calculated at each period. Therefore, after three periods a new updated measurement of the anisotropy signals can be used to extract the rotor position. Figure 8 shows the PWM excitation commonly used to obtain the aforementioned anisotropy signals. More details about the dynamics of the star-point voltage and about the estimation of the electrical rotor position using the DFC technique can be found in [41]. As stated in [42,43], the estimated electrical rotor position obtained with the DFC technique presents oscillations with respect to the real position which depend on the machine inductance matrix. In particular, the estimated position presents a ripple which is a nonlinear function of the 6th harmonic component of the rotor position.

Electrical Parameters Identification
The tuning of a proper control system able to provide the electrical assistance and of a LTO requires the knowledge of the machine parameters which in many cases are not provided in the datasheets of the motors. In this section, the identification procedure used for evaluating the electrical parameters of the motor under consideration is analyzed. Since in the experimental setup no high-resolution encoder is available, a technique able to estimate the electrical machine parameters relying on the DFC estimated rotor position has been used. This technique, proposed in [44], combines a classical online parameter identification algorithm, the RLS, with the position information given by the DFC sensorless technique. Let us consider the electrical equations of a PMSM in the dq-reference frame: where v d and v q are the voltages in the dq-reference frame, R is the phase resistance, L d and L q are the inductances in the dq-reference frame, Ψ PM is the permanent magnet flux linkage, i d and i q are the currents in the dq-reference frame ,i d andi q are their derivatives and ω is the electrical rotor speed. After some manipulations, Equations (31) and (32) can be written in the form: where γ is the system response, p is the parameter vector and s is the state vector. For systems in the form (33), the RLS algorithm can be used for the identification of the parameter vector p. The estimation of the electrical parameters has been performed considering the following expressions for the terms which constitute Equation (33) and using the position information given by the DFC technique: where ω DFC is the estimated electrical rotor speed obtained as the derivative of the estimated electrical rotor position given by the DFC sensorless technique θ DFC . The identification process has been performed using the same electronics described in [44]. A forgetting factor of µ = 0.99995 has been chosen for the RLS algorithm in order to provide a significant number of samples for the parameters estimation. To estimate the parameters, the PMSM has to be driven with persistently exciting input signals. For the identification of the phase resistance and of the motor inductances a sinusoidal excitation has been provided to the motor in the form: where A and f are respectively the amplitude and the frequency of the sinusoidal excitation and i belongs to the set {d, q}. In particular, the chosen amplitude of the sinusoidal excitation used in the identification process is equal to A = 0.865 V. Concerning the frequency, a value of f 1 = 200 Hz has been used for the measurement of R and L d whereas, in order to avoid measurements error due to position ripples generated by the electromagnetic torque, a higher frequency equal to f 2 = 600 Hz has been applied for the measurement of L q . The identification of the permanent magnet flux linkage has been achieved considering a constant voltage input v q = 5 V. Table 2 reports the steady-state values of the identified electrical parameters obtained with this approach together with the excitation inputs applied for the identification of each parameter. In [44], it has been shown that the combination of the RLS with the DFC estimated position grants a relative error on the identified values with respect to the given reference values smaller than the 10%. Such error on the knowledge of the parameters has been considered acceptable for the tuning of the control system and of the LTO. Table 2. Identified electrical parameters using the RLS and the DFC estimated electrical rotor position and excitation inputs used for the identification process.

Control System Design
The design of an EAB capable of providing an electrical assistance related to the pedalling torque applied by the cyclist requires the tuning of the motor control. In particular, providing an electrical assistance means applying a motor torque T motor with the objective of achieving certain desired vehicle dynamics specifications. However, in this work the project of an electrical assistance able to obtain certain bicycle longitudinal dynamics performance will not be discussed. Nevertheless, the design of a proper control system is necessary for the experimental validation of the proposed theory. Providing a desired motor torque means controlling the motor currents. Thus, let us focus on the expression of the electromagnetic torque of a PMSM: where n p is the number of pole pairs and L d − L q is the motor anisotropy. Therefore, in order to control the motor torque a proper current control must be designed. For motors which present a small anisotropy, such as the motor under consideration, it is convenient to reduce the torque control to the control of the i q current considering a current reference on the d-axis equal to i * d = 0. Under these conditions the motor torque results proportional only to i q : Both the i d and i q controllers have been tuned using a standard Field Oriented Control (FOC) based on the parameters identified in Section 3.3 and according to the delays introduced by the chosen PWM excitation, the AD conversion and the digital implementation of the control system.

Mechanical Parameters Identification
The estimation of the pedalling torque based on state observation techniques requires a good knowledge of the mathematical model of the motor. In particular, as Equations (13)- (15) show, the values of the motor inertia J, of the motor internal friction torque T f riction and of the applied motor torque T motor must be identified. As (39) shows, the motor torque depends on the permanent magnet flux linkage which has been previously evaluated in Section 3.3. Therefore, in this section an analysis of the identification of the mechanical parameters is provided.
The motor inertia identification was performed considering a method based on the addition of sinusoidal perturbations on the drive system. The method under consideration has been proposed in [45] and it has the advantage of removing the influence of the viscous friction in the inertia identification. In particular, this method provides the following current references: where I * q is the reference amplitude of the sinusoidal excitation and f * is the chosen frequency. This results in a sinusoidal mechanical speed: where Ω * is the amplitude of the sinusoidal mechanical speed and ϕ is the phase shift between i q and Ω. As stated in [45], evaluating the current at the zero-crossing time instants of the mechanical rotor speed t 0 , the motor inertia can be calculated as follows: The results obtained in the inertia identification experiments are reported in Table 3. The selection of the amplitude I * q and of the frequency f * has been performed according to the indications reported in [45]. The average identified value of the motor inertia is J = 0.06 kgm 2 . Let us now analyze the internal friction torque identification. The Coulomb friction torque T c has been calculated by considering the maximum value of the motor torque which grants static conditions. In this particular motor, T c = 0.72 Nm when a current reference i * q = 0.9 A is applied. The viscous friction coefficient b has been calculated considering (6) in steady-state conditionsΩ = 0 rad s 2 and in absence of an applied load torque T load = 0 Nm. Under these assumptions, the viscous friction coefficient can be obtained using the following expression: where Ω ∞ is the steady-state value of the mechanical rotor speed. The identification experiment was performed applying several motor torque steps and evaluating the corresponding steady-state mechanical speed. The obtained values of the viscous friction coefficient together with the applied motor torque and the resulting steady-state mechanical speed are reported in Table 4. Starting from the obtained results, the average value of the viscous friction coefficientb = 0.0118 Nms rad has been calculated.

Pedalling Torque Estimation
In this section, the validation of the pedalling torque estimated using a LTO is performed. The tuning of a LTO observer is described considering the identified electrical parameters reported in Table 2 and the average values of the mechanical ones evaluated in Section 3.5. Also, in this section an analysis of the pedalling torque reconstruction starting from the measured pedalling torque given by the torque sensor is reported. Finally, the state estimation capabilities of the LTO are evaluated performing several experiments on the setup.

Pedalling Torque Observer
As described in Section 2.3, a LTO estimates the motor load torque which under the assumptions stated in Section 3 can be reduced to (29). In particular, in this work a KF has been chosen as LTO. Nevertheless, it has to be remarked that a generic state observer can be tuned for the estimation of the motor load torque. A KF whose nominal model is based on Equations (19) and (20) has been considered: where the vector w = w Ω w Θ w T load T describes the noise on the process whereas v describes the noise on the measurement. In particular, in this case v represents the position error introduced by the DFC sensorless technique. In a KF both the elements of w and v are modelled as white, uncorrelated Gaussian processes whose variance is described considering the covariance matrices Q and R respectively. The selection of a KF as LTO has the advantage of granting a small state estimation error also in presence of model uncertainties and noise on the measurements. Nevertheless, in order to achieve a good state estimation, the KF must be properly tuned. Tuning a KF means initializing both the state estimationx(0) + and the estimation error covariance matrix P(0) + and properly selecting the covariance matrices Q and R. Since no assumptions on the initial conditions of the system can be done, the following initial state and initial value of the error covariance matrix have been considered:x Concerning the selection of the covariance matrices, the following values have been chosen: In this case, since the measurement is given by the DFC sensorless technique which is known to present an estimation error with respect to the real rotor position, a bigger value of the variance R has been selected compared to the diagonal elements of the matrix Q. This means that the equations that describe the process are considered more reliable than the measurements because the deviations from the nominal model are considered smaller than the error on the measurement given by the sensorless technique. A standard KF algorithm as described in [46] has been implemented on the microcontroller with a digital implementation frequency of 10 kHz. Since the chosen sampling period T s = 10 −4 s is much smaller than the mechanical time constant τ m = 5.0847 s, the expressions (24) can be used to represent the state and the input matrices of the KF. It has to be remarked that in order to reduce the errors related to the conversions of the phase currents and voltages from the phase to the rotor reference frame, the estimated rotor positionΘ given by the LTO has been used in the conversion instead of the measured DFC position leading to an improvement of the control system performance.

Pedalling Torque Reconstruction
The evaluation of the estimated pedalling torque requires the reconstruction of the pedalling torque starting from the measured one given by the torque sensor as stated in Section 3. There is a strong correlation between the torque of the left and right pedalling revolution in standard cycling operations [39]. In particular, the left and the right torque can be considered symmetric. Therefore, the right torque can be computed by applying the same torque profile applied on the left pedal in the previous half revolution without committing a considerable error in the torque reconstruction. Thus, the reconstructed right pedalling torque T right can be obtained as follows: whereΘ c is the estimated crankset angle. Since no sensor able to measure the crankset angle with a good resolution can be installed within the crankset, this angle has been computed from the estimated rotor position given by the state observerΘ. In particular, the crankset angle has been calculated under the assumption of considering a constant transmission ratio τ = 3.2308 between the crankset and the rear wheel using the following expression:Θ The global reconstructed pedalling torque can be obtained summing the measured left pedalling torque to the reconstructed right one: An example of pedalling torque reconstruction is reported in Figure 9, where the upper subplot shows the comparison between the measured left pedalling torque and the reconstructed right one whereas the lower subplot shows the reconstructed pedalling torque according to (53).

Load Torque Observer LTO Validation
In this section the evaluation of the state estimation provided by the LTO tuned according to Section 4.1 is reported. The validation has been performed considering different experiments in the following conditions: E1: the motor is current controlled with i * q = 1 A and i * d = 0 A without an applied load torque T load = 0 Nm; E2: the motor is current controlled with progressively increasing i * q steps and i * d = 0 A and an external torque disturbance is applied T load = T ext ; E3: the motor is current controlled with i * q = 0 A and i * d = 0 A and a pedalling torque is applied T load = −T pedal . E4: the motor is current controlled with i * q = 0 A and i * d = 0 A and both a pedalling torque and an external torque disturbance are applied T load = T ext − T pedal .
For each experiment, the following quantities have been analyzed: the current on the q-axis, the estimated electrical rotor position, the estimated mechanical rotor speed and the estimated load torque. In particular, the following quantities have been compared: • the provided current reference given by the motor current control i * q with the actual current i q ; • the measured electrical rotor position obtained applying the DFC technique θ DFC with the estimated electrical rotor position given by the LTOθ; • the measured rotor speed obtained as the derivative of the DFC rotor position Ω DFC with the estimated rotor speed given by the LTOΩ; • the reconstructed pedalling torque reported to the motor side T pedal = − T pedalc τ with the estimated motor load torque given by the LTOT load .
To evaluate the performance of the control system and of the state observation, the following indexes were calculated for each analyzed quantity: where i q , θ , Ω , T load are the q-axis current error, the position estimation error, the speed estimation error and the load torque estimation error, respectively. Moreover, it has to be remarked that the experiments have been performed considering a reduced motor power output when providing the electrical assistance with respect to the legislation limitations. Nevertheless, this does not limit the validity of the experimental results, whose main purpose is to validate the state observation capabilities of the LTO. Figure 10 shows the results obtained in the experiment E1 which has been performed by applying a step current i * q = 1 A in t = 5 s while i * d = 0 A when no load torque is applied to the wheel T load = 0 Nm. According to (38), in this condition the applied motor torque is T motor = 0.7935 Nm. One can notice that the actual current i q is capable of following the current reference i * q with an error i q whose steady-state values are in the range ±0.1 A. Focusing on the electrical rotor position, one can see that as stated in Section 3.2, the measured electrical rotor position obtained applying the DFC technique θ DFC presents an oscillation over the real position. Using a properly tuned state observer, it is possible to improve the measured electrical rotor position obtaining an estimated positionθ closer to the real one. Considering the LTO designed in Section 4, the position estimation error θ results in the range ±0.2 rad. Concerning the rotor speed, one can notice that it presents a first order system step response profile. The figure reports also the corresponding speed estimation error Ω whose range in steady-state condition is ±0.02 rad s . Focusing on the estimated motor load torqueT load , one can see that its average value is close to zero:T load = −0.0166 Nm. Moreover, the load torque estimation error T load belongs to the range ±0.05 Nm in steady-state condition. Thus, the LTO is able to recognize that no external load torque is applied to the wheel. Figure 11 shows the results obtained in the experiment E2 which has been performed by applying increasing step current references on the q-axis while i * d = 0 A and an external breaking torque is applied T load = T ext . In particular, the following step current references have been applied: i * q (t = 5 s) = 1 A, i * q (t = 15 s) = 2 A, i * q (t = 20 s) = 3 A, i * q (t = 25 s) = 4 A and i * q (t = 30 s) = 5 A. This means that the following motor torques have been provided: T motor (t = 5 s) = 0.7935 Nm, T motor (t = 15 s) = 1.587 Nm, T motor (t = 20 s) = 2.3805 Nm, T motor (t = 25 s) = 3.174 Nm and T motor (t = 30 s) = 3.9675 Nm. To evaluate the load torque estimation capability of the LTO in presence of an applied external disturbance torque, the wheel has been braked starting from t = 10 s by means of a mechanical brake. Moreover, this breaking torque has been applied with the objective of keeping the speed of the wheel constant within the range [0; 5] rad s . Focusing on the current i q , one can notice that the control system is also able to reject external disturbances such as an applied breaking torque. Moreover, similar considerations to E1 can be done concerning the range of the q-axis current error i q . Also, the figure shows the electrical rotor position behaviour in t = 20 s when an increasing step current is applied and the mechanical brake is active. One can notice that the presence of the breaking torque and the application of the motor torque step do not affect significantly the position estimation error θ whose values are within the same range of the experiment E1. Focusing on the estimated speed, it can be noticed that the application of the mechanical brake in t = 10 s causes a deceleration. Then, by means of the applied breaking torque, the speed is kept within the aforementioned range. In particular, the average value of the estimated speed when the brake is active resultŝ Ω = 2.37 rad s . In this experiment, due to the speed fluctuations caused by the application of the breaking torque, the speed estimation error Ω increases with respect to the experiment E1 to the range ±0.4 rad s . Analysing the estimated load torqueT load , it can be noticed that the observer is capable of recognizing that after t = 10 s an external disturbance torque is applied and that the breaking torque is progressively increased in order to keep the speed constant when increasing motor torques are provided. This means that by means of a LTO it is possible to recognize the presence of external torque disturbances acting on the wheel such as environmental torques. Since the external torque provided by the installed mechanical brake is not measurable, no plot that shows the load torque error is reported in the figure.   Figure 12 shows the results obtained in the experiment E3 which was performed controlling the motor with a i * q = i * d = 0 A when a pedalling torque is applied T load = −T pedal . Thus, no motor torque is provided by the motor T motor = 0 Nm. In particular, the experiment has been performed applying the pedalling torque in t = 5 s with the objective of reaching a speed in the range [15; 20] rad s . Focusing on the speed, one can notice that the estimated speed is kept within the objective range in steady-state condition with an average estimated speed ofΩ = 17.54 rad s . Nevertheless, the pedalling torque profile introduces speed fluctuations which cause an increase of the speed estimation Ω and q-axis current i q errors whose ranges in steady-state condition are ±0.2 rad s and ±0.2 A, respectively. Similar considerations to E1 and E2 can be done regarding the position estimation. Considering the estimated load torque, it can be seen that the average load torque estimation error is¯ T load = 0.0974 Nm while its fluctuation belongs to the range ±1 Nm over the mean value in steady-state condition. Thus, one can notice that the observer is able to estimate with good accuracy the average value of the applied pedalling torque. Focusing on the fluctuation of the load torque estimation error, one can conclude that it is related to the torque reconstruction process which is based on the assumption of a perfect symmetry between the left and the right pedalling torque and considers a constant transmission ratio between the crankset and the rear wheel sprocket. Since both these hypotheses are not completely true, an error on the torque reconstruction and consequently on the load torque estimation is expected. Therefore, it is important to verify that the state observer is able to achieve a small average value of the estimation error rather than a perfect following of the reconstructed signal. In Figure 13, the comparison between the estimated load torque given by the LTO and the reconstructed pedalling torque is reported. One can notice that the estimated pedalling torque presents a similar profile to the reconstructed pedalling torque and a similar mean value. This indicates that the state observer is capable of recognizing the fluctuations of the load torque caused by the pedalling.   Figure 14 shows the results obtained in the experiment E4 which has been performed controlling the motor with the following current references i * q = i * d = 0 A and applying both a pedalling torque and a breaking torque T load = T ext − T pedal . Therefore, the provided motor torque is T motor = 0 Nm. In particular, a pedalling torque has been applied in t = 5 s. Then, in t = 10 s, the wheel is braked by means of the mechanical brake. Moreover, when the mechanical brake is active, the pedalling torque is applied with the objective of keeping the speed of the wheel within the range [10; 15] rad s . Therefore, the applied pedalling torque is expected to increase as the breaking torque is applied in order to keep the speed within the objective range. Concerning the current and its error i q , similar considerations to E3 can be done. Also, regarding the estimated position and its error θ , there are no particular remarks with respect to the previous experiments. Focusing on the speed, one can notice that when both the pedalling and the breaking torque are applied the speed is kept within the objective range with an average estimated speedΩ = 11.9598 rad s . Due to the speed oscillations introduced by the pedalling and the breaking torque, the speed estimation error Ω range results increased to ±0.5 rad s . Concerning the load torque estimation, one can notice that, when only the pedalling torque is applied, similar results to the ones of E3 are obtained. When also the breaking torque is provided, the applied pedalling torque increases to keep the speed in the objective range. Thus, the average value of T pedal decreases. It can be seen that the application of the breaking torque cannot easily be recognized by analysing only the estimated load torque. Focusing on the load torque estimation error T load , one can see that after t = 10 s, its average value is¯ T load = −1.8 Nm while its variability range is ±1.5 Nm over the mean value. Also in this case, the variability of the load torque estimation error can be explained by the imperfection of the pedalling torque reconstruction process plus the application of a not perfectly constant breaking torque. Therefore, also in this case, it is important to evaluate the mean value of the load torque estimation error. Neglecting the fluctuations introduced by the pedalling torque reconstruction process, the load torque estimation error is equal to the estimated external load torque with opposite sign T load = T pedal −T load = −T ext . Therefore, the external torque disturbance can be considered as an offset between the applied pedalling torque and the estimated load torque given by the observer. Thus, the pedalling torque can be estimated from the estimated load torque considering (30). In Figure 15, a comparison between the estimated load torque, the reconstructed pedalling torque and the estimated pedalling torque with opposite sign in steady-state condition is reported. In this case, the pedalling torque has been estimated assumingT ext = −¯ T load . It can be noticed that the estimated pedalling torque presents a similar profile and mean value with respect to the reconstructed pedalling torque after compensating for the external torque disturbance. This indicates that by means of the LTO it is possible to estimate the applied pedalling torque also in presence of environmental torques which act on the bicycle longitudinal dynamics.

Conclusions
In this work, a novel pedalling torque estimation approach based on the state observation of the dynamics of the driving wheel of an EAB is proposed. After analysing the vehicle longitudinal dynamics and in particular the back-wheel one, a technique capable of estimating the pedalling torque starting from an estimation of the motor load torque and of the environmental torques acting on the bicycle is presented. Then, a LTO for the estimation of the motor load torque is described. Moreover, a mathematical analysis of the pedalling torque is provided. An experimental validation of the proposed theory is performed showing the capability of the proposed LTO of estimating the pedalling torque and generic disturbance torques applied to the wheel. Also, the robustness of the load torque estimation to position estimation errors introduced when controlling the machine with a sensorless technique is verified. Therefore, with the proposed technique, it is possible to evaluate the pedalling torque avoiding the installation of both torque and position sensors leading to reduction of cost and space. The experimental validation has been performed relying on the DFC sensorless technique and controlling the machine with a standard FOC. To tune both the control system and the state observer, an identification of the electrical and mechanical parameters of the system has been performed. The load torque estimation has been achieved using a KF as LTO and exploiting the estimated rotor position given by the observer to control the machine. The evaluation of the pedalling torque estimation has been performed comparing the estimated load torque with the reconstructed pedalling torque obtained from the torque sensor measurements. Several experiments in different conditions have been performed highlighting the capability of the LTO of estimating the applied pedalling torque and recognizing external disturbances applied to the motor. Although the capability of the LTO of estimating external torque disturbances has been proved, the validation of the proposed theory has been performed neglecting the influence of the environmental torques. In future works, techniques capable of achieving an online estimation of the external disturbance torques with the objective of extracting the pedalling torque from the global estimated motor load torque when the vehicle operates on the road will be analyzed. In particular, techniques able to estimate the road slope, the vehicle mass, the aerodynamic drag and the rolling friction will be taken into account. The robustness of the proposed method in presence of position estimation errors has been also proved when the DFC sensorless technique is applied. Nevertheless, the proposed pedalling torque estimation approach can be implemented relying on the position information given by other sensorless techniques or position sensors which will be taken into account in future works in order to understand the impact of the different position measurement approaches on the pedalling torque estimation. Also, the analysis of control strategies able to achieve certain vehicle dynamics performance starting from the estimated pedalling torque within the entire output power range allowed from the legislation will be investigated in future works. Concerning the selection of the LTO, future works will analyze other approaches based on different state observers with the objective of enhancing the robustness of the state estimation in presence of model uncertainties.

Data Availability Statement:
The data presented in this study are available on request from the corresponding author. The data are not publicly available due to the particular format in which they are organized.