<< Chapter < Page | Chapter >> Page > |
Now use these functions to calculate the impulse response of each of the following 5 systems: , , (i.e., the series connection with following ), (i.e., the series connection with following ), and .
For this section download the music.au file. For help on how to play audio signals click here .
Use the command
auread
to load the file
music.au into Matlab.
Then use the Matlab function
sound
to listen to the signal.
Next filter the audio signal with each of the two systems and from the previous section. Listen to the two filtered signals.
Consider the system from the "Difference Equations" section. Find a difference equation for a newsystem such that where denotes the discrete-time impulse function . Since both systems and are LTI, the time-invariance and superposition properties can be used to obtain for any discrete-time signal . We say that the systems and are inverse filters becausethey cancel out the effects of each other.
Hint: The system can be described by the difference equation
where and are constants.
Write a Matlab function
y = S3(x)
which implements
the system
.
Then obtain the impulse response of both
and
.
For this section download the zip file bbox.zip .
Often it is necessary to determine if a system is linear and/or time-invariant. If the inner workings of a system are not known, this task is impossiblebecause the linearity and time-invariance properties must hold true for all possible inputs signals.However, it is possible to show that a system is non-linear or time-varying because only a single instance must be found where the properties are violated.
The zip file
bbox.zip contains three "black-box" systems in the files bbox1.p,
bbox2.p, and bbox3.p.These files work as Matlab functions, with the syntax
y=bboxN(x)
, where
x
and
y
are the input and the output signals, and
N = 1, 2 or 3
.
Exactly one of these systems is non-linear, and exactly one ofthem is time-varying.
Your task is to find the non-linear system and the time-varyingsystem.
random
command.For this section download stockrates.mat . For help on loading Matlab files click here .
Load stockrates.mat into Matlab. This file contains a vector, called rate , of daily stock market exchange rates for a publicly traded stock.
Apply filters
[link] and
[link] from the
"Stock Market Example" section of the background exercises to smooth the stock values.
When you apply the filter of
[link] you will need
to initialize the value of
.
Use an initial value of 0.Similarly, in
[link] , set the initial values of
the "value" vector to 0 (for the days prior to the start of data collection).Use the
subplot
command to plot the original stock values,
the result of filtering with
[link] ,
and the result of filtering with
[link] .
Notification Switch
Would you like to follow the 'Purdue digital signal processing labs (ece 438)' conversation and receive update notifications?