×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Analog error angle between two sine-cosine potentiometers

Analog error angle between two sine-cosine potentiometers

Analog error angle between two sine-cosine potentiometers

(OP)
thread240-291259: Servo Control with Sine Cosine Potentiometers in 2011 never arrived at an elegant solution. I think this is such a solution, using two analog multiplies:

If C1, S1 are the cosine and sine outputs of potentiometer 1, and C2, S2 are from pot 2, then
C1 * S2 - S1 * C2 = sine of error angle.
Similarly,
S1 * S2 + C1 * C2 = cosine of error angle.

You could find some analog ATAN2 function, and get a nice linear sawtooth error signal from -PI to +PI, but simply using the sine of the error angle might be the gentlest to your system (when slipping cycles, especially). The sine function kind of saturates at +/- PI/2, then kind of gives up as you approach +/- PI, instead of throwing your motor a sharp discontinuity as it crosses PI.

RE: Analog error angle between two sine-cosine potentiometers

Sounds just like zekeman's solution to me. Besides, the OP found a superior (to them) solution - detect the quadrant and drive towards same quadrant if they're different, then use sine or cosine as error depending on the quadrant. Ultimately both solutions simply consider sin(a) and cos(a) as approx equal to a over a certain domain, which for control purposes is probably fine since they tend towards the same values.

RE: Analog error angle between two sine-cosine potentiometers

(OP)
LiteYear, I agree with you. I saw "synchro" and my eyes just glazed over. Then all I saw were all the quadrant detections, and I didn't like that as a purist. I never registered that zekeman had a good small-angle solution.

Good catch!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources