Periodicity of continuous and discrete signals

Discussion in 'Math' started by jag1972, Aug 13, 2012.

  1. jag1972

    Thread Starter Active Member

    Feb 25, 2010
    Hello Friends,
    I think I have understand how to mathematically and conceptually test for periodicity for sine and cosine waves. All continuous time sine waves are periodic.

    f(t) = sin(2\pi f (t + T)
    f(t) = sin(2\pi f t  +  2\pi f T
    f(t) = sin(2\pi f t) cos (2\pi f T) + sin(2\pi f T) cos (2\pi f t)

    The sine term on the RHS will equal 0 as fT is always going to be one. This leaves the left hand side only.

    f(t) = sin(2\pi f t) cos (2\pi f T)

    The cosine term is equal to 1, therefore that proofs that the sinewave is periodic.

    f(t) = sin(2\pi f t)

    For the discrete version is not always periodic.

    f(t) = sin(2\pi f (n + N)
    f(t) = sin(2\pi f n  +  2\pi f T
    f(t) = sin(2\pi f n) cos (2\pi f N) + sin(2\pi f N) cos (2\pi f n)

    For the discrete sinewave to be periodic f*N for the sine function on the RHS has to be an integer value i.e. there has to be at least samples for the entire band of vision 2pi.

    I have a couple of questions:

    1) For the function f(t) = sin(2\pi \frac{5}{8} t)
    The check for periodicity is: \frac{2\pi \frac{5}{8}}{2\pi}
    The function is periodic because the result is a rational number. the frequency is 1/8 Hertz and the periodic time is 8. What is the unit of T as there is no time. Also unless the numerator of the rational fraction is not a multiple of the denominator is right to just ignore it in the discrete domain.

    2) If a function is not periodic is it true that its no good for DSP as taking the FT of it would be doing so with missing information which is an error.

    Your advice and assistance will be greatly appreciated.
  2. WBahn


    Mar 31, 2012
    When you say

    <br />
f(t)=\sin(2\pi f(n+N))<br />

    you already have problems since you are saying that you have a function of time, t, yet time doesn't appear anywhere in the expression.

    You have a function of n, the sample number, not of time. They are related by the sampling frequency, f_s, by

    <br />
t = \frac{n}{f_s}<br />

    <br />
f(t)=\sin(2\pi ft)<br />
f(n)=\sin(2\pi \frac{f}{f_s}n)<br />

    In order for this to be periodic, there must be a value of N such that

    <br />
k=\frac{f}{f_s}N<br />

    where k is an integer. This requires that

    <br />
\frac{k}{N}=\frac{f}{f_s}<br />

    be rational.

    With this in mind, please reask your questions, since I'm having a hard time figuring out exactly what you are getting at.
  3. jag1972

    Thread Starter Active Member

    Feb 25, 2010
    Sure no problem.


    f[n]= sin(2\pi F n)

    My question is for the discrete function:

    f[n]= sin(2\pi \frac{5}{8} n)

    Is the digital frequency \frac{1}{8} Hertz and the period is 8. As you say there is no time units therefore is the unit of periodicity just samples e.g. period = 8 samples.
  4. WBahn


    Mar 31, 2012
    There are a couple of different periods involved here, and you need to be careful that you are using the one that is needed for whatever it is you are trying to do.

    From a purist standpoint you have a function that defines a sequence of values, namely f[n]. That sequence is periodic with a period of 8 samples. It is NOT 1/8 Hz because Hz is 'cycles per second'. The discrete-time frequency is 1/8 cycle per sample.

    Technically, the sequence is undefined except at the sample points. However, in practice, it is often the goal to estimate the parameters of a continuous time domain signal based on a sequence of samples taken from it.

    So, ideally, you would like to be able to analyze the f[n] sequence and, combined with the knowledge that the sampling rate is 8Sa/s, deduce that the most likely time-domain signal is a 5Hz sine wave. Unfortunately, the sampling rate in this case violates the Nyquist Sampling Theorem which basically says that you must sample a signal at a rate of at least two samples per cycle of highest frequency content of the signal. If not, you get an effect known as 'aliasing' (have you encountered Nyquist or aliasing, yet?). In this case you cannot distinguish a 5Hz signal from an inverted 3Hz signal. In other words,

    <br />
\sin \left( 2\pi \frac{5}{8} n \right) \;=\; -\sin \left( 2\pi \frac{3}{8} n \right)<br />

    for integral values of 'n'. The attached graph shows this.

    We (myself included) tend to get sloppy regarding time and discrete-time units and terminology. Most of the time that's okay because humans are real good at extracting the meaning that was intended and thus successfully communicating even with pretty egregious phraseology. But when you are learning new concepts, I believe it is extremely useful to be very explicit in the terms used.
  5. jag1972

    Thread Starter Active Member

    Feb 25, 2010
    Thanks for the reply, very helpfull.

    I know a little about the sampling theorem. In the case of:

    f[n]= sin(2\pi \frac{5}{8} n

    Because the the sample frequency is 8 Hz, then that will acccording to Nyquist theorem be sufficent to sample a 4 Hz signal. 8Hz is the fold frequency. The sampled frequency of 3 Hz can be achieved when the continious time frequency is 5 Hz. The same frequency can be obtained when the continious time frequency is 3 Hz.

    Is there any point of a non periodic digital signal as periodicty means that a comple cycle is captured?
  6. jag1972

    Thread Starter Active Member

    Feb 25, 2010
    I have one question and one request.

    Q1) The book I am reading uses '\Omega' upper case omega to represent angular velocity which has the units radians per second.
    The digital version of this is '\varpi'lower case omega. This has the unit of radians as the original frequency is divided by the sample frequency the hertz disappears leaving just radians.
    Is lower case omega \varpi called the normalised frequency ?
    The digital frequency as explained by WBahn is in cycles per sample which is equal to:\frac{\varpi}{2\pi}

    Could I please as for some MATLAB code to demonstrate aliasing. On the last post WBahn attached a screenshot of an example.

    For example:f[n]=cos(\varpi  n)

    f[n]=cos(2\pi\frac{5}{10} n

    According to sampling theorem the frequency of 5Hz will preserved in the discrete domain and therefore in the continuous domain after processing.

    However at a different sampling rate:

    f[n]=cos(2\pi\frac{5}{9} n

    is 4 Hz.

    How can I show this in MATLAB, I have been trying to find it but have failed. A link to a site that has it would be appreciated.
    thank you in advance for your help and advice.
  7. mathteacher019

    New Member

    Nov 12, 2012