Skip to content

Wrong velocity measurement in CascadeController class #35

Description

@Nataso08

The bug

At the moment, velocity measurement in CascadeController class is calculeted by the formule velMeasuredValue = (errorVal_p - prevErrorVal) / period, but this indicate the derivate of errorVal_p in period time, not the istant velocity of the motor/encoder.
This problem causes an unpredicable Controller reaction, because of the error calculeted by the secondary controller is based on a wrong reference.

In order to fix it I made a PR #36

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions