Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
6 views11 pages

HW Convolution

This document is a homework assignment for EEE203 Signals and Systems I, focusing on discrete time convolution using a Java program called J-DSP. It explains the importance of convolution in signals and systems, detailing how to compute convolution with delta functions and window functions, and includes tasks for students to perform simulations and calculations. The assignment emphasizes understanding the linear and time-invariant properties of systems through practical applications and visualizations.

Uploaded by

perammounika75
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views11 pages

HW Convolution

This document is a homework assignment for EEE203 Signals and Systems I, focusing on discrete time convolution using a Java program called J-DSP. It explains the importance of convolution in signals and systems, detailing how to compute convolution with delta functions and window functions, and includes tasks for students to perform simulations and calculations. The assignment emphasizes understanding the linear and time-invariant properties of systems through practical applications and visualizations.

Uploaded by

perammounika75
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Dr.

Chao Wang EEE203 Signals and Systems I Page 1 of 11

Homework: Discrete Time Convolution


You are required to use a Java program called J-DSP at http://jdsp.engineering.asu.edu/JDSP-
HTML5/JDSP.html in this assignment. To become familiar with it, it is recommended that you first work
through the PDF file “Introduction on J-DSP HTML5” posted along with this document.

Convolution is a very important technique in signals and systems. While continuous-time convolution is
important for theoretical analysis, you have to understand how to do discrete-time convolution in order
to write a program to implement it on a computer or a DSP chip. This assignment will help you
understand how to perform discrete time convolution operation with delta, window, unit step and
exponential functions.

For a discrete time Linear and Time Invariant (LTI) system with impulse response h[n] as shown in Fig. 1,
the output y[n] can be obtained through the convolution of input signal x[n] and impulse response h[n]
as defined in Eqn. 1

x[n] LTI y[n]


h[n]

Figure 1. discrete time LTI system


𝑦𝑦[𝑛𝑛] = 𝑥𝑥[𝑛𝑛] ∗ ℎ[𝑛𝑛] = � 𝑥𝑥[𝑘𝑘]ℎ[𝑛𝑛 − 𝑘𝑘] (1)


𝑘𝑘=−∞

Convolution with a Delta Function

Let us first look at two special cases of a discrete time signal convoluting with delta functions (sifting
property). Recall 𝛿𝛿[𝑛𝑛] = 1 for n = 0 and 𝛿𝛿[𝑛𝑛] = 0 for all other values.

ℎ[𝑛𝑛] ∗ 𝛿𝛿[𝑛𝑛] = � ℎ[𝑘𝑘]𝛿𝛿[𝑛𝑛 − 𝑘𝑘] = ℎ[𝑛𝑛]𝛿𝛿[0] = ℎ[𝑛𝑛] (2)


𝑘𝑘=−∞

Note in Eqn. 2, since only when k = n, 𝛿𝛿[0] = 1 and all other 𝛿𝛿[𝑛𝑛 − 𝑘𝑘] = 0, the summation reduces to a
single term ℎ[𝑛𝑛]. This is the reason why h[n] is called the impulse response, i.e., the system response
(output) to an input delta function.

Likewise in Eqn. 3 when convoluting with a shifted version of delta function, only the term when 𝑘𝑘 =
𝑛𝑛 − 𝑛𝑛0 remains in the summation, all other terms are zeros due to the delta function terms being zeros.
Note Eqn. 3 can also be obtained by applying the time-invariant property of the LTI system, i.e., shifting
input in Eqn. 2 results in an identical shift in the output.

ℎ[𝑛𝑛] ∗ 𝛿𝛿[𝑛𝑛 − 𝑛𝑛0 ] = � ℎ[𝑘𝑘]𝛿𝛿[𝑛𝑛 − 𝑛𝑛0 − 𝑘𝑘] = ℎ[𝑛𝑛 − 𝑛𝑛0 ]𝛿𝛿[0] = ℎ[𝑛𝑛 − 𝑛𝑛0 ] (3)
𝑘𝑘=−∞

It is important to understand that every discrete time signal can be represented as a sum of a series of
shifted and scaled delta functions (Textbook 2.1.1), i.e.,
Dr. Chao Wang EEE203 Signals and Systems I Page 2 of 11

𝑥𝑥[𝑛𝑛] = � 𝑥𝑥[𝑘𝑘]𝛿𝛿[𝑛𝑛 − 𝑘𝑘] (4)


𝑘𝑘=−∞

1 𝑓𝑓𝑓𝑓𝑓𝑓 𝑛𝑛 = −1
2 𝑓𝑓𝑓𝑓𝑓𝑓 𝑛𝑛 = 0
For example if 𝑥𝑥[𝑛𝑛] = � (5), then based on Eqn. 4,
−1 𝑓𝑓𝑓𝑓𝑓𝑓 𝑛𝑛 = 1
0 𝑜𝑜𝑜𝑜ℎ𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒
𝑥𝑥[𝑛𝑛] = 𝛿𝛿[𝑛𝑛 + 1] + 2𝛿𝛿[𝑛𝑛] − 𝛿𝛿[𝑛𝑛 − 1] (6)
There are two ways to look at the convolution equation. First we can decompose the input signal into
delta functions. Based on signal decomposition (Eqn. 4) and convolution Eqn. 2 and 3, we can represent
output as a sum of a series of shifted and scaled (based on each of the input signal value) versions of
impulse response functions:
∞ ∞

𝑦𝑦[𝑛𝑛] = ℎ[𝑛𝑛] ∗ 𝑥𝑥[𝑛𝑛] = ℎ[𝑛𝑛] ∗ � 𝑥𝑥[𝑘𝑘]𝛿𝛿[𝑛𝑛 − 𝑘𝑘] = � 𝑥𝑥[𝑘𝑘]ℎ[𝑛𝑛 − 𝑘𝑘] (7)


𝑘𝑘=−∞ 𝑘𝑘=−∞

For x[n] defined in Eqn. 5, we have

𝑦𝑦[𝑛𝑛] = 𝑥𝑥[𝑛𝑛] ∗ ℎ[𝑛𝑛] = ℎ[𝑛𝑛] ∗ (𝛿𝛿[𝑛𝑛 + 1] + 2𝛿𝛿[𝑛𝑛] − 𝛿𝛿[𝑛𝑛 − 1]) = ℎ[𝑛𝑛 + 1] + 2ℎ[𝑛𝑛] − ℎ[𝑛𝑛 − 1] (8)
Eqn. 7 and 8 represent convolution output from the viewpoint of the input signal, i.e., how the input
signal is decomposed into impulses, with each impulse passing through the LTI system, and then the
individual outputs are added to generate the final output. (Think about how the LTI property can be
used to generate the output in Eqn. 8.) The contribution of each sample/impulse in the input signal to
many samples in the output signal is evident from Eqn. 7 and 8. For example, in Eqn. 8, x[-1]=1
contributes h[n+1] to the output, x[0]=2 contributes 2h[n] to the output, and x[1]=-1 contributes –h[n-1]
to the output.

Task:

1. Calculate the convolution of the following two signals 𝑦𝑦[𝑛𝑛] = 𝑥𝑥[𝑛𝑛] ∗ ℎ[𝑛𝑛]

h[n] x[n]

Figure 2. h[n] and x[n]

a. Write x[n] as a sum of delta functions similar to Eqn. 6.


b. Compute convolution using the method shown in Eqn. 8. Plot your y[n] in a figure similar to
Fig. 2.
c. Go to http://jdsp.engineering.asu.edu/JDSP-HTML5/JDSP.html. Build the simulation diagram
as shown in Fig. 3.
Dr. Chao Wang EEE203 Signals and Systems I Page 3 of 11

Figure 3. Convolution as a sum of shifted and scaled input signals

Note blocks Sig. Gen. (Signal Generator) and Plot is on the left. Convolution and Adder
blocks are under “Basic Blocks” in the drop down menu at the top.

Define the signals as shown in Figure 4. Click “Update”. For “User-Defined” signal, click “Edit
Signal” to enter values and then click “Update”.

Figure 4. Define x[n] (as a sum of delta functions) and h[n]

Open up Plot 6, 7 and 9. Choose “Plot Quantity” as “Real” at the top and “Plot” as “Discrete” at
the bottom. Take a screen shot. Verify Plot 9 is a sum of Plot 6 and 7, as y[n] is a sum of scaled
and shifted h[n]’s. Compare your own plot y[n] with Plot 9. Are they the same? You can also see
values of y[n] by clicking “Graph Values”.
Dr. Chao Wang EEE203 Signals and Systems I Page 4 of 11

To verify your answer, reload the page and build the simulation as shown in Fig. 5. Define the
signals as shown in Fig. 6. Open up Plot 4. Choose “Plot Quantity” as “Real” at the top and “Plot”
as “Discrete” at the bottom. Take a screen shot.

Figure 5. Direct convolution

Figure 6. Define x[n] and h[n]

Decomposing the input signal reinforces our understanding of how LTI systems work. As a matter of
fact, this is how the convolution equation is derived. Passing an impulse through the system, we get the
impulse response. Any input can be decomposed into a sum of shifted and scaled impulses. Because of
the linear and time-invariant properties of LTI system, the shifted and scaled impulse responses get
superimposed, and we get the output, which is our convolution equation.

We can also view convolution from the other perspective by decomposing the impulse response.
Decomposing the impulse response doesn’t have any physical meaning. However, it gives us insight into
how each individual sample in the output signal gets contributions from the many samples of input
signal, i.e., it helps us understand how to calculate independently each output sample. More
importantly it shows how the LTI system manipulates input to get the output.

Convolution with a Window Function

Here a window function is informally defined as a finite number of impulses. Suppose the impulse
response is a simple two-impulse window function:
1 1
ℎ[𝑛𝑛] = (𝛿𝛿[𝑛𝑛] + 𝛿𝛿[𝑛𝑛 − 1]) = (𝑢𝑢[𝑛𝑛] − 𝑢𝑢[𝑛𝑛 − 2]) (9)
2 2
Note 𝑢𝑢[𝑛𝑛] = 1 for 𝑛𝑛 ≥ 0 and 𝑢𝑢[𝑛𝑛] = 0 for 𝑛𝑛 < 0, and 𝑢𝑢[𝑛𝑛 − 2] = 1 for 𝑛𝑛 ≥ 2 and 𝑢𝑢[𝑛𝑛 − 2] = 0 for 𝑛𝑛 <
2. Verify for yourself the sum of the delta functions and the difference of the unit step functions in Eqn.
9 represent the same function. Plug Eqn. 9 into Eqn. 1, we have
Dr. Chao Wang EEE203 Signals and Systems I Page 5 of 11

∞ ∞
1
𝑦𝑦[𝑛𝑛] = 𝑥𝑥[𝑛𝑛] ∗ ℎ[𝑛𝑛] = � 𝑥𝑥[𝑘𝑘]ℎ[𝑛𝑛 − 𝑘𝑘] = � 𝑥𝑥[𝑘𝑘](𝛿𝛿[𝑛𝑛 − 𝑘𝑘] + 𝛿𝛿[𝑛𝑛 − 1 − 𝑘𝑘])
2
𝑘𝑘=−∞ 𝑘𝑘=−∞
∞ ∞
1 1
= � 𝑥𝑥[𝑘𝑘]𝛿𝛿[𝑛𝑛 − 𝑘𝑘] + � 𝑥𝑥[𝑘𝑘]𝛿𝛿[𝑛𝑛 − 1 − 𝑘𝑘]
2 2
𝑘𝑘=−∞ 𝑘𝑘=−∞
1 1 1
= 𝑥𝑥[𝑛𝑛] ∗ 𝛿𝛿[𝑛𝑛] + 𝑥𝑥[𝑛𝑛] ∗ 𝛿𝛿[𝑛𝑛 − 1] = (𝑥𝑥[𝑛𝑛] + 𝑥𝑥[𝑛𝑛 − 1]) (10)
2 2 2
Now by decomposing the impulse response, we can represent the output signal as a sum of scaled and
shifted input functions. Specifically, at any time n, y[n] can be calculated by adding up the current input
x[n] and the previous input x[n-1] and divided by 2. The LTI system is simply a two-point averaging (low
pass) filter!

How to calculate each y[n] can be illustrated using a convolution machine as shown in Fig. 7. The
convolution machine is based on the convolution definition equation 𝑦𝑦[𝑛𝑛] = 𝑥𝑥[𝑛𝑛] ∗ ℎ[𝑛𝑛] =
∑∞𝑘𝑘=−∞ 𝑥𝑥[𝑘𝑘]ℎ[𝑛𝑛 − 𝑘𝑘]. In the figure, imagine the input signal x[n] at the top and the output signal y[n] at
the bottom are fixed on the page. The convolution machine inside the dashed box glides from left to
right to generate the output. The convolution machine is positioned so that its output is aligned with the
output sample being calculated. Note inside the machine is h[-k], which is h[k] flipped left-for-right. Fig.
7 shows two positions of the convolution machine calculating y[0] and y[4]. Note the convolution
machine is consistent with Eqn. 10, i.e., y[n] can be calculated by adding up the current input x[n] and
the previous input x[n-1] and divided by 2. When one of x[n] or x[n-1] is missing, it is set to be zero. The
convolution machine concept is the same as the flip and shift concept taught in the textbook.
Dr. Chao Wang EEE203 Signals and Systems I Page 6 of 11

3
2
x[n]
1

0 1 2 3

x x x x
h[n]
(flipped)

0.5
-1 0 -1 0

+ +

2.5
y[n] 2
1.5
0.5
0 1 2 3 4

Figure 7. Convolution machine with window function

Task:

2. Calculate the convolution of the two signals 𝑦𝑦[𝑛𝑛] = 𝑥𝑥[𝑛𝑛] ∗ ℎ[𝑛𝑛], where x[n] is defined in Fig. 7
and h[n] is defined in Eqn. 9.
a. In Fig. 7, move the convolution machine from left to right and calculate y[n] by hand.
b. Go to http://jdsp.engineering.asu.edu/JDSP-HTML5/JDSP.html. Build the simulation diagram
in Fig. 5. Define Sig. Gen. 1 and 2 as x[n] and h[n] using “User-Defined” signal. Open up Sig.
Gen. 1, 2 and Plot 4, make sure all three plots are visible. Take a screenshot. (Take separate
screenshots if they cannot fit on the same window.) Is y[n] the same as you calculated in
Part a?

Convolution with a Shifted Window Function

Now let’s look at a shifted version of the two-impulse window function:


1 1
ℎ[𝑛𝑛] = (𝛿𝛿[𝑛𝑛 − 2] + 𝛿𝛿[𝑛𝑛 − 3]) = (𝑢𝑢[𝑛𝑛 − 2] − 𝑢𝑢[𝑛𝑛 − 4]) (11)
2 2
First derive using the definition equation:
Dr. Chao Wang EEE203 Signals and Systems I Page 7 of 11

∞ ∞
1
𝑦𝑦[𝑛𝑛] = 𝑥𝑥[𝑛𝑛] ∗ ℎ[𝑛𝑛] = � 𝑥𝑥[𝑘𝑘]ℎ[𝑛𝑛 − 𝑘𝑘] = � 𝑥𝑥[𝑘𝑘](𝛿𝛿[𝑛𝑛 − 2 − 𝑘𝑘] + 𝛿𝛿[𝑛𝑛 − 3 − 𝑘𝑘])
2
𝑘𝑘=−∞ 𝑘𝑘=−∞
∞ ∞
1 1
= � 𝑥𝑥[𝑘𝑘]𝛿𝛿[𝑛𝑛 − 2 − 𝑘𝑘] + � 𝑥𝑥[𝑘𝑘]𝛿𝛿[𝑛𝑛 − 3 − 𝑘𝑘]
2 2
𝑘𝑘=−∞ 𝑘𝑘=−∞
1 1 1
= 𝑥𝑥[𝑛𝑛] ∗ 𝛿𝛿[𝑛𝑛 − 2] + 𝑥𝑥[𝑛𝑛] ∗ [𝑛𝑛 − 3] = (𝑥𝑥[𝑛𝑛 − 2] + 𝑥𝑥[𝑛𝑛 − 3]) (12)
2 2 2
With the shift, y[n] is the average of the two input x[n] at two and three samples ago. Eqn. 12 shows
that the time shift in h[n] (h[n] shifts right by 2 from Eqn. 9 to Eqn. 11) results in the exact same shift in
y[n] (y[n] also shifts right by 2 from Eqn. 10 to Eqn. 12).

Fig. 8 illustrates the change in convolution machine. Again it is consistent with Eqn. 12.

Fig. 7 and Fig. 8 also illustrate two important facts. First the length of the output signal is equal to the
length of the input signal, plus the length of the impulse response, minus one, i.e., 𝑁𝑁𝑦𝑦 = 𝑁𝑁𝑥𝑥 + 𝑁𝑁ℎ − 1.
Second, if the indices of the first and last sample of input signal is 𝐼𝐼𝑥𝑥1 and 𝐼𝐼𝑥𝑥2 and the indices of the first
and last sample of impulse response is 𝐼𝐼ℎ1and 𝐼𝐼ℎ2 , then the indices of the first and last sample of output
signal is 𝐼𝐼𝑥𝑥1 + 𝐼𝐼ℎ1and 𝐼𝐼𝑥𝑥2 + 𝐼𝐼ℎ2 . For example, in Fig. 8, x[n] is from 0 to 3, h[n] is from 2 to 3 from Eqn.
11, then y[n] is from 2 to 6.

3
2
x[n]
1

0 1 2 3

x x
h[n]
(flipped)

0.5
-3 -2 -1 0

2.5
y[n] 2
1.5
0.5
0 1 2 3 4 5 6

Figure 8. Convolution machine with time-shifted window function


Dr. Chao Wang EEE203 Signals and Systems I Page 8 of 11

On a side note, for Eqn. 9 and Eqn. 11, we have ℎ[𝑛𝑛] = 0 for n < 0. From Eqn. 10 and Eqn. 12, we
derived that y[n] can be calculated from only current and past input x[n]’s. Based on the textbook
definition, the two systems are causal, i.e., the two definitions of causality are equivalent.

Task:

3. Calculate the convolution of the two signals 𝑦𝑦[𝑛𝑛] = 𝑥𝑥[𝑛𝑛] ∗ ℎ[𝑛𝑛], where x[n] is defined in Fig. 8
and h[n] is defined in Eqn. 11.
a. In Fig. 8, move the convolution machine from left to right and calculate y[n] by hand.
b. Go to http://jdsp.engineering.asu.edu/JDSP-HTML5/JDSP.html. Build the simulation diagram
in Fig. 5. Define Sig. Gen. 1 and 2 as x[n] and h[n] using “User-Defined” signal. Open up Sig.
Gen. 1, 2 and Plot 4, make sure all three plots are visible. Take a screenshot. (Take separate
screenshots if they cannot fit on the same window.) Is y[n] the same as you calculated in
Part a?
1
c. Suppose ℎ[𝑛𝑛] = (𝛿𝛿[𝑛𝑛] + 𝛿𝛿[𝑛𝑛 + 1]), derive y[n] in terms of x[n] similar to Eqn. 12. Draw
2
the convolution machine similar to Fig. 8. Is the system causal? Why?

Convolution with a Unit Step Function

Now what if the impulse response is a unit step function as shown in Eqn. 13?

ℎ[𝑛𝑛] = 𝑢𝑢[𝑛𝑛] = � 𝛿𝛿[𝑛𝑛 − 𝑖𝑖] (13)


𝑖𝑖=0

First convince yourself the unit step function is simply a sum of infinite number of shifted impulses as
shown in Eqn. 13. By applying the sifting property of Eqn. 2 and 3, we have
∞ ∞

𝑦𝑦[𝑛𝑛] = 𝑥𝑥[𝑛𝑛] ∗ ℎ[𝑛𝑛] = 𝑥𝑥[𝑛𝑛] ∗ � 𝛿𝛿[𝑛𝑛 − 𝑖𝑖] = � 𝑥𝑥[𝑛𝑛 − 𝑖𝑖] (14)


𝑖𝑖=0 𝑖𝑖=0

Eqn. 14 shows y[n] is the sum of all current and previous input x[n]’s. The convolution machine of a unit
step function is illustrated in Fig. 9. Imagine the convolution machine inside the dashed box is extended
infinitely to the left. As the machine glides from left to right, initially, y[0] = x[0], then y[1] = x[0] + x[1],
y[2] = x[0] + x[1] + x[2], y[3] = x[0] + x[1] + x[2] + x[3], then y[n] reaches steady state, it simply sums up
all values in x[n], i.e., y[n] = y[3] for n ≥ 3.
Dr. Chao Wang EEE203 Signals and Systems I Page 9 of 11

3
2
x[n]
1

0 1 2 3

x x x
h[n] ...
(flipped)
1

... -1 0

...

7 ...
6

y[n]
1

0 1 2 3 4

Figure 9. Convolution machine with unit step function

Task:

4. Calculate the convolution of the two signals 𝑦𝑦[𝑛𝑛] = 𝑥𝑥[𝑛𝑛] ∗ ℎ[𝑛𝑛], where x[n] is defined in Fig. 9
and h[n] is defined in Eqn. 13.
a. In Fig. 9, move the convolution machine from left to right and calculate y[n] by hand.
b. Go to http://jdsp.engineering.asu.edu/JDSP-HTML5/JDSP.html. Build the simulation diagram
in Fig. 5. Define Sig. Gen. 1 as x[n] using “User-Defined” signal. Define Sig. Gen. 2 as h[n]
using “Rectangular” signal. Set “Gain” to 1, “Pulsewidth” to 20 (from 0 to 19), “Time Shift” to
0. Open up Sig. Gen. 1, 2 and Plot 4, make sure all three plots are visible. Take a screenshot.
(Take separate screenshots if they cannot fit on the same window.) Is y[n] the same as you
calculated in Part a? Why does y[n] start to drop at n = 20?

Convolution with an Exponential Function

When the impulse response is an exponential function such as


Dr. Chao Wang EEE203 Signals and Systems I Page 10 of 11


1 𝑛𝑛 1 𝑖𝑖
ℎ[𝑛𝑛] = � � 𝑢𝑢[𝑛𝑛] = � � � 𝛿𝛿[𝑛𝑛 − 𝑖𝑖] (15)
2 2
𝑖𝑖=0

it can be decomposed into a sum of infinite number of impulses like the unit step function. 𝛿𝛿[𝑛𝑛 − 𝑖𝑖]
1 𝑖𝑖
represents the location of the impulse and � � represents its value. By applying the sifting property of
2
Eqn. 2 and 3, we have
∞ ∞
1 𝑖𝑖 1 𝑖𝑖
𝑦𝑦[𝑛𝑛] = 𝑥𝑥[𝑛𝑛] ∗ ℎ[𝑛𝑛] = 𝑥𝑥[𝑛𝑛] ∗ � � � 𝛿𝛿[𝑛𝑛 − 𝑖𝑖] = � � � 𝑥𝑥[𝑛𝑛 − 𝑖𝑖] (16)
2 2
𝑖𝑖=0 𝑖𝑖=0

1 𝑖𝑖
Eqn. 16 shows y[n] is the sum of all current and previous input x[n]’s scaled by the � � factor. The
2
output can be thought of averaging the input but weighing input based on its time, the newer the input,
the more weight, the older the input, the less weight. This smoothing action again is a low pass filter.
The convolution machine of the exponential function is illustrated in Fig. 10. Just like the unit step
function, the convolution machine inside the dashed box is extended infinitely to the left. The flip
version h[-n] is illustrated best in this figure, and it is just h[n] mirrored against the vertical axis. As the
machine glides from left to right, initially, y[0] = x[0], then y[1] = x[0]/2 + x[1], y[2] = x[0]/4 + x[1]/2 +
x[2], y[3] = x[0]/8 + x[1]/4 + x[2]/2 + x[3]. y[n] will get smaller and smaller and tend to zero.
Dr. Chao Wang EEE203 Signals and Systems I Page 11 of 11

3
2
x[n]
1

0 1 2 3

x x x
h[n] ...
(flipped)
1
1/2
1/4
... -1 0

...

3.75
3.5
y[n]
1
...
0 1 2 3 4

Figure 10. Convolution machine with exponential function

Task:

5. Calculate the convolution of the two signals 𝑦𝑦[𝑛𝑛] = 𝑥𝑥[𝑛𝑛] ∗ ℎ[𝑛𝑛], where x[n] is defined in Fig. 10
and h[n] is defined in Eqn. 15.
a. In Fig. 10, move the convolution machine from left to right and calculate y[n] by hand for n =
0 to 4.
b. Go to http://jdsp.engineering.asu.edu/JDSP-HTML5/JDSP.html. Build the simulation diagram
in Fig. 5. Define Sig. Gen. 1 as x[n] using “User-Defined” signal. Define Sig. Gen. 2 as h[n]
using “Exponential” signal. Set “Exp Base” to 0.5, “Gain” to 1, “Pulsewidth” to 20 (from 0 to
19), “Time Shift” to 0. Open up Sig. Gen. 1, 2 and Plot 4, make sure all three plots are visible.
Take a screenshot. (Take separate screenshots if they cannot fit on the same window.) Is
y[n] the same as you calculated in Part a? Open up “Graph Values” in Plot 4 will help you
compare values.

You might also like