Patent Publication Number: US-2020290832-A1

Title: Image forming apparatus

Description:
BACKGROUND 
     Field 
     The present disclosure relates to an image forming apparatus that adjusts a conveying velocity of a sheet being conveyed. 
     Description of the Related Art 
     Conventionally, there has been an image forming apparatus configured to detect, based on a change in a load torque (a load fluctuation) applied to a rotor of a motor for driving conveying rollers conveying a sheet, whether the front end of the sheet reaches (passes through) a nip portion of the conveying rollers (Japanese Patent Application Laid-Open No. 2000-238934). 
     Further, there also has been an image forming apparatus configured to adjust, based on the detection result of a sensor provided in a conveying path, the conveying velocity of a sheet so that the sheet is conveyed according to an image forming sequence set in advance (so that the sheet is conveyed to an image forming position at an appropriate timing). Specifically, the image forming apparatus adjusts based on the detection result of a sensor, the conveying velocity of a sheet so that the sheet reaches a target position at a timing determined in advance. 
     In the configuration of the image forming apparatus discussed in Japanese Patent Application Laid-Open No. 2000-238934, the timing for detecting the load fluctuation is determined as the timing when the front end of the sheet reaches the nip position of the conveying rollers. Actually, at the timing when the load fluctuation is detected, however, the front end of the sheet is located upstream of the nip position of the conveying rollers due to the thickness of the sheet. 
     If the conveying velocity is adjusted in the above manner in the state where the timing for detecting the load fluctuation is determined as the timing when the front end of the sheet reaches the nip position of the conveying rollers, the following issue may occur. Specifically, even if the conveying velocity is adjusted so that the front end of the sheet reaches a target position at a timing determined in advance, the position of the front end of the sheet at this timing may be located upstream of the target position. As a result, the sheet may reach an image forming position after the timing when the formation of an image on the sheet is started. As a result, the image may not be formed at an appropriate position on the sheet. 
     SUMMARY 
     The present disclosure is directed to preventing the situation where an image is formed at an inappropriate position on a sheet. 
     According to an aspect of the present disclosure, an image forming apparatus includes a stacking unit on which a sheet is to be stacked, a pickup roller configured to feed the sheet stacked on the stacking unit, a first conveying roller configured to convey the sheet fed by the pickup roller, a transfer unit configured to transfer an image onto the sheet at an image forming position downstream of the first conveying roller in a conveying direction in which the sheet is conveyed, a motor configured to drive the first conveying roller, a determiner configured to determine a value of a parameter corresponding to a load torque applied to a rotor of the motor, and a velocity adjuster configured to, based on a length between a position of a front end of the sheet and a nip position of the first conveying roller at a first timing when the value of the parameter determined by the determiner changes from a value smaller than a predetermined value to a value greater than the predetermined value, and a length between the nip position of the first conveying roller and a predetermined position downstream of the first conveying roller and upstream of the image forming position in the conveying direction, adjust a conveying velocity at which the sheet being conveyed at a predetermined velocity by the first conveying roller is conveyed to the predetermined position. 
     Further features of the present disclosure will become apparent from the following description of exemplary embodiments with reference to the attached drawings. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         FIG. 1  is a cross-sectional view illustrating an image forming apparatus. 
         FIG. 2  is a block diagram illustrating a control configuration of the image forming apparatus. 
         FIG. 3  is a diagram illustrating a relationship between a two-phase motor including an A-phase and a B-phase, and a rotating coordinate system represented by a d-axis and a q-axis. 
         FIG. 4  is a block diagram illustrating a configuration of a motor control device. 
         FIG. 5  is a diagram illustrating a configuration for detecting a fed recording medium. 
         FIG. 6  is a diagram illustrating a deviation Δθ in a case where thin paper is conveyed and a deviation Δθ in a case where thick paper is conveyed, according to a first exemplary embodiment. 
         FIGS. 7A and 7B  are diagrams illustrating a position of a front end of a recording medium at a timing when a sheet detector outputs a signal ‘ 1 ’ (a timing when the recording medium is detected), according to the first exemplary embodiment. 
         FIG. 8  is a diagram illustrating a relationship between a grammage of a recording medium to be conveyed, and a distance from the position of the front end of the recording medium at the timing when the sheet detector outputs the signal ‘ 1 ’ to conveying rollers. 
         FIG. 9  is a flowchart illustrating a control method for controlling a conveying velocity V by a central processing unit (CPU). 
         FIG. 10  is a diagram illustrating a relationship between a grammage of a recording medium to be conveyed, and time Tc from when the recording medium is detected to when a front end of the recording medium reaches a nip position n. 
         FIGS. 11A and 11B  are diagrams illustrating a position of a front end of a recording medium at a timing when a sheet detector outputs a signal ‘ 1 ’, according to a third exemplary embodiment. 
         FIG. 12  is a diagram illustrating a state of a deviation Δθ according to the third exemplary embodiment. 
         FIG. 13  is a diagram illustrating a relationship between a grammage of the recording medium to be conveyed, and a distance Lc from the position of the front end of the recording medium at the timing when the sheet detector outputs the signal ‘ 1 ’ to conveying rollers. 
         FIG. 14  is a block diagram illustrating a configuration of a motor control device that performs velocity feedback control. 
     
    
    
     DESCRIPTION OF THE EMBODIMENTS 
     Exemplary embodiments of the present disclosure will be described below with reference to the drawings. The shapes and the relative arrangement of components described in these exemplary embodiments, however, should be appropriately changed depending on the configuration of an apparatus to which the present disclosure is applied and various conditions, and the scope of the present disclosure is not limited to the following exemplary embodiments. In the following description, a case is described where a motor control device is provided in an image forming apparatus. The motor control device, however, is provided not only in an image forming apparatus. For example, the motor control device is also used in a sheet conveying apparatus that conveys a sheet such as a recording medium or a document. 
     [Image Forming Apparatus] 
     A first exemplary embodiment will be described below.  FIG. 1  is a cross-sectional view illustrating the configuration of a monochrome electrophotographic copying machine (hereinafter referred to as “image forming apparatus”)  100  that includes a sheet conveying apparatus used in the present exemplary embodiment. The image forming apparatus  100  is not limited to a copying machine, and may be, for example, a facsimile apparatus, a printing machine, or a printer. A recording method is not limited to an electrophotographic method, and may be, for example, an inkjet method. Further, the format of the image forming apparatus  100  may be either of monochrome and color formats. 
     With reference to  FIG. 1 , the configuration and the function of the image forming apparatus  100  are described below. As illustrated in  FIG. 1 , the image forming apparatus  100  includes a document reading apparatus  200  and an image printing apparatus  301 . 
     &lt;Document Reading Apparatus&gt; 
     In the document reading apparatus  200 , a document feeding apparatus  201  is provided that feeds a document to a reading position. Documents P stacked in a document stacking portion  2  of the document feeding apparatus  201  are fed one by one by a pickup roller  3 . Then, each document P is conveyed by a sheet feeding roller  4 . At a position opposed to the sheet feeding roller  4 , a separation roller  5  is provided that is in pressure contact with the sheet feeding roller  4 . The separation roller  5  is configured to rotate if a load torque greater than or equal to a predetermined torque is applied to the separation roller  5 . The separation roller  5  has the function of separating two documents fed in an overlapping state. 
     The pickup roller  3  and the sheet feeding roller  4  are linked together by a swinging arm  12 . The swinging arm  12  is supported by a rotating shaft of the sheet feeding roller  4  so that the swinging arm  12  can pivot about the rotating shaft of the sheet feeding roller  4 . 
     The document P is conveyed by the sheet feeding roller  4  and discharged to a sheet discharge tray  10  by sheet discharge rollers  11 . As illustrated in  FIG. 1 , in the document stacking portion  2 , a document set sensor SS 1  is provided that detects whether the documents P are stacked in the document stacking portion  2 . In a conveying path through which each document P passes, a sheet sensor SS 2  is provided that detects the front end of the document P (detects the presence or absence of the document P). 
     In a reading apparatus  202 , a document reading unit  16  is provided that reads an image on a first surface of the conveyed document P. Image information regarding the image read by the document reading unit  16  is output to the image printing apparatus  301 . 
     In the document feeding apparatus  201 , a document reading unit  17  is provided that reads an image on a second surface of the conveyed document P. Image information regarding the image read by the document reading unit  17  is output to the image printing apparatus  301  similarly to the method of the document reading unit  16  described above. 
     As described above, a document is read. That is, the document feeding apparatus  201  and the reading apparatus  202  function as the document reading apparatus  200 . 
     The document reading apparatus  200  has a first reading mode and a second reading mode as document reading modes. The first reading mode is a mode for reading an image on a document conveyed by the above method. The second reading mode is a mode where the document reading unit  16  moving at a constant velocity reads an image on a document placed on document glass  214  of the reading apparatus  202 . Normally, an image on a sheet-like document is read in the first reading mode, and an image on a bound document such as a book or a booklet is read in the second reading mode. 
     Sheet holding trays  302  and  304  are provided in the image printing apparatus  301 . In the sheet holding trays  302  and  304 , different types of recording media can be held. For example, A4-size plain paper is held in the sheet holding tray  302 , and A4-size thick paper is held in the sheet holding tray  304 . On each of the recording media, an image is to be formed by the image forming apparatus  100 . For example, the recording media include a sheet, a resin sheet, cloth, an overhead projector (OHP) sheet, and a label. 
     A recording medium held in the sheet holding tray  302  is fed by a pickup roller  303  and sent out to pre-registration rollers  333  by feeding rollers  331  and conveying rollers  306 . A recording medium held in the sheet holding tray  304  is fed by a pickup roller  305  and sent out to the pre-registration rollers  333  by feeding rollers  332 , conveying rollers  307 , and the conveying rollers  306 . 
     Between the pre-registration rollers  333  and registration rollers  308 , a sheet sensor  335  for detecting the front end of the recording medium is provided. The front end of the recording medium conveyed by the pre-registration rollers  333  is detected by the sheet sensor  335  and then abuts the registration rollers  308  in a stopped state. Then, the pre-registration rollers  333  further rotate, thereby conveying the recording medium further in the conveying direction. Then, the recording medium bends. As a result, an elastic force acts on the recording medium, and the front end of the recording medium abuts the registration rollers  308  along a nip portion thereof. As a result, the skew of the recording medium is corrected. In the present exemplary embodiment, the pre-registration rollers  333  are controlled to rotate for a predetermined time after the sheet sensor  335  detects the front end of the recording medium. The predetermined time is set in advance to sufficient time to bend the recording medium by an amount required to correct the skew of the recording medium. 
     An image signal output from the document reading apparatus  200  is input to an optical scanning device  311  that includes a semiconductor laser and a polygon mirror. The outer peripheral surface of a photosensitive drum  309  is charged by a charging device  310 . After the outer peripheral surface of the photosensitive drum  309  is charged, laser light according to the image signal input from the document reading apparatus  200  to the optical scanning device  311  is emitted from the optical scanning device  311  to the outer peripheral surface of the photosensitive drum  309  via the polygon mirror and mirrors  312  and  313 . As a result, an electrostatic latent image is formed on the outer peripheral surface of the photosensitive drum  309 . The photosensitive drum  309  is charged by a charging method using, for example, a corona charger or a charging roller. 
     Next, the electrostatic latent image is developed with toner in a developing device  314 , thereby forming a toner image on the outer peripheral surface of the photosensitive drum  309 . The toner image formed on the photosensitive drum  309  is transferred onto the recording medium by a transfer charging device  315  as a transfer unit provided at a position (a transfer position) opposed to the photosensitive drum  309 . The registration rollers  308  send the recording medium to the transfer position. 
     The recording medium onto which the toner image has been transferred as described above is sent to a fixing device  318  by a conveying belt  317  and is heated and pressurized by the fixing device  318 , thereby fixing the toner image to the recording medium. In this manner, an image is formed on a recording medium by the image forming apparatus  100 . 
     In a case where an image is formed in a one-sided printing mode, the recording medium having passed through the fixing device  318  is discharged to a sheet discharge tray (not illustrated) by sheet discharge rollers  319  and  324 . In a case where an image is formed in a two-sided printing mode, a fixing process is performed on a first surface of the recording medium by the fixing device  318 , and then, the recording medium is conveyed to a reverse path  325  by the sheet discharge rollers  319 , conveying rollers  320 , and reverse rollers  321 . Then, the recording medium is conveyed to the registration rollers  308  again by conveying rollers  322  and  323 , and an image is formed on a second surface of the recording medium by the above method. Then, the recording medium is discharged to the sheet discharge tray (not illustrated) by the sheet discharge rollers  319  and  324 . 
     In a case where the recording medium, on the first surface of which an image is formed, is discharged face down to outside the image forming apparatus  100 , the recording medium having passed through the fixing device  318  is conveyed through the sheet discharge rollers  319  in a direction toward the conveying rollers  320 . Then, immediately before the rear end of the recording medium passes through a nip portion of the conveying rollers  320 , the rotation of the conveying rollers  320  is reversed, thereby discharging the recording medium to outside the image forming apparatus  100  via the sheet discharge rollers  324  in the state where the first surface of the recording medium faces down. 
     As illustrated in  FIG. 1 , in the image printing apparatus  301 , a stacking unit  327  is provided in which a recording medium is stacked. The recording medium stacked in the stacking unit  327  is sent out in the conveying direction by a pickup roller  328  and then conveyed by sheet feeding rollers  329 . 
     The pickup roller  328  and one of the sheet feeding rollers  329  are linked together by a swinging arm  330 . The swinging arm  330  is supported by the rotating shaft of the sheet feeding roller  329  so that the swinging arm  330  can pivot about the rotating shaft of the sheet feeding roller  329 . 
     On the recording medium conveyed to the conveying rollers  306  by the sheet feeding rollers  329 , an image is formed by the above method. 
     The configuration and the function of the image forming apparatus  100  have been described above. 
       FIG. 2  is a block diagram illustrating an example of the control configuration of the image forming apparatus  100 . As illustrated in  FIG. 2 , a system controller  151  includes a central processing unit (CPU)  151   a,  a read-only memory (ROM)  151   b,  and a random-access memory (RAM)  151   c.  The system controller  151  is connected to an image processing unit  112 , an operation unit  152 , an analog-to-digital (A/D) converter  153 , a high voltage control unit  155 , a motor control device  157 , sensors  159 , an alternating current (AC) driver  160 , a sheet sensor  334 , and the sheet sensor  335 . The system controller  151  can transmit and receive data and a command to and from the units connected to the system controller  151 . 
     The CPU  151   a  reads and executes various programs stored in the ROM  151   b , thereby executing various sequences related to an image forming sequence determined in advance. 
     The RAM  151   c  is a storage device. The RAM  151   c  stores various types of data such as a setting value for the high voltage control unit  155 , an instruction value for the motor control device  157 , and information received from the operation unit  152 . 
     The system controller  151  transmits setting value data, required for image processing by the image processing unit  112 , of the various devices provided in the image forming apparatus  100  to the image processing unit  112 . Further, the system controller  151  receives signals from the sensors  159 , and based on the received signals, sets a setting value of the high voltage control unit  155 . According to the setting value set by the system controller  151 , the high voltage control unit  155  supplies a required voltage to a high voltage unit  156  (the charging device  310 , the developing device  314 , and the transfer charging device  315 ). The sensors  159  include a sensor that detects a recording medium conveyed by the conveying rollers. 
     According to an instruction output from the CPU  151   a,  the motor control device  157  controls a motor  509  for driving the conveying rollers  307 . Although only the motor  509  is illustrated as a motor of the image forming apparatus  100  in  FIG. 2 , a plurality of motors is actually provided in the image forming apparatus  100 . Alternatively, a configuration may be employed in which a single motor control device controls a plurality of motors. Further, although only a single motor control device is provided in  FIG. 2 , actually, a plurality of motor control devices is provided in the image forming apparatus  100 . 
     The A/D converter  153  receives a detected signal detected by a thermistor  154  that detects the temperature of a fixing heater  161 . Then, the A/D converter  153  converts the detected signal from an analog signal to a digital signal and transmits the digital signal to the system controller  151 . The system controller  151  controls the AC driver  160  based on the digital signal received from the A/D converter  153 . The AC driver  160  controls the fixing heater  161  so that the temperature of the fixing heater  161  becomes a temperature required to perform a fixing process. The fixing heater  161  is a heater for use in the fixing process and is included in the fixing device  318 . 
     The system controller  151  controls the operation unit  152  to display, on a display unit provided in the operation unit  152 , an operation screen for a user to set the type of a recording medium to be used (hereinafter referred to as the “paper type”). The system controller  151  receives information set by the user from the operation unit  152 , and based on the information set by the user, controls the operation sequence of the image forming apparatus  100 . The system controller  151  transmits, to the operation unit  152 , information indicating the state of the image forming apparatus  100 . The information indicating the state of the image forming apparatus  100  is, for example, information regarding the number of images to be formed, the progress state of an image forming operation, and a jam or multi-feed of a sheet in the document feeding apparatus  201  and the image printing apparatus  301 . The operation unit  152  displays on the display unit the information received from the system controller  151 . 
     As described above, the system controller  151  controls the operation sequence of the image forming apparatus  100 . A sheet detector  700  will be described below. 
     [Motor Control Device] 
     Next, the motor control device according to the present exemplary embodiment is described. The motor control device according to the present exemplary embodiment controls a motor using vector control. 
     &lt;Vector Control&gt; 
     First, with reference to  FIGS. 3 and 4 , a description is given of a method in which the motor control device  157  performs vector control, according to the present exemplary embodiment. In a motor in the Wowing description, a sensor such as a rotary encoder for detecting the rotational phase of a rotor of the motor is not provided. Alternatively, a sensor such as a rotary encoder may be provided. 
       FIG. 3  is a diagram illustrating the relationship between the stepper motor (hereinafter referred to as “motor”)  509  that has two phases including an A-phase (a first phase) and a B-phase (a second phase), and a rotating coordinate system represented by a d-axis and a q-axis. In  FIG. 3 , in a stationary coordinate system, an α-axis, which is an axis corresponding to windings in the A-phase, and a β-axis, which is an axis corresponding to windings in the B-phase, are defined. In  FIG. 3 , the d-axis is defined along the direction of magnetic flux created by the magnetic poles of a permanent magnet used in a rotor  402 , and the q-axis is defined along a direction rotated 90 degrees counterclockwise from the d-axis (a direction orthogonal to the d-axis). The angle between the α-axis and the d-axis is defined as θ, and the rotational phase of the rotor  402  is represented by the angle θ. In the vector control, a rotating coordinate system based on the rotational phase θ of the rotor  402  is used. Specifically, in the vector control, a q-axis component (a torque current component) and a d-axis component (an excitation current component), which are current components in the rotating coordinate system of a current vector corresponding to a driving current flowing through each winding, are used. The q-axis component (the torque current component) generates a torque in the rotor  402 , and the d-axis component (the excitation current component) influences the strength of magnetic flux passing through the winding. 
     The vector control is a control method for controlling a motor by performing phase feedback control for controlling the value of a torque current component and the value of an excitation current component so that the deviation between an instruction phase indicating a target phase of a rotor and an actual rotational phase of the rotor becomes small. There is also a method for controlling a motor by performing velocity feedback control for controlling the value of a torque current component and the value of an excitation current component so that the deviation between an instruction velocity indicating a target velocity of a rotor and an actual rotational velocity of the rotor becomes small. 
       FIG. 4  is a block diagram illustrating an example of the configuration of the motor control device  157  that controls the motor  509 . The motor control device  157  includes at least one ASIC and executes functions described below. 
     The motor control device  157  includes, as a circuit for performing the vector control, a phase controller  502 , a current controller  503 , a coordinate inverse transformer  505 , a coordinate transformer  511 , and a pulse-width modulation (PWM) inverter  506  that supplies driving currents to the windings of the motor  509 . The coordinate transformer  511  performs coordinate transformation on current vectors corresponding to driving currents flowing through the windings in the A-phase and the B-phase of the motor  509 , from the stationary coordinate system represented by the α-axis and the β-axis to the rotating coordinate system represented by the q-axis and the d-axis. As a result, the driving currents flowing through the windings are represented by the current value of the q-axis component (a q-axis current) and the current value of the d-axis component (a d-axis current), which are current values in the rotating coordinate system. The q-axis current corresponds to a torque current that generates a torque in the rotor  402  of the motor  509 . The d-axis current corresponds to an excitation current that influences the strength of magnetic flux passing through each winding of the motor  509 . The motor control device  157  can independently control the q-axis current and the d-axis current. As a result, the motor control device  157  controls the q-axis current according to a load torque applied to the rotor  402  and thereby can efficiently generate a torque required for the rotation of the rotor  402 . That is, in the vector control, the magnitude of the current vector illustrated in  FIG. 3  changes according to the load torque applied to the rotor  402 . 
     The motor control device  157  determines the rotational phase θ of the rotor  402  of the motor  509  using a method described below, and based on the determination result, performs the vector control, Based on the operation sequence of the motor  509 , the CPU  151   a  outputs, to an instruction generator  500 , driving pulses as an instruction to drive the motor  509 . The operation sequence of the motor  509  (the driving pattern of the motor  509 ) is stored, for example, in the ROM  151   b . Based on the operation sequence stored in the ROM  151   b,  the CPU  151   a  outputs driving pulses as a pulse train. The number of pulses corresponds to an instruction phase, and the frequency of pulses corresponds to a target velocity. 
     Based on the driving pulses output from the CPU  151   a,  the instruction generator  500  generates an instruction phase θ_ref representing a target phase of the rotor  402  and outputs the instruction phase θ_ref. The configuration of the instruction generator  500  will be described below. 
     A subtractor  101  calculates a deviation AO between the rotational phase θ of the rotor  402  of the motor  509  and the instruction phase θ_ref and outputs the deviation Δθ. 
     The phase controller  502  acquires the deviation Δθ in a period T (e.g., 200 μs). Based on proportional control (P-control), integral control (I-control), and differential control (D-control), the phase controller  502  generates a q-axis current instruction value iq_ref and a d-axis current instruction value id_ref as target values so that the deviation Δθ output from the subtractor  101  becomes small. Then, the phase controller  502  outputs the q-axis current instruction value iq_ref and the d-axis current instruction value id_ref. Specifically, based on the P-control, the I-control, and the D-control, the phase controller  502  generates the q-axis current instruction value iq_ref and the d-axis current instruction value id_ref so that the deviation Δθ output from the subtractor  101  becomes 0. Then, the phase controller  502  outputs the q-axis current instruction value iq_ref and the d-axis current instruction value id_ref. The P-control is a control method for controlling the value of a target to be controlled, based on a value proportional to the deviation between an instruction value and an estimated value. The I-control is a control method for controlling the value of the target to be controlled, based on a value proportional to the time integral of the deviation between the instruction value and the estimated value. The D-control is a control method for controlling the value of the target to be controlled, based on a value proportional to a change over time in the deviation between the instruction value and the estimated value. The phase controller  502  according to the present exemplary embodiment generates the q-axis current instruction value iq_ref and the d-axis current instruction value id_ref based on proportional-integral-derivative (PID) control. The configuration, however, is not limited to this. For example, the phase controller  502  may generate the q-axis current instruction value iq_ref and the d-axis current instruction value id_ref based on proportional-integral (PI) control. In a case where a permanent magnet is used in the rotor  402 , normally, the d-axis current instruction value id_ref, which influences the strength of magnetic flux passing through each winding, is set to 0. The configuration, however, is not limited to this. 
     A driving current flowing through the windings in the A-phase of the motor  509  is detected by a current detector  507  and then converted from an analog value to a digital value by an A/D converter  510 . A driving current flowing through the windings in the B-phase of the motor  509  is detected by a current detector  508  and then converted from an analog value to a digital value by the A/D converter  510 . The cycle in which the current detectors  507  and  508  detect the currents is, for example, a cycle (e.g., 25 μs) less than or equal to the cycle T, in which the phase controller  502  acquires the deviation Δθ. 
     The current values of the driving currents converted from the analog values to the digital values by the A/D converter  510  are represented as current values iα and iα in the stationary coordinate system by the following formulas (1) and (2), using a phase θe of the current vector illustrated in  FIG. 3 . The phase θe of the current vector is defined as the angle between the α-axis and the current vector. I represents the magnitude of the current vector. 
         iα=I *cos θ e   (1)
 
         iβ=I *sin θ e   (2)
 
     The current values iα and iβ are input to the coordinate transformer  511  and an inductive voltage determiner  512 . 
     The coordinate transformer  511  transforms the current values iα and iβ in the stationary coordinate system into a current value iq of the q-axis current and a current value id of the d-axis current in the rotating coordinate system by the following formulas (3) and (4). 
         id =cos θ* i α+sin θ* iβ   (3)
 
         iq =−sin θ* i α+cos θ* iβ   (4)
 
     The coordinate transformer  511  outputs the transformed current value iq to a subtractor  102 . The coordinate transformer  511  outputs the transformed current value id to a subtractor  103 . 
     The subtractor  102  calculates the deviation between the q-axis current instruction value iq_ref and the current value iq and outputs the calculated deviation to the current controller  503 . 
     The subtractor  103  calculates the deviation between the d-axis current instruction value id_ref and the current value id and outputs the calculated deviation to the current controller  503 . 
     Based on the PID control, the current controller  503  generates driving voltages Vq and Vd so that each of the deviations input to the current controller  503  becomes small. Specifically, the current controller  503  generates the driving voltages Vq and Vd so that each of the deviations input to the current controller  503  becomes 0. Then, the current controller  503  outputs the driving voltages Vq and Vd to the coordinate inverse transformer  505 . That is, the current controller  503  functions as a generation unit. The current controller  503  according to the present exemplary embodiment generates the driving voltages Vq and Vd based on the PID control. The configuration, however, is not limited to this. For example, the current controller  503  may generate the driving voltages Vq and Vd based on the PI control. 
     The coordinate inverse transformer  505  inversely transforms the driving voltages Vq and Vd in the rotating coordinate system, which are output from the current controller  503 , into driving voltages Vα and Vβ in the stationary coordinate system by the following formulas (5) and (6). 
         V α=cos θ* Vd −sin θ* Vq   (5)
 
         V β=sin θ* Vd +cos θ* Vq   (6)
 
     The coordinate inverse transformer  505  outputs the inversely transformed driving voltages Vα and Vβ to the inductive voltage determiner  512  and the PWM inverter  506 . 
     The PWM inverter  506  includes a full-bridge circuit. The full-bridge circuit is driven by PWM signals based on the driving voltages Vα and Vβ input from the coordinate inverse transformer  505 . As a result, the PWM inverter  506  generates driving currents iα and iβ according to the driving voltages Vα and Vβ and supplies the driving currents iα and iβ to the windings in the respective phases of the motor  509 , thereby driving the motor  509 . In the present exemplary embodiment, the PWM inverter  506  includes a full-bridge circuit. Alternatively, the PWM inverter  506  may include a half-bridge circuit. 
     Next, a description is given of a configuration for determining the rotational phase θ. The rotational phase θ of the rotor  402  is determined using the values of inductive voltages Eα and Eβ induced in the windings in the A-phase and the B-phase of the motor  509  by the rotation of the rotor  402 . The value of each inductive voltage is determined (calculated) by the inductive voltage determiner  512 . Specifically, the inductive voltages Eα and Eβ are determined by the following formulas (7) and (8), based on the current values iα and iβ input from the A/D converter  510  to the inductive voltage determiner  512  and the driving voltages Vα and Vβ input from the coordinate inverse transformer  505  to the inductive voltage determiner  512 . 
         Eα=Vα−R*iα−L*diα/dt   (7)
 
         Eβ=Vβ−R*iβ−L*diβ/dt   (8)
 
     In these formulas, R represents winding resistance, and L represents winding inductance. The values of the winding resistance R and the winding inductance L are values specific to the motor  509  in use and are stored in advance in the ROM  151   b  or a memory (not illustrated) provided in the motor control device  157 . 
     The inductive voltages Eα and Eβ determined by the inductive voltage determiner  512  are output to the phase determiner  513 . 
     Based on the ratio between the inductive voltages Eα and Eβ output from the inductive voltage determiner  512 , the phase determiner  513  determines the rotational phase θ of the rotor  402  of the motor  509  by the following formula (9). 
       θ=tan {circumflex over ( )}−1(− Eβ/E α)  (9)
 
     In the present exemplary embodiment, the phase determiner  513  determines the rotational phase θ by performing calculation based on formula (9). The configuration, however, is not limited to this. For example, the phase determiner  513  may determine the rotational phase θ by referencing a table stored in a memory  513   a  and illustrating the relationships between the inductive voltages Eα and Eβ, and the rotational phase θ corresponding to the inductive voltages Eα and Eβ. 
     The rotational phase θ of the rotor  402  obtained as described above is input to the subtractor  101 , the coordinate inverse transformer  505 , and the coordinate transformer  511 . 
     The motor control device  157  repeatedly performs the above control. 
     As described above, the motor control device  157  according to the present exemplary embodiment performs the vector control using phase feedback control for controlling current values in the rotating coordinate system so that the deviation Δθ between the instruction phase θ_ref and the rotational phase θ becomes small. The vector control is performed, whereby it is possible to prevent a motor from entering a step-out state and prevent an increase in the motor sound and an increase in power consumption due to an excess torque. 
     &lt;Instruction Generator&gt; 
     Based on the driving pulses output from the CPU  151   a,  the instruction generator  500  generates the instruction phase θ_ref using the following formula (10) and outputs the instruction phase θ_ref. 
       θ_ref=θini+θstep* n   (10)
 
     θini is the phase (initial phase) of the rotor  402  when the driving of the motor  509  is started. θstep is the amount of increase (the amount of change) in the instruction phase θ_ref per driving pulse. n is the number of pulses input to the instruction generator  500 . 
     [Control of Conveyance of Sheet in Image Forming Apparatus] 
     &lt;Sheet Detector&gt; 
       FIG. 5  is a diagram illustrating a configuration for detecting a fed recording medium. As illustrated in  FIG. 5 , the conveying rollers  307  are driven by the motor  509 , and the motor  509  is controlled by the motor control device  157 . The feeding rollers  332  and the pickup roller  305  are driven by motors (not illustrated). The feeding rollers  332  are rollers adjacent to the conveying rollers  307 . In the present exemplary embodiment, a conveying velocity V at which a recording medium is conveyed is set to a predetermined velocity V 0  in advance based on the operation sequence of the image forming apparatus  100 . 
     Next, a description is given of a configuration in which the sheet detector  700  detects whether the front end of the recording medium reaches a nip portion of the conveying rollers  307 . In the present exemplary embodiment, it is detected (determined) whether the front end of the recording medium reaches the nip portion of the conveying rollers  307  not by a sensor such as a photosensor but based on a signal output from the motor control device  157 . In the following description, for example, the sheet detector  700  outputs the detection result in a predetermined time cycle (e.g., the cycle in which the deviation Δθ is input). 
     The front end of the recording medium conveyed downstream by the feeding rollers  332  is nipped by the conveying rollers  307 . If the front end of the recording medium is nipped by the conveying rollers  307 , the load torque applied to the rotor  402  of the motor  509  for driving the conveying rollers  307  increases. If the load torque increases, the absolute value of the deviation Δθ increases. 
     If the absolute value of the deviation Δθ becomes greater than or equal to a threshold Δθth as a predetermined value, the sheet detector  700  outputs a signal ‘ 1 ’ indicating that the absolute value of the deviation Δθ becomes greater than or equal to the threshold Δθth (the recording medium is detected). If the absolute value of the deviation Δθ is less than the threshold Δθth, the sheet detector  700  outputs a signal ‘ 0 ’ indicating that the absolute value of the deviation Δθ is less than the threshold Δθth. The threshold Δθth will be described below. 
     &lt;Adjustment of Conveying Velocity V&gt; 
     The detection result of the sheet detector  700  is input to the CPU  151   a . If the sheet detector  700  outputs the signal ‘ 1 ’, the CPU  151   a  adjusts the conveying velocity V of the recording medium. For example, the CPU  151   a  changes the frequencies of driving pulses to be output to motor control devices provided in the image forming apparatus  100 , thereby adjusting the conveying velocity V. 
     In the following description, X 1  represents the distance from the pickup roller  305  to the conveying rollers  307 . X 2  represents the distance from the conveying rollers  307  to a detection position where the sheet sensor  334  detects the recording medium. That is, the distance from the pickup roller  305  to the detection position is represented by X 1 +X 2 . T 0  corresponds to time required for the recording medium to be conveyed by the distance X 1 +X 2  at the conveying velocity V 0 . 
     In the present exemplary embodiment, the pickup roller  305  is repeatedly rotated and stopped at predetermined time intervals, thereby feeding recording media at predetermined intervals. As illustrated in  FIG. 2 , the CPU  151   a  includes a timer  151   d  and measures the time elapsed since the driving of the pickup roller  305  is started (since the CPU  151   a  outputs an instruction to start driving the pickup roller  305 ). 
     The CPU  151   a  sets as the conveying velocity V a velocity calculated based on the distance X 2  and time period obtained by subtracting from time period T 0  time period Ta, the time period Ta being a period from when the driving of the pickup roller  305  is started to when the sheet detector  700  outputs the signal ‘ 1 ’. Specifically, based on the following formula (11), the CPU  151   a  sets the conveying velocity V in a section from the conveying rollers  307  to the detection position (i.e., the peripheral velocity of conveying rollers in the section from the conveying rollers  307  to the detection position). The conveying velocity V in a section from the pickup roller  305  to the conveying rollers  307  after the conveying velocity V in the section from the conveying rollers  307  to the detection position is adjusted may be set to V 0 , or may be set to the conveying velocity V adjusted based on formula (11). 
         V=X 2/( T 0 −Ta )  (11)
 
       FIG. 6  is a diagram illustrating the deviation Δθ output from the motor control device  157  in a case where thin paper is conveyed (a dashed line), and the deviation Δθ output from the motor control device  157  in a case where thick paper is conveyed (a solid. line). In  FIG. 6 , the timing when a feeding operation for feeding the recording medium is started is illustrated as t=0. 
     In  FIG. 6 , the deviation Δθ having a positive value means that the rotational phase θ is behind the instruction phase θ_ref. The deviation Δθ having a negative value means that the rotational phase θ is ahead of the instruction phase θ_ref. However, the relationships between the polarity of the deviation Δθ, and the rotational phase θ and the instruction phase θ_ref are not limited to these. For example, a configuration may be employed in which, in a case where the rotational phase θ is behind the instruction phase θ_ref, the deviation Δθ has a negative value, and in a case where the rotational phase θ is ahead of the instruction phase θ_ref, the deviation Δθ has a positive value. As illustrated in  FIG. 6 , if the load torque increases, the absolute value of the deviation Δθ becomes great due to the fact that the rotational phase θ of the rotor  402  of the motor  509  is behind the instruction phase θ_ref. 
       FIGS. 7A and 7B  are diagrams illustrating the position of the front end of the recording medium at the timing when the sheet detector  700  outputs the signal ‘ 1 ’ (the timing when the recording medium is detected). 
       FIG. 7A  is a diagram illustrating the position of the front end of the thin paper at the timing (a time ta) when the sheet detector  700  outputs the signal ‘ 1 ’ in a case where the thin paper is conveyed.  FIG. 7B  is a diagram illustrating the position of the front end of the thick paper at the timing (a time tb) when the sheet detector  700  outputs the signal ‘ 1 ’ in a case where the thick paper is conveyed. 
     The front end of the recording medium conveyed downstream by the feeding rollers  332  is nipped by the conveying rollers  307 . If the front end of the recording medium is nipped by the conveying rollers  307 , the load torque applied to the rotor  402  of the motor  509  for driving the conveying rollers  307  increases. If the load torque increases, the absolute value of the deviation Δθ increases, for example, as illustrated in  FIG. 6  (the time ta or tb). 
     In the present exemplary embodiment, the conveying rollers  307  rotate at a peripheral velocity faster than the peripheral velocity of the feeding rollers  332 . If the recording medium is nipped by the conveying rollers  307 , the conveying rollers  307  pull the recording medium nipped by the feeding rollers  332  downstream. With such a configuration, it is possible to make the range of increase in the load torque when the recording medium is nipped by the conveying rollers  307  greater. Thus, the front end of the recording medium is detected with higher accuracy. 
     In the present exemplary embodiment, the threshold Δθth is set to, for example, a value smaller than the load torque applied to the conveying rollers  307  that increases due to a recording medium having the smallest rigidity and thickness among a plurality of types of recording media that can be conveyed in the image forming apparatus  100 , i.e., a value smaller than the maximum value (the peak value) of the absolute value of the deviation Δθ. Further, the threshold Δθth is set to, for example, a value smaller than the load torque applied to the conveying rollers  307  that increases due to a recording medium having the greatest rigidity and thickness among the plurality of types of recording media that can be conveyed in the image forming apparatus  100 , i.e., a value smaller than the maximum value (the peak value) of the absolute value of the deviation Δθ. 
     The threshold Δθth is set to, for example, a value greater than the absolute value of the deviation Δθ assumed in the state where the recording medium is not nipped by the nip portion of the conveying rollers  307  and also the state where the conveying rollers  307  rotate at a constant velocity. 
     As illustrated in  FIGS. 7A and 7B , the front end of the recording medium is nipped at the timing when the front end of the recording medium is located upstream of a nip position n in the conveying direction due to the thickness of the recording medium. As illustrated in  FIGS. 7A and 7B , a distance La from the position of the front end of the thin paper at the timing when the sheet detector  700  outputs the signal ‘ 1 ’ to the nip position n in a case where the thin paper is conveyed is shorter than a distance Lb from the position of the front end of the thick paper at the timing when the sheet detector  700  outputs the signal ‘ 1 ’ to the nip position n in a case where the thick paper is conveyed. This means that, due to the fact that the thickness of the thick paper is greater than the thickness of the thin paper, the position of the front end of the thick paper when the conveying rollers  307  start nipping the thick paper is located upstream of the position of the front end of the thin paper when the conveying rollers  307  start nipping the thin paper. 
     As described above, a distance Y from the position of the front end of the recording medium at the timing when the sheet detector  700  outputs the signal ‘ 1 ’ to the detection position is different from the distance X 2 . In other words, the distance Y is longer than the distance X 2 . If the conveying velocity V is set based on formula (11), the position of the front end of the recording medium at the timing when the recording medium is to reach the detection position is located upstream of the detection position due to the fact that the distance Y is longer than the distance X 2 . That is, the recording medium may reach the detection position after the timing when the recording medium is to reach the detection position. As a result, the recording medium may reach the transfer position after the timing when the transfer of an image onto the recording medium is started, and the image may not be formed at an appropriate position on the recording medium. 
     In the present exemplary embodiment, the following configuration is applied, thereby preventing the situation where an image is formed at an inappropriate position on a recording medium. 
       FIG. 8  is a diagram illustrating the relationship between the grammage of the recording medium to be conveyed, and a distance Lc from the position of the front end of the recording medium at the timing when the sheet detector  700  outputs the signal ‘ 1 ’ to the conveying rollers  307 . A grammage Ma in  FIG. 8  corresponds to the grammage of the thin paper. A grammage Mb in  FIG. 8  corresponds to the grammage of the thick paper. The relationship between the grammage and the distance Lc illustrated in  FIG. 8  is obtained by experiment and stored in advance, for example, in the ROM  151   b.    
     A distance Lc_a is a value corresponding to La illustrated in  FIG. 7A . A distance Lc_b is a value corresponding to Lb illustrated in  FIG. 7B . 
     Information regarding the paper type is, for example, input by the user through the operation unit  152 . The information regarding the paper type includes the grammage and the rigidity of the recording medium. Based on the input information regarding the paper type, and the relationship between the grammage and the distance Lc stored in the ROM  151   b , the CPU  151   a  determines the distance Lc. For example, if information indicating that the thin paper is to be conveyed is input by the user through the operation unit  152 , the CPU  151   a  sets Lc_a corresponding to the thin paper as the distance Lc. If information indicating that the thick paper is to be conveyed is input by the user through the operation unit  152 , the CPU  151   a  sets Lc_b corresponding to the thick paper as the distance Lc. 
     Using the set distance Lc, the CPU  151   a  sets the conveying velocity V based on the following formula (12). 
         V =( X 2+ Lc )/( T 0 −Ta )  (12)
 
     That is, the CPU  151   a  calculates the distance from the position of the front end of the recording medium at e timing when the sheet detector  700  outputs the signal ‘ 1 ’ to the registration rollers  308 . Then, the CPU  151   a  sets the conveying velocity V by dividing the calculated distance by a value obtained by subtracting the time period Ta from the time period T 0 . That is, the CPU  151   a  sets the conveying velocity V based on the position of the front end of the recording medium at the timing when the sheet detector  700  outputs the signal ‘ 1 ’. 
       FIG. 9  is a flowchart illustrating a control method for controlling the conveying velocity V by the CPU  151   a.  With reference to  FIG. 9 , control of the conveying velocity V according to the present exemplary embodiment is described. The processing of the flowchart is executed by the CPU  151   a.  During the processing of the flowchart, the CPU  151   a  resets and starts the timer  151   d  each time the CPU  151   a  outputs an instruction to start rotationally driving the pickup roller  305 . 
     In step S 1001 , if information regarding the paper type is input to the CPU  151   a  through the operation unit  152  (YES in step S 1001 ), then in step S 1002 , the CPU  151   a  sets the distance Lc based on the input information regarding the paper type. 
     Then, in step S 1003 , the CPU  151   a  starts a feeding operation for feeding a recording medium stored in a specified sheet holding tray. From this point forward, the pickup roller  305  is repeatedly driven and stopped at predetermined time intervals. 
     Next, in step S 1004 , CPU  151   a  determines whether the sheet detector  700  outputs the signal ‘ 1 ’. If the sheet detector  700  outputs the signal ‘ 1 ’ (YES in step S 1004 ), the processing proceeds to step S 1005 . 
     In step S 1005 , the CPU  151   a  adjusts (sets) the conveying velocity V based on the distance Lc set in step S 1002 , the time period Ta from when the driving of the pickup roller is started to when the sheet detector  700  outputs the signal ‘ 1 ’, and the distance X 2 . Specifically, the CPU  151   a  sets the conveying velocity V using formula (12). 
     In step S 1006 , the CPU  151   a  determines whether a print job is to be ended. If a print job is to be ended (YES in step S 1006 ), then in step S 1007 , the CPU  151   a  ends the feeding operation. 
     On the other hand, in step S 1006 , if the print job is not to be ended (NO in step S 1006 ), the processing returns to step S 1004 . 
     In step S 1004 , if the sheet detector  700  does not output the signal ‘ 1 ’ (NO in step S 1004 ), the processing proceeds to step S 1008 . 
     In step S 1008 , the CPU  151   a  determines whether the state where the sheet detector  700  does not output the signal ‘ 1 ’ continues for a predetermined time. If the state where the sheet detector  700  does not output the signal ‘ 1 ’ does not continue for the predetermined time (NO in step S 1008 ), the processing returns to step S 1004 . 
     On the other hand, in step S 1008 , if the state where the sheet detector  700  does not output the signal ‘ 1 ’ continues for the predetermined time (YES in step S 1008 ), then in step S 1009 , the CPU  151   a  stops the feeding operation. The predetermined time is set to, for example, time longer than time required for the recording medium fed by the pickup roller  305  to be conveyed at the conveying velocity V 0  and reach the conveying rollers  307 . 
     Then, in step S 1010 , the CPU  151   a  notifies the user that an abnormality (e.g., a jam) occurs in the conveyance of the recording medium, by displaying the notification on the display unit provided in the operation unit  152 . 
     As described above, in the present exemplary embodiment, based on the distance X 2  and the distance Lc that occurs due to the thickness of the recording medium, the distance from the position of the front end of the recording medium at the timing when the sheet detector  700  outputs the signal ‘ 1 ’ to the registration rollers  308  is calculated. The conveying velocity V is set by dividing the calculated distance by a value obtained by subtracting the time period Ta from the time period T 0 . That is, in the present exemplary embodiment, the conveying velocity V is set based on the position of the front end of the recording medium at the timing when the sheet detector  700  outputs the signal ‘ 1 ’. As a result, it is possible to prevent a recording medium from reaching a transfer position after the timing when the transfer of an image onto the recording medium is started. Thus, it is possible to prevent the situation where the image is formed at an inappropriate position on the recording medium. 
     Further, in the present exemplary embodiment, the conveying velocity V is set based on the distance Lc corresponding to the paper type. As a result, it is possible to prevent a recording medium from reaching a transfer position after the timing when the transfer of an image onto the recording medium is started due to the fact that the position of the front end of the recording medium at the timing when the sheet detector  700  outputs the signal ‘ 1 ’ differs depending on the paper type. That is, it is possible to prevent the situation where the image is not formed at an appropriate position on the recording medium. 
     A second exemplary embodiment is described below. Components of the image forming apparatus  100  similar to those according to the first exemplary embodiment are not described here. 
     In the first exemplary embodiment, the CPU  151   a  sets the conveying velocity V based on the distance from the position of the front end of the recording medium at the timing when the sheet detector  700  outputs the signal ‘ 1 ’ to the registration rollers  308 . In the present exemplary embodiment, the CPU  151   a  sets the conveying velocity V based on the timing when the front end of the recording medium reaches a nip position of conveying rollers. 
       FIG. 10  is a diagram illustrating the relationship between the grammage of the recording medium to be conveyed, and time Tc from when the recording medium is detected to when the front end of the recording medium reaches the nip position n. A grammage Ma in  FIG. 10  corresponds to the grammage of the thin paper. A grammage Mb in  FIG. 10  corresponds to the grammage of the thick paper. The relationship between the grammage and the time Tc illustrated in  FIG. 10  is obtained by experiment and stored in advance, for example, in the ROM  151   b.    
     Time Tc_a and time Tc_b are values obtained by dividing by the conveying velocity V 0  the distance from the position of the front end of the recording medium at the timing when the sheet detector  700  outputs the signal ‘ 1 ’ to the nip position n of the conveying rollers  307 . Specifically, the time Tc_a and the time Tc_b are represented by the following formulas (13) and (14). 
         Tc _ a=La/V 0  (13)
 
         Tc _ b=Lb/V 0  (14)
 
     Information regarding the type of the recording medium (the paper type) specified by the user via the operation unit  152  is input to the CPU  151   a.  Based on the acquired information regarding the paper type, and the relationship between the grammage and the time Tc stored in the ROM  151   b , the CPU  151   a  determines the time Tc. For example, if information indicating that the thin paper is to be conveyed is input by the user via the operation unit  152 , the CPU  151   a  sets the time Tc_a corresponding to the thin paper as the time Tc. If information indicating that the thick paper is to be conveyed is input by the user via the operation unit  152 , the CPU  151   a  sets the time Tc_b corresponding to the thick paper as the time Tc. 
     Using the set time Tc, the CPU  151   a  sets the conveying velocity V based on the following formula (15). Specifically, the CPU  151   a  sets the conveying velocity V in the section from the conveying rollers  307  to the detection position (i.e., the peripheral velocity of conveying rollers in the section from the conveying rollers  307  to the detection position). The conveying velocity V in the section from the pickup roller  305  to the conveying rollers  307  after the conveying velocity V in the section from the conveying rollers  307  to the detection position is adjusted may be set to V 0 , or may be set to the adjusted conveying velocity V. 
         V=X 2/( T 0−( Ta+Tc ))  (15)
 
     That is, based on the time Ta and the time Tc, the CPU  151   a  calculates the time from when the driving of the pickup roller  305  is started to when the front end of the recording medium reaches the nip position n of the conveying rollers  307 . Then, the CPU  151   a  sets the conveying velocity V by dividing the distance X 2  by a value obtained by subtracting the calculated time from the time T0. That is, the CPU  151   a  sets the conveying velocity V based on the timing when the front end of the recording medium actually reaches a nip position of conveying rollers. 
     As described above, in the present exemplary embodiment, based on the time Ta and the time Tc, the time from when the driving of the pickup roller  305  is started to when the front end of the recording medium reaches the nip position n of the conveying rollers  307  is calculated. The conveying velocity V is set by dividing the distance X 2  by a value obtained by subtracting the calculated time from the time T 0 . That is, in the present exemplary embodiment, the conveying velocity V is set based on the timing when the front end of the recording medium reaches a nip position of conveying rollers. As a result, it is possible to prevent a recording medium from reaching a transfer position after the timing when the transfer of an image onto the recording medium is started. Thus, it is possible to prevent the situation where the image is formed at an inappropriate position on the recording medium. 
     Further, in the present exemplary embodiment, the conveying velocity V is set based on the time Tc corresponding to the paper type. As a result, it is possible to prevent a recording medium from reaching a transfer position after the timing when the transfer of an image onto the recording medium is started due to the fact that the position of the front end of the recording medium at the timing when the sheet detector  700  outputs the signal ‘ 1 ’ differs depending on the paper type. That is, it is possible to prevent the situation where the image is formed at an inappropriate position on the recording medium. 
     A third exemplary embodiment is described below. Components of the image forming apparatus  100  similar to those according to the first exemplary embodiment are not described here. 
       FIGS. 11A and 11B  are diagrams illustrating the position of the front end of the recording medium at the timing when the sheet detector  700  outputs the signal ‘ 1 ’, according to the present exemplary embodiment.  FIG. 11A  is a diagram illustrating the position of the front end of the thin paper at the timing when the sheet detector  700  outputs the signal ‘ 1 ’ in a case where the thin paper is conveyed.  FIG. 11B  is a diagram illustrating the position of the front end of the thick paper at the timing when the sheet detector  700  outputs the signal ‘ 1 ’ in a case where the thick paper is conveyed. 
     In the present exemplary embodiment, the conveying path from the feeding rollers  332  to the conveying rollers  307  is curved. Thus, the front end of the recording medium conveyed downstream by the feeding rollers  332  collides with the conveying rollers  307  and then is guided to the nip position n of the conveying rollers  307 . Then, the front end of the recording medium is nipped by the conveying rollers  307 . 
     In a case where thin paper as a recording medium having small rigidity (or thickness) is conveyed, the amount of increase in the load torque applied to the rotor  402  of the motor  509  that occurs when the front end of the thin paper collides with the conveying rollers  307  is relatively small. On the other hand, the amount of increase in the load torque applied to the rotor  402  of the motor  509  that occurs due to the fact that the front end of the thin paper is nipped by the conveying rollers  307  is greater than the amount of increase in the load torque that occurs when the front end of the thin paper collides with the conveying rollers  307 . 
     The amount of increase in the load torque that occurs when the front end of thick paper having greater rigidity and thickness than those of the thin paper collides with the conveying rollers  307  is greater than the amount of increase in the load torque that occurs when the front end of the thin paper collides with the conveying rollers  307 . 
       FIG. 12  is a diagram illustrating the state of the deviation Δθ according to the present exemplary embodiment. As indicated by a dashed-dotted line in  FIG. 12 , the absolute value of the deviation Δθ increases at the timing (a time ta) when the front end of the thin paper collides with the conveying rollers  307 . As indicated by a solid line in  FIG. 12 , the absolute value of the deviation Δθ increases at the timing (a time tc) when the front end of the thick paper collides with the conveying rollers  307  and the timing (a time tb) when the front end of the thick paper is nipped by the conveying rollers  307 . 
     As illustrated in  FIG. 12 , in a case where the thick paper is conveyed, at a timing (the time tc) before the timing (the time tb) when the thick paper is nipped by the conveying rollers  307 , the deviation Δθ increases due to the fact that the thick paper collides with the conveying rollers  307 . That is, a distance Lb′ has a value greater than that of the distance Lb in the first exemplary embodiment. 
     The distance Y from the position of the front end of the recording medium at the timing when the sheet detector  700  outputs the signal ‘ 1 ’ to the detection position is different from the distance X 2 . Specifically, the distance Y is longer than the distance X 2 . if the conveying velocity V is set based on formula (11), the position of the front end of the recording medium at the timing when the recording medium is to reach the detection position is located upstream of the detection position due to the fact that the distance Y is longer than the distance X 2 . In other words, the recording medium may reach the detection position after the timing when the recording medium is to reach the detection position. As a result, the recording medium may reach the transfer position after the timing when the transfer of an image onto the recording medium is started, and the image may not be formed at an appropriate position on the recording medium. 
     In response, in the present exemplary embodiment, the following configuration is applied, thereby preventing the situation where an image is formed at an inappropriate position on a recording medium. 
       FIG. 13  is a diagram illustrating the relationship between the grammage of the recording medium to be conveyed, and a distance Lc′ from the position of the front end of the recording medium at the timing when the sheet detector  700  outputs the signal ‘ 1 ’ to the conveying rollers  307 . A grammage Mb′ corresponds to, for example, the smallest grammage among the grammages of the recording medium for which the sheet detector  700  outputs the signal ‘ 1 ’ due to the fact that the recording medium collides with the conveying rollers  307 . The relationship between the grammage and the distance Lc′ illustrated in  FIG. 13  is obtained by experiment and stored in advance, for example, in the ROM  151   b.    
     A distance L 1  is a value corresponding to La illustrated in  FIG. 11A . A distance L 2  is a value corresponding to Lb′ illustrated in  FIG. 11B . 
     The CPU  151   a  determines the distance Lc′ based on acquired information regarding the paper type, and the relationship between grammage and the distance Lc′ stored in the ROM  151   b.    
     For example, a recording medium having a grammage greater than or equal to the grammage Mb′ is detected by the sheet detector  700  due to the fact that the recording medium collides with the conveying rollers  307 . At this time, the timing when the recording medium fed by the pickup roller  305  collides with the conveying rollers  307  is approximately the same regardless of the paper type. Thus, the distance from the position of the front end of the recording medium having a grammage greater than or equal to the grammage Mb′ at the timing when the recording medium is detected by the sheet detector  700  to the nip position n is approximately the same (Lb′) regardless of the paper type. Thus, in the present exemplary embodiment, if the grammage input by the user via the operation unit  152  is greater than or equal to Mb′, the CPU  151   a  sets L 2  as the distance Lc′. 
     On the other hand, if the grammage input by the user via the operation unit  152  is less than or equal to Mb′, the CPU  151   a  sets the distance Lc′ according to information regarding the input grammage. 
     Using the set distance Lc′, the CPU  151   a  sets the conveying velocity V based on formula (12). 
     That is, the CPU  151   a  calculates the distance from the position of the front end of the recording medium at the timing when the sheet detector  700  outputs the signal ‘ 1 ’ to the registration rollers  308 . Then, the CPU  151   a  sets the conveying velocity V by dividing the calculated distance by a value obtained by subtracting the time Ta from the time T 0 . That is, the CPU  151   a  sets the conveying velocity V based on the position of the front end of the recording medium at the timing when the sheet detector  700  outputs the signal ‘ 1 ’. 
     As described above, in the present exemplary embodiment, based on the distance X 2  and the distance Lc′ at the timing when the recording medium is detected by the sheet detector  700  due to the fact that the recording medium collides with the conveying rollers  307 , the distance from the position of the front end of the recording medium at this timing to the detection position is calculated. The conveying velocity V is set by dividing the calculated distance by a value obtained by subtracting the time Ta from the time T 0 . That is, in the present exemplary embodiment, the conveying velocity V is set based on the position of the front end of the recording medium at the timing when the sheet detector  700  outputs the signal ‘ 1 ’. As a result, it is possible to prevent a recording medium from reaching a transfer position after the timing when the transfer of an image onto the recording medium is started. Thus, it is possible to prevent the situation where the image is formed at an inappropriate position on the recording medium. 
     Further, in the present exemplary embodiment, the conveying velocity V is set based on the distance Lc′ corresponding to the paper type. As a result, it is possible to prevent a recording medium from reaching a transfer position after the timing when the transfer of an image onto the recording medium is started due to the fact that the position of the front end of the recording medium at the timing when the sheet detector  700  outputs the signal ‘ 1 ’ differs depending on the paper type. That is, it is possible to prevent the situation where the image is formed at an inappropriate position on the recording medium. 
     Alternatively, the conveying velocity V may be adjusted by the method according to the second exemplary embodiment based on the position of the front end of the recording medium at the timing when the recording medium is detected due to the fact that the recording medium collides with the conveying rollers  307 . That is, a configuration may be used in which, based on the position of the front end of the recording medium at the timing when the recording medium is detected due to the fact that the recording medium collides with the conveying rollers  307 , the timing when the front end of the recording medium reaches the nip position n is calculated. 
     In the first, second, and third exemplary embodiments, the conveying velocity V is adjusted based on the distance X 2  from the nip position n of the conveying rollers  307  to the detection position. The configuration, however, is not limited to this. For example, the conveying velocity V may be adjusted based on the distance from the nip position n of the conveying rollers  307  to a nip position of the registration rollers  308 . That is, the conveying velocity V may be adjusted based on the distance from the nip position n to a predetermined position downstream of the nip position n. The predetermined position is a position upstream of the transfer position. 
     In the first, second, and third exemplary embodiments, the number of pairs of rollers from the conveying rollers  307  to the detection position is two. The configuration, however, is not limited to this. For example, three or more pairs of conveying rollers may be provided between the conveying rollers  307  and the detection position. 
     In the first, second, and third exemplary embodiments, the pickup roller  303  or  305  is repeatedly rotated and stopped at predetermined time intervals. The configuration, however, is not limited to this. For example, a configuration may be employed in which a swinging arm as a swinging member linking the pickup roller  305  and one of the feeding rollers  332  is supported by the rotating shaft of the feeding roller  332  so that the swinging arm can pivot about the rotating shaft of the feeding roller  332 . Then, in the state where the rotational driving of the pickup roller  305  is continued, the pickup roller  305  is moved up and down at predetermined time intervals using the swinging arm, thereby feeding recording media at predetermined intervals. In such a configuration, the CPU  151   a  adjusts the conveying velocity V based on time Tb from when the CPU  151   a  outputs an instruction to move down the pickup roller  305  to when the sheet detector  700  outputs the signal ‘ 1 ’. 
     In the first, second, and third exemplary embodiments, a description has been given of the method for adjusting the conveying velocity V of the recording medium fed by the pickup roller  305 . The conveying velocity V of the recording medium fed by the pickup roller  303  or  328  is also adjusted by a similar method. 
     In the first, second, and third exemplary embodiments, the conveying velocity V is adjusted based on whether the front end of the recording medium reaches the nip position n of the conveying rollers  307 . The configuration, however, is not limited to this. The conveying velocity V may be adjusted based on rollers other than the conveying rollers  307 . For example, the conveying velocity V may be adjusted based on whether the front end of the recording medium reaches a nip position of the conveying rollers  322 . 
     In the first, second, and third exemplary embodiments, the time Tc or the distance Lc or Lc′ is set according to the grammage of the recording medium. The configuration, however, is not limited to this. For example, a configuration may be employed in which the time Tc or the distance Lc is set according to the rigidity or the thickness of the recording medium. 
     In the first, second, and third exemplary embodiments, the time Tc and the distance Lc are set based on information regarding the paper type input by the user. The configuration, however, is not limited to this. For example, a configuration may be employed in which the time Tc and the distance Lc are set based on the detection result of a sensor for detecting the type of the recording medium, such as a thickness sensor. 
     In the first, second, and third exemplary embodiments, the threshold for the deviation Δθ is a predetermined value, regardless of the paper type. Alternatively, the threshold may be set with respect to each paper type. 
     In the first, second, and third exemplary embodiments, if the absolute value of the deviation Δθ is greater than the threshold, the sheet detector  700  outputs the signal ‘ 1 ’. If the absolute value of the deviation Δθ is less than the threshold, the sheet detector  700  outputs the signal ‘ 0 ’. The configuration, however, is not limited to this. For example, a configuration may be employed in which, if the absolute value of the deviation Δθ changes from a value smaller than the threshold to a value greater than or equal to the threshold, the sheet detector  700  outputs the signal ‘ 1 ’ to the CPU  151   a.    
     A configuration may be employed in which the CPU  151   a  has the function of the sheet detector  700  according to the first, second, and third exemplary embodiments. 
     In the first, second, and third exemplary embodiments, the recording medium is detected by comparing the absolute value of the deviation Δθ with the threshold Δθth. The configuration, however, is not limited to this. For example, the recording medium may be detected by comparing the current value iq output from the coordinate transformer  511  with a threshold iqth. An increase in the current value iq means that the load torque applied to the rotor  402  of the motor  509  increases. A decrease in the current value iq means that the load torque applied to the rotor  402  of the motor  509  decreases. 
     Alternatively, the recording medium may be detected by comparing, with a threshold iq_refth, the q-axis current instruction value (target value) iq_ref determined based on the deviation Δθ between the instruction phase θ_ref and the rotational phase θ determined by the phase determiner  513 . An increase in the q-axis current instruction value iq_ref means that a torque required for the rotation of the rotor  402  of the motor  509  increases due to an increase in the load torque applied to the rotor  402 . A decrease in the q-axis current instruction value iq_ref means that the torque required for the rotation of the rotor  402  of the motor  509  decreases due to a decrease in the load torque applied to the rotor  402 . 
     Alternatively, a configuration may be employed in which the recording medium is detected by comparing the amplitude (magnitude) of the current value iα or iβ in the stationary coordinate system with a threshold. An increase in the amplitude (magnitude) of the current value iα or iβ in the stationary coordinate system means that the load torque applied to the rotor  402  of the motor  509  increases. A decrease in the amplitude means that the load torque applied to the rotor  402  of the motor  509  decreases. 
     The first, second, and third exemplary embodiments are applied not only to motor control by vector control. For example, the first and second exemplary embodiments can be applied to any motor control device having a configuration for feeding back a rotational phase or a rotational velocity. 
     In the first, second, and third exemplary embodiments, a stepper motor is used. as the motor for driving a load. Alternatively, another motor such as a direct current (DC) motor or a brushless DC motor may be used. The motor is not limited to a two-phase motor, and another motor such as a three-phase motor may be used. 
     In the vector control according to the first, second, and third exemplary embodiments, the motor  509  is controlled by performing phase feedback control. The configuration, however, is not limited to this. For example, a configuration may be employed in which the motor  509  is controlled by feeding back a rotational velocity ω of the rotor  402 . Specifically, as illustrated in  FIG. 14 , a velocity determiner  514  is provided in the motor control device  157 , and the velocity determiner  514  determines the rotational velocity ω based on a change over time in the rotational phase θ output from the phase determiner  513 . The rotational velocity ω is determined using the following formula (16). 
       ω= dθ/dt   (16)
 
     Then, the CPU  151   a  outputs an instruction velocity ω_ref that indicates a target velocity of the rotor  402 . Further, a configuration is employed in which a velocity controller  600  is provided in the motor control device  157 . The velocity controller  600  generates the q-axis current instruction value iq_ref and the d-axis current instruction value id_ref so that the deviation between the rotational velocity ω and the instruction velocity ω_ref becomes small. Then, the velocity controller  600  outputs the q-axis current instruction value iq_ref and the d-axis current instruction value id_ref. A configuration may be employed in which the motor  509  is controlled by performing such velocity feedback control. In such a configuration, a sheet is detected by the methods described in the first to third exemplary embodiments, for example, based on a deviation Δω between the rotational velocity ω and the instruction velocity ω_ref. The instruction velocity ω_ref is a target velocity of the rotor  402  of the motor  509  corresponding to a target velocity of the peripheral velocity of the conveying rollers  307 . 
     The deviations Δθ and Δω, the current value iq, the current value iq_ref, and the amplitude of the current value iα or iβ in the stationary coordinate system correspond to the values of parameters corresponding to the load torque applied to the rotor  402  of the motor  509 . 
     In the first and second exemplary embodiments, a permanent magnet is used as the rotor. The configuration, however, is not limited to this. 
     The configuration for detecting a sheet such as a recording medium is also applied to, for example, a motor for rotationally driving a conveying belt. That is, the configuration for detecting a sheet is applied to a motor for rotationally driving a rotating member, such as a roller or a conveying belt. 
     The photosensitive drum  309 , the charging device  310 , the developing device  314 , and the transfer charging device  315  are included in an image forming unit. 
     In the first, second, and third exemplary embodiments, the registration rollers  308  are used as an abutment member that the front end of the recording medium abuts so that the skew of the recording medium is corrected. The configuration, however, is not limited to this. For example, a configuration may be employed in which a shutter as an abutment member is provided upstream of the registration rollers  308  and downstream of the pre-registration rollers  333 , or upstream of the transfer position and downstream of the registration rollers  308  in the conveying direction of the recording medium. The front end of the recording medium is caused to abut the shutter, thereby correcting the skew of the recording medium by the above method. Then, when the registration rollers  308  convey the recording medium to the transfer position in timing with a toner image, the shutter is retracted. 
     According to the exemplary embodiments of the present disclosure, it is possible to prevent the situation where an image is formed at an inappropriate position on a sheet. 
     Embodiment(s) of the present disclosure can also be realized by a computer of a system or apparatus that reads out and executes computer executable instructions (e.g., one or more programs) recorded on a storage medium (which may also be referred to more fully as a ‘non-transitory computer-readable storage medium’) to perform the functions of one or more of the above-described embodiment(s) and/or that includes one or more circuits (e.g., application specific integrated circuit (ASIC)) for performing the functions of one or more of the above-described embodiment(s), and by a method performed by the computer of the system or apparatus by, for example, reading out and executing the computer executable instructions from the storage medium to perform the functions of one or more of the above-described embodiment(s) and/or controlling the one or more circuits to perform the functions of one or more of the above-described embodiment(s). The computer may include one or more processors (e.g., central processing unit (CPU), micro processing unit (MPU)) and may include a network of separate computers or separate processors to read out and execute the computer executable instructions. The computer executable instructions may be provided to the computer, for example, from a network or the storage medium. The storage medium a include, for example, one or more of a hard disk, a random access memory (RAM), a read-only memory (ROM), a storage of distributed computing systems, an optical disk (such as a compact disc (CD), digital versatile disc (DVD), or Blu-ray Disc (BD™), a flash memory device, a memory card, and the like. 
     While the present disclosure has been described with reference to exemplary embodiments, it is to be understood that the disclosure is not limited to the disclosed exemplary embodiments. The scope of the following claims is to be accorded the broadest interpretation so as to encompass all such modifications and equivalent structures and functions. 
     This application claims the benefit of Japanese Patent Application No. 2019-046342, filed Mar. 13, 2019, which is hereby incorporated by reference herein in its entirety.