I = round(N/2+(str_f*N/2)/(Fs/2)) % start index of freq range % value, and was preceded (to the left) by a value lower by delta % delta = A point is considered a maximum peak if it has the maximal I created another function that plots the spectrum and detected peaks on the same graph using the peak detection function above.įunction fpeaks = spektri_p(data, Fs, str_f, stp_f, delta) V = v(:) % Just in case this wasn't a proper vectorĮrror('Input argument DELTA must be a scalar') % This function is released to the public domain Any use is allowed. % Eli Billauer, 3.4.05 (Explicitly not copyrighted). % value, and was preceded (to the left) by a value lower by % A point is considered a maximum peak if it has the maximal % in MAXTAB and MINTAB are replaced with the corresponding % With = PEAKDET(V, DELTA, X) the indices % contains indices in V, and column 2 the found values. % MAXTAB and MINTAB consists of two columns. % maxima and minima ("peaks") in the vector V. However, finding those frequency peaks automatically is more challenging due to noise and some splatter components.Īfter testing various peak detection algorithms I found the following that seems to work quite well:įunction =peakdet(v, delta, x) Visually it is relatively easy to find the 7 to 8 strongest peaks from the picture above. Morse code test case - spectrum 100 - 2500 Hz. Signal x1 would peak at S9 and signal x9 would be S1 at almost noise level.įigure 1. The range is about 54 dB corresponding to scale of roughly 9 S units if this signal would be coming from a real ham radio. Noise level is at around 90 dB and the 1200Hz peak signal is at about 144 dB. The 9 simulated "stations" are 100 Hz apart from each other. The input is the above 10 second combined audio clip. The resulting spectrum is shown in Figure 1. I created a small function "spektri" to calculate FFT (fast fourier transform) and plot the audio spectrum in a given frequency range. % look at the spectrum of combined signals - display 100Hz.2500HzĢ) ALGORITHM TO FIND MORSE SIGNALS BY FREQUENCY % 9 signals arranged S9 to S1 in frequency order 1200Hz. % 2x signal strength corresponds to 6 dB (one S-unit) % weighted sum - merge all the audio streams together % TEXT audio file noiselevel Hz speed WPM % create 9 different parallel morse sessions - 10 seconds each at 20-35 WPM speed Ts = 10*Fs % Total sample time is 10 seconds % create a test audio file with multiple morse stations in a pile-upįs = 48000 % Fs is sampling frequency - 48 Khz Resulting 10 second long audio signal is then saved on 'cwcombo.wav' file. These signals are then scaled and added up to create roughly S1.S9 signals between 400Hz and 1200Hz. The code below simulates 9 stations with different call signs in various phases sending "CQ TEST DE XXXXX" with different speeds on different audio frequencies. I used Rob's morse.m version to create a test audio file simulating a snapshot from a contest. In order to do some experiments and learn more how this problem could be solved I decided to break the problem into 4 different tasks, namely the following:ġ) Create a test case with 9 simultaneous morse code signals in different frequencies with noise.Ģ) Create an algorithm to find all morse signals by frequency.ģ) Utilize Rob's matched filter code to improve signal to noise on selected frequency.Ĥ) Apply morse code decoding algorithm to filtered signals. I have been using Octave v3.4.2 on Ubuntu V11.1 running on my Thinkpad T43 laptop. I wanted to experiment and expand Rob's software written for Octave, open source software similar to Matlab. Rob Frohne, KL7NA has provided both excellent papers on the topic ( 1, 2) as well as working code examples to create, detect and decode morse code from noisy audio signals. CW Skimmer is an example of such software and it has gained popularity and some good reviews. However, CW Skimmer is not open source software and it has some limitations. While experienced CW operators can easily copy morse code from multiple stations in a pile-up even on a noisy RF band, writing software to enable computers to accomplish similar task is quite difficult.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |