Tuesday, May 26, 2009

How to solve out of memory

How to solve out of memory error article is copied from my other website with some additional information in clossing paragraph. "Out of Memory” massage is very inconvenient problem. The error message “out of memory” often occurs when we open many applications in windows. The problem is often caused by insufficient desktop heap memory. Even your RAM is still enough, the problem “out of memory” still occurs because windows only allocate 3 MB. To increase the desktop heap memory please
1. Click Start, click run, type “regedit” enter
2. Go to HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\SubSystems\Windows
We will see in “windows” contains long string

%SystemRoot%\system32\csrss.exe ObjectDirectory=\Windows SharedSection=1024,3072,512 Windows=On SubSystemType=Windows ServerDll=basesrv,1 ServerDll=winsrv:UserServerDllInitialization,3 ServerDll=winsrv:ConServerDllInitialization,2 ProfileControl=Off MaxRequestThreads=16

On 32 bit, recommend to replace with these value
SharedSection=1024,4096,2048

On 64 bit, recommend to replace with these value
SharedSection=1024,20480,2048

We can also change with the greater value but i never try, i only try to change to this value on my XP SP2:
SharedSection=1024,4096,2048

For Windows XP, To check the version whether 32 or 64 bit is:
1. Click Start, click Run, type winmsd.exe, and then enter
2. In system summary, see the processor
* If the value that corresponds to Processor starts with x86, the computer is running a 32-bit version of the Windows operating system.
* If the value that corresponds to Processor starts with ia64 or AMD64, the computer is running a 64-bit version of the Windows operating system.

“Insufficient memory or could not read from specific memory” can be also caused by the VGA card especially when you work with 3D or video application (It often occurs in computer which has onboard VGA Card). The memory in this error message refers to VGA card memory. Windows could not define which memory cause the problem. How to solve this problem? We could check the new driver of our VGA Card in case there is any problem with the driver. If it does not solve the problem, the easy way is replace with better VGA Card.

We could also check whether the current application needs more RAM size. Before installation usualy we have the requirement to run the application properly. Perhaps our RAM is sufficient enough for the current opened application, but we should also check other application which is running together with this current application.

references:

http://dhidik.wordpress.com/
http://www.techarp.com/
http://www.tothepc.com/
www.cst.com

Monday, May 25, 2009

Filter Design using Scilab

Scilab is an open source software for numerical computation. The software could be download freely from scilab website. AS open source software, we could participate to develop the library of this software. In this article i would like to explain how to design filter using signal processing tool in Scilab. As we know that base on frequency respon filter could be classified into:

- Low Pass Filter (LPF): allow signal which as lower frequency than the cut off frequency.
- Band Pass FIlter (BPF): pass signal from cut off frequency fc1 to cut of frequency fc2
- High Pass Filter (HPF): admit the signal over the cut of frequency
- Band Rejection: reject signal starting from cut off frequency 1 to cut of frequency 2.

Filter coud be used to get the desired signal for example when EKG signal is disturbed by noise wich has lower frequensi signal.

The following will be simulated noise cancellation using generated signal. Original signal is sinusoidal signal 5 Hz for 4 seconds. The noise is sinusoidal signal 50 Hz which also has 4 seconds time.

t = 0:0.001:4
signal = sin(2*%pi*5*t);
noise = sin(2*%pi*50*t);
compound = signal + noise

To seperate the signal from noise, we could use low pass filter. The important note is how to decide the cutt off frequency of the system. Using Scilab, we can use available technique to design the filter such as Butterworth, Chebisev and elliptic.

Deciding the cut of frequency is very easy by looking at freuency of signal and noise. In this case we select the frequency beetween signal and noise. The normalization of 5Hz is 0.005 and 50 Hz is 0.05.

myfilter = iir(15,’lp’,'butt’,[0.025 0],[0 0]);

- The first parameter is filter order. We could use higher order filter but please remberber taht higher order filter increase the number of calculation iterations.
- Second parameter is filter type which lp= lowpass, hp=highpass, bp=bandpass.
- Third parameter is technique which is used to design. This example use Butterworth. It is also availabe other methods such as cheb1, chep2 dan ellip.
- Fourth parameter is cut of frequency in normalization form
- Fifth parameter is error vector whic is used only in chebisev and elliptic technique

To apply filltering to the signal, we could write the following code:

output = flts(compound,myfilter);

Let we plot the input and output of this filter.

xsetech([0,0,1,1/2])
plot2d(t,compound)
xtitle(’input signal’)
xsetech([0,1/2,1,1/2])
plot2d(t,output)
xtitle(’output signal’)

The script will show input signal and output signal of LPF which just been implemented.

written by: Dhidik Prastiyanto
reference:

1. Lecture Note by Dhidik Prastiyanto
2. Introduction to signal Processing (Roman Kuc)

3. http://dhidik.wordpress.com/2009/05/18/filter-design-dengan-scilab/
4. www.scilab.org