Skip to content

Computation of i_term_ #32

@carlosjoserg

Description

@carlosjoserg

Before creating any pull request, I'd like to raise this for discussion.

Lines 282 and 315 in pid.cpp, explicitly:

i_term_ = i_term_ + gains.i_gain_ * dt.toSec() * p_error_;

Shouldn't this term be:

i_term_ = gains.i_gain_*( i_term_ +  dt.toSec() * p_error_ );

Note that, for instance, setting gains.i_gain_ to zero online in the current implementation does not remove the integrated i_term_ so far, and it won't until you reset the controller.

/cc @manuelbonilla

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