# Sampling a Unit step function

I have following two related questions concerning unit step function.

1-I want to sample the following signal. What will be the sample value at t=0? The signal takes 0 time to change from 0 to 1. So I am confused what should be the sample value at t=0: 0 or 1?

2- This signal is having infinite bandwidth (This signal is not possible in real world as all physical systems takes certain time to change its values, but here the value is changing in 0 time ). What is its counterpart in discrete domain (again with infinite bandwidth).

-

1) The value at t = 0 of an ideal step function converges to $\frac{f(0-) + f(0+)}{2}$ at 0 if you approach the question from a Fourier transform perspective (see Fourier transform of a discontinuous function).

2) The analogous function in discrete time is still a unit step defined as: $$u[n] = \begin{cases} 0 & \text{if n < 0} \\ 1 & \text{if n >= 0} \\ \end{cases}$$

The concept of infinite frequency does not convey to discrete time representation. In discrete time, frequency is represented by sequences of complex exponentials rather than continuous complex exponential functions. Complex exponential sequences are not unique for frequencies above 1/2 your discrete time sampling rate so your frequency range is limited to $[0, \frac{f_s}{2}]$, where $f_s$ is your sampling rate.

See sampling theory, the nyquist frequency and a discussion of the discrete Fourier transform for a more detailed discussion.

-
So if I say that a digital signal can never have an infinite band-width (unless I am sampling at infinite rate ).. am I right? – gpuguy Jan 29 '13 at 13:40
I think that is a safe comment to make. Keep in mind that when we say a digital signal, we are talking about a representation in a computer. As soon as you let that thing escape into the real world, you are back to analog theory. For reference, the signal usually escapes via an analog to digital converter where it usually starts out as a pulse amplitude modulated signal which has lots of interesting frequency characteristics. Generally everything but the baseband content is filterd out with a low pass "reconstruction" filter. – user2718 Jan 29 '13 at 14:00
Should read "digtal to analog" converter. I got caught by the edit timeout. – user2718 Jan 29 '13 at 14:06

Strictly speaking you can't "correctly" sample a unit step function. The zero-length transition requires infinite bandwidth which violates the sample theorem. In order to sample it you need to pick a sample rate and that implicitly determines the bandwidth.

You can certainly fill a buffer with ones and zeros but if you were to stream this out over a DAC converter you would find that the result is NOT a unit step but that the bandwidth is limited, the transition is finite and that there likely to be some ringing around the transition region.

In practice you may be able to approximate a unit step by choosing a high enough sample rate and/or by properly low passing an ideal unit step. This can be done by, for example, integrating the impulse response of a the low pass filter. It really depends on your application and what you are planning to do with it.

-