Skip to content

Change LPF and HPF cut-off frequencies #2

@Raztou3D

Description

@Raztou3D

Dear OYMotion,

Thank you for the library and the EMG sensors. While all is working, I need more data from my sensors. To do so, I want to use your EMGFilter library, however, EMG signal are active between 5 and 450 Hz. So I feel that your 20 and 150 Hz are trimming too much of the signal.

Could you please tell me what the coefficients would be for my proposed cut-off frequencies? I am aware that with such request, I will have to use the 1000Hz sampling frequency and won't use the 500Hz one.

In short, how do I adapt the following lines to 450Hz LPF and 5Hz HPF ?

// coefficients of transfer function of LPF
// coef[sampleFreqInd][order]
static float lpf_numerator_coef[2][3] = {{0.3913, 0.7827, 0.3913},
                                         {0.1311, 0.2622, 0.1311}};
static float lpf_denominator_coef[2][3] = {{1.0000, 0.3695, 0.1958},
                                           {1.0000, -0.7478, 0.2722}};
// coefficients of transfer function of HPF
static float hpf_numerator_coef[2][3] = {{0.8371, -1.6742, 0.8371},
                                         {0.9150, -1.8299, 0.9150}};
static float hpf_denominator_coef[2][3] = {{1.0000, -1.6475, 0.7009},
                                           {1.0000, -1.8227, 0.8372}};

Thanks in advance for your help !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions