Digital to analog resolver converter
BACKGROUND AND PRIOR ART 
     This invention relates to digital to analog converters in general and more particularly to an improved digital to analog resolver converter. 
     A digital signal consisting of n bits can be used to represent the magnitude of an angle in radians or degrees, with the least significant bit representing 360/2 n  degrees or 2 π/2 n  radians. To simplify the discussion of the invention, all values will be stated in degrees, since radians can easily be substituted for degrees. 
     The n-bit digital signal representing the magnitude of an angle can be described by the notation 2 1  2 2  . . . 2 n . Throughout this disclosure, the most significant bit (2) will be referred to as the first bit, the second most significant bit (2 2 ) as the second bit, and so forth, down to the least significant (2 n ) or nth bit. 
     It is evident that the less significant bits of the digital input signal only represent the magnitude of the angle over a given range of angular values. For example, the fifth through nth bits represent a range of angular values from 0° to 22.5° - 360/2 n  °. 
     The prior art includes devices capable of converting a digital signal representing the magnitude of an angle to an analog signal representing the magnitude of the angle. These devices use switching networks to control the output of R-2R resistance ladders and generate an analog signal proportional to the digital input signal. One such device suitable for use in this invention is the AD7520, manufactured by Analog Devices. 
     Prior art devices also exist which generate analog resolver functions corresponding to digital inputs. One type of device utilizes a digital sensor and digital to analog converter to provide a proportional error signal to a servomechanism control shaft which positions an electromechanical resolver device to generate an output. Resolver functions can also be generated by two ladder networks or a multiplexed single ladder. Some solid state devices use programmed memory devices (&#34;look up tables&#34;) to convert a digital angle signal to digital sine and cosine signals to generate a resolver function. Other solid state devices convert digital angle values to analog tangent angle values utilizing non-linear resistance networks. These tangent angle values are related to the reference voltage in a manner similar to a resolver function output. 
     All of these devices have serious disadvantages. The use of servomechanisms for digital to resolver conversions entails substantial cost, size, weight, accuracy and life disadvantages. The two ladder method involves use of an additional ladder and creates problems in tracking accuracy of the two ladders when the temperature changes. The open multiplexed single ladder needs additional circuitry for the multiplex function, involves additional phase lag errors proportional to the ratio of the multiplex frequency to the carrier frequency, and creates variations in scale factor as a function of angle. Solid state digital angle to resolver converters with &#34;look-up tables&#34; use too many discrete parts to achieve acceptable accuracy. Digital angle to tangent angle conversion devices have difficulty in accurately approximating the tangent function with non-linear analog means. 
     SUMMARY OF THE INVENTION 
     The present invention generates analog sine and cosine values corresponding to a digital signal representing the magnitude of an angle by using chords to approximate the value of these trigonometric functions over a range of at least 45° (an octant) and then uses switching networks to generate the value of the sine and cosine functions over the entire 360° range. 
     It should be noted that the sine and cosine functions are the only trigonometric functions which are continuous over an entire 360° range of angular values. Thus in this disclosure the term &#34;continuous periodic trigonometric function&#34; will be used to refer to either the sine or cosine function. 
     By using more chords the accuracy of the approximation over a given range of angular values can be increased as desired. The error in the computation is approximately equal to 0.016L 3 , where L is the length of the chord in radians. For example, if 22.5° chord lengths are used to approximate the sine and cosine functions, the tangent function, which measures resolver performance, can be generated to within 3.3. minutes of arc. The predictable nature of the error allows error biasing, as a function of the fifth bit, which reduces the error of the tangent ratio generated to within 1.8 minutes of arc. 
     This invention has many advantages over the prior art devices. It uses a single set of electronic switches to control a common ladder network to generate the sine and cosine functions, thereby reducing complexity and cost of the converter, improving reliability, and reducing maintenance. 
     The invention synthesizes the sine and cosine functions accurately as a ratio (the tangent function) with limiting factors established on the basis of chord length. This allows desired accuracy to be obtained with a minimum of complexity of components and minimum cost and permits a more efficient interface with electromechanical devices. 
     Briefly, the invention involves the conversion of an n-bit digital signal representing the magnitude of an angle (θ) into corresponding analog sine and cosine signals. Bits representing a range of the angular value of at least 22.5° less 360/2 n  degrees are converted by a conventional device, such as the AD7520 previously mentioned, into a corresponding analog angle value. This analog value is applied to sine and cosine function generators, which use the equations of one or more chords to approximate these trigonometric functions over the range of the digital angle value. Values of higher order bits are used to choose the appropriate chord equation to generate the sine or cosine value corresponding to the analog angle value. These sine and cosine values are then applied to circuits which select the appropriate sine and cosine values for use as the value of sine θ and cosine θ for a given θ. The values of sine and cosine θ are each applied to a circuit which generates the appropriate sign for sine θ or cosine θ for a given θ. 
     In a preferred embodiment of the invention all bits of the n bit digital signal representing the magnitude of an angle (θ) from the fifth bit to the nth bit, representing an angle magnitude (B) from 0° up to 22.5°, are applied to a conventional digital to analog converter consisting, for example, of electronic switches controlling an R-2R ladder, as previously described. In odd numbered octants (e.g., 0° to 45°) a voltage is generated equal to VREF × B/22.5°, where VREF is a reference voltage. The output of the digital angle to analog angle converter is applied to sine and cosine function generators. Each of these function generators approximates the value of a trigonometric function over 45° by using two chords. For the sine function generator, the equation for the first chord (0° to 22.5°) is Y s1  = VREF (B/22.5°) M s1 , where M s1  = 0.3827. The equation for the second chord (22.5° to 45°) is Y s2  = VREF ((B/22.5°) M s2  + sin 22.5°)), where M s2  = 0.3244. For the cosine generator the equation for the first chord (0° to 22.5°) is Y c1  = VREF (1 - (B/22.5°) m c1 ), where M c1  = 0.0761. The equation for the second chord is Y c2  = VREF (cos 22.5° - (B/22.5°) M c2 ), where M c2  = 0.2168. 
     In even numbered octants (e.g. 45° to 90°), the third bit is used as a complement command to generate the voltage VREF (1 - B/22.5°). This voltage is then fed into the sine and cosine generators. The sine function is approximated over the first 22.5° of the octant by a chord with the equation Y s2  = VREF ((1 - B/22.5°) M s2  + sin 22.5°), where M s2  = 0.3244. The sine function is approximated over the second 22.5° of the octant by a chord with the equation Y s1  = VREF (1 - B/22.5°) M s1 , where M s1  = 0.3827. The cosine function is approximated over the first 22.5° of the octant by a chord with the equation Y c2  = VREF (cos 22.5° - (1 - B/22.5°) m c2 ), where M c2   = 0.2168. The cosine function is approximated over the second 22.5° of the octant by a chord with the equation Y c1  = VREF (1 - (1 - B/22.5°) M c1 ), where M c1  = 0.0761. 
     The outputs of the sine and cosine function generators are fed into octant select circuits which use the first and second bit to select the appropriate function generator output to use as sine θ and cosine θ in a particular octant. The sine θ output is fed into a sign of sine generator which uses the first bit to determine the correct sign for sine θ. The cosine θ output is fed into a sign of cosine θ generator which uses the first and second bit to generate the correct sign for cosine θ. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 illustrates the use of two chords according to this invention to approximate the sine and cosine functions over a 45° range (one octant). 
     FIG. 2 is a table showing the choice of function generator outputs and signs to generate the sine and cosine functions over a 360° range. 
     FIG. 3 is a diagram of the preferred embodiment of the invention. 
     FIG. 4 is a detailed diagram of the sine and cosine function generator used in the preferred embodiment. 
    
    
     DETAILED DESCRIPTION OF FIGS. 1, 3 AND 4 
     FIG. 1 (a) shows the values of the sine and cosine functions over a 360° range. This 360° range is subdivided into four &#34;odd numbered octants&#34; (I, III, V, and VII) and four &#34;even numbered octants&#34; (II, IV, VI, and VIII). 
     FIG. 1 (b) shows the use of two chords to approximate the sine and cosine functions in an odd numbered octant (I). The equation for the chord representing the sine function from 0° to 22.5° is: 
     Y s1  = VREF (B/22.5°) M s1 , where M s1  = 0.3827, and where 0 ≦ B ≦ 22.5° - 360°/2 n . The equation for the chord representing the sine function from 22.5° to 45° is: 
     Y s2  = VREF ((B/22.5°) M s2  + sin 22.5°), where M s2  = 0.3244. The equation for the chord representing the cosine function from 0° to 22.5° is: 
     Y c1  = VREF (1 - B/22.5°) M c1 ), where M c1  = 0.0751. The equation for the chord representing the cosine function from 22.5° to 44.5° is: 
     Y c2  = VREF (cos. 22.5° - (B/22.5°) M c2 ), where M c2  = 0.2168. 
     FIG. 1 (c) shows the use of two chords to approximate the values of the sine and cosine functions in an even numbered octant (IV). M c1 , M c2 , M s1 , and M s2  have the same values as indicated in FIGS. 1(b) and 1(c). The equation for the sine function from 135° to 157.5° is: 
     Y s2  = VREF ((1 - B/22.5°) M s2  + sine 22.5°). The equation for the sine function from 157.5° to 180° is: 
     Y s1  = VREF (1 - B/22.5°) M s1 . The equation for the cosine function from 135° to 157.5° is: 
     Y c2  = VREF (cos 22.5° - (1 - B/22.5°) M c2 ). The equation for the cosine function from 157° to 180° is: 
     Y c1  = VREF (1 - (1 - B/22.5°) M c1 ). 
     FIG. 2 shows how the output of the function generators can be used to generate an approximation of a continuous periodic trigonometric function over a 360° range of values. The 360° range of angular values is divided in four &#34;even numbered octants&#34; (II, IV, VI and VIII) and four &#34;odd-numbered octants&#34; (I, III, V, and VII). For a given octant, FIG. 2 shows whether or not the function generator input is complemented, which function generator output is used to approximate the sine and cosine functions, and the sign of the sine and cosine outputs. 
     FIG. 3 shows a preferred embodiment of the invention. The electronic gates such as gate 31 shown in FIG. 3 are all Exclusive Or gates, which have an output value of &#34;0&#34; when both input values are &#34;0&#34; or both input values are &#34;1&#34;, and an output value of &#34;1&#34; otherwise. The digital input represents the magnitude of the angle θ. The fifth through nth bits, representing the magnitude of the angle B are fed into a conventional digital to analog angle converter 11. A reference voltage (VREF) 13 at 400 hz. is also fed into the converter 11. The output 15 of the converter, which represents either VREF (B/22.5°) or VREF (1 - B/22.5°), depending on the value of the complement command 17, is fed into the sine function generator 19 and cosine function generator 21. Analog switches (preferably RCA Co4053 CMOSFETs) 23, 25, 27 and 29 controlled by an Exclusive Or gate 31 are used to select the appropriate sine function generator slopes 33 and 35, sine function generator intercepts 37 and 39, cosine function generator slopes 41 and 43, and cosine generator intercepts 45 and 47 for the approximating chords. As will be appreciated by those skilled in the art of electronic circuit design, these analog switches (such as switches 23 and 53) connect the &#34;0&#34; analog input to the output when the control input has a &#34;0&#34; value and the &#34;1&#34; analog input to the output when the control input has a &#34;1&#34; value. The sine function generator slope 33 or 35 and intercept 37 or 39 values are summed at amplifier 49. The cosine function generator slope 41 or 43 is subtracted from the intercept 45 or 47 at amplifier 51. Octant select circuits 53 and 55 controlled by an Exclusive Or gate 57 choose which of the sine generator output 59 and cosine generator output 61 will be used as the sine θ output 63 and cosine θ output 65 in a particular octant. FIG. 2 shows which output is chosen by the octant select circuits to approximate sine θ and cosine θ in each octant. A sign of sine θ circuit 65 controlled by the first bit gives the sine θ output 63 the appropriate sign to produce sine θ on line 67. A sign of cosine θ circuit 69 controlled by an Exclusive Or gate 71 gives the cosine θ output 65 the appropriate sign to generate cosine θ on line 73. The sign of sine and cosine θ circuits shown in FIG. 3 operate by subtracting twice the value of the function from the value of the function when the value of the controlling input is &#34; 1&#34;. It will be recognized by those skilled in the art of electronic circuit design that the appropriate sign can also be given to sine or cosine θ by using the controlling input to switch the sine or cosine θ input between inverting and non-inverting inputs of an amplifier. 
     FIG. 4 illustrates one embodiment of the sine and cosine function generators and octant select circuit. VREF is the reference voltage with a frequency of 400 hz. The resistors have the following values: 
     
         ______________________________________                                    
       R1          90K,                                                   
       R2          20K,                                                   
       R3          235.004K,                                              
       R4          235.004K,                                              
       R5          227.029K,                                              
       R6          262.542K,                                              
       R7          262.542K,                                              
       R8          92.137K, and                                           
       R9          20K                                                    
______________________________________                                    
 
    
     Exclusive Or gate 31 controls switch 81 to select either VREF or ground as an input to resistor R 3 , which corresponds to sine 22.5°, and resistor R 6 , which corresponds to cosine 22.5°. Thus R 3  /R 1  = 0.3827 = sine 22.5°. Exclusive Or gate 31 also controls switch 83 to switch VIN, which is the output of the digital to analog converter on line 15, to either R 4  (corresponding to M s1 ) and R 7  (corresponding to M c1 ), or to R 5  (corresponding to M s2 ) and R 8  (corresponding to M c2 ). R 9  corresponds to cosine 0°. Amplifier A1 then generates the sine function and amplfier A2 generates the cosine function. Switch 53 selects the correct function for use as sine θ and Switch 55 selects the correct function for use as cosine θ in accordance with FIG. 2 as described above. 
     Other embodiments of the basic invention are possible. By changing to more convenient chord lengths and appropriate scaling of resistor networks inputs in binary coded decimal and other codes may be converted to resolver functions. The intercepts and slopes of chords may be shared or duplicated when repeated to minimize the number of switching components. Chords may be used to approximate the trigonometric functions through a range of 90°, eliminating the need for complementing the analog angle output. The invention may be combined with storage registers or shift registers to accommodate serial digital data. The invention may be coupled with output power amplifiers to interface with high power load demands. 
     The invention may be coupled with isolation transformers to generate isolated resolver analog outputs over a wide range of voltages. The invention may be combined with a Scott &#34;T&#34; transformer to generate isolated synchro analog outputs at a wide range of line to line voltages. The invention may include multiplexing circuitry, sample and hold amplifiers, and output stages in order to generate multiple resolver and/or synchro analog voltages corresponding to multiple input digital words. Finally, the invention is capable of interfacing directly with state of the art digital hardware, i.e., DTL, TTL, CMOS. These and other modifications may be made without departing from the spirit of the invention which is intended to be limited solely by the appended claims.