# 0.5 Programs for circular convolution

 Page 1 / 1

## Programs for circular convolution

To write a program that computes the circular convolution of $h$ and $x$ using the bilinear form Equation 24 in Bilinear Forms for Circular Convolution we need subprograms that carry out the action of $P$ , ${P}^{t}$ , $R$ , ${R}^{t}$ , $A$ and ${B}^{t}$ . We are assuming, as is usually done, that $h$ is fixed and known so that $u={C}^{t}{R}^{-t}PJh$ can be pre-computed and stored. To compute these multiplicative constants $u$ we need additional subprograms to carry out the action of ${C}^{t}$ and ${R}^{-t}$ but the efficiency with which we compute $u$ is unimportant since this is done beforehand and $u$ is stored.

In Prime Factor Permutations we discussed the permutation $P$ and a program for it pfp() appears in the appendix. The reduction operations $R$ , ${R}^{t}$ and ${R}^{-t}$ we have described in Reduction Operations and programs for these reduction operations KRED() etc, also appear in the appendix. To carry out the operation of $A$ and ${B}^{t}$ we need to be able to carry out the action of ${A}_{{d}_{1}}\otimes \cdots \otimes {A}_{{d}_{k}}$ and this was discussed in Implementing Kronecker Products Efficiently . Note that since $A$ and ${B}^{t}$ are block diagonal, each diagonal block can be done separately.However, since they are rectangular, it is necessary to be careful so that the correct indexing is used.

To facilitate the discussion of the programs we generate, it is useful to consider an example.Take as an example the 45 point circular convolution algorithm listed in the appendix.From Equation 19 from Bilinear Forms for Circular Convolution we find that we need to compute $x={P}_{9,5}x$ and $x={R}_{9,5}x$ . These are the first two commands in the program.

We noted above that bilinear forms for linear convolution, $\left({D}_{d},{E}_{d},{F}_{d}\right)$ , can be used for these cyclotomic convolutions.Specifically we can take ${A}_{{p}^{i}}={D}_{\phi \left({p}^{i}\right)}$ , ${B}_{{p}^{i}}={E}_{\phi \left({p}^{i}\right)}$ and ${C}_{{p}^{i}}={G}_{{p}^{i}}{F}_{\phi \left({p}^{i}\right)}$ . In this case Equation 20 in Bilinear Forms for Circular Convolution becomes

$A=1\oplus {D}_{2}\oplus {D}_{6}\oplus {D}_{4}\oplus \left({D}_{2}\otimes {D}_{4}\right)\oplus \left({D}_{6}\otimes {D}_{4}\right).$

In our approach this is what we have done. When we use the bilinear forms for convolution givenin the appendix, for which ${D}_{4}={D}_{2}\otimes {D}_{2}$ and ${D}_{6}={D}_{2}\otimes {D}_{3}$ , we get

$A=1\oplus {D}_{2}\oplus \left({D}_{2}\otimes {D}_{3}\right)\oplus \left({D}_{2}\otimes {D}_{2}\right)\oplus \left({D}_{2}\otimes {D}_{2}\otimes {D}_{2}\right)\oplus \left({D}_{2}\otimes {D}_{3}\otimes {D}_{2}\otimes {D}_{2}\right)$

and since ${E}_{d}={D}_{d}$ for the linear convolution algorithms listed in the appendix,we get

$B=1\oplus {D}_{2}^{t}\oplus \left({D}_{2}^{t}\otimes {D}_{3}^{t}\right)\oplus \left({D}_{2}^{t}\otimes {D}_{2}^{t}\right)\oplus \left({D}_{2}^{t}\otimes {D}_{2}^{t}\otimes {D}_{2}^{t}\right)\oplus \left({D}_{2}^{t}\otimes {D}_{3}^{t}\otimes {D}_{2}^{t}\otimes {D}_{2}^{t}\right).$

From the discussion above, we found that the Kronecker products like ${D}_{2}\otimes {D}_{2}\otimes {D}_{2}$ appearing in these expressions are best carried out by factoring the product in to factorsof the form ${I}_{a}\otimes {D}_{2}\otimes {I}_{b}$ . Therefore we need a program to carry out $\left({I}_{a}\otimes {D}_{2}\otimes {I}_{b}\right)x$ and $\left({I}_{a}\otimes {D}_{3}\otimes {I}_{b}\right)x$ . These function are called ID2I(a,b,x) and ID3I(a,b,x) and are listed in the appendix. The transposed form, $\left({I}_{a}\otimes {D}_{2}^{t}\otimes {I}_{b}\right)x$ , is called ID2tI(a,b,x) .

To compute the multiplicative constants we need ${C}^{t}$ . Using ${C}_{{p}^{i}}={G}_{{p}^{i}}{F}_{\phi \left({p}^{i}\right)}$ we get

$\begin{array}{ccc}\hfill {C}^{t}& =& 1\oplus {F}_{2}^{t}{G}_{3}^{t}\oplus {F}_{6}^{t}{G}_{9}^{t}\oplus {F}_{4}^{t}{G}_{5}^{t}\oplus \left({F}_{2}^{t}{G}_{3}^{t}\otimes {F}_{4}^{t}{G}_{5}^{t}\right)\oplus \left({F}_{6}^{t}{G}_{9}^{t}\otimes {F}_{4}^{t}{G}_{5}^{t}\right)\hfill \\ & =& 1\oplus {F}_{2}^{t}{G}_{3}^{t}\oplus {F}_{6}^{t}{G}_{9}^{t}\oplus {F}_{4}^{t}{G}_{5}^{t}\oplus \left({F}_{2}^{t}\otimes {F}_{4}^{t}\right)\left({G}_{3}^{t}\otimes {G}_{5}^{t}\right)\oplus \left({F}_{6}^{t}\otimes {F}_{4}^{t}\right)\left({G}_{9}^{t}\otimes {G}_{5}^{t}\right).\hfill \end{array}$

The Matlab function KFt carries out the operation ${F}_{{d}_{1}}\otimes \cdots {F}_{{d}_{K}}$ . The Matlab function Kcrot implements the operation ${G}_{{p}_{1}^{{e}_{1}}}\otimes \cdots {G}_{{p}_{K}^{{e}_{K}}}$ . They are both listed in the appendix.

## Common functions

By recognizing that the convolution algorithms for different lengths share a lot of the same computations, it is possibleto write a set of programs that take advantage of this. The programs we have generated call functions from a relativessmall set. Each program calls these functions with different arguments,in differing orders, and a different number of times. By organizing the program structure in a modular way,we are able to generate relatively compact code for a wide variety of lengths.

In the appendix we have listed code for the following functions, from which we create circular convolution algorithms.In the next section we generate FFT programs using this same set of functions.

• The Matlab function pfp implements this permutation of Prime Factor Permutations . Its transpose is implemented by pfpt .
• The Matlab function KRED implements the reduction operations of Reduction Operations . Its transpose is implemented by tKRED . Its inverse transpose is implemented by itKRED and this function is used only for computing the multiplicative constants.
• ID2I and ID3I are Matlab functions for the operations $I\otimes {D}_{2}\otimes I$ and $I\otimes {D}_{3}\otimes I$ . These linear convolution operations are also described in the appendixBilinear Forms for Linear Convolution.' ID2tI and ID3tI` implement the transposes, $I\otimes {D}_{2}^{t}\otimes I$ and $I\otimes {D}_{3}^{t}\otimes I$ .

## Operation counts

[link] lists operation counts for some of the circular convolution algorithms we have generated.The operation counts do not include any arithmetic operations involved in the index variable or loops.They include only the arithmetic operations that involve the data sequence $x$ in the convolution of $x$ and $h$ .

The table in [link] for the split nesting algorithm gives very similar arithmetic operation counts.For all lengths not divisible by 9, the algorithms we have developed use the same number of multiplications and the same number or fewer additions.For lengths which are divisible by 9, the algorithms described in [link] require fewer additions than do ours. This is because the algorithms whose operation counts aretabulated in the table in [link] use a special ${\Phi }_{9}\left(s\right)$ convolution algorithm. It should be noted, however, that the efficient ${\Phi }_{9}\left(s\right)$ convolution algorithm of [link] is not constructed from smaller algorithms using the Kronecker product, as is ours.As we have discussed above, the use of the Kronecker product facilitates adaptation to special computer architectures andyields a very compact program with function calls to a small set of functions.

 N muls adds N muls adds N muls adds N muls adds 2 2 4 24 56 244 80 410 1546 240 1640 6508 3 4 11 27 94 485 84 320 1712 252 1520 7920 4 5 15 28 80 416 90 380 1858 270 1880 9074 5 10 31 30 80 386 105 640 2881 280 2240 9516 6 8 34 35 160 707 108 470 2546 315 3040 13383 7 16 71 36 95 493 112 656 2756 336 2624 11132 8 14 46 40 140 568 120 560 2444 360 2660 11392 9 19 82 42 128 718 126 608 3378 378 3008 16438 10 20 82 45 190 839 135 940 4267 420 3200 14704 12 20 92 48 164 656 140 800 3728 432 3854 16430 14 32 170 54 188 1078 144 779 3277 504 4256 19740 15 40 163 56 224 1052 168 896 4276 540 4700 21508 16 41 135 60 200 952 180 950 4466 560 6560 25412 18 38 200 63 304 1563 189 1504 7841 630 6080 28026 20 50 214 70 320 1554 210 1280 6182 720 7790 30374 21 64 317 72 266 1250 216 1316 6328 756 7520 38144

It is possible to make further improvements to the operation counts given in [link] [link] , [link] . Specifically, algorithms for prime power cyclotomic convolutionbased on the polynomial transform, although more complicated, will give improvements for the longer lengths listed [link] , [link] . These improvements can be easily included in the code generatingprogram we have developed.

how do they get the third part x = (32)5/4
can someone help me with some logarithmic and exponential equations.
20/(×-6^2)
Salomon
okay, so you have 6 raised to the power of 2. what is that part of your answer
I don't understand what the A with approx sign and the boxed x mean
it think it's written 20/(X-6)^2 so it's 20 divided by X-6 squared
Salomon
I'm not sure why it wrote it the other way
Salomon
I got X =-6
Salomon
ok. so take the square root of both sides, now you have plus or minus the square root of 20= x-6
oops. ignore that.
so you not have an equal sign anywhere in the original equation?
Commplementary angles
hello
Sherica
im all ears I need to learn
Sherica
right! what he said ⤴⤴⤴
Tamia
what is a good calculator for all algebra; would a Casio fx 260 work with all algebra equations? please name the cheapest, thanks.
a perfect square v²+2v+_
kkk nice
algebra 2 Inequalities:If equation 2 = 0 it is an open set?
or infinite solutions?
Kim
The answer is neither. The function, 2 = 0 cannot exist. Hence, the function is undefined.
Al
y=10×
if |A| not equal to 0 and order of A is n prove that adj (adj A = |A|
rolling four fair dice and getting an even number an all four dice
Kristine 2*2*2=8
Differences Between Laspeyres and Paasche Indices
No. 7x -4y is simplified from 4x + (3y + 3x) -7y
is it 3×y ?
J, combine like terms 7x-4y
how do you translate this in Algebraic Expressions
Need to simplify the expresin. 3/7 (x+y)-1/7 (x-1)=
. After 3 months on a diet, Lisa had lost 12% of her original weight. She lost 21 pounds. What was Lisa's original weight?
what's the easiest and fastest way to the synthesize AgNP?
China
Cied
types of nano material
I start with an easy one. carbon nanotubes woven into a long filament like a string
Porter
many many of nanotubes
Porter
what is the k.e before it land
Yasmin
what is the function of carbon nanotubes?
Cesar
what is nanomaterials​ and their applications of sensors.
what is nano technology
what is system testing?
preparation of nanomaterial
Yes, Nanotechnology has a very fast field of applications and their is always something new to do with it...
what is system testing
what is the application of nanotechnology?
Stotaw
In this morden time nanotechnology used in many field . 1-Electronics-manufacturad IC ,RAM,MRAM,solar panel etc 2-Helth and Medical-Nanomedicine,Drug Dilivery for cancer treatment etc 3- Atomobile -MEMS, Coating on car etc. and may other field for details you can check at Google
Azam
anybody can imagine what will be happen after 100 years from now in nano tech world
Prasenjit
after 100 year this will be not nanotechnology maybe this technology name will be change . maybe aftet 100 year . we work on electron lable practically about its properties and behaviour by the different instruments
Azam
name doesn't matter , whatever it will be change... I'm taking about effect on circumstances of the microscopic world
Prasenjit
how hard could it be to apply nanotechnology against viral infections such HIV or Ebola?
Damian
silver nanoparticles could handle the job?
Damian
not now but maybe in future only AgNP maybe any other nanomaterials
Azam
can nanotechnology change the direction of the face of the world
At high concentrations (>0.01 M), the relation between absorptivity coefficient and absorbance is no longer linear. This is due to the electrostatic interactions between the quantum dots in close proximity. If the concentration of the solution is high, another effect that is seen is the scattering of light from the large number of quantum dots. This assumption only works at low concentrations of the analyte. Presence of stray light.
the Beer law works very well for dilute solutions but fails for very high concentrations. why?
how did you get the value of 2000N.What calculations are needed to arrive at it
Privacy Information Security Software Version 1.1a
Good
Got questions? Join the online conversation and get instant answers!