Position error of motor shaft

조회 수: 2 (최근 30일)
saleh shlimet
saleh shlimet 2022년 12월 13일
댓글: Mathieu NOE 2022년 12월 20일
I want to obtain the position error of motor shaft so I subtracted the estimated position from the measured position. modulus function is used so the estimated and the measured positions vary between 0 to 2pi (electrical radians) as shown in the figures attached. the problem is that the error becomes 2pi at instant times. What can I do to not show this big error (2pi) in the figure?

채택된 답변

Mathieu NOE
Mathieu NOE 2022년 12월 13일
이동: Joel Van Sickel 2022년 12월 15일
hello
you can make 2 pi complements on the error signal , following that logic
if error < -pi then error = error + 2pi
if error > pi then error = error - 2pi
goal is to keep error witin -pi / + pi bounds
  댓글 수: 13
saleh shlimet
saleh shlimet 2022년 12월 19일
Thank you very much Mathieu it is working properly.
Mathieu NOE
Mathieu NOE 2022년 12월 20일
My pleasure !

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

태그

제품


릴리스

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by