Previous in Forum: An effecient and effective pump to deliver water.   Next in Forum: An open letter to the parents of CR4
Close
Close
Close
3 comments
Rate Comments: Nested
Associate
Engineering Fields - Marine Engineering - New Member

Join Date: May 2006
Posts: 36

MATLAB and Amplitude

03/07/2009 10:30 PM

hi;

i have around 34,000 readings of wave surface elevations at every 0.5 second. using a pressure transducer under the water, the height variation of the water surface was taken.when i plot these data; y axis= height above sealevel, x axis=time, i get a sinusoidal wave graph. now i need to calculate the amplitude of each sine shaped wave. how can i do this MATLAB?...how can i compute the amplitudes (which is the dist from the peak or trough to the zero line)...

i need to find all the amplitudes since its amplitude varies in the sea, how can i make MATLAB see the amplitudes which can only be seen once the data has been plotted.

thank you.

Register to Reply
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.
Power-User

Join Date: May 2008
Posts: 380
#1

Re: MATLAB and Amplitude

03/09/2009 10:10 AM

Sorry if i didn't understand properly,Did you fit a Fourier serie to your readings? aren't the coeff.the amplitude for each frecuency?Before talking about any software should be clear what you did.As i said before may be i misunderstood your problem.-

Register to Reply
Guru
Engineering Fields - Electrical Engineering - Been there, done that. Engineering Fields - Control Engineering - New Member

Join Date: Dec 2008
Location: Long Island NY
Posts: 15600
Good Answers: 981
#2

Re: MATLAB and Amplitude

03/09/2009 10:45 AM

This sounds like a homework problem. So don't expect a list of code here to do your homework.

My first step would be to remove the offset distance between the average water surface and your transducer. This will permit you to generate a new array, the delta array of numbers both above and below zero.

Now you will have to do some more thinking and choose what amplitude measurement you wish to measure from your delta array. A Fourier transfer of the delta array numbers will give you the amplitude of the variety of oscillations of this array. If you limit the data for analysis to a binary number of entries (2N) then you can do a fast Fourier analysis and your computer can much more quickly accomplish the number crunch. This amplitude analysis technique though may not be what you desire. For this will accurately describe the frequency, phase and amplitude of the sine waves that when summed will recreate your data set if no changes occurred. In other words, this will not show any time relationship to wave conditions. If somebody dropped a rock into the water during your data taking, you might get confusing results.

To show a time relationship of your waves, you will have to generate a waterfall Fourier analysis where smaller sets of your delta data will be analyzed. For an example, your first analysis will be of the delta data will be D0 through D1023. Your second analysis will be D512 through D1535, rinse and repeat.

But Fourier analysis is but one method of amplitude analysis. You might wish to take successive local min/max peak values above and below zero of your delta data.

One last complication, to minimize unneeded high frequency transitions you can do some local averaging. In near algebraic words, LPDn=(Dn+D(n+1)+D(n+2)+D(n+3))/4. You will notice to retain the size of your data array, you will have to pad with zero.

Have Fun!

__________________
"Don't disturb my circles." translation of Archimedes last words
Register to Reply
Guru
Engineering Fields - Electrical Engineering - Been there, done that. Engineering Fields - Control Engineering - New Member

Join Date: Dec 2008
Location: Long Island NY
Posts: 15600
Good Answers: 981
#3
In reply to #2

Re: MATLAB and Amplitude

03/09/2009 1:44 PM

Oh, and don't forget, Saint Nyquist of signal processing proclaims that the highest frequency you can read with a 0.5 sec sample period is 1 Hertz.

__________________
"Don't disturb my circles." translation of Archimedes last words
Register to Reply
Register to Reply 3 comments

Previous in Forum: An effecient and effective pump to deliver water.   Next in Forum: An open letter to the parents of CR4

Advertisement