Group Delay of Mulitrate system how do I find the group delay of multirate system.(sample rate converter) , IIR non-linear phase filter
Say decimation by 2 (with lpf) = tf1(num,den)
then again decimation by 2 (with lpf) = tf2(num,den)
In total decimation by 4.
i can do the inidividual stages
gd1 = grpdelay(tf1,fvec,Fs)
gd2 = grpdelay(tf2,fvec,Fs/2)
but how do i find the combined one of the entire system
can two group delays be added ?
Edited :
Assuming the can be added, is the following scaling inside and outside the grpdelay function correct ?
gd1 = grpdelay(tf1,fvec,Fs)/Fs/2 % converting from samples to seconds
gd2 = grpdelay(tf2,fvec,Fs/2)/Fs/4
Then we can plot it
plot(fvec/,gd1+gd2);
xlabel('Freq MHz');
ylabel('Group Delay (s)');
If the group delay values you get are in seconds (rather than samples) then yes, you can essentially add the two group delays.
You can verify this by feeding an impulse padded with zeros into your system. You will get your filter response, which is then decimated and feed into your second stage. The second stage will also then apply it's filter and do it's decimation. Where the peak is in your output response is (relative to where the impulse is) will correspond to the group delay - this is of course assuming your filters have linear phase.
This is essentially determining an impulse response for your overall system, but your system is linear but it is not time invariant i.e. delaying your input by a sample will produce a different output not a delayed one, so it really isn't an &quot;Impulse Response&quot;.