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.
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
RE: Servo Control with Sine Cosine Potentiometers
RE: Servo Control with Sine Cosine Potentiometers
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
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
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
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
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
http://
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
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
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
RE: Servo Control with Sine Cosine Potentiometers
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
RE: Servo Control with Sine Cosine Potentiometers
However, as many others have already stated, a digital implementation would be quicker, more reliable, and easier to calibrate.
TTFN
FAQ731-376: Eng-Tips.com Forum Policies
Chinese prisoner wins Nobel Peace Prize
RE: Servo Control with Sine Cosine Potentiometers
RE: Servo Control with Sine Cosine Potentiometers
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
TTFN
FAQ731-376: Eng-Tips.com Forum Policies
Chinese prisoner wins Nobel Peace Prize
RE: Servo Control with Sine Cosine Potentiometers
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
RE: Servo Control with Sine Cosine Potentiometers
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
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
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
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
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
RE: Servo Control with Sine Cosine Potentiometers
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.