Control device for controlling movement of a printing head, carriage and control method for controlling the same

Abstract: A control device according to the present invention controls a movement of a carriage (92) having a printing head mounted thereon by controlling a motor drive pulse driving a motor (94) for moving the carriage (92) and comprises speed detection means (1) which generates a rotation speed value (SN4) indicative of rotation speed of the motor and a signal (SN5) indicative of a direction of rotation of the motor, angle detection means (2) for generating a rotation angle value (SN6) indicative of rotation angle of the motor from an initial position of the motor, speed determination means (3) for determining a set speed value (SN12) to be set on the basis of an aimed angle value (SN13A) indicative of an aimed rotation angle, an aimed speed value (SN13B) indicative of an aimed rotation speed and the rotation angle value, speed control means (4) for generating a speed control value (SN7) for making the rotation speed value closer to the set speed value on the basis of a difference between the rotation speed value and the set speed value, angle control means (5) for generating an angle control value (SN8) for making the rotation angle value closer to the aimed angle value on the basis of a difference between the aimed angle value and the rotation angle value, selection means (8) for selecting the speed control value as a motor drive control value when the rotation speed value is larger than a first speed value and selecting the angle control value as the motor drive control value when the rotation speed value is smaller than the first speed value and, drive pulse generation means (6) for generating a motor drive signal modulated according to a magnitude of the motor drive control value and for outputting the motor drive pulse signal as a forward motor drive signal or a reverse motor drive signal on the basis of the signal indicative of the direction of rotation.

Description: The present invention relates to a control device for controlling movement of a carriage of a printing head and, particularly, to a control device and method for controlling movement of a carriage of a printing head of a serial printer having a large inertia load and operable at high speed. In a printer having a printing head carriage, a conventional carriage on which a printing head is fixedly mounted is moved by connecting the carriage to a motor through a power transmission mechanism comprising a wire or a timing belt and converting rotation of the motor into a linear movement of the carriage. Since, among printers, a printing head of a serial impact printer operable at high speed is heavy and in view of demand of reducing a size of the printer, a distance in which the carriage is accelerated or decelerated tends to be shortened. Therefore, vibration of the power transmission mechanism in accelerating or decelerating the carriage is propagated to the carriage and vibration of the carriage continues even after the carriage speed reaches an aimed value, resulting in degradation of printing quality. In order to ristrict such vibration and obtain a print of high quality, it has been usual to use a carriage movement control device having a follow-up control system constructed according to a direct detection method for directly detecting a moving speed of a carriage by means of a linear scale sensor (cf. JP-A-1-234280) or an indirect detection method for indirectly detecting an amount of expansion or contraction of a power transmission mechanism by mounting speed sensors on pulleys on both a motor side and a driven side (JP-A-1-238974). However, the above-mentioned conventional scheme requires the expensive linear scale sensor or the expensive speed sensors on both the motor and follower sides and, further, the sensor or sensors must be mounted in place with high precision. Fig. 1 is a block diagram showing another conventional scheme for restricting vibration and obtaining high print quality. In Fig. 1, a carriage driving mechanism 9 includes a carriage 92 on which a printing head 91 is mounted and which is connected to a power transmission mechanism 98 provided between a driving side pulley 96 and a driven side pulley 97 and an encoder 95 which detects rotation speed of a motor 94 fixedly secured to the driving side pulley 96 of the carriage driving mechanism 9. The encoder 95 may be constructed with a rotary encoder which generates two signals having phases different from each other by 90°. The printing head 91 prints a printing sheet which is not shown on a platen 93 through an inked ribbon which is not shown. A control portion 110 of the carriage movement control device shown in Fig. 1 drives the motor 94 by means of a phase-locked-loop (referred to as PLL hereinafter) functioning to synchronize phase of an output of a high stability reference oscillator 111 with phase of an output pulse signal y of the encoder 95 which corresponds to rotation speed of the motor 94. A phase comparator 112 of the carriage movement control device compares phase of the output pulse signal y of the encoder 95 with phase of the output of the reference oscillator 111 and generates a phase error signal 116. The phase error signal 116 phases through a low-pass filter 113 having an amplifier function and drives the motor 94 through a drive circuit 114. The motor 94 rotates correspondingly to a voltage of the phase error signal 116 and the encoder 95 generates a frequency signal corresponding to the rotation speed. Therefore, the motor 94 and the encoder 95 operate as a voltage controlled oscillator. In case of PLL control, a variation of moving speed of a carriage in normal condition depends upon stability of an oscillator used. Therefore, such moving speed variation can be restricted to relatively small value if a highly stable oscillator is used. However, in order to accelerate the carriage bearing a heavy load from a stationary state thereof, a wide capture range is required for PLL control. Capture range W is width between frequency at which the PLL control is not locked and frequency at which it is locked, and can be approximated by the following equation which is well known as G. S. Moschytz's approximation: W = K · |F(jω)| where K is loop gain of PLL control, F(jω) is transfer function of the low-pass filter, ω is angular velocity of the motor and j is imaginary number unit. When the loop gain K is made large in order to increase the capture range W, the closed loop may become unstable and oscillate. In order to solve this problem, US-A-4,457,639 proposes a carriage movement control device. Fig. 2 is a block diagram showing the carriage movement control device of said document. Fig. 2 shows a closed loop circuit including a reference oscillator 111, a phase comparator 112, a low-pass filter 113 and a differentiating circuit 115. The capture range W is widened by improving gain in a high frequency range of the low-pass filter 113 by means of the differentiating circuit 115. In the closed loop circuit shown in Fig. 2, however, since the low-pass filter 113 and the differentiating 115 are analog circuits, respectively, the capture range W depends upon accuracy of resistors and/or capacitors used in these circuits. Further, the differentiating circuit 115 which must compensate for a large inertial load is easily affected by noise. In addition thereto, if the reference oscillator 111 stops operating for some reason, the phase comparator circuit 112 will generate a very large phase error signal 116 with which a motor 94 driven thereby will overrun. Further, since, in this example, a position information of a carriage 92, that is, rotation angle information of the motor, is not utilized, an exact stop position of the carriage 92 can not be determined when it is to be stopped and, in the worst case, the carriage 92 may collide with a structural frame of the device. US-A-4 216 415 discloses a position control system comprising a digital algebraic adder circuit. Said system does not comprise an aimed value generator that generates a plurality of aimed rotation speed and angle value pairs between start and stop of the motor; a speed determination circuit that determines whether or not the rotation angle value detected by an angle detector equals to the aimed angle value, and that selects the next aimed speed value from the value pairs as a set speed value when the former is equal to the latter; and/or a speed control circuit that detects a different value between the rotation speed value and the set speed value, that estimates state values of a power transmission mechanism of the motor and the carriage on the basis of the rotation speed value, that multiplies the state value with predetermined gains, an that adds the multiplied signal to the different value to generate the speed control value for the closed loop speed control and for the feed-back of the speed control value to estimate the state values. EP-A- 043 733 discloses an apparatus for controlling the movement of a movable element wherein the speed of a print wheel motor is controlled by a processor. The control of the motor is changed from a speed control mode to a fine position control mode. Specifically, when the actual speed of the motor is less than the lower velocity command value stored in the processor, the motor is accelerated. In case the actual speed is greater than the higher velocity speed command value, the motor is decelerated. During the deceleration operation, when the actual position (rotation angle) of the motor is within three steps from the desired stop position, the fine positioning mode is perfomed by the slave processor 64 in the processor. However, with regard to the speed control, the aimed speed of the print wheel motor is only the higher velocity command value, and the aimed rotation speed and angle value pairs are not set between start and stop of the motor. An object of the present invention is to provide a control device and method for controlling a movement of a printing head carriage, which is capable of moving the carriage to an aimed position exactly at high speed. Another object of the present invention is to provide a control device and method for controlling a movement of a printing head carriage, which does not use a PLL control, can be constructed with digital circuits and requires a sensor on only a motor side. These objects are solved with the features of the claims. According to the control device for controlling a movement of a printing head carriage as described, a motor which drives a carriage mounting a printing head thereon is driven by motor drive signal and a movement of the carriage is controlled by controlling the motor drive signal. The control device for controlling a movement of the printing head carriage according to the present invention comprises a speed detector for detecting a rotation speed of the motor and generating a rotation speed value indicative of the rotation speed and generating a signal indicative of a rotating direction of the motor, an angle detector for detecting a rotation angle of the motor and generating a rotation angle value indicative of the rotation angle of the motor from an initial position thereof, a speed determination circuit for determining a set speed value to be set on the basis of an aimed angle value indicative of an aimed rotation angle, an aimed speed value indicative of an aimed rotation speed and the rotation angle value, a speed control circuit for generating a speed control value on the basis of a difference between the set speed value from the speed determination circuit and the rotation speed value to make the rotation speed value closer to the set speed value, an angle control circuit for generating an angle control value on the basis of a difference between the aimed angle value and the rotation angle value to make the rotation angle value closer to the aimed angle value, a selector circuit for selecting the speed control value as a motor drive control value when the rotation speed value is larger than a first speed value and selecting the angle control value as the motor drive control value when the rotation speed value is smaller than the first speed value, and a drive pulse generator circuit for generating a motor drive pulse which is modulated correspondingly to a magnitude of the motor drive control value as a forward motor drive signal or a reverse motor drive signal according to a signal indicative of a rotation direction of the motor. Furthermore, a control method as described for controlling movement of a printing head carriage comprises the steps of detecting rotation speed value, rotation angle value and direction of rotation of a motor of a carriage moving mechanism in which the motor is connected to a printing head carriage through a power transmission mechanism, generating a speed control value so that the rotation speed value is made closer to a set speed value, generating an angle control value by means of the rotation angle value so that the latter is made closer to an aimed angle value, selecting the speed control value or the angle control value as a motor drive control value, and producing a forward or reverse motor drive signal on the basis of the motor drive control value and the direction of rotation. With the above-mentioned construction, the motor can follow the aimed speed value and the aimed angle value exactly at high speed. Fig. 1 is a block diagram showing a conventional control device for controlling movement of a printing head carriage; Fig. 2 is a block diagram showing another conventional control device for controlling movement of a printing head carriage; Fig. 3 is a block diagram showing a control device for controlling movement of a printing head carriage according to an embodiment of the present invention; Fig. 4 is a graph showing variations of an aimed angle value and an aimed speed value in the control device shown in Fig. 3; Fig. 5 is a timing chart showing operations of an angle detector, a speed detector and a control speed determination circuit of the control device shown in Fig. 3; Fig. 6 is a block diagram showing the speed detector in detail; Fig. 7 is a block diagram showing the angle detector in detail; Fig. 8 is a block diagram showing the control speed determination circuit in detail; Fig. 9 is a graph showing variations of a rotation speed and rotation angle of a motor controlled by the control device shown in Fig. 3; Fig. 10 is a block diagram showing a speed control circuit of the control device shown in Fig. 3 in detail; Fig. 11 is a circuit diagram of a state estimation circuit of the speed control circuit shown in Fig. 10; Fig. 12 is a circuit diagram of another state estimation circuit of the speed control circuit shown in Fig. 10; Fig. 13 is a block diagram showing an angle control circuit of the control device shown in Fig. 3 in detail; Fig. 14 is a block diagram showing a speed and angle comparator of the control device shown in Fig. 3 in detail; Figs. 15 and 16 are graphs illustrating an operation of the speed and angle comparator of the control device shown in Fig. 3, respectively; Fig. 17 is a block diagram showing a pulse width modulator circuit of the control device shown in Fig. 3 in detail; Fig. 18 shows operational waveforms of the pulse width modulator circuit shown in Fig. 17; Fig. 19 is a circuit diagram of a power amplifier of the control device shown in Fig. 3; and Fig. 20 is a flow chart showing an operation of the control device shown in Fig. 3. Fig. 3 is a block diagram of a control device for controlling movement of a printing head carriage according to an embodiment of the present invention. In Fig. 3, an aimed value generator 100 generates an aimed angle value SN13A and an aimed speed value SN13B on the basis of data SNO indicative of an aimed moving distance of a carriage 92 of a carriage drive mechanism 9. The aimed angle value SN13A and the aimed speed value SN13B indicate an aimed rotation angle and an aimed rotation speed of a motor 94 of the carriage drive mechanism 9, respectively, and are generated under control of a micro-processor according to the aimed moving distance of the carriage 92. Fig. 4 shows variations of the aimed speed value SN13B and the aimed angle value SN13A. In Fig. 4, it is clear that aimed speed values RO and R1 are in one rotation direction of the motor and aimed speed values R10 and R11 are in the other rotation direction. The aimed value generator 100 outputs combined aimed speed and aimed angle value data (R0,P0), (R1, P1), (R0, P2), (R10, P4), (Rll, P5) and (R10, P6), sequentially. Respective portions to be described hereinafter control a movement of the carriage according these aimed values. The carriage drive mechanism 9 includes the carriage 92 mounting the printing head 91 thereon, a power transmission mechanism (endless belt) 98 provided between a driving pulley 96 and a driven pulley 97 and having the carriage 92 fixed thereon, the motor 94 connected to the driving pulley 96, and a platen 93. An encoder 95 generates a pulse every time when the motor 94 rotates by a fixed angle and outputs a train of thus generated pulses and a train of pulses whose phase deviates from the generated pulse train by 90° as rotation signals SN1 and SN2. A speed detector 1 generates a rotation speed value SN4 indicative of a rotation speed of the motor 94 and a signal SN5 indicative of a rotation direction of the motor 94 on the basis of the rotation signals SN1 and SN2. An angle detector 2 generates a rotation angle value SN6 indicative of a rotation angle of the motor 94 on the basis of the rotation signals SN1 and SN2. The rotation angle value corresponds to a position of the carriage 92. A control speed determination circuit 3 generates a set speed value SN12 on the basis of the aimed angle value SN13A, the aimed speed value SN13B and the rotation angle value SN6. In detail, the set speed value SN12 initially generated when the motor 94 is actuated, becomes an initial aimed speed value from the aimed value generator 100, that is, rotation speed value RO in Fig. 4, and, when the rotation angle value SN6 becomes an initial aimed angle value PO, a next aimed speed value R1 becomes the set speed value SN12. That is, the control speed determination circuit 3 monitors the rotation angle value SN6 and, when it reaches the aimed angle, outputs a next aimed speed value as the set speed value SN12. A speed control circuit 4 generates a speed control value SN7 for making the rotation speed value SN4 closer to the set speed value SN12. An angle control circuit 5 generates an angle control value SN8 for making the rotation angle value SN6 closer to the aimed angle value SN13 in response to the rotation speed value SN4 and the rotation angle value SN6. A speed and angle comparator 8 outputs one of the speed control value SN7 or the angle control value SN8 as a motor drive control value SN9 depending on whether or not the rotation speed value SN4 is within a predetermined control speed range. A pulse width modulator circuit 6 produces a forward motor drive pulse SN10 or a reverse motor drive pulse SN11 on the basis of the motor drive control value SN9 and the signal SN5 indicative of the rotation direction of the motor. A power amplifier 7 supplies motor drive power to the motor 94 according to the forward and reverse motor drive pulses SN10 and SN11. This embodiment of the present invention features that the control speed determination circuit 3 is supplied with the aimed angle value SN13A and the aimed speed value SN13B and sets a next aimed speed at a time when rotation angle of the motor reaches the current aimed angle and that the speed and angle comparator 8 detects a magnitude of the speed control value SN7 and the angle control value SN8 and selects the speed control value SN7 as the motor drive control value SN9 when the speed control value SN7 is larger than a predetermined value εs and selects the angle control value SN8 as the motor drive control value SN9 when the speed control value SN7 is smaller than the predetermined value εs. Therefore, it is possible to improve the accuracy of stop position of the motor without degrading high speed characteristics. Fig. 5 shows an output waveform of the encoder 95 and a timing chart showing operations of the speed detector 1, the angle detector 2 and the control speed determination circuit 3. In Fig. 5, when the motor 94 rotates clockwise (CW) direction, phase of the rotation signal SN1 from the encoder 5 advances from the signal SN2 by 90° and, when the motor rotates in counterclockwise (CCW) direction, the rotation signal SN1 delays therefrom by 90°. Each Pulses of the rotation signals SN1 and SN2 are generated every time when the motor 94 rotates the pulley 96 by 1°. In this embodiment, the encoder 95 includes a disk plate fixedly secured to a rotary shaft of the motor 94 and two photo sensors for detecting 360 holes formed in the disk plate with an angular interval of 1°. A detection output of each photo sensor corresponds to the rotation signals SN1 and SN2. These photo sensors are arranged such that the output signals therefrom have phases different from each other by 90°. In Fig. 6, the speed detector 1 has a counter 11 for generating the rotation speed value SN4, a latch 12, a leading edge detector 13 for detecting a leading edge of the rotation signal SN1, and a rotation direction detector 14 for generating the signal SN5 indicative of rotation direction of the motor 94 on the basis of the phase difference between the rotation signals SN1 and SN2. The counter 11 is clocked with a high speed clock signal SN3 from a clock generator 10 (Fig. 3) to count pulse durations T1, T2 and T3 (Fig. 5), etc., of the rotation signal SN1 shown in Fig. 5. The counter 11 is preset to a preset value C1 by an output of the leading edge detector 13 and down-counts the high speed clock signal SN3 until it receives a next output of the leading edge detector. Therefore, the higher the rotation speed of the motor 94 becomes, the shorter the interval between leading edges of the pulses of the rotation signal SN1 and hence the larger the output value of the counter 11. The latch 12 latches the count value (W1, W2, W3, ...) of the counter 11 immediately before the counter 11 is preset every rotation signal SN1. The latch 12 outputs the rotation speed value SN4. The rotation direction detector 14 outputs a signal SN5 which is a "L" or "H" level signal dependent upon whether the rotation signal SN1 advances or delays with respect to the rotation signal SN2 by 90°. In Fig. 7, the angle detector 2 has a phase difference detector 21 for detecting a phase difference between the rotation signals SN1 and SN2 and an up/down counter 22 which up-counts or down-counts according to an output 210 or 220 of the phase difference detector 21. When the rotation signal SN1 advances in phase from the rotation signal SN2 by 90°, the up/down counter 22 counts up the pulses of the rotation signal SN1 according to the output 210 of the phase difference detector 21 and counts down the pulses of the rotation signal SN1 when the phase of the rotation signal SN1 delays from that of the rotation signal SN2. Therefore, the rotation angle value SN6 corresponds to a position of the carriage 92 indicated by the count value of the up/down counter 22. The rotation speed value SN4 and the rotation angle value SN6 have a timing set such that they are generated in synchronism with the rotation signal SN1. Fig. 8 is a detailed block circuit diagram of the control speed determination circuit 3. In Fig. 8, a control portion 31 stores the aimed angle value SN13A and the aimed speed value SN13B sequentially. Further, the control portion 31 outputs an initial aimed angle value SN13A as an initial set rotation angle value SN14 and simultaneously outputs an initial aimed speed value SN13B as an initial set rotation speed value SN16. Then, when an angle coincident signal SN15 is supplied thereto, it outputs a next aimed angle value as the set rotation angle value SN14 and a next aimed speed value as the set rotation speed value SN16. An angle setting register 32 stores the set rotation angle values SN14 sequentially and outputs them as the set angle value SN17. An angle comparator portion 33 outputs the angle coincident signal SN15 when the rotation angle value SN6 coincides with the set angle value SN17. A speed setting register 34 stores the set rotational speed values SN16 of the motor 94 sequentially and outputs them as the set speed value SN12. When the angle and speed are controlled according to the aimed values shown in Fig. 4, the control portion 31 initially sets the aimed angle value P0 in the angle setting register 32 as the set rotation angle value SN14 and at the same time sets the motor rotation speed value R0 in the speed setting register 34 as the set rotation speed value SN16. When the motor 94 starts to rotate in clockwise direction and the rotation angle of the motor 94 reaches the angle P0 and thus the rotation angle value SN6 from the angle detector 2 indicates the angle P0, the angle comparator portion 33 outputs the angle coincident signal SN15. The control portion 31 sets a next aimed angle value P1 in the angle setting register 32 as the set rotation angle value SN14 on the basis of the angle coincident signal SN15 and simultaneously sets the motor rotation speed value R1 in the speed setting register 34 as the set rotation speed value SN16. Similarly, the control portion 31 modifies the motor rotation speed to the motor rotation speed values R1 and RO every time when the motor 94 rotates by the angles P1 and P2. Fig. 9 shows an actual operation of the motor 94. Fig. 10 is a detailed block circuit diagram of the speed control circuit 4. In Fig. 10, the speed control circuit 4 outputs the speed control voltage value SN7 on the basis of the set speed value SN12 and the rotation speed value SN4. The speed control circuit 4 realizes its function designed according to the control logic by means of a firmware. A subtracter 41 calculates a speed error el between the set speed value SN12 and the rotation speed value SN4. A speed integration amplifier 42 has a function of averaging the speed error el from an initial time point and then multiplying it with a gain Ki. A state estimation circuit 43 estimates state variables of the carriage moving mechanism 9 from the speed control value SN7 at a time instance t, that is, u(t), and the rotation speed value SN4, that is, y(t), and outputs signals S1, S2 and S3. The signals S1, S2 and S3 represent values obtained by linear transformations of the rotation speed of motor, the moving speed of carriage and a variation of change of the power transmission mechanism (change of the length of the endless belt), respectively. A state feedback circuit 46 calculates the speed control value SN7, that is, u(t), by multiplying the output signals S1, S2 and S3 with gains Kf1, Kf2 and Kf3, respectively, summing the products and adding an output of the speed integration amplifier 42 to the sum. An output of an operator 45 of the state feedback circuit 46 has a negative value and an adder 44 substantially functions as a subtracter. As an example of the method of determining the gain Ki of the speed integration amplifier 42 and the respective gains Kf1, Kf2 and Kf3 of the state feedback circuit 46, the method based on the optimal regulator will be described. Since the carriage moving mechanism 9 shown in Fig. 3 is an electric-mechanical composite system, its characteristic equation is described by an equation of motion and an equation of voltage and represented by the following equation: dx(t) dt = A · x(t) + B·u(t) y(t) = C · x(t) where u(t) : speed control value x(t) : state variables of an interior of the carriage moving mechanism y(t) : rotation speed value. In the system represented by the equation (1), a control system for making the set speed value SN12, that is, r, followed by the rotation speed value SN4, that is, y(t) is assumed. In a process for detecting the rotation speed value y(t) every constant time interval T of the control system, the equation (1) is transformed to the following differential equation: x(k+T) = Ad·x(k) + Bd·u(k) y(k) = Cd·x(k) where k = 0, T, 2T, 3T, ... Ad = exp(AT); Cd = C A discrete system model of the equation (2) is variable transformed by the following equation (3), resulting in the following equation (4) which is referred to as a enlarged system model: ε(k) = r - y(k) ξ(k) = x(k + T) - x(k) η(k) = u(k + T) - u(k) The following permutation is performed for the equation (4). Suitable positive symmetrical matrices (matrices whose scalar amount x'Px with respect to an arbitrary vector x becomes x'Px > 0, P = P') Q and R are selected for the equations (4) and (5) and an evaluation function J is defined by the following equation (6), and k with which J becomes minimum is obtained. It is known that a solution of the equation (6) is given by Ricatti equation represented by the following equation (7). O = P - A'PA + A'PB(R + B'PB) -1 B'PA - C'QC K = -(R + B'PB) -1 B'PA The equation (1) is assumed as a three degree differential equation, so that K becomes a 4 X 1 matrix represented by the equation (8). K = [Kf1 Kf2 Kf3 ki] From the equation (8), the gains Ki, Kf1, Kf2 and Kf3 of the speed integration amplifier 42 and the state feedback circuit 46 are obtained. By changing the values of Q and R given by the equation (6), respective factors Ki, Kf1, Kf2 and Kf3 of K of the equation (8) change and thus it is possible to regulate activation characteristics of the motor and the carriage speed. Fig. 11 is a block diagram showing an example of the state estimation circuit 43. In Fig. 11, the state estimation circuit 43 calculates estimation amount Si(N + 1) (i = 1, 2, 3, ...) of the rotation speed of motor, the carriage speed and the variation amount of power transmission mechanism at a time instance n + 1 from speed control value u(n), rotation speed value y(n) and estimation amount Si(n) (i = 1, 2, 3, ...) of the rotation speed of motor, the carriage speed and the variation amount of power transmission mechanism at a time instance n, which are stored in three respective delay circuitries 4319, 4320 and 4321. Further, the state estimation circuit 43 includes adders 4316, 4317 and 4318 for summing outputs of multipliers 4301-4305, 4306-4310 and 4311-4315, respectively, in addition to the delay devices 4319, 4320 and 4321 for temporarily storing the outputs of the adders 4316, 4317 and 4318, respectively. The multipliers 4301, 4306 and 4311 output products of the output of the delay device 4319 and respective coefficients all, a21 and a31. Similarly, the multipliers 4302, 4307 and 4312 output products of the output of the delay device 4320 and respective coefficients a12, a22 and a32 and the multipliers 4303, 4308 and 4313 output products of the output of the delay device 4321 and respective coefficients a13, a23 and a33. Further, the multipliers 4304, 4309 and 4314 output the products of the speed control value u(n) and respective coefficients hl, h2 and h3 and the multipliers 4305, 4310 and 4315 output the products of the rotation speed value y(n) and respective coefficients g1, g2 and g 3 . As an example of the method of determining the coefficients aij, hi and gi (i, j = 1, 2, 3, ...) of the respective multipliers 4301-4305, 4306-4310 and 4311-4315 of the state estimation circuit 43, an observer algorithm referred to as Kalman filter will be described. With respect to the discrete system model shown by the equation (2), a model which takes an internal noise w(k) of the model and a detected noise v(k) into consideration is represented by the following equation: x(k + 1) = Ad·x(k) + Bd·u(k) + N·w(k) y(k) = Cd·x(k) + v(k) where E[w(k)] = E[v(k)] = 0 E[w(k) · w'(k)] = Q E[v(k) · v'(k)] = R E[v(n) · v'(n)] = 0 E[ ] is a mean time represented by the following equation: It is assumed that variables z(k) estimating state variables x(k) are represented by the following equation: Z(k + 1) = F·z(k) + L·u(k) + G·g(k) where F = A - GC ; L = B. An estimation condition shown by the following equation is given between the state amount x(k) and the estimation amount z(k) E[ x(k) - z(k) 2 ] → 0 (k - ∞) G satisfies the equations (12) and (13) and is given as a solution of Ricatti equation shown by the following equation. 0 = P - APA' + APC'(R + CPC') -1 CPA' - NQN' G = APC'(R + CPC') -1 F, L and G are represented by respective factors as follows and the respective coefficients aij, hi and gi (i, j = 1, 2, 3, ...) of the multipliers 4301-4305, 4306-4310 and 4311-4315 of the state estimation circuit 43 are obtained from the equation (15): Fig. 12 shows another example of the state estimation circuit 43. In Fig. 12, the state estimation circuit 43 has a similar construction to that shown in Fig. 11. However, the coefficients aij, hi and gi (i,j = 1, 2, 3, ..) of the respective multipliers 4301-4305 shown in Fig. 11 can eliminate the coefficients a13, a23, a31 and a32 of the multipliers 4303, 4308, 4311 and 4312 by obtaining the optimal value by means of the observer alogrithm called Kalman filter in control logic. That is, the state estimation circuit 43 in Fig. 12 includes adders 4333, 4334 and 4335 for summing outputs of the respective multipliers 4322-4325, 4326-4329 and 4330-4332, and delay devices 4336, 4337 and 4338 for temporarily storing outputs of the respective adders 4333, 4334 and 4335. The multipliers 4322 and 4326 output products of the output of the delay device 4336 and coefficients A11 and A21, respectively. Similarly, the multipliers 4323 and 4327 output products of the output of the delay device 4337 and coefficients A12 and A22, respectively, and the multiplier 4330 outputs a product of the output of the delay device 4338 and a coefficient A33. The multipliers 4324, 4328 and 4331 output products of the speed control value u(n) and respective coefficients H1, H2 and H3 and the multipliers 4325, 4329 and 4332 output products of a speed information y(t) and respective coefficients G1, G2 and G3. The number of multiplications and the number of summations in the state estimation circuit 43 shown in Fig. 12 are smaller compared with the state estimation circuit 43 shown in Fig. 11. As mentioned above, the state estimation circuit 43 of the speed control circuit 4 linearly transforms the rotation speed of motor, the moving speed of carriage and the variation of change of power transmission mechanism into speed control values, respectively, and outputs the signals S1, S2 and S3. Signals obtained by multiplying these signals S1, S2 and S3 with the respective coefficients Kfl, Kf2 and Kf3 obtained from the state equations are added to an output of the integration amplifier 42. On the other hand, the integration amplifier 42 integrates the speed error signal el sequentially and holds it for a constant time. When the error signal el becomes 0, the output of the integrator 42 disappears. At this time, the variation of the output of the adder 44 also disappears, resulting in a constant output. Further, when the rotation speed value SN4 approaches 0, the speed control value SN7 which is a sum of the outputs of the integration amplifier 42 and the operator 45 approaches 0. Fig. 13 is a detailed circuit diagram of the angle control circuit 5. In Fig. 13, a subtracter 51 calculates an angle error e2 between the aimed angle value SN13 and the rotation angle value SN6. An adder 56 sums a value obtained by averaging the angle error e2 from an initial time point and multiplying a value resulting from the integration with a predetermined first coefficient value, a value obtained by multiplying the rotation angle value SN6 with a predetermined second coefficient value, and a value obtained by multiplying the rotation speed value SN4 with a predetermined third coefficient value, and outputs the sum as the angle control value SN8. An angle error integrator 52 integrates or averages the angle error e2 from the initial time point and multipliers 53, 54 and 55 multiply input signals thereof with predetermined first, second and third coefficients. The second and third coefficients of the multipliers 54 and 55 have negative values and determine magnitudes of the control amount during the angle control. That is, although when absolute values of the second and third coefficients are large, convergence to the aimed angle value becomes fast though it is unstable. On the contrary, with small absolute values of these coefficients, a stable rotation angle control is possible though convergence time becomes longer. When the rotation angle value SN6 becomes equal to the aimed angle value SN13, a sum of the outputs of the multipliers 53 and 54 become 0. When, at the same time, the rotation speed value SN4 becomes also 0, the angle control value SN8 becomes 0. Fig. 14 is a detailed block circuit diagram of the speed and angle comparator 8. In Fig. 14, a speed comparator 81 outputs the speed control value SN7 as a control drive value SN80 until the rotation speed value SN4 reaches a first predetermined speed range εs and outputs the angle control value SN8 as the control drive value SN80 when it lies within the first speed range εs. A speed/angle comparator 82 stops to provide the control drive value SN80 as the motor drive control value SN9 when the rotation speed value SN4 and the rotation angle value SN6 are within a second predetermined speed range εv narrower than the first predetermined speed range and within a predetermined angle range Ex, respectively, and, otherwise, outputs the control drive value SN80 as the motor drive control value SN9. Fig. 15 shows a relation between the rotation speed value SN4 and time and, Fig. 16 shows a relation between the rotation speed value SN4 and the rotation angle value SN6. The angle control circuit 5 and the speed and angle comparator 8 will be described in detail with reference to Figs. 13 to 16. Since the speed control circuit 4 does not use the rotation angle value SN6, it is difficult to stop the motor 94 at an aimed stop angle exactly. When the speed and angle comparator 8 detects a speed of the motor 94, which is within a stop threshold value εs, an angle control system for stopping the motor 94 at the aimed stop angle PY is constructed by utilizing an output of the angle control circuit 5. The speed and angle comparator 8 outputs the speed control value SN7 until the rotation speed value SN4 reaches the predetermined speed range εs and outputs the angle control value SN8 when it lies within the predetermined speed range εs, as shown in Fig. 15, and finally, stops the control drive value SN80 when the rotation speed value SN4 and the rotation angle value SN6 are within a predetermined speed range εv narrower than the predetermined speed range εs and within a predetermined angle range εx, respectively, as shown in Fig. 16. With this operation, the angle and speed of the motor 94 gradually come to lie within the ranges of the threshold values εx and εv, respectively, and the angle and speed of the motor 94 converge to the aimed stop angle and 0, respectively. At this time, the comparator 82 produces a control end flag. Fig. 17 is a detailed block circuit diagram of the pulse width modulation circuit 6 and Fig. 18 shows waveforms indicating an operation of the pulse width modulation circuit. In these figures, a register 61 stores the motor drive control value SN9. A high speed clock counter 63 counts high speed clocks SN3. A comparator 62 compares an output of the register 61 with an output of the high speed clock counter 63 and, when the output of the clock counter 63 becomes equal to that of the register 61, outputs a coincidence signal SN63. On the other hand, a high speed clock frequency divider 64 frequency-divides the high speed clock SN3 and outputs a clock frequency divided signal SN61. A period of the frequency divided signal SN61 is a period of the drive pulse of the motor 94. A RS flip-flop 65 is set and reset by the clock frequency divided signal SN61 and the coincidence signal SN63, respectively, and outputs a motor drive pulse SN62. Therefore, pulse width of the motor drive pulse SN62 changes correspondingly to an output value of the register 61. A selector 66 selectively outputs the motor drive pulse SN62 as a forward motor drive pulse SN10 or a reverse motor drive pulse SNll, on the basis of the signal SN5 from the speed detecting portion 1 which indicates a direction of rotation. In this embodiment, the forward rotation of the motor is clockwise rotation and the reverse rotation is counterclockwise rotation. Since the direction indicating signal SN5 is not produced at a initial time when the motor 94 is started, the selector 66 forcibly determines the direction of rotation at the start time according to an output (not shown) of the aimed value generator portion 100 (Fig. 3). Fig. 19 is a detailed block circuit diagram of the power amplifier 7. In Fig. 19, the power amplifier 7 includes four bridge-connected transistors 71-74. One end of the bridge is connected to a power source 76 and the other end is connected to the motor 94. The transistors 71 and 72 are turned ON in response to a forward motor drive pulse SN10 to supply a current from the power source 76 with which the motor 94 is rotated in clockwise (CW) direction. On the other hand, when the reverse motor drive pulse SNll is supplied thereto, the transistors 73 and 74 are turned ON to supply a current from the power source 76 with which the motor 94 is rotated in counterclockwise (CCW) direction. Now, an alarm generating mechanism will be described. In the control device for controlling carriage movement according to the present invention, many delay elements, that is, registers, are used. Therefore, a normal control may become impossible when overflow occurs dependent upon result of addition, subtraction and/or multiplication. In order to treat this problem, the servo control is forcibly stopped at a time when such overflow occurs or at a time at which it is determined that a motor drive voltage becomes abnormal with respect to the source voltage so that electrical and/or mechanical damage of the system is prevented. Further, the present device has a function of generating an alarm when a normal control of speed and position can not be done due to damage of circuit and/or damage of wiring in the device. Although concrete circuits for realizing such functions are not shown, it may be enough to say that it is monitored whether outputs of adders and/or multipliers used in the respective circuits overflow and the servo control is stopped if overflow occurred. Fig. 20 is a flowchart showing an operation of the control device for controlling movement of the carriage having the printing head shown in Fig. 3. In an initial setting, all registers and counters to be used for control are cleared and then set with various constants (S1). Then, the speed detector 1 and the angle detector 2 detect rotation speed and rotation angle of the motor 94 and calculate their values (S2). If the speed of the motor 94 calculated in the step S2 is out of the predetermined speed range εs (S3), the speed and angle comparator 8 executes the speed control by means of the speed control circuit 4 (S4). If there is no overflow during the speed control (S5), the speed and angle comparator 8 produces the motor drive control value SN9 to drive the motor 94 (S6) and executes the step S2 again since there is no control end flag. When the speed of the motor 94 which is calculated in the step S2 reaches the predetermined speed range εs but is still out of the predetermined speed range εv or when the angle of the motor 94 which is calculated in the step S2 is out of the predetermined angle range Ex (S8), the angle control is executed by means of the angle control circuit 5 (S9). If there is no overflow during this angle control (S5), the speed and angle comparator 8 produces the motor drive control value SN9 to drive the motor 94 (S6) and executes the step S2 again because there is no control end flag. When the speed of the motor 94 which is calculated in the step S2 is within the predetermined speed range εs and further within the predetermined speed range εv and the angle of the motor 94 which is calculated in the step S2 is within the predetermined angle range εx (S8), the control end flag is produced (S11) and the control is terminated (S7). If there is overflow during the speed control and the angle control (S5), the alarm process is performed (S10), the control end flag is produced (S11) and the control is terminated (S7). As described hereinbefore, according to the present invention, a high speed and error-free control device for controlling movement of a printing head carriage is obtained by detecting rotation speed value, rotation angle value and direction of rotation of a motor of a carriage moving mechanism in which the motor is connected to a printing head carriage through a power transmission mechanism, generating a speed control value so that the rotation speed value is made closer to a set speed value, generating an angle control value by means the rotation angle value so that the latter is made closer to an aimed angle value, outputting the speed control value or the angle control value as a motor drive control value or stopping such output dependent upon whether or not the rotation speed value and the rotation angle value are within a predetermined speed range and a predetermined angle range, respectively, producing a forward or reverse motor drive signal on the basis of the motor drive control value and the direction of rotation and supplying a motor drive power to the motor according to the forward or reverse motor drive pulse. It should be noted that the present invention is not limited to the described embodiments and can be modified in various manners. For example, although the pulse width modulation circuit 6 generates the motor drive pulse by pulse width modulation on the basis of the motor drive control value SN9 from the speed and angle comparator 8, it is possible to use a pulse frequency modulation circuit instead of the pulse width modulation circuit.

Claims: A control device for controlling movement of a carriage (92) having a printing head (91), said movement performed by driving a motor (94) by means of a motor drive signal while controlling the motor drive signal, said control device comprising: a generator (100) for generating an aimed angle value (SN13A) indicative of an aimed rotation angle and an aimed speed value (SN13B) indicative of an aimed rotation speed; a speed detector (1) for detecting a rotation speed of said motor and generating a rotation speed value (SN4) indicative of the rotation speed of said motor; an angle detector (2) for detecting a rotation angle of said motor and generating a rotation angle value (SN6) indicative of the rotation angle of said motor from a start position; a speed determination circuit (3) for determining a set speed value (SN12) to be set from said aimed speed value (SN13B); a speed control circuit (4) for generating a speed control value (SN7) for bringing said rotation speed value closer to said set speed value on the basis of a difference between said rotation speed value (SN4) and said set speed value (SN12); an angle control circuit (5) for generating an angle control value (SN8) for making said rotation angle value closer to said aimed angle value (SN13A) on the basis of a difference between said aimed angle value (SN13A) and said rotation angle value (SN6); a selection circuit (8) for selecting one of said speed control value (SN7) and said angle control value (SN8) as a motor drive control value depending on whether or not said rotation speed value is larger than a first speed value near zero; and a drive signal generator (6) for generating a motor drive signal modulated according to a magnitude of said motor drive control value; characterized in that said generator (100) generates a plenty of aimed rotation speed and angle value pairs in a period from a start to a stop time of said motor; said speed determination circuit (3) determines wether or not said rotation angle value (SN6) detected by the angle detector equals to said aimed angle value and, when the former equals to the latter, selects next aimed speed value from said aimed rotation speed and angle value pairs as said set speed value (SN12); and said speed control circuit (4) comprises a subtracter (41) for calculating a speed error between said rotation speed value (SN4) and said set speed value (SN12), and an averaging circuit (42) for averaging said speed error from said start time, a state estimation circuit (43) for estimating state values of said power transmission mechanism of the motor and said carriage on the basis of said speed control value (SN7) and said rotation speed value (SN4), and a feedback circuit (46) for outputting a multiplied signal by multiplying said state values with predetermined gains, adding an output of said averaging circuit to said multiplied signal to generate said speed control value (SN7), and supplying said speed control value (SN7) to said state estimation circuit. The control device claimed in claim 1, wherein said drive signal generator outputs said motor drive signal as a forward motor drive signal or a reverse motor drive signal on the basis of a signal indicative of the direction of rotation. The control device claimed in claim 1 or 2, wherein said state estimation circuit (43) outputs said estimated values of said rotation speed value (SN4), said carriage speed and said state values at a certain time instance on the basis of a sum of products of said rotation speed value, said carriage speed and said state values at a preceding time instance and respective coefficients. The device claimed in any one of claims 1 to 3, wherein said angle control circuit (5) comprises a subtracter (51) for calculating an angle error between said aimed angle value (SN13A) and said rotation angle value (SN6) and, an adder (56) for summing a value obtained by averaging said angle error from an initial time point and multiplying an averaged angle error with a first coefficient, a value obtained by multiplying said rotation angle value (SN6) with a second coefficient and a value obtained by multiplying said rotation speed value (SN4) with a third coefficient and, outputting a resultant sum as said angle control value (SN8). The device claimed in any one of claims 1 to 4, wherein said selection circuit comprises a first selection circuit (81) for outputting said speed control value (SN7) as a control drive value (SN80) when said rotation speed value (SN4) is larger than said first speed value and outputting said angle control value (SN8) as the control drive value (SN80) when said rotation speed value (SN4) is smaller than said first speed value and, a second selection circuit (82) for stopping an output of said control drive value (SN80) as said motor drive control value when said rotation speed value (SN4) and said rotation angle value (SN6) are lower than a second speed value smaller than said first speed value and smaller than a predetermined angle value, respectively, and, otherwise, outputting said control drive value (SN80) as said motor drive control value(SN9). The device claimed in any one of claims 1 to 5, wherein said drive signal generator (6) comprises a register (61) for storing said motor drive control value (SN9), a high speed clock counter (63) for counting a high speed clock, a drive voltage comparator (62) for comparing an output of said register (61) with an output of said high speed clock counter (63) and outputting a coincidence signal (SN63), a high speed clock frequency divider (64) for frequency dividing said high speed clock and outputting a frequency-divided high speed clock signal (SN61), a RS flip-flop (65) having said frequency-divided high speed clock signal and said drive voltage coincidence signal as a set and reset signals for outputting said motor drive signal, and a selector (66) for selectively outputting said motor drive signal (SN62) as said forward motor drive signal (SN10) and as said reverse motor drive signal (SNll) according to said signal (SN5) indicative of the direction of rotation. The device claimed in any one of claims 1 to 6, wherein said rotation speed value, said signal indicative of the direction of rotation and said aimed angle value are generated according to a rotation signal from respective encoders fixed to a rotary shaft of said motor. A control method for controlling movement of a carriage (92) having a printing head (91), said movement performed by driving a motor (94) by means of a motor drive signal while controlling the motor drive signal, said control method comprising the steps of: generating an aimed angle value (SN13A) indicative of an aimed rotation angle and an aimed speed value (SN13B) indicative of an aimed rotation speed; detecting a rotation speed of said motor and generating a rotation speed value (SN4) indicative of the rotation speed of said motor; detecting a rotation angle of said motor and generating a rotation angle value (SN6) indicative of the rotation angle of said motor from a start position; determining a set speed value (SN12) to be set from said aimed speed value (SN13B); generating a speed control value (SN7) for making said rotation speed value closer to said set speed value on the basis of a difference between said rotation speed value and said set speed value; generating an angle control value (SN8) for making said rotation angle value closer to said aimed angle value on the basis of a difference between said aimed angle value and said rotation angle value; selecting one of said speed control value (SN7) and said angle control value (SN8) as a motor drive control value depending on whether or not said rotation speed value is larger than a first speed value near zero; and generating a motor drive signal modulated according to a magnitude of said motor drive control value; characterized in that said step of generating said aimed angle value (SN13A) and said aimed speed value (SN13B) generates a plenty of aimed rotation speed and angle value pairs in a period from a start to a stop time of said motor; said step of determining said set speed value (SN12) determines whether or not said rotation angle value (SN6) equals to said aimed angle value, and when the former equals to the latter, selects the next aimed speed value from said aimed rotation speed and angle value pairs as said set speed value; and said step of generating said speed control value (SN7) comprises the steps of calculating a speed error between said set speed value (SN12) and said rotation speed value (SN4), averaging said speed error from said start time, estimating state values of said power transmission mechanism of the motor and said carriage on the basis of said speed control value (SN7) and said rotation speed value (SN4), generating a multiplied signal by multiplying said state values with predetermined gains, adding an output of said averaging step to said multiplied signal to generate said speed control value (SN7), and supplying said speed control value to said estimating step. The method claimed in claim 8, wherein said step of generating said angle control value comprises the steps of calculating an angle error between said aimed angle value (SN13A) and said rotation angle value (SN6), summing a value, obtained by averaging said angle error from said start time and then multiplying an averaged angle error with a first coefficient, a value obtained by multiplying said rotation angle value with a second coefficient and a value obtained by multiplying said rotation speed value with a third coefficient and, outputting a resultant sum as said angle control value. The method claimed in claim 8 or 9, wherein said step of selecting comprises the steps of outputting said speed control value (SN7) as a control drive value when said rotation speed value (SN4) is larger than said first speed value and outputting said angle control value (SN8) as the control drive value when said rotation speed value (SN4) is smaller than said first speed value, stopping an output of said control drive value as said motor drive control value when said rotation speed value (SN4) and said rotation angle value (SN5) are lower than a second speed value smaller than said first speed value and smaller than a predetermined angle value, respectively, and, otherwise, outputting said control drive value as said motor drive control value.

Inventors: HIEDA TOMOHARU, ISHIZAKI SUNAO, HIEDA, TOMOHARU, ISHIZAKI, SUNAO, HIEDA, TOMOHARU, C/O NEC CORPORATION, ISHIZAKI, SUNAO,C/O NEC DATA TERMINALS, LTD.
Applicants: NIPPON ELECTRIC CO, NEC CORPORATION
Application year: 1993
Main classification: G05B19
IPC codes: B41J19, G05B19