0
$\begingroup$

I am bit confused regarding sampling as i read different types of statements in different texts

Forexample i have a continous time signal $x=sin(t)$ defined for $t=0:10$ and i want to sample it with sampling frequency 5000hz How can i obtain sampled signal $x[n]$ in this case

Please guide me which of following two ways is correct to define sampled signal?

$x[n]$=$sin(ts)$ where ts=1/5000

               or

$x[n]$=$sin(ts/fs)$ where ts=1/5000 and fs=5000

$\endgroup$
5
  • $\begingroup$ neither of your functions are a function of n $\endgroup$
    – user28715
    May 20, 2019 at 12:31
  • $\begingroup$ @StanleyPawlukiewicz i didn't understand your comment,please elaborate $\endgroup$
    – DSP_CS
    May 20, 2019 at 17:52
  • $\begingroup$ a function of n, there is no n in the sine terms $\endgroup$
    – user28715
    May 20, 2019 at 18:00
  • $\begingroup$ @StanleyPawlukiewicz But please let me know,is it essential to introduce or include 'n' term while converting your continous time signal to sampled version $\endgroup$
    – DSP_CS
    May 20, 2019 at 18:31
  • 1
    $\begingroup$ i don’t want to be disrespectful but do you typically need to be told something 3 times? $\endgroup$
    – user28715
    May 20, 2019 at 19:02

1 Answer 1

1
$\begingroup$

You typically write a sine wave as $$x(t) = sin(2 \cdot \pi \cdot f \cdot t)$$ where t is time and f the frequency of the sine wave.

Please note that both time and frequency are physical quantities, i.e. they have values and units. The units need to cancel each other since you can't apply the sine function to a unit

If you want to sample this at $f_s = 5000 Hz$ you simply calculate the value every a time interval $T_s = 1/f_s$. You get

$$x_d[n] = sin(2 \cdot \pi \cdot f \cdot n \cdot T_s) $$

or

$$x_d[n] = sin(2 \cdot \pi \cdot n \cdot f/f_s) $$

Whether this is "correct" or not depends the ratio of frequency to sample rate and whether this meets the criteria of the sampling theorem or not.

$\endgroup$
4
  • $\begingroup$ is it must to include'n' term in your equation/definition of sampled signal along with 2,pi and f ? $\endgroup$
    – DSP_CS
    May 18, 2019 at 19:42
  • $\begingroup$ @engr What do you suppose it would mean if the value of $x_d[n]$ did not depend on $n$? $\endgroup$ May 22, 2019 at 2:07
  • $\begingroup$ @SolomonSlow it wouldn't have been converted into discrete time and it would remain in continous time $\endgroup$
    – DSP_CS
    May 22, 2019 at 5:17
  • $\begingroup$ @engr, Math is a language. If you want other people to understand what you're saying when you write mathematical expressions and mathematical equations, then you should learn the language. If you write that $x_d[n]=f(y)$, where $f(y)$ does not depend on $n$, then that is the math way of declaring that every $x_d[n]$ is the same value as every other $x_d[n]$. In other words, it's a declaration that you're sampling a pure DC "signal." $\endgroup$ May 22, 2019 at 13:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.