DSPRelated.com
Forums

Parallel and series connection, what difference it makes

Started by jtp_1960 7 years ago4 replieslatest reply 7 years ago102 views

Hi!

Lets assume you have two 1st order IIR filters:

    [b1 b2 a1 a2]
1 = [ 1 -1 -1 -1] 
2 = [-1 -1 -1  1]

What difference in phase and magnitude responses it makes when you use these filters 

  1. parallelly
  2. in series

?

Meaning does responses become summed, subtracted, etc..

EDIT: Here are the two filters plotted:

filter1-1-1-1_88646.png

filter-1-1-11_66549.png


[ - ]
Reply by kazSeptember 1, 2017

Without math I will use quick matalb commands:

a1 = [1 -1 -1 -1];
a2 = [-1 -1 -1 1];

freqz(1,conv(a1,a2)) %cascade
freqz(1,a1+a2)       %parallel & add results

[ - ]
Reply by jtp_1960September 1, 2017

Your commands give these results in Octave:

Cascade:

kazcasc_4886.png

Parallel:

kazparal_46876.png

When those two filters are used either parallelly or in series, shouldn't I be able to hear the -10dB - -15dB magnitude change showing in plots ... but, I don't hear it (actually, series connection does not change gain, parallel connection boosts gain) so, is what you suggested the right method to measure the differences I'm talking about?

[ - ]
Reply by kazSeptember 1, 2017

according to rules of filter function you need to add initial 1 for IIR as below:

I also realised you are using b,a possibly meaning forward/reverse coeff

b1 = [1 -1];

b2 = [-1 -1];

a1 = [1 -1 -1];
a2 = [1 -1 1];

freqz(conv(b1,b2),conv(a1,a2)) %cascade
freqz(b1+b2,a1+a2)       %parallel & add results


As to your question you need to explain what is your input and how you observe output and what filters you use

[ - ]
Reply by jtp_1960September 1, 2017

This was just a technical question (I'm not EE so ...) but, I also tested by feeding normal audio stream through these filters one at time (both worked as expected (by the plot data got from here)) and when connected in series and parallel (result was different from my own expectation) --> that's why I placed the question).

Actually, both my filters are based on this code:

% 1st order all pass filter
% H(s) = (s/w0 - 1) / (s/w0 + 1) w0 = 2 * pi * f; % Hz to rad/s
b = [w0 -1];
a = [w0 1];

I jus rounded the a and b values because of all coefficients were so close to 1.0.