DSPRelated.com
Forums

Polynomial Multiplication (in Matlab and VHDL)

Started by Unknown September 17, 2007
I'm looking for an efficient way to multiply polynomials.

It's very important to me to maintain a degree of similarity between
my simulation in Matlab and my implementation in VHDL. Suppose I have
polynomials with coefficients represented by the column vectors  X and
Y. My first thought for the Matlab simulation is to  use matrix
multiplication to obtain P=X*Y' and then collect the terms for P as
the sum of the anti-diagonals.

I think with VHDL I can pipeline the matrix multiply and the
collection of the terms (by summing along the anti-diagnonals). But I
was wondering if Matlab has a built-in function that will sum along
the anti-diagnonals for me. I'm sure a built-in would execute much
faster than if I wrote my own.

Does anyone have a suggestion?

Thank you.

Jim wrote:
> I'm looking for an efficient way to multiply polynomials.
Polynomial multiplication is done via convolution. If a,b are the coefficient vectors of your polynomial, then c = conv(a,b) are the coefficients of the product of a and b. If a or b is "long", then you can considerably speed up the convolution using the FFT. Regards, Andor
As Andor pointed out, you're better off with convolution. In VHDL, you
can take advantage of FIR designs that are already optimized in many
libraries if your polynomials have reasonable number of coefficients.
If one set of coefficients are constants, the compiler could do even
better.