Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

'B-' 'G-' 'Ro' 'BD'

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 5

Experiment No.

1
Sinusoidal Signals
Name: Gerardo, Mizhar L.
Course/Year/Section: ECE41

Date: November 27, 2014

Objective:
This activity will enable the students to verify the properties and
characteristics of sinusoidal signals through simulation using the MATLAB
software.
Tasks:
1. a.)Generate and plot the following signals in MATLAB. Write the script
and sketch the graph. Display at least 5 cycles.
y = 10 sin [2(440)t] ;

x = 10 cos [2(440)t]

b.)Adjust x with a -90 phase shift and plot the resulting signal. Adjust x
with a time delay (t-td) so that it will have the same plot as the previous
one.
Script:
For part a and b
%with this, I created the range of values of t that will be substituted
to the function of x and y. So the values will range from 0 to 35 with
a 0.1 unit step.
t=0:0.1:35;
%I converted pi with equivalent value in degrees which is 180 because
based on the experience while using pi, it is not a perfect sinusoidal
waveform. 10 is the amplitude, 440 is the frequency. My reference will
be 0, as you can see in the result this signal starts to generate from
x=0 and ends with the value of x=35 in order to have a 5 complete
cycles.
y = 10*sin(2*180*(440)*t);
x = 10*cos(2*180*(440)*t);
%the values of x is adjusted with -90 degrees that is converted to
radian which is equal to 1.5709 rad.
z = 10*cos((2*180*(440)*t)-1.5708);
%the x is adjusted with a time delay of ((90/360)*(1/440)) seconds
w = 10*cos(2*180*(440)*(t-((90/360*440));
%The x,y,z and w signals were plotted.
plot(t,y,'b-',t,x,'g-',t,z,'ro',t,w,'bd');

2.) Verify the following relationships of sine and cosine by performing the
given operation and by observing the resulting output:
a. Add a 900 phase shift to the sine function. What do you observe?
b. Subtract a 900 phase shift to the cosine function. What happened
to the signal?
c. Square the two original functions then add them. What do you
observe?
Script:
For a&b
t=0:0.1:35;
y = 10*sin(2*180*(440)*t);
%a 90 degree phase shift is added to y signal. It is converted first in
radians which is equal to 1.5708rad
y1 =10*sin((2*180*(440)*t)+1.5708);
x = 10*cos(2*180*(440)*t);
%a 90 degree phase shift is added to x signal. It is converted first in
radians which is equal to 1.5708rad
x1 = 10*cos((2*180*(440)*t)-1.5708);
%the x,y,x1 and y1 signals were plotted
plot(t,y,'-b',t,y1,'or',t,x,'-c',t,x1,'og')

For c
t=0:0.1:35;
y = 10*sin(2*180*(440)*t);
x = 10*cos(2*180*(440)*t);
%the sum of the square of x&y signals were plotted
plot(t,((y.^2)+(x.^2)));

3.) Perform the following operations then verify the results. Plot the
corresponding output.
a. Make the sine function to shift 1800 then, add the original sine
function to the shifted function. What happened to the final signal?
b. Change the frequency of the sine function by 20 times and
decrease the amplitude of the cosine function by one-half then
multiply the two signals. What is the resultant signal?
Script:

t=0:0.1:35;
y = 10*sin(2*180*(440)*t); %the original sine function
z= 10*sin((2*180*(440)*t)+3.1415); %180 degrees= 3.1415radian
x=y+z; %the sum of original sine function and the shifted sine function
p=10*sin(2*180*(440*20)*t); %the frequency was multiplied by 20
q=5*cos(2*180*(440)*t); %the amplitude of x signal was halved
r=p.*q; %the resultant signal
plot(t,x,t,y,'ob',t,r,'-g'); %the x,y,and r signals were plotted

DISCUSSION
PART1

For the first part of the experiment, the green and blue waveforms are the
cosine and sine function respectively. While the red circle sinusoid is the cosine
function which is adjusted by -90 degrees. It is observed that the original cosine
function was converted to sine function by adding a delay of -90 degrees. The
blue-diamond sinusoid is the cosine function which added a time delay of
((90/360*440))seconds in order to be in-phase with the previous signal. Ill make
use of ratio and proportion to get the time delay. (Td/To)=(phase shift/360)

PART 2
A&B.)

For this part of the experiment, it is observed that by adding a 90 degrees


phase shift to sine function it will become exactly as the cosine function and by
subtracting a 90 degrees phase shift to the cosine function it will be converted to
sine function.
C.)

By adding the square of the two original signals which is the sine and
cosine function it is observed that the resultant became a dc signal.
PART 3

It is observed that multiplying the sine and cosine function results with the
amplitude modulated signal and adding the original sine function to the shifted
sine function results with the dc signal.

You might also like