# the number of multiplications per second required by the system

Q1. Consider a system implementing a rational sampling rate change by 5/7: for this, we cascade upsampler by 5, a lowpass filter with cutoff frequency π/7 and a downsampler by 7. The lowpass filter is a 99-tap FIR.

Assume that the input works at a rate of 1000 samples per second. What is the number of multiplications per second required by the system? Assume that multiplications by zero do not count and round the number of operations to the nearest integer.

Please tell the approach on how to start this question.

The generic order of sampling rate change is "upsample", "filter", "downsample". That means that we need to run the filter at the upsampled rate, i.e 5000 but given that it is 99tap filter so shall i directly multiply 99*5000=495000. is it okay wrt the asked question or am i missing something

• This question appears to be homework. Complete answers to homework are off-topic, but specific questions about homework are acceptable if they include enough detail. Please edit the question to include more background about what you don't understand. – Marcus Müller Sep 13 at 8:49
• IT WOULD BE A GREAT HELP IF YOU CAN TELL THE APPROACH TO SOLVE THIS QUESTION. – dsp Sep 13 at 9:33
• Hi DSP, your question for approach isn't any more narrow. Explain what you understand, and what exactly you need help with to come up with an approach of your own. (Also, "CAPS LOCK" is the internet way of shouting, and I don't think you meant to shout at me ;) ) – Marcus Müller Sep 13 at 9:36
• sorry sir i do not mean to shout on you – dsp Sep 13 at 9:42
• don't worry, nothing bad happened :) – Marcus Müller Sep 13 at 9:42

Assuming that the 5/7 sample rate converter is implemented in time-domain in its plain generic form in three steps (1-expand by 5, 2-filter by FIR, 3-compress by 7) to produce the output resampled sequence, you will have the following rough number of MACs per second.

Your input (data) rate is given as 1000 samples per second. The expander, will insert 4 zeros in between every sample of input, hence the data rate will be 5000 samples per second after the expander. But among those 5000 samples, 4000 of them will be zeros that you discard in the MAC count, and only 1000 samples are counted for MACs. (1000 is the input rate)

The FIR filter is stated to have 99 taps; I take it 100. So the output for one second of input will require about 100 x 5000 = 500k MACs. But as you have stated, you won't count the zero multiplications with 4000 samples, so the remaning MACs will be 100 x 1000 = 100k MACs per second.

At the third (compression) stage you will retain every 7th sample while throwing away remaining 6 in between, however this does not require a MAC operation, so your total MAC per second is approximately : 100k per second.

This calculation indicates that, if you can find a way to avoid zero-multiplications at the filtering stage, then you can implement a sample rate converter system very efficiently. A multirate polyphase filterbank architecture is the standard means of achieving this. You can also tweak a convolution kernel to produce only the requested samples at the filter output to achieve a similar (or even more) reduction in the MAC per second cost.

• i am not getting it, if we take 99 tap so 1000*99= 99k MAC per second, but wrong result is showing – dsp Sep 14 at 4:37
• for 99 tap wont it be 99000 MAC in total?? – dsp Sep 14 at 4:45
• @dsp IF you read te answer carefully, I have assumed a filter with 100 taps not 99. Now it's your extremely simple duty to find the number of MACs when the filter has 99 taps instead of 100. – Fat32 Sep 14 at 8:41
• but by the way of 99 the answer is not coming. I am getting 99000MAC – dsp Sep 14 at 8:57
• Yes 99000 or 99k MACs is the (rough) answer. What's wrong with it ? – Fat32 Sep 14 at 9:01