It sounds like a very elementary question on system theory but I got quite confused about it, so hopefully you guys can enlighten me.
I'm considering an ideal analog integrator, i.e., a system with transfer function $G(s) = \frac 1s$. I'm aware of the fact that it is marginally stable and cannot be built like that, it's more of a theoretical question really.
The impulse response of the system is a unit-step function $g(t) = \sigma(t)$ (considering one-sided Laplace transform here).
Now, I was wondering what happens if I excite this signal with a cosine function of non-zero frequency $f_0$. First gut feeling: I would expect no blow-up as the cosine oscillates and hence the integrator should give us again a harmonic of the same frequency. The system is linear after all. Also, its transfer function does not have a singularity for any nonzero frequency, so again, no blow-up expected, things should work nicely. However, how to compute it really?
Options I see:
- Time domain. Let's forget the Laplace for a second and just focus on the fact that the impulse response of our ideal integrator is a step function, so all we need to do is convolve with it: $$ \begin{align} y(t) & = \int_{-\infty}^\infty \sigma(\tau) \cos(2\pi f_0 (t-\tau)) {\rm d}\tau \\ & = \int_0^\infty \cos(2\pi f_0 (t-\tau)) {\rm d}\tau \\ & = \left[\frac{-1}{2\pi f_0}\sin(2\pi f_0(t-\tau))\right]_0^\infty \\ & = \frac{1}{2\pi f_0}\left[\sin(2\pi f_0 t) - \lim_{\tau\rightarrow \infty}\sin(2\pi f_0(t-\tau))\right], \end{align}$$ where the first part looks fine but the second part clearly shows that the limit does not exist. So this integral cannot be computed.
- Laplace domain: This one clearly shows why it didn't work: The region of convergence (RoC) for the unit-step function is ${\rm Re}(s)>0$, hence the Laplace transform does not exist on the imaginary axis. Hence our input signal is outside the RoC and we cannot expect a stable output signal. Makes sense theoretically, a little surprising, since one may still expect an integrator to convert a cosine into a sine. I was ready to stop here (indeed I did at first), but then I thought further.
- Fourier domain: in the engineering literature, you'll read that a system with an impuse response $\sigma(t)$ does have a Fourier transform, and it is given by $G(f) = \frac 12 \delta(f) + \frac{1}{\jmath 2\pi f}$. Surprising, since substituting $s = \jmath 2\pi f$ is not allowed here, as the RoC excludes ${\rm Re}(s)=0$. I expect this is where the $\delta(f)$ comes in: it's not a real Fourier transform but a "generalized" one, using distributions (which engineers usually treat in a notoriously sloppy way). Let's believe for a sec that's true, then we can compute our output signal in the Fourier domain: $$Y(f) = \left[ \frac 12 \delta(f) + \frac{1}{\jmath 2\pi f} \right] \cdot \left[ \frac 12 \delta(f-f_0) + \frac 12 \delta(f+f_0)\right] = \frac{1}{\jmath 2\pi f_0} \left[\frac 12 \delta(f+f_0) - \frac 12 \delta(f+f_0)\right]$$ which transforms into $\frac{1}{2\pi f_0} \sin(2\pi f_0(t))$. Whoa! Just like our time-domain approach but now without the diverging limit! What's going on? I'm assuming this one is wrong as it disagrees with the time-domain result and I'm assuming the reason is we're ouside the RoC, but I'm not sure.
The real bummer came when I thought even further. Let's now think of a windowed cosine, i.e., one multiplied with a rectangular window from $0$ to $T$. Now I can clearly compute the integral in time domain (it'll be the windowed sine) and it will clearly agree with what I get via Fourier. Now let $T$ grow: for every finite $T$, this will be true. Now, this drives me nuts: If I have a very long cosine, the integrator spits out a very long sine. But if I have an infinitely long cosine, I cannot even compute any value, even the result for very small $t$ is undefined. What?
I mean, the integrator is causal, it shouldn't be influenced by the signal's content in the very far future, right?
Is all this the result of considering an ideal integrator that cannot be built anyways along with an infinitely long cosine, that doesn't exist anyways? Still, the theory should be consistent, no?
*edit: It seems the problem disappears if I make sure my input signal is causal as well, restricting it to be zero for $t<0$. I'm kind of surprised this is necessary as I always thought that causal systems would take care of this more or less automatically by "not responding" to anything before $t<0$. Is this where I'm wrong (which would mean my time-domain computation is wrong and the system does indeed procude a sine wave as expected)?