# Forum: GNU Radio Time delaying a signal

on 2014-05-12 20:03
```I want to introduce a time delay in a signal received through USRP...I
have used the 'Delay' block but it is not showing any delay...what is
the appropriate block to use??
Can i delay the phase instead? Are time and phase delay equal?```
on 2014-05-12 20:05
```On 05/12/2014 02:02 PM, asad umer wrote:
> I want to introduce a time delay in a signal received through USRP...I
> have used the 'Delay' block but it is not showing any delay...what is
> the appropriate block to use??
> Can i delay the phase instead? Are time and phase delay equal?
>
> _______________________________________________
>
The delay block is in samples.

--
Marcus Leech
Principal Investigator
http://www.sbrac.org```
on 2014-05-12 20:15
`On 5/12/14, Marcus D. Leech <mleech@ripnet.com> wrote:`
on 2014-05-12 20:20
```The delay block works in samples so to get seconds you have to multiply
the
sample rate by the number of seconds you want to be delayed by.

Mike```
on 2014-05-12 20:20
```On 05/12/2014 02:14 PM, asad umer wrote:
>
>> so there is no exclusive block for this purpose in GRC??
A delay in samples is a delay in time:

1 sample == 1/sample-rate  seconds  of delay

--
Marcus Leech
Principal Investigator
http://www.sbrac.org```
on 2014-05-12 20:21
```Well, not that I'm aware of.
However, FFT, multiplication with a signal source, IFFT is not really
hard
to do, and it's what a time shift mathematically is.

Greetings,
Marcus```
on 2014-05-12 20:24
```On 05/12/2014 02:19 PM, Marcus Müller wrote:
> Well, not that I'm aware of.
> However, FFT, multiplication with a signal source, IFFT is not really
> hard to do, and it's what a time shift mathematically is.
>
> Greetings,
> Marcus
Also, a phase-shift is just a complex multiply by:

complex(cos(ang),sin(ang))

That's how I do manual phase correction in the interferometer support in
simple_ra

--
Marcus Leech
Principal Investigator
http://www.sbrac.org```
on 2014-05-12 20:29
```To shift just the phase you can use the 'Complex To Float' block in GRC
which separates the stream into real and imaginary components.  After
adding the delay block in line with the imaginary component you can then
recombine the stream by using the 'Float To Complex' block.

Mike

--
Mike Jameson M0MIK BSc MIET
Email: mike@scanoo.com
Web: http://scanoo.com```
on 2014-05-13 07:15
```I am also  using the delay block in the way u have mentioned but the
signal
in scope doesn't act accordingly ,it remains in phase with the
original...```
on 2014-05-13 10:08
```On 12.05.2014 20:19, Marcus Mller wrote:
> Well, not that I'm aware of.
> However, FFT, multiplication with a signal source, IFFT is not really
> hard to do, and it's what a time shift mathematically is.

Careful... if you do that on a stream, you have to keep track of phases.
I know Marcus knows this -- consider this a "don't do this at home
unless you know what you're doing" :)

Martin```
on 2014-05-13 10:09
```On 13.05.2014 07:14, asad umer wrote:
> I am also  using the delay block in the way u have mentioned but the
> signal in scope doesn't act accordingly ,it remains in phase with the
> original...

That's unlikely. Do this:

1) Connect sig source into port 1 of your scope (e.g. create a sine
wave)
2) Connect same sig source to delay
3) Connect delay to port 2 of your scope
4) Choose a good delay that's not multiples of your "wave length"
5) Et voil, phase shift.

M```