Visitar URL original
Integrating the adjustment in the PID example? · Issue #2 · mstksg/auto-examples · GitHub
Skip to content

Integrating the adjustment in the PID example? #2

Open

Description

@freckletonj

In the PID example, there's a line (https://github.com/mstksg/auto-examples/blob/master/src/Recursive.hs#L103):

control  <- sumFromD c0 -< adjustment

I get why one would delay a signal in the recursive setting, but I don't think a PID should integrate adjustment in the first place.

Shouldn't it just be:

...        
        let control = kp * err
                       + ki * cumulativeSum
                       + kd * fromMaybe 0 changes
        response <- blackbox   -< control
    id -< response

Activity

  1. freckletonj commented on Jun 27, 2020

    @freckletonj
    Author

    Ah, I read the code before the readme. But I still don't get why sumFromD is the same as system . delay

    currResponse <- system . delay c0 -< control
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