Let say x(n) is the discrete time signal, which have N number of samples..How to say the frequency of the signal...can anybody explain this in graphical way?
Note: I can understand frequency in continuous time signals.
I wanted to give you a short answer, but ended up writing half a textbook. Anyway here you are, hope it makes some sense.
When talking about frequency in discrete time signals the word frequency may have one of two conceptually different meanings.
The first one is the sampling frequency, which is related to the nature of how the discrete signal is obtained. A discrete signal can be a representation of a continuous time signal, measured at distinct time intervals. The time between each sample is called the sampling period, and the sampling frequency is then one over the sampling period. This concept is external to the signal.
The other concept, which I think you are asking about, is frequency similar to how we define it for continuous time signals. Frequency is related to the period of a signal, and the period is how long time it takes before the signal repeats itself. In continuous time a signal x(t) is said to be periodic if:
x(t) = x(t+T)
where T is the period time, and the frequency is f is 1/T [pr. time (Hertz)] or 2*pi/T [in angular frequency (radians/second)].
The definition for discrete time signals is similar, x[n] is said to be periodic if:
x[n] = x[n+N]
where N is a positive integer. The smallest integer N for which this equation is satisfied is called the fundamental period. The frequency is then simply f = 1/N or 2*pi/N (in angular frequency, radians).
So far there are not much difference besides the fact that N can only be a positive integer smaller than the signal length in the discrete case.
Frequency is of-course closely related to sinusoidal signals, and the following example will show an important limitation when we are talking about frequency of discrete signals. Let's first look at the continuous case, a signal on the form:
x(t) = A*cos(w*t+phi)
is periodic with the angular frequency of w for all w. So now the discrete equivalent:
x[n] = A*cos(W*n + phi)
this discrete time signal may or may not be periodic, by the definition above we must have:
x[n] = x[n+N]
A*cos(W*n + phi) = A*cos(W*(n+N) + phi)
For this to hold we must have that W*N = 2*pi*m radians, where m is an integer. That is not all discrete time sinusoidal systems with arbitrary values of W are periodic! There are two limitations: 1, N must be less than the signal length, and 2, W = 2*pi*m/N, where both m and N are integers, that is W must be a rational multiple of 2*pi.
Specifically, W must be a rational multiple of 2*pi.
I have attached a figure, showing 4 examples. They all have length K = 16. The two first are discrete signals that are periodic with period 2 and 4 respectively. The third is a discrete sinusoidal with W = 2*pi/8, which is periodic, and the the last one is a discrete sinusoidal with W = 2*pi/7.1 which you can see is not periodic within the length of the signal. The last example will have a well defined period if we increase the signal length. However, a discete sinusoidal with W = 2*pi/(5*sqrt(2)) will never have a well defined period as sqrt(2) is not rational.
So what about these discrete non-periodic sinusoidals, can we still say that they have a period/frequency? Well, you can do like Henri suggests and look at the frequency spectrum (Fourier transform), but they will unlike continuous time sinusoidals have more than a single peak. Remember that the Fourier transform is basically approximating the signal by a sum of sinusoidals with well defined periods.
As for books I recommend Digital Signal Processing by Proakis and Manolakis.
There is little difference between the concept of frequency in continuous time and discrete time.
To find the frequency of x(n), just take the Fourier transform. (fast fourier or otherwise), and then you have the signal split in spectral components.
You can then take the max of the Fourier transform, and that's the dominant frequency.
I wanted to give you a short answer, but ended up writing half a textbook. Anyway here you are, hope it makes some sense.
When talking about frequency in discrete time signals the word frequency may have one of two conceptually different meanings.
The first one is the sampling frequency, which is related to the nature of how the discrete signal is obtained. A discrete signal can be a representation of a continuous time signal, measured at distinct time intervals. The time between each sample is called the sampling period, and the sampling frequency is then one over the sampling period. This concept is external to the signal.
The other concept, which I think you are asking about, is frequency similar to how we define it for continuous time signals. Frequency is related to the period of a signal, and the period is how long time it takes before the signal repeats itself. In continuous time a signal x(t) is said to be periodic if:
x(t) = x(t+T)
where T is the period time, and the frequency is f is 1/T [pr. time (Hertz)] or 2*pi/T [in angular frequency (radians/second)].
The definition for discrete time signals is similar, x[n] is said to be periodic if:
x[n] = x[n+N]
where N is a positive integer. The smallest integer N for which this equation is satisfied is called the fundamental period. The frequency is then simply f = 1/N or 2*pi/N (in angular frequency, radians).
So far there are not much difference besides the fact that N can only be a positive integer smaller than the signal length in the discrete case.
Frequency is of-course closely related to sinusoidal signals, and the following example will show an important limitation when we are talking about frequency of discrete signals. Let's first look at the continuous case, a signal on the form:
x(t) = A*cos(w*t+phi)
is periodic with the angular frequency of w for all w. So now the discrete equivalent:
x[n] = A*cos(W*n + phi)
this discrete time signal may or may not be periodic, by the definition above we must have:
x[n] = x[n+N]
A*cos(W*n + phi) = A*cos(W*(n+N) + phi)
For this to hold we must have that W*N = 2*pi*m radians, where m is an integer. That is not all discrete time sinusoidal systems with arbitrary values of W are periodic! There are two limitations: 1, N must be less than the signal length, and 2, W = 2*pi*m/N, where both m and N are integers, that is W must be a rational multiple of 2*pi.
Specifically, W must be a rational multiple of 2*pi.
I have attached a figure, showing 4 examples. They all have length K = 16. The two first are discrete signals that are periodic with period 2 and 4 respectively. The third is a discrete sinusoidal with W = 2*pi/8, which is periodic, and the the last one is a discrete sinusoidal with W = 2*pi/7.1 which you can see is not periodic within the length of the signal. The last example will have a well defined period if we increase the signal length. However, a discete sinusoidal with W = 2*pi/(5*sqrt(2)) will never have a well defined period as sqrt(2) is not rational.
So what about these discrete non-periodic sinusoidals, can we still say that they have a period/frequency? Well, you can do like Henri suggests and look at the frequency spectrum (Fourier transform), but they will unlike continuous time sinusoidals have more than a single peak. Remember that the Fourier transform is basically approximating the signal by a sum of sinusoidals with well defined periods.
As for books I recommend Digital Signal Processing by Proakis and Manolakis.
- Your analysis on periodic/nonperiodic for discrete time signals is absolutely correct if you view the 'base signal' as discrete time.
- The point is, however, in many cases a discrete time signal is a representation of a continuous time signal, where the set of discrete samples basically represents the continuous time signal.
- The accuracy of such a representation is governed by the Nyquist sampling theorem: If sampling is done at more than double the highest spectral component, there is no loss of information by sampling the signal. If this criterium is not met, there is 'aliasing'. (all of this and a lot more is explained in this book from Proakis and Manolakis.)
- Note that also the sample frequency is arbitrary. As long as the Nyquist criterium is met, you can change the sample frequency by means of a sample rate convertor from one to another, and this will not result in loss of information.
- In my opinion, the accuracy of the FFT in determining the spectral frequency is always limited, and it is coupled to the length of the FFT. This is a quite fundamental property. (The Heisenberg uncertainty of position and impulse of a quantum-mechanical particle. Here, this is applied to the wave which can represent the particle. The position here is the time duration of the wave, the impulse is the frequency.) This is of course the result of assuming a priori there is no relationship between the frequency of the signal and the sample frequency. If you assume there is such a relationship, it becomes possible to have higher accuracy.
if I am getting your question right, you are asking about the frequency information of a discrete time signal. i.e. the discrete signal sketched in frequency domain. that can be obtained by taking DFT, FFT of the discrete signal.