Revision as of 10:07, 10 September 2008 by Blaskows (Talk)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Part 1

Changing a Periodic Continuous Time Signal to a Non-Periodic Discrete Time Signal

One can take a signal that would be periodic in continuous time and turn it into a signal that is not periodic in discrete time. Consider the continuous time signal $ x(t)=sin(t) $. Plotting this signal yields a smooth waveform that repeats itself with period $ T=2\pi $.

The continuous-time signal $ x(t)=sin(t) $ is periodic.

Sampling this signal at every integer time yields something altogether different.

Sampling the continuous-time signal $ x(t)=sin(t) $ at integer times yields something like this. Note that the new discrete-time function $ x[n]=sin(n) $ is not periodic. Here we have shown five cycles of the formerly-periodic continuous time function.

The new discrete time function looks like this on its own.

The non-periodic discrete-time function $ x[n]=sin(n) $.

For the signal to be periodic, there must exist an integer N such that $ x[n]=x[n+N] $. For the signal defined as it is here, no such integer N exists.


Changing a Periodic Continuous Time Signal to a Periodic Discrete Time Signal

Suppose our sampling frequency, instead of being 1, was $ \frac{\pi}{8} $. Then the newly sampled function overlaid with the continuous function would look something like

The periodic discrete-time function $ x[n]=sin(\frac{\pi}{8}n) $ overlaid with its continuous time equivalent.
The periodic discrete-time function $ x[n]=sin(\frac{\pi}{8}n) $.


Part 2

Consider the non-periodic function $ f(t)=e^{-0.2t}*sin(10t) $.

Non-periodic function $ f(t)=e^{-0.2t}sin(10t) $.

If we run the following MATLAB code, we can create a signal with an arbitrary period. Presented here is a signal with period 5.

%Set up the environment
clear
clc

%Define parameters for shifiting the function
delta=0.0001;  %step size
period=5;   %period of function to produce
nperiod=5;  %number of periods to reproduce

%define an x-vector for the inputs to the function
x=-2*period:delta:(nperiod+2)*period;

%intermediate results -- this gets shifted and added as necessary
f=exp(-0.2.*x).*sin(10.*x);

%preallocate the y-vector for speed (MATLAB's suggestion)
y=zeros(size(x));

%for each period we are to reproduce, add the appropriate section of the
%f-vector (shifted horizontally) to the output vector.
for count=1:period/delta:(nperiod+8)*period/delta
    y(1,count:size(y,2))=y(1,count:size(y,2))+f(1,1:size(y,2)-count+1);
end

%plot the results
plot(x,y)
grid
axis([0,nperiod*period,min(y),max(y)]);

Running this code produces this figure.

Non-periodic function $ f(t)=e^{-0.2t}sin(10t) $ shifted and added several times to produce a periodic function.

Alumni Liaison

Meet a recent graduate heading to Sweden for a Postdoctorate.

Christine Berkesch