# Scaling down IFFT values

**URL:** <https://www.ruby-forum.com/t/scaling-down-ifft-values/232574>\
**Category:** GNU Radio\
**Created:** [October 16, 2014, 1:39pm UTC](https://www.ruby-forum.com/t/scaling-down-ifft-values/232574 "2014-10-16T13:39:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [October 16, 2014, 1:39pm UTC](https://www.ruby-forum.com/t/scaling-down-ifft-values/232574/1 "2014-10-16T13:39:16Z")

</div>

Hi All,

I need to scale down the OFDM transmission signal in time domain, after  
IFFT  
is done, so that, all the values are within the range -1 to 1. But, I  
cant  
simply add one more “scaling” block after cp\_adder in

self.connect(self.preambles, self.ifft, self.cp\_adder, self.scale, self)  
(file: ofdm,py)

as it will scale down the preamble also, leading to non-recognition of  
packet at receiver end.

Any pointer on where should I make the change?

–  
View this message in context:  
[http://gnuradio.4.n7.nabble.com/Scaling-down-IFFT-values-tp50833.html](http://gnuradio.4.n7.nabble.com/Scaling-down-IFFT-values-tp50833.html)  
Sent from the GnuRadio mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![zealdeal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/ecb155/32.png) [@zealdeal](https://www.ruby-forum.com/u/zealdeal)\
**Post date:** [October 16, 2014, 2:45pm UTC](https://www.ruby-forum.com/t/scaling-down-ifft-values/232574/2 "2014-10-16T14:45:57Z")

</div>

Hi you!

> Any pointer on where should I make the change?  
> Yes. Do it before preambling!  
> The inverse dft is a linear operation; it doesn’t really matter whether  
> you scale before or after. Note though that the IFFT as we use it adds a  
> sqrt(length\_of\_fft) factor, so account for that by dividing your scaling  
> factor by it.

Greetings,  
Marcus

---

<div class="post-metadata">

**Author:** ![zealdeal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/ecb155/32.png) [@zealdeal](https://www.ruby-forum.com/u/zealdeal)\
**Post date:** [October 16, 2014, 8:16pm UTC](https://www.ruby-forum.com/t/scaling-down-ifft-values/232574/3 "2014-10-16T20:16:59Z")

</div>

You should probably look at the new OFDM codes. If you see the  
ofdm\_tx.grc example, I think there’s already a scaler in there.

M

---

<div class="post-metadata">

**Author:** ![zealdeal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/ecb155/32.png) [@zealdeal](https://www.ruby-forum.com/u/zealdeal)\
**Post date:** [October 22, 2014, 6:51am UTC](https://www.ruby-forum.com/t/scaling-down-ifft-values/232574/4 "2014-10-22T06:51:10Z")

</div>

Did you mean something like:

self.connect(self.\_pkt\_input, 0), self.scale, (self.preambles,0)) ?

That’s not working as it’s giving itemsize mismatch error!

–  
View this message in context:  
[http://gnuradio.4.n7.nabble.com/Scaling-down-IFFT-values-tp50833p50967.html](http://gnuradio.4.n7.nabble.com/Scaling-down-IFFT-values-tp50833p50967.html)  
Sent from the GnuRadio mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![zealdeal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/ecb155/32.png) [@zealdeal](https://www.ruby-forum.com/u/zealdeal)\
**Post date:** [October 22, 2014, 8:25am UTC](https://www.ruby-forum.com/t/scaling-down-ifft-values/232574/5 "2014-10-22T08:25:08Z")

</div>

Also I tried manually scaling down the output array in  
fft\_vcc\_fftw:work  
function. That has no effect no IFFT output!

–  
View this message in context:  
[http://gnuradio.4.n7.nabble.com/Scaling-down-IFFT-values-tp50833p50968.html](http://gnuradio.4.n7.nabble.com/Scaling-down-IFFT-values-tp50833p50968.html)  
Sent from the GnuRadio mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![zealdeal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/ecb155/32.png) [@zealdeal](https://www.ruby-forum.com/u/zealdeal)\
**Post date:** [October 22, 2014, 11:13am UTC](https://www.ruby-forum.com/t/scaling-down-ifft-values/232574/6 "2014-10-22T11:13:31Z")

</div>

No, I did not mean that.

Ok, this might be a problem: “Scaling”, for me, means “multiplying with  
a scalar value”.  
My suggestion therefore was that you just insert a multiplier before the  
IFFT.

Maybe we’re talking about a different “scaling”?

Greetings,  
Marcus
