Alex,
to go from real samples to I/Q, you can mix your input signal f(t) with a local oscillator running at a frequency f_LO; for the I component you take the LO waveform with phase=0, i.e. f(t) * cos(2pi * f_LO * t), while for the Q component you take the the LO waveform shifted by 90 degrees, i.e. f(t) * sin(2pi * f_LO * t).
Using the complex exponential notation, which is in my opinion much more convenient, this becomes:
I(t) + jQ(t) = f(t) * exp(j * 2pi * f_LO * t)
Using the standard notation f_s for the sample rate, your input sample sequence can therefore be described as follows:
x[0] = f(0)
x[1] = f(1 / f_s)
x[2] = f(2 / f_s)
...
x[k] = f(k / f_s)
If we select f_LO = f_s / 2, then for the k-th sample at time t_k = k / f_s, we can see that:
I(t_k) + jQ(t_k) = x[k] * exp(j * 2pi * f_s/2 * t_k) = x[k] * exp(j * 2pi * f_s/2 * k / f_s) = x[k] * exp(j * 2pi * k / 2)
and given the periodic nature of the complex exponential (i.e. of cos and sin), we have the following:
for f_LO=f_s/2 -> I + jQ: x[0] + j0, -x[1] + j0, x[2] + j0, -x[3] + j0, x[4] + j0, ...
It is also easy to see what happens if we instead take f_LO = f_s / 4:
for f_LO=f_s/4 -> I + jQ: x[0] + j0, 0 + j*x[1], -x[2] + j0, 0 - j * x[3], x[4] + j0, ...
So in summary in the first case (f_LO = f_s / 2), your I and Q sequences would be:
I: x[0], -x[1], x[2], -x[3], x[4], ....
Q: 0, 0, 0, 0, 0, ...
In the second case (f_LO = f_s / 4), the I and Q sequences would be:
I: x[0], 0, -x[2], 0, x[4], ...
Q: 0, x[1], 0, -x[3], 0, ...
73,
Franco K4VZ