Finding set of orthogonal basis functions for composite signals
Your $S_1,\ldots, S_5$ already are your orthogonal bases, exactly the way your first equation writes them down.
To check that: write down the definition of your inner product, and insert, for example, $S_a$ and $S_b$. You'll see that $\left&lt;S_a,S_b\right&gt;=0 \iff a\ne b$.
This follows quite directly from the linearity that a (real) inner product needs to have:
\begin{align}
\Big&lt;\sum_i A_{a,i}\sin(2\pi f_{a,i}t -\phi_{a,i}),
\sum_k A_{b,k}\sin(2\pi f_{b,k}t -\phi_{b,k})
\Big&gt;&amp;\\
= \sum_i
\Big&lt;
A_{a,i}\sin(2\pi f_{a,i}t -\phi_{a,i}),
\sum_k A_{b,k}\sin(2\pi f_{b,k}t -\phi_{b,k})
\Big&gt;&amp;\\
=\sum_i\sum_k
\Big&lt;
A_{a,i}\sin(2\pi f_{a,i}t -\phi_{a,i}),
 A_{b,k}\sin(2\pi f_{b,k}t -\phi_{b,k})
\Big&gt;
\end{align}
and sines of different frequencies are orthogonal.