{"id":16630253,"url":"https://github.com/klafyvel/avr-fft","last_synced_at":"2025-03-16T22:30:53.854Z","repository":{"id":43213668,"uuid":"469141115","full_name":"Klafyvel/AVR-FFT","owner":"Klafyvel","description":"3 implementations of the FFT for Arduino AVR platforms!","archived":false,"fork":false,"pushed_at":"2022-11-16T12:45:15.000Z","size":4355,"stargazers_count":142,"open_issues_count":2,"forks_count":7,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-02-27T14:48:09.822Z","etag":null,"topics":["arduino","arduino-uno","avr","avr-assembly","avr-microcontroller","cpp","diy","diy-electronics","fft","fft-algorithm"],"latest_commit_sha":null,"homepage":"https://klafyvel.me/blog/articles/fft-arduino/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Klafyvel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-03-12T16:42:37.000Z","updated_at":"2025-02-02T16:52:38.000Z","dependencies_parsed_at":"2023-01-22T00:16:49.309Z","dependency_job_id":null,"html_url":"https://github.com/Klafyvel/AVR-FFT","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Klafyvel%2FAVR-FFT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Klafyvel%2FAVR-FFT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Klafyvel%2FAVR-FFT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Klafyvel%2FAVR-FFT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Klafyvel","download_url":"https://codeload.github.com/Klafyvel/AVR-FFT/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243830952,"owners_count":20354854,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arduino","arduino-uno","avr","avr-assembly","avr-microcontroller","cpp","diy","diy-electronics","fft","fft-algorithm"],"created_at":"2024-10-12T04:45:48.098Z","updated_at":"2025-03-16T22:30:53.427Z","avatar_url":"https://github.com/Klafyvel.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Implementation of the FFT on Arduino\n\nThis is the companion repository for my blog post [here](http://klafyvel.me/blog/articles/fft-arduino). You'll find plenty of details there.\n\nThis directory contains several trials of implementing efficiently the Fast\nFourier Transform (FFT) on Arduino. As a comparison, I took [this implementation](https://www.instructables.com/ApproxFFT-Fastest-FFT-Function-for-Arduino/).\n\nIf you want to understand the basis of how to implement the FFT, I wrote a small\ntutorial\n[here](https://zestedesavoir.com/tutoriels/3939/jouons-a-implementer-une-transformee-de-fourier-rapide/)\n(English version is [here](https://klafyvel.me/blog/articles/fft-julia/)).\nCurrently, here are the benchmarks on the following test signal, with a varying\nnumber of points.\n\n![Test signal](./test_signal.png)\n\n![Benchmarks](./execution_time_comparison.svg)\n\n![Benchmarks](./error_comparison.svg)\n\nBelow is a list of the different implementation.\n\n## `ExactFFT`\n\nThis is a direct translation to C++ of the implementation in my tutorial.\n\n![Result of FFT for different input sizes](result_plots/results_ExactFFT.svg)\n\n## `ApproxFFT`\n\nThis is an implementation of the FFT by user\n[abhilash_patel](https://www.instructables.com/member/abhilash_patel/) on\n[Instructables](https://www.instructables.com/ApproxFFT-Fastest-FFT-Function-for-Arduino/).\n\nIt is there for comparison purpose only, as it is not very space-efficient.\n\n![Result of FFT for different input sizes](result_plots/results_ApproxFFT.svg)\n\n## `FloatFFT`\n\nA floating-point implementation of the FFT, using some rewriting of\nmultiplications in `ExactFFT`, and some bit magic to accelerate float operations.\n\nFeaturing, but not limited to :\n\n* A table of sines to remove any call to `sin()`;\n* [A bit-magic implementation of the square root](https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Approximations_that_depend_on_the_floating_point_representation);\n* A homemade implementation of the square operation for floats that I detailed\n  [here](https://zestedesavoir.com/billets/4153/approximer-rapidement-le-carre-dun-nombre-flottant/)\n  (in French);\n* Some rewritings of complex multiplications of ExactFFT using [this method](https://en.wikipedia.org/wiki/Multiplication_algorithm#Complex_number_multiplication);\n \n![Result of FFT for different input sizes](result_plots/results_FloatFFT.svg)\n\n## `Fixed16FFT`\n\nA 16-bits fixed-point implementation of the FFT on AVR.\n\n![Result of FFT for different input sizes](result_plots/results_Fixed16FFT.svg)\n\n## `Fixed8FFT`\n\nAn 8-bits fixed-point implementation of the FFT on AVR.\n\n![Result of FFT for different input sizes](result_plots/results_Fixed8FFT.svg)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklafyvel%2Favr-fft","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fklafyvel%2Favr-fft","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklafyvel%2Favr-fft/lists"}