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
| Item | Description |
|---|---|
| Computer or Laptop | Used to run MATLAB |
| MATLAB Software | Used for signal generation and analysis |
| MATLAB Editor | Used 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
4.3 Frequency
The frequency represents the number of cycles occurring in one second.
The relationship between frequency and period is
where:
- (f) = frequency (Hz)
- (T) = period (seconds)
Example:
If
T = 0.001
then
4.4 Mathematical Representation of a Sine Wave
A basic periodic signal used in engineering is the sine wave.
Its mathematical representation is
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
- Open MATLAB.
- Create a new script file.
- 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 Type | Frequency (Hz) | Period | Amplitude | Observation |
|---|---|---|---|---|
| Sine Wave | 5 | (0.2) | 1 | Smooth oscillation |
| Square Wave | 5 | (0.2) | 1 | Sharp transitions |
| Sawtooth Wave | 5 | (0.2) | 1 | Linear 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:
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
- What is a periodic signal?
- What is the relationship between frequency and period?
- What MATLAB function generates a sine wave?
- How does increasing frequency affect a waveform?
- Why are periodic signals important in communication systems?
10. Sample Computation
Given:
Find the period.
Therefore, the signal repeats every 0.2 seconds.
Subplotsss langg sirrr, gamitt consolee pooo.