I am using ADXL335 3 axis accelerometer to measure wave elevation on a tank. The data I receive from the sensor is acceleration. I need the displacement of the sensor in x,y and z direction with respect to the stable state. I tried converting acceleration to displacement with double integration but the error is large. Can someone suggest a better was to convert acceleration into displacement without error ?
I'm not 100% sure what you mean by "wave elevation on a tank", but I'll assume that it's a liquid height of some sort.
As you've discovered, you will get integration errors when going from acceleration to displacement. In vibration analysis, typically data is measured with accels, then integrated as needed to get velocity or displacement, typically though, the data will be run through a high pass filter since the noise in the lower frequencies gets amplified with each integration and a signal that looks great as acceleration will be garbage as displacement. Of course, the phenomena you're measuring is probably a low enough frequency that a high pass filter sufficient to remove the noise will also be removing important parts of your signal.
My suggestion would be that you're simply using the wrong tool for the job. There are plenty of proven ways to measure a fluid level in a tank. A magneto-restrictive float sensor would be a good place to start.
As stated in the comments, you cannot eliminate the integration errors. This is a mathematical fact. The integral of a function has a constant C added, in this case, an unknown error, which is independent of the function. There are other solutions for water level sensing.