# how to add delay to a signal

72 views (last 30 days)
PChoppala on 17 Jan 2012
Hi
I have a small query. Can you help me to add delay to a signal s=randn(1,100);
But the delay is given in time domain, as x(t)=s(t-D), where I am assuming s=randn(1,100) to be discrete
Thanks
P

Show 1 older comment
PChoppala on 17 Jan 2012
Walter Roberson on 17 Jan 2012
I did not say it was a duplicate, I said it closely related. It provides context for this question, which is not exactly the same.
PChoppala on 18 Jan 2012
Okay, can you help me out with this?
I loaded an audio file using
hfile = 'handel.wav';
1. Is 'y' a broad band signal? It is discrete and has some 7000 samples
2. and then I need to add a delay of 100ns to that signal. How can i do that in Matlab? I was assuming Ns=Fs*100ns and x=y(Ns:length(Ns)), is that right?
Cheers

Honglei Chen on 17 Jan 2012
If your D is an integer multiple of the sampling frequency, then all you need to do is adding 0 in front of the signal. However, if D is not an integer multiple of the sampling frequency, then in addition to the zero prefixing, you also need to apply a fractional delay filter to the signal.
doc fdesign.fracdelay

PChoppala on 17 Jan 2012
Hi
Well, 'D' in my case is the delay given in terms of distance.
For example D = (sqrt(10)-sqrt(9))/340.
It is a very small value but given in terms of time 't'. Can you please guide me now?
Thanks
Walter Roberson on 17 Jan 2012
doc fdesign.fracdelay

Walter Roberson on 17 Jan 2012
s = randn(1,100)
will only be discrete down to the level of the distance between representable binary floating point numbers. In particular, if I recall correctly, it is not restricted to being an integer multiple of 2^(-53) the way that the uniform random generator is. Unfortunately this is a point I have been unable to find documented in any current release (since RandStream was introduced, the documentation about what the random number generators' output has gone downhill, in my opinion.)

Walter Roberson on 18 Jan 2012
I looked around the 'net to find the definition of broadband signal. I found that the term does not have any specific meanings -- e.g., there is no limit point such as (to make up a figure) 8.46 megahertz above which the signal is considered "broadband".
The definitions I found were in terms of whether the signal exceeded the bandwidth of whatever filter was in place.
With that definition, I would be forced to say that unless one was given external information about the filter being used, that any signal defined by its samples and signal sampled to a finite time would have to be considered to be sampled to the Nyquist Frequency, that the Nyquist Frequency could be considered the filter bandwidth, and thus that unless given that external information, any signal defined by its samples and sampled to a finite time would, by definition, be not a broadband signal.
A statement that a signal was periodic would imply that there is a "true" signal beyond what was sampled and so that the signal was not defined by its samples and so might potentially be broadband. But not every signal defined as periodic but finitely sampled is broadband; for example a sine wave is not broadband.
Knowing that signals are pulses or square-waves or triangle waves are examples of signals for which there is a "true" signal beyond what was sampled (they require infinite bandwidth), and yet clearly such signals need not be periodic.
So again: if you are given a filter bandwidth, or if you are given a knowledge that a signal has information beyond what was sampled, then you might be dealing with a broadband signal. But if the signal is defined by a finite list of samples (such as your signal is) then the definition of "broadband" appears to me to indicate that such a signal could never be considered broadband.