From: Darren Brown on 20 Mar 2010 07:01 I want to write a program in matlab to simulate a discrete feed forward circuit with 2 coefficients and then 3 coefficients. The first coefficient represents zero delay. The circuit needs to accept any size input. I am new to signal processing using matlab, I would appreciate any help and information that will put me on the right track.
From: Wayne King on 20 Mar 2010 09:00 "Darren Brown" <darrenabrown(a)msn.com> wrote in message <ho29th$7ag$1(a)fred.mathworks.com>... > I want to write a program in matlab to simulate a discrete feed forward circuit with 2 coefficients and then 3 coefficients. The first coefficient represents zero delay. The circuit needs to accept any size input. > > I am new to signal processing using matlab, I would appreciate any help and information that will put me on the right track. Hi Darren, when you say a feedforward circuit with 2 coefficients and then 3, are you simply saying that you have a cascade of two LTI systems where the output of one is the input to the other? So you have: x[n] is the input y1[n]=\sum_{k=0}^{1} b1[k] x[n-k] and then y2[n]=\sum_{k=0}^{2} b2[k] y1[n-k] If that is the case, there are many ways to do this. One way is to create dfilt objects for both of your FIR filters, dfilt.dffir for example and then cascade them using dfilt.cascade. You can then invoke the filter method on your input using the dfilt.cascade object. Wayne
From: darren on 20 Mar 2010 12:00 "Wayne King" <wmkingty(a)gmail.com> wrote in message <ho2gso$icn$1(a)fred.mathworks.com>... > "Darren Brown" <darrenabrown(a)msn.com> wrote in message <ho29th$7ag$1(a)fred.mathworks.com>... > > I want to write a program in matlab to simulate a discrete feed forward circuit with 2 coefficients and then 3 coefficients. The first coefficient represents zero delay. The circuit needs to accept any size input. > > > > I am new to signal processing using matlab, I would appreciate any help and information that will put me on the right track. > > Hi Darren, when you say a feedforward circuit with 2 coefficients and then 3, are you simply saying that you have a cascade of two LTI systems where the output of one is the input to the other? > > So you have: x[n] is the input > y1[n]=\sum_{k=0}^{1} b1[k] x[n-k] > and > then > y2[n]=\sum_{k=0}^{2} b2[k] y1[n-k] > > > If that is the case, there are many ways to do this. One way is to create dfilt objects for both of your FIR filters, dfilt.dffir for example and then cascade them using > dfilt.cascade. You can then invoke the filter method on your input using the dfilt.cascade object. > > Wayne Wayne I have to write a matlab program using basic programming constructs that simulates a discrete feedforward circuit with 2 coefficients and then 3 coefficients use a = 0.3,0.4 and a=0.1,0.4,0.3. Assume the first coefficient represents zero delay. The circuit should accept any size input. This is all the information I have. I am new to this subject while I have done some reading on FIR I do not believe that this is what I have to do. I think that I have to write the program so that y(n)=x(n)+x(n-1). If I am correct x(n) is the signal with zero delay and x(n-1) is the delay.
From: Wayne King on 21 Mar 2010 08:39 "darren " <darrenabrown(a)msn.com> wrote in message <ho2rel$kuh$1(a)fred.mathworks.com>... > "Wayne King" <wmkingty(a)gmail.com> wrote in message <ho2gso$icn$1(a)fred.mathworks.com>... > > "Darren Brown" <darrenabrown(a)msn.com> wrote in message <ho29th$7ag$1(a)fred.mathworks.com>... > > > I want to write a program in matlab to simulate a discrete feed forward circuit with 2 coefficients and then 3 coefficients. The first coefficient represents zero delay. The circuit needs to accept any size input. > > > > > > I am new to signal processing using matlab, I would appreciate any help and information that will put me on the right track. > > > > Hi Darren, when you say a feedforward circuit with 2 coefficients and then 3, are you simply saying that you have a cascade of two LTI systems where the output of one is the input to the other? > > > > So you have: x[n] is the input > > y1[n]=\sum_{k=0}^{1} b1[k] x[n-k] > > and > > then > > y2[n]=\sum_{k=0}^{2} b2[k] y1[n-k] > > > > > > If that is the case, there are many ways to do this. One way is to create dfilt objects for both of your FIR filters, dfilt.dffir for example and then cascade them using > > dfilt.cascade. You can then invoke the filter method on your input using the dfilt.cascade object. > > > > Wayne > > Wayne I have to write a matlab program using basic programming constructs that simulates a discrete feedforward circuit with 2 coefficients and then 3 coefficients use a = 0.3,0.4 and a=0.1,0.4,0.3. Assume the first coefficient represents zero delay. The circuit should accept any size input. > > This is all the information I have. I am new to this subject while I have done some reading on FIR I do not believe that this is what I have to do. I think that I have to write the program so that y(n)=x(n)+x(n-1). If I am correct x(n) is the signal with zero delay and x(n-1) is the delay. Hi Darren, y(n)=x(n)+x(n-1) is an FIR filter with coefficients [1 1], so you have two FIR filters, b1=[0.3 0.4] and b2=[0.1 0.4 0.3]. Write out the constant coefficient linear difference equations that represent your filters. You should understand what happens when you convolve an input with a FIR filter and then convolve the output of that operation with another FIR filter. Look at the help for filter: >>doc filter The advice I gave you in the first post is one way to do it. Wayne
|
Pages: 1 Prev: Problems using fmincon Next: image processing- correlation map |