Can I modify y[n] = αy[n-1] + x[n] the same way I would do it with y(k) --> Y(z)? I need H(z), but I don't know what is the difference between using (k), and (n). I often encountered [k] notation, what is the difference between (k) and [k]?
-
4Usually square brackets are used to indicate that the index is discrete, but conventions vary. – MBaz Jul 04 '19 at 17:34
-
Ok, thanks. I'm thinking, maybe [n] would mean that the series is 0 when n<0, and some function f, f(n) when n>0? And h[k] could be positive or negative where ever. Would that make sense? – Immo Jul 04 '19 at 17:43
-
Could be, but that's not an universal convention. – MBaz Jul 04 '19 at 17:45
-
Your recursive relaton seems akin to first order exponential averaging low-pass filter, or exponentially weighted moving average (EWMA) see https://dsp.stackexchange.com/q/36415/15892 or first order exponential averaging low-pass filter, exponentially weighted moving average (EWMA) – Laurent Duval Jul 04 '19 at 19:12
2 Answers
The notation for discrete-time signals, $x[n]$, was first noticed by me in the original Oppenheim and Schaffer (1975), even though i didn't see that book until 1981.
So before, discrete-time signals in DSP used the same notation in mathematics used for sequences (infinite or not), with the subscript, $x_n$. In both notations, the argument or subscript play the same role and are only integers.
$$ x[n] \triangleq x_n \qquad \qquad x\in\mathbb{C} \qquad n\in\mathbb{Z} $$
Usually the signal, $x[n]$, is real but it need not be. But the argument, $n$, must be an integer which makes this no different than a sequence, $x_n$.
With the DTFT and DFT this notation was common pre-O&S,
$$\begin{align} X_k &\triangleq \sum\limits_{n=0}^{N-1} x_n e^{-i 2 \pi \frac{nk}{N}} \\ \\ x_n &= \frac{1}{N} \sum\limits_{k=0}^{N-1} X_k e^{+i 2 \pi \frac{nk}{N}} \\ \end{align}$$
or they would use that awful $W_N^{nk}$ notation.
Now the problem with the "$x_n$" notation is that you would get too many subscripts to deal with, if you had a signal that was a multi-element vector. And there was nothing in the notation to denote which subscript was the "time-like" variable. With analog signals, $v(t)$, this wasn't a problem. If you had a cable with 8 wires (plus ground), you could label them "$v_1(t)$" to "$v_8(t)$" and looking at $v_m(t)$, there was no doubt that it meant the "$m$th element that is a function of time, $t$." But with "$x_{m,n}$" (as opposed to the O&S way "$x_m[n]$") there is nothing, other than order, differentiating discrete time from the "channel" number. Add another dimension (such as the 2-dim pixel radiance as a function of time) and you have a worser mess:
$$ x_{r,c}[n] \qquad \text{vs.} \qquad x_{r,c,n} $$
$r$ is row number, $c$ is column number, and $n$ is discrete-time.
So with this notation, there is a parity between a vector of continuous-time (a.k.a. "analog") signals $x_m(t)$ and discrete-time (a.k.a. "digital") signals $x_m[n]$. So, likely, whatever relationship one might see between the various analog signals $x_m(t)$ in a multi-conductor cable, I might expect to see between the various elements of the digital vector signal $x_m[n]$ and sampling would be no different than with a single-dimensional signal
$$ x_m[n] \triangleq x_m(t)\bigg|_{t=nT} \qquad \qquad T=\frac{1}{f_\mathrm{s}} $$
So this provides for a consistency of notation along with a way to differentiate arguments that must be integers whereas whatever is contained within parenths $f\big( \cdot \big)$ is considered to have no such restriction (could be a real or complex argument). That is, to me, helpful.
So, if it's a very old DSP paper (pre-1978, perhaps), the notation you would see would almost certainly be $x_n$ for discrete-time signals and the DFT would be $X_k$ for discrete-frequency. But this has evolved to
$$\begin{align} X[k] &\triangleq \sum\limits_{n=0}^{N-1} x[n] e^{-j 2 \pi \frac{nk}{N}} \\ \\ x[n] &= \frac{1}{N} \sum\limits_{k=0}^{N-1} X[k] e^{+j 2 \pi \frac{nk}{N}} \\ \end{align}$$
and EEs will use "$j$", instead of "$i$" for the imaginary unit.
Math folks might use this notation:
$$\begin{align} \hat{f}_k &\triangleq \frac{1}{\sqrt{n}} \sum\limits_{j=0}^{n-1} f_j \, e^{-i 2 \pi \frac{jk}{n}} \\ \\ f_j &= \frac{1}{\sqrt{n}} \sum\limits_{k=0}^{n-1} \hat{f}_k \, e^{+i 2 \pi \frac{jk}{n}} \\ \end{align}$$
- 20,661
- 4
- 38
- 76
-
1You should really put commas in your multiple subscripts to distinguish them from products. – Cedron Dawg Jul 07 '19 at 02:54
-
-
1let's just say that subscripts are not always identical to a discrete argument in square brackets. i don't mind seeing math in the argument of a continuous-time or discrete-time functions. i.e. $$ x\big[\lfloor t/T \rfloor\big] $$ but i don't wanna see math done in the actual subscripts. they should simply be integers (or integer variables) and nothing else. – robert bristow-johnson Jul 07 '19 at 03:00
-
1So says the man who laid down $c_{N/2}$ just yesterday. Tee-hee. Anyway, something like $Y_{2n}$ is much clearer as $Y_{2,n}$ if that is what is really meant. Crufty or crafty, you decide. Oh, and I'm not going to get into a long discussion about this in comments, either. ;-) – Cedron Dawg Jul 07 '19 at 03:21
-
1
-
1
-
Very interesting. To add to the confusion, the meaning of the number in $y[n]$, which is already confusing, is remotely related to the meaning of the number in $\delta[n-4]$. It's actually difficult to decode what the indices in the FIR formula really mean: $h[n]=\sum_{k=0}^{M}b_{k}\delta[n-k]$, and how many different sequences are actually involved in this convolution which looks like a simple product. – mins Feb 15 '23 at 10:26
Based on Electrical Engineering use of DSP notation,
$y(k)$ indicates a continous argument function $y(\cdot)$ evaluated at an integer argument $k$ (letters $i,j,k,l,m,n$ are preferred for integer variables, unless otherwise explicitly stated)
$y[n]$ indicates a discrete argument function, a sequence, $y[\cdot]$ evaluated at its integer index $n$. Mathematically, this can be considered as the $n+1$ st element of the sequence $y[n]$ (assuming $n$ starts from $0$), but that's not the case in DSP as integer $n$ ranges from $-\infty$ to $\infty$.
- 28,152
- 3
- 24
- 50
-
@robertbristow-johnson hmm what's the common convention ? Do I know it too ? may be you should edit... – Fat32 Jul 06 '19 at 20:18
-
what i meant by the common mathematical convention is $y_n$ instead of $y[k]$ or $y(n)$. – robert bristow-johnson Jul 07 '19 at 04:02
-
@robertbristow-johnson your answer is more complete and historically relevant of course. I assumed no comprehensive treatment of mathematical subscript and superscript notation and its link to premature DSP; which is merely a convention. The question was about y(k) and y[n] and I just left it there... Still many authors (especially in Probability, Statistics, Information Theory, Coding, Communication etc), prefer $x_n$ instead of $x[n]$ to refer to the elements of a vector / sequence. As long as clear from the context (which should be) then there's no problem to use any convention. – Fat32 Jul 07 '19 at 10:55
-
1A small observation that helps me distinguish the usage case is that parentheses symbol ( ) is curved, and 'continuous' in shape, while brackets [ ] are sharp-edged, for 'discrete' function mapping. – Bryan W Jan 27 '20 at 05:57
-
1@BryanW yes that's (possibly) the very reason of selecting $[~]$ for discrete time sequences... – Fat32 Jan 27 '20 at 19:06
