Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swapped constants used for Ki calculation #26

Open
Breinholm-coder opened this issue Nov 2, 2022 · 0 comments
Open

Swapped constants used for Ki calculation #26

Breinholm-coder opened this issue Nov 2, 2022 · 0 comments

Comments

@Breinholm-coder
Copy link

Breinholm-coder commented Nov 2, 2022

I think you accidently swapped the 1.2 and 0.48 in the Ki calculation:

double PID_ATune::GetKi()
{
return controlType==1? 1.2*Ku / Pu : 0.48 * Ku / Pu; // Ki = Kc/Ti
}

Should be like this for Ziegler & Nichols (closed loop):

double PID_ATune::GetKi()
{
return controlType==1? 0.48 * Ku / Pu : 1.2 * Ku / Pu; // Ki = Kc/Ti
}

/Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant