bigheadG / mmWave

mmWave SDK examples based on Batman Kit mmWave Sensor module
http://www.joybien.com
123 stars 30 forks source link

How the band-pass filter's parameters are calculated #10

Closed x2ss closed 3 years ago

x2ss commented 3 years ago

Dear author,

Thanks for sharing your helpful work. I came up with a problem in understanding the vital sign code as below,

b1,a1 = signal.butter(6,[40.0/nqy , 200.0/nqy], 'band'), #heart rate parameter https://github.com/bigheadG/mmWave/blob/a12d141540420a7e3f36185e8e2ab50aca355e44/VSD/pyqtgraph_vsd_ex3.py#L254.

From my understanding, the [40.0/nqy , 200.0/nqy] should be the band-pass frequency, as suggested in TI' guide, it is in the range of 0.8-4Hz, however, the [40.0/nqy , 200.0/nqy] is [0.06, 0.3].

So I feel puzzled about the choice of [40.0/nqy , 200.0/nqy].

Look forward to hearing from you. Thanks!

bigheadG commented 3 years ago

fs is the sampling rate, and 0.5 fs is the corresponding Nyquist frequency. fs = 1/0.05 = 20 # data sampling time 50ms nqy(Nyquist frequency) = 0.5 x fs x 60 = 0.5 x 20 x 60 = 600 #Frequency = 1/T. T(unit:Sec) For example, heart rate normally 72 pulse event occurs within 60 seconds equal the frequency is 1.2Hz.
the range from [0.8Hz~4Hz] = [0.8x60pulse ~ 4x60pulse] =>[48p ~ 240p] So, Filter range choice [40.0/nqy , 200.0/nqy] for operation

x2ss commented 3 years ago

Thanks for your help!

Best regards