×
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

Servo Control with Sine Cosine Potentiometers
2

Servo Control with Sine Cosine Potentiometers

Servo Control with Sine Cosine Potentiometers

(OP)
Servo control with Sine cosine potentiometers.

I have controller and motorized rotating device both rotating over full 360 degrees – no limits. Both Controller and device are equipped with Sine Cosine Potentiometers.

I am looking for simple (and preferably analog) way to compare outputs of the two Sine Cosine Potentiometers and generate error signal.

 

RE: Servo Control with Sine Cosine Potentiometers

You're probably not getting any response because your question is unclear.
 

RE: Servo Control with Sine Cosine Potentiometers

You're probably not getting any response because you want to use positioning technology the rest of us abandoned many years ago.  You could use a little PIC if you know how to program.   

RE: Servo Control with Sine Cosine Potentiometers

(OP)
Thank you for those who replied. Let me expand the description of the problem:

I have controller and motorized rotating device. The Controller is a knob the User can rotate. The rotating device is Propulsion Nozzle. Both the Controller and the Nozzle can be rotated over full 360 degrees – no limits. Both Controller and device are equipped with Sine Cosine Potentiometers.

I need the Nozzle to follow the Knob. In order to do that I need to compare output signals from the two sine cosine potentiometers and generate error signal. Error signal activate the motor and make the nozzle turn to follow the controller.

I am looking for simple (and preferably analog) way to compare outputs of the two Sine Cosine Potentiometers and generate error signal.

I expect there should be analog way to do it because the sine cosine pots were around before digital techniques came to being.


 

RE: Servo Control with Sine Cosine Potentiometers

"...compare outputs of the two [whatever] potentiometers and generate error signal."

Differential amplifiers, opamps.

Or wire one of them up backwards and simply add. Again, opamps.

"Sine Cosine" is probably just a distraction. That's why I replaced them with [whatever] above. I think it clarifies things a bit. Maybe.
 

RE: Servo Control with Sine Cosine Potentiometers

(OP)
Hi VE1BLL,
Thank you for your comments.

Unfortunately it is more complicated then that. An algorithm is required. If one simply compares say, sin output of one pot to sin output of another pot he does not know singularly where along the circle the device is located neither in which direction to apply correcting action.

I speculate both signals must be combined in some fashion and then only analyzed. There should be standard method to do it.

This is what I am trying to find out.

RE: Servo Control with Sine Cosine Potentiometers

I do not think that it is an error signal you want to compare. If so, with what are you going to compare what?

Is it possibly so that the sine/cosine signals produce an angle signal (say +10V at 90 degrees and -10V at 270 degrees) that shall be used as a setpoint for the nozzle's angle? Or are there sine and cosine potentiometers delivering actual position of the nozzle? In the latter case, you should probably use normal comparators, perhaps even opamps.

Gunnar Englund
www.gke.org
--------------------------------------
100 % recycled posting: Electrons, ideas, finger-tips have been used over and over again...

RE: Servo Control with Sine Cosine Potentiometers

Remove the two Sine Cosine pots and replace with synchros. Then go for lunch. winky smile

More seriously, I think you could use the two error signals in basically a wired-OR arrangement to drive the motor. If you used only one error signal then it could obviously get hung-up on the wrong solution. By using two in 90-degrees it forces the unique solution.

The wired-OR might be conceptually implemented with diodes, but complicated slightly by the bi-polar nature of the signals.

There might be one quadrant that this simple wired-OR approach may fail. But I'd need a drink first before I could figure it out.
 

RE: Servo Control with Sine Cosine Potentiometers

(OP)
Sine Cosine Pot example:
http://www.precisionsales.com/potentiometers/singleturn/images/pdf/SSC50S.pdf
These parts have two outputs: each output is sine value of the rotational angle of the Pot. Second output shifted from first by 90 degrees. Hence sine cosine pot.

Directly comparing two signals (say Sin1 and Sin2) does not work because due to periodicity of the function Sin will have the same value in two points around the circle.

Recovering angle from readings of sin and cos results in discontinuity every 180 degrees. Also, this method requires processor with look up table.

There should be analog method to compare sin and cos signals of one pot to sin and cos signal of another pot and derive error signal.

This is what I am trying to find

RE: Servo Control with Sine Cosine Potentiometers

"Directly comparing two signals (say Sin1 and Sin2) does not work because due to periodicity of the function Sin will have the same value in two points around the circle."

If you didn't think we knew that, why did you come here? Of course you would use both signals and that is what the other poster suggested "wired-OR arrangement". I suspect I could do a crude control with just a LM339 quad. It does take me back to the old days of working on CIMEX machines.   

RE: Servo Control with Sine Cosine Potentiometers

(OP)
"I suspect I could do a crude control with just a LM339 quad."

I bet you could not. Are you up to the challenge?

But seriously, two days ago I also thought it would be trivial. But it is not so. I made it working on PLC: I detect 4 quadrants and analyze one quadrant at a time. But this is not 'clean and nice'.

There must be strictly analog, simple solution since these parts come from pre-digital days.

 

RE: Servo Control with Sine Cosine Potentiometers

I think AndreyG was composing his 15:48 reply at about the same time as my previous post had just appeared 15:50, and thus missed the Wired-OR suggestion.

 

RE: Servo Control with Sine Cosine Potentiometers

So you get a sin and cos reading from both knob and actuator.

For the knob you have v1= sin(x) and you have v2= cos(x)

and for the actuator you have z1=sin(y)   and  z2= cos(y).

where x is the knob angle and y is the actuator angle.

Essentially you have two complex numbers and you need to know the
angle between them.

angle= angle(v1 +jv2) - angle(z1 + jz2)

angle = angle(v1-z1  + j(v2-z2))

angle = atan((v1-z1)/(v2-z2))  ( with ambiguity on which half of the plane)

I don't see any easy way to do this with just an analog circuit.


 

RE: Servo Control with Sine Cosine Potentiometers

What kind of motor are you controlling? I imagine that sine/cosine pots exist because they allowed for a simple solution to a control problem and are designed to be used with a special motor in a particular way. As was mentioned earlier synchro motors can do exactly what you want and do not require any controls. Somewhere in my collection I have a device similar to what you describe where a pot controls the position of a small motor like an old shaded pole phonograph motor. Except it is not a shaded pole. There are coils that are connected to the pot which control which way the motor rotates. As I recall the the current to these control coils were null when the pot on the motor matched the position of the control pot. There were some gears on the motor as well. It was probably 1940's vintage.

RE: Servo Control with Sine Cosine Potentiometers

That's U.S. Patent No. 6,138,131 in case that wasn't noticed.
 

RE: Servo Control with Sine Cosine Potentiometers

Ultra-simple control schemes might be flummoxed by the inversion on the far side of the circle.

Four comparators might just form the basis of a crude and workable controller, each comparator assigned to one (almost linear) quadrant. The final piece of the puzzle would be to switch control between the four outputs.

 

RE: Servo Control with Sine Cosine Potentiometers

(OP)
Hi VE1BLL, you are catching up with me.
I did on PLC sort of what you described in your last message:
I created two step procedure:
Step one determines quadrant of Knob and quadrant of Nozzle.
If quadrants are not the same I tell Nozzle to go to Knob's quadrant.
When Knob and Nozzle are in the same quadrant I compare analog readings. The comparison rule is different for each quadrant.

But again, it's like cheating with modern equipment. There must be analog way of comparing the two.
I did not look at the patent you suggested yet.
Thank you,

Andrey

RE: Servo Control with Sine Cosine Potentiometers

IRstuff found the 'patent', I just cut-and-paste the patent number from the page he linked. It's quick and easy to see the diagrams using the patent number as a search term.
 

RE: Servo Control with Sine Cosine Potentiometers

Square-up the circle:

If X is low, use Y
If Y is low, use X
If X is high, use -Y
If Y is high, use -X

Where X and Y are the two error signals.

Maybe.
 

RE: Servo Control with Sine Cosine Potentiometers

Analog Devices and others make various 4 quadrant multiplier/divider and log/antilog blocks that can approximate various trig functions via approximations such as truncated Taylor expansions and exponentials.

For example, according to my old copy of Analog Devices "nonlinear circuits handbook", arctan(Vb / Va) is approximately
pi/2 * [(Vb/Va)^1.2125] / [1+[(Vb/Va)^1.2125] over one quadrant.
A couple comparators to detect the quadrant and a couple absolute value circuits and there you go.

Of course it'll probably cost you more than a PIC or Atmel chip with a couple 10 bit ADCs and a PWM output, and there may be some glitches when you cross from one quadrant to another.  

I did something similar with an analog joystick, converting the position to a color circle and controlling a 10 watt RGB LED for a small spot light using an Arduino.

RE: Servo Control with Sine Cosine Potentiometers





Looks like the resolver synchro methods of yesteryear. Not the beat way to do it but consider the derived signal

sinA*cosB-cosA*sinB=sin(A-B)


The error is A-B . The servo "error" can be sin(A-B)used to drive the system to null error since as the error approaches 0 the sine and the angle are almost equal, thus  approaching a linear servo.
But when  A-B=+-Pi the system is unstable and will quickly go towards A=B.t can be "pushed " to speedup the response by considering the derived signal

CosAcosB+sinAsinB=cos(A-B)

At +-Pi this is =-1 so the test for null is only achieved when cos(A-B)=+1
  

RE: Servo Control with Sine Cosine Potentiometers

Just noticed that the "error" term I cited above  can be improved by dividing the 2 signals
sin(A-B)/cos(A-B) which is
tan(A-B)
For values in the range -Pi to +Pi the error has the correct polarity albeit that it is nonlinear; but similar to the sine (A-B), it behaves linearly  as the error approaches the null.

The differential equation that describes the servo dynamics for this system is approximately

JA"+CA'=Ktan(A-B)


Providing the gain K is not too large this system should be well behaved> The low frequency inherent in a follower system described makes this very attractive.i.e., as B moves A should follow very closely with proper values of K and the damping term C.

 

RE: Servo Control with Sine Cosine Potentiometers

Corrections:
sign error

JA"+CA'=-Ktan(A-B) which has the correct polarity in the range
-Pi/2 top +Pi/2

To cover the entire range
-Pi to +Pi you can use

sgn{cos(A-B)}*tan(A-B)= sin(A-B)/abs[cos(A-B)] as the error function

where
sgn means sign Of

 

RE: Servo Control with Sine Cosine Potentiometers

AndreyG,

I would be curious about your choice of a simple controller?

I think you have 2 viable simple solutions, 1 posted by IRstuff and one posted by me.

IRstuff solution is linear butI believe more complicated  since the atan is duplicit in 2 quadrants at a time .

The ones I proposed, (and now I am leaning to the sine(A-B)) solution is straightforward involving only 2 multiplications and a subtraction of signals and using only the two pairs of sine/cosine pots you have,

sinA*cosB-cosA*sinB=sin(A-B) for the range -Pi>(A-B)<Pi

BTW, this is not my invention. I believe I have seen it in the distant past and even used it some 40 years ago.

The beauty of it is that there is only one stable solution to the dynamics problem , (A-B)=0; (A-B)=+-Pi is unstable and will quickly go toward the stable solution.

This means that if you turn the system "on", no matter where the motor and joystick are the motor will go toward the null and once the motion is established the control will be linear and accurate considering the low frequency of the input.

I must say in the interest of full disclosure I am not an agent for the sin(A-B) people, but only give my opinion based on merit.


 
 

RE: Servo Control with Sine Cosine Potentiometers

(OP)
I made it working on PLC: I detect in which quadrant is controller and the motor. Move motor to the same quadrant as controller. Then I compare Sin 's or Cos ' depending which quadrant i am. I select quadrant boundaries as +/- 45 degrees (+ 90 deg increment) so Sin A is almost linear (quadrants 1, 3) or Cos A is almost linear (quadrants 2, 4).  That's the core idea.

RE: Servo Control with Sine Cosine Potentiometers

Very nice. Novel concept. I see, you get 4 linear quadrants and once you get the motor to enter the quadrant of the controller you're in the linear region where you easily get a lock and for the low frequency motion of the joystick,it will follow but what happens when the controller passes thru the quadrant boundaries. I guess you have some additional logic to make it seamless.
 
Alas,the joys of the PLC and  logic.

But I'll take the poor man's solution of sin(A-B) for my "money"... no
money, no logic.

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