How can I add a harmonic of the input signal ?
- without making frequency estimations ( frequency is provided )
- by making frequency estimations
input : vectorized form of signal
output : same format as input
NOTE : If you know answer, can you give me algorithm or link which will help me to solve this problem.
If the frequency is known, then you can presumably add a harmonic just by adding a sine wave of the appropriate frequency (i.e. double the known frequency) to the signal. Something like:
When the frequency is unknown you could use an FFT (@L7ColWinters linked to the docs for that) to find the frequencies. Since you can convert a signal from the frequency domain back to the time domain (ifft for the inverse), it might be easier to do the FFT, add the harmonic and then do an inverse FFT, or once you know the frequency from the FFT you could add the sine wave to the original input as in the first case.