The Formula for I The general formula for a sinusoidal signal is x(t) =A cos(2pft + f). I A, f, and f are parameters that characterize the sinusoidal sinal. I A - Amplitude: determines the height of the sinusoid. I f - Frequency: determines the number of cycles per second. I f - Phase: determines the location of the sinusoid. 2009-2019, B.-P. Paris ECE 201: Intro to Signal Analysis 14
3 x(t) = A cos(2π f t + φ) 2 1 Amplitude 0 1 2 3 0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 Time (s) I The formula for this sinusoid is: x(t) =3 cos(2p 50 t + p/4). 2009-2019, B.-P. Paris ECE 201: Intro to Signal Analysis 15
The Significance of I Fundamental building blocks for describing arbitrary signals. I General signals can be expresssed as sums of sinusoids (Fourier Theory) I Provides bridge to frequency domain. I Sinusoids are special signals for linear filters (eigenfunctions). I Sinusoids occur naturally in many situations. I They are solutions of differential equations of the form d 2 x(t) dt 2 + ax(t) =0. I Much more on these points as we proceed. 2009-2019, B.-P. Paris ECE 201: Intro to Signal Analysis 16
Background: The cosine function I The properties of sinusoidal signals stem from the properties of the cosine function: I Periodicity: cos(x + 2p) = cos(x) I Eveness: cos( x) =cos(x) I Ones of cosine: cos(2pk) =1, for all integers k. I Minus ones of cosine: cos(p(2k + 1)) = 1, for all integers k. I Zeros of cosine: cos( p 2 (2k + 1)) = 0, for all integers k. I Relationship to sine function: sin(x) =cos(x p/2) and cos(x) =sin(x + p/2). 2009-2019, B.-P. Paris ECE 201: Intro to Signal Analysis 17
Amplitude I The amplitude A is a scaling factor. I It determines how large the signal is. I Specifically, the sinusoid oscillates between +A and A. 2009-2019, B.-P. Paris ECE 201: Intro to Signal Analysis 18
Frequency and Period I Sinusoids are periodic signals. I The frequency f indicates how many times the sinusoid repeats per second. I The duration of each cycle is called the period of the sinusoid. It is denoted by T. I The relationship between frequency and period is f = 1 T and T = 1 f. 2009-2019, B.-P. Paris ECE 201: Intro to Signal Analysis 19
Phase and Delay I The phase f causes a sinusoid to be shifted sideways. I A sinusoid with phase f = 0 has a maximum at t = 0. I A sinusoid that has a maximum at t = t 1 can be written as x(t) =A cos(2pf (t t 1 )). I Expanding the argument of the cosine leads to x(t) =A cos(2pft 2pft 1 ). I Comparing to the general formula for a sinusoid reveals f = 2pft 1 and t 1 = f 2pf. 2009-2019, B.-P. Paris ECE 201: Intro to Signal Analysis 20
4 t 1 T = 1/f 2 A 0 2 4 1 0.5 0 0.5 1 1.5 2 Time (s) 2009-2019, B.-P. Paris ECE 201: Intro to Signal Analysis 21
Exercise 1. Plot the sinusoid x(t) =2 cos(2p 10 t + p/2) between t = 0.1 and t = 0.2. 2. Find the equation for the sinusoid in the following plot 4 3 2 1 Amplitude 0 1 2 3 4 0 0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 0.01 Time (s) 2009-2019, B.-P. Paris ECE 201: Intro to Signal Analysis 22
Vectors and Matrices I MATLAB is specialized to work with vectors and matrices. I Most MATLAB commands take vectors or matrices as arguments and perform looping operations automatically. I Creating vectors in MATLAB: directly: x = [ 1, 2, 3 ]; using the increment (:) operator: x = 1:2:10; produces a vector with elements [1, 3, 5, 7, 9]. using MATLAB commands For example, to read a.wav file [ x, fs] = wavread( music.wav ); 2009-2019, B.-P. Paris ECE 201: Intro to Signal Analysis 23
Plot a Sinusoid %% parameters A = 3; f = 50; 4 phi = pi/4; fs = 50*f; %% generate signal 9 % 5 cycles with 50 samples per cycle tt = 0 : 1/fs : 5/f; xx = A*cos(2*pi*f*tt + phi); %% plot 14 plot(tt,xx) xlabel( Time (s) ) % labels for x and y axis ylabel( Amplitude ) title( x(t) = A cos(2\pi f t + \phi) ) 2009-2019, B.-P. Paris ECE 201: Intro to Signal Analysis 24
Exercise I The sinusoid below has frequency f = 10 Hz. I Three of its maxima are at the the following locations t 1 = 0.075 s, t 2 = 0.025 s, t 3 = 0.125 s I Use each of these three delays to compute a value for the phase f via the relationship f i = 2pft i. I What is the relationship between the phase values f i you obtain? 3 2 1 Amplitude 0 1 2 3 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 Time (s) 2009-2019, B.-P. Paris ECE 201: Intro to Signal Analysis 25