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

Issue2884 pid autotuning update the doc and add more parameters #3184

Merged

Conversation

SenHuang19
Copy link

No description provided.

@SenHuang19 SenHuang19 changed the title update the doc and add more parameters Issue2884 pid autotuning update the doc and add more parameters Dec 2, 2022
@SenHuang19
Copy link
Author

@SenHuang19 In the composed block Buildings.Controls.OBC.Utilities.PIDWithAutotuning.FirstOrderAMIGO, there is no detailed documentation of how to use the controller. For instance, by only looking into the model, the user will not know how the parameters yHig, yLow, deaBan, etc. affect the results and how to set the parameters.

Also, does the controller have the difference for direct acting and reverse acting?

@JayHuLBL Based on your comment, I have expanded the info section of the composed block to include

  1. a more detailed overview,
  2. a brief guide,
  3. a reference.

I also added more parameters, including the one associated with the direct acting and reverse acting to it.

<h4>Breif guidance</h4>
<p>
This block is built upon PIDWithInputGains<a href=\"modelica://Buildings.Controls.OBC.Utilities.PIDWithInputGains\">
Buildings.Controls.OBC.Utilities.PIDWithInputGains</a> and its connections are the same as those of the latter.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This block is built based on the <a href=\"modelica://Buildings.Controls.OBC.Utilities.PIDWithInputGains\"> Buildings.Controls.OBC.Utilities.PIDWithInputGains</a> with the gain inputs calculated by tuning blocks.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated this sentence accordingly.

</p>
<p>
All the parameters of PIDWithInputGains are also used by this block, except the controller gains
<i>k</i>, <i>T<sub>i</sub></i>, and <i>T<sub>d</sub></i>, which are replaced with the initial values of those gains.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please list the initial parameters k_start, Ti_start, Td_start. Is there any rules for setting the initial values?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those parameters don't have any impacts on the output. I made them final to avoid confusions.

<i>k</i>, <i>T<sub>i</sub></i>, and <i>T<sub>d</sub></i>, which are replaced with the initial values of those gains.
</p>
<p>
This block provides four additional parameters, <i>yHig</i>, <i>yLow</i>, <i>deaBan</i>, and <i>yRef</i>.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are these parameters? We do have comments for all these parameters in the code, but we may expand the explanation comments here. The user would want to know how to set the parameters and how these parameters affect the results. A brief introduction would be more helpful.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those parameters are not supposed to be modified by users. I made them final to avoid confusions.

This block provides four additional parameters, <i>yHig</i>, <i>yLow</i>, <i>deaBan</i>, and <i>yRef</i>.
</p>
<p>
Note that the default values of those four parameters assume the control output is normalized.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is the output normalized? Is it by setting the parameter r, or parameter yRef? Or should it be normalized externally?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The normalized output means that the output of the PID controller is limited from 0 to 1. I revised the doc to avoid confusions.

</p>
<p>
To use this block, connect it to the control loop.
It will start the auto-tuning process once the simulation starts and detects when the auto-tuning process ends.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When will the auto-tunning process end? Is there any criterior for it?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is defined in the subcomponent and I added the reference to avoid confusions.

During the tuning process, the output of this block is from the embedded relay controller.
</p>
<p>
Once the auto-tuning process ends, this block changes the parameters of the embedded PID controller based on the tuning results.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the end of the auto-tunning process, the block samples the last tunning results as the input gains to the embedded PID controller, and switch ......

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated this sentence accordingly.

<p>
J. Berner (2017).
\"Automatic Controller Tuning using Relay-based Model Identification.\"
Department of Automatic Control, Lund University.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add hyperlink to the reference?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hyperlink is added

Copy link
Contributor

@JayHuLBL JayHuLBL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SenHuang19 Thanks for making the changes.

Would you please update the documentation as suggested? It would be better not writing the documentation as the bullet points.

@SenHuang19
Copy link
Author

@SenHuang19 Thanks for making the changes.

Would you please update the documentation as suggested? It would be better not writing the documentation as the bullet points.

@JayHuLBL Thanks a lot for your comments. I have addressed them and eliminated the bullet points in the model doc.

@JayHuLBL JayHuLBL merged commit 0a205a7 into lbl-srg:issue2884_PID_autotuning Mar 9, 2023
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

Successfully merging this pull request may close these issues.

2 participants