[go: up one dir, main page]

0% found this document useful (0 votes)
27 views6 pages

Activity No 4

This activity aims to demonstrate convolutional processing of signals by generating a sine wave and convolving it with various kernel functions using NumPy. The student was able to generate the sine wave, plot it, and convolve it with kernels A through G to observe the effects. Additional kernels from SciPy wavelet functions were also used to convolve the sine wave. The different kernels produced varying effects on the original signal that were analyzed by the student. Overall, the activity helped the student learn about convolutions and their applications in signal processing.

Uploaded by

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

Activity No 4

This activity aims to demonstrate convolutional processing of signals by generating a sine wave and convolving it with various kernel functions using NumPy. The student was able to generate the sine wave, plot it, and convolve it with kernels A through G to observe the effects. Additional kernels from SciPy wavelet functions were also used to convolve the sine wave. The different kernels produced varying effects on the original signal that were analyzed by the student. Overall, the activity helped the student learn about convolutions and their applications in signal processing.

Uploaded by

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

Activity No.

4
Fundamental Convolution Application
Course Code: CPE 416 Program: BSCPE
Course Title: Digital Signal Processing and Applications Date Performed: 09/22/2022
Section: CPE41S1 Date Submitted: 09/22/2022
Name/s: Alejandro, Ruel Z. Instructor: Engr. Mon Arjay
Malbog
1. Objective:
This activity aims to introduce the convolutional process by demonstrating with the programmatic
processing of both arbitrarily generated signals and collected data using simple convolution techniques,

2. Intended Learning Outcomes (ILOs):


After completion of this activity the students should be able to:
Develop a program that manipulates signals with convolutional processing with simple response
signals.

3. Discussion :
In mathematics (in particular, functional analysis), convolution is a mathematical operation on two
functions (f and g) that produces a third function (f*g) that expresses how the shape of one is modified by
the other. The term convolution refers to both the result function and to the process of computing it. It is
defined as the integral of the product of the two functions after one is reversed and shifted. The integral
is evaluated for all values of shift, producing the convolution function.

Convolution has applications that include probability, statistics, acoustics, spectroscopy, signal
processing and image processing, engineering, physics, computer vision and differential equations.

The convolution can be defined for functions on Euclidean space and other groups.For example, periodic
functions, such as the discrete-time Fourier transform, can be defined on a circle and convolved by
periodic convolution. A discrete convolution can be defined for functions on the set of integers.

Generalizations of convolution have applications in the field of numerical analysis and numerical linear
algebra, and in the design and implementation of finite impulse response filters in signal processing.
Computing the inverse of the convolution operation is known as deconvolution.
4. Resources:
The activity will require the following software, tools and equipment:

5. Directions:
1. Programmatically generate a sinusoidal wave, running at 500hz, an amplitude of 5 volts, with a
sampling rate of 100, starting at time 0 with 0 offset. Store the sine wave in an array.

3. Plot and save the sine wave as an image.

4. Create an 10-element array containing the following kernel function with values:
A=[0 0 0 0 0 1 1 1 1 1]. Also, Plot and save the image.

5. Perform a convolution of both the sine wave and the generated array. Use the convolve function
provided by NumPy. This will generate a new array for you to plot.

6. Repeat he same process of the following kernels:

B = [1 1 1 1 1 0 0 0 0 0]

C = [-1 -1 -1 -1 -1 0 0 0 0 0]

D = [0 0 0 0 0 -1 -1 -1 -1 -1]

E = [-1 -1 -1 -1 -1 0 0 0 0 0]

F = [ 0 0 .5 .5 1 1 .5 .5 0 0]

G = [ 0 0 -.5 -.5 -1 -1 -.5 -.5 0 0]

7. Compare and analyses the different effects of the kernels to the original signal and each other.

8. Generate another kernel arrays using the scipy wavelet library and convolve with the sine wave. This
time use the following:

 Daubechie wavelet

signal.wavelets.daub(8)

 Morlet wavelet

signal.wavelets.morlet2(20,4,2)

 Ricker wavelet

signal.wavelets.ricker(20,1)

8. Compare and analyses the different effects of the kernels to the original signal and each other.

9. Apply the kernels A-G and the three(3) wavelets to the mean and standard deviation summaries from
activity 1.

10. Cite and record observations.

6. Procedures

First, I created a program that could generate a 500 Hz sinusoidal wave with an amplitude of 5 V, a
sampling rate of 100 Hz, and an offset of 0 milliseconds at time 0. and data array
I was able to produce and visualize the sign wave using this formula

I saved the plot as an image file.

When I convolve the sine wave using the numpy supplied function, I use both the sine wave's given
array and the array that was produced.
As you can see, I produced it using each of the kernels from A to G. Create another array for plotting as
well.
I used the SciPy wavelet module to construct an extra kernel array, which I then merged with the sine
wave. Using the:

Daubechies wavelet
Morlet wavelet

Ricker wavelet

7. Results(sample)

https://drive.google.com/drive/folders/1ZDcgKRf3cnmSdpmvelFnJhFd3YKAQv_w?usp=sharing
8. Data Analysis

*what did you observe in the data?


I observe in the data I use kernels to improve the accuracy of the identification process by using sine
waves. They are presented to me in various lengths I was able to distinguish between the waveforms by
examining the differences in the codes sampled at the same time.

9. Summary and Conclusions


*summarize what you did. What did you find out?
I conclude from this activity that Convolutions are performed on the data that flows into the layers that
make up a convolutional neural network The output is then sent to the next level. It employs a
convolution to sum the values of all the pixels in its receptive area into a single number.

10. Learnings and Contributions of each member

*what did you do to contribute to this activity? What new learnings, methods and techniques did you pick
up? Describe in detail.

You might also like