Assume that we have a lot of signal generators that can rotate at 90 degrees or a multiple of 90 degrees per sec. The total signal is defined as the sine of all the signals.
We are sampling this system only at integer seconds, and the problem is how can I generate a pattern of 1, 3, 4 out of this?
So at any sampling time, the signal produced by any of the generators will be of one of the below patterns multiplied by its amplitude (it can be offset by phase, but I am not considering that):
1 0 -1 0 -- a
1 -1 1 1 -- b
1 0 -1 0 -- c (duplicate)
1 1 1 1 -- d
I can come up with a simple solution using linear equations. Assume we have $l$, $m$, $n$ amplitudes for signals $a$, $b$ and $d$ respectively, then:
l + m + n = 1 # at first sampling all signals are 1
-m + n = 3 # at the second sample, a is 0, b is -1 and d is 1
-l + m + n = 4 # at the third sample, a is -1, b is 1, d is 1
Solving this produces:
$l = -\frac{3}{2}$, $m = -\frac{1}{4}$ and $n = \frac{11}{4}$
I was trying to see if I can use the ideas from Fourier Series to calculate this, specifically the method of multiplying with a particular signal, summing them and removing the orthogonal signals to find the coefficient. Here is what I did:
First of all, I assumed that the signal can be represented as a linear combination of the signals $a$, $b$ and $d$.
$$f(t) = la(t) + mb(t) + nd(t)$$
Multiplying both sides with $k(t)$ where $k(t)$ is one of $a$, $b$ and $d$.
$$f(t)k(t) = la(t)k(t) + mb(t)k(t) + nd(t)k(t)$$
Now I can try to solve for $l$ by substituting $k(t)$ as $a(t)$ in the above equation.
$$f(t)a(t) = la(t)a(t) + mb(t)a(t) + nd(t)a(t)$$
I can also sum all the signals and they would total up.
$$\sum_{1}^4f(t)a(t) = \sum_{1}^4(la(t)a(t) + mb(t)a(t) + nd(t)a(t))$$
The orthogonality of the signals would cancel out $mb(t)a(t)$ and $mb(t)c(t)$.
Hence the equation can be written as:
$$\sum_{1}^4f(t)a(t) = \sum_{1}^4la(t)a(t)$$
This gives:
$$1.1 + 3.0 + 4.-1 = l.1 + l.0 + l.1 + l.0$$
Solving this produces: $l = -\frac{3}{2}$
Applying the same procedure I can find that:
$$\sum_{1}^4f(t)b(t) = \sum_{1}^4mb(t)b(t)$$
$$1.1 + 3.-1 + 4.1 = m + m + m + m$$
Solving this produces: $m = \frac{1}{2}$
$$\sum_{1}^4f(t)d(t) = \sum_{1}^4nd(t)d(t)$$
$$1.1 + 3.1 + 4.1 = n + n + n + n$$
Solving this produces: $n = 2$
But the values are not working correctly when you plug it back in. What am I doing wrong?
PS: I am really new to this, so I might not be technically accurate.
The problem is in in my assumption that $f(4)$ is 0 (because I didn't need it, so I thought it is 0):
So this:
$$\sum_{1}^4f(t)b(t) = \sum_{1}^4mb(t)b(t)$$
becomes:
$$1.1 + 3.-1 + 4.1 - f(4) = m + m + m + m$$
Solving this produces: $m = \frac{2 - f(4)}{4}$
Similarly,
$$\sum_{1}^4f(t)d(t) = \sum_{1}^4nd(t)d(t)$$
becomes:
$$1.1 + 3.1 + 4.1 + f(4) = n + n + n + n$$
Solving this produces: $n = \frac{8 + f(4)}{4}$
The linear equation's solution is one of the cases of this equation where $f(4)$ is 3. But I don't know if $f(4)$ can take any value.