Hello all, I am reading a matlab example from Simon Haykin's introduction DSP book. In the example, a discrete time signal is describe as x[n] = e^-(n/15) sin(2*pi*n/13 + pi/8) for 0<=n<=59 result from sampling a continuous time signal at rate of 45kHz The example (p.332) went on to describe how to change the sampling rate by using the resample function. I am stumped by how to determine the sampling rate of 45kHz from the above equation. Can someone explain to me please? My interpretation is 2*pi*f = 2*pi*n/13 => f = n/13. Since n = 60 => f=60/13. But this is wrong? Thanks in advance. FD
sampling rate
Started by ●October 5, 2003
Reply by ●October 5, 20032003-10-05
flipdog wrote:> Hello all, > I am reading a matlab example from Simon Haykin's introduction > DSP book. In the example, a discrete time signal is describe as > > x[n] = e^-(n/15) sin(2*pi*n/13 + pi/8) for 0<=n<=59 > > result from sampling a continuous time signal at rate of 45kHz > The example (p.332) went on to describe how to change the > sampling rate by using > the resample function. > > I am stumped by how to determine the sampling rate of 45kHz from > the above equation. > Can someone explain to me please? > My interpretation is > 2*pi*f = 2*pi*n/13 > => f = n/13. Since n = 60 => f=60/13. But this is wrong?That's 2*pi*n/13 = 2*pi*f*t = 2*pi*f*n*T = 2*pi*f*n/fs, so f/fs = 1/13 and f = 45000/13 Hz. So the analytic form of the signal and the sampling rate *together* give you the tone's analog frequency. Likewise, you can determine fs from the equation *and* the frequency of the tone before sampling. The equation alone doesn't say anything about the sampling rate -- that additional piece of info should be available to you as system designer or user. Martin
Reply by ●October 5, 20032003-10-05
flipdog wrote: > In the example, a discrete time signal is describe as > x[n] = e^-(n/15) sin(2*pi*n/13 + pi/8) for 0<=n<=59 > result from sampling a continuous time signal at rate of 45kHz > > I am stumped by how to determine the sampling rate of 45kHz from the > above equation. I think you can't. The sampling rate is extra information you need to completely characterize the signal. A sampled signal is nothing but a bunch of numbers in a specific order. The equation is just some convenient representation of this series. To make a connenction with the continuous time signal, you need information about how far these numbers are apart in time. The sampling rate of 45kHz says that there are 45000 of these numbers in 1s, equally spaced. So you can calculate the time between 2 numbers (1/45000 s). > Can someone explain to me please? > My interpretation is > 2*pi*f = 2*pi*n/13 > => f = n/13. Since n = 60 => f=60/13. But this is wrong? Actually, I think the prototype of a sine in the timedomain is sin(2*pi*f*t + fi) with f the frequency and fi the phase. So your sine has frequency 1/13 as n is the discrete time-index. This is the frequency in discrete time. Now you can use your knowledge of the sampling rate of 45kHz to calculate the frequency of the continuous time signal that was sampeled. A discrete frequency of 1/13 means you have 13 samples in 1 period. You already jnow that 2 samples are 1/45000s apart. So in continuous time, your sine has a period of 13/45000s, thus a frequency of 45000/13 Hz = 45/13kHz. It would be nice if someone backed me up on this. I'm just reasoning logically here and the past has shown that my logic isn't always logic :-) Greetz, Jan






