# Fourier synthesis

I know what I am attempting is not easy but I have a spectrum with peaks at 10Hz 20Hz and 30Hz. I also have various amplitudes at these peaks. I want to recreate my original signal. I initially thought this could be done by adding up sine waves

y(t) = a1sin(2*pi*ff1*t)+a2sin(4*pi*ff1*t)+a3sin(6*pi*ff1*t)


with a1 , a2 and a3 based on the amplitudes of the peaks however, When I recreate my time signal and so this in two axes the trace I get is not what I would expect, where am I going wrong?

• Can you post the image of your spectrum? Are perhaps images of what you get and what you expect? – Phonon Oct 6 '14 at 23:23
• When you mean "spectrum", are you just looking at the squared magnitude, or are you also looking at the phases? – pichenettes Oct 7 '14 at 0:24

## 1 Answer

Amplitude is only half of the information, you also need to take phase into account - you can reconstruct your signal only then. In general sinusoidal signal is given by:

$$x(t)=A\sin(2\pi f t+\theta)$$

For you that would mean adding extra terms:

y(t) = a1*sin(2*pi*ff1*t+ph1)+a2*sin(4*pi*ff1*t+ph2)+a3*sin(6*pi*ff1*t+ph3)

• Also just wanted to check, say I have a spectum (one sided) How can I get the phase information is it simply angle() in matlab at which ever frequencies I wish to check – BranH Oct 14 '14 at 22:13
• In general case - yes. You must remember to convert to degrees from radians of that's what you want. Also unwrapping the phase might be important for you. – jojek Oct 15 '14 at 7:35