Sine wave from fos + simple signal

70 Views Asked by At

I have a first order system $\frac {1}{(s+c)}$ and a signal of the form

$\sum_{k=0}^\infty (-1)^{k}e^{-2ks}a(\frac{1-e^{-2s}}{s}- be^{-s}(\frac{1-e^{-s}}{s^2})) $ i.e a periodic signal of a square wave followed by a triangle wave

My question is how do I go about choosing the coefficients a,b and c to minimise the harmonic distortion of the output signal approximating a 60 Hz sine wave ($\omega = 120\pi $)?

I have tried just minimising the integral square error but got stuck because I keep messing up the convolution of the signal and the system, had problems integrating the square of the resulting function (my calculator doesn't like it and WolframAplha runs out of time) and then find and classify critical points with the partial derivative matrix.

Is this the way to do it or can you go straight from the laplace to the fourier and do the optimisation there, minimising the harmonics as opposed to the proxy of the square error?