Multisim and Ultiboard

cancel
Showing results for 
Search instead for 
Did you mean: 

Multisim Transient Analysis Stepsize Issue

Hi All,

I have a 32 second wav file that has a 1 kHz noise on it. I am trying to design a simple circuit that will remove this noise.
I am having problems with the output of the transient analysis of multisim. I have more data points that original. Here are all my steps.

Convert wav file into time domain in MATLAB with
-wavread
Save the time domain data to a txt file with matlab. This data has 1,424,800 points.
Design a notch filter with multisim. Input the data with a piecewise linear voltage source that is linked to the text file.
AC analysis of my circuit reveals that it should work, -30 dB gain at 1 kHz.

Run a transient analysis with multisim. Import the results into .tdm then into Matlab with
http://digital.ni.com/public.nsf/allkb/0EEADA99DC7D00A4862572E30037C3A2

Here is where my problem is. The output of multisim has 6,396,188 data points instead of 1,424,800. When I use wavwrite and create a new wavfile, it is 2 minutes long instead of 32 seconds like the original.

I believe my problem is the step size settings of multisim. I want to specify minimum step size but multisim does not have that option.

Any suggestions?

Thanks
0 Kudos
Message 1 of 9
(6,546 Views)

Hi conxion,

 

When exporting a wavefrom from the Grapher View window to a TDM or LVM, you have the option to resample your data. In the box labeled 1/delta x, fill in the sampling rate you want for your audio file (e.g. 44.1k). Choosing spline interpolation will also help improve the quality of your audio file.

 

Which version of Multisim are you using? This will help resolve your questions quickly.

 

Let us know if this works.

----------
Yi
Software Developer
National Instruments - Electronics Workbench Group
Message 2 of 9
(6,534 Views)

Plugging in 44100 Hz solved that issue. Thank you for your help. 

I still have another problem.

My signal has 1 kHz noise in it which I am trying to remove. The noise has a very high amplitude. I tried to use first order filters notch filters but they dont produce the desired output, they cutoff to much of the signal. 

What kind of filter should I use?

 

Thanks

 

 

0 Kudos
Message 3 of 9
(6,486 Views)
A first order filter usually does not work that well to remove high-amplitude noise.  The tails are too long, so they remove parts of the signal you want, as you found out.  Look at the graph of your filter response and this will be obvious, especially if you plot a graph of the frequency content of your signal on top of it.  You should design your filter with this in mind.  Depending on your signal, you may end up with a twenty tap filter.  You can also try some sort of fourier filtering for more precise control, but there are problems there, as well.  Make sure that the phase response of your filter is linear or you will get some weird distortions.  Good luck.
0 Kudos
Message 4 of 9
(6,472 Views)

Building a good filter is a mark of a good electrical design engineer. This is difficult, especially with the high requirements of your situation.

 

However, there is a tool in the Educational and Power Pro version of our software to help you design filters. If you have one of these versions, click on Tools>>Circuit Wizards>>Filter Wizard. You will be able to find a whole slew of filters including the band stop filter that you want.

----------
Yi
Software Developer
National Instruments - Electronics Workbench Group
0 Kudos
Message 5 of 9
(6,441 Views)

Hi,

I am actually doing the same project I believe the original poster is doing. I tried using a variety of low-pass filters in the complete circuit and found that it did not low-pass anything. All the filter appeared to do was to decrease the voltage of the signal. When I used Multisim's Bode Plotter on just the low-pass filter with a generic AC circuit, the Bode Plotter outputted the magnitude and phase plot of what I expected the low-pass filter should have. However, when I implemented the same low-pass filter into my circuit and connected a Bode-Plotter, it did not output anything in the phase and magnitude plot.

 

The circuit consists of (from left to right)

1) Comparator to take out a dolphin noise out of the noisy signl (the sound files are too big to attach of course)

2) Low-Pass Filter (1st order RC - while I did other higher order LPFs as well)

3) FET current-source amplifier

 

Both #1 and #3 components work. It's just the low-pass filter that doesn't for some reason in the circuit. I thought that the way I imported the signal using Matlab's wavread command may have been incorrect. The fact that the other two comoponents worked though makes me think otherwise. I attached my signal .wav converter into a txt file Matlab script.

 

Can anyone shed light on what's going on? I am using the downloaded trial Educational version 10.1.197 of Multisim

 

Thanks.

 

Attached:

CompleteCircuit.ms10

 LPFonly.ms10

 saveWaveFiles.m

Download All
0 Kudos
Message 6 of 9
(6,326 Views)

I could not attach my Matlab m file to read the two signals from the two *.wav files (noisy and dolphin), but here it is

 

clear
% Save Dolphin Signal
[DolphinsOnly fsD] = wavread('Dolphins_only.wav');
DolphinsOnly(:, 2)  = DolphinsOnly(:, 1);
for i = 1:length(DolphinsOnly),
    DolphinsOnly(i, 1) = i / fsD;
end
save('DolphinsOnly.txt', 'DolphinsOnly', '-ASCII');

[NoisySignal fsN] = wavread('Noisy_Signal.wav');
NoisySignal(:, 2) = NoisySignal(:, 1);
for i = 1:length(NoisySignal),
    NoisySignal(i, 1) = i / fsN;
end
save('NoisySignal.txt', 'NoisySignal', '-ASCII');

0 Kudos
Message 7 of 9
(6,325 Views)

Hi Roger,

 

Your circuit looks fine, however, all your input sources appear to be PWL sources. I believe that the Bode Plotter works only with AC sources. If you replace your input sources with AC sources, this filter appears to work fine.

 

 A word of caution: Your opamp (3288RT) is connected as a differential amplifier. However,  its power connections are not connected (pin 5 and pin 4). This does not create any problems with this simulation because of Multisim's 3288RT model, but may create problems with other opamps that you may find in the master database.

 

As a reminder for the future, if you have your original post resolved, please mark the thread as question answered. Any new questions should be be directed to another thread. This way, other members of the forum can search and find solutions quickly and effectively.

 

Thanks.

----------
Yi
Software Developer
National Instruments - Electronics Workbench Group
0 Kudos
Message 8 of 9
(6,243 Views)

Hi Yi Yao,

Thanks for looking at my circuit and telling me that the Bode Plotter doesn't work with AC sources.

 

After much frustration with simple first and second-order low-pass filters, I followed your suggestion of using the Multisim Filter Wizard. It worked perfectly! Thanks.

 

I don't know how to mark this post as "Question Answered." I am not the original poster of this thread. Of course, my question is answered.

 

-Roger C.

0 Kudos
Message 9 of 9
(6,232 Views)