Position error of motor shaft

3 Ansichten (letzte 30 Tage)
saleh shlimet
saleh shlimet am 13 Dez. 2022
Kommentiert: Mathieu NOE am 20 Dez. 2022
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?

Akzeptierte Antwort

Mathieu NOE
Mathieu NOE am 13 Dez. 2022
Verschoben: Joel Van Sickel am 15 Dez. 2022
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 Kommentare
saleh shlimet
saleh shlimet am 19 Dez. 2022
Thank you very much Mathieu it is working properly.
Mathieu NOE
Mathieu NOE am 20 Dez. 2022
My pleasure !

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu MATLAB finden Sie in Help Center und File Exchange

Tags

Produkte


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by