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

Fixed Error in sim_fiction_compensation.m #3

Merged
merged 2 commits into from
Jul 4, 2021

Conversation

jasonnicholson
Copy link
Contributor

sim_fiction_compensation. The main issue is that z was used in the controller and not z_tilde. This bug fix makes the friction observer better. However, a well-tuned PI and velocity gain without friction observer is better than the friction observer; its also easier to tune.

There other updates such as:

  • demo1 and generate_ramp_signal.m was redundant so it was delete.
  • demo2 - Some of the code was vectorized. Pointed out where forward euler was done because ti can be tricky to get right. Preallocated before for loops when needed.
  • demo3.m and sim_fiction_compensation. Extract controller gains from ODE functions so they can be passed in. Fixed error in controller where z was used instead of z_tilde; z is not observable and should not be used in the controller. Shortened the sim time so that more structure is shown. Rise time is shorter. Settling time is shorter. I see indiciations that there still be another error because around 6 seconds, there is a blip in the response. More investigation would be needed.
  • fig8 was updated with the new results from demo3.m
  • lugref.m was vectorized and the note about Forward euler was added.
  • lugref_ss.m was vectorized.
  • sim_pid.m - t was unused so made that more clear in the function declaration in line 1.
  • sim_stick_slip.m was vectorized.
  • demo4.m shows an optimally tuned PI and velocity gain with no friction observer. Performance is superior to friction observer. fig9.png was added.
  • README.md was updated to reflect corrected results of demo3.m. demo4.m results added.

TODO:
Optimally tune the PI, velocity gain, and observer gain to see performance can be improved for friction observer results.

In line 15, q(3) (z) should have been q(5) (z_tilde). This drastically improves the friction observer. z is not observable and should not be used in your control law.
- demo2 - Some of the code was vectorized. Pointed out where forward euler was done because ti can be tricky to get right. Preallocated before for loops when needed.
- demo3.m and sim_fiction_compensation. Extract controller gains from ODE functions so they can be passed in. Fixed error in controller where z was used instead of z_tilde; z is not observable and should not be used in the controller. Shortened the sim time so that more structure is shown. Rise time is shorter. Settling time is shorter. I see indiciations that there still be another error because around 6 seconds, there is a blip in the response. More investigation would be needed.
- fig8 was updated with the new results from demo3.m
- lugref.m was vectorized and the note about Forward euler was added.
- lugref_ss.m was vectorized.
- sim_pid.m - t was unused so made that more clear in the function declaration in line 1.
- sim_stick_slip.m was vectorized.
- demo4.m shows an optimally tuned PI and velocity gain with no friction observer. Performance is superior to friction observer. fig9.png was added.
- README.md was updated to reflect corrected results of demo3.m. demo4.m results added.

TODO:
Optimally tune the PI, velocity gain, and observer gain to see performance can be improved for friction observer results.
@auralius auralius merged commit f7dbeca into auralius:master Jul 4, 2021
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