336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.


졸작 및 과제의뢰 필요하신 분들은

instructables.tistory.com/64 로 방문해주세요

질문댓글 환영합니다.

(Fast Fourier Transform 여기에 다 올리면 의뢰가 안들어와서 일부만 올렸습니다.)



Naver

naver[matlab FFT]


naver[퓨리에 변환 MATLAB]


naver[matlab 신호 히스토그램]


naver[matlab fft]


naver[matlab 의뢰]


naver[matlab 음성신호 mp3...]


naver[arduino MATLAB 연결] 


naver[adc fft 코드]






https://kr.mathworks.com/videos/arduino-and-matlab-reading-inputs-and-writing-outputs-106502.html


https://www.norwegiancreations.com/2017/08/what-is-fft-and-how-can-you-implement-it-on-an-arduino/

Arduino만 사용했을 경우


http://instructables.tistory.com/229 (비공개)

AVR계열 칩을 사용했을때

Fast Fourier Transform (aka. FFT) is an algorithm that computes Discrete Fourier Transform (DFT).

FFT는 알고리즘이다. that 계산하는 DFT를.

We’re not going to go much into the relatively complex mathematics around Fourier transform, 

but one important principle here is that any signal (even non-periodic ones) can be quite accurately reconstructed 

by adding sinusoidal signals together with different frequencies and amplitudes.

우리는 깊이들어갈것이다. into the 관련있는 복잡한 수학식들을 around 퓨리에 형변환에 관한,

but 한 중요한 원리 here ...는 that 어느 신호가 can be 꽤나 정확히 재구성된

by 추가함으로써 정현파 신호들을 together with 차동 주파수 and 진폭과 함께.


The more sinusoidal signals we add together, 

the more our reconstructed signal will look like the original one.

더많은 정현파 신호들 우리가 추가하는 함께,

더많은 우리의 재구성된 신호는 will 보일것이다. like the 원래것처럼.

Theoretically speaking, with an infinite amount of sinusoidal signals 

we get an identical signal as the original.

이론족으로 말하면, with an 무한 수량 of 정현파 신호들과함께

우린 얻는다. an 동일한 신호를 as the 원래것같은.

Disclaimer: from now on we’ll only use the term FFT (for simplicity’s sake) 

even though DFT or just Fourier Transform might be the right term in some cases.

Disclaimer: 지금부터 우린 will only 사용할것이다. the 용어 FFT를

비록 though DFT 혹은 just 퓨리에 변환이 might be the 올바른 용어가 될지라도 in 몇몇 cases에서.

Above is a nice GIF which shows how six sinusoidal signals added together 

can resemble a square-wave signal.

상단의 것은 a 좋은 GIF이다. which 보여주는 어떻게 여섯개 정현파 신호들이... 추가된 함께

...can be 닮을 수있는지 a 사각파 신호들과.




FFT

The FFT-algorithm uses this principle and essentially enables you to see which frequencies are present in any analog signal 

and also see which of those frequencies that are the most dominating

This is very helpful in a huge amount of applications. 

Graphs like the blue one with only spikes (f^) in the GIF above 

is what you typically get after running an FFT:

이 FFT-알고리즘은 사용한다. 이 원리를 and 특히 가능케한다. 널 to 보게끔하기위해 which 주파수들이 are 나타나는지 in 어느 아날로그 신호에서

and 봐라 which of those 주파수들을 that are the 가장 지배적인.

이건 매우 도움이된다. in a 거대한 량 of 응용들에서.

그래프들 like the 파란것 with only  f^와 함께 in the GIF안의

은 what 네가 전형적으로 얻는것이다. after 돌리고나서 an FFT를:

●The x-axis is frequency – the higher up on this axis, the higher the frequency.

●The y-axis is amplitude – the higher up on this axis, the larger the amplitude.

X축은 Frequency Domain, Y축은 그 Freq로 어느정도 Amplitude가 적용됬는지 Check

What you typically get in this graph 

is one or more spikes

A tall spike means that that particular frequency is dominant in the signal.

뭘 네가 전형적으로 얻는가 in 이 그래프에서

...는 one or more spikes이다.

A 큰 spike는 의미한다. that 그 특정 Freq가 있는지 지배적으로 in the 시그널에서.

If you apply FFT to a noise-free sinusoidal signal 

you will get only a single peak

This is logical since you only need one sinusoidal signal to recreate a sinusoidal signal.

만약 네가 적용하면 FFT를 to a 노이즈없는 사인파 신호에

넌 will 얻을것이다. only a 단독 peak를.

이건 논리적이다. since 네가 only 필요하기때문에 하나의 정현파 신호를 to 재생성하기위해 a 정현파 신호를

However, if you apply FFT to a square-wave signal (as shown in the GIF) 

you will get an exponential decreasing-looking graph

where many frequencies with an even interval between them 

are present. 

The lowest frequency have the largest amplitude 

(this is the primary frequency of the square-wave signal) 

and the highest frequencies have the lowest amplitudes.

하지만, if 네가 적용하면 FFT를 to a 사각파 신호에 (as 보이듯이 in the GIF에서)

넌 will 얻을것이다. an Exponential 감쇠로 보이는 곡선을,

where 많은 주파수들 with an 심지어 인터벌과함께 between them

이 나타난다.

가장 낮은 주파수는 갖고있다. 가장큰 증폭을

(이것 주된 주파수이다. of eh 사각파 신호의)

and 가장 높은 주파수는 갖고있다. 가장 낮은 낮은 증폭을 


Sampling Frequency

The Nyquist-Shannon Sampling Theorem tells us that to be able to sample a signal, 

the sampling frequency needs to be at least twice the frequency of the signal we’re trying to sample

In other words, the FFT will only be able to detect frequencies up to half the sampling frequency.

나이키스트-샤넌 셈플링 정리(▶LINK)는 이야기한다 우리에게 that to be 가능케된다고 to 표본화하는게 시그널을,

the 셈플링 주파수는 필요로한다. to be  최소한 두배의 주파수로 of the signal의

우리가 trying to 표본화하려하는.

다른말로, the FFT는 will only be 가능케될것이다. to 감지하는게 주파수들을 up to 절반의 셈플링 주파수를.

(Fs = 2Fm)

On a common Arduino, the sampling frequency is quite limited, though. An ADC operation (using analogRead()) takes about 100 μs, and other operations are relatively slow due to the 8 or 16 MHz clock frequency.

Number of Samples

The FFT-algorithm works with a finite number of samples

This number needs to be 2n where n is an integer (resulting in 32, 64, 128, etc). 

If this number is larger, the algorithm will be slower. 

However, with many samples you will get a larger resolution for the results.

이 FFT-알고리즘은 동작한다. with a 유한 수량 of 셈플들로.

이 숫자는 needs to be 2^n이 되야한다. where n은 정수인 (결과를낳는 in 32,64,128..)

만약 숫자가 더 크면, 알고리즘은 느리게될것이다.

However, 많은 셈플들과함께 넌 will 얻을것이다. a 더큰 해상도를 for the 결과를위해.

Bins

The term bins is related to the result of the FFT, 

where every element in the result array is a bin. 

One can say this is the “resolution” of the FFT. 

Every bin represent a frequency interval, just like a histogram. 

The number of bins you get is half the amount of samples spanning the frequency range from zero to half the sampling rate.

용어 bins는 연관되있다. to the 결과에 of the FFT의,

where 매 요소들... in the 결과 array안의 ...이 a bin이다.

One can 말하고있다. 이게 the 해상도라고 of the FFT의.

매 bin은 대표한다. a 주파수 인터벌을, just like a 히스토그램같은(=직사각형 도표).

The number of bins... 네가 얻는 ...은 절반이다. the amount of samples의 걸치고있는 the 주파수 범위에 from 0~half the sampling rate까지.


Our Example and Code

The setup we’re going to use here is an Arduino Uno and a signal generator

The only wires are the two from the signal generator 

where one goes to A0 on the Arduino and the other goes to GND

Our signal has an amplitude and offset such that it almost spans the complete 0-5 V range, suiting our ADC’s properties well.

Unlike the example code which comes with the library, 

we apply FFT to a proper analog signal. 

The example code generates a simulated sinusoidal signal and applies FFT to that.

The setup... 우리가 gonna 사용할 여기서 ...는 an Arduino Uno & Signal generator이다.

The only wires are the 두개뿐이다. from the signal generator

where one goes to A0로 가는거 하나 and the other goes to GND로 가는거 하나.

우리 신호는 갖고있다. an 증폭을 and offset such that it almost 걸치고있는 the 완벽한 0~5V 범위를, 딱들어맞는 our ADC's 특성들을 잘.

Unlike the 예제코드와달리 which 다가오는 with the library와 함께,

우린 적용한다. FFT를 to a 적합한 analog sinal에.

The 예제 코드는 만들어낸다. a 시뮬레이트된 정현파 신호를 and 적용한다. FFT를 to that에.




https://github.com/varind/FFT-Relay-Control

FFT-Relay-Control-master.zip






▲설치 경로를 지정해주고 Next 버튼을 누른다.

저장 경로에 Space가 포함되선 안된다.


▼설치완료(Continue를 누르자)

▼Setup support package (어차피 옵션이 하나밖에 없다.)






'Matlab > Matlab Projects' 카테고리의 다른 글

MTLAB + Arduino (Plug-In 설치)  (0) 2018.11.27
Matlab Projects  (0) 2016.05.27
Posted by ElectricShock
:
BLOG main image
잡동사니들(지극히 개인취향인...) (다른글에도 댓글 부탁해요♥) You May Leave English Messages on GuestBook. by ElectricShock

공지사항

카테고리

분류 전체보기 (782)
Programming(=프로그래밍) (3)
MiDi (2)
Animation (4)
Blender (3D Graphic Program.. (10)
Blendtuts.com (Series) (1)
Blender 기초 팁들 (2)
Processing (디지털미디어과) (2)
Music (1)
Books in the world (0)
Communication(CAN, UART, et.. (12)
MCU Examples (PIC 기반) (7)
Transistor (1)
Mikro C Pro (11)
Mikro Pascal (1)
Proton IDE (0)
Robot (0)
Swift 3D (1)
Dummies Series (1)
All about Hacking (0)
제2 외국어 (1)
PIC 해외서적들 (3)
AVR (25)
PIC (MikroC) (MPLAB) (4)
Assembly (2)
ARM (3)
Arduino (26)
PSpice (1)
Proteus ISIS (14)
CodeVision (2)
FPGA (15)
MPLAB (24)
PCB (the Procedure) (15)
3D Printer (5)
PICKIT3 (6)
Matlab (11)
RaspBerry PI (15)
BeagleBone (1)
Android Studio (17)
졸업작품 (172)
Korea History (0)
Issue(사회) (73)
Multimeter 리뷰 (1)
Oscilloscope (1)
A (34)
B (19)
J (6)
C (32)
P (12)
T (37)
H (12)
I (12)
M (44)
R (5)
E (5)
F (2)
D (9)
O (2)
L (7)
S (9)
W (2)
V (6)
G (14)
Visual C++ or Visual Studio (2)
Android App Development (0)

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백