I have a beginner-esqe question: all of my DSP literature shows the
IIR Difference Equation as:
y(n) = b(0)x(n) + b(1)x(n-1) + b(2)x(n-2) + ... + a(1)y(n-1) +
a(2)y(n-2) + ...
But then the C code implementations I see are something along the
FeedForwardVariable = (b * x[n]) + (b * x[n-1]) + (b *
FeedBackwardVariable = (a * y[n-1]) + (a * y[n-2]) + (a *
ResultVariable = FeedForwardVariable - FeedBackwardVariable;
The implementation uses a subtraction operation on the feed back
calculations that I don't see in the Difference Equation. Why is that?
I realize I'm setting myself up for a "Duh!!", but I'm really confused
why this is the case.
"Benjamin M. Stocks" <firstname.lastname@example.org> wrote in message
> Hi All,
> I have a beginner-esqe question: all of my DSP literature shows the
> IIR Difference Equation as:
> y(n) = b(0)x(n) + b(1)x(n-1) + b(2)x(n-2) + ... + a(1)y(n-1) +
> a(2)y(n-2) + ...
> But then the C code implementations I see are something along the
> FeedForwardVariable = (b * x[n]) + (b * x[n-1]) + (b *
> FeedBackwardVariable = (a * y[n-1]) + (a * y[n-2]) + (a *
> ResultVariable = FeedForwardVariable - FeedBackwardVariable;
> The implementation uses a subtraction operation on the feed back
> calculations that I don't see in the Difference Equation. Why is that?
> I realize I'm setting myself up for a "Duh!!", but I'm really confused
> why this is the case.
> Thanks much,
y(n) = b(0)x(n) + b(1)x(n-1) + b(2)x(n-2) + ... - [a(1)y(n-1) + a(2)y(n-2) +
y(n) = b(0)x(n) + b(1)x(n-1) + b(2)x(n-2) + ... -a(1)y(n-1) -
a(2)y(n-2) - ...
is the normal expression for the difference equation.
Matlba butterworth IIR filter implementation Hi all,
I want to implement an butterworth low pass filter to filter the DC compone=
nt of a signal inside a PLL - phase locked loop. I am processing sample-by-=
sample. Therefore I have to filter the signal sample by sample (Not the who=
le signal or block by block). I have implemented a filter to filter the who=
le signal. But Im struggling to modify it make it work sample by sample bas=
I highly appreciate if someone can advice me regarding this issue. I have i=
ncluded the code Im using to filter.
[b,a] =3D butter(10, 4*fc/Fs); % 10th Order butterworth filter coefficie...
implementing a difference equation I have this equation:
y(n) = x(n) + 2x(n-1) + x(n-2) + 0.8y(n-1) - 0.64y(n-2)
I have to do the following tasks:
I) Write a MATLAB function that implements the difference equation for the system (assuming null initial conditions).
II) Use your function to calculate the response of the system to d(n-10) (delta function with the impulse located at n = 10). Plot (stem) the resulting output to n = 255.
III) Use your function to obtain the output sequence that results when you use x = cos(pi*n*0.25) as the input. Plot (stem) the resulting output to n = 255.
I have no idea how ...
Implement IIR Filter on FPGA hi people,
I'm designing filter system called IIR filter on the FPGA kit, but it
doesn't work when I implement on FPGA. When i iput the signals, the
output results seem to not get any thing. I do not know whether my
source code is wrong or another reason. The FPGA kit operate normally
with other sources which i loaded in the past.
Can anyone give me some advices to test what parts in my project do
not work or give me some idea to test anything. I am in the mess. I
hope everyone can show me.
I am looking forward hearing from people soon,
Gordon Freeman wrote:
> hi people,
frequency response of iir filter-filtfilt implementation Hi,
Is there a simple way to determine the effective frequency response of the
filtfilt implementation of an IIR bandpass filter ? I wish to confirm if I
am getting twice the attenuation in the stop band as a result of the
forward and backward filtering. I tried using an impulse input and compute
the fft of the impulse response, but the fft doesn't look as expected. Is
this the right way to determine the filter response or is there a
simpler/better way? Please do advice.
On 4 Des, 13:40, "mathew.paul" <paulmathew...@gmail.com> wrote:
Differences between different vendors implementations of std_logic_arith and the like A while ago, someone posted a link to some documents that listed the
different vendors implementations of std_logic_arith, unsigned and
signed. I cant seem to find it now. Anyone have any clues? I think
Mike Treseler posted it.
> A while ago, someone posted a link to some documents that listed the
> different vendors implementations of std_logic_arith, unsigned and
> signed. I cant seem to find it now. Anyone have any clues? I think
> Mike Treseler posted it.
Do you mean the qualis cheat sheets?
Difference Equations I has been using Matlab OdeSolvers to numerically solve differential
equations (Continuous time). However, I'm trying to solve Difference
Equations, but I d�n't know how can i do it in Matlab (Can I use
OdeSolvers to do that?). For example, to solve:
Can anyone help me?
> I has been using Matlab OdeSolvers to numerically solve
> equations (Continuous time). However, I'm trying to solve
> Equations, but I d�n't know how can i do it in Matlab (Can I use
> OdeSolvers to do that?). For ...
Is there a difference between those implementations of compose? I think lisp should have a builtin compose function, but since it
hasn't, you will probably have to write your own.
On the internet I found the following version:
(defun compose (&rest fns)
(let ((fn1 (car (last fns)))
(fns (butlast fns)))
#'(lambda (&rest args)
(reduce #'funcall fns
:initial-value (apply fn1 args))))
But I think it could be easier written as:
(defun compose (&rest funs)
(reduce (lambda (f1 f2)
(lambda (&rest x) (funcall f1 (apply f2 x))))
Implement a simple filter I wish to implement a simple C++ filter that reads from a file byte by byte
and writes to an output files two bytes for each byte read according to some
hardcoded table. I am looking for a very straightforward sample. It is
pratically a binary filter.
Thank you in advance.
"Dario de Judicibus" <email@example.com> wrote...
> I wish to implement a simple C++ filter that reads from a file byte by
> and writes to an output files two bytes for each byte read according to
> hardcoded table. I am looking for a very straightforward sample. It is
IIR filter gain Hi,
I have the current 3rd order IIR filter:
gain = 1789.111562
b = [1 3 3 1];
a = [1 -1.6009450356 0.9414772490 -0.1971027115];
I'm trying to implement this in fixed-point format, using DF1. I don't
think I need to convert to Second-Order-Section as this is not an
The first step was to quantize the coefficients, and I get get by with 12
Now I don't know what to do with this gain. If I do it at the input, I need
to add ~11 LSB to keep decent SNR. If I do it at the output, well I need to
add ~11 MSB or everything starts clipping within t...
Digital Filtering implementation Hi pals !
Jere i am with a maybe very stupid question:
I want to code a real time, equalizer (let's say 10th bands) followed by
a crossover filter, in a digital way.
So.. after having thought a while... i could consider two way to
implement it :
* The first, the "conventionnal way" : usinf normal IIR or FIR filters,
to construct the EQ and Xover. this solution will lead to low delay and
low computing CPU usage (as long as the order of filters are small of
* The other, that i think is better:
To use a FFT on for exemple 512 (for ex) sample and with this, i can
designing iir filter hi,
i have designed a 4th order IIR notch filter of 60Hz using the
fdatool.Since i have to implement the filter in visual basic i had to
quantize it. but the frequency response of the quantised filter and
the reference filter wasn't matching so i had to use the second order
sections of of the filter after which the frequency response was
perfect.Now the problem is after applying the sections how do i
implement the coefficients as i am not getting the concept of
sections properly....how do i implemenet them in the transfer
function as coefficients exported to the workspace shows two section...
saturation in iir filter Hi all,
i am currently implementing an iir filter on a arm processor that doesn'
have a fractionnal multiplication.
As i have read on this forum i divided my filter coefficient (bo b1 b2 a
a2) by 2 if they are >1 to be able to perform a q1.15 by q1.1
the results of multiplications are therefore q2.30.
I accumulate those multiplication in a 64 bit register , multiply th
result by 2 to compensate for coeffs normalization
ie: accum = b0\2*sample + b1\2*x[n-1] + b2\2*x[n-2]- a1\2*y[n-1]
accum += accum; (to compensate for dividing by 2 the coefficient)
then i r...
PROBLEMS WITH IIR FILTER GreetingS Folks,
This is regarding the 4TH ORDER low pass elliptic II
filter which I have been working on for quiet some time now and als
unfortunately has been biting my bottom hard.To start with I had a .wa
file from which I happened to have succesfully read the discrete dat
values.For the coefficients I made use of the ellip command and hard code
those values into my source code which happens to be in C.The compiler I a
working on is VC++.The formulae I made use of was the difference equatio
formulae or the DIRECT FORM as it is popularly known.
Implementing a peaking filter How do I get the signal at pi/3 positions alone from a DFT
spectrum, using a peaking filter? I would like to have the
MATLAB code , for the same, not just the explanation.
Could anyone please help?
notch iir implementation I have a similar problem described by Par in 2005.
(Only different frequencies and sample size).
I have signal of 10000 length that has undesired frequencies:
f=0.0003, 0.0006 (f \in [0 1]) I want to get rid off.
I build notch IIR and apply it.
To test that it works I first created
a synthetic signal (linear sum of harmonics) and apply filter on thi
1. I know that my IIR design is perfect.
2. I also know that to get zero linear phase I apply filter forw and bac
If my synthetic signal is long enough about 50000, I get very goo
in the middle part of the signa...
Notch filter implementation Hii im a novice to matlab and im learning it especially the signal processing part
I've taken a signal and want to eliminate one frequency from it using notch filter.
I've written some code but the filtered output appears to be same s the input!
wo = 50/(1000/2); bw = wo/35;
[b,a] = iirnotch(wo,bw);
Can anyone help me with this??
"vinay " <firstname.lastname@example.org>...
Loop filtering Implementation Hi ,
I am trying to implement loop filtering for a video codec. I am having trouble getting started, any help would be appreciated.
Difference-Differential Equations Hi everybody,
does anyone know if there are routines to determine difference-differential
equations or as also called delay-differential equations? are there also
algorithms available for the system identification of this type of
In article <email@example.com>,
"Timo Reis" <firstname.lastname@example.org> writes:
>does anyone know if there are routines to determine difference-differential
>equations or as also called delay-differential equations? are there also
>algorithms available for the system identification...
IIR Filter Funktion with DSP5416 Hello
I can produce with mathlab the coefficients for IIR Filter
Bandpassfilter. I can export it as h-file. So I get real64_T
NUM[MWSPT] and real64_T DEN[MWSPT_NSEC] arrays
my question is: with the function from DSPLIB iir32(DATA *x,LDATA
*h,DATA *r,LDATA **dbuffer ...) should I filter the input. I can't
understand what should I take as "h" and "dbuffer".
Can I use the coef. from Mathlab, or it's something else?
what is biquads? I haven't found this word in dictionary.
I thank all of you for your help.
email@example.com (Eugene) wrote: