Skip to content

Use of constrain(..., -outMax, outMax) -> shouldn't this be constraint(..., outMin, outMax) ? #55

Closed

Description

@JonNelson

if (aw && ki) iTerm = constrain(iTermOut, -outMax, outMax);

Activity

  1. Dlloydev commented on Jan 4, 2023

    @Dlloydev
    Owner

    The purpose of using -outMax is to allow unwinding the integral accumulator by an amount that's limited equally for both positive and negative directions when the controller output is saturated. The anti-windup code was inspired from here.

    Test results:

    image

  2. Repository owner locked and limited conversation to collaborators on Jan 6, 2023
  3. converted this issue into a discussion #60 on Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions