gopid

package module
v0.0.0-...-42e6b99 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2019 License: MIT Imports: 1 Imported by: 0

README

gopid

A simple PID controller written in Go.

Installation

go get github.com/jiyu93/gopid

Usage

Please check example/test.go.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PID

type PID struct {
	Kp          float64 // Proportion
	Ki          float64 // Integral
	Kd          float64 // Derivative
	TargetValue float64
	// contains filtered or unexported fields
}

PID controller

func NewPID

func NewPID(p, i, d, target float64) *PID

NewPID create a new PID object

func (*PID) CalcIncPID

func (p *PID) CalcIncPID(currentValue float64) float64

CalcIncPID calculate increase PID output

func (*PID) CalcLocPID

func (p *PID) CalcLocPID(currentValue float64) float64

CalcLocPID calculate locative PID output

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL