1. Introduction
Recently, electric indoor exercise bicycles have become more and more popular. Although there has not been much research on these types of bicycles, many researchers have investigated outdoor electric bicycles. For example, Muetze et al. evaluated the performance of different types of electric motor-drive bicycles, including fully electric motor-drive bicycles and partially electric motor-drive bicycles [
1]. Chiara reviewed the configurations and performance of different electric bicycles, including surface-mounted permanent-magnet synchronous motors (SPMSM), interior permanent-magnet synchronous motors (IPMSM), and interior permanent-magnet spoke-type motors [
2]. Son et al. proposed an SPMSM with independent distributed windings for electric bicycles. In that study, an advance-angle phase-current was implemented to control the torque of the SPMSMs [
3]. Misaki et al. implemented an increased power capacity for electric-assisted bicycles using metal hydride fuel cells [
4]. Taha designed an inner-rotor and an outer-rotor for electric bicycle applications, and the performance of these two rotor configurations are also compared in this paper [
5]. Zhang implemented a low-cost controller for electrical bicycles, in which a sensorless technique was used [
6]. Park investigated a position estimation method of an SPMSM drive system for electric bicycles [
7]. These previous studies [
1,
2,
3,
4,
5,
6,
7], however, only focused on outdoor bicycles but not indoor bicycles.
Several researchers have investigated the predictive controller design and other related control designs for PMSM drive systems. For example, Hammoud et al. proposed continuous-set model predictive control for PMSMs. A real-time realization of a continuous-control-set model predictive current controller for PMSM drive systems was investigated to achieve fast transient responses and good steady-state performance [
8]. Eldeeb et al. proposed a unified theory for optimal feedforward torque control of synchronous motor drives. The optimal d-axis current and q-axis current for all operating strategies, including maximum torque per ampere (MTPA), field weakening, maximum torque per voltage (MTPV) were investigated [
9]. Hammoud et al. investigated offset-free continuous model predictive current control of PMSM drive systems. A predictive horizon of two steps was achieved with a 100 µs sampling period [
10]. Xu et al. proposed a robust predictive current controller with incremental model and inductance observer for PMSM drive systems. In addition, the robustness and disturbance rejection were discussed [
11].
In our paper, the predictive controllers, including a predictive speed controller and a predictive current controller, of the whole drive system using a 36-slot 12-pole outer-rotor SPMSM/SPMSG are investigated for indoor exercise bicycles. An SPMSM/SPMSG drive system for virtual indoor exercise bicycles is implemented to enhance the riders’ pleasure when they use an indoor exercise bicycle. This SPMSM/SPMSG system is implemented to increase the accelerating speed or decelerating speed for the motor of an indoor exercise bicycle. When the rider is riding from a virtual upland to a lowland, the motor of the indoor bicycle is accelerated by adding external torque from the SPMSM drive system. As a result, the riding experience will feel more realistic. When the rider is riding from a virtual lowland to an upland, the motor of the indoor bicycle is decelerated by the braking torque from the SPMSG system. As a result, the rider needs to use more physical force to maintain the speed of the bicycle motor. By using this method, the riders can have a more realistic experience, as though they are riding a standard bicycle outdoors.
Figure 1 shows a photograph of the big screen scenarios, which provides a virtual landscape while a rider is riding an indoor bicycle [
12]. To the authors’ best knowledge, the ideas of design and implementation of this 36-slot 12-pole outer-rotor SPMSM drive system, which can provide a higher torque and lower speed than a regular 4-pole SPMSM, are original ideas and have not been investigated in the previous papers [
1,
2,
3,
4,
5,
6,
7]. In addition, the predictive speed controller and the predictive current controller to enhance the dynamic responses of the SPMSM for indoor bicycle are also new ideas [
8,
9,
10,
11]. Finally, the proposed SPMSM drive system does not require any plug-in power from power company. A battery set is used to receive the regenerative energy from riders, and then the battery set provides its energy to the SPMSM drive system to achieve energy saving. These are the three main contributions of this paper.
Figure 2 shows the block diagram of the proposed SPMSM/SPMSG system with energy recovery. When the relays are connected to the inverter, the SPMSM is connected to and is controlled by the inverter to operate the SPMSM at different speeds. The SPMSM drive system provides an additional torque to accelerate the motor speed of the bicycle. However, when the relays are connected to the 3-phase diode rectifier, the SPMSG is connected to the rectifier and then to the buck converter, which provides a 25-V output to the regenerative resistance load and also to the charger to charge a 24 V battery set. Improved energy recovery, therefore, is achieved. The digital signal processor (DSP), a 32-bit control center, is used to read the encoder signal and execute the feedback signals, and then control the relays, inverter, buck converter, and charger.
2. Mathematical Model of SPMSMs
The mathematical model of the SPMSM is discussed here. The synchronous d-q axis reference frame of an SPMSM is expressed as follows [
13]:
where
and
are the d-q axis stator voltages,
is the stator resistance,
and
are the d-q axis stator currents,
and
are the d-q axis inductances,
is the differential operator,
is the electrical rotor speed, and
is the flux-linkage. The electromagnetic torque is shown as the following equation:
where
is the electromagnetic torque and
is the pole number.
The speed dynamic equation can be shown as the following equation:
where
is the mechanical speed,
is the inertia of the motor and load,
is the viscous coefficient of the motor and load, and
is the external load. The electrical rotor position can be expressed as the following equation:
where
is the electrical rotor position and
is the mechanical rotor position. Then the mechanical speed
of the motor is shown as follows:
The electrical rotor speed
can now be shown as the following equation:
3. Predictive Speed-Loop Controller Design
Predictive control is a kind of control algorithm that was originally applied in industrial processes in the 1970s, and it can be divided into two parts: direct predictive control, which requires a precise model of the uncontrolled plant and indirect predictive control, which involves a lower dimensional model [
14]. Unlike many other advanced control methods driven by theoretical research, the development of predictive control was mainly developed by the requirements of industrial practice [
15]. Model-based predictive control has several advantages. First, it can be used for multi-input and multi-output systems. Second, it can handle the past, present, and future performances of the dynamics of the system. In addition, predictive control takes account of actuator constraints [
16]. Finally, the update rates of predictive control are low; as a result, the predictive control algorithms are easily executed by using a DSP with on-line computations. In this paper, a predictive speed-loop controller and a predictive current-loop controller are designed. The details are discussed as follows.
By using Equation (3) and neglecting
, we can derive the following equation:
In addition, from (2), we can obtain the torque equation of the SPMSM, which can be expressed as the following equations:
and
where
is the torque constant of the SPMSM. Combining Equations (7) and (8), one can derive the transfer function of the SPMSM as the following equation:
The digital control system proposed in this paper requires a zero-order-hold device to keep the values of the q-axis current. The transfer function of a zero-order-hold device can be expressed as the following equation:
where
is the sampling interval of the zero-order-hold device. The cascaded transfer function of the zero-order-hold device and the SPMSM can be rewritten as the following equation:
By taking the z-transformation, we can obtain the following equation:
After that, taking the inverse z-transformation, one can derive the motor speed as the following equation:
In Equation (14), the parameters
and
are defined as the following two equations:
and
where
and
are the simplified parameters. By using (
k − 1) to replace (
k), Equation (14) can be rewritten as the following equation:
Subtracting Equation (17) from Equation (14), one can derive the following equation:
where
is the
sampling interval difference speed,
is the
sampling interval difference speed, and
is the
sampling interval difference q-axis current. From Equations (17) and (18), we can derive the (
k + 1)
sampling interval estimated speed as the following equation:
After that, we can define the cost function as the following equation [
17]:
where
is the weighting factor of the cost function of the
. Submitting Equation (19) into Equation (20), we can derive the following equation:
Finally, by taking the
and assuming that its result equals zero, we can derive the following equation:
From Equation (22) the
can be obtained and expressed as the following equation:
The q-axis current command, therefore, can be expressed as the following equation:
From Equation (23), we can obtain the block diagram of the speed-loop control, which is shown in
Figure 3. The control input
is the integration of the
, which is a linear combination of the speed error
and the
.
4. Predictive Current-Loop Controller Design
In this section, the details of the predictive current-loop controller design are discussed. From Equation (1), we can obtain the dynamic equation of the d-axis current as follows:
From Equation (1), we can obtain the dynamic equation of the q-axis current as follows:
The Equations (25) and (26) have coupling terms, which is the electric speed
. To simplify the design of the current controller, it is necessary to define the new state variables
and
. The d-q axis current dynamic equations, therefore, can be expressed as the following equations [
18]:
and
In Equation (27) and Equation (28), the variables
and
are defined as follows:
and
By taking the Laplace transformations of (27) and (28) and combining with (29) and (30), we can derive the following equations:
and
From Equation (31), we can derive the d-axis current transfer function as follows:
Then from Equation (32), we can obtain the q-axis current transfer function as follows:
In this paper, the d-axis current transfer function is cascaded with a zero-order hold device, and the zero-order hold device has a transfer function which can be shown as follows:
where
is the sampling interval of the current-loop control. By cascading the zero-order-hold device and the d-axis current transfer function, we can obtain the following equation:
Similarly, by cascading a zero-order-hold device with the q-axis current transfer function, we can obtain the following equation:
By taking the
z-transformation of
, we can derive the following equation:
Similarly, by taking the
z-transformation of
, we can derive the following equation:
By taking the inverse
z-transformation from Equation (38), we can derive the d-axis dynamic equation as follows:
Similarly, by taking the inverse
z-transformation from Equation (39), we can derive the q-axis dynamic equation as follows:
where
is the
sampling interval d-axis current and
is the
sampling interval q-axis current. From Equation (40), we can rewrite the d-axis current dynamic equation as follows:
The parameters in Equation (42) can be defined as follows:
and
Similarly, from Equation (41), we can rewrite the q-axis current dynamic equation as follows:
In Equation (45), we also can define the following two parameters as follows:
and
Using (
k − 1) to replace
k, the d-axis and q-axis current dynamic equations can be shown as follows:
and
Subtracting (48) from (42), we can derive the following difference equation:
In addition, subtracting (49) from (45), we can derive the following difference equation:
where the
and
are the d-q axis difference currents of the
sampling interval. The
and
are the d-q axis difference currents of the (
k)
sampling interval. The
and
are d-q axis difference voltages of the (
k)
sampling interval.
From Equation (48) and Equation (50), we can derive the estimated d-axis current of the
sampling interval as the following equation:
From Equation (49) and Equation (51), we can derive the estimated q-axis current of the
sampling interval as the following equation:
Next, we can define the performance index of the d-axis current-loop control as the following equation [
18]:
We can also define the performance index of the q-axis current-loop control as the following equation [
18]:
where
is the weighting factor of the control input
and
. From Equation (54), we can rearrange the equation as follows:
By using the same method, we can rearrange Equation (55) as follows:
Taking
and assuming that its result equals zero, we can obtain the following equation:
Similarly, taking
and assuming that its result also equals zero, we can obtain the following equation:
From Equations (58) and (59), we can derive the following two equations:
and
To consider the real control system, we need to add the coupling terms,
and
, and then we can obtain the following equations:
and
where
and
are the differences of the d-q axis control inputs.
Finally, the d-q axis current-loop control inputs can be shown as follows:
and
From Equations (60)–(65), we can construct the block diagram of the d-q axis current control system, which is shown in
Figure 4. In
Figure 4, the q-axis current command is a linear combination of the q-axis current error
and
. Similarly, the d-axis current command is a linear combination of the d-axis current error
and
.
In this paper, we define a performance index for the d-axis current control, which is shown in Equation (54), and then we also define a performance index for the q-axis current control, which is shown in Equation (55). Next, we use the optimalization technique to solve the = 0 and = 0. Finally, we calculate the optimal control input and . Therefore, we can obtain the optimal current difference and for each sampling interval. However, the PI controller only uses pole assignment but not optimization technique to determine and . Moreover, the integral action usually causes delay response. After the d-q coordinate transformation is executed, the and generate , , and . As a result, the proposed predictive controller, which uses optimization technique, has smaller harmonic currents than the PI controller does.
5. SPMSM Drive System
In this paper, a constant DC-link inverter is used. As a result, the SPMSM drive system includes three operating regions: a constant-torque region, a constant-power region, and a maximum-torque per volt region, which are shown in
Figure 5 [
19]. The details are discussed as follows.
- (a)
Constant-torque region
When the SPMSM is operated below its rated speed, due to the limits of the motor’s capability, the operating current has to be less than the allowed maximum current, and the operating voltage has to be less than the allowed maximum voltage. As a result, the SPMSM is operated in the constant-torque region. These two constraints are described as the following equations:
and
where
is the maximum q-axis current and
is the maximum stator voltage.
- (b)
Constant-power region
When the PMSM is operated beyond its rated speed, the back-EMF is increased and is close to the DC-bus voltage. In this situation, the resistance voltage drop and the inductance voltage drop are neglected. By submitting
= 0, and
into Equation (1), we can derive the following equations:
and
Then, by submitting (68) and (69) into (67), we can obtain the following equation:
From Equation (70), we can easily derive the following equation:
where
is defined as
which is the characteristic current of the SPMSM.
The Equation (71) can be graphically expressed and is shown in
Figure 6, which includes a current constraint and a voltage constraint. In
Figure 6, the line OA is the constant torque region, the line AB is the constant power region, and the line BC is the maximum torque/volt region.
- (c)
Maximum torque/volt control region
When the SPMSM is operated at the B point in
Figure 6, the d-axis current is near
, there is little flux, which causes serious current harmonics, and then this deteriorates the performance of the SPMSM. To solve this problem, in this paper, a maximum torque per volt (MTPV) method is used, which decreases the q-axis current to decrease the torque. The d-q axis currents can now be shown as follows:
and
where
is the d-axis current in the MTPV operating region, and
is the q-axis current in the MTPV operating region.
- (d)
Implementation
In this paper, an advance angle control is used to control the current vector
, which is shown in
Figure 7a. When the SPMSM is operated in the constant torque region, the advance angle
is set as zero. However, when the SPMSM is operated in the constant power region, the
is gradually increased. As a result, the d-axis becomes more negative and the q-axis current is gradually reduced, and this is shown in
Figure 7b. When the SPMSM is operated in the MTPV operating region, the d-axis current is fixed, and then the q-axis current is gradually reduced, and this is shown in
Figure 7c.
6. Implementation
Figure 8 shows the implemented regeneration circuit of the SPMSM drive system. The SPMSM/SPMSG has a rated speed of 200 r/min, 36 slots, 12 poles, a stator resistance of 6.84 Ω, d-axis and q-axis inductances of 9.8 mH, a flux linkage of 0.122 V·s/rad, an inertia of 0.01 kg·m
2, and a viscous coefficient of 0.005 N·m·s/rad. When the indoor exercise bicycle is ridden from a virtual upland to a lowland, the motor of the indoor exercise bicycle is accelerated. Then, the relays are connected to the inverter, which uses the energy from the battery set to drive the SPMSM, which adds extra torque to the indoor exercise bicycle to make the ride feel more realistic. However, when the rider of the indoor bicycle is riding from a virtual lowland to an upland, the motor of the indoor exercise bicycle is decelerated. The relays are connected to the 3-phase rectifier to transfer the SPMSG energy to the capacitor of the DC-link. After that, a buck-converter is used to convert the DC-link capacitor voltage to near 25 V, which provides for regenerative resistance. Then, the SPMSM converter transforms its energy into the regenerative resistance. In order to store and save the recovered energy, a charger is implemented to use the regenerated energy to charge the 24-V battery set.
Figure 9a is a photograph of the SPMSM, including the stator, rotor, and air gap. The stator has 36 slots, a diameter of 150 mm, a 1 mm air-gap, and 3-phase distributed windings. The rotor has 12 poles with ferrite permanent-magnetic flanges. The diameter of the rotor is 220 mm, and a belt is attached to the rotor.
Figure 9b is a photograph of the SPMSM drive system, including the encoder, the SPMSM, the mechanical coupling device, and the dynamometer. The encoder provides 2500 pulses/revolution.
Figure 10 shows a photograph of the main circuit, including the inverter, sensing circuit, DSP, encoder circuit, and DC-link capacitor. The DSP is type TMS-320F-28035, manufactured by Texas Instruments. All of the circuits were designed and implemented by the authors of this paper.
7. Experimental Results
The experimental proto-type system in this paper uses a Texas Instruments DSP, type TMS-320-F-28035, as the control center. The measured execution time of the proposed predictive speed-loop control is 1 ms, and the measured execution time of the proposed predictive current-loop control is 100 µs. The input DC-link voltage is 24 V DC, which is provided by a DC power supply. The encoder is 2500 pulses/revolution. The dynamometer was manufactured by Chain-Tail Cooperation, type ZKB1S2AA, which uses a variable DC voltage to adjust the external load. The PMSM/PMSG was manufactured by Direction Technology and National Taiwan University of Science and Technology. To validate theoretical analysis, several experimental results are shown here.
Figure 11a shows the measured speed responses at 200 r/min by using predictive controllers and PI controllers. Both of them have first-order transient responses because the SPMSM has an outer-rotor, which provides a great amount of inertia. As we can observe, the predictive controllers have faster transient responses than the PI controllers.
Figure 11b shows the load disturbance responses under a 1 N·m load at 200 r/min. When an external load is added, the predictive controllers have a 20 r/min speed drop and a 0.2 s recovery time, but the PI controllers have a 40 r/min speed drop and a 0.5 s recovery time. Again, the predictive controllers have better performance than the PI controllers.
Figure 12a shows the measured speed responses at a 200 r/min sinusoidal speed command. The predictive controllers have better performance, which can track the sinusoidal speed commands very well. The PI controllers, however, have a lag response due to the delay of the integrational controller.
Figure 12b demonstrates the measured speed errors. The maximum tracking error of the predictive controllers is 12 r/min, but it is 45 r/min for the PI controllers.
Figure 13a demonstrates the measured triangular speed responses at 200 r/min, and we can see that the predictive controllers have a faster tracking response than the PI controllers.
Figure 13b demonstrates the measured speed errors under the same conditions. As we can observe, the maximum tracking error of the predictive controllers is 28 r/min, but it is 38 r/min for the PI controllers.
Figure 14 displays the measured step-input transient responses at different commands from 2 r/min to 350 r/min when using the predictive controllers. All of the results have similar linear responses. As a result, it is not necessary to tune the parameters of the predictive controllers for different operating speeds.
Figure 15a shows the measured
a-phase current waveform at 200 r/min and 1 N·m by using a predictive current controller.
Figure 15b demonstrates the harmonic spectrum from fundamental frequency up to the 15th harmonic by using the predictive current controller. We can see that the total harmonic distortion is 8.8%.
Figure 16a shows the measured
a-phase current waveform at 200 r/min and 1 N·m by using a PI current controller.
Figure 16b demonstrates the harmonic spectrum by using the PI controller from the fundamental up to the 15th harmonic. We can see that the total harmonic distortion is 12.5%. Comparing
Figure 15a,b and
Figure 16a,b, we can conclude that the predictive current controller has better performance than the PI current controller.
Figure 17a displays the measured voltage of the regenerative resistance load, which is used to charge the 24 V battery, and it also displays the
a-phase voltage output that is generated by the SPMSG when the system is operated when regenerating energy.
Figure 17b shows the measured regeneration voltage waveforms and power in Watts at different duty cycles of the buck converter with different speeds of the SPMPG.
Figure 18a shows the measured voltage waveform when the relay is switched from “on” to “off”, and we can see that the switching interval is near 300 ns.
Figure 18b shows the measured voltage waveform when the relay is switched from “off” to “on”, and the switching interval is near 900 ns.
Figure 19a shows the measured speed responses without using the flux-weakening control. As we can observe, the speed cannot track the speed command because the back-EMF of the SPMSM is near 24 V.
Figure 19b shows the related d-q axis current commands and their currents, and we see that the d-q currents cannot track their current commands.
Figure 20a shows the measured speed responses at 300 r/min by using the flux-weakening control, and the measured speed can track the speed command well.
Figure 20b shows the measured d-q axis commands and their measured d-q axis currents, and all of the d-q axis currents can track their current commands well.
Figure 21a shows a comparison of the measured speed responses using and without using MTPV control. The adjustable speed range can be extended by using the proposed MTPV control.
Figure 21b shows the measured torque-speed curve from 10 r/min to 350 r/min, including constant torque, flux-weakening, and maximum torque per volt regions.
Figure 22a,b show the measured speed and current responses by using the new parameters of the predictive controllers with and without input current constraint. The responses using the input current constraint are smoother and slower than without using the input current constraint.
Figure 23a–c show the measured responses when the motor parameters are varied. The predictive controller has better performance than the PI controller again.
Figure 24a,b shows responses of the PI current controller and the new parameters of the predictive current controller. No torque sensor is used here. However, we can judge the torque ripples from the q-axis current ripples and speed ripples. As you can observe, from
Figure 24a,b, the torque ripples between the predictive control and PI control are quite close. Therefore, we can conclude that the predictive controllers provide better transient responses but not better torque ripples than the PI controllers.
Table 1 shows the comparisons of the proposed predictive controllers and PI controllers that were designed by pole assignment method. As we can observe, the predictive controllers have better performance than the PI controllers, including faster rise time, shorter settling time, smaller steady-state errors, faster recovery times, smaller speed drops when an external load is added, and smaller tracking errors for both sinusoidal and triangular speed commands.