Piscivorous Bird Deterrent Device Based on a Direct Digital Synthesis of Acoustic Signals

This paper addresses the development of an acoustic deterrent device for the protection of fishponds and other objects against the unwanted presence of birds. The objective of the paper is not only providing of a deep analysis of available technologies for waveform synthesis and generation, but also building a theoretical base for the design and implementation of acoustic bird deterrent solutions. The paper addresses the synthesis of bird songs and calls using technologies for music, speech, and other types of acoustic signal processing. The second part of the paper is devoted to the unique algorithms and implementation details of the intelligent acoustic deterrence device prototype. The practical applicability of algorithms for bird call record conversion into synthesizer sequences has been analysed and possible issues are highlighted. The effectiveness and ease of practical implementation of the given method in the hardware are briefly discussed.


I. INTRODUCTION
The too active presence of carnivore birds in the fish stocks creates a lot of problems for fisheries and aquaculture businesses [1]. Many European fisheries are badly affected by various predatory birds, particularly cormorants (Phalacrocorax carbo), which are capable of killing around 0.6 kg to 1.2 kg fish per day [2]. Their rapid distribution in Europe over the last 20 to 30 years has been associated with huge losses to pond farms. Since hunting of cormorants and many other species is prohibited by European laws, fisheries are looking for acoustic and optical deterrent solutions that would frighten off the unwanted birds.
The purpose of this research is the development of an affordable, highly efficient, and reprogrammable acoustic deterrent device for fishponds. This device must be able to synthesize bird vocalizations and other sounds intelligently when synthesized sounds vary between the cycles. This prevents the habituation of the birds to the sounds and allows them to store sound in a much compact manner.
To be effective and to avoid adaptation of birds, the deterrent signals should have the following characteristics:  The signal should be loud enough for the birds to hear it;  The signal must be within the audible frequency range of the birds;  The signal may need to be biologically relevant, producing an appropriate effect on the birds;  Both underwater and surface signals should have as little impact on the environment, humans, animals, and fish as possible;  The habituation of birds must be excluded, and consequently certain signal characteristics must be constantly changing (spectrum, duration, steepness, delay). This paper is organized as follows. Section II is devoted to the analysis of the existing auditory bird deterrent solutions. Section III provides an overview of bird hearing. Section IV is devoted to the acoustic deterrence of birds. In the first part of this section, the deterrence of birds using acoustic signals is reviewed, whereas the following subsection addresses the theoretical and practical aspects of the acoustic signal analysis and synthesis. Section V is devoted to the implementation of acoustic deterrent devices and additional MATLAB utilities. The testing results are shortly reported in Section VI. Finally, Section VII summarizes this paper and draws main conclusions about the achieved results.

II. RELATED WORKS
Auditory scaring techniques for birds are widely used in agriculture, aviation, and other sectors. One of the simplest acoustic deterrent solutions for birds, widely used in agriculture, is gas-powered guns. Although rifle shots -like sounds deter birds, they make a lot of problems to other inhabitants as these devices can be easily confused with real hunting weapons and can lead to false police calls. Moreover, due to the periodical nature of shots, birds adapt to these devices. If fishpond is large enough, the deployment of these guns to a floating platform becomes necessary, and this makes servicing of those devices quite problematic and dangerous. Moreover, scientific studies [3] have shown that a wide acoustic spectrum of the shots make a lot of stress on fishes and can lead to mass death.
Another widely used acoustic deterrent solution is generators of high-intensity bioacoustic signals. In the simplest case, these are devices that periodically playback the recorded sound of a predatory bird, siren, or human voice. One of the advantages of these devices in comparison to gas-powered guns is the ability to deter diving predator birds underwater, utilizing corresponding underwater speakers. The most extensive review of auditory bird scaring techniques for repelling of the birds is given in the report in [3]. The more than 50 pages long document provides a detailed overview of auditory, visual, chemical, exclusion, habitat modification, and lethal techniques. In the publication in [4], the author provides a short overview of bird hearing. In the second part of the paper, an efficiency and characteristics of more than ten commercially available deterrent solutions made by different companies are analysed.
One of the most recent scientific developments in the area of bird deterrents are "Sonic nets" [5]. They employ combination of regular speakers and nonlinear transducers generating narrow acoustic beams, i.e., parametric arrays, for creation of areas of extremely intense acoustic interference, whereas outside these areas the sound is weak. The sound intensity inside these "sonic nets" is so high that birds cannot communicate with each other and prefer to leave these areas. Another advantage of this technique is that it allows to reduce annoyance of humans and animals in the surrounding area. However, due to the complexity of this patented technique [6], its use in agriculture and fishery is not cost effective.

III. BIRDS HEARING
To be able to define the requirements for underwater and in-air acoustic signal generators, it is necessary to take into account the knowledge of bird hearing and the perception of specific signals.
The hearing characteristics of birds are different from those of humans and other mammals. One of the bigger differences is the lack of an outer ear used by mammals to concentrate and amplify the incoming signals. Similarly, birds have only one columel -an organ that provides a theoretical 20x amplification of the signal coming from the eardrum to the inner ear. Just as with humans, the inner ear serves two functions: balance and hearing. Hearing is provided by a cohort that, unlike a mammalian cohort, is straight and varies in length depending on the species of bird. This specific component determines the range of bird hearing frequency, i.e., the longest cohort provides better sensitivity to signal reception across the frequency range, as well as resolution between frequencies [7].

A. Hearing in Air
It should be noted that different bird species have different audible frequency ranges due to their physiological peculiarities. The information on hearing many birds in the air is summarized in Table I.
Although the sensitivity frequency ranges of different bird species vary dramatically, high sensitivity frequency is almost equal for all mentioned birds. One very important point to note is that there is no scientifically proven data on the ability of birds to hear in the ultrasonic (> 20 kHz) range. Some bird species can hear infrasound (< 20 Hz), but low-frequency signals have one characteristic -difficulty in identifying a sound source that is particularly distinctive for birds, given the short distance between the ears. In such cases, to locate the sound source, the birds fly around the object, orienting themselves with Doppler shifts to identify the direction. This method may be useful for birds looking for other birds, but it can be concluded that the use of infrasound does not meet the primary objective of repelling predatory birds from the ponds. Sensitivity to sound volume is strongly dependent on the frequency of the sound. In general, birds have higher auditory thresholds than humans, which is determined by weak signal amplification in the inner ear.
Like humans, in environments with high levels of ambient noise, birds have two problems: damage to hearing elements due to excessive stimulation and weak recognition of signals in the presence of external noise. Both of these problems can occur simultaneously under certain circumstances. Sensitivity reduction requires the use of higher-level signals, which in turn can lead to even greater damage. Unlike humans, birds are provided with partial hearing organ regeneration, which indicates their ability to regain their hearing. Regeneration stops if the bird is exposed to constant noise for a long time. When studying the parameters of acoustic signals, it should also be taken into account that birds show appropriate behavioral changes in adapting to ambient noise, e.g., by increasing the intensity of the transmitted signals themselves.
The study in [8] investigates the hearing of cormorant, including the data on the sensitivity of these birds to the signals of different frequencies. An analysis of available publications reveals that the sea cormorant best hears a sound in the range of 1 kHz-4 kHz, reaching a maximum sensitivity of 2 kHz, which is also consistent with those of the other diving birds. It should also be noted that at 2 kHz, the resilience to the external noise interference was observed.
The sensitivity range of the cormorant is compared with the hearing characteristics of the other birds in Fig. 1.

B. Hearing Underwater
In total, over 800 different species of birds around the globe feed underwater, resulting in significant differences in their lifestyle, physiology, and behavior, which are highly dependent on their adaptation to the aquatic environment.
Many reptiles have shown to have an adaptive response to underwater hearing. This suggests that birds that feed on the water should also have certain adaptation mechanisms. Since water is a well-suited medium for sound propagation, birds effectively use underwater signals for navigation, hunting, and also to avoid predators. The use of these types of signals could be particularly useful for birds that, for a while, are tracking the movement of the fish and chasing after them.
Underwater hearing of one of the best underwater carnivores, cormorant, has been investigated in [9]. The results summarized in Fig. 2 show that this bird exhibits an unexpectedly high sensitivity to underwater sounds. The experimental data indicate that cormorant underwater hearing at lower frequencies is comparable to dolphin and seal hearing at only 5 dB above the hearing threshold of these animals. The hearing features lead to significantly higher hunting efficiency for these birds. Previously, this type of diving bird was thought to rely on superb vision, which would allow them to dive deeper in good visibility but would limit hunting in low light. The cormorants were later shown to be very effective carnivores in very muddy water and to be able to feed in complete darkness (wintering of these birds during the polar night was observed). Therefore, it was concluded that underwater acoustic signals received by birds play a key role during bird feeding. It has also been researched that many fish are capable of generating sound in the range of up to 1 kHz and 80 dB, which also allows cormorants to locate fish.

IV. ACOUSTIC DETERRENCE OF BIRDS
A. Waveform Properties From information on the hearing characteristics of birds, it remains clear that ultrasound and infrasound are not suitable for repelling birds, although, without any scientific or experimental basis, they are used in many devices on the market [4]. To generate signals that the birds can detect and also to exhibit a particular type of response, appropriate signal intensity in the frequency range of 1 kHz-4 kHz with peaks corresponding to the sensitivity peaks of the particular target species should be provided.
The signals can be divided into two fundamentally different groups:  Non-biological signals, whether continuous or modulated;  Signals of biological significance.
The first group of signals may consist of a constant single frequency signal or a broadband noise that does not change frequency or intensity. This type of signal at certain frequencies can be annoying and frightening. However, it has been shown that both birds and humans quickly become accustomed to this type of signal. Better results can be achieved by using different types of modulated signals that vary in frequency, amplitude, or both. On the other hand, the use of steep signal edges, which ensures that the signal sounds "unexpectedly", is required.
The second group of signals is characterized by a certain biological significance for birds. These can be signals generated by birds of the same species that report certain dangerous situations or the approach of predators. However, several studies have shown that birds become accustomed to these signals over time too because they are not based on any real physical exposure or threat. Another type of signal is the sound of predators. Cormorant eggs and young cormorants are prey to other predatory birds -eagles, gulls, and crows. It must be taken into account that from the point of view of birds, humans are also carnivores that endanger their lives. Consequently, the sounds of the predatory birds and the sounds that characterize human activity, such as rifle shots, can be used as deterrents.

B. Review of Digital Audio Synthesis Methods
Sound synthesis is a hot topic in the music industry and there is a big variety of analog and digital approaches for acoustic waveform generation. Among them, three digital methods are used most widely and have a large number of derivatives.
1. Pulse code modulation (PCM) synthesis. This is the most widely used digital method of sound recording and generation [10]. In the case of PCM recording, the amplitude of the signal waveform is periodically sampled and converted by analog to digital converter (ADC) into digital samples. In the case of playback, the reverse process happens -the digital samples are converted into analog pulses which utilizing a low-pass filter are converted into a continuous waveform. This mean of synthesis does allow to record and playback the sounds with very high accuracy. However, the adjustment of the frequency spectrum and playback speed of the waveform requires a substantial amount of computing. As it was mentioned before, the use of static sounds in the deterrent device is inefficient in the long term as birds quickly get accustomed to them.

Wavetable synthesis.
This method has roots in the analog sound synthesis where complex waveforms are created by combining several basic analog waveforms, such as sine wave, saw wave, or square wave. Unlike analog one, the digital synthesizer [11] employs a table with digitally stored single periods (in case of time-domain sampling) or amplitudes of harmonics (in case of frequency domain sampling) of basic waveforms for the creation of arbitrary musical tones and notes having complex waveforms. This method is good for the synthesis of sounds of musical instruments. However, the generation of bird songs, having quasi-periodic waveforms with the rapidly varying spectrum and amplitude, is difficult.

Frequency modulation synthesis.
This is the most versatile method of acoustic and other waveform syntheses. It employs frequency modulation (FM) of a sine wave for the creation of waveforms of musical instruments having rich and complex spectra [12]. Digital FM synthesis was employed in many early computer sound generator integrated circuits (ICs) and it is still widely used in musical synthesizers. Considering that the mentioned method allows to efficiently control temporal evolution of acoustic spectra, it suits well for the generation of natural sounds, such as bird calls.
Among other methods of FM synthesis, a direct digital synthesis (DDS) [13] allows the implementation of highly accurate periodic waveform oscillators with digital control of phase and frequency within one sample period. Moreover, DDS oscillators ensure phase continuity whenever frequency is changed. Since the DDS algorithm relies on integer arithmetic, it can be implemented in almost any microcontroller. A comprehensive review of the DDS algorithm is given in [14], [15]. Considering those abovementioned features and a big variety of DDS chips available on the market, the FM synthesis using DDS was selected as a sound generation technology in the acoustic deterrent device.
In the publication in [12], it has been shown that FM synthesis allows generating waveforms with almost any number of harmonics. Moreover, the author proposes a simplified algorithm for the control of amplitudes of those harmonics. Given that the envelope of the FM waveform can be modulated too, FM synthesis can be used for the generation of a rich variety of natural and synthetic sounds.

C. Example of Birds Call Generation Using FM Synthesis
The example algorithm for the FM synthesizer parameter calculation is depicted in Fig. 3. It illustrates how to synthesize a fragment of sea eagle call shown in Fig. 4 using FM synthesis technology described in [12]. The obtained spectrum of the synthesized multi-tone waveform is shown in Fig. 5, depicting that major harmonics are located at 100 Hz, 1700 Hz, and 3500 Hz.

A. Synthesis of Single-Tone Time-Varying Sounds
The frequency spectrum of many natural sounds, including bird calls, consists of a single major spectrum component varying in frequency and amplitude over time. In this case, the task is greatly simplified as FM synthesis reduces to the generation of a single carrier signal with varying frequency.  Figure 6 shows the spectrogram and envelope of bird (hawk) call which has such structure. The synthesis of this sound does require a single-carrier oscillator with controllable frequency and amplitude. Such oscillator can be developed using DDS synthesizer ICs, such as AD9850 in conjunction with a simple microcontroller.

B. Synthesis of Multi-Tone Time-Varying Sounds
Multi-carrier variation of DDS is possible too. For example, the authors in [16] use slow modulation of several sinusoidal generators for human voice synthesis. In this case, more complex waveforms with many harmonics can be synthesized. However, the implementation complexity of such a synthesizer is higher than in the case of a single carrier frequency case.

V. IMPLEMENTATION
The implementation of acoustic deterrent device involved three major steps:  Selection of sound synthesis algorithm;  Development of converter for conversion of audio files into synthesizer sequences;  Implementation of bird call synthesizer.

A. Selection of Sound Synthesis Algorithm
Analysis of bird call records has shown that many bird calls consist of a single dominating frequency varying over time. Considering this fact, as well as ease of the implementation and availability of components and software, a single-carrier DDS signal has been selected for implementation in the prototype of the bird acoustic deterrent device. In this method, at each instant of time, there is just one single-carrier component. The major drawback of this algorithm is the poor synthesis of polyphonic sounds and noise-like signals.
The playback sequence is a table with carrier frequencies, amplitudes, and fragment durations. For storing the sounds, a special DDS file format has been developed. This format is used for storing DDS sequences, as well as for sending the sequences over the network. Table II depicts the format of the file for storing synthesizer sequences. The record ID is necessary if the DDS file contains several sequences, and it identifies the particular sequence within the file.

B. The Converter of Bird Call Records into Synthesizer Sequences
In the case of artificial deterring sounds, the sequences can be created using some script or even a plain text editor. However, if it is planned to synthesize natural sounds, a converter of sound records into synthesizer sequences is necessary. One of the major challenges in the latter case is that records with as low as possible background noise must be selected. A special preprocessing of PCM and postprocessing of synthesizer sequences is necessary to obtain synthesized sounds of acceptable quality. In the prototype implementation, the conversion is carried out by software implemented in MATLAB. Figure 7 depicts the conversion algorithm: At the preprocessing stage, the normalization of PCM samples is performed. The frequency content extraction is done by spectrogram() function in MATLAB. The parameters of the spectrogram, i.e., FFT window length (number of frequency bins) and overlap have been found experimentally. The parameters at which the best results were achieved are displayed in Table III. At the end of conversion, the program visualizes the frequency selection process by showing a spectrogram of the original file with an overlay of synthesized waveform frequencies. From Fig. 8, which shows an example output of the conversion program, it can be concluded that there is a good match between the frequency content in the original audio file and the synthesized sound (red squares) in the particular example.
The smoothing of the frequency array is performed by records.
Smoothing allows reducing noise, especially if sound contains simultaneously more than one major frequency. Figure 9 shows an example frequency extraction process from complex sound and the impact of the frequency smoothing.

C. Implementation of Synthesizer
The sound synthesizer is a part of a Hybrid Intelligent Acoustic-Optical System [17] which had been deployed to several fishponds in Latvia. A hardware player is implemented using a microcontroller unit (MCU) based on ATmega328 in conjunction with AD9850 synthesizer IC. This solution allowed to achieve compact size along with high modularity of sound generator unit. The core of the MCU software is the DDS file playback loop, which reads the DDS sequence and sends commands to the AD9850 synthesizer. To prevent bird habituation, each playback cycle has random pause, frequency offset, and amplitude.

VI. TESTING
In the framework of the project in [17], the deterrent system underwent intense testing in Latvian fishponds. Two types of systems were deployed: acoustic-only floating deterrent systems (Fig. 10) and combined optical-acoustic terrestrial systems (Fig. 11). Fig. 10. Photo of hybrid acoustic-optical bird deterrent system [17]. Fig. 11. Photo of float with acoustic bird deterrent system [17]. The floating deterrent system was equipped with both air and underwater speakers. The field tests have shown that the developed acoustic system has a deterrent effect. However, in case of acoustic-only system, the birds habituate to the sounds after a few weeks. In contrast, systems which were equipped also with an optical system demonstrated a high deterrent effect even if the laser in some tests was not switched on. According to [4], this effect is because the birds associate the acoustic signal with the unpleasant impact of bright light of the laser beam.

VII. CONCLUSIONS
The purpose of this paper is to give a reader an overview of steps necessary for the development of the intelligent and cost-efficient acoustic bird deterrent system. The methods for sound generation are based on bird hearing analysis and on the study of the impact of acoustic devices on bird behavior. The acoustic signal generator design is based on the analysis of major sound synthesis approaches used for music and speech processing. Finally, the implementation and testing of such a generator is addressed shortly.
The major advantage of the presented solution is the employment of simple DDS-based FM synthesis technology for sound generation. It allows the generation of a wide variety of natural and synthetic sounds and provides means for the elimination of sound repetition which prevents the habituation of the birds since the slight variation of frequencies and amplitudes is applied at each playback cycle. Compared to the systems reported in [3]- [6], it provides ability to synthesize biologically relevant sounds with much wider range of variation without manual intervention.
The inability of the proposed system to generate complex sounds with multiple harmonics can be considered as one of the shortcomings which have to be improved in the future. Moreover, the created methodology of sound synthesis could be further extended for the dynamical synthesis of bird calls based upon certain patterns of bird interaction. The use of machine-learning approaches would allow us to achieve even more intelligent acoustic deterrence.

CONFLICTS OF INTEREST
The authors declare that they have no conflicts of interest.