>but my mind has gone blank! > >The output of an FIR filter is say s(k) = X'W(k) > >where X is the input vector and W(k) the weight vector. This isconvolving the two vectors X and W to give a scalar s(k) ie the dot product of two vectors.> >However, we know that convolving a vector of dimension n with another oneof dimension m gives an output like multiplying two polynomials and is of dimension n+m-1 so where has the other terms gone..>If I understood you, it could be you are comparing convolution of two finite streams with that of filtering(coefficients stream and data stream). It is true that convolving two finite streams of length n & m results in vector of length n+m-1. However in the case of filtering, the convolution is between the finite coefficient set and running data. The output rises up from zero state and indeed if you stop your data then you do get the m+n-1 length as it tails back towards zero. Though some filter functions may ignore the tail samples that head towards zero. Kadhiem
A daft question
Started by ●August 13, 2012
Reply by ●August 14, 20122012-08-14
Reply by ●August 15, 20122012-08-15
On Aug 14, 2:11=A0pm, Randy Yates <ya...@digitalsignallabs.com> wrote:> Dave <dspg...@netscape.net> writes: > > So to get the convolution you need to think about how the content of > > the vector W(k) changes at each value of k i.e. you actually have n > > +m-1 different W vectors. > > Why would the weight vector change at all? > -- > Randy Yates > Digital Signal Labshttp://www.digitalsignallabs.comFrom the notation in the original post - the X vector is the input data vector - since it isn't given an index I'm assuming it is constant. As for W(k), if it doesn't vary with the index (k) then it would be constant too - meaning s(k) doesn't depend on k at all and the output would be constant for all k. Trying working the equation with a simple input data vector, and for a filter just use a simple impulse. Then to get the output you need W(0) =3D [1 0 0 0 0 ...]' then for W(1)=3D[ 0 1 0 0 0 ...]' and so on. Cheers, Dave
Reply by ●August 15, 20122012-08-15
Dave <dspguy2@netscape.net> writes:> On Aug 14, 2:11 pm, Randy Yates <ya...@digitalsignallabs.com> wrote: >> Dave <dspg...@netscape.net> writes: >> > So to get the convolution you need to think about how the content of >> > the vector W(k) changes at each value of k i.e. you actually have n >> > +m-1 different W vectors. >> >> Why would the weight vector change at all? >> -- >> Randy Yates >> Digital Signal Labshttp://www.digitalsignallabs.com > > From the notation in the original post - the X vector is the input > data vector - since it isn't given an index I'm assuming it is > constant. > > As for W(k), if it doesn't vary with the index (k) then it would be > constant too - meaning s(k) doesn't depend on k at all and the output > would be constant for all k. > > Trying working the equation with a simple input data vector, and for a > filter just use a simple impulse. Then to get the output you need W(0) > = [1 0 0 0 0 ...]' then for W(1)=[ 0 1 0 0 0 ...]' and so on.Typically the weight vector is fixed and the data "flows through" the input vector: w = [w_0 w_1 w2 ... w_(N - 1)] x(k) = [x[k] x[k - 1] x[k - 2] ... x[k - N + 1]] so that y(k) = x(k).w = x'(k) * w, x real, where "." is the dot product operator and * is standard matrix multiplication. -- Randy Yates Digital Signal Labs http://www.digitalsignallabs.com
Reply by ●August 15, 20122012-08-15
Randy Yates <yates@digitalsignallabs.com> writes:> Dave <dspguy2@netscape.net> writes: > >> On Aug 14, 2:11 pm, Randy Yates <ya...@digitalsignallabs.com> wrote: >>> Dave <dspg...@netscape.net> writes: >>> > So to get the convolution you need to think about how the content of >>> > the vector W(k) changes at each value of k i.e. you actually have n >>> > +m-1 different W vectors. >>> >>> Why would the weight vector change at all? >>> -- >>> Randy Yates >>> Digital Signal Labshttp://www.digitalsignallabs.com >> >> From the notation in the original post - the X vector is the input >> data vector - since it isn't given an index I'm assuming it is >> constant. >> >> As for W(k), if it doesn't vary with the index (k) then it would be >> constant too - meaning s(k) doesn't depend on k at all and the output >> would be constant for all k. >> >> Trying working the equation with a simple input data vector, and for a >> filter just use a simple impulse. Then to get the output you need W(0) >> = [1 0 0 0 0 ...]' then for W(1)=[ 0 1 0 0 0 ...]' and so on. > > Typically the weight vector is fixed and the data "flows through" the > input vector: > > w = [w_0 w_1 w2 ... w_(N - 1)]Correction: w = [w_0 w_1 w2 ... w_(N - 1)]'> > x(k) = [x[k] x[k - 1] x[k - 2] ... x[k - N + 1]]Correction: x(k) = [x[k] x[k - 1] x[k - 2] ... x[k - N + 1]]'> so that > > y(k) = x(k).w > = x'(k) * w, x real, > > where "." is the dot product operator and * is standard matrix > multiplication.And where "'" denotes matrix transpose. -- Randy Yates Digital Signal Labs http://www.digitalsignallabs.com
Reply by ●August 16, 20122012-08-16
On Aug 15, 3:35=A0pm, Randy Yates <ya...@digitalsignallabs.com> wrote:> Dave <dspg...@netscape.net> writes: > > On Aug 14, 2:11=A0pm, Randy Yates <ya...@digitalsignallabs.com> wrote: > >> Dave <dspg...@netscape.net> writes: > >> > So to get the convolution you need to think about how the content of > >> > the vector W(k) changes at each value of k i.e. you actually have n > >> > +m-1 different W vectors. > > >> Why would the weight vector change at all? > >> -- > >> Randy Yates > >> Digital Signal Labshttp://www.digitalsignallabs.com > > > From the notation in the original post - the X vector is the input > > data vector - since it isn't given an index I'm assuming it is > > constant. > > > As for W(k), if it doesn't vary with the index (k) then it would be > > constant too - meaning s(k) doesn't depend on k at all and the output > > would be constant for all k. > > > Trying working the equation with a simple input data vector, and for a > > filter just use a simple impulse. Then to get the output you need W(0) > > =3D [1 0 0 0 0 ...]' then for W(1)=3D[ 0 1 0 0 0 ...]' and so on. > > Typically the weight vector is fixed and the data "flows through" the > input vector: > > =A0 w =3D [w_0 w_1 w2 ... w_(N - 1)] > > =A0 x(k) =3D [x[k] x[k - 1] x[k - 2] ... x[k - N + 1]] > > so that > > =A0 y(k) =3D x(k).w > =A0 =A0 =A0 =A0=3D x'(k) * w, x real, > > where "." is the dot product operator and * is standard matrix multiplica=tion. Randy, Yes I've normally seen the data vector indexed, but that's not the way notation used in the OP. So, my explanation with given based on what the OP gave me. Dave






