{"id":19420118,"url":"https://github.com/einride/pid-go","last_synced_at":"2025-05-13T01:14:04.099Z","repository":{"id":37947933,"uuid":"323699066","full_name":"einride/pid-go","owner":"einride","description":"PID controllers for Go.","archived":false,"fork":false,"pushed_at":"2025-05-12T21:29:14.000Z","size":186,"stargazers_count":96,"open_issues_count":4,"forks_count":6,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-05-13T01:13:55.594Z","etag":null,"topics":["autonomous-vehicles","control-systems","go","golang","pid","pid-control","pid-controller"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/go.einride.tech/pid","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/einride.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-22T18:04:40.000Z","updated_at":"2025-04-16T18:16:06.000Z","dependencies_parsed_at":"2023-10-03T11:16:33.568Z","dependency_job_id":"643be906-463b-4615-bde4-628ddb4c37ec","html_url":"https://github.com/einride/pid-go","commit_stats":{"total_commits":133,"total_committers":12,"mean_commits":"11.083333333333334","dds":"0.45112781954887216","last_synced_commit":"cdbaab5db04cce5c54bd83da482b87428663d354"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/einride%2Fpid-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/einride%2Fpid-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/einride%2Fpid-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/einride%2Fpid-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/einride","download_url":"https://codeload.github.com/einride/pid-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253851072,"owners_count":21973674,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autonomous-vehicles","control-systems","go","golang","pid","pid-control","pid-controller"],"created_at":"2024-11-10T13:21:12.738Z","updated_at":"2025-05-13T01:14:04.078Z","avatar_url":"https://github.com/einride.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PID Go\n\n[![PkgGoDev](https://pkg.go.dev/badge/go.einride.tech/pid)](https://pkg.go.dev/go.einride.tech/pid)\n[![GoReportCard](https://goreportcard.com/badge/go.einride.tech/pid)](https://goreportcard.com/report/go.einride.tech/pid)\n[![Codecov](https://codecov.io/gh/einride/pid-go/branch/master/graph/badge.svg)](https://codecov.io/gh/einride/pid-go)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./doc/pid-go.svg\" alt=\"logo\"/\u003e\n\u003c/p\u003e\n\nPID controllers for Go.\n\n## Examples\n\n### `pid.Controller`\n\nA basic PID controller.\n\n```go\nimport (\n\t\"fmt\"\n\t\"time\"\n\n\t\"go.einride.tech/pid\"\n)\n\nfunc ExampleController() {\n\t// Create a PID controller.\n\tc := pid.Controller{\n\t\tConfig: pid.ControllerConfig{\n\t\t\tProportionalGain: 2.0,\n\t\t\tIntegralGain:     1.0,\n\t\t\tDerivativeGain:   1.0,\n\t\t},\n\t}\n\t// Update the PID controller.\n\tc.Update(pid.ControllerInput{\n\t\tReferenceSignal:  10,\n\t\tActualSignal:     0,\n\t\tSamplingInterval: 100 * time.Millisecond,\n\t})\n\tfmt.Printf(\"%+v\\n\", c.State)\n\t// Reset the PID controller.\n\tc.Reset()\n\tfmt.Printf(\"%+v\\n\", c.State)\n\t// Output:\n\t// {ControlError:10 ControlErrorIntegral:1 ControlErrorDerivative:100 ControlSignal:121}\n\t// {ControlError:0 ControlErrorIntegral:0 ControlErrorDerivative:0 ControlSignal:0}\n}\n```\n\n\\_[Reference ≫](https://en.wikipedia.org/wiki/PID_controller)\\_\n\n### `pid.AntiWindupController`\n\nA PID-controller with low-pass filtering of the derivative term, feed forward\nterm, a saturated control output and anti-windup.\n\n*[Reference ≫](http://www.cds.caltech.edu/~murray/amwiki)*\n\n### `pid.TrackingController`\n\na PID-controller with low-pass filtering of the derivative term, feed forward\nterm, anti-windup and bumpless transfer using tracking mode control.\n\n*[Reference ≫](http://www.cds.caltech.edu/~murray/amwiki)*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feinride%2Fpid-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feinride%2Fpid-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feinride%2Fpid-go/lists"}