POSITION CONTROL SYSTEM

Abstract: The position control system is a system for positioning the stepping motor to a target position by the closed loop control system. It performs a closed loop position control by feeding back the current position signal from the encoder linked with the stepping motor. Further, by providing a circuit for electrically compensating the phase difference corresponding to the mechanical fitting error between the stepping motor and the encoder, it can efficiently drive the stepping motor at all times at a torque angle of the most desirable range. Coupled with the closed loop position control, a high speed, high precision position control system having high reliability can be realized.

Description: The present invention relates to a position control system for controlling a position of an object using a stepping motor as a driving source, more particularly to a position control system for controlling a stepping motor by a closed loop position control system. In recent years, improvements in the performances of the information apparatuses have been remarkable. Consequently, there has been demanded a position controlling system having higher speed and higher precision in the power supply for the magnetic disc apparatus, printer, etc. Heretofore, as a power supply for these apparatuses a stepping motor has been widely used, and a system of open-loop controlling it has generally been adopted. The open-loop control system has an advantage in simplicity of a control circuit, but on the other hand, due to the constant risk of pulling out of the stepping motor, it is difficult to run it at a high speed. Another point is that, in stopping for position setting, the system is vibrated centering on the stopping point, and time is required for setting. Further, there is a limit in the accuracy of position setting. It is well known that there are various difficult problems as mentioned above in realizing a high speed, high precision position setting system. In the conventional position control system using a stepping motor, there has been required a step of delicately adjusting the phases of the polyphase current signals and the mechanical angle of the stepping motor at a certain basic position of the stepping motor. Thus, there has been a problem of remarkable lowering of the bulk productivity of the position control system. It is the principal object of the present invention to provide a position control system which is operable at a high speed with good precision, having high reliability and excellent mass productivity. A further object of the present invention is to provide a position control system capable of accurately correcting electrically a torque angle error of the stepping motor caused by a positional error between the stepping motor and an encoder for detecting the current position of the stepping motor due to a mechanical mounting error of the encoder and driving with good efficiency the stepping motor always at a torque angle of the most desirable range. In order to realize these objects, a position control system according to the present invention comprises: a stepping motor; an encoder for producing polyphase signals having different phases from one another according to a rotation of the stepping motor; current position signal generating means for generating from said polyphase signals a current position signal indicative of a current position of said stepping motor; closed loop reference position generating means for generating a closed loop reference position command for subjecting said stepping motor to a closed loop position control; error calculating means for calculating a difference between the closed loop reference position command and the current position signal and outputting an error signal indicative of the difference; operating electric angle calculating means for subjecting said error signal to a compensation calculation for the closed loop position control to obtain an operating electric angle signal indicative of a torque angle of said stepping motor; current command generating means for generating from said operating electric angle signal current commands each expressed by a predetermined mathematical function, said current commands being indicative of polyphase currents to be supplied to said stepping motor; and driving means responsive to said current commands for generating the polyphase currents and supplying the polyphase currents to the stepping motor to drive the stepping motor, characterized by further comprising: open loop reference position generating means for generating an open loop reference position command for subjecting said stepping motor to an open loop position control; angle adjusting means for generating an angle adjusting signal proportional to a torque angle error caused by a positional error between said stepping motor and said encoder; and control signal generating means for generating a control signal from said open loop reference position command under the open loop position control and from said operating electric angle signal, said current position signal and said angle adjusting signal under the closed loop position control; wherein said current command generating means is adapted for generating said current commands from said control signal. Preferably, the position control system of the present invention may be so constructed that the angle adjusting signal is automatically detected with the angle adjusting part by subjecting the stepping motor to reciprocal movement under the open loop position control. By the above construction, according to the position control system of the present invention, the current position of the stepping motor is at all times detected by the use of an encoder and an electronic scale part and the detected value is fed back to the control system so as to constitute a closed loop position control system. Accordingly, there is no case of pull-out even under a transitional condition. In comparison with the conventional case of using a stepping motor under the open loop position control, it is possible in the present invention system to exhibit sufficiently the performance of the stepping motor, so that a high speed, high reliable position controlling system can be realized. Further, by conducting a differential compensation with an operating electric angle calculating part, electric damping can be given to the stepping motor, so that the stepping motor can be quickly set to a reference position under suppression of vibration to a highest possible degree, and a quick response necessitated in the position control system is obtainable. Further, as the control system is operated to reduce the steady-state deviation generated between the command position and the current position to naught by the compensate integral held by the operating electric angle calculating part, it is possible to realize a position control system having a high accuracy of position setting. Moreover, as the position control system of the present invention adopts a system which adjusts a torque angle error of the stepping motor caused by a positional error between the stepping motor and the encoder by using an angle adjusting signal, it is possible to drive the stepping motor efficiently at all times at the torque angle of most desirable range and to operate the system at a high speed. Further, as it is possible to omit a delicate mechanical adjusting step for adjusting a torque angle error of the stepping motor caused by a positional error of the encoder relative to the stepping motor, it can greatly contribute to improvement of productivity. Accordingly, the present invention can provide a position control system of high speed, high precision, high reliability and high mass productivity, with settlement of the conventional problems. Fig. 1 is a block diagram of the position control system in the first embodiment of the present invention; Fig. 2 is a block diagram showing the concrete constructions of the address generator and the function generating circuit; Fig. 3 is a block diagram showing the first embodiment of the electronic scale circuit; Fig. 4 is a block diagram showing the second embodiment of the electronic scale circuit; Fig. 5 is a block diagram showing the concrete construction of the modulation circuit to be used in the electronic scale circuit; Fig. 6 is a block diagram showing the position control system in the second embodiment of the present invention; Fig. 7 is a view to show the basic flow chart of the contained program stored in the memory of Fig. 6; Fig. 8 is a block diagram of the position control system in the third embodiment of the present invention; Fig. 9 is a block diagram showing the first embodiment of the angle adjusting circuit in Fig. 8; Fig. 10 is a block diagram showing the second embodiment of the angle adjusting circuit in Fig. 8; Fig. 11 is a block diagram of the position control system in the fourth embodiment of the present invention; Fig. 12 is a block diagram of the position control system in the fifth embodiment of the present invention; Fig. 13 is a principle drawing for illustrating the principle of the angle adjusting circuit; and Fig. 14 is a block diagram to show the construction of the embodiment of the angle adjusting circuit. Preferred embodiments of the position control system of the present invention will be described hereinafter with reference to drawings. In the following description, the signals and the values representing the signals are described in the same marks. Fig. 1 is a block diagram showing the whole construction of the first embodiment of the position control system of the present invention. In Fig. 1, motor 2 is a rotary stepping motor, for which a two-phase motor is used in the present embodiment. Incrementary type encoder 1 is fixed to a rotary shaft of the step motor 2, and outputs the 2-phase sine wave-like position signals a and b which are different in phase by 90° according to its rotation and a basic position signal z to show the basic position. The electronic scale circuit 3 produces a current position signal c which is linearly proportionate to the amount of deviation in rotation from the basic position by the sine wave-like position signals a and b. Subtractor 5 calculates a difference between a closed loop reference position command s given from the second reference position generator 9 and the current position signal c to output an error signal e (= s - c). The operating electric angle calculation circuit 6 gives integral and differential compensations, etc. to the error signal e to produce an operating electric angle signal f. The first reference position generator 10 generates an open loop position command t for subjecting the stepping motor 2 to open loop position control. An angle adjusting circuit 4 outputs an angle adjusting signal d corresponding to a torque angle error caused by a positional error between the stepping motor 2 and the encoder 1. Address generator 11 outputs, during the closed loop position control, an address signal r with the inputs of the operating electric angle signal f, the current position signal c, and the angle adjusting signal d, and, during the open loop position control, an address signal r with the input of the open loop reference position command t. Function generating circuit 7 calculates microstep current commands sc and ss indicative of 2-phase currents to be supplied to the stepping motor 2 pursuant to certain functions (in this embodiment, sine wave and cosine wave, respectively) according to the address r. The 2-phase microstep current commands sc and ss are amplified by the power amplifier 8 and supplied to the stepping motor 2. In the position control system of the present invention, it is necessary to initialize, at the time of energizing with power, the electronic scale circuit 3 and the second reference position generator in which the values are apt to become unstable (to be referred to as initialization of the system). In initializing the system, firstly the open loop reference position command t is time-proportionally varied to rotate the stepping motor 2 to the position indicated by the basic position signal z by the open loop control. The first reference position generator 10 realizes the reference position command by the use of a kind of counter which shows increase or decrease in its output value in a certain time cycle. The open loop reference position command t is used for generating the microstep current commands sc and ss by the address generator 11 and the function generating circuit 7. These microstep current commands sc and ss are amplified by the power amplifier 8 to rotate the stepping motor 2. Accordingly, the stepping motor 2 is driven stepwise in a certain direction coordinate to the increase of the open loop position command t. And, when the basic position signal z outputted by the encoder 1 through the rotation of the stepping motor 2 reaches the position of change from "L level" to "H level" (or the position of change from "H level" to "L level"), the first reference position generator 10 causes to stop the increase of the increment counter to fix the amount of the reference position command, and the stepping motor 2 also stops at its position. The angle adjusting circuit 4 receives the open loop position command t outputted from the first reference position generator 10 at that time and outputs the same as the angle adjusting signal d. Further, at this position, the electronic scale circuit 3 and the second reference position generator 9 are respectively initialized (in this embodiment, to be cleared to zero). As described above, after completion of the processing for initialization, the position control system performs normal closed loop position control. In the closed loop position control, position setting is so made that the closed loop position command s outputted by the second reference position generator 9 agrees with the current position signal c outputted by the electronic scale circuit 3. The closed loop position command s and the current position signal c are inputted into the subtraction circuit 5 to become an error signal e (= s -c). Operating electric angle calculation circuit 6 utilizes the error signal e as an input, provides it with calculation of differential and integral compensations, and outputs an operating electric angle signal f. Operation of the integral compensation is realized by a primary digital filter having a low frequency high gain characteristic. Operation of the differential compensation is realized by a digital filter having a primary high frequency high gain characteristic and the like. The integral compensation operates in a manner to reduce as much as possible the steady-state deviation produced under effect of the friction load and the like, and the differential compensation gives electrical damping to the stepping motor 2. Accordingly, the stepping motor 2 can be quickly set to the target position under the condition of the vibration being suppressed, and further the position control system is stabilized. In the closed loop position control, the inputs of the address generator 11 are the generated electric angle signal f, current position signal c, and angle adjusting signal d, and the outputs are the micro-step current commands sc and ss. These micro-step current commands are amplified by the power amplifier 8 as in the case of the initialization of the system to drive the stepping motor 2. Figures 2 through 5 are the drawings for illustrating the embodiments of each construction element of the first embodiment of the present invention shown in Fig. 1. Detailed explanation will be given hereinafter with reference to these drawings. In the present embodiment, in order to simplify the explanation, description will be made on the case where the scale (= resolution) of the current position signal c and that of the address signal r are identical. Fig. 2 is a block diagram showing one embodiment of the address generator 11 and the function generating circuit 7. ROMs 24 and 25 are each a PROM containing data to current commands for micro-steps each corresponding to the basic one pitch P of the stepping motor 2 following a certain function (in this embodiment, sine waves of mutually different phases at 90°). The means of calculating the address r for these PROMs 24 and 25 are the first adder 21, second adder 22, and upper bit data omitting circuit 23. The first adder 21 performs addition of the current position signal c and the operating electric angle signal f. The second adder 22 performs addition of the output of the first adder 21 and the angle adjusting signal d. The angle adjusting signal d is used to give a certain offset to the address r to PROMs 24 and 25. That is to say, the phases of the micro-step current commands sc and ss shift by the amount corresponding to d. Consequently, even in the case where the mechanical rotational angle of the stepping motor 2 and the phase of a micro-step current command are deviated from each other to cause a phase difference, the size of the angle adjusting signal d is varied in proportion to the phase difference, so that these two factors can be accurately correlated and the stepping motor 2 can be efficiently driven at all times at the torque angle in the most desirable range. Upper bit data omitting circuit 23 is not essentially necessary, because, if the operable range of the stepping motor 2 is within the basic one pitch P from the basic position, the output of the second adder 22 may be used as such as the address r of PROMs 24 and 25. However, when the movable range exceeds the basic one pitch P, the circuit 23 is necessary in order to omit the upper bit data for the portion exceeding one pitch out of the output of the second adder 22. Fig. 3 is a block diagram showing the first embodiment of the electronic scale circuit 3 in the position control system of Fig. 1. The 2-phase sine wave-like position signals a and b from the encoder are converted into the square waves g and h respectively by the wave shaping circuits 30a and 30b and inputted into the pulse dividing circuit 31. The square waves g and h are separated into up-count pulse (UP) and down-count pulse (DOWN) by the pulse dividing circuit 31 according to the direction of rotation of the stepping motor 2. By counting them with the up/down counter 32, there can be obtained a current position signal c proportionate to the amount of variation of rotation of the stepping motor. However, as the up/down counter 32 has its value unstable at the initial stage of power input, it is cleared to zero at the basic position by the basic position signal z to be inputted to the initial reset input terminal 33 at the initialisation of the system. In the case of the electronic scale circuit 3 constituted as above, because the resolution of the encoder 1 corresponds as such to the resolution of the position, it is necessary to use an encoder 1 having a high resolution in order to expect position control at high precision. Fig. 4 is a block diagram showing the second embodiment of the electronic scale circuit 3. Amplifiers 41a and 41b are the position signal amplifiers for amplifying the 2-phase sine wave-like position signals a and b respectively outputted by the encoder 1. Modulation circuits 42a and 42b are the kinds of multipliers for modulating the high frequency carrier signals 46a and 46b respectively with the 2-phase sine wave outputs of the position signal amplifiers 41a and 41b. Carrier signal generator 40 effects frequency division of the reference clock signal of the reference oscillator 47 to prepare the carrier signals 46a and 46b. These two carrier signals 46a and 46b are in deviation of phases by 90° to each other, and are inputted to the modulation circuits 42a and 42b from the carrier signal generator 40. Adder 43 adds up the modulation outputs of the modulation circuits 42a and 42b. Low pass filter 44 eliminates the harmonic components of the modulation output added up with the adder 43 and takes out the fundamental wave component only. Wave shaping circuit 45 converts the above fundamental wave into a square wave. Assuming the 2-phase sine wave outputs of the position signal amplifiers 41a and 41b to be EA (Θ) and EB (Θ), respectively, the following expressions can be given: EA (Θ) = E·COS (2π Θ/Θ p ) EB (Θ) = E·SIN (2π Θ/Θ p ) where, Θ is a rotary angle of the stepping motor 2, Θ p is 1 cycle pitch of sine wave to be outputted by the encoder 1, and E is an amplitude of the sine wave position signal. On the other hand, assuming the carrier signals 46a and 46b to be CA(t) and CB(t), respectively, the following expression can be obtained: CA(t) = COS(2π fct) CB(t) = SIN(2π fct) where, fc is a carrier frequency. Assuming the result of addition up with the adder after the modulation with the modulation circuits 42a and 42b to be P(t, Θ), the following data are obtained: P(t, Θ) = EA(Θ) . CA(t) + EB(Θ) . CB(t) = E{COS(2π Θ/Θ p ) . COS(2π fct) + SIN(2π Θ/Θ p ) . SIN(2π fct)} = E COS(2πfct - 2π Θ/Θ p ). This means that the carrier having the frequency of fc includes a phase term of 2π Θ/Θ p . In other words, in P(t, Θ), the position information Θ is converted into the form of position information. Accordingly, by demodulating the position information P(t, Θ) the position of the stepping motor 2 can be identified. Now, as the signal P(t, Θ) obtained by addition after modulation cannot be utilized as such, it requires to be demodulated and the position information only has to be taken out by separation. In the embodiment of the present invention, there is used a demodulation system such that, after converting the signal P(t, Θ) into a square wave with the wave shaping circuit 45, the phase deviation of the signal P(t, Θ) to the carrier signal 46a is directly counted by using the reference clock signal outputted by the reference oscillator 47, by which the position information having high resolution is taken out. Counter 48 is a phase difference counter for counting the phase information of the signal P(t, Θ). The inputs of the phase difference counter are the carrier signal 46a, the signal of P(t, Θ) converted into a square wave with the wave shaping circuit 45, and the reference clock signal outputted by the oscillator 47. Phase difference counter 48 starts to count the reference clock signal by the rise (or decay) of the carrier signal 46a, and continues counting until it detects the rise (or decay) of the signal P (t, Θ). By constituting as such, it is possible to take out the phase information (2πΘ/Θ p ) contained in the signal P (t, Θ) as a count value of the phase difference counter 48. Further, as the frequency of the carrier signal 46a is fc, by using a reference clock signal having a frequency of n times the frequency fc, it becomes possible to measure the phase having a resolution of 1/n to 1 cycle. This means to have a resolution of 1/n to the phase 2π, and as the phase 2π corresponds to 1 cycle pitch Θ p of the sine wave position signal outputted by the encoder 1, it means to have made 1/n interpolation at equal distance of 1 cycle pitch Θ p of the position signal to the angle of rotation. Accordingly, in order to increase the resolution and obtain smooth position information, it may be so set as to make Θ p small and n large. Frequency dividing circuit 40 divides the output of the oscillator 47 to 1/n and outputs the 2-phase carrier signals 46a and 46b. By the way, the contents of the phase difference counter 48 are n in the maximum, having the phase discriminating capacity only within the range of the 1 cycle pitch Θ p of the position signal. Accordingly, in order to make the operation in such a broad range as is necessitated with the actual position control device possible, an up/down counter 50 is provided to count the number at which the position signal has exceeded the 1 cycle pitch Θ p . Pulse separating circuit 49 separates the pulse into up-count pulse and down-count pulse, respectively, according to each change of the content of the phase difference counter 48 to o → n or n → o. The up/down counter 50 performs up-count or down-count under the up-count pulse or down-count pulse. Terminal 51 is the original point/initial time reset input, in which a basic position signal z showing the basic position is inputted. Position counter 52 synthesizes the content of the up/down counter 50 and the content of the phase difference counter 48 to the upper bit part and the lower bit part, respectively, and outputs the position data i. Subtractor 54 calculates the difference between the position data i given from the position counter 52 and a certain latch zx given from the latch 53 and outputs the current position signal c (= i - zx). Here, explanation is given on the latch zx. The electronic scale circuit 3 requires to be initialized in the initialization of the system. The reason for it is because the value of the position counter 52 becomes unstable after the power input, so that it is necessary to give the initial value corresponding to the basic position. However, when an electrical interpolation system as in the embodiment of Fig. 4 is used, it is only the contents of the up/down counter 50 that can be simply initialized (in this embodiment, cleared to zero), and it is not possible to initialize even the contents of the phase difference counter 48 which are the interpolation information in 1 cycle pitch Θ p of the sine wave-like position signals a and b. On the other hand, as the closed loop reference position command s which is the output of the second reference position generator 9 is cleared at the position of the basic position signal z to become zero, deviation occurs between the two. Accordingly, in this embodiment, firstly the value zx of the interpolation counter 48 (= lower bit portion of the position counter 52) at the time when the step motor 2 is positioned at the basic position indicated by the basic position signal z is memorized in the latch 53. Thereafter, the balance after subtraction of a certain latch zx from the position data i is taken as the current position signal, by which the problem of initialisation is settled. Fig. 5 is one embodiment of the modulation circuits 42a and 42b. Signal 55 is a sine wave output E(Θ) of the position signal amplifier 41a or 41b. Amplifier 56 is an inverting amplifier (gain 1). Switch 57 is a semiconductor switch controlled by the carrier signal (frequency fc) 46. Semiconductor switch 57 is so constructed as to transmit the position signal E(Θ) as such when the carrier signal 46 is at "H level", and to transmit the inverted position signal -E(Θ) when the carrier signal 46 is at "L level", thereby obtaining a modulation output 58 as illustrated. By the above construction, the sine wave-like position signals a and b are converted into the current position signal c having high resolution in proportion to the amount of variation of rotation. In general, an encoder having high resolution is difficult to manufacture and expensive. However, when such an electrical interpolation circuit is used, sufficiently fine current position signal can readily be obtained even from a relatively low priced encoder having coarse resolution. Accordingly, it becomes possible to make the step width of the stepping motor 2 finer, and to realize a position control system of a higher precision. In the above embodiment as shown in Fig. 1, exemplification was given on the case of realizing the difference circuit 5, operating electric angle calculation circuit 6, address generator 11, function generating circuit 7, angle adjusting circuit 4, and the first reference position generator 10 respectively by hard ware. Needless to say, however, these construction elements may be treated like a program by using a computer, thereby making it possible to realize the similar functions. Also, in the embodiment of the electronic scale circuit 3 as shown in Fig. 4, the latch 53 and the subtraction circuit 54 may conveniently be subjected to program-like treatment. Fig. 6 shows the construction in such a case. Fig. 6 is a block diagram of the position control system in the second embodiment of the present invention. With respect to the same elements as those shown in Fig. 1, the same numbers have been assigned and description omitted. Processing unit 60 employs a micro-processor. The processing unit 60 is operated in accordance with the later described prescribed internal program stored in the ROM range (Read-On-Memory range) of the memory 61. Hereinafter explanation will be given on the internal program stored in the ROM range of the memory 61. Fig. 7 shows a basic flow chart of said program. The ensuing explanation will be taken in accordance with this figure, with limitation to the case where an embodiment shown in Fig. 4 is used for the electronic scale circuit 3. Process 70 is a confirmatory process of the operation mode command, in which, for initialization of the system, the step goes to Process 71, and for normal closed loop position control, to Process 80, respectively. After the power input, initialization of the system is firstly selected. Process 71 corresponds to the first reference position generator 10. This is a processing routine for producing an open loop position command t which increases at intervals of a certain time. Concretely, the content of the open loop reference position command register allocated to a certain address in the RAM range and a constant value k are added, and the result is taken into the open loop reference position command register. The constant value k at this time corresponds to the step width in driving the stepping motor 2 in open loop stepping. Process 72 corresponds to the upper bit data omitting circuit 23 in the address generator 11, in which, of the contents of the open loop reference position command register, the upper bit data of the portion exceeding the basic 1 pitch P of the stepping motor 2 are subjected to omitting, and the result thereof is stored in the address register allocated to the RAM range. In Process 73, utilizing the contents of the address register stored in Process 72 as an address to the memory 61, by referring to the function tables of sine wave and cosine wave which are stored in ROM range of the memory 61, the 2-phase signals sc and ss are obtained, and they are respectively outputted to the driving circuit 8. By this procedure, the stepping motor 2 rotates by 1 step at the stepping width corresponding to a certain value k. Process 74 is a process to confirm whether or not the stepping motor 2 has shifted to the position of the basic position signal z. If the shifting has been completed, the step goes to the process 75, and if not yet completed, after a certain time waiting in process 75, the steps 71 through 74 are repeated. When the step motor 2 reaches the position of the basic position signal z, the electronic scale circuit 3 and the second reference position generator 9 are initialized by the basic position signal z. In Process 76, the contents of the open loop reference position command register at that time are stored in an angle adjusting signal register allocated to the RAM range as the angle adjusting signal d. In Process 77, the position data i, which is the output of the position counter 2 in the electronic scale circuit 3, is taken in and stored in the latch register allocated to the RAM range. This latch is defined as zx. Processes 80 through 84 are the normal closed loop position control mode processes. Process 80 waits an interruption from the timer. The timer generates an interruption signal at intervals of a prescribed time ΔT, and on interruption the step shifts to Process 81. That is to say, the following processing is performed by the sampling time ΔT. Process 81 includes the subtraction circuit 54. Here, the closed loop reference position command s and the position data i are respectively taken in and stored in the reference position register allocated to the RAM range and the current position register. Then, the latch zx stored in the latch register in Process 76 is subtracted from the stored position data i, and the result thereof is stored as the current position signal c in the current position register. Process 82 corresponds to the operating electric angle calculation circuit 6. Here, in order to position the stepping motor 2 at the target position, the difference between the content s of the reference position register and the content c of the current position register is calculated to obtain an error signal e (= s - c). Further, based on the error signal e, a digital filter operation of integral compensation and differential compensation is conducted to produce an operating electric angle amount f, which is stored in the operating electric angle register allocated to the RAM range. Process 83 corresponds to the first adder 21, second adder 22, and upper bit data omitting circuit 23 in the function generating circuit 7. Here, addition of the data of the current position register and the operating electric angle register is performed, and further the result thereof and the content of the angle adjusting signal memory register are added. Then, of the amount obtained there, the upper bit data of the portion in excess of the basic 1 pitch P of the stepping motor 2 is omitted and the result is stored in the above address register. In Process 84, utilizing the contents of the address register stored as an address to the memory 61, by referring to the function tables of sine wave and cosine wave which are stored in ROM range of the memory 61, the 2-phase signals sc and ss are obtained, and they are respectively outputted to the driving circuit 8. After this process, Processs 80 through 84 are repeatedly executed until a command to shift to a separate mode is given from an external source. In the angle adjusting circuits used in the first embodiment and the second embodiment of the position control system as explained above, the simplest torque angle error adjusting system for adjusting a torque angle error caused by the positional error between the stepping motor and the encoder is used. Although they are effective in the case where the stepping motor or the object to be driven by the stepping motor has a small load (friction load, etc.), when it has a large friction load, there is a possibility of taking in an erroneous angle adjusting signal d. The third embodiment to be next explained is to cover the above defect, and is more preferred embodiment. Fig. 8 is a block diagram showing the whole construction of the third embodiment of the position control system according to the present invention. In the present embodiment the point of difference from the first embodiment shown in Fig. 1 is only in the angle adjusting circuit 18, so that the following explanation will be limited to the related part. In the angle adjusting circuit 18 in this embodiment, the output t of the first reference position generator is not used as a angle adjusting signal d, as shown in the drawing. Using another drawing, the angle adjusting circuit in this embodiment will be explained in detail below. Fig. 9 is the first embodiment of the angle adjusting circuit 18 shown in Fig. 8. To the terminal 17 a reference voltage V is inputted. The two ends of the variable resistor 12 are connected to the reference voltage V and the ground. A voltage v is outputted from the other end. A/D converter 13 effects analog - digital conversion of the voltage v. By adjusting the above voltage v, an angle adjusting signal d is outputted according to the positional error between the stepping motor 2 and the encoder 1. Here, explanation is given on the angle adjusting signal d. Now, consideration is made on the case where, assuming the angle adjusting signal d and the quantity of the operating electric angle f to be zero and the position or the rotational angle of the stepping motor 2 to be X, there is a difference ed between positions of the stepping motor 2 and the encoder 1. In this case, the current position signal c obtained from the encoder 1 becomes: c = X + ed . As this signal becomes the address r in the function generating circuit 7, the stepping motor 2 generates a torque corresponding to the difference ed from the current position X. The angle adjusting circuit 18 is adjusted to make this torque zero, i.e., to make the angle adjusting signal d : d = -ed . Concretely, the variable resistor 12 is adjusted so that the result d of A/D conversion of the output voltage v becomes -ed. Since the variable resistor 12 is a kind of the nonvolatile memory, if it is once adjusted, it does not necessitate any adjustment thereafter. If necessary, reference may be made to an angle adjusting signal d which is an output of the A/D converter 13. Fig. 10 shows the second embodiment of the angle adjusting circuit 18 as shown in Fig. 8, representing one example of the digital code generating circuit. To the terminal 14 the reference voltage V is inputted. Dip switches 16 are provided in the moderate number. Fixed resistors 15 are provided in the same number as that of the dip switches 16. The two ends of each fixed resistor are connected to the reference voltage V and the dip switch 16. From each connecting point between the fixed resistor 15 and the dip switch 16, an angle adjusting signal d corresponding to the torque angle error caused by the positional error between the stepping motor 2 and the encoder 1 is outputted. As this angle adjusting signal d has basically the same action as that of the embodiment shown in Fig. 9, detailed explanation thereon is omitted, but adjustment may be so made that the angle adjusting signal d (digital code) to be generated by the setting of the dip switch becomes -ed. In this embodiment as well, if adjustment is first made, no subsequent adjustment is necessary. Fig. 11 is a block diagram showing the fourth embodiment of the position control system of the present invention, which shows the construction of the case where, of the construction elements of the third embodiment shown in Fig. 8, the subtractor 5, generating electric angle calculation circuit 6, function generating circuit 7, first reference position generator 10, and address generator 11 are realized by software by using the processing unit 60 and the memory 61. The angle adjusting circuit used in the third embodiment and the fourth embodiment of the position control system as explained above permits correct angle ajustment without respect to the load (such as friction load) of the stepping motor or of the object to be driven by the stepping motor, but, due to the necessity for providing a process for adjusting the relative position between the stepping motor and the encoder in manufacture, it is relatively low in mass productivity. The fifth embodiment to be described hereinafter is the most preferred embodiment in comparison with the foregoing first to fourth embodiments. Fig. 12 is a block diagram showing the fifth embodiment of the position control system of the present invention. In this embodiment, the portion different from the first embodiment shown in Fig. 1 is only the angle adjusting circuit 19, so that the explanation will be limited to that part. The angle adjusting circuit 19 generates an angle adjusting signal d by using the current position signal c and the address signal r. By way of a separate drawing, detailed explanation will be given on the angle adjusting circuit 19 below. Fig. 13 is a principle drawing for illustrating the principle of the angle adjusting circuit 19 shown in Fig. 12. Fig. 13(a) shows an example of the open loop reference position command t for the case of making the positional error adjustment between the stepping motor 2 and the encoder 1. As shown in the drawing, it is assumed that the open loop reference position command t shows an increase in its value time-proportionally from the point A and a decease in its value time-proportionally from the point B. The relation between the address signal r and the current position signal c shown by the electronic scale circuit 3 when such an open loop reference position command t is given is shown in Fig. 13(b). As to the locus of the current position signal of the stepping motor 2 when reciprocated under the open loop reference position command t, a hysterisis loop as shown in this figure is drawn under the effect of the friction load and the magnetic hysterisis of the stepping motor 2. If there is no friction load or magnetic hysterisis, the locus of the current position signal becomes as shown in the point and dash line 20. However, as the scales (= resolutions) of the current position signal c and the address signal r are assumed to be identical here, the tilt of the point and dash line becomes 1. Here, assuming that the sizes of the above friction load and the magnetic hysterisis are constant without depending on the direction of rotation of the stepping motor 2, the reference address has just the central value of the address α and the address β. Accordingly, in order to obtain the quantity of the angle adjusting signal d, the address α and the address β may be obtained. The angle adjusting signal d is obtainable by such procedures that the stepping motor 2 is rotated to bring the current position signal c in accord with the adjusting position, at which time the addresses α and β respectively are taken in and the operation of; d = α + (β - α)/2 is performed. The angle adjusting signal d thus obtained is used at the time of the closed loop position control. As the scales (= resolutions) of the current position signal c and the address signal r are made identical here, the angle adjusting signal d may be similarly obtainable by such procedures that the stepping motor 2 is subjected to an open loop position control by the open loop reference position command t shown in Fig. 13(a), and the current positions α' and β' when the address signal r at that time comes to agree with a certain reference address are respectively taken in and the operation of: d = α' + (β' - α')/2 is performed. Further, in the case where the resolutions of the current position signal c and the address signal r are different and there is a relation of r = q.c, similar result can be realized by using the product of the address compensating signal d obtained above multiplied by q as the address compensating signal d. Fig. 14 is a block diagram showing the construction of one embodiment of the angle adjusting circuit 19. The same constitution elements as those shown in Fig. 1 are indicated with the same numbers and explanation thereof is omitted. Also, it is assumed that, as to the open loop reference position command t, the same one as that of Fig. 13(a) is given. When the open loop reference position command t is given and the stepping motor 2 rotates, the current position signal c varies accordingly. Comparing circuit 62 is so constructed that the said current position signal c is compared with the adjusting position signal provided in advance with a suitable value, and, when the two values come to agree, the gate signals g1 and g2 are outputted. However, it is so made that the gate signal g1 is generated in the course of the variation of the open loop reference position command t from the point A to the point B and the gate signal g2 is generated in the course of the variation of the open loop reference position command t from the point B to the point C. By so constituting, in the first latch 63, the address β shown in Fig. 13(b) is memorized, and in the second latch 64, similarly the address α is memorized. On these memorized addesses α and β the calculating circuit 65 provides the operation of: d = α + (β - α)/2 . The angle adjusting signal d can be automatically detected by the above construction. Needless to say, the fifth embodiment of the position control system as explained above can be readily realized by changing the program to be stored in the memory 61 under the construction of the second embodiment shown in Fig. 6. In the first through the fifth embodiments of the position control system, with respect to the encoder 1, stepping motor 2, and electronic scale circuit 3, explanation was made limitatively on the case of the 2 phase ones, but similar effect can be obtained with 3 or more phase ones, respectively. Further, in the above description, the embodiments of the present invention were explained with the rotary type stepping motor and encoder, but the invention is of course applicable by the use of a driving source of linear movement such as a linear motor and a linear scale. In the above explanation, it is assumed that the encoder is directly connected with the rotary shaft of the stepping motor, but it may of course be fixed to a movable means to be driven in accordance with the rotation of the motor. In the above embodiment, explanation has been made on the case of obtaining a basic position signal z to show the basic position from the encoder 1, but the invention is not limited thereto. Further, in the above embodiments, explanation is made such that the function data having a phase difference at 90° to each other to be stored in the ROM in the function generating circuit are to be prepared by the basic 1 pitch portion of the stepping motor. However, with respect to the elements having symmetry such as sine wave, the system may be realized by taking the function data to be stored in the ROM to be a part of 1 pitch portion and generating the rest by an operation with symmetry taken into consideration.

Claims: A position control system comprising: a stepping motor (2); an encoder (1) for producing polyphase signals having different phases from one another according to a rotation of the stepping motor; current position signal generating means (3) for generating from said polyphase signals a current position signal indicative of a current position of said stepping motor; closed loop reference position generating means (9) for generating a closed loop reference position command for subjecting said stepping motor to a closed loop position control; error calculating means (5) for calculating a difference between the closed loop reference position command and the current position signal and outputting an error signal indicative of the difference; operating electric angle calculating means (6) for subjecting said error signal to a compensation calculation for the closed loop position control to obtain an operating electric angle signal indicative of a torque angle of said stepping motor; current command generating means (7) for generating from said operating electric angle signal current commands each expressed by a predetermined mathematical function, said current commands being indicative of polyphase currents to be supplied to said stepping motor; and driving means (8) responsive to said current commands for generating the polyphase currents and supplying the polyphase currents to the stepping motor to drive the stepping motor, characterized by further comprising: open loop reference position generating means (10) for generating an open loop reference position command for subjecting said stepping motor to an open loop position control; angle adjusting means (4, 18, 19) for generating an angle adjusting signal proportional to a torque angle error caused by a positional error between said stepping motor and said encoder; and control signal generating means (11) for generating a control signal from said open loop reference position command under the open loop position control and from said operating electric angle signal, said current position signal and said angle adjusting signal under the closed loop position control; wherein said current command generating means (7) is adapted for generating said current commands from said control signal. A position control system according to claim 1, wherein said angle adjusting means (18) comprises: means (17) for generating a reference voltage V; means (12) for converting the reference voltage V to an optional voltage v; and means (13) for converting the optional voltage v to a digital code, the digital code being outputted as said angle adjusting signal. A position control system according to claim 1, wherein said angle adjusting means (18) comprises digital code generating means (14, 15, 16) for generating a digital code representing said angle adjusting signal. A position control system according to claim 3, wherein said digital code generating means (14, 15, 16) comprises: a reference voltage source (14) for generating a reference voltage; and plurality of switch circuits (15, 16) each comprising serially connected resistor (14) and dip switch (16), each of the plurality of switch circuits being connected at one end thereof to the reference voltage source and at the other end thereof to the ground so that the digital code is obtained from connecting points between the resistors and the dip switches. A position control system according to claim 1, wherein said angle adjusting means (4, 18, 19) subjects said stepping motor to reciprocal movements under the open loop position control using the open loop reference position command to detect said torque angle error. A position control system according to claim 5, wherein said angle adjusting means (19) comprises : comparing means (62) for comparing the current position signal with a predetermined adjusting position signal when said stepping motor is subjected to reciprocal movements under the open loop position control using the open loop reference position command, said comparing means generating a first gate signal when the current position signal becomes equal to the predetermined adjusting position signal during a forward movement of said stepping motor and a second gate signal when the current position signal becomes equal to the predetermined adjusting position signal during a reverse movement of said stepping motor; first memory means (63) responsive to said first gate signal for storing therein the control signal at the time when the current position signal becomes equal to the predetermined adjusting position signal during the forward movement of said stepping motor; second memory means (64) responsive to said second gate signal for storing therein the control signal at the time when the current position signal becomes equal to the predetermined adjusting position signal during the reverse movement of said stepping motor; and means (65) for calculating a difference between contents of said first and second memory means and dividing the calculated difference into 1/2 to produce said angle adjusting signal. A position control system according to claim 5, wherein said angle adjusting means (19) comprises: comparing means (62) for comparing the control signal with a predetermined adjusting control signal when said stepping motor is subjected to reciprocal movements under the open loop position control using the open loop reference position command, said comparing means generating a first gate signal when the control signal becomes equal to the predetermined adjusting control signal during a forward movement of said stepping motor and a second gate signal when the control signal becomes equal to the predetermined adjusting control signal during a reverse movement of said stepping motor; first memory means (63) responsive to said first gate signal for storing therein the current position signal at the time when the control signal becomes equal to the predetermined adjusting control signal during the forward movement of said stepping motor; second memory means (64) responsive to said second gate signal for storing therein the current position signal at the time when the control signal becomes equal to the predetermined adjusting control signal during the reverse movement of said stepping motor; and means (65) for calculating a difference between contents of said first and second memory means and dividing the calculated difference into 1/2 to produce said angle adjusting signal. A position control system according to claim 7, wherein said angle adjusting means ( 19) further comprises means for multiplying said difference divided into 1/2 by a predetermined coefficient to produce said angle adjusting signal. A position control system according to claim 1 or 5, wherein said current position signal generating means (3) comprises: means (47, 40) for generating a carrier signal; modulating means (42a, 42b, 43) for modulating the carrier signal with the polyphase signals outputted from the encoder to obtain a modulated carrier; and demodulating means (44, 45, 47-54) for demodulating phase information of the modulated carrier to obtain said current position signal. A position control system according to claim 1 or 5, wherein said operating electric angle calculating means (6) includes a differential compensation filter. A position control system according to claim 10, wherein said operating electric angle calculating means (6) further includes an integral compensation filter for compensating the stepping motor so as not to generate a steady-state deviation in response to the closed loop reference position command. A position control system according to claim 1 or 5, wherein said control signal generating means (11) includes: adding means (21, 22) for adding the operating electric angle signal, the current position signal and the angle adjusting signal; and means (23) for omitting upper bit data from an output of the adding means. A position control system according to claim 1 or 5, wherein said current command generating means (7) comprises memory means (24, 25) containing a plurality of data tables each having current command data representing the predetermined mathematical function, said memory means receiving the control signal from the control signal generating means as an address and outputting a current command data in each of said data tables according to said address. A position control system according to claim 13, wherein the current command data in each of the plurality of data tables represent a sinusoidal function which is different in phase from that represented by the current command data in another of the plurality of data tables. A position control system according to claim 1 or 5, wherein said open loop reference position generating means (10), said error calculating means (S), said operating electric angle calculating means (6), said angle adjusting means (4) and said current command generating means (7) comprise: memory means (61) having stored therein a program; and processing means (60) for executing the program stored in said memory means.

Inventors: INAJI, TOSHIO, MITANI, HIROSHI, ONODERA, HIROMI, TOKURA, MITSUO, WAKABAYASHI, NORIAKI, YOSHIURA, TUKASA
Applicants: MATSUSHITA ELECTRIC INDUSTRIAL CO., LTD.
Application year: 1988
Main classification: G05B19
IPC codes: H02P8, G05B19