Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
signal anti-aliasing
#1
Hi,
I am reading signal from ADXL1005 with ADS1256 24bit ADC to Teens4.0.
I have sample rate 30000 and I read 30000 samples.
I have no problem with data from signal generator.
For example if I set 1000Hz sine and 0,06V = 1gRMS I see exact numbers:
https://pasteboard.co/3uWNlpoqWzei.jpg

and noise with 0V and 0Hz:
https://pasteboard.co/DMYVa1Xxjagr.jpg

BUT if I read data from Teensy, then I can see:
NOISE:
https://pasteboard.co/kdrMSJuSR9nQ.jpg

For low frequencies is it ok according proffessional analyzer:
https://pasteboard.co/jtMgNWaIlvzC.jpg

BUT for higher frequencies I can see nonsenses, for example two times lower values than on analyzer:
https://pasteboard.co/JAE8P6uAinH6.jpg

For time signal / wave I have this code:
def time_signal(self):           
        self.plot_signal = v_data
        lowcut = 10.0
        highcut = 14900.0
        self.plot_signal = butter_bandpass_filter(self.plot_signal, lowcut, highcut, SPS, order=4)
        x = np.linspace(start = 0, stop = 1, num = SAMPLES)
        self.canvas.axes.cla() 
        self.canvas.axes.set_ylabel("Amplitude in g")
        self.canvas.axes.set_xlabel("Time in seconds")   
        self.canvas.axes.plot(x, self.plot_signal[0:SAMPLES], 'b')
        self.canvas.draw()
        self.g_rms()
and for gRMS calculation:
def g_rms(self): 
        g_rms1 = v_data # data from Teensy - from generator OK, from ADXL low frequencies OK, high problem
        lowcut = 10.0
        highcut = 14900.0
        g_rms1 = butter_bandpass_filter(g_rms1, lowcut, highcut, SPS, order=4)
        peak_max = abs(max(g_rms1))
        peak_min = abs(min(g_rms1))
        g_rms1 = [np.power(x,2) for x in g_rms1]
        tot = sum(g_rms1)
        tot = celkem / SAMPLES
        tot = np.sqrt(tot)
        self.btn8.setText("g RMS: " + str(round(celkem,2)))              #gRMS 
        pp = peak_max + peak_min
        self.btn9.setText("g 0-peak: " + str(round(peak_max,2)))     # 0-peak 
        self.btn11.setText("g peak-peak: " + str(round(pp,2)))     # peak-peak
Any idea where should be the problem? Thank you!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Intricacies of Aliasing ClassicalSoul 2 2,254 Mar-01-2019, 01:53 PM
Last Post: scidam
  Struggling To Work With Anti-Captcha API digitalmatic7 1 5,720 Oct-09-2017, 09:51 PM
Last Post: nilamo
  Anti Vowel OmarBrikaa 2 3,885 Aug-15-2017, 08:38 AM
Last Post: DeaD_EyE

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020