The system acquires the signal from an electrical guitar and Inputs the signal Into a target PC running XP. Sing Fast Fourier Transforms (OFT the system calculates the fundamental and harmonics of the played notes and compares it with the desired pattern. The frequency difference is used as an input to a fuzzy logic controller that automatically adjusts the tension of the desired string. To load the Target PC with the designed system, the Smiling model must be compiled Into C-code and then transmitted over the RSI-232 connection from the Host PC to the Target PC. Figure 1 shows a screens of the XP interface.
As can been seen from this figure, the graphical interface of real-time kernel of the target PC is minimal which allows all the recessing power of the processor to be used for calculations. L. INTRODUCTION Guitar tuning has been a manual task since the invention of the string instruments. Guitar tuning process has traditionally been performed by comparing a reference note with the played note either by listening or by using a modern electronic tuner with a visual feedback. Both these methods require the player to manually adjust the guitar key to bring the string In tune.
An automated guitar tuner has the ability to be much faster and more precise in tuning the strings to the proper pitch than a human user. Saving time in tuning and avian proper pitch is very important to musicians, especially during concerts or when a string breaks while performing. An automated guitar tuner could be particularly valuable to a professional musician that Is on the road performing In attach the tuner to the head of the guitar and have the tuner bring the strings to perfect pitch. Fig 1 . Screens of the XP interface The clear advantage of running the XP kernel is the high computation throughput in real-time.
This allows real-time implementations of a Fast Fourier Transform and fuzzy controller [2,3]. The fuzzy controller’s output drives a power amplifier that drives a trot tuning the guitar, as shown in figure 2. In this study a fuzzy controller is used for tuning guitars. The automated fuzzy tuner tunes the guitar much like the musician would tune the guitar but at a much higher speed and accuracy. The fuzzy controller provides a safe and reliable way to tune the instrument. The parameters of the controller can be adjusted to personalize the tuning process and reduce the fatigue on the guitar strings. II.
In other words, XP is a powerful real-time operating system (ROOTS). This allows the XP kernel to take full advantage of the Cups processing power. The Host PC is the computer that is running MUTUAL and Smiling. The Target PC is the computer running the XP kernel. The Host PC and Target PC are connected through a RSI-232 null connection. The null connection cable has to be used such that the transmit of one PC can be connected to the 1-4244-1214-5/07/$25. 0 02007 IEEE Fig 2. Motor guitar key coupler. XP is able to input and output signals by using the integrated blocks in the XP toolbox in Smiling. XP 195 revised easy access 1/0 blocks for major hardware manufacturers. In this work, the National Instruments EYEPIECE capture card was used. The fuzzy controller was developed using Mahatma’s Smiling and utilizing the XP blocks. The system consisted of two PC’s, the host PC running Smiling connected via RASPS to a target PC running XP real-time kernel. Hardware-in the-loop consists of a National Instruments sampling rates up to 250 KHz .
The block diagram of our automated guitar tuner is shown in figure 3. XP Ta rage Boa rd To filter and extract only the AY note, figure 5, a low pass filter had to be designed. A Smiling model of the four harmonics was developed as shown in figure 6. The model and results of this simulation are shown in figure 6 and 7. Power Amp Guitar pickup Host Fig 5. Oscilloscope OFT frequency analysis of the guitar pickup signal. Tuner Fig 3. Functional Block Diagram Figure 4 shows our first Smiling/XP program to test the hardware. Fig 6. Smiling OFT frequency analysis model.
Fig 4. Feedback system using Smiling The Host PC is used to develop the controller. The model is compiled and downloaded to the Target PC. The Target PC runs the real-time system acquiring the output signal for offline analysis. Fig. 7. Smiling frequency analysis scope output. Ill. GUITAR INPUT FILTER DESIGN ‘V. FUNDAMENTAL FREQUENCY DETERMINATION In order to tune the guitar, the fundamental frequency of signal from the guitar. From this sample, it can be seen that the fundamental frequency for A-note is at 110 Hz’s with harmonics every 110 Hz’s after .
To tune the guitar, the fundamental frequency will be used in comparing the guitar pickup signal to the ideal signal. An FIR Cripple low pass filter was designed, as shown in figure 8, with a pass band of 110 Hz’s and stop band at 170 Hz’s. This allows a sharp transition band of 60 Hz’s. 196 PC-IEEE National Insert. Analog Input interviewing several expert musicians . The musician’s tuning knowledge was used to create Fuzzy Rule Sets. For the input of the fuzzy controller, three membership functions were created: flat (MFC), in-tune (MFC), and sharp (MFC). This can be seen in figure 11.
FATWOOD Scope Digital Filter Design Fig. 8. XP Low-Pass Filter In figure 9, absolute values, and Maximum blocks were added to determine the fundamental frequency. Buffer block is needed to allow proper calculation of the OFT. Digital Input Fill term Ides gnu Buffer Fig 11. Input membership functions. Abs The output membership functions were chosen to allow aster tuning if the system was out of tune. As the system came into tune, the system would slow down to “fine tune” the guitar. The output membership functions can be seen in figure 12. Maximum Fig. 9. Real-Time OFT determining Fundamental Frequency.
V. FUZZY LOGIC CONTROLLER The system in figure 9 was modified to create a closed loop fuzzy controller as shown in figure 10. The input to the fuzzy logic controller is the desired frequency and the feedback signal is the actual frequency of the string. Fig 12. Output membership functions. The rules of this IFS relate the input membership functions to the output membership functions. When the input is flat then the output MFC is the dominant membership, when the note is in-tune the output MFC is influential, and when the note is sharp the output MFC is the prevailing membership.
The membership was chosen to be this way so that when the signal is sharp or flat, the opposite membership functions are selected for the output. The motor should turn in the opposite direction of the signal in order to return the string to in-tune. A sample of the IFS can be found in figure 14. The fuzzy controller was designed based on the hardware characteristics and knowledge-base gathered from 197 Fig 13. Rule Editor for the IFS Fig. 15. Output vs.. Input of the fuzzy controller. To see exactly how the fuzzy controller would react to different inputs the Rule Viewer was used.
This GUI allows the input to be changed and observe the effect of the membership changes based on the input. This can be seen in figure 14. The output of the fuzzy controller is the input to a zero order hold (ZOO) rate transition. The ZOO rate is inherited from the data acquisition output block. The sampling rate for the entire system is 1 kHz (every 0. 001 seconds). To test the entire system to ensure that it was working properly several instruments were used to verify the results. The oscilloscope was used to verify if the signal was in tune and a [email protected] auto guitar and bass tuner was also used.
After the guitar A-note was tuned using the developed design, it was connected to a spectrum analyzer to verify the fundamental frequency. Figure 16 shows the OFT frequency analysis after the guitar is tuned. It can be seen that the center frequency is GHz. The figure shows that the fundamental frequency is slightly flat at about 100 Hz’s. The fourth harmonic, which is the known frequency for the A-note, is at GHz. From this figure it can be seen that the note is slightly flat after tuning. Fig 14. Rule Viewer for fuzzy controller. The output vs.. The input of the fuzzy controller can be seen in figure 15.
The output was designed to overcome the static friction of the motor. The controller outputs values close to +1- 1 when the signal is far out of tune sharp or flat. As the signal becomes in-tune, the fuzzy controller’s output quickly drops to zero. This is done so when the signal is close to Intent, the motor will turn slower to tune the signal more precisely, dampens the overshoot, and eliminates the Fig 16. Oscilloscope OFT frequency analysis after tuning the A-string with the developed design. The integrity of the fuzzy guitar tuner was then tested with the [email protected] auto tuner for additional verification.
Figure 17 shows that the A-note is slightly out of tune. This slight deviation is acceptable by most professional musicians, and can not be heard. This also verified the oscilloscope results. As can be seen from figure 15, there is sharp transient in the response of the fuzzy controller. This will allow the controller to overcome static friction of the motor and apply a voltage greater than +1- 0. 7 volts, which is the threshold for the static friction of this motor and gearbox. For future work, a dither signal or a current based controller can be used to eliminate the static friction problem.