This section, firstly, introduces the structure and working principles of the proposed permanent magnet synchronous motor drive-based tuning devices. Then, the surface-mounted permanent magnet synchronous motor-based servo drive system with particular features (suitable for the tuning devices) is presented.
2.1. Structure and Principles of the Proposed Tuning Devices
The structure of the proposed piano tuning devices is shown in
Figure 1, which are mainly composed of a sound detection device, a pitch analysis device, surface-mounted permanent magnet synchronous motor-based actuators and the components of the piano. The sound detection device is a microphone, collecting the sounds generated by each string. The sound detection device is connected with a computer, on which a sound analysis software is installed, and they constitute the pitch analysis device. When the sound is input into the computer, the fundamental frequency of the signal (representing the tension of the string) can be extracted by using fast Fourier transform algorithms, which can be used to judge the intonation [
8,
31,
32]. Then, the detected frequency is compared with the standard value, which is stored in the computer. It must be mentioned that the standard fundamental frequencies of all strings can be provided by the piano manufacturers, and the users can enter them into the analysis software manually. After pitch analysis, the error (∆
f) between the detected frequency and the standard frequency is treated as the control signal of the surface-mounted permanent magnet synchronous motor-based drive, determining whether the double closed-loop speed-regulation algorithm or the triple closed-loop position-regulation algorithm should be used to control the electric motors. The motor shaft is connected with gears, reducing the output speed and increasing the output torque of the actuator. Finally, a junction at the end of the shaft of the output gear, which matches the head of the pins, can turn the pins so as to change the tension of the strings.
When using the proposed devices to tune a piano automatically, the implementation procedures are as follows (see
Figure 2):
Step 1: The user plays one note, and the corresponding string generates sounds which are a mixture of sinusoidal tones at different fundamental frequencies.
Step 2: The sound detection device collects the sounds and transmits the signals into the pitch analysis device.
Step 3: The pitch analysis device extracts the fundamental frequencies of the sounds and compares them with the pre-input standard frequencies.
Step 4: The frequency errors ∆
f are used to control the surface-mounted permanent magnet synchronous motor-based servo drive system. The goal of this step is as follows: If ∆
f is not zero, turn the pins of the piano to reduce the errors. If ∆
f reaches zero, the pins exactly maintain at the position. The logic of how to use ∆
f to actuate the drive system will be detailed in
Section 2.2.
Step 5: The tuning process is repeated until the pitch of the string is in tune, which can be represented by the frequency error displayed on the pitch analysis device.
2.2. Surface-Mounted Permanent Magnet Synchronous Motor-Based Servo Drive System
As shown in
Figure 1, the servo drive system is composed of hardware and software of the surface-mounted permanent magnet synchronous motor drive, and gear. This part mainly illustrates them and the design methods with reference to the aforementioned functional requirements (low-speed rotation and position holding). In addition, considering that the surface-mounted permanent magnet synchronous motor drive is the core of the servo system, of which control parameters are required to be tuned in practice, the mathematical model of it is established, laying the ground for further analysis in
Section 2 and
Section 3.
a) Hardware
The hardware of the surface-mounted permanent magnet synchronous motor drive contains four main parts (see
Figure 1), including a direct-current source that supplies power and voltage to the system, an inverter that converts direct current power into alternating current power, a motor that converts the electrical energy to the mechanical one, and the signal processing components (analog circuits and digital signal processor, etc.) As for the gear, it is part of the hardware of the servo system as well, connecting with the motor shaft (with gear ratio of
N:1) and provides a junction to match with the pins of the piano. In order to satisfy the functions of low-speed rotation and position holding, the following points need to be noted at the design stage.
On the one hand, firstly, [
12] illustrates that the maximum output rotating speed of the gear is 2.4°/s (0.042 rad/s). However, the literature also clarifies that although this speed can ensure a relatively high precision, it is still possible that large tuning errors can be generated. This represents in a lower pin-turning speed, which should be considered in an automated piano tuning system. Hence, as for a surface-mounted permanent magnet synchronous motor-based tuning device, which can operate stably in low-speed conditions, the operating speed can be designed as half of the maximum value, that is, 1.2°/s (0.021 rad/s). Secondly, in order to employ a gear with a moderate gear ratio, which is with high precision [
33], the rated speed
ωm_rd of the surface-mounted permanent magnet synchronous motor can be designed as 2.1 rad/s (20 rpm), at which many surface-mounted permanent magnet synchronous motor servo motors can work stably without significant ripples. Thirdly, since the motor speed and the output speed of the tuning device are determined, the gear ratio
r can be selected:
In practice, the gear box DKM 8GBK100BH is a good choice for speed reduction in the servo drive system.
On the other hand, to take full advantage of the position holding function of a surface-mounted permanent magnet synchronous motor drive, it is necessary to install a position sensor with high resolution in the motor. In this aspect, resolvers and encoders are competitive sensor alternatives [
34]. However, compared with the encoders, considering that the resolvers have the advantages of high stability and high adaptability, it is more suitable for the piano tuning application. Practically, a resolver and a 16-bit resolution tracking resolver-to-digital (R/D) converter AD2S1210 can be used to constitute the system [
25]. In this case, the resolution
res (minimum position changing step in mechanical position) of the sensor can be calculated as:
where
pr is the number of pole pairs of the resolver. Based on (2), it is obvious that when
pr = 1,
res is 0.0055°. And if
pr rises, the minimum resolvable position will get smaller (higher resolution). It must be mentioned that because the rotor speed is calculated based on the position information, the resolver with high resolution contributes to lower speed detection ripples as well, helping to exert the aforementioned function of low-speed rotation.
b) Software
As shown in
Figure 1, two different control schemes are incorporated, which are selected by the frequency error ∆
f. Specifically, after ∆
f is detected, the sign of its value is judged. When ∆
f is non-zero, the double closed-loop speed-regulation scheme with good low-speed control performance [
34] is adopted, and when ∆
f is zero, the triple closed-loop position-regulation scheme with a marked position control performance [
35] is adopted for control.
The implementations of the double closed-loop speed-regulation strategy are as follows:
Step 1: Speed reference calculation: If ∆
f > 0,
s1 = 1, but if ∆
f < 0,
s1 = −1. Then, the reference speed
ωm_r is calculated as:
Based on (3), when ∆f is positive, the motor rotates positively. Otherwise, it reverses. These show that the corresponding string of the piano is tightened or loosened, respectively.
Step 2: State measurement and coordinate transformation: The phase currents
ia,
ib, rotor position
θ and rotating speed
ωm are measured by using sensors. Then, the currents are transformed to the direct-quadrature (
d,
q)-axis currents
id,
iq by using
ia,
ib and
θ [
34], with intermediate variables (
α,
β-axis currents)
iα,
iβ.
Step 3: Speed regulation and current reference generation: The error between
ωm_r and
ωm passes through an automatic speed regulator, generating
q-axis current reference
iq_r. Then, considering that for a surface-mounted permanent magnet synchronous motor, the largest torque will be generated under the fixed current when the
d-axis current remains at zero, the
d-axis current reference
id_r is set as 0 in this research (see
Figure 1).
Step 4: Current regulation: The errors between iq_r and iq, and between id_r and id pass through two automatic current regulators, respectively.
Step 5: Space vector pulse width modulation signal generation: The outputs of the two automatic current regulators are adopted to generate control signals based on the space vector pulse width modulation theories [
34].
Step 6: Actuation: The space vector pulse width modulation signals are applied to the inverter and motor.
The implementations of the triple closed-loop position-regulation strategy are as follows:
Step 1: Position reference determination: When the frequency error ∆f is zero, the instantaneous rotor position θ_r is recorded, and it is set as the position reference. In this case, the rotor position is expected to be controlled to maintain at θ_r.
Step 2: Position regulation and speed reference calculation: The error between θ_r and θ passes through an automatic position regulator whose parameters need to be tuned using a fuzzy controller. The output of the automatic position regulator is treated as the speed reference ωm_r.
Step 3~Step 7 are consistent with Step 2~Step 6 in the above implementation procedures of the double closed-loop speed-regulation scheme.
From the above analysis, the main difference between the two control techniques is that their control objectives are different. Besides, the purpose of the double closed-loop speed-regulation strategy is to adjust the pitch of the string to approaching the standard value, while the triple closed-loop position-regulation is able to eliminate the overshoot caused by the double closed-loop speed-regulation so as to achieve accurate tuning. Finally, it must be mentioned that in terms of the speed regulation and current regulation parts, they share the identical control algorithms.
c) Modeling of Surface-Mounted Permanent Magnet Synchronous Motor drive
The models of the main components (motor, inverter and proportional integral controller) of the surface-mounted drive, which are needed for parameter tuning in this paper, are established in this part.
Firstly, assuming that the iron saturation and hysteresis loss are assumed negligible [
36], the mathematical model describing the electrical and mechanical dynamics of a surface-mounted permanent magnet synchronous motor in the
d,
q rotating frame is:
where
ud*,
uq* are the
dq-axis control voltages without considering decoupling (see
Figure 1). The stator winding resistance is
Rs. Ψ
f is the rotor flux.
Ls is the stator inductance of the motor.
Tl is the load torque, and
Te is the electromagnetic torque. Then,
pm represents the number of pole pairs of the motor.
J is the inertia of the rotor and
B is the friction coefficient. From (4) and (5), it can be seen that a coupling effect exists, which will degrade the control performance. Therefore, in real applications, a feedback decoupling method is usually adopted to solve the problem, as shown in
Figure 3.
After decoupling, the electrical model of the machine can be reconstructed as:
where
ud,
uq are the
dq-axis control voltages with decoupling considered. Furthermore, applying the Laplace Transformation to (6)–(8), the motor model (taking the
q-axis properties as an example) in the
s-domain can be depicted in
Figure 4, where
Tl can be regarded as an external disturbance.
Secondly, ignoring the delay effects of the dead zone and switch delay, the inverter can be described by a first-order model:
where
kinv is the magnification of the inverter, and it is 1 when the space vector pulse width modulation strategy is adopted.
Ts is the switching period.
Thirdly, as for the automatic speed regulator, automatic current regulators and automatic position regulator (proportional integral controllers), the transfer functions of them are:
where
ks_p,
kc_p and
kp_p are the scaling factors, and
ks_i,
kc_i and
kp_i are the scaling and integral factors of the automatic speed regulator, automatic current regulators and automatic position regulator, respectively.