It seems you don't know how to even start. I'll try to guide you a bit.

Matlab will be really useful to you. First, you need to understand the basics. You can find lots of tutorials, for example, this one: http://users.ece.gatech.edu/bonnie/book/TUTORIAL/tutorial.html

Then, once you know how to work with the software, you need to create a script that does the following.

- Generate the two sinusoidal components (x1 and x2) and add them into x=x1+x2.
- Generate the noise in a matrix n of the same length. I assume you are usign White Gaussian Noise, so you can check out this function: http://www.mathworks.es/help/toolbox/comm/ref/wgn.html
- Get the noisy signal xn.
- Compute Xnf and Xf as the spectrums for xn and x. I have always used the following base code, inserting proper values in the "...". Remember Nyquist Sampling Theorem!

```
Fs = ...; inct = 1/Fs; %Sampling frequency
T = ...; % T*Fs samples
N = Fs*T; % = T/inct;
t = [0:1/Fs:T-1/Fs]; % Time samples for T seconds [0,T)
f = [-Fs/2:Fs/N:Fs/2 – Fs/N]; % Frequency [-Fs/2,Fs/2)
Xf=fftshift(inct*fft(x)) %check fft and fftshift help, as well as FT theory.
```

Now you can design the filter in the frequency domain. I assume you can go for an ideal filter. You can call it Hf. Now, because of convolution FT property, Y(w)=H(w)X(w). No need for convolution!

Now check the performance. I don't know what "performance" refers to, but I think it has something to do with signal and noise power. If so, keep in mind that you don't need to compute an integral. MATLAB handles discrete signals so you can use the sum function instead.

You can certainly use an adaptive Kalman Filter to identify or remove noise, and there are hundreds of articles on this in the signal processing literature. Whether you need to or not depends on the nature of your task and the noise -- whether the noise is in the frequency range of the signal, whether the noise is signal dependent, etc.

If it were me, unless there were reason to do otherwise, I'd try (in the following order)

1) make sure the signal is good -- i.e., make sure you're doing everything you can to quash the noise before its acquired, and make sure you're not doing something silly, like aliasing your noise into the signal by not acquiring fast enough or prefiltering (which will make your task very difficult

2) Try standard filtering techniques, like FIR and IIR filters to do what you need to do

3) Move on to non-linear, but easy, techniques, like median filtering, Sovitsky-Golay filtering, ..., which might be more tolerant to your noise.

4) Pull out the big guns-- the adaptive filters.

Finding the right filter in tough situations can be a matter of rolling up your sleeves and trying different things.

## Best Answer

SPICE (or any derivative of it) would be the best choice if you are doing circuit simulation as part of the process, also take a look at MATLAB with Simulink.

MATLAB might also have a few toolboxes that are helpful for your needs, e.g. Filter Design (but more aimed at digital filters) and the Signal Processing toolbox.