You are on page 1of 5

Lab # 12:

“ expLoring waveform anaLysis


and synthesis using fourier series
components”
name: umar fayyaz
reg # 21pweLe5815
section: a
subject: ca-2 (Lab)
department: eLectricaL
semester: 4th

submitted to:
sir farooq

1
LAB : EXPLORING WAVEFORM ANALYSIS AND SYNTHESIS USING FOURIER SERIES
COMPONENTS

THEORY:
Waveform analysis and synthesis refer to techniques used in the field of audio and signal
processing to analyze and generate waveforms. A waveform represents the shape and
characteristics of a signal over time.

Waveform Analysis:
Waveform analysis involves studying and extracting information from a given waveform. This
process typically includes tasks such as:

1. Amplitude Analysis: Determining the maximum and minimum amplitudes of the waveform,
which represent the signal's peak values.

2. Frequency Analysis: Identifying the frequencies present in the waveform using techniques such
as Fourier analysis or the Fast Fourier Transform (FFT). This helps to understand the harmonic
content and spectral characteristics of the signal.

3. Time-domain Analysis: Examining the waveform in the time domain to study properties such as
the signal's duration, rise and fall times, and other temporal features.

4. Spectral Analysis: Analyzing the power distribution across different frequency components of
the waveform to gain insights into its frequency content.

5. Transient Analysis: Identifying and analyzing transient events or short-duration phenomena


within the waveform, such as clicks, spikes, or percussive sounds.

Waveform Synthesis:
Waveform synthesis involves the generation or creation of waveforms based on specific
requirements or desired characteristics. This process typically includes techniques such as:

2
1. Additive Synthesis: Combining multiple sine waves or harmonic components to create complex
waveforms. This technique is commonly used in synthesizers and music production.

2. Subtractive Synthesis: Starting with a rich waveform and removing or filtering out specific
frequency components to shape the desired sound. This technique is commonly used in analog
and virtual analog synthesizers.

3. Frequency Modulation (FM) Synthesis: Modulating the frequency of a carrier waveform using
a modulator waveform to create a wide range of timbres and tones. FM synthesis gained
popularity with the Yamaha DX7 synthesizer.

4. Sample-based Synthesis: Using pre-recorded audio samples as building blocks to create new
waveforms and sounds. This technique is commonly used in samplers and digital music
production.

5. Physical Modeling Synthesis: Simulating the behavior of real-world instruments or objects to


generate realistic and expressive sounds. This technique models the physical properties and
interactions of the sound-producing elements.

Waveform analysis and synthesis are crucial in various applications, including audio processing,
music production, speech recognition, telecommunications, and many other fields where
understanding and manipulating waveforms are essential.

PROCEDURE:
In this lab report we studied some of the MATLAB script commands for Fourier series
which are as under:
1. To find value of x:
syms x y
eqn=𝑥 2 + 2 ∗ 𝑦 == 0
solve(eqn,x)
Output:
eqn =x^2 + 2*y == 0
ans =2^(1/2)*(-y)^(1/2)
-2^(1/2)*(-y)^(1/2)
2. Use factorization:
syms x
expr=x^2-5*x+6

3
factor(expr)
Output:
expr =x^2 - 5*x + 6
ans =[ x - 2, x - 3]
3. Use differentiation:
syms x
y=x^3+2*x+5
diff(y,x)
Output:
y =x^3 + 2*x + 5
ans =3*x^2 + 2
4. Solve differential equations
syms x y(x)
eqn=diff(y,x)+3==0
dsolve(eqn)
Output:
eqn(x) =diff(y(x), x) + 3 == 0
ans =C1 - 3*x

5. Use integration:
syms x
y=sin(x)
int(y,x)
Output:
y =sin(x)
ans =-cos(x)
6. Finding value of bn from theory example:
syms wt
n=1:10;
bn=(2/pi)*int(sin(n*wt),wt,0,pi);
bn=double(bn)
Output:
bn =
1.2732 0 0.4244 0 0.2546 0 0.1819 0 0.1415 0

Analysis:
The equations for the Fourier series harmonics depend on the specific periodic
waveform being analyzed. Here are the general equations for the Fourier series harmonics:

For a periodic function with period T:


f(ωt) = a_0 + ∑_(n=1)^∞▒〖[a_n cos(nωt)〗 + ∑_(n=1)^∞▒〖[b_n sin(nωt)〗]

4
The coefficients 𝑎𝑛 and 𝑏𝑛 can be calculated using the following equations:

a_n = (1/π) ∫_0^2π▒〖[f(ωt)cos(nωt)] 〗 dt


b_n = (1/π) ∫_0^2π▒〖[f(ωt)sin(nω0t)]〗 dt

Integration is performed over one period of the waveform.


These equations allow us to decompose a periodic waveform into its harmonic components and
analyze their amplitudes and phases.

Conclusion:
This lab provided valuable insights into waveform analysis and synthesis using Fourier series
components. We learned how to decompose a complex waveform into its harmonic constituents
and analyze their frequency content.

You might also like