![]() When I use the function to calculate the result at specific frequencies for a given dataset, I am not getting the correct results. However, if I use the same dataset and calculate the goertzel result using MATLAB goertzel() function, then I get the results perfectly. I am implemented the algorithm using C, with the help of some online tutorials that I found over the internet. I just want to get the view of you guys if the function is implementing the goertzel algorithm correctly. Magnitude = sqrtf(real*real + imag*imag) ġ) a sine wave with amplitude A and frequency WĢ) a cosine wave with the same amplitude and frequency A and W Real = (q1 - q2 * cosine) / scalingFactor calculate the real and imaginary results Note that I also changed the function and result names to reflect that your goertzel is calculating the magnitude, not the complete complex result, for clarity: float goertzel_mag(int numSamples,int TARGET_FREQUENCY,int SAMPLING_RATE, float* data)įloat omega,sine,cosine,coeff,q0,q1,q2,magnitude,real,imag If you are saying that the Matlab implementation is good because its results match the result for that frequency of a DFT or FFT of your data, then it's probably because the Matlab implementation is normalizing the results by a scaling factor as is done with the FFT.Ĭhange your code to take this into account and see if it improves your results. I think the code should be revised as follows: float goertzel_mag(int numSamples,int TARGET_FREQUENCY,int SAMPLING_RATE, float* data) Goertzel algorithm should yield the same results for two mentioned input wave-forms but the provided code results in different return values. Omega = (2.Morse code (CW) decoding is now available in the Teensy Convolution SDR. ![]() We have implemented the decoder version supplied by Loftur (thanks a lot for putting that into the public domain! ) based on an algorithm from a Master thesis from 1973. * the threshhold for detecting the Morse pulses (CW thresh) has to be manually adjusted according to the band noise, it has to be well above the band noise and well below the signal strength of the Morse signal This is a first version, so there is some caution necessary: It is the same version as available for the UHSDR software. ![]() ![]() * of course, the human brain is much much better than a machine in decoding morse code signals buried in noise: so, do not expect miracles from this simple decoder * there is an automatic adjustment called ATC, but I have not yet experimented much with that This will be made flexible and adjustable for the user in the next version * the tone detection uses a narrow bandpass filter (Goertzel) at 700Hz, so your signal MUST be tuned at 700Hz above or below the tune frequency (depending on whether you use USB or LSB demodulation). * the antenna is a 2 x 0.75m wire connected directly to the quadrature sampling detector board * one cheap joystick containing the functionality of five pushbuttons * quadrature sampling detector board containing: Processor load is now about 61% (in the video it is 44%, but I changed a bunch of things).įor testing, I built up a new machine on a perf board with a common ground plane using: Here, it demodulates FM stereo at 256ksps sample rate using the processor intense atan2 function with the double precision FPU of the Teensy 4.0. The software is now usable with the Teensy 4.0 OR the Teensy 3.6. Use the compile time switch in the first script lines before compiling. There is plenty of room for optimization, eg. the IIR filters in the FM receive path have to be substituted by phase linear FIR filters to enable better stereo diversity. I have downloaded the most current version (2019_10_08). The relevant Audio shield has not been connected yet. I plan to use my own SDR that I built, the SDR has a si5351 onboard. I have been playing around with the code of the version earlier to this around Oct 3. The plan then was to display the screen and then work out the controls and their operation. No SDR was connected at the time, but the idea was to get a more general feel of the operation and the layout of menu items.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |