# Frequency response of a system given its block diagram

Given the following block diagram, I am asked to find the frequency response $$H(f)$$ of the system. This is what I have done: The output of the first block is $$j2\pi fX(f)$$, and after going through $$t_0$$, we have $$j2\pi fX(f)e^{-j2\pi t_0 f}$$. Then, the input of the last block is $$j2\pi fX(f)(1-e^{-j2\pi t_0 f})$$ and the resulting output is $$\frac{j2\pi fX(f)(1-e^{-j2\pi t_0 f})}{j2\pi f}=X(f)(1-e^{-j2\pi t_0 f})=Y(f)$$. Finally, we have that $$H(f)=\frac{Y(f)}{X(f)}=1-e^{-j2\pi t_0 f}$$.

I know that my procedure can be written in a more formal way but, in general terms, is it correct? And if I was asked to plot $$|H(f)|$$, one way could be computing the square root of $$|H(f)|^2=(1-e^{-j2\pi t_0 f})(1-e^{j2\pi t_0 f})=2-2\cos(2\pi t_0f)$$, am I wrong?

It helps to have an intuitive view of this filter when confirming the math. The delay and subtract is referred to as a comb filter. A delay line (the $$t_o$$ block) does not change the amplitude of the signal but will change the phase proportional to the frequency of the signal coming in: just picture the difference between a very low frequency sine wave and a high frequency sine wave, shift the two the same amount in time and it should be clear that the phase shift is directly proportional to frequency.
The delay and subtract comb filter will have a null at DC or f=0 (this one is obvious as DC will not have any phase shift when it goes through the delay line, and a constant subtracted from a constant is 0). As the frequency increases to the point where the phase is 180°, the signal will have gain of two since the direct path and the delayed path will be in phase. This occurs when $$f=\frac{1}{2t_o}$$. As the frequency increases further the phase will reach 360° creating a null again at $$f=\frac{1}{t_o}$$, and this pattern repeats for every additional multiply of 180°.
One you take the square root of your result, you will see that this "comb" response is the absolute value of a sine where the pattern extends to $$f = +/-\infty$$: 