# Query on creating a Transfer function block

**URL:** <https://www.ruby-forum.com/t/query-on-creating-a-transfer-function-block/231725>\
**Category:** GNU Radio\
**Created:** [August 26, 2014, 4:10pm UTC](https://www.ruby-forum.com/t/query-on-creating-a-transfer-function-block/231725 "2014-08-26T16:10:39Z")\
**Posts on this page:** 3\
**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:** [August 26, 2014, 4:10pm UTC](https://www.ruby-forum.com/t/query-on-creating-a-transfer-function-block/231725/1 "2014-08-26T16:10:39Z")

</div>

Hello All,

I want to create a block which takes input of two streams ( Tx1 and Tx2  
)  
and give output of two streams,

o1 = a \* Tx1 + b \* Tx2  
o2 = c \* Tx1 + d \* Tx2,

where a,b,c and d are complex constants.

Can anybody please help on how to realize this block in GNURadio. Any  
pointer towards what functions to use would be helpful. Also, should  
this  
be done at the python level or should a C++ block need to be written?

Regards,  
Sagar

---

<div class="post-metadata">

**Author:** ![Sagar\_Simha](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e5b9ba/32.png) [@Sagar\_Simha](https://www.ruby-forum.com/u/Sagar_Simha)\
**Post date:** [August 26, 2014, 4:25pm UTC](https://www.ruby-forum.com/t/query-on-creating-a-transfer-function-block/231725/2 "2014-08-26T16:25:24Z")

</div>

Hi Sagar,

this can be done in python as well as in C++; performance-wise C++ would  
be most probably advantegous.

But: You can get the same behaviour using existing blocks, by splitting  
each input, multiplication with the matching constant, and adding the  
results up.  
Performance-wise, that would give you all the acceleration available to  
GNU Radio for complex multiplication and addition, split up into  
different blocks,  
allowing for maximum parallelization.  
So to conclude, this should neither be written in C++ nor python, but  
existing functionality should be employed 🙂

If you’re actually looking to build channel models, have look at the  
existing channel models in current GNU Radio versions.

With the best regards,  
Marcus M?ller

---

<div class="post-metadata">

**Author:** ![Sagar\_Simha](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e5b9ba/32.png) [@Sagar\_Simha](https://www.ruby-forum.com/u/Sagar_Simha)\
**Post date:** [August 26, 2014, 4:50pm UTC](https://www.ruby-forum.com/t/query-on-creating-a-transfer-function-block/231725/3 "2014-08-26T16:50:28Z")

</div>

Sagar,

in ‘master’, there’s a block called multiply\_matrix\_cc which will do  
this.

M
