Fourier series of real signals

버전 1.3.0.0 (3.63 KB) 작성자: yoash levron
This function computes the fourier series of a signal
다운로드 수: 1.6K
업데이트 날짜: 2013/5/24

라이선스 보기

Fourier series of real signals.
Written by Dr. Yoash Levron, January 2013.

This function computes the fourier series of a signal x(t). The amplitudes of the fourier series have the same dimension
of the original signal, so this function is useful for immediate computation of the actual frequency components, without
further processing.

for example, x(t) = 2 + 3*cos(2*pi*50*t) will result in :
dc value = 2
frequencies = [50 100 150 ...]
amplitudes = [3 0 0 ...]
phases = [0 0 0 ...]

x(t) is one cycle of an infinite cyclic signal. The function computes the fourier transform of that infinite signal.
The period of the signal (T) is determined by the length
of the input time vector, t.
x(t) must be real (no imaginary values).

The signal x(t) is represented as:
x(t) = Adc + A1*cos(w*t + ph1) + A2*cos(2*w*t + ph2) + ...

the function computes the amplitudes, Adc,A1,A2...
and the phases ph1,ph2,...

T = period of the signal = t(end) - t(1)
w = basic frequency = 2*pi/T

The function automatically interpolates the original signal to avoid aliasing. Likewise, the function automatically determines the number of fourier components, and truncates trailing zeros.

inputs:
t - [sec] time vector. Sample time may vary within the signal.
x - signal vector. same length as t.

outputs:
freq - [Hz] frequencies of the fourier series, not including zero.
amp - amplitudes vector. amp=[A1 A2 A3 ...], not including the DC component.
phase - [rad/sec] . phases, not including the DC component.
dc - the DC value (average of the signal).

인용 양식

yoash levron (2024). Fourier series of real signals (https://www.mathworks.com/matlabcentral/fileexchange/40017-fourier-series-of-real-signals), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2008a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Discrete Fourier and Cosine Transforms에 대해 자세히 알아보기
커뮤니티
 Power Electronics Control 커뮤니티에 더 많은 파일이 있습니다

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.3.0.0

Signal bandwidth criterion is made easier. high frequency amplitudes are compared to rel_tol instead of rel_tol^2

1.2.0.0

Added the function construct_harmonic_signal, which reconstructs the signal in time domain, given its harmonics.

1.0.0.0