A Control Strategy for Mechatronic Action of a Pipe Organ Using a VCM Actuator

: In pipe organs, the oldest and most commonly chosen system for connecting the organist operator to the source of sound (i


Introduction
The pipe organ is the most technically advanced classical instrument, and can produce the widest dynamic range of volume sound.In the pipe organ, sound is generated by air flowing in the pipe.The flow of air is controlled by the valve called the pallet.The operator of the pipe organ, the organist, controls the sound generation by pressing the keys.The control signal of the keys is transmitted to the pipe valves by the tracker action (Figures 1  and 2a).The organist, while playing, can control the generation of individual sounds by means of the keyboard, i.e., playing a melody, and the type of sound and its volume by means of individual voices are known as registers.The dynamics of the sound generation in the pipe-blowing depends on the opening speed of the pallet [1].This depends not only on the organist, but also on the type of basic action solutions, such as mechanical, pneumatic and electrical trackers [2].The mechanical solution of the action is the oldest, and has been used since ancient times for the first organ construction.The rest of the action solutions were introduced into pipe organs in 19th century.Nowadays, mechanical and electrical actions are the most common in the realization of instrumental pipe organs [3,4].In the mechanical, action the organist has full control over the production of sound and over the dynamics of the opening of the pipe valves [5][6][7].Electric action allows the organist to mechanically disconnect and move the keyboard, but in the case of electric action, the dynamics of opening the pipe valves is constant, and this is due to the dynamics of the electromagnetic actuator that moves the pallet.The direct electric action has a maximum repetition frequency of 10 Hz [8][9][10].For full control over the production of sound, organists prefer to use the mechanical action.Recently, new solutions of action have been applied to the pipe organ, using sensors, microcontrollers, and servos or other electric actuators for mechatronic action [11,12].The mechatronic mechanism can have positive mechanical and electrical operating characteristics, i.e., it should allow the full control over the dynamics of the generated sound and allow the keyboard to move away from the pipe organ [13,14].Independently of the action system, a microcontroller and electrical actuators are implemented in modern pipe organs as controllers of the registration and used to control the type and the volume of the sound [15].Voice coil motor actuators (VCMs) are widely used in precision motion systems, miniaturization of electronic equipment and dynamic keyboard systems of musical instruments, which are known for their high-speed and high-precision positioning systems, as well as their simple design and easy control [16][17][18][19].VCM actuators, which most commonly have a structure similar to hard disk drives (HDDs), are characterized by their small size in the direction of the rotational axis, allowing many actuators to be placed side-by-side in small spaces for miniature organ instruments [20,21].This property is not shared with other organ mechanism solutions with similar characteristics, such as the use of special electromagnets and stepping motors [22,23].
This paper presents a solution for the pipe organ's mechatronic system where the actuator is a Voice Coil Motor (VCM).The advantage of using VCM actuators in the mechanisms of pipe organs according to the proposed control strategy is that the sound generation by pipes can be fully controlled, as in the case of mechanical action.The control strategy is based on the measured dependence of the pallet opening as a function of the VCM actuator that moves the pallet, considered as the valve connected by a system of cranks and levers to its respective key in the pipe organ.
The organ pipe prototype was designed to reflect organists feelings to the keyboard's response for the mechatronic and electrical control systems.To compare the recognition of reactions, sound and displacement measurements have been performed playing an important role in the validation of the keyboard design.The measurement of sound and displacement allows such components to be evaluated for intended functionality and high quality.The average sound pressure level during a period of time and the displacement have been described.Measurements of opening and closing pneumatic valve pallet have been conducted using sensors, VCM and microcontroller.The control strategies in openloop and closed-loop have been proposed and analyzed for the mechatronic action with the VCM actuator to control the opening and closing pneumatic valve pallet.
The mechatronic action solutions improve the precision and the operation of controlling organ pipe key actions being quickly and extremely simple in the movement, in contrast to the complex mechanical transmissions, trackers, pneumatic system and pipe valves.The remainder of this study is organized as follows: Section 2 describes the structure of the tested pipe organ.Measurement system of key and pallet displacement and generated sound in is presented in Section 3. Basic measurements of mechanical and mechatronic action, control strategy of mechatronic action in Section 4, results of measurements of dynamics of mechatronic action working according to the strategy in Section 5. Conclusions and Future works are summarized in Sections 6 and 7.

Pipe Organ Structure
A miniature pipe organ was constructed according to the design of the standard pipe organ and the major components of pipe organ were provided by the "Orgelbau Kaczmarczyk" pipe organ building company (Figure 1).Generally, a standard musical pipe organ consists of an air compressor, air duct, keyboard, action, valves and pipes (Figure 2a).
In our case, the miniature pipe organ was equipped by mechanical, electrical and mechatronic action.The mechatronic action was implemented with three types of electric actuators: proportional controlled electromagnet, proportional controlled VCM and servomechanism.The application of different types of actuators arises from an interest in comparing the possibilities offered by different types of electric actuators, and refers to the solutions used and suggested by other research on pipe organs-electromagnet and servo, as well as applications in keyboard systems of keyboard instruments [24,25].The simplest control strategy is based on proportional to the error between the position of the key and the pallet in the VCM or electromagnet.The applied electromagnet is a standard pipe organ electromagnet (Laukhuff Trakturmagnet Laukhuff Traktor Magnet 12V) and the applied servomechanism is A Servo PowerHD R20 HV -standard.To control the voice coil motor is used the internal hard driver CY21A011 Quantum Bigfoot CY 2.1 GB 3600 RPM ATA/IDE 128 KB Cache 5.25-inch (Figure 2b).In the mechatronic mechanism, two types of displacement sensors were used: an Infrared Reflective Sensor Waveshare 9523 3.3 V/5 V-30 mm 3 for the keys and a linear potentiometer position sensor Senseiko KTR-10 for the pallets.The microcontroller that controls the mechatronic action is STM Nucleo ARM Cortex M3 programmed in ARM Cortex M3 IAR EW for ARM 9.10.2..The designed pipe organ with mechatronic action was tested and evaluated by organists from the Organ and Church Music Department of the Karol Szymanowski Academy of Music in Katowice [26].Both the test results and the musicians' evaluation showed that the mechatronic action equipped by VCM is the most similar to the mechanical action.The adopted past solution was not without drawbacks, although the key responded without any perceptible delay, slight vibrations of the key caused the pallet to vibrate noticeably.These research results suggested that the control system of the mechatronic action VCM proportional controlled is insufficient and should be developed on the basis of in-depth studies of the constructed mechanical and mechatronic actions.

Measurement System
For the analysis of the pipe organ with different actions in dynamic and static conditions, the measuring system was developed (Figure 3).By data acquisition system, the key and pellet displacement are measured in mechanical control system.The sound produced by the mechanical actuator in organ pipe, is acquired and amplified by microphone and collected by oscilloscope.The pipe organ measurement system consists of three main parts: the key actuation, acoustic and displacement measurement system.
The sound measurements were carried out with sound level meter Svantek 971.The sound level meter (SV 971A Class 1) is used for building acoustics measurements,uses a microphone offering a linear measurement from 27 to 140 dB in a single range and meets the IEC 61672-1:2013 standard's performance criteria such as linear operating range, frequency response and temperature operating range.A Supervisor software package SvanPC++ that is an advanced PC software supporting SVANTEK measuring instruments, is dedicated for sound level meters, noise dosimeters and human vibration meters.The microphone connected to the Supervisor is remembered enabling automatic creation of instruments' database containing important information such as uploaded settings and firmware version, calibration validity date or instrument clock time.For the displacement measurements Waveshare Infrared Reflective Sensors were used.The reflective modules with IR sensors equipped with digital and analog output work with a voltage from 3 V to 5.3 V. Signals from these sensors were measured by Rigol DS1054Z oscilloscope.The key actuation system consists of a pneumatic actuator ADVU-16-20-A-P-A Festo-156596 controlled by a MEH-5/2-1/8-P-B Festo Solenoid valve.The pneumatic system was supplied by an air-compressor.The time of the piston stroke of the pneumatic actuator was adjusted by controlling the exhaust air flow through the throttle valves.The solenoid valve was controlled by an electric switch in the 24 V DC circuit supplied by TTi CPX400D laboratory power supply as shown in the Figure 3.

Dynamic of Mechanical Action
The design of the mechatronic mechanism has been analysed using the reflection sensors.A pneumatic actuator was used in the experimental tests for the repetition of the key press and for the analysis of the dynamic key response of piano mechanics.
In fact, the pneumatic actuator is powered by compressed gas and useful to convert the compressed air into linear motion, which in this case determines the movement of keys on a keyboard to simulate the same reaction of an organist.
The key action is necessary to study for the role of haptic sensation in organ performance.Therefore the analysis of pipe organ dynamics has required the measurement of the key, pallet displacement and the sound of the pipes in order to evaluate the functionality and high quality.
For better comparison, the displacement of the key and pallet achieved by sensors in the pipe organ were normalised from 0-100 and the key of the organ pipe used for each action and measurement was chosen and denoted with "C" for frequency 1046 Hz.
Figures 4 and 5 show the dynamics of key displacement marked with blue line and the dynamics of pallet displacement marked with red line respectively for quick and slow response of the pressed key.It can be noted that when the key is pressed quickly, the response is almost immediate (Figure 4).The delay between the key and the pallet is less than 10 ms.When the key is pressed slowly (Figure 5), the delay is a tad longer at 20 ms.When releasing the key, the delay is 10 ms.In both cases, it can be concluded that, except for the delay, the system dynamic is negligible.Such a fast response of the mechanical system requires the necessity of a fast actuator.

Effect of Pallet Opening on Sound
In addition to the dynamics of the pallet openings, the measurements of sound generated by the organ pipes have been conducted inside the quite room of the laboratory.The pallet in organ pipe aforementioned valve opens by pressing the keys on organ instrument.
The pressure on the key causes the valve (or pallet) to open and is connected to the sound valve.The sound signal generated by the mechanical actuator in organ pipe was amplified by microphone Svantek SV 971A Class 1 and finally acquired on an oscilloscope.For the measurement of the pipe sound the layout of keys on the piano keyboard is considered.The white keys of the piano are named A-G and then the pattern repeats.In the keyboard of the piano the first note is called C and C is played with the white key that comes immediately before a set of two black keys.Typically, an organ pipe only produces one note.Additionally, a full-length keyboard has a distinct pipe for each pitch, allowing each key to produce the correct pitch when played.In our case the sound level measurements were carried out considering different openings of the pipe organ pallet.The time-average sound levels were calculated by Svantek Supervisor 2.0.6 software for a pallet opening of 25%, 75% and 100% respectively as shown in the Figure 6a-c for key 'C'.Due to the specific characteristics of the organ pipe instrument, it was not necessary to open the pallet at 100% to achieve the maximum volume of sound emitted from the pipe.In other words, the same effect can be achieved with a much smaller pallet opening as shown in Figure 6a-c.The time-average sound levels results as observed in the Figure 6a-c  The level sound relative to the key "C" of the keyboard, and of course corresponding to the pipe "C", with a frequency of 1046 Hz was analysed.In the tests the pipe "C" referred to key 'C' was mounted in place of the pipe or key b, due to the ability of the VCM motor to control the opening of the B-pallet over a wide range.Changing the location of the pipe has no effect on the test results.
The mechanical action is very fast in addition, from the design of the pipe organ it follows that pressing the key above a certain limit causes maximum airflow and therefore maximum sound volume.Thus, when constructing a mechatronic action it is necessary to pay special attention to the speed of its operation, to a lesser extent it is required to precisely follow the pallet behind the key because it does not have such a significant impact on the quality of the sound.

Dynamic of Mechatronic Action
The mechatronic action is constituted in the actuation system of the pipe organ by VCM, tracker, pallet and the spring.The mechatronic action was built using a VCM.The base of the VCM was located to the organ structure and an adapter on its E-block, which is rigidly attached to the pallet linkage on one side, and on the other side allows the adapter to rotate around the axis-the connection to the E-block.The VCM is controlled by a Pulse-Width Modulation (PWM) signal or rather the output of the electric source that supplies the VCM.
During measurement tests, pallets are opened and closed by mechatronic controls and keys are acted.
First, the dynamics of the VCM-pallet system was analyzed for a step change in the value of the PWM signal from 0% to 100%.The Figure 7 shows the relation of PWM and the opening of pallet represented in % from 0% to 100%.
As can be seen, the full pallet opening time is 20 ms.Therefore, the relationship between the linearly varying VCM value and the pallet opening is displayed in Figure 7.The increment of the PWM signal controlling the VCM is 3 percentage points per second.As can be observed in Figure 7, a significant hysteresis behaviour in the system is presented (Figure 7).To control the key positions and palettes by using sensors and microcontroller, the hysteresis of the system must be avoided.In Figure 8a,b, are shown the opening and closing pallets alternatively at the pressing of the key.In addition, this hysteresis has an irregular shape related to the structure of the organ.When driving the VCM to a value of about 70%, there is no response, followed by a sharp jump and then a linear increase to 100%.The effect of the pluck is due to the fact that, as long as the pallet is closed, the air pressure in the wind-chest presses against it.In order to open the pallet, the actuator must exert a force greater than the force generated by the return spring and the force resulting from the air pressure in the wind-chest.When the pallet is opened, even slightly, the airflow starts to flow into the pipe.The air pressure on both sides of the pallet equalizes and the force of the air pressing on the pallet disappears.The force produced by the actuator then causes the pallet to jump (or fall).The same phenomenon is experienced by the organist in the case of mechanical action as a key pluck [27].With the return path, the pallet starts to respond only when the PWM signal drops below 65%.In this case, the response of the pallet is much more abrupt.This is related to the structure of the organ a whose pallet closure is realized by a return spring as shown in Figure .These characteristic curves of opening pallet were recorded with the air compressor in accordance of the instrument in operation.Figure 9 shows the characteristic curve in case of air compressor is turned off and the function phenomenon of plucking for PWM signal approximately between 70% and 80% is absent.The relationship between VCM driving and pallet opening, also depends strongly on the PWM signal increment.In the previous case, the increase was 3% points per second.
After changing the increment to 6% points per second, the dependence of the pallet opening on the VCM signal is shown in Figure 8a,b, where the phenomenon of the pluck can be seen even more clearly.

Control Strategy
As shown in Figures 8a,b, clearly, the most important issue in controlling the key operation is the elimination of hysteresis phenomena.For this reason, a mathematical relationship can be established between the VCM and the opening/closing pallet by the characteristic curve.First, note that the PWM signal should be set above 70% of its maximum value to overcome the static resistance.Then, in the range between 70% and 86%, the relationship between the pallet opening and the PWM signal is fairly linear.Above a value of 86% of the PWM signal, the change in pallet opening is already insignificant.Similarly, when changing the PWM signal in the opposite direction (closing the pallet), the first reaction can be observed at a PWM signal less than 67% and when the PWM signal is equal to 60%, the pallet is fully closed.In addition, note that the PWM signal should be 0 when the key is not pressed for energy reasons.This avoids unnecessary heating of the motor.
The mathematical relationship between the VCM and the opening/closing pallet is defined by the characteristics points as shown in the Figure 8b.In this case the variables named minUP, maxU p, minDown and maxDown that indicate respectively the minimum and maximum values for PWM signal that rises and falls, have been defined for the closing and opening pallets (Figure 8).Considering the main objective, namely the speed of the system and the opening and closing pallets, the following control algorithm can be proposed: where PWM is the Pulse-width modulation of the control signal in the range of 0-100%, x is the key displacement normalized in the range of 0-100%, y is the pallet displacement normalized in the range of 0-100%, µ is the auxiliary variable, k 1 and k 2 are tuning parameters, minU p, maxU p, minDown and maxDown are constants and α, β, γ are the thresholds.α is the threshold which, if exceeded, indicates a key press It protects the system from vibrations resulting from noise generated by the optical sensor.Experimentally, the value of the α threshold was set at 3 and β is the threshold that defines the full sound level.Exceeding it switches the set of constants from minU p and maxU p to minDown and maxDown.
Which means a displacement on the hysteresis loop in the left direction (Figure 8b).The value of this threshold was experimentally set at 50.Finally, γ is the threshold indicating that the key has returned to its initial position.A switch forth from constant minDown and maxDown to constant minU p and maxU p respectively is achieved.This means a displacement of the hysteresis loop in the right direction.The value of this threshold was set to 4. The constants values of the minU p, maxU p, minDown, maxDown are derived from Figure 8b and are respectively: minU p = 71%, maxU p= 86%, minDown = 60%, maxDown = 66%.This control strategy is referred to as closed-loop mode.As can be seen, it is a combination of an open system and a closed system.In the closed part, a simple PID controller is used.A number of tests have shown that the use of the other parts, both D and I, negatively affects the operation of the entire system.In the case of the D term, this is due to measurement noise, in the case of I due to a negative phase shift slowing down the operation of the entire system.
Since the accuracy of the pallet opening is not crucial, it is also possible to propose a modification of this system to an open system using the following formula: where: λ,δ are thresholds and k 3 is the tuning parameter.In this case, the pallet displacement signal is not used.The control law is changed, but also the switching condition.λ is a threshold indicating that the key has been pressed.Exceeding this threshold means switching from the maxU p and minU p constants to maxDown and minDown, similar to the closed-loop mode.Also, the threshold works similarly, indicating that the key has returned to its nominal position.During testing, it turned out that when pressing the key very quickly manually, there were situations in which the λ threshold was exceeded, but the pallet did not manage to open yet.This resulted in the disappearance of the sound.This effect is due to the dynamics of the VCM.To avoid this negative effect, an additional condition was added that the λ-threshold must be exceeded for more than 20 ms.

Results
As part of the study, the effect of tuning parameters in particular k 1 , k 2 for the closed-loop mode system and k 3 for the open-loop system on the pallet opening rate and key pressing was checked.The tuning parameters are included to adjust the values of the parameters in control algorithm to improve the performance of key operation on the given open or closed loop system.The experimental tests have consisted of pressing and then releasing a key.The key was pressed using a pneumatic actuator in the same way as described previously.The tests were performed for slow and fast speed of the pneumatic actuator acting on key and in consequence on opening pallet.The results for the closed-loop control system and for different speed of pneumatic actuator acting on key are shown respectively in Figure 10a In Figure 10a, the delay between the key being pressed and the pallet opening is about 15 ms for fast key press.In the closing pallet, the value of the delay is slightly higher of 35 ms.In Figure 10b the values for the time lag between the key and the pallet are slightly larger at 20 ms and 45 ms, respectively for a slow key press.In each case, the pallet opening was below 100%, nevertheless, it does not affect the sound level.The greater influence on pallet opening is due to direct effect of the key on the pallet for the open track.In other words, a greater influence of the parameters k 1 and k 2 .
Figure 11a,b show the results for open-loop mode.When the key is pressed, the flap opening delay is about 15-18 ms.The results are similar for both fast and slow key presses.At the initial position for the fast action of key press and opening pallet, the delay is 75 ms and for the slow one is 55 ms.It is worth noting that in this case for two settings of tuning parameters k 3 = 1 and k 3 = 1.3, the flap opens at 100%.If the value of parameter k 3 is greater than 1, the performance of the system will not increase appreciably, and the overall system behavior may become more aggressive.Finally, the performance of the two proposed control systems with the mechanical action are compared and shown in Figure 12a

Conclusions
This paper presents a mechatronic action with VCM actuator that act on pipe organ.The VCM has r that has a high operating speed and allows precise position control.The mechatronic action aims to reproduce as closely as possible the mechanical motion of an organists when playing the keys of a pipe organ.The selection of the mechatronic action control strategy was preceded by measurements of the mechanical action and measurements of the behaviour of the VCM actuator system, which moves the pneumatic valve pallet.The measurements were carried out on a miniaturised pipe organ-one type of action for one key.Based on the measurement results-the obtained relationships between the VCM actuator control and the pallet opening-a control strategy was proposed for two modes of action operation: closed-loop and open-loop.For the proposed control strategies, measurements of the flap opening in relation to the key displacement were carried out for different control system parameters.The results show that mechatronic action according to the proposed control strategy reproduces the behavior of mechanical motion to a significant extent.Closed-loop control methods have small delays but require the use of flap displacement sensors.
An appropriate development of mechatronic action research could be the realization of a full pipe organ with mechatronic action for a full keyboard.

Future Works
The proposed mechatronic pipe organ device and the measurements results compared to other systems [5] constitute a good solution to improve the sound performance and to control the key and pallet using VCM.The future of pipe organs could involve the sound electronic production and industry to build digital instrument robust enough to last forever.Although the measured signals, i.e., sound levels, are very similar to the commercial pipe organ, the miniaturized pipe organ is made of metal and wood that create a certain difference in the audio signal which can appear darker and softer.Therefore the mechatronics action in organ pipe can be combined with music, technology and artificial intelligence to read human emotions and incorporate skeletal robotic hands.Using a skeletal hand on a robotic arm attached to a pipe organ keyboard eliminates the need for motors and actuators, saving energy and simplifying design.

Figure 3 .
Figure 3. Measurement system of the pipe organ actions.

Figure 4 .
Figure 4. Displacement of pallet and key for quick key presses.

Figure 5 .
Figure 5. Displacement of pallet and key for slow key presses.

Figure 7 .
Figure 7. Open-loop response of the system for VCM and opening pallet.

Figure 9 .
Figure 9. PWM signal and pallet opening (%) in case of air compressor on and off.

Figure 10 .
Figure 10.Comparison of the effect of different values of parameters k 1 and k 2 (a) for closed-loop mode and fast key press; (b) k 2 for closed-loop mode and slow key press.

Figure 11 .Figure 12 .
Figure 11.Comparison of the effect of different values of parameter k 3 (a) for open-loop mode and fast key press; (b) for open-loop mode and slow key press.