Laboratory Experiment: Periodic Signals Using MATLAB


1. Introduction

Periodic signals play a fundamental role in electrical engineering, electronics, communication systems, and signal processing. Many natural and engineered systems rely on signals that repeat over a fixed interval of time. Examples include alternating current (AC) power signals, clock signals in digital electronics, carrier signals in wireless communication, and oscillatory signals used in instrumentation.

A signal is considered periodic if it repeats its waveform after a fixed time interval known as the period. The number of repetitions that occur in one second is known as the frequency of the signal.

In this laboratory experiment, students will use MATLAB to generate and analyze periodic signals. MATLAB provides powerful tools for mathematical modeling and graphical visualization, allowing students to study waveform properties without requiring physical laboratory equipment.

Students will generate common periodic signals such as sine waves, square waves, and sawtooth waves and analyze their properties using MATLAB plotting functions.


2. Objectives

After completing this laboratory experiment, students should be able to:

  • Define a periodic signal
  • Explain the relationship between period and frequency
  • Generate periodic signals using MATLAB
  • Plot and analyze signals using MATLAB graphing tools
  • Compare different periodic waveforms
  • Understand the effect of frequency on waveform repetition

3. Materials and Software

ItemDescription
Computer or LaptopUsed to run MATLAB
MATLAB SoftwareUsed for signal generation and analysis
MATLAB EditorUsed to write and execute MATLAB scripts

4. Primer (Background Theory)

4.1 Periodic Signal

A signal (x(t)) is said to be periodic if it satisfies the condition


x(t) = x(t + T)

where:

  • (x(t)) is the signal
  • (T) is the period

This means the waveform repeats after every interval of (T) seconds.


4.2 Period

The period is the time required for one complete cycle of the signal.

Example:

If a waveform repeats every (0.002) seconds, then


T=0.2 secondsT = 0.2 \text{ seconds}


4.3 Frequency

The frequency represents the number of cycles occurring in one second.

The relationship between frequency and period is


f=1Tf = \frac{1}{T}

where:

  • (f) = frequency (Hz)
  • (T) = period (seconds)

Example:

If
T = 0.001

then
f=10.001=1000 Hzf = \frac{1}{0.001} = 1000 \text{ Hz}


4.4 Mathematical Representation of a Sine Wave

A basic periodic signal used in engineering is the sine wave.

Its mathematical representation is


x(t)=Asin(2πft)x(t) = A \sin(2\pi f t)

where:

  • (A) = amplitude
  • (f) = frequency
  • (t) = time

4.5 Types of Periodic Signals

Sine Wave

A smooth continuous waveform used in AC power systems and communication signals.

Square Wave

A waveform that alternates sharply between two levels and is widely used in digital electronics.

Sawtooth Wave

A waveform that increases linearly and then drops sharply at the end of each cycle.


5. Experimental Procedure

Part 1: Generating a Sine Wave

  1. Open MATLAB.
  2. Create a new script file.
  3. Enter the following MATLAB code.
t = 0:0.001:1;
f = 5;

x = sin(2*pi*f*t);

plot(t,x)
xlabel('Time (seconds)')
ylabel('Amplitude')
title('Sine Wave Signal')
grid on

Observation

A sinusoidal waveform will appear on the MATLAB plot.


Part 2: Generating a Square Wave

Enter the following MATLAB code.

t = 0:0.001:1;
f = 5;

x = square(2*pi*f*t);

plot(t,x)
xlabel('Time (seconds)')
ylabel('Amplitude')
title('Square Wave Signal')
ylim([-5, 5])
grid on

Observation

The waveform switches abruptly between two levels, forming a square signal.


Part 3: Generating a Sawtooth Wave

Enter the following MATLAB code.

t = 0:0.001:1;
f = 5;

x = sawtooth(2*pi*f*t);

plot(t,x)
xlabel('Time (seconds)')
ylabel('Amplitude')
title('Sawtooth Wave Signal')
grid on

Observation

The waveform gradually increases and then drops sharply at the end of each cycle.


Part 4: Comparing Signals

You can display multiple signals using subplots.

t = 0:0.001:1;
f = 5;

subplot(3,1,1)
plot(t,sin(2*pi*f*t))
title('Sine Wave')
grid on

subplot(3,1,2)
plot(t,square(2*pi*f*t))
title('Square Wave')
ylim([-5 5])
grid on

subplot(3,1,3)
plot(t,sawtooth(2*pi*f*t))
title('Sawtooth Wave')
grid on

Observation

Three waveforms will appear simultaneously, allowing comparison of their shapes.


6. Data and Analysis

Students may record observations in the following table.

Signal TypeFrequency (Hz)Period (T=1f)(T = \frac{1}{f})AmplitudeObservation
Sine Wave5(0.2)1Smooth oscillation
Square Wave5(0.2)1Sharp transitions
Sawtooth Wave5(0.2)1Linear rise and drop

7. Results and Discussion

From the MATLAB simulation, you can observe that periodic signals repeat after a constant time interval. The sine wave exhibits smooth oscillation, while the square wave alternates between two fixed values. The sawtooth wave gradually increases and then abruptly decreases.

By increasing the frequency value in MATLAB, more cycles appear within the same time interval. This confirms that frequency and period are inversely related.

For example, if the frequency becomes (10) Hz:


T=110=0.1 sT = \frac{1}{10} = 0.1 \text{ s}

The waveform will repeat twice as fast compared to a 5 Hz signal.


8. Conclusion

In this laboratory experiment, students used MATLAB to generate and analyze periodic signals. Various waveforms including sine waves, square waves, and sawtooth waves were created and visualized using MATLAB plotting functions.

The experiment demonstrated the relationship between frequency and period and illustrated the characteristics of different periodic signals. Understanding periodic signals is essential for advanced studies in electronics, communications, control systems, and signal processing.


9. Guide Questions

  1. What is a periodic signal?
  2. What is the relationship between frequency and period?
  3. What MATLAB function generates a sine wave?
  4. How does increasing frequency affect a waveform?
  5. Why are periodic signals important in communication systems?

10. Sample Computation

Given:


f=5 Hzf = 5 \text{ Hz}

Find the period.


T=1fT = \frac{1}{f}


T=15T = \frac{1}{5}


T=0.2 secondsT = 0.2 \text{ seconds}

Therefore, the signal repeats every 0.2 seconds.


5 2 votes
Article Rating
Subscribe
Notify of
1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Lyka Barruga
18 days ago

Subplotsss langg sirrr, gamitt consolee pooo.

IMG_0453
0
Would love your thoughts, please comment.x
()
x
Update cookies preferences