Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
4 views

EE301_Lab2

This lab focuses on building functions in MATLAB and Simulink to analyze signal energy, power, linearity, and time-invariance. Students will conduct exercises involving signal computations, plotting functions, and simulating systems to verify properties. The final report is due on October 2, 2024, and must include code, results, and answers to lab questions.

Uploaded by

blackada
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

EE301_Lab2

This lab focuses on building functions in MATLAB and Simulink to analyze signal energy, power, linearity, and time-invariance. Students will conduct exercises involving signal computations, plotting functions, and simulating systems to verify properties. The final report is due on October 2, 2024, and must include code, results, and answers to lab questions.

Uploaded by

blackada
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Lab 2 - LTI Systems

02/21/2025

1 Introduction
In the first part of this lab we will learn how to build a function in MATLAB
and how to approximately compute the signal energy and power. In the
second part we will build block systems in Simulink to examine the linearity
and time-invariant property of certain operations. The report will be due
on Wednesday, Oct 2 2024, 11:59 pm.

2 Background Information and Notes


An easy way to define a function y with single input x:
1 y = @( x ) c o s ( x ) . ∗ s i n ( x )

Useful Simulink blocks: Add/Sum, Step, Sine, Gain, Delay, Scope/Dash-


board Scope, Square, Moving Average

3 Guided Exercises
3.1 Energy and Power Signals
Use integral to approximately compute the energy and power of the following
signals and determine the signal type (in terms of energy and power).

1. y1 (t) = 2 exp−|t| sin(2t)


sin(πt)
2. y2 (t) = πt = sinc(t)

3. y3 (t) = 3 square(t)

1
3.2 Plotting functions using arrays and continuous functions
Generate the following waves using both methods of defining a function on a
time array and in analytical form. Use a time interval of 0.5 for the stepsize.
To define a function in analytical form you can use the commands:
1 syms x ;
2 y = sin (x) ;

To plot an analytical function you can use the command:


1 f p l o t ( x , y , [ xmin xmax ] )

Plot the functions generated with both methods on the same figure for the
time interval of 0 to 10s. Repeat this for each case separately (3 figures
overall). Comment on the results.

• A sine wave with a frequency of 2 and an amplitude of 3.

• A sine wave with a frequency of 0.46 and an amplitude of 2.

• A sine wave with a frequency of 0.46 and an amplitude of 2 multiplied


by exp(−0.5x).

3.3 Linearity
1. Search for the definition of linear systems on chapter 2 of your text-
book. Think about how you can prove a system is linear.

2. Build the block system in Simulink as shown in Figure 1. The upper


sine wave has an amplitude of 1 and frequency of 2, and the lower sine
wave has an amplitude of 2 and frequency of 1. All other parameters
are 0.

3. Run the simulation from 0s to 10s, save the scope plot and include it
in the report.

4. Question: Is the square operation linear or nonlinear? How do you


draw the conclusion from the given system?

2
Figure 1: Verifying Linearity

3.4 Time Invariance


1. Search for the definition of time-invariant systems and think about
how you can prove a system is time-invariant.
2. Build a similar system as we did in last section to examine the time-
invariant property of ’moving average’ operation. Some of the blocks
are specified as following.
• Input: x(t) = u(t−1)−u(t−5), where u(t) is a unit step function.
• Delay block with a delay value of 2.
• Moving average with a window length of 10.
3. Run the simulation from 0s to 10s. Use the result to show that ’moving
average’ is a time-invariant operation. Please also submit a screenshot
of your system.

4 Lab Report
1. Your report should be submitted as a single PDF file, and only the
last submission will be graded.

3
2. The beginning of your report should have your name and USC ID.

3. Please note that all reports should be typed. Your code should be dis-
played along with the results and figures generated. Using MATLAB’s
Publishing tool to export your code and results is recommended.

4. Answer all the questions which were asked in the lab assignment, they
can be included as comments in separate sections of your MATLAB
code. If you prefer to type them separately, remember to merge your
PDF files before submitting the report. Please give written expla-
nation or put comment lines where necessary. Please note that each
figure should have a proper title and axis labels.

5. The report should be submitted online through blackboard.

You might also like