Signal generating device and elevator

The signal generation device addresses the high cost and resolution limitations of optical and magnetic encoders by using software-adjustable signal generation with Hall sensors and microcomputers, offering a cost-effective and distortion-reduced solution.

JP7858687B2Active Publication Date: 2026-05-14NIDEC CORP(JP)
View PDF 9 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
NIDEC CORP(JP)
Filing Date
2022-11-29
Publication Date
2026-05-14

AI Technical Summary

Technical Problem

Optical encoders are expensive and require microfabrication, while magnetic encoders suffer from signal distortion due to uneven magnetization, making it difficult to change resolution without hardware modifications.

Method used

A signal generation device using a processing unit to calculate angular information and generate signals with adjustable resolution by software, utilizing general-purpose microcomputers and Hall sensors to produce sinusoidal signals with reduced distortion.

Benefits of technology

Provides a cost-effective solution with adjustable resolution, generating high-quality sinusoidal signals without the need for hardware modifications, using inexpensive components and reducing signal distortion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007858687000002
    Figure 0007858687000002
  • Figure 0007858687000003
    Figure 0007858687000003
  • Figure 0007858687000004
    Figure 0007858687000004
Patent Text Reader

Abstract

One embodiment of the signal generation device of the present invention comprises a processing device that calculates angle information indicating a mechanical angle of a rotation axis, and on the basis of the calculation result of the angle information, generates a first signal in which a waveform of one cycle of an electrical angle appears N times (N is an integer not less than 1) in one cycle of the mechanical angle, and a second signal having a phase difference of 90 degrees in the electrical angle relative to the first signal.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] This invention relates to a signal generating device and an elevator. This application claims priority based on Japanese Patent Application No. 2021-194064, filed in Japan on November 30, 2021, and the contents of that application are incorporated herein by reference. [Background technology]

[0002] Generally, optical encoders are known that output A-phase signals and B-phase signals, which have a phase difference of 90 degrees in electrical angle between them, as analog signals that are approximately sinusoidal. Also, as disclosed in Patent Documents 1 and 2, magnetic encoders using magnetoresistive elements and magnetic recording media are also known.

[0003] Patent Document 1 discloses a technique for suppressing amplitude fluctuations of A-phase and B-phase signals output from a magnetic encoder by feedback-controlling the applied voltage to a magnetoresistive element based on the deviation between the maximum output voltage of these sinusoidal signals and a reference voltage. Patent Document 2 discloses a technique for improving the resolution of a magnetic encoder by setting the distance between the magnetoresistive element and the magnetic recording medium to a predetermined value, thereby causing the magnetoresistive element to output a sinusoidal signal with less distortion, converting this sinusoidal signal into a pulse waveform, and then multiplying the pulse waveform using a frequency multiplier circuit. [Prior art documents] [Patent Documents]

[0004] [Patent Document 1] Japanese Patent Publication No. 63-070116 [Patent Document 2] Japanese Patent Publication No. 09-218053 [Overview of the project] [Problems that the invention aims to solve]

[0005] Optical encoders are often expensive because they consist of specialized optical components that require microfabrication technology. Furthermore, while the resolution is determined by the number of times the waveform of one electrical angle period appears in the A-phase and B-phase signals within one mechanical angle period (number of periods), in optical encoders, the number of periods of the A-phase and B-phase signals depends on the number of scale tracks on the scale disk, making it difficult to change the resolution without modifying the hardware.

[0006] In magnetic encoders that use magnetoresistive elements and magnetic recording media, distortion of the sinusoidal signal due to uneven magnetization of the magnetic recording media can reduce the accuracy of angle detection. Furthermore, in this type of mechanical encoder, the number of cycles of the A-phase and B-phase signals depends on the magnetic recording media, making it difficult to change the resolution without modifying the hardware. [Means for solving the problem]

[0007] One aspect of the signal generation device of the present invention includes a processing device that calculates angular information indicating the mechanical angle of a rotating shaft, and generates a first signal in which a waveform of one electrical angle period appears N times (N is an integer of 1 or more) in one mechanical angle period, and a second signal having a phase difference of 90 degrees in electrical angle with respect to the first signal, based on the calculation result of the angular information.

[0008] One embodiment of the elevator of the present invention comprises a car suspended by a rope, a hoisting machine that raises the car by winding up the rope, and a signal generating device of the above embodiment that calculates angular information indicating the mechanical angle of the rotation axis of the hoisting machine and generates at least the first signal and the second signal based on the calculation result of the angular information. [Effects of the Invention]

[0009] According to the above aspect of the present invention, since the processing device can be configured with an inexpensive general-purpose microcomputer, a signal generation device that can generate at least the first signal and the second signal with a simple and low-cost configuration can be provided as compared with a conventional optical encoder. Further, in a conventional optical encoder, since the number of cycles of the first signal and the second signal depends on the number of scale tracks provided on the scale disk, it has been difficult to change the resolution without hardware modification. However, in the present invention, since the number of cycles N of the first signal and the second signal can be set by software, it is possible to change the resolution without hardware modification. Furthermore, since the first signal and the second signal can be generated using a D / A converter generally mounted on a general-purpose microcomputer that can be used as a processing device, the first signal and the second signal with less distortion can be generated.

Brief Description of Drawings

[0010] [Figure 1] FIG. 1 is a block diagram schematically showing the configuration of a signal generation device according to an embodiment of the present invention. [Figure 2] FIG. 2 is a timing chart showing the temporal correspondence relationship between the generation timing of an interrupt signal, the change timing of the number of interrupts, the execution timing of interrupt processing, the operation timing of an A / D converter, and the execution timing of angle calculation processing. [Figure 3] FIG. 3 is a flowchart showing interrupt processing executed by a first arithmetic unit of a first processing device (main MPU). [Figure 4] FIG. 4 is an explanatory diagram regarding delay compensation of an absolute angle. [Figure 5] FIG. 5 is a diagram showing an example of an absolute angle function. [Figure 6] FIG. 6 is a flowchart showing signal generation processing executed by a second arithmetic unit of a second processing device (sub MPU). [Figure 7] FIG. 7 is a diagram showing an example of the waveform of a fifth signal (R-phase signal). [Figure 8] FIG. 8 is a diagram showing an example of a differential signal output from an output circuit of a signal generation device. [Figure 9] FIG. 9 is a diagram showing an example of waveforms of the A-phase signal, B-phase signal, and R-phase signal in the first embodiment. [Figure 10] FIG. 10 is an enlarged view of the region indicated by reference numeral 200 in FIG. 9. [Figure 11] FIG. 11 is a block diagram schematically showing the configuration of a signal generation device in the second embodiment of the present invention. [Figure 12] FIG. 12 is a diagram showing an example of waveforms of the A-phase signal, B-phase signal, and output signal of the arithmetic circuit in the second embodiment. [Figure 13] FIG. 13 is a diagram showing an example of waveforms of the A-phase signal, B-phase signal, and R-phase signal in the second embodiment. [Figure 14] FIG. 14 is a diagram showing the appearance of an elevator which is an application example of the present invention.

Embodiments for Carrying Out the Invention

[0011] Hereinafter, an embodiment of the present invention will be described in detail with reference to the drawings. FIG. 1 is a block diagram schematically showing the configuration of a signal generation device 1 in an embodiment of the present invention. As shown in FIG. 1, the signal generation device 1 in the present embodiment includes a sensor unit 10, a processing device 20, a filter circuit 50, and an output circuit 60.

[0012] The sensor unit 10 has, for example, three magnetic sensors 11, 12, and 13. Each of the magnetic sensors 11, 12, and 13 is a Hall sensor that detects the magnetic flux strength which changes according to the rotation angle of the rotating shaft and outputs an analog signal indicating the detection result of the magnetic flux strength as a magnetic flux detection signal. In this embodiment, the rotating shaft is, for example, the rotor shaft of a three-phase brushless DC motor. The three-phase brushless DC motor is equipped with a control board that supplies drive current to the three-phase coils. The magnetic sensors 11, 12, and 13 are arranged on the control board facing the rotor magnet in the axial direction of the rotor shaft. Also, when viewed from the axial direction of the rotor shaft, the magnetic sensors 11, 12, and 13 are arranged at regular intervals along the rotation direction of the rotor shaft. The regular interval is, for example, 120 degrees.

[0013] Magnetic sensor 11 outputs a magnetic flux detection signal Hu to the processing unit 20, indicating the detection result of the magnetic flux strength in the U phase. Magnetic sensor 12 outputs a magnetic flux detection signal Hv to the processing unit 20, indicating the detection result of the magnetic flux strength in the V phase. Magnetic sensor 13 outputs a magnetic flux detection signal Hw to the processing unit 20, indicating the detection result of the magnetic flux strength in the W phase. The three magnetic flux detection signals Hu, Hv, and Hw have a phase difference of 120 degrees in electrical angle from each other.

[0014] The processing unit 20 calculates angular information indicating the mechanical angle of the rotation axis, and based on the calculation result of the angular information, generates a first signal VA in which the waveform of one electrical angle period appears N times (N is an integer of 1 or more) in one mechanical angle period, and a second signal VB having a phase difference of 90 degrees in electrical angle with respect to the first signal VA. In the following description, the first signal VA may be referred to as the "A-phase signal," and the second signal VB may be referred to as the "B-phase signal." In this embodiment, the A-phase signal VA is a sine wave signal, and the B-phase signal VB is a cosine wave signal.

[0015] The processing unit 20 further generates a third signal VC, in which a waveform of one electrical angle period appears once in one mechanical angle period, and a fourth signal VD, which has a phase difference of 90 degrees in electrical angle with respect to the third signal VC, based on the calculation result of the angle information. In the following description, the third signal VC may be referred to as the "C-phase signal" and the fourth signal VD may be referred to as the "D-phase signal". In this embodiment, the C-phase signal VC is a sine wave signal and the D-phase signal VD is a cosine wave signal.

[0016] The processing unit 20 further generates a fifth signal VR indicating the reference position for one cycle of the mechanical angle based on the calculation result of the angle information. In the following description, the fifth signal VR may be referred to as the "R-phase signal". The R-phase signal VR is a waveform that is symmetrical with respect to the mechanical angle of 0 degrees within a range of ±α degrees, and whose peak appears at the mechanical angle of 0 degrees. As such a waveform for the R-phase signal VR, a waveform represented by a sigmoid function, a square wave, a triangular wave, or a sine wave can be used. The processing unit 20 outputs the A-phase signal VA, B-phase signal VB, C-phase signal VC, D-phase signal VD, and R-phase signal VR to the filter circuit 50.

[0017] The processing unit 20 includes a first processing unit 30 that calculates angle information and generates A-phase signal VA and B-phase signal VB based on the calculation results of the angle information, and a second processing unit 40 that generates C-phase signal VC, D-phase signal VD, and R-phase signal VR based on the calculation results of the angle information obtained from the first processing unit 30. The first processing unit 30 and the second processing unit 40 communicate the calculation results of the angle information. The first processing unit 30 and the second processing unit 40 are, for example, processor ICs such as MPUs (Micro Processing Units). In the following description, the first processing unit 30 may be referred to as the "main MPU" and the second processing unit 40 may be referred to as the "sub-MPU".

[0018] The main MPU 30 calculates angular information indicating the mechanical angle of the rotation axis based on the magnetic flux detection signals Hu, Hv, and Hw output from the sensor unit 10, and generates A-phase signal VA and B-phase signal VB based on the calculation result of the angular information. The main MPU 30 transmits the calculation result of the angular information to the sub-MPU 40. The main MPU 30 includes an A / D converter 31, a timer 32, a first calculation unit 33, a first storage unit 34, a first D / A converter 35, and a first communication I / F 36.

[0019] The magnetic flux detection signals Hu, Hv, and Hw output from the sensor unit 10 are input to the A / D converter 31 of the main MPU 30. The A / D converter 31 converts each of the magnetic flux detection signals Hu, Hv, and Hw into digital data by sampling them at a predetermined sampling frequency, and outputs the digital data of the magnetic flux detection signals Hu, Hv, and Hw to the first calculation unit 33.

[0020] Timer 32 outputs an interrupt signal INT to the first arithmetic unit 33 at a predetermined period. Specifically, Timer 32 increments the timer count value in synchronization with a clock signal (not shown), and when the timer count value reaches the timer reset value TRES, it outputs the interrupt signal INT and resets the timer count value. Thus, the period at which Timer 32 outputs the interrupt signal INT is determined by the timer reset value TRES. The timer reset value TRES is set in Timer 32 by the first arithmetic unit 33.

[0021] The first arithmetic unit 33 is a processor core that executes various processes according to a program pre-stored in the first memory unit 34. As will be described in detail later, when the first arithmetic unit 33 receives an interrupt signal INT from the timer 32, it executes an interrupt process that calculates an angle estimate value θest based on the digital data of magnetic flux detection signals Hu, Hv, and Hw input from the A / D converter 31. When the interrupt process is executed, the first arithmetic unit 33 generates A-phase digital signal DVA and B-phase digital signal DVB based on the calculation result of the angle estimate value θest and outputs them to the first D / A converter 35. Also, when the interrupt process is executed, the first arithmetic unit 33 transmits digital data indicating the calculation result of the angle estimate value θest to the sub-MPU 40 via the first communication I / F 36.

[0022] The first storage unit 34 includes a non-volatile memory that pre-stores programs and setting data necessary for the first arithmetic unit 33 to execute various processes, and a volatile memory that is used as a temporary storage location for data when the first arithmetic unit 33 executes various processes. The non-volatile memory is, for example, EEPROM (Electrically Erasable Programmable Read-Only Memory) and flash memory. The volatile memory is, for example, RAM (Random Access Memory).

[0023] The first D / A converter 35 is, for example, a two-channel D / A converter. The first D / A converter 35 generates an A-phase signal VA by converting the A-phase digital signal DVA output from the first arithmetic unit 33 into an analog signal. The first D / A converter 35 generates a B-phase signal VB by converting the B-phase digital signal DVB output from the first arithmetic unit 33 into an analog signal. The first D / A converter 35 outputs the A-phase signal VA and the B-phase signal VB to the filter circuit 50.

[0024] The first communication interface 36 is a serial communication interface that communicates with the second communication interface 41 of the sub-MPU 40, for example, according to the SPI (Serial Peripheral Interface) communication standard. The first communication interface 36 transmits the digital data output from the first arithmetic unit 33 to the second communication interface 41 of the sub-MPU 40. The first communication interface 36 receives the digital data transmitted from the second communication interface 41 of the sub-MPU 40 and outputs the received digital data to the first arithmetic unit 33. The digital data transmitted from the first arithmetic unit 33 to the sub-MPU 40 via the first communication interface 36 includes digital data indicating the calculation result of the angle estimation value θest.

[0025] The sub-MPU 40 generates a C-phase signal VC, a D-phase signal VD, and an R-phase signal VR based on the calculation result of the angle information transmitted from the main MPU 30, i.e., the calculation result of the angle estimate θest. The sub-MPU 40 includes a second communication I / F 41, a second calculation unit 42, a second storage unit 43, and a second D / A converter 44.

[0026] The second communication interface 41 is a serial communication interface that communicates with the first communication interface 36 of the main MPU 30, for example, according to the SPI communication standard. The second communication interface 41 transmits the digital data output from the second arithmetic unit 42 to the first communication interface 36 of the main MPU 30. The second communication interface 41 receives the digital data transmitted from the first communication interface 36 of the main MPU 30 and outputs the received digital data to the second arithmetic unit 42.

[0027] The second arithmetic unit 42 is a processor core that executes various processes according to a program pre-stored in the second memory unit 43. When the second arithmetic unit 42 receives the calculation result of the angle estimate value θest from the main MPU 30 via the second communication I / F 41, it generates a C-phase digital signal DVC, a D-phase digital signal DVD, and an R-phase digital signal DVR based on the calculation result of the received angle estimate value θest and outputs them to the second D / A converter 44.

[0028] The second storage unit 43 includes a non-volatile memory that pre-stores programs and setting data necessary for the second arithmetic unit 42 to execute various processes, and a volatile memory that is used as a temporary storage location for data when the second arithmetic unit 42 executes various processes. The non-volatile memory is, for example, an EEPROM and flash memory. The volatile memory is, for example, RAM.

[0029] The second D / A converter 44 is, for example, a 3-channel D / A converter. The second D / A converter 44 generates a C-phase signal VC by converting the C-phase digital signal DVC output from the second arithmetic unit 42 into an analog signal. The second D / A converter 44 generates a D-phase signal VD by converting the D-phase digital signal DVD output from the second arithmetic unit 42 into an analog signal. The second D / A converter 44 generates an R-phase signal VR by converting the R-phase digital signal DVR output from the second arithmetic unit 42 into an analog signal. The second D / A converter 44 outputs the C-phase signal VC, the D-phase signal VD, and the R-phase signal VR to the filter circuit 50.

[0030] The filter circuit 50 includes a first low-pass filter 51, a second low-pass filter 52, a third low-pass filter 53, a fourth low-pass filter 54, and a fifth low-pass filter 55. The first low-pass filter 51, the second low-pass filter 52, the third low-pass filter 53, the fourth low-pass filter 54, and the fifth low-pass filter 55 are, for example, second-order RC low-pass filters.

[0031] The first low-pass filter 51 is provided in the transmission path of the A-phase signal VA output from the main MPU 30 of the processing unit 20. The first low-pass filter 51 allows frequency components of the A-phase signal VA output from the main MPU 30 that are below a predetermined cutoff frequency to pass to the output circuit 60. The signal output from the first low-pass filter 51 has a smoother sine wave waveform than the A-phase signal VA input to the first low-pass filter 51. Thus, the signal output from the first low-pass filter 51 is different from the A-phase signal VA input to the first low-pass filter 51, but for the sake of explanation in this embodiment, the signal output from the first low-pass filter 51 is also referred to as the "A-phase signal VA".

[0032] The second low-pass filter 52 is provided in the transmission path of the B-phase signal VB output from the main MPU 30 of the processing unit 20. The second low-pass filter 52 allows frequency components of the B-phase signal VB output from the main MPU 30 that are below a predetermined cutoff frequency to pass to the output circuit 60. The signal output from the second low-pass filter 52 has a smoother cosine waveform than the B-phase signal VB input to the second low-pass filter 52. Thus, the signal output from the second low-pass filter 52 is different from the B-phase signal VB input to the second low-pass filter 52, but for the sake of explanation in this embodiment, the signal output from the second low-pass filter 52 is also referred to as the "B-phase signal VB".

[0033] The third low-pass filter 53 is provided in the transmission path of the C-phase signal VC output from the sub-MPU 40 of the processing unit 20. The third low-pass filter 53 allows frequency components of the C-phase signal VC output from the sub-MPU 40 that are below a predetermined cutoff frequency to pass to the output circuit 60. The signal output from the third low-pass filter 53 has a smoother sine wave waveform than the C-phase signal VC input to the third low-pass filter 53. Thus, the signal output from the third low-pass filter 53 is different from the C-phase signal VC input to the third low-pass filter 53, but for the sake of explanation in this embodiment, the signal output from the third low-pass filter 53 is also referred to as the "C-phase signal VC".

[0034] The fourth low-pass filter 54 is provided in the transmission path of the D-phase signal VD output from the sub-MPU 40 of the processing unit 20. The fourth low-pass filter 54 allows frequency components of the D-phase signal VD output from the sub-MPU 40 that are below a predetermined cutoff frequency to pass to the output circuit 60. The signal output from the fourth low-pass filter 54 has a smoother cosine waveform than the D-phase signal VD input to the fourth low-pass filter 54. Thus, the signal output from the fourth low-pass filter 54 is different from the D-phase signal VD input to the fourth low-pass filter 54, but for the sake of explanation in this embodiment, the signal output from the fourth low-pass filter 54 is also referred to as the "D-phase signal VD".

[0035] The fifth low-pass filter 55 is provided in the transmission path of the R-phase signal VR output from the sub-MPU 40 of the processing unit 20. The fifth low-pass filter 55 allows frequency components of the R-phase signal VR output from the sub-MPU 40 that are below a predetermined cutoff frequency to pass to the output circuit 60. The signal output from the fifth low-pass filter 55 has a smoother waveform than the R-phase signal VR input to the fifth low-pass filter 55. Thus, the signal output from the fifth low-pass filter 55 is different from the R-phase signal VR input to the fifth low-pass filter 55, but for the sake of explanation in this embodiment, the signal output from the fifth low-pass filter 55 is also referred to as the "R-phase signal VR".

[0036] The output circuit 60 is a circuit that generates and outputs the differential signals of the A-phase signal VA, B-phase signal VB, C-phase signal VC, D-phase signal VD, and R-phase signal VR output from the filter circuit 50. The output circuit 60 comprises a first differential output circuit 61, a second differential output circuit 62, a third differential output circuit 63, a fourth differential output circuit 64, and a fifth differential output circuit 65.

[0037] The first differential output circuit 61 generates a differential signal of the A-phase signal VA output from the first low-pass filter 51. The differential signal output from the first differential output circuit 61 includes a positive A-phase signal A+, which is in the same phase as the A-phase signal VA input from the first low-pass filter 51 to the first differential output circuit 61, and a negative A- phase signal A-, which is in the opposite phase to the positive A-phase signal A+.

[0038] The second differential output circuit 62 generates a differential signal of the B-phase signal VB output from the second low-pass filter 52. The differential signal output from the second differential output circuit 62 includes a positive B-phase signal B+, which is in the same phase as the B-phase signal VB input from the second low-pass filter 52 to the second differential output circuit 62, and a negative B-phase signal B-, which is in the opposite phase to the positive B-phase signal B+.

[0039] The third differential output circuit 63 generates a differential signal of the C-phase signal VC output from the third low-pass filter 53. The differential signal output from the third differential output circuit 63 includes a positive C-phase signal C+, which is in the same phase as the C-phase signal VC input from the third low-pass filter 53 to the third differential output circuit 63, and a negative C-phase signal C-, which is in the opposite phase to the positive C-phase signal C+.

[0040] The fourth differential output circuit 64 generates a differential signal of the D-phase signal VD output from the fourth low-pass filter 54. The differential signal output from the fourth differential output circuit 64 includes a positive D-phase signal D+, which is in the same phase as the D-phase signal VD input from the fourth low-pass filter 54 to the fourth differential output circuit 64, and a negative D-phase signal D-, which is in the opposite phase to the positive D-phase signal D+.

[0041] The fifth differential output circuit 65 generates a differential signal of the R-phase signal VR output from the fifth low-pass filter 55. The differential signal output from the fifth differential output circuit 65 includes a positive R-phase signal R+, which is in the same phase as the R-phase signal VR input from the fifth low-pass filter 55 to the fifth differential output circuit 65, and a negative R- phase signal R-, which is in the opposite phase to the positive R-phase signal R+.

[0042] In the following section, the operation of the signal generation device 1, configured as described above, will be explained in detail with reference to Figures 2 to 8.

[0043] When the signal generator 1 switches from a power-off state to a power-on state, the first arithmetic unit 33 of the main MPU 30 and the second arithmetic unit 42 of the sub-MPU 40 each perform predetermined initialization processes. For example, as one of the initialization processes, the first arithmetic unit 33 reads the timer reset value TRES of the timer 32 from the first storage unit 34 and sets the read timer reset value TRES to the timer 32. Also, as one of the initialization processes, the first arithmetic unit 33 resets the interrupt count value, described later, to "0".

[0044] Figure 2 is a timing chart showing the temporal correspondence between the timing of the generation of the interrupt signal INT, the timing of the change in the interrupt count, the timing of the execution of the interrupt process, the operation timing of the A / D converter 31, and the execution timing of the angle calculation process. When the timer reset value TRES is set in the timer 32, the timer 32 increments the timer count value in synchronization with a clock signal (not shown), and when the timer count value reaches the timer reset value TRES, it outputs the interrupt signal INT and resets the timer count value. As a result, as shown in Figure 2, the timer 32 outputs a predetermined period T INT Then the interrupt signal INT is output.

[0045] As shown in Figure 2, the first arithmetic unit 33 performs interrupt processing each time an interrupt signal INT occurs. If the interrupt count, which is the number of times the interrupt signal INT has occurred, is equal to the initial value "0" at the start of the interrupt processing, it performs a predetermined long-period processing followed by a predetermined short-period processing. However, if the interrupt count is not equal to the initial value "0", it performs the short-period processing without performing the long-period processing.

[0046] As shown in Figure 2, the interrupt count is reset to its initial value "0" when it exceeds the maximum value "Cm". Thus, the interrupt count is reset periodically T. period This is called the "control period". Control period T period This is expressed by equation (1) below. The long-period processing included in the interrupt processing is the control period T period This is a process that is repeatedly executed at a period equal to T. The short-period process included in interrupt handling is the generation period T of the interrupt signal INT. INT This is a process that is executed repeatedly at intervals equal to [a certain number]. T period = (Cm+1) × T INT …(1)

[0047] When the rotating shaft rotates, magnetic flux detection signals Hu, Hv, and Hw having a phase difference of 120 degrees in electrical angle are output from the sensor unit 10. As shown in FIG. 2, when the interrupt count count is the initial value "0", digital conversion of the magnetic flux detection signals Hu, Hv, and Hw is started by the A / D converter 31, and when the interrupt count count is, for example, "2", the digital conversion ends. That is, digital data of the magnetic flux detection signals Hu, Hv, and Hw in one control cycle is obtained during the period when the interrupt count count changes from the initial value "0" to "2". As shown in FIG. 2, when the first arithmetic unit 33 acquires the digital data of the magnetic flux detection signals Hu, Hv, and Hw, it executes angle arithmetic processing during a period when interrupt processing is not executed.

[0048] In the angle arithmetic processing, the first arithmetic unit 33 calculates the absolute angle θ (mechanical angle) of the rotating shaft based on the digital data of the magnetic flux detection signals Hu, Hv, and Hw. As the arithmetic algorithm for the absolute angle θ, for example, the algorithm described in Japanese Patent No. 6233532 can be used. Therefore, the description of the arithmetic algorithm for the absolute angle θ is omitted in this specification. However, the arithmetic algorithm for the absolute angle θ is not limited to the algorithm described in Japanese Patent No. 6233532. Any algorithm capable of calculating the absolute angle of the rotating shaft may be used.

[0049] As shown in FIG. 2, when the interrupt count count reaches the maximum value "Cm", the angle arithmetic processing executed within one control cycle ends. When the angle arithmetic processing ends, the first arithmetic unit 33 substitutes the calculation result of the absolute angle θ into the global variable gwTheta. The period in which the value of the global variable gwTheta indicating the absolute angle θ is rewritten to a new value is equal to the control cycle T period That is, the control cycle T period is the period in which the absolute angle θ of the rotating shaft is updated.

[0050] Figure 3 is a flowchart of the interrupt processing performed by the first arithmetic unit 33. As described above, when the interrupt signal INT is input to the first arithmetic unit 33 from the timer 32, it performs the interrupt processing shown in Figure 3. As shown in Figure 3, when the first arithmetic unit 33 starts interrupt processing, it first determines whether the interrupt count is equal to the initial value "0" (step S1). If the answer to step S1 is "Yes", that is, if the interrupt count is equal to the initial value "0", the first arithmetic unit 33 proceeds to the processing in step S2. On the other hand, if the answer to step S1 is "No", that is, if the interrupt count is not equal to the initial value "0", the first arithmetic unit 33 proceeds to the processing in step S5.

[0051] In the interrupt handling shown in Figure 3, the processing from step S2 to step S4 is a long-period process. Also, in the interrupt handling shown in Figure 3, the processing from step S5 to step S11 is a short-period process. That is, when the interrupt count is equal to the initial value "0", the first arithmetic unit 33 executes the long-period process including the processing from step S2 to step S4, and then executes the short-period process including the processing from step S5 to step S11. On the other hand, when the interrupt count is not equal to the initial value "0", the first arithmetic unit 33 executes the short-period process without performing the long-period process.

[0052] The first calculation unit 33 performs an angle acquisition process to obtain the current value of the absolute angle θ of the rotation axis as one of the processes of the long-period processing (step S2). Specifically, in step S2, the first calculation unit 33 obtains the value of the global variable gwTheta as the current value of the absolute angle θ, Theta. As shown in Figure 2, the current value of the absolute angle θ, Theta, is the value of the absolute angle θ calculated in the control period one control period prior to the current control period.

[0053] Next, the first calculation unit 33 performs a function calculation process as one of the long-period processes to calculate an absolute angle function that expresses the absolute angle θ as a linear function of time, based on the current value of the absolute angle θ Theta and the previous value of the absolute angle θ Theta_prev (steps S3 and S4). The previous value of the absolute angle θ Theta_prev is the value of the absolute angle θ calculated in the control period two control periods prior to the current control period.

[0054] Specifically, the first arithmetic unit 33 performs an intercept calculation process to calculate the intercept of the absolute angle function by applying delay compensation to the current value Theta of the absolute angle θ as one of the function calculation processes (step S3). The current value Theta of the absolute angle θ includes the following time delay components. As described above, the current value Theta of the absolute angle θ is the value of the absolute angle θ calculated in the control cycle one cycle prior to the current control cycle. Therefore, the current value Theta of the absolute angle θ has a time delay equivalent to one control cycle. In addition, the current value Theta of the absolute angle θ has a time delay due to the response delay of the magnetic sensors 11, 12 and 13. Furthermore, if a low-pass filter is provided for the magnetic flux detection signals Hu, Hv and Hw, the current value Theta of the absolute angle θ has a time delay due to the frequency characteristics of the low-pass filter.

[0055] In step S3, the first calculation unit 33 applies delay compensation to the current value Theta of the absolute angle θ which has the time delay component described above. In Figure 4, θ is the absolute angle θ calculated by the angle calculation process, and θ true θ is the true value of the absolute angle θ, new θ is the delayed-compensated absolute angle θ. As shown in Figure 4, the absolute angle θ has a time delay T. delay If such a thing exists, the true value θ new For angular error θ delay This occurs at an absolute angle θ. In this case, the delayed-compensated absolute angle θ new This is expressed by equation (2) below. In equation (2) below, θ(k) is equal to the current value of the absolute angle θ, Theta, and θ(k-1) is equal to the previous value of the absolute angle θ, Theta_prev. In equation (2) below, the second term on the right-hand side is the angular error θ delayIt is equal to.

[0056]

number

[0057] In step S3, the first calculation unit 33 calculates the absolute angle θ, which has been delayed-compensated based on equation (2) above. new This is calculated as the intercept of the absolute angle function. The first calculation unit 33 calculates the delayed-compensated absolute angle θ new The calculation result is obtained as the intercept Theta_new_low. Note that the time delay T included in equation (2) above delay Alternatively, calculated values ​​obtained by performing simulations that take into account the time delay factors mentioned above may be used, or measured values ​​obtained by conducting experiments may be used.

[0058] Next, the first calculation unit 33 performs a slope calculation process as one of the function calculation processes, which calculates the slope of the absolute angle function by subtracting the previous value Theta_prev from the current value Theta of the absolute angle θ (step S4). Specifically, in step S4, the first calculation unit 33 calculates the slope Theta_extr of the absolute angle function based on the following equation (3). Theta_extr = Theta - Theta_prev …(3)

[0059] The first calculation unit 33 performs a function calculation process including the above steps S3 and S4, thereby ultimately obtaining the absolute angle function θ(count) represented by the following equation (4). θ(count) = Theta_new_low + Theta_extr / (Cm+1) × count …(4)

[0060] The processes from step S2 to step S4 described above are performed during the control period T period This is a long-period process that is repeatedly executed with a period equal to [the specified period]. Next, we will explain the short-period process.

[0061] The first arithmetic unit 33 performs an angle estimation calculation process as one of the short-period processes, which calculates an estimated value of the absolute angle θ as the angle estimation value θest based on the absolute angle function calculated by the function calculation process (step S5). Specifically, in step S5, the first arithmetic unit 33 obtains the value of θ(count) calculated by substituting the value of the current interrupt count into equation (4) above as the angle estimation value θest.

[0062] In Figure 5, the line L shows an example of the absolute angle function θ(count) calculated when the interrupt count is "0" in an arbitrary control cycle. The slope of the line L is the slope Theta_extr of the absolute angle function θ(count). The value at point P0 on the line L is the angle estimate θest calculated when the interrupt count is "0". The value at point P0 is equal to the intercept Theta_new_low of the absolute angle function θ(count). The value at point P2 on the line L is the angle estimate θest calculated when the interrupt count is "2". The value at point P3 on the line L is the angle estimate θest calculated when the interrupt count is "3". The value at point P5 on the line L is the angle estimate θest calculated when the interrupt count is "5". The value at point P7 on the line L is the angle estimate θest calculated when the interrupt count is "7".

[0063] The first arithmetic unit 33 calculates an angle estimate θest corresponding to the current interrupt count value based on the absolute angle function θ(count) obtained by the long-period processing as described above, then calculates the instantaneous value Va of the A-phase signal VA based on equation (5) below (step S6), and calculates the instantaneous value Vb of the B-phase signal VB based on equation (6) below (step S7). In equations (5) and (6) below, K and N are constants. N is the number of times (number of periods) in which the waveform of one electrical angle period appears in the A-phase signal VA and B-phase signal VB in one mechanical angle period. As already mentioned, the resolution is determined by the number of periods N of the A-phase signal VA and B-phase signal VB. For example, N is 2048. Va = K·sin(N × θest) …(5) Vb = K·cos(N×θest) …(6)

[0064] The first calculation unit 33 outputs digital data indicating the calculation result of the instantaneous value Va of the A-phase signal VA as the A-phase digital signal DVA to the first D / A converter 35, and also outputs digital data indicating the calculation result of the instantaneous value Vb of the B-phase signal VB as the B-phase digital signal DVB to the first D / A converter 35. The first calculation unit 33 may also obtain the instantaneous value Va of the A-phase signal VA and the instantaneous value Vb of the B-phase signal VB corresponding to the angle estimate value θest by referring to table data stored in advance in the first storage unit 34.

[0065] Then, the first arithmetic unit 33 transmits digital data indicating the calculation result of the angle estimation value θest to the sub-MPU 40 via the first communication I / F 36 (step S8). After performing the processing in step S8, the first arithmetic unit 33 executes an interrupt count update process to update the interrupt count (step S9). Specifically, in step S9, the first arithmetic unit 33 increments the value of the interrupt count.

[0066] Next, the first arithmetic unit 33 determines whether the interrupt count count is equal to a predetermined threshold Cth (step S10). The threshold Cth is the value obtained by adding "1" to the maximum value "Cm" of the interrupt count count. If the answer in step S10 is "Yes", that is, if the interrupt count count is equal to the threshold Cth (=Cm+1), the first arithmetic unit 33 resets the interrupt count count to its initial value "0" and terminates the interrupt processing (step S11). On the other hand, if the answer in step S10 is "No", that is, if the interrupt count count is not equal to the threshold Cth, the first arithmetic unit 33 terminates the interrupt processing without performing the processing in step S11.

[0067] The first arithmetic unit 33 performs the interrupt processing described above, with the interrupt signal INT having a generation period T INTBy repeatedly executing this process, the A-phase signal VA, which is an analog sine wave signal, and the B-phase signal VB, which is an analog cosine wave signal (i.e., the B-phase signal VB having a phase difference of 90 degrees in electrical angle with respect to the A-phase signal VA), are output from the first D / A converter 35 to the filter circuit 50. For example, if the number of periods N of the A-phase signal VA and the B-phase signal VB is 2048, then the A-phase signal VA and the B-phase signal VB output during one mechanical angle period, i.e., the period during which the angle estimate θest changes from 0 degrees to 360 degrees, will each contain a waveform of one electrical angle period 2048 times.

[0068] Furthermore, the first arithmetic unit 33 performs the above-mentioned interrupt processing based on the generation period T of the interrupt signal INT. INT By repeatedly executing this, the generation period T of the interrupt signal INT is INT At roughly the same interval, digital data indicating the calculation result of the angle estimate θest is transmitted from the main MPU30 to the sub-MPU40.

[0069] Figure 6 is a flowchart showing the signal generation process performed by the second arithmetic unit 42 of the sub-MPU 40. As shown in Figure 6, the second arithmetic unit 42 determines whether or not it has received the calculation result of the angle estimation value θest from the main MPU 30 via the second communication I / F 41 (step S21). If the answer to step S21 is "No", the second arithmetic unit 42 waits until it receives the calculation result of the angle estimation value θest from the main MPU 30 by repeating the process of step S21 at regular time intervals.

[0070] If the answer to step S21 is "Yes," that is, if the calculation result of the angle estimation value θest is received from the main MPU 30, the second calculation unit 42 calculates the instantaneous value Vc of the C-phase signal VC based on equation (7) below (step S22), and calculates the instantaneous value Vd of the D-phase signal VD based on equation (8) below (step S23). In equations (7) and (8) below, K is a constant. Vc = K·sin(θest) …(7) Vd = K·cos(θest) …(8)

[0071] The second calculation unit 42 outputs digital data showing the calculation result of the instantaneous value Vc of the C-phase signal VC as a C-phase digital signal DVC to the second D / A converter 44, and also outputs digital data showing the calculation result of the instantaneous value Vd of the D-phase signal VD as a D-phase digital signal DVD to the second D / A converter 44. The second calculation unit 42 may also obtain the instantaneous value Vd of the C-phase signal VC and the instantaneous value Vd of the D-phase signal VD corresponding to the angle estimate value θest by referring to table data stored in advance in the second storage unit 43.

[0072] Furthermore, the second calculation unit 42 calculates the instantaneous value Vr of the R-phase signal VR based on a predetermined function (step S24). As shown in Figure 7, the R-phase signal VR is a waveform that is symmetrical left and right within a range of ±α degrees around a mechanical angle of 0 degrees (in this case, 0 degrees of the angle estimate θest), and whose peak appears at a mechanical angle of 0 degrees. Figure 7 shows, as an example, the waveform obtained when the instantaneous value Vr of the R-phase signal VR is calculated based on a sigmoid function. As an example, when the number of periods N is 2048, α may be determined as shown in equation (9) below. α=360 / 2048=0.17578(deg)…(9)

[0073] The second calculation unit 42 outputs digital data indicating the calculation result of the instantaneous value Vr of the R-phase signal VR as the R-phase digital signal DVR to the second D / A converter 44. The second calculation unit 42 may also obtain the instantaneous value Vr of the R-phase signal VR corresponding to the angle estimate θest by referring to table data previously stored in the second storage unit 43. After step S24 is completed, the second calculation unit 24 returns to step S21 and waits until it receives the calculation result of the next angle estimate θest from the main MPU 30.

[0074] The second arithmetic unit 42 performs the above-described signal generation process each time it receives the angle estimate θest from the main MPU 30, thereby outputting a C-phase signal VC, which is a sine wave analog signal, and a D-phase signal VD, which is a cosine wave analog signal (i.e., a D-phase signal VD having a phase difference of 90 degrees in electrical angle with respect to the C-phase signal VC), from the second D / A converter 44 to the filter circuit 50. In the C-phase signal VC and D-phase signal VD output during one mechanical angle period, i.e., the period during which the angle estimate θest changes from 0 degrees to 360 degrees, the waveform of one electrical angle period appears once.

[0075] Furthermore, the second arithmetic unit 42 performs the above-described signal generation process each time it receives the angle estimate θest from the main MPU 30, so that the R-phase signal VR, which is an analog signal indicating the reference position for one cycle of the mechanical angle, i.e., the position where the angle estimate θest is 0 degrees, is output from the second D / A converter 44 to the filter circuit 50.

[0076] As described above, the A-phase signal VA output from the main MPU 30 is shaped into a signal with a smooth sine waveform by the first low-pass filter 51 of the filter circuit 50, and then input to the first differential output circuit 61 of the output circuit 60. The B-phase signal VB output from the main MPU 30 is shaped into a signal with a smooth cosine waveform by the second low-pass filter 52 of the filter circuit 50, and then input to the second differential output circuit 62 of the output circuit 60.

[0077] The C-phase signal VC output from the sub-MPU 40 is shaped into a signal with a smooth sine waveform by the third low-pass filter 53 of the filter circuit 50, and then input to the third differential output circuit 63 of the output circuit 60. The D-phase signal VD output from the sub-MPU 40 is shaped into a signal with a smooth cosine waveform by the fourth low-pass filter 54 of the filter circuit 50, and then input to the fourth differential output circuit 64 of the output circuit 60. The R-phase signal VR output from the sub-MPU 40 is shaped into a signal with a smooth waveform by the fifth low-pass filter 55 of the filter circuit 50, and then input to the fifth differential output circuit 65 of the output circuit 60.

[0078] Then, as shown in Figure 8, the first differential output circuit 61 outputs a positive A-phase signal A+, which is in the same phase as the A-phase signal VA input from the first low-pass filter 51, and a negative A-phase signal A-, which is in the opposite phase to the positive A-phase signal A+. Similarly, the second differential output circuit 62 outputs a positive B-phase signal B+, which is in the same phase as the B-phase signal VB input from the second low-pass filter 52, and a negative B-phase signal B-, which is in the opposite phase to the positive B-phase signal B+. For example, if the number of periods N of the A-phase signal VA and B-phase signal VB is 2048, then the waveform of one electrical angle period will appear 2048 times in the positive A-phase signal A+, negative A-phase signal A-, positive B-phase signal B+, and negative B-phase signal B-, which are output during the period in which the angle estimate θest changes from 0 degrees to 360 degrees.

[0079] Furthermore, as shown in Figure 8, the positive C-phase signal C+, which is in the same phase as the C-phase signal VC input from the third low-pass filter 53 to the third differential output circuit 63, and the negative C-phase signal C-, which is in the opposite phase to the positive C-phase signal C+, are output from the third differential output circuit 63. Similarly, the positive D-phase signal D+, which is in the same phase as the D-phase signal VD input from the fourth low-pass filter 54 to the fourth differential output circuit 64, and the negative D-phase signal D-, which is in the opposite phase to the positive D-phase signal D+, are output from the fourth differential output circuit 64. The positive C-phase signal C+, the negative C-phase signal C-, the positive D-phase signal D+, and the negative D-phase signal D-, which are output during the period when the angle estimate θest changes from 0 degrees to 360 degrees, each exhibit a waveform representing one electrical angle period once.

[0080] Furthermore, as shown in Figure 8, the fifth differential output circuit 65 outputs a positive R-phase signal R+, which is in the same phase as the R-phase signal VR input from the fifth low-pass filter 55 to the fifth differential output circuit 65, and a negative R-phase signal R-, which is in the opposite phase to the positive R-phase signal R+. During the period when the angle estimate θest changes from 0 degrees to 360 degrees, the positive R-phase signal R+ and the negative R-phase signal R- output exhibit a waveform that is symmetrical left and right within a range of ±α degrees around 0 degrees of the angle estimate θest, once.

[0081] As described above, the signal generation device 1 of this embodiment includes a processing device 20 that calculates angular information indicating the mechanical angle of the rotation axis and generates an A-phase signal VA in which the waveform of one electrical angle period appears N times (N is an integer of 1 or more) in one mechanical angle period, and a B-phase signal VB having a phase difference of 90 degrees in electrical angle with respect to the A-phase signal VA, based on the calculation result of the angular information. According to this embodiment, since the processing unit 20 can be configured with an inexpensive general-purpose microcontroller, a signal generation device 1 that can generate at least an A-phase signal VA and a B-phase signal VB with a simpler and lower-cost configuration compared to conventional optical encoders can be provided. Furthermore, in conventional optical encoders, the number of periods of the A-phase and B-phase signals depends on the number of scale tracks provided on the scale disk, making it difficult to change the resolution without changing the hardware. However, in this embodiment, the number of periods N of the A-phase and B-phase signals can be set by software, making it possible to change the resolution without changing the hardware. In addition, since the A-phase and B-phase signals can be generated using a D / A converter that is commonly installed in general-purpose microcontrollers that can be used as the processing unit 20, it is possible to generate A-phase and B-phase signals with less distortion.

[0082] The signal generation device 1 of this embodiment further includes a first low-pass filter 51 provided in the transmission path of the A-phase signal VA output from the processing device 20, and a second low-pass filter 52 provided in the transmission path of the B-phase signal VB output from the processing device 20. This results in A-phase signal VA and B-phase signal VB having smooth waveforms from which high-frequency components caused by DA conversion by the processing unit 20 have been removed.

[0083] The signal generation device 1 of this embodiment further comprises a first differential output circuit 61 that generates a differential signal of the A-phase signal VA output from a first low-pass filter 51, and a second differential output circuit 62 that generates a differential signal of the B-phase signal VB output from a second low-pass filter 52. In this way, by outputting the A-phase signal VA and the B-phase signal VB as differential signals, the other device can obtain the A-phase signal VA and B-phase signal VB with reduced common-mode noise.

[0084] In this embodiment, the processing unit 20 further generates a C-phase signal VC in which the waveform of one electrical angle period appears once in one mechanical angle period, and a D-phase signal VD having a phase difference of 90 degrees in electrical angle with respect to the C-phase signal VC, based on the calculation result of the angle information. The C-phase signal VC and D-phase signal VD can be used by the other device to detect the absolute position. While it is difficult to determine the absolute position within one mechanical angle cycle using only the A-phase signal VA and B-phase signal VB, the C-phase signal VC and D-phase signal VD produce a waveform equivalent to one electrical angle cycle once within one mechanical angle cycle. Therefore, it becomes possible to determine the absolute position within one mechanical angle cycle using the C-phase signal VC and D-phase signal VD.

[0085] The signal generation device 1 of this embodiment further includes a third low-pass filter 53 provided in the transmission path of the C-phase signal VC output from the processing device 20, and a fourth low-pass filter 54 provided in the transmission path of the D-phase signal VD output from the processing device 20. This results in a C-phase signal VC and a D-phase signal VD having smooth waveforms from which high-frequency components caused by DA conversion by the processing unit 20 have been removed.

[0086] The signal generation device 1 of this embodiment further comprises a third differential output circuit 63 that generates a differential signal of the C-phase signal VC output from the third low-pass filter 53, and a fourth differential output circuit 64 that generates a differential signal of the D-phase signal VD output from the fourth low-pass filter 54. In this way, by outputting the C-phase signal VC and the D-phase signal VD as differential signals, the other device can obtain the C-phase signal VC and D-phase signal VD with reduced common-mode noise.

[0087] In this embodiment, the processing unit 20 further generates an R-phase signal VR indicating the reference position for one cycle of the mechanical angle based on the calculation result of the angle information. This allows the other device to receive an R-phase signal VR indicating the reference position for one cycle of the mechanical angle (for example, the position of 0 degrees in mechanical angle).

[0088] In this embodiment, the processing unit 20 includes a first processing unit 30 that calculates angle information and generates an A-phase signal VA and a B-phase signal VB based on the calculation results of the angle information, and a second processing unit 40 that generates a C-phase signal VC, a D-phase signal VD, and an R-phase signal VR based on the calculation results of the angle information obtained from the first processing unit 30. As a result, an inexpensive general-purpose microcontroller with a 2-channel D / A converter can be used as the first processing unit 30, and an inexpensive general-purpose microcontroller with a 3-channel D / A converter can be used as the second processing unit 40.

[0089] In this embodiment, the first processing unit 30 and the second processing unit 40 communicate the calculation results of the angle information. As a result, if, for example, the first processing unit 30 is equipped with a function to calculate angle information, it is sufficient to send the calculation result of the angle information from the first processing unit 30 to the second processing unit 40, so there is no need to equip the second processing unit 40 with an angle information calculation function. In other words, the computational load on the processor core of the second processing unit 40 is reduced, so a cheaper, lower-spec general-purpose microcontroller can be used as the second processing unit 40.

[0090] The signal processing device 1 of this embodiment further includes a fifth low-pass filter 55 provided in the transmission path of the R-phase signal VR output from the processing device 20. This results in an R-phase signal VR with a smooth waveform from which high-frequency components caused by DA conversion by the processing unit 20 have been removed.

[0091] The signal processing device 1 of this embodiment further includes a fifth differential output circuit 65 that generates a differential signal of the R-phase signal VR output from the fifth low-pass filter 55. In this way, by outputting the R-phase signal VR as a differential signal, the other device can acquire the R-phase signal VR with reduced common-mode noise.

[0092] The signal processing device 1 of this embodiment further includes a plurality of magnetic sensors 11, 12, and 13 that detect changes in magnetic flux due to the rotation of the rotating shaft, and the processing device 20 calculates angle information based on the signals output from the plurality of magnetic sensors 11, 12, and 13. This makes it possible to provide a magnetic encoder that can generate at least the A-phase signal VA and the B-phase signal VB with a simpler and lower-cost configuration compared to conventional optical encoders.

[0093] [Second Embodiment] Next, a second embodiment of the present invention will be described. Figure 9 shows an example of the waveforms of the A-phase signal VA, B-phase signal VB, and R-phase signal VR in the first embodiment. In Figure 9, the range W1 corresponds to the range of ±α degrees centered on 0 degrees of the angle estimate θest shown in Figure 7. Figure 10 is an enlarged view of the region indicated by reference numeral 200 in Figure 9.

[0094] As shown in Figure 10, in the first embodiment, a delay time occurs when the sub-MPU 40 receives the angle estimate θest from the main MPU 30 and calculates the instantaneous value Vr of the R-phase signal VR based on a predetermined function, resulting in a synchronization misalignment Δθ of the R-phase signal VR relative to the A-phase signal VA and the B-phase signal VB. The synchronization misalignment Δθ is the difference in mechanical angle that occurs between the intersection point P20 of the A-phase signal VA and the B-phase signal VB and the vertex P30 of the R-phase signal VR. It is desirable that the synchronization misalignment Δθ be as small as possible.

[0095] In the second embodiment, a signal generator 1A capable of reducing the synchronization misalignment Δθ of the R-phase signal VR with respect to the A-phase signal VA and the B-phase signal VB will be described. Figure 11 is a schematic block diagram showing the configuration of the signal generator 1A in the second embodiment. In the second embodiment illustrated below, components common to the first embodiment are denoted by the same reference numerals used in the first embodiment, and detailed explanations are omitted as appropriate.

[0096] As shown in Figure 11, the signal generation device 1A comprises a sensor unit 10, a processing unit 20A, a filter circuit 50A, and an output circuit 60A. The configuration of the sensor unit 10 is the same as in the first embodiment, so a description of the sensor unit 10 will be omitted.

[0097] The processing unit 20A comprises a main MPU 30A and a sub-MPU 40A. The main MPU 30A is the same as the main MPU 30 of the first embodiment in that it calculates angle information indicating the mechanical angle of the rotation axis, i.e., an angle estimate value θest, based on the magnetic flux detection signals Hu, Hv, and Hw output from the sensor unit 10, and generates an A-phase signal VA and a B-phase signal VB based on the calculation result of the angle estimate value θest. On the other hand, the main MPU 30A differs from the main MPU 30 of the first embodiment in that it generates an R-phase signal VR in addition to the A-phase signal VA and the B-phase signal VB.

[0098] Sub-MPU40A is the same as sub-MPU40 of the first embodiment in that it generates the C-phase signal VC and the D-phase signal VD based on the calculation result of the angle estimate θest transmitted from main MPU30A. On the other hand, sub-MPU40A differs from sub-MPU40 of the first embodiment in that it does not generate the R-phase signal VR.

[0099] The filter circuit 50A is identical to the filter circuit 50 of the first embodiment in that it includes a first low-pass filter 51, a second low-pass filter 52, a third low-pass filter 53, and a fourth low-pass filter 54. On the other hand, the filter circuit 50A differs from the filter circuit 50 of the first embodiment in that it does not include a fifth low-pass filter 55.

[0100] Output circuit 60A is identical to output circuit 60 of the first embodiment in that it comprises a first differential output circuit 61, a second differential output circuit 62, a third differential output circuit 63, and a fourth differential output circuit 64. On the other hand, output circuit 60A differs from output circuit 60 of the first embodiment in that it includes a fifth differential output circuit 65A that generates a differential signal of the R-phase signal VR output from the main MPU 30A, instead of the fifth differential output circuit 65 of the first embodiment.

[0101] The main MPU 30A is identical to the main MPU 30 of the first embodiment in that it comprises an A / D converter 31, a timer 32, a first storage unit 34, a first D / A converter 35, and a first communication interface 36. On the other hand, the main MPU 30A differs from the main MPU 30 of the first embodiment in that it comprises a first arithmetic unit 33A instead of the first arithmetic unit 33 of the first embodiment. Furthermore, the main MPU 30A differs from the main MPU 30 of the first embodiment in that it further comprises an arithmetic circuit 37, a switch 38, and an output port 39.

[0102] The first arithmetic unit 33A has at least the same functions as the first arithmetic unit 33 of the first embodiment. That is, when the first arithmetic unit 33A receives an interrupt signal INT from the timer 32, it performs an interrupt process that calculates an angle estimate value θest as angle information based on the digital data of magnetic flux detection signals Hu, Hv, and Hw input from the A / D converter 31. When the interrupt process is executed, the first arithmetic unit 33A generates an A-phase digital signal DVA and a B-phase digital signal DVB based on the calculation result of the angle estimate value θest and outputs them to the first D / A converter 35. Also, when the interrupt process is executed, the first arithmetic unit 33A transmits digital data indicating the calculation result of the angle estimate value θest to the sub-MPU 40A via the first communication I / F 36. Since the functions of the first arithmetic unit 33A as described above have been explained in the first embodiment, a description in the second embodiment will be omitted.

[0103] As will be described in more detail later, the first arithmetic unit 33A has the function of controlling the switch 38 in addition to the functions described above.

[0104] The arithmetic circuit 37 adds or multiplies the A-phase signal VA output from the first low-pass filter 51 and the B-phase signal VB output from the second low-pass filter 52. For example, the arithmetic circuit 37 is an analog adder or an analog multiplier. The configurations of analog adders and analog multipliers are generally well known. Therefore, a detailed explanation of the configuration of the arithmetic circuit 37 is omitted.

[0105] Output port 39 is a port that outputs the output signal VR0 of the arithmetic circuit 37 as the R-phase signal VR. Output port 39 is electrically connected to the input terminal of the fifth differential output circuit 65A, and the R-phase signal VR output from output port 39 is input to the fifth differential output circuit 65A.

[0106] Switch 38 electrically connects the calculation circuit 37 and the output port 39 when the mechanical angle indicated by the angle estimate θest is greater than or equal to the first mechanical angle θ1 and less than or equal to the second mechanical angle θ2. In other words, the first calculation unit 33A controls switch 38 to ON when the mechanical angle indicated by the angle estimate θest is greater than or equal to the first mechanical angle θ1 and less than or equal to the second mechanical angle θ2. As a result, the calculation circuit 37 and the output port 39 are electrically connected, and the output signal VR0 of the calculation circuit 37 is output from the output port 39 as the R-phase signal VR.

[0107] Figure 12 shows an example of the waveforms of the A-phase signal VA, the B-phase signal VB, and the output signal VR0 of the arithmetic circuit 37 in the second embodiment. In Figure 12, an example of the output signal VR0 of the arithmetic circuit 37 is shown, which is obtained by adding the A-phase signal VA and the B-phase signal VB.

[0108] As shown in Figure 12, when the mechanical angle indicated by the angle estimate θest is 0 degrees, the mechanical angle corresponding to the vertex P40 of the output signal VR0 of the arithmetic circuit 37 almost coincides with the mechanical angle corresponding to the intersection point P20 of the A-phase signal VA and the B-phase signal VB. In other words, by using the output signal VR0 of the arithmetic circuit 37 as the R-phase signal VR, the synchronization misalignment Δθ of the R-phase signal VR with respect to the A-phase signal VA and the B-phase signal VB can be suppressed to almost zero.

[0109] However, as can be seen from Figure 12, if the output signal VR0 of the calculation circuit 37 is used as the R-phase signal VR over the entire period of one cycle of the mechanical angle, it is not possible to obtain an R-phase signal VR in which a waveform that is symmetrical left and right within a range of ±α degrees around 0 degrees, as shown in Figure 7, appears once. Therefore, as described above, the first calculation unit 33A controls the switch 38 to turn on when the mechanical angle indicated by the angle estimate θest is greater than or equal to the first mechanical angle θ1 and less than or equal to the second mechanical angle θ2. As a result, the output signal VR0 of the calculation circuit 37 is output from the output port 39 as the R-phase signal VR only for the period when the mechanical angle is greater than or equal to the first mechanical angle θ1 and less than or equal to the second mechanical angle θ2.

[0110] Figure 13 shows an example of the waveforms of the A-phase signal VA, the B-phase signal VB, and the R-phase signal VR output from the output port 39 in the second embodiment. As shown in Figure 13, the output signal VR0 of the calculation circuit 37 is output from the output port 39 as the R-phase signal VR only for the period when the mechanical angle is greater than or equal to the first mechanical angle θ1 and less than or equal to the second mechanical angle θ2, thereby obtaining an R-phase signal VR in which a waveform that is symmetrical left and right within a range of ±α degrees around 0 degrees appears once. For example, if α is 0.17578 (deg) as expressed in equation (9) above, the first mechanical angle θ1 may be set to 359.82422 (deg) and the second mechanical angle θ2 may be set to 0.17578 (deg).

[0111] As described above, the second embodiment provides a signal generation device 1A that can reduce the synchronization misalignment Δθ of the R-phase signal VR with respect to the A-phase signal VA and the B-phase signal VB.

[0112] The explanation will now return to Figure 11. Sub-MPU 40A is identical to sub-MPU 40 of the first embodiment in that it includes a second communication I / F 41 and a second storage unit 43. On the other hand, sub-MPU 40A differs from sub-MPU 40 of the first embodiment in that it includes a second arithmetic unit 42A and a second D / A converter 44A instead of the second arithmetic unit 42 and second D / A converter 44 of the first embodiment.

[0113] The second calculation unit 42A is identical to the second calculation unit 42 of the first embodiment in that it has the function of generating a C-phase digital signal DVC and a D-phase digital signal DVD based on the calculation result of the angle estimate value θest received from the main MPU 30A via the second communication I / F 41 and outputting them to the second D / A converter 44A. On the other hand, the second calculation unit 42A differs from the second calculation unit 42 of the first embodiment in that it does not have the function of generating an instantaneous value Vr of the R-phase signal VR, i.e., the R-phase digital signal DVR, based on a predetermined function such as a sigmoid function.

[0114] The second D / A converter 44A differs from the second D / A converter 44 of the first embodiment in that it is a two-channel D / A converter. The second D / A converter 44A generates a C-phase signal VC by converting the C-phase digital signal DVC output from the second arithmetic unit 42A into an analog signal. The second D / A converter 44A generates a D-phase signal VD by converting the D-phase digital signal DVD output from the second arithmetic unit 42A into an analog signal.

[0115] As described above, according to the second embodiment, the second arithmetic unit 42A of the sub-MPU 40A does not need to calculate the instantaneous value Vr of the R-phase signal VR based on a predetermined function, so the computational load (calculation time, memory size, etc.) of the second arithmetic unit 42A can be reduced, improving real-time performance and reducing the cost of the sub-MPU 40A. Furthermore, according to the second embodiment, a 2-channel D / A converter can be used as the second D / A converter 44A of the sub-MPU 40A, so the cost of the sub-MPU 40A can be reduced compared to the first embodiment in which a 3-channel D / A converter is used as the second D / A converter 44.

[0116] [Variation] The present invention is not limited to the embodiments described above, and the configurations described herein can be combined as appropriate, within the bounds of non-inconsistency.

[0117] For example, in the first embodiment described above, the processing unit 20 is exemplified as comprising a first processing unit 30 that calculates angle information and generates an A-phase signal VA and a B-phase signal VB based on the calculation results of the angle information, and a second processing unit 40 that generates a C-phase signal VC, a D-phase signal VD, and an R-phase signal VR based on the calculation results of the angle information obtained from the first processing unit 30. The present invention is not limited thereto. For example, if the C-phase signal VC and D-phase signal VD are not required, the processing unit may include a first processing unit that calculates angle information and generates an A-phase signal VA and a B-phase signal VB based on the calculation results of the angle information, and a second processing unit that generates an R-phase signal VR based on the calculation results of the angle information obtained from the first processing unit. This allows the use of inexpensive general-purpose microcontrollers having two-channel D / A converters as the first and second processing units.

[0118] Furthermore, by using an inexpensive general-purpose microcontroller with a 3-channel D / A converter as the processing unit, the processing unit alone may generate the A-phase signal VA, the B-phase signal VB, and the R-phase signal VR. If an inexpensive general-purpose microcontroller with a 5-channel D / A converter can be used as the processing unit, the processing unit alone may generate all signals: the A-phase signal VA, the B-phase signal VB, the C-phase signal VC, the D-phase signal VD, and the R-phase signal VR. If the R-phase signal VR is not required, the processing unit may comprise a first processing unit that generates the A-phase signal VA and the B-phase signal VB, and a second processing unit that generates the C-phase signal VC and the D-phase signal VD. If the C-phase signal VC, the D-phase signal VD, and the R-phase signal VR are not required, by using an inexpensive general-purpose microcontroller with a 2-channel D / A converter as the processing unit, the processing unit alone may generate the A-phase signal VA and the B-phase signal VB.

[0119] In the first and second embodiments described above, an example was given in which three magnetic sensors 11, 12, and 13 are used. However, the type, number, and arrangement of the magnetic sensors may be appropriately changed depending on the type of rotation axis or the content of the angle calculation algorithm.

[0120] [Examples of application] Figure 14 is a schematic diagram showing the external appearance of an elevator 100, which is an application example of the present invention. The elevator 100 comprises a car 120 suspended by a rope 110, a hoisting machine 130 that raises the car 120 by winding up the rope 110, and a signal generating device (not shown) that calculates angular information indicating the mechanical angle of the rotation axis of the hoisting machine 130 and generates at least a first signal and a second signal based on the calculation result of the angular information. As the signal generating device, the signal generating device 1 of the first embodiment or the signal generating device 1A of the second embodiment can be used. Furthermore, the application of the present invention is not limited to elevator 100, and can be broadly applied to motor-driven devices such as robots, for example.

[0121] Furthermore, this technology can be configured as follows: (1) A signal generation device comprising a processing device that calculates angular information indicating the mechanical angle of a rotating shaft, and based on the calculation result of the angular information, generates a first signal in which a waveform of one electrical angle period appears N times (N is an integer of 1 or more) in one mechanical angle period, and a second signal having a phase difference of 90 degrees in electrical angle with respect to the first signal. (2) The signal generating apparatus according to (1), further comprising: a first low-pass filter provided in the transmission path of the first signal output from the processing apparatus; and a second low-pass filter provided in the transmission path of the second signal output from the processing apparatus. (3) The signal generation apparatus according to (2), further comprising: a first differential output circuit for generating a differential signal of the first signal output from the first low-pass filter; and a second differential output circuit for generating a differential signal of the second signal output from the second low-pass filter. (4) The signal generating device according to any one of (1) to (3), wherein the processing device further generates a third signal in which a waveform of one electrical angle period appears once in one mechanical angle period, and a fourth signal having a phase difference of 90 degrees in electrical angle with respect to the third signal, based on the calculation result of the angle information. (5) The signal generating apparatus according to (4), further comprising: a third low-pass filter provided in the transmission path of the third signal output from the processing apparatus; and a fourth low-pass filter provided in the transmission path of the fourth signal output from the processing apparatus. (6) The signal generation apparatus according to (5), further comprising: a third differential output circuit for generating a differential signal of the third signal output from the third low-pass filter; and a fourth differential output circuit for generating a differential signal of the fourth signal output from the fourth low-pass filter. (7) The signal generating device according to any one of (1) to (3), wherein the processing device further generates a fifth signal indicating the reference position of one cycle of the machine angle based on the calculation result of the angle information. (8) The signal generation device according to (7), comprising: a first processing device that calculates the angle information and generates the first signal and the second signal based on the calculation result of the angle information; and a second processing device that generates the fifth signal based on the calculation result of the angle information obtained from the first processing device. (9) The signal generating device according to any one of (4) to (6), wherein the processing device further generates a fifth signal indicating the reference position of one cycle of the machine angle based on the calculation result of the angle information. (10) The signal generation device according to (9), comprising: a first processing device that calculates the angle information and generates the first signal and the second signal based on the calculation result of the angle information; and a second processing device that generates the third signal, the fourth signal, and the fifth signal based on the calculation result of the angle information obtained from the first processing device. (11) The signal generating device according to (8) or (10), wherein the first processing device and the second processing device communicate the calculation result of the angle information. (12) The signal generating apparatus according to any one of (7) to (11), further comprising a fifth low-pass filter provided in the transmission path of the fifth signal output from the processing apparatus. (13) The signal generating apparatus according to (12), further comprising a fifth differential output circuit for generating a differential signal of the fifth signal output from the fifth low-pass filter. (14) The signal generating device according to (2) or (3), wherein the processing device comprises: an arithmetic circuit that adds or multiplies the first signal output from the first low-pass filter and the second signal output from the second low-pass filter; an output port that outputs the output signal of the arithmetic circuit as a fifth signal; and a switch that electrically connects the arithmetic circuit and the output port when the mechanical angle indicated by the angle information is greater than or equal to the first mechanical angle and less than or equal to the second mechanical angle. (15) The signal generating device according to (14), further comprising a fifth differential output circuit that generates a differential signal of the fifth signal output from the output port. (16) The signal generating device according to any one of (1) to (15), further comprising a plurality of magnetic sensors for detecting changes in magnetic flux due to the rotation of the rotating shaft, wherein the processing device calculates the angle information based on signals output from the plurality of magnetic sensors. (17) An elevator comprising: a car suspended by a rope; a hoisting machine that raises the car by winding up the rope; and a signal generating device according to any one of (1) to (16) that calculates angular information indicating the mechanical angle of the rotation axis of the hoisting machine and generates at least the first signal and the second signal based on the calculation result of the angular information. [Industrial applicability]

[0122] According to an aspect of the present invention, a signal generating device capable of generating at least a first signal and a second signal with a simpler and lower-cost configuration compared to conventional optical encoders is provided, as well as an elevator equipped with the signal generating device. Therefore, the present invention has industrial applicability. [Explanation of Symbols]

[0123] 1, 1A signal generator 10 Sensor section 11, 12, 13 Magnetic sensors 20, 20A Processing Unit 30, 30A Main MPU (First Processing Unit) 31 A / D Converters 32 timers 33, 33A First arithmetic unit 34. First Memory Unit 35. First D / A converter 36. First communication interface 37 Arithmetic circuit 38 switches 39 output ports 40, 40A Sub-MPU (Second Processing Unit) 41 Second communication interface 42, 42A Second arithmetic unit 43 Second Memory Unit 44, 44A Second D / A converter 50, 50A filter circuit 51. First low-pass filter 52. Second low-pass filter 53. The third low-pass filter 54. The fourth low-pass filter 55. The fifth low-pass filter 60, 60A output circuit 61 First differential output circuit 62 Second differential output circuit 63 Third differential output circuit 64. Fourth differential output circuit 65, 65A Fifth differential output circuit 100 Elevators 110 Rope 120 baskets 130 Winding machine

Claims

1. The processing device includes an array that calculates angular information indicating the mechanical angle of the rotation axis, and based on the calculation result of the angular information, generates a first signal in which a waveform of one electrical angle period appears N times (N is an integer of 1 or more) within one mechanical angle period, and a second signal having a phase difference of 90 degrees in electrical angle with respect to the first signal. The processing device is a signal generating device that further generates a fifth signal indicating the reference position of one cycle of the machine angle based on the calculation result of the angle information.

2. A first low-pass filter is provided in the transmission path of the first signal output from the processing device, A second low-pass filter is provided in the transmission path of the second signal output from the processing device, The signal generating device according to claim 1, further comprising:

3. A first differential output circuit that generates a differential signal of the first signal output from the first low-pass filter, A second differential output circuit that generates a differential signal of the second signal output from the second low-pass filter, The signal generating device according to claim 2, further comprising:

4. The processing device further generates, based on the calculation result of the angle information, a third signal in which a waveform of one electrical angle period appears once in one mechanical angle period, and a fourth signal having a phase difference of 90 degrees in electrical angle with respect to the third signal. A signal generating device according to any one of claims 1 to 3.

5. A third low-pass filter is provided in the transmission path of the third signal output from the processing device, A fourth low-pass filter is provided in the transmission path of the fourth signal output from the processing device, The signal generating device according to claim 4, further comprising:

6. A third differential output circuit that generates a differential signal of the third signal output from the third low-pass filter, A fourth differential output circuit that generates a differential signal of the fourth signal output from the fourth low-pass filter, The signal generating device according to claim 5, further comprising:

7. The aforementioned processing apparatus is A first processing unit that calculates the angle information and generates the first signal and the second signal based on the calculation result of the angle information, A second processing device generates the fifth signal based on the calculation result of the angle information obtained from the first processing device, Equipped with, A signal generating device according to any one of claims 1 to 3.

8. The aforementioned processing apparatus is A first processing unit that calculates the angle information and generates the first signal and the second signal based on the calculation result of the angle information, A second processing device generates the third signal, the fourth signal, and the fifth signal based on the calculation result of the angle information obtained from the first processing device, Equipped with, The signal generating device according to claim 4.

9. The first processing unit and the second processing unit communicate the calculation results of the angle information. The signal generating device according to claim 7.

10. The signal generating apparatus according to claim 1, further comprising a fifth low-pass filter provided in the transmission path of the fifth signal output from the processing apparatus.

11. The signal generation apparatus according to claim 10, further comprising a fifth differential output circuit for generating a differential signal of the fifth signal output from the fifth low-pass filter.

12. A processing device that calculates angular information indicating the mechanical angle of a rotating shaft, and generates a first signal in which a waveform of one electrical angle period appears N times (N is an integer of 1 or more) in one mechanical angle period, and a second signal having a phase difference of 90 degrees in electrical angle with respect to the first signal, based on the calculation result of the angular information, A first low-pass filter is provided in the transmission path of the first signal output from the processing device, A second low-pass filter is provided in the transmission path of the second signal output from the processing device, Equipped with, The aforementioned processing apparatus is An arithmetic circuit that adds or multiplies the first signal output from the first low-pass filter and the second signal output from the second low-pass filter, An output port that outputs the output signal of the aforementioned arithmetic circuit as a fifth signal, A switch electrically connects the calculation circuit and the output port when the mechanical angle indicated by the angle information is greater than or equal to the first mechanical angle and less than or equal to the second mechanical angle, A signal generating device equipped with the following features.

13. The signal generation device according to claim 12, further comprising a fifth differential output circuit for generating a differential signal of the fifth signal output from the output port.

14. The system further comprises multiple magnetic sensors that detect changes in magnetic flux due to the rotation of the aforementioned rotating shaft. The processing unit calculates the angle information based on the signals output from the plurality of magnetic sensors. A signal generating device according to any one of claims 1 to 3.

15. The processing device obtains an instantaneous value Va of the first signal based on the calculation result of the angle information and equation (5), obtains an instantaneous value Vb of the second signal based on the calculation result of the angle information and equation (6), and generates the first signal and the second signal by converting the digital data representing the instantaneous value Va and the digital data representing the instantaneous value Vb into analog signals using a D / A converter. In equations (5) and (6) above, K and N are constants, and θest is the result of the calculation of the angle information. A signal generating device according to any one of claims 1, 2, 3, 12, and 13. Va=K・sin(N×θest)…(5) Vb=K・cos(N×θest)…(6)

16. A basket suspended by a rope, A hoisting machine that raises the basket by winding up the rope, A signal generating device according to any one of claims 1, 2, 3, 12, and 13, which calculates angular information indicating the mechanical angle of the rotating shaft of the hoisting machine and generates at least the first signal, the second signal, and the fifth signal based on the calculation result of the angular information, An elevator equipped with [a certain feature].