Lab 12
Lab 12
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.
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.
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:
4
The coefficients 𝑎𝑛 and 𝑏𝑛 can be calculated using the following equations:
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.