18.03 Class 6, Feb 19, 2002

Periodic and sinusoidal functions as signal and system response.

Vocabulary: Periodic, period, circular or angular frequency, 
sinusoidal, amplitude, phase lag, time lag, transient.


Example: the ocean leads in through a channel to a bay. We are interested
in the relationship between the tide in the ocean and the tide in the bay.

Write  y  for a measure of the elevation of the ocean at the entrance 
to the channel, and  x  for the elevation of the bay.  We wish to set up 
a differential equation modeling this.  To begin,

x(t + Delta t) = x(t) + ??

If  y > x,  the bay tide will increase;
if  y < x,  the bay tide will decrease.

The simplest way to model this is to assume that the rate of change of
the bay tide is proportional to the difference  y - x.  If we write  k
for the proportionality constant we get

x(t + Delta t) = x(t) + k (y - x) Delta t

Forming the difference quotient and taking the limit we get the ODE

x' = k(y-x)

which is a linear ODE. In standard form it is

x' + kx = ky.

Note the  k  on the right hand side; if you forgot it, consideration of 
units would lead you back to it. 

We will solve this with  y = B cos(omega t).  First, a review of periodic
and sinusoidal functions. 


A function  f(t)  is "periodic" if there is a positive  T  such that
f(t+T) = f(t).  The number  T  is "a period" of  f(t).

If  T  is a period of  f(t)  then so is  2T, 3T, .... 
If  f(t)  is continuous and not constant and periodic, then there is a 
minimal period, often called "the period."

If we know  f(t)  between  a  and  a+T  for any number  a , then we know
f(t) everywhere. Any "window" of width T suffices.


A particularly important periodic function is the cosine function  cos(t).
It has period  2pi.  We will alter it in various ways.

(1)  We can form  cos(omega t).  The graph of this is obtained by taking
the graph of  cos(t)  and reaching the peak at  2pi  when  omega t = 2pi;
so its period is  T = 2pi/omega.  The number  omega > 0  is the "angular"
or "circular frequency" of  cos(omega t),  and we define the angular
(or circular) frequence of any period function with minimal period  T
to be  omega = 2pi/T. 

(2)  We can shift the graph of cos to the right by phi radians before
compressing it. This is represented by  cos(omega t - phi).  Phi is the
"phase lag." It is measured in radians. A phase lag of  pi  is half a period;
generally, a phase lag of  phi  means  phi/2pi  of a period. 
We could also write this as  cos(omega(t - t0)),  where 
t0  is the "time lag,"  t0 = phi/omega.  The graph of  cos(omega t)  
is delayed, shifted to the right, by  t0  units. 

(3)  We can amplify the graph by a factor of  A:  A cos(omega t - phi).
A is the "amplitude."

A "sinusiodal function" is a function of this form. It is periodic of period
2pi/omega. 


We will use this as the signal. By setting the clock we can suppose the signal
is  B cos(omega t).  Measurements give us  B = 5,  k = 1/4.  The period of
the tide is close to 12 hours, which we'll approximate by  4pi,  so 
omega = 2pi/4pi = 1/2:  

x' + (1/4) x = 5 (1/2) cos(t/2)(*)

Let's hope to find a periodic solution. 

We might hope at first for  x = a cos(t/2).  But the  x'  in the equation
would give us a  sine,  which isn't present on the right hand side. It might
be made to cancel though if we allow a sine in the proposed form of  x:

xp = a cos(t/2) + b sin(t/2).

We want to find  a  and  b  for which this is a solution to  (*).
So plug  xp  into  (*):

      (1/4) x  =  (a/4) cos(t/2) + (b/4) sin(t/2)
            x' = -(a/2) sin(t/2) + (b/2) cos(t/2)
__________________________________________________

(5/4) cos(t/2) = (a+2b)/2 cos(t/2) + (b-2a)/2 sin(t/2)

The only way this can hold is if the coefficient of  sin  vanishes
and the coefficients of  cos  agree:

b = 2a ,  a + 2b = 5

or  a = 1, b = 2:  so  

xp = cos(t/2) + 2 sin(t/2)

is a periodic solution to  (*).

I would like to graph this, but do it intelligently. In general, we have
learned now to look at functions of the form 

a cos(omega t) + b sin(omega t)

as periodic solutions to linear equations with sinusoidal signal, so let's
think about such a function in general. It reminds one of the trig identity
(which I write multiplied by  A):

A cos(omega t - phi) = A(cos phi) cos(omega t) + A(sin phi) sin(omega t)

In fact it IS the right hand side of this if we have  

a = A cos phi,    b = A sin phi.

This is trigonometry:  if you plot the point  (a,b),  its polar coordinates
(A, phi)  are determined by this relation. 

So:  The function  a cos(omega t) + b sin(omega t)  is not only periodic,
it is sinusoidal! - and the amplitude and phase lag can be gotten from the
triangle.

In our particular case, with  (a,b) = (1,2),  we have  A = sqrt(5) = 2.2361...
and  phi = arctan(2) = 1.1071... .

We learn that the tide in the bay has amplitude only  2.2361  feet high
(i.e.  1/sqrt(5) , or about 45%, of the height of the tide in the ocean)
and that it is delayed by a phase lag of 1.1071 radians, i.e.  arctan(2)/2pi
or about  18%  of a full period; the period is  4pi  so the time lag is
2 arctan(2) = 2.2142... hours.


This is the only periodic solution to  (*) , but not the only solution.
If you recall, the general solution to a linear equation has the form

x = xp + c xh

where  xh  is a nonzero solution of the associated homogeneous equation:

x = xp + c e^{-t/4}  

in our case. The extra term is needed to allow various different initial 
conditions. For example maybe a dam keeps the height of the bay at a certain
level, and it is then released. The tide in the bay differs from  xp  at 
first, but quickly "relaxes" to the periodic solution. The other term,
c e^{-t/4},  is the "transient."