0
$\begingroup$

Below is the graph of my load cell readings at 3 samples per second. I have collected 500 such samples. I want to stabilize the readings and read that first approach is to convert time domain data to frequency domain. I am new to DSP, so i seek your expert guidance on this.

My main aim is to stabilize the readings so that i can increase an accuracy of my measuring device.enter image description here

Graph after fft is as shown below enter image description here

enter image description here

$\endgroup$
16
  • $\begingroup$ If you wanna convert time domain to frequency domain, try the example here. mathworks.com/help/matlab/math/fft-for-spectral-analysis.html If you wanna stabilize your signals (maybe you should define/understand the properties of noises and signals), kalman filters are commonly utilized tool. mathworks.com/help/control/ug/kalman-filter-design.html $\endgroup$ Feb 23 at 5:13
  • $\begingroup$ Great link. Thanks for that. I have another question in the code it is mentioned Y = fft(y,251); Why the author has taken 251 ? Any special reason? $\endgroup$ Feb 23 at 5:47
  • $\begingroup$ @Nimit. The author used Y = fft(y,251) because the 'y' sequence has 251 samples. The author could just as well have used Y = fft(y). $\endgroup$ Feb 23 at 8:37
  • $\begingroup$ @RichardLyons Ok thanks... Let me do fft and post the graph... After fft graph i think i should get my signal frequency.. $\endgroup$ Feb 23 at 8:53
  • $\begingroup$ @RichardLyons I have edited my question and uploaded the graph... Matlab code for fft is Y = fft(y,500); Pyy = Y.*conj(Y)/500; f = 3/500*(0:127); plot(f,Pyy(1:128)) title('Power spectral density') xlabel('Frequency (Hz)') $\endgroup$ Feb 23 at 9:42
0
$\begingroup$

@Nimit. I recommend that you study and learn to design and implement what are called 2nd-order IIR lowpass filters. Once you thoroughly understand such filters you should design a 2nd-order IIR lowpass filter, that has unity gain at zero Hz, and experiment by applying your noisy signal to that filter and see how much noise reduction is achieved. Then you should apply your noisy signal to a cascade of two identical 2nd-order IIR lowpass unity-gain filters and see how much noise reduction is achieved. Finally you should apply your noisy signal to a cascade of three identical 2nd-order IIR lowpass unity-gain filters and see how much noise reduction is achieved. Nimit, you have much experimenting to do.

$\endgroup$
3
  • $\begingroup$ Agreed. Thanks for note. I think unit gain at zero means 0 HZ should be my cut off frequency, correct ? And what should be my sampling frequency? Should it be the sampling frequency of my ADC ? $\endgroup$ Feb 27 at 13:52
  • $\begingroup$ @Nimit. If you send me a private e-mail, and if you're able to send me an electronic file of your 500 time-domain samples (your 500 "readings"), I can help you. My e-mail address is: R dot Lyons at ieee dot org. $\endgroup$ Feb 27 at 21:17
  • $\begingroup$ sure I will do it. $\endgroup$ Mar 1 at 0:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.