Motor control device and motor control system
Patent Information
- Application Number
- JP2025523688
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Filing Date
- 2025-06-10
- Publication Date
- 2025-08-20
AI Technical Summary
Existing motor control systems face challenges in smoothly transitioning between speed control and position control, leading to sudden changes in machine operation due to signal delays caused by filter processing, which affects the accuracy and stability of mechanical device operations.
A motor control device that switches between position control and non-position control modes, utilizing a reference model section to determine model positions and speeds based on filtered position commands, and sets initial model values to minimize sudden changes by adjusting torque commands and position commands accordingly.
The solution effectively suppresses sudden changes in machine operation while smoothing the transition between control modes, maintaining operational accuracy and stability even with filter-induced signal delays.
Abstract
Description
Motor control device and motor control system
[0001] The present disclosure relates to a motor control device and a motor control system that control a motor.
[0002] Mechanical devices such as elevators and machine tools operate when their motors are controlled by motor control devices. The motor control devices may control the mechanical devices by switching from speed control to position control. When this switching occurs, the mechanical operation may suddenly change, so it is desirable to suppress such sudden changes in mechanical operation.
[0003] The machine operation control device described in Patent Document 1 suppresses sudden changes in machine operation by matching the position command at the time of switching from speed control to position control with the detected position detected from the object to be controlled.
[0004] Japanese Patent Application Publication No. 11-212650
[0005] However, when a filter such as a low-pass filter is applied to the technology of Patent Document 1 to smooth out the mechanical operation corresponding to the position command, a delay occurs in the signal due to the filtering process, and there are cases where the mechanical operation changes suddenly when switching from speed control to position control.
[0006] The present disclosure has been made in consideration of the above, and aims to provide a motor control device that can smooth out mechanical operation corresponding to a position command while suppressing sudden changes in mechanical operation.
[0007] To solve the above-mentioned problems and achieve the object, the present disclosure provides a motor control device that controls an object by switching between position control of the object to be driven and non-position control, a control mode different from position control, and includes a position command generator that generates a position command that is a command for position control, and a non-position command generator that generates a non-position command that is a command for non-position control. The motor control device of the present disclosure includes a reference model unit that determines a model position that indicates a position corresponding to the filtered position command by filtering the position command with a filter, and a speed control unit that, during position control, determines a first torque command for driving the object using a signal calculated based on a detected position that is a position detected for the object and the model position. The motor control device of the present disclosure also includes a model initial value setting unit that sets a model position initial value, which is a signal used when calculating the model position at the time of switching from non-position control to position control, based on the detected position at the time of switching, and a position command initial value setting unit that sets a position command initial value, which is a signal used when generating the position command at the time of switching. The motor control device of the present disclosure, during non-position control, outputs a second torque command corresponding to a non-position command for driving an object to a driving device that drives the object, and the position command initial value setting unit sets an initial value of the position command based on speed information, which is a signal related to the speed of the object at the time of switching, the detected position at the time of switching, and the transfer characteristic, which is the characteristic of the transfer function of the filter. The position command generation unit generates a position command at the time of switching based on the initial value of the position command, and the speed control unit outputs a first torque command, which corresponds to the position command at the time of switching, to the driving device.
[0008] The motor control device according to the present disclosure has the advantage of being able to suppress sudden changes in the machine operation while smoothing the machine operation corresponding to a position command.
[0009] FIG. 1 is a diagram illustrating a configuration of a motor control device according to a first embodiment; FIG. 2 is a diagram for explaining an example of a motion pattern of an object that moves due to motor control by the motor control device according to the first embodiment;
[0010] A motor control device and a motor control system according to embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
[0011] First Embodiment Fig. 1 is a diagram showing the configuration of a motor control device according to a first embodiment. The motor control device 101 is a device that controls an object 7, which is a mechanical device (control target) such as an elevator or a machine tool. The motor control device 101 controls the object 7 by controlling a motor (not shown) provided in the object 7.
[0012] The motor control device 101 drives the object 7 by switching between position control of the object 7 to be driven and non-position control, which is a control mode different from position control. The non-position control in the first and second embodiments is speed control, and the non-position control in the third embodiment is torque control.
[0013] Motor control device 101 includes a speed command generation unit 1, a position command generation unit 2, a switching command unit 3, a switch 4, a reference model unit 5A, and a position control unit 6. Motor control device 101 also includes a position detection unit 8, a switch 9, a speed control unit 10A, a speed detection unit 11, a model initial value setting unit 12, and a position command initial value setting unit 13.
[0014] The motor control device 101 is connected to the driving device 14 and outputs a torque command Tr1 to the driving device 14. Based on the torque command Tr1, the driving device 14 then outputs a driving command (current), which is a signal for driving the object 7, to the motor of the object 7. In the first embodiment, a system including the motor control device 101, the driving device 14, and the object 7 is a motor control system.
[0015] The speed command generator 1 generates a speed command Vr, which is a speed command (non-position control command) for moving the object 7 at a specific speed. The speed command generator 1 sends the speed command Vr to the switch 4. In the first and second embodiments, the speed command generator 1 is a non-position command generator. In the first and second embodiments, the speed command Vr generated by the speed command generator 1 is a non-position command.
[0016] The position command generation unit 2 accepts (receives) a position command initial value Xr0 from the position command initial value setting unit 13, and accepts a switching command Sw from the switching command unit 3. Based on the position command initial value Xr0 sent from the position command initial value setting unit 13, the position command generation unit 2 generates a position command Xr, which is a command (position control command) for moving the target object 7 to a specific position. The position command initial value Xr0 will be described later. The position command generation unit 2 sends the position command Xr to the switch 4.
[0017] The switching command unit 3 generates a switching command Sw, which is a command to switch between speed control and position control. The switching command unit 3 monitors, for example, an actual remaining distance Xea, which is the difference between a target stop position (hereinafter referred to as target stop position Xt) and a detected position XFB. The target stop position Xt is a target position at which the object 7 is desired to stop. The switching command unit 3 acquires the target stop position Xt from a control program used to control the motor. The detected position XFB is the actual position of the object 7 detected by the position detection unit 8. The detected position XFB corresponds to a feedback value of the position of the object 7.
[0018] When the actual remaining distance Xea is equal to or greater than a specific value, the switching command unit 3 outputs, for example, "0" as the switching command Sw for moving the object 7 by speed control. When the actual remaining distance Xea is less than the specific value, the switching command unit 3 outputs, for example, "1" as the switching command Sw for moving the object 7 by the position command Xr. The switching command unit 3 sends the switching command Sw to the position command generation unit 2, the switch 4, the reference model unit 5A, the switch 9, the model initial value setting unit 12, and the position command initial value setting unit 13.
[0019] The switch 4 has terminals 41 to 43. The terminal 41 is connected to the speed command generating unit 1, and the terminal 42 is connected to the position command generating unit 2. The terminal 43 is connected to the reference model unit 5A.
[0020] The switch 4 switches the connection destination of the terminal 43 between the terminal 41 and the terminal 42 based on the switching command Sw sent from the switching command unit 3. The switch 4 connects the terminal 43 to the terminal 41 during the period when the speed control is performed (a speed control section Vs described later), and connects the terminal 43 to the terminal 42 during the period when the position control is performed (a position control section Ps described later). The output of the switch 4 is the command XVr. That is, the switch 4 outputs the speed command Vr as the command XVr during the speed control section Vs, and outputs the position command Xr as the command XVr during the position control section Ps. The switch 4 outputs the command XVr to the reference model unit 5A.
[0021] The reference model unit 5A receives a command XVr from the switch 4, receives a model position initial value Xm0 from the model initial value setting unit 12, and receives a switching command Sw from the switching command unit 3. The model position initial value Xm0 will be described later.
[0022] The reference model unit 5A executes processing in response to the command XVr to smooth the movement of the object 7. That is, the reference model unit 5A executes processing in response to the command XVr to smoothly change the actual position of the object 7.
[0023] The reference model unit 5A switches between processing in the speed control section Vs and processing at the model position Xm based on the switching command Sw. When the switching command Sw is a command to switch to speed control, the reference model unit 5A executes processing using the speed command Vr, and when the switching command Sw is a command to switch to position control, the reference model unit 5A executes processing using the position command Xr.
[0024] The reference model unit 5A calculates the model velocity Vm and the model position Xm by performing calculations based on the command XVr. Note that the reference model unit 5A does not need to calculate the model position Xm in the velocity control section Vs.
[0025] When switching from the speed control section Vs to the position control section Ps, the reference model unit 5A calculates the model speed Vm and model position Xm by performing calculations based on the command XVr and the model position initial value Xm0.
[0026] The model velocity Vm is a velocity calculated using a filter such as a low-pass filter provided in the reference model unit 5A. The model position Xm is a position calculated using a filter such as a low-pass filter provided in the reference model unit 5A. In this way, the model position Xm is a signal obtained through a filter such as a low-pass filter. The model position Xm lags behind the position command Xr by a time according to the characteristics of the filter.
[0027] The model position Xm and the model velocity Vm have a differential-integral relationship. That is, the model velocity Vm is obtained by differentiating the model position Xm with respect to time, and the model position Xm is obtained by integrating the model velocity Vm with respect to time. The model position Xm and the actual velocity of the object 7 (detected velocity VFB, described later) approximately coincide with each other.
[0028] Since the model velocity Vm and the model position Xm are calculated using a filter, the object 7 moves smoothly in accordance with the characteristics of the filter. In the first embodiment, during position control, the model position Xm is controlled so as to coincide with the detected position XFB, which is the feedback position of the object 7.
[0029] If the motor control device 101 controls the object 7 without using the reference model unit 5A, the motor of the object 7 will be affected by vibrations, noise, etc. and will not be able to operate smoothly. For this reason, in the first embodiment, the motor control device 101 controls the object 7 using the reference model unit 5A.
[0030] The model velocity Vm and model position Xm change in response to the command XVr sent from the switch 4. In the velocity control section Vs, the model velocity Vm and model position Xm change in response to the velocity command Vr, and in the position control section Ps, the model velocity Vm and model position Xm change in response to the position command Xr. Furthermore, the model velocity Vm and model position Xm when switching from the velocity control section Vs to the position control section Ps correspond to the position command Xr and the model position initial value Xm0. The reference model section 5A outputs the model velocity Vm to the velocity control section 10A and outputs the model position Xm to the position control section 6.
[0031] The position control unit 6 receives the model position Xm from the reference model unit 5A and receives the detected position XFB from the position detection unit 8. The position control unit 6 calculates a position compensation signal CX by performing an operation based on the model position Xm and the detected position XFB. The position control unit 6 outputs the calculated position compensation signal CX to the switch 9. The position compensation signal CX is a signal for compensating for the position of the object 7. In other words, the position compensation signal CX is a signal for correcting a positional deviation of the object 7. The position compensation signal CX is represented by velocity information. The model position Xm, the position control unit 6, and the position compensation signal CX are used in the position control section Ps.
[0032] The switch 9 receives a switching command Sw from the switching command unit 3 and a position compensation signal CX from the position control unit 6. The switch 9 switches the position control section Ps ON and the speed control section Vs OFF based on the switching command Sw. When the switch 9 is switched ON, the switch 9 outputs the position compensation signal CX to the speed control unit 10A, and when the switch 9 is switched OFF, the switch 9 blocks the output of the position compensation signal CX to the speed control unit 10A. The switch 9 may be disposed between the reference model unit 5A and the position control unit 6. The switch 9 may also be disposed in the reference model unit 5A at a stage subsequent to a low-pass filter 5d, which will be described later.
[0033] The speed control unit 10A receives the model speed Vm from the reference model unit 5A and receives the detected speed VFB from the speed detection unit 11. The detected speed VFB is the actual speed of the object 7 detected by the speed detection unit 11. The detected speed VFB corresponds to a feedback value of the speed of the object 7. The speed control unit 10A receives a position compensation signal CX from the switch 9 in the position control section Ps, but does not receive the position compensation signal CX from the switch 9 in the speed control section Vs.
[0034] During the position control interval Ps, the speed control unit 10A calculates a torque command Tr1 that determines the torque of the motor by performing calculations based on the position compensation signal CX, the model speed Vm, and the detected speed VFB. During the speed control interval Vs, the speed control unit 10A calculates a torque command Tr1 by performing calculations based on the model speed Vm and the detected speed VFB. The speed control unit 10A outputs the calculated torque command Tr1 to the driving device 14.
[0035] In the first and second embodiments, the torque command Tr1 calculated and output by the speed control unit 10A in the position control section Ps is the first torque command, and the torque command Tr1 calculated and output by the speed control unit 10A in the speed control section Vs is the second torque command.
[0036] The driving device 14 outputs a driving command, which is a signal for driving the object 7, to the object 7 based on a torque command Tr1 sent from the speed control unit 10A, which is a torque control unit.
[0037] The position detection unit 8 detects the position of the object 7 and outputs a detected position XFB, which is information indicating the position of the object 7. The position detection unit 8 uses, for example, an encoder to detect the position. The position detection unit 8 sends the detected position XFB to the switching command unit 3, the position control unit 6, the model initial value setting unit 12, and the position command initial value setting unit 13.
[0038] The speed detection unit 11 detects the speed of the object 7 and outputs a detected speed VFB, which is information indicating the speed of the object 7, to the speed control unit 10A. The speed detection unit 11 can obtain the detected speed VFB, for example, by differentiating a position detected by an encoder or the like. Alternatively, the speed detection unit 11 may estimate the detected speed VFB based on at least one of the voltage and current generated in the moving machine 14.
[0039] The model initial value setting unit 12 receives the detected position XFB from the position detection unit 8 and receives a switching command Sw from the switching command unit 3. When the model initial value setting unit 12 receives the switching command Sw for switching to position control from the switching command unit 3, it calculates a model position initial value Xm0 by performing a calculation based on the detected position XFB. The model position initial value Xm0 is a signal used when calculating the model position Xm at the time of switching from the speed control section Vs to the position control section Ps. The model initial value setting unit 12 sends the calculated model position initial value Xm0 to the reference model unit 5A.
[0040] The position command initial value setting unit 13 receives the detected position XFB from the position detection unit 8 and the switching command Sw from the switching command unit 3. The position command initial value setting unit 13 also receives speed information V and a reference model time constant T. The speed information V is, for example, a model speed Vm. In this case, the position command initial value setting unit 13 receives the model speed Vm, which is the speed information V, from the reference model unit 5A. In this case, the position command initial value setting unit 13 is connected to the reference model unit 5A, but FIG. 1 does not show the connection line connecting the position command initial value setting unit 13 and the reference model unit 5A. In the first embodiment, a case will be described in which the speed information V is the model speed Vm.
[0041] The speed information V may be a speed command Vr or a detected speed VFB. When the speed information V is a speed command Vr, the position command initial value setting unit 13 receives the speed command Vr, which is the speed information V, from the speed command generation unit 1. In this case, the position command initial value setting unit 13 is connected to the speed command generation unit 1.
[0042] Furthermore, when the speed information V is the detected speed VFB, the position command initial value setting unit 13 receives the detected speed VFB, which is the speed information V, from the speed detection unit 11. In this case, the position command initial value setting unit 13 is connected to the speed detection unit 11.
[0043] The reference model time constant T corresponds to the characteristics of a filter (transfer function) such as a low-pass filter provided in the reference model unit 5A. Here, the reference model time constant T is the time constant of the transfer function. Note that the position command initial value setting unit 13 may accept information other than the reference model time constant T as long as it is a characteristic (transfer characteristic) related to the transfer function. The position command initial value setting unit 13 reads the reference model time constant T from, for example, a memory that stores the reference model time constant T in advance.
[0044] Upon receiving a switching command Sw for switching to speed control from the switching command unit 3, the position command initial value setting unit 13 calculates a position command initial value Xr0 by performing a calculation based on the speed information V (model speed Vm), the reference model time constant T, and the detected position XFB. The position command initial value Xr0 is a signal used when generating the position command Xr at the time of switching from the speed control section Vs to the position control section Ps.
[0045] Here, the movement of the object 7 will be described. Fig. 2 is a diagram for explaining an example of a movement pattern of an object that moves due to motor control by the motor control device according to the first embodiment. The horizontal axis of the graph shown in Fig. 2 represents time, and the vertical axis represents the speed of the object 7.
[0046] In the first embodiment, the object 7 includes a motor (not shown) and a moving body (not shown) that moves as the motor is driven. Before time t0, the object 7 is stationary. At time t0, the object 7 starts to accelerate, and the speed gradually increases until time t1. The period from time t0 to time t1 is called the acceleration period. The speed of the object 7 reaches a maximum at time t1, and the object 7 then moves at a constant speed until time t2. The period from time t1 to time t2 is called the constant speed period.
[0047] From time t2, the object 7 decelerates and its speed gradually decreases. At time t3, the speed of the object 7 becomes zero, and the object 7 stops at the target stop position Xt. The section from time t2 to time t3 is called the deceleration section. Here, the object 7 is driven by speed control from time t0 to switching time ts, and is driven by position control from switching time ts to time t3. Switching time ts is the time when speed control is switched to position control. The section from time t0 to switching time ts is called the speed control section Vs. Furthermore, the section from switching time ts to time t3 is called the position control section Ps.
[0048] Next, we will explain the operation of motor control device 101. In speed control section Vs, switching command Sw is "0", and terminal 43 of switch 4 is connected to terminal 41. Therefore, speed command Vr, which is the output of speed command generation unit 1, is input to reference model unit 5A as command XVr.
[0049] Furthermore, because the switch 9 is turned off by the switching command Sw, the position compensation signal CX output from the position control unit 6 is not input to the speed control unit 10A. In this case, the speed control unit 10A determines the torque command Tr1 by performing a calculation based on the model speed Vm and the detected speed VFB.
[0050] When the switching command Sw becomes "1", the object 7 is driven by position control. In the position control section Ps, the terminal 43 of the switch 4 is connected to the terminal 42. Therefore, the position command Xr, which is the output of the position command generation unit 2, is input to the reference model unit 5A as the command XVr.
[0051] In the position control section Ps, the switch 9 is in the on state, and the position compensation signal CX output from the position control section 6 is input to the speed control section 10A. In this case, the speed control section 10A determines the torque command Tr1 by performing calculations based on the position compensation signal CX output from the position control section 6, the model speed Vm, and the detected speed VFB.
[0052] At the time when the switching command Sw switches from "0" to "1," i.e., at the switching time (switching point) ts from speed control to position control, the position command initial value setting unit 13 determines a position command initial value Xr0 by a method to be described later, and the position command generating unit 2 determines a position command Xr based on the position command initial value Xr0. At the switching time ts from speed control to position control, the reference model unit 5A determines a model position Xm based on a model position initial value Xm0 calculated by a method to be described later.
[0053] <Position control unit 6> Figure 3 is a block diagram showing the configuration of the position control unit provided in the motor control device according to the first embodiment. The position control unit 6 has a calculator 6a and a position proportional gain 6b. The calculator 6a receives the model position Xm from the reference model unit 5A and receives the detected position XFB from the position detection unit 8. The calculator 6a calculates the difference between the model position Xm and the detected position XFB and sends the calculation result to the position proportional gain 6b.
[0054] The position proportional gain 6b multiplies the output value from the calculator 6a by kp. Here, kp is the proportional gain (strength of proportionality). The output from the position proportional gain 6b is the position compensation signal CX. The position proportional gain 6b outputs the position compensation signal CX to the switch 9. In this way, the position control unit 6 controls the position of the object 7 by P (Proportional) control. That is, the position control unit 6 P-controls the position of the object 7 by setting the position compensation signal CX to a value proportional to the difference between the model position Xm, which is a target value, and the detected position XFB, which is a current value.
[0055] <Speed Control Unit 10A> Fig. 4 is a block diagram showing the configuration of a speed control unit included in the motor control device according to embodiment 1. The speed control unit 10A has calculators 10a, 10c, 10f, 10h, and 10k, gains 10b and 10l, delay units 10d and 10j, a speed integral gain 10e, a speed proportional gain 10g, and an acceleration gain 10i.
[0056] In speed control unit 10A, calculator 10a, delay unit 10j, and calculator 10k receive model speed Vm from reference model unit 5A in both position control interval Ps and speed control interval Vs. Calculator 10a also receives detected speed VFB from speed detection unit 11 in both position control interval Ps and speed control interval Vs. Calculator 10a also receives position compensation signal CX from position control unit 6 in position control interval Ps.
[0057] During the position control interval Ps, the calculator 10a subtracts the detected speed VFB from the sum of the position compensation signal CX and the model speed Vm. During the speed control interval Vs, the calculator 10a subtracts the detected speed VFB from the model speed Vm. The calculator 10a outputs the calculation result to the gain 10b and the calculator 10f.
[0058] Gain 10b multiplies the output of calculator 10a by tv and outputs the result to calculator 10c, where tv is the calculation period of speed control unit 10A. Calculator 10c adds the output of delay device 10d to the output of gain 10b, and outputs the sum to delay device 10d and speed integral gain 10e.
[0059] The delay device 10d receives the output from the calculator 10c, and delays the output of the calculator 10c by one sample before outputting the delayed output to the calculator 10c, which then adds the latest output value of the gain 10b to the output value of the calculator 10c from one cycle before, and outputs the sum to the delay device 10d and the velocity integral gain 10e.
[0060] The velocity integral gain 10e multiplies the output of the calculator 10c by kvi and outputs the result to the calculator 10f, where kvi is the integral gain (strength of integration). The calculator 10f adds the output of the calculator 10a to the output of the velocity integral gain 10e and outputs the result to the velocity proportional gain 10g.
[0061] The speed proportional gain 10g multiplies the output of the calculator 10f by kvp and outputs the result to the calculator 10h, where kvp is a proportional gain. Here, the output of the speed proportional gain 10g is referred to as a speed compensation signal CV. The calculator 10h calculates the sum of the output of the speed proportional gain 10g and the output of the acceleration gain 10i, and outputs the calculation result to the driving device 14. The output of the calculator 10h is a torque command Tr1.
[0062] In the speed control unit 10A, the processing executed by the gain 10b, the calculator 10c, and the delay unit 10d is the integral processing. The speed control unit 10A performs integral control by the gain 10b, the calculator 10c, the delay unit 10d, and the speed integral gain 10e.
[0063] Furthermore, in the speed control unit 10A, proportional control is performed by the calculators 10a and 10f and the speed proportional gain 10g. As a result, in the speed control unit 10A, PI (Proportional Integral) control is performed by the calculators 10a, 10c, and 10f, the gain 10b, the delay unit 10d, the speed integral gain 10e, and the speed proportional gain 10g.
[0064] The delay unit 10j delays the model speed Vm by one sample and outputs the delayed model speed Vm to the calculator 10k. The calculator 10k calculates the difference between the model speed Vm and the output of the delay unit 10j and outputs the calculation result to the gain 10l.
[0065] The gain 10l multiplies the output of the calculator 10k by 1 / tv and outputs the result to the acceleration gain 10i. The processing executed by the delay unit 10j, calculator 10k, and gain 10l corresponds to the processing (differential processing) of differentiating the model velocity Vm and converting it into a signal of the acceleration dimension. Therefore, the signal output from the gain 10l corresponds to the acceleration of the object 7.
[0066] The acceleration gain 10i multiplies the output of the gain 10l by Jm and outputs the result to the calculator 10h. Jm corresponds to the load (mass) of the object 7. Therefore, the acceleration gain 10i converts the signal output from the gain 10l into a force dimension by multiplying the acceleration by the load. The value output from the acceleration gain 10i corresponds to the torque when the object 7 to be controlled is regarded as a rigid body. Here, the output of the acceleration gain 10i is referred to as a model torque Tm (not shown).
[0067] In this way, the speed control unit 10A determines the torque command Tr1 by adding the speed compensation signal CV calculated by PI control and the model torque Tm. That is, the calculator 10h calculates the torque command Tr1 by adding the feedforward value, which is the output value from the acceleration gain 10i, and the feedback value, which is the output value from the speed proportional gain 10g.
[0068] Here, the model torque Tm is determined by multiplying the value obtained by differentiating the model velocity Vm by Jm using the acceleration gain 10i. In other words, the model torque Tm is determined by modeling the object 7 as a rigid body, and represents the ideal torque required to drive the object 7. Therefore, the velocity compensation signal CV acts to compensate for disturbances or modeling errors. In this way, the velocity control unit 10A can control the object 7 with high precision by controlling the object 7 based on the model torque Tm and the velocity compensation signal CV.
[0069] <Reference Model Unit 5A> Fig. 5 is a block diagram showing the configuration of the reference model unit included in the motor control device according to embodiment 1. The reference model unit 5A has a gain 5a, a calculator 5b, a delay unit 5c, a low-pass filter 5d, and switches 5e and 5f.
[0070] The command XVr sent from the switch 4 is input to the gain 5a and the switch 5e. The gain 5a multiplies the command XVr by tm and outputs the result to the calculator 5b, where tm is the calculation period of the reference model unit 5A. The calculator 5b adds the output of the delay device 5c to the output of the gain 5a and outputs the result to the switch 5e. The delay device 5c delays the output of the calculator 5b by one sample and outputs the delayed output to the gain 5a. The process executed by the gain 5a, calculator 5b, and delay device 5c is an integral calculation process.
[0071] The switch 5e has terminals 51 to 53. The terminal 51 is connected to the calculator 5b, and the terminal 52 is connected to the terminal 43 (not shown in FIG. 5) of the switch 4. The terminal 53 is connected to the low-pass filter 5d.
[0072] Switch 5e switches the connection destination of terminal 53 between terminal 51 and terminal 52 based on a switching command Sw sent from switching command unit 3. Switch 5e connects terminal 53 to terminal 51 in a speed control section Vs where speed control is performed, and connects terminal 53 to terminal 52 in a position control section Ps where position control is performed.
[0073] In the speed control section Vs, the speed command Vr is input to the gain 5a as the command XVr. This command XVr is converted into a position command signal by the gain 5a, the calculator 5b, and the delay device 5c, and input to the switch 5e. In the position control section Ps, the position command Xr is input to the switch 5e as the command XVr. In the speed control section Vs, the switch 5e sends a signal corresponding to the speed command Vr to the low-pass filter 5d, and in the position control section Ps, the switch 5e sends the position command Xr to the low-pass filter 5d.
[0074] The low-pass filter 5d is a low-pass filter whose reference model time constant T is a time constant 1 / ωf. The reference model unit 5A filters the position command Xr indicated by the command XVr using the low-pass filter 5d to determine a model position Xm indicating a position corresponding to the filtered position command Xr. The low-pass filter 5d has calculators 5d1 and 5d5, a delay device 5d2, and gains 5d3 and 5d4.
[0075] Operator 5d1 calculates the difference between the output of switch 5e and the output of delay unit 5d2 and outputs the calculation result to gain 5d3. Gain 5d3 is a gain that multiplies the output of operator 5d1 by ωf. Gain 5d3 outputs the calculation result as model speed Vm to speed control unit 10A and gain 5d4.
[0076] Gain 5d4 multiplies model velocity Vm by tm and outputs the result to calculator 5d5. Calculator 5d5 adds the output of delay device 5d2 to the output of gain 5d4. Calculator 5d5 outputs the calculation result as model position Xm to position control unit 6. The process executed by calculator 5d5, delay device 5d2, and gain 5d4 is an integral calculation process.
[0077] In this way, during speed control, the reference model unit 5A calculates the model speed Vm by inputting a signal obtained by integrating the speed command Vr to the low-pass filter 5d, and during position control, it calculates the model position Xm and the model speed Vm by inputting the position command Xr to the low-pass filter 5d. Note that the reference model unit 5A also calculates the model position Xm during speed control, but since the switch 9 is off during speed control, control using the model position Xm is not executed.
[0078] Here, the position command generator 2 determines the position command Xr by a method described later, and matches the command speed (command speed Vrx, described later) corresponding to the signal obtained by time-differentiating the position command Xr at the switching time ts with the speed command Vr at the switching time ts. Furthermore, the model speed Vm in the speed control interval Vs is determined by inputting a signal obtained by integrating the speed command Vr to the low-pass filter 5d, so the model speed Vm in the speed control interval Vs and the model speed Vm in the position control interval Ps match. Therefore, when switching from speed control to position control, the model speed Vm does not cause a sudden abnormal change in the movement of the object 7.
[0079] Furthermore, low-pass filter 5d has the characteristics of a low-pass filter with a time constant of 1 / ωf and removes high-frequency components from position command Xr and velocity command Vr, thereby enabling highly accurate control of object 7. Furthermore, motor control device 101 can adjust the responsiveness from velocity command Vr to the velocity of object 7 and the responsiveness from position command Xr to the position of object 7 using the time constant 1 / ωf, thereby enabling highly accurate control of object 7.
[0080] Switch 5f receives a switching command Sw from switching command unit 3 and switches between on and off based on the switching command Sw. Switch 5f has its terminals connected and turned on at switching time ts from speed control to position control, and is turned off at other times. That is, switch 5f has its terminals connected and turned on at switching time ts from speed control to position control, and is turned off at times other than switching time ts. When switch 5f is turned on, model position initial value Xm0 is input to delay unit 5d2, and the output value from delay unit 5d2 is rewritten as model position initial value Xm0. That is, model position Xm(ts) at switching time ts from speed control to position control can be expressed as in the following equation (1):
[0081]
[0082] Here, Vm(ts) is the model velocity Vm at the time ts when switching to position control. In this way, the reference model unit 5A can determine the model position Xm(ts) at the time of switching to position control in accordance with the model position initial value Xm0 by rewriting the value of the delay device 5d2.
[0083] <Model Initial Value Setting Unit 12> The model initial value setting unit 12 sets a model position initial value Xm0 based on the detected position XFB and outputs it to the reference model unit 5 A. The model initial value setting unit 12 determines the model position initial value Xm0 from the above-mentioned equation (1) as shown in the following equation (2), thereby making it possible to match the model position Xm(ts) at the switching time ts with the detected position XFB(ts).
[0084]
[0085] Here, Vm(ts-tm) is the model velocity Vm immediately before switching from velocity control to position control. That is, Vm(ts-tm) is the model velocity Vm one sample before the timing of switching from velocity control to position control. As described above, the model velocities before and after switching are the same, so Vm(ts-tm) = Vm(ts). Therefore, the model initial value setting unit 12 determines the model position initial value Xm0 using equation (2), thereby making the model position Xm and the detected position XFB coincident and setting the position compensation signal CX at the switching time ts to zero. As a result, when switching from velocity control to position control, the model position Xm does not cause a sudden abnormal change in the operation of the object 7.
[0086] In addition, when Vm(ts-tm)·tm, which is the second term on the right side of equation (2), is a value sufficiently smaller than XFB(ts), the model initial value setting unit 12 may determine the model position initial value Xm0 using the following equation (3).
[0087]
[0088] Furthermore, in equation (2), the model speed Vm is referenced to determine the model position initial value Xm0, but instead, the detected speed VFB or speed command Vr at the switching time ts may be referenced in equation (2). That is, the model initial value setting unit 12 may determine the model position initial value Xm0 using equation (2) that references the detected speed VFB or speed command Vr at the switching time ts. In other words, the model initial value setting unit 12 may determine the model position initial value Xm0 using equation (2) that applies the detected speed VFB or speed command Vr at the switching time ts instead of the model speed Vm.
[0089] <Position Command Generator 2> Fig. 6 is a block diagram showing the configuration of a position command generator included in the motor control device according to embodiment 1. The position command generator 2 has a calculator 2a, a speed command calculator 2b, a gain 2c, a calculator 2d, a delay device 2e, and a switch 2f.
[0090] The target stop position Xt obtained from the control program is input to the calculator 2a. The calculator 2a calculates a command remaining distance Xe, which is the difference between the target stop position Xt and the output of the delay unit 2e. The command remaining distance Xe is a signal indicating the remaining distance to the target stop position Xt when the object 7 is moved to the target stop position Xt. The calculator 2a sends the command remaining distance Xe, which is the calculation result, to the speed command calculation unit 2b.
[0091] The speed command calculation unit 2b generates a command speed Vrx based on the command remaining distance Xe. The command speed Vrx corresponds to the differential value of the position command Xr used during position control. That is, the command speed Vrx is a signal that is subsequently integrated over time to become the position command Xr. In other words, the position command Xr corresponds to a signal obtained by integrating the command speed Vrx.
[0092] The speed command calculation unit 2b receives the model speed Vm, the speed command Vr, or the detected speed VFB as the speed information V. Here, a case will be described in which the speed command calculation unit 2b receives the speed command Vr as the speed information V. The speed command calculation unit 2b receives an initial speed command value, which is the speed command Vr at the time of switching from speed control to position control, from the speed command generation unit 1. In the first embodiment, the speed command calculation unit 2b determines the command speed Vrx using the following equations (4) and (5).
[0093]
[0094]
[0095] Here, a is the deceleration, and Vc is the value of the speed command Vr in the constant speed interval (the interval from time t1 to time t2 in FIG. 2 ). By determining the command speed Vrx (= Vc) using equation (5), the speed command calculation unit 2b can match the speed command Vr (initial value of the speed command) at the time of switching from speed control to position control with the command speed Vrx at the time of switching. In other words, the speed command calculation unit 2b can match the speed of the object 7 during speed control with the time derivative value (slope) of the position command.
[0096] Furthermore, by determining the command speed Vrx using equation (4), the speed command calculation unit 2b can decelerate the object 7 at a specified deceleration and can determine the command speed Vrx that will stop the object 7 at the target stop position Xt. The speed command calculation unit 2b outputs the command speed Vrx, which is the calculation result, to the gain 2c. Note that the speed command calculation unit 2b may match the command speed Vrx at the time of switching from speed control to position control with the model speed Vm or the detected speed VFB.
[0097] The gain 2c multiplies the command speed Vrx by tc and outputs the result to the calculator 2d, where tc is the calculation period of the position command generator 2. The calculator 2d calculates the position command Xr by adding the output of the delay device 2e to the output of the gain 2c, and outputs the calculation result to the delay device 2e and the switch 4.
[0098] The delay unit 2e delays the output of the calculator 2d by one sample and outputs the delayed output to the calculator 2d and the calculator 2a. As a result, the calculator 2d adds the latest output value of the gain 2c to the output value of the calculator 2d from one cycle ago. The calculator 2d then outputs the calculated position command Xr to the delay unit 2e and the switch 4.
[0099] The processing executed by the gain 2c, the calculator 2d, and the delay device 2e is an integral calculation processing. In this way, the position command generator 2 can determine the position command Xr corresponding to the command speed Vrx by integrating the command speed Vrx to determine the position command Xr.
[0100] Switch 2f receives a switching command Sw from switching command unit 3 and switches between on and off based on the switching command Sw. Switch 2f has its terminals connected and turned on at switching time ts from speed control to position control, and is turned off at other times. That is, switch 2f has its terminals connected and turned on at switching time ts from speed control to position control, and is turned off at times other than switching time ts. When switch 2f is turned on, a position command initial value Xr0 is input to delay unit 2e, and the output value from delay unit 2e is rewritten as position command initial value Xr0. That is, position command Xr(ts) at switching time ts from speed control to position control can be expressed as in the following equation (6):
[0101]
[0102] Here, Vrx(ts) is the commanded velocity Vrx at the time ts of switching to position control. In this way, the position command generator 2 can determine the position command Xr(ts) at the time of switching to position control in accordance with the position command initial value Xr0 by rewriting the value of the delay device 2e.
[0103] <Position command initial value setting unit 13> First, the relationship between the position command Xr and the model position Xm will be described. In the position control section Ps, the model position Xm is set using the following equation (7). That is, the reference model unit 5A calculates the model position Xm from the position command Xr using the following equation (7).
[0104]
[0105] where s is the Laplace operator, Xm(s) is the Laplace transform of the model position Xm, and Xr(s) is the Laplace transform of the position command Xr. The ωf / (ωf+s) part of equation (7) corresponds to the continuous system of the low-pass filter 5d, and the Xr(s) part of equation (7) is the input position command Xr.
[0106] Furthermore, the Laplace transform Vm(s) of the model velocity Vm and the Laplace transform Xm(s) of the model position Xm have the relationship expressed by the following equation (8): Furthermore, the relationship expressed by the following equation (9) can be obtained from equation (7).
[0107]
[0108]
[0109] On the right side of equation (8), the Laplace transform Vm(s) is integrated by multiplying it by 1 / s. Equation (8) indicates that the integrated Laplace transform Vm(s) is the same as the Laplace transform Xm(s). By transforming equation (9) using equation (8) to perform an inverse Laplace transform and further considering the influence of discretization, the following equation (10) can be obtained as the relationship between the position command Xr(t) and the model position Xm(t):
[0110]
[0111] In equation (10), Vm(t) / ωf is the delay in the model position due to the low-pass filter 5d, and -Vm(t)tm is the delay in the model position due to the influence of discretization. Here, Xr(t) and Xm(t) are the position command and model position at time t, respectively. That is, equation (10) shows that the model position Xm lags behind the position command Xr by Vm(t) / ωf - Vm(t)tm. Therefore, considering that the model position Xm and the detected position XFB should coincide at the switching time ts, the position command initial value Xr0 is determined by the following equation (11), and the position command Xr and the model position Xm satisfy the relationship of equation (10).
[0112]
[0113] The Vrx(ts-tc)tc portion in equation (11) corresponds to the position command Xr of one sample before. As a result, the position command Xr of one sample before added by the calculator 2d is subtracted from the output of the gain 2c, and this subtraction cancels out the addition by the calculator 2d.
[0114] The position command initial value setting unit 13 determines the position command initial value Xr0 using equation (11). That is, the position command initial value setting unit 13 determines the position command initial value Xr0 based on the detected position XFB at the switching time ts, the model velocity Vm at the switching time ts, and the time constant 1 / ωf of the low-pass filter 5d. Specifically, the position command initial value setting unit 13 determines the position command initial value Xr0 so that the position command at the switching time ts coincides with the sum of the detected position XFB at the switching time ts and the product of the model velocity Vm at the switching time ts and the time constant 1 / ωf of the low-pass filter 5d. This allows the position command Xr and the model position Xm to satisfy the relationship of equation (10). Therefore, when switching from velocity control to position control, the position command Xr does not cause a sudden abnormal change in the operation of the object 7.
[0115] In addition, when Vrx(ts)tc and Vm(ts-tm)tm are sufficiently smaller than XFB(ts-tm)+Vm(ts) / ωF, the position command initial value setting unit 13 may determine the position command initial value Xr0 by the following equation (12).
[0116]
[0117] Here, in equations (11) and (12), the position command initial value Xr0 is determined based on the model speed Vm, but the speed command Vr or the detected speed VFB may be used instead of the model speed Vm. That is, the position command initial value setting unit 13 may determine the position command initial value Xr0 according to equation (12) using the speed command Vr or the detected speed VFB instead of the model speed Vm.
[0118] Alternatively, position command initial value setting unit 13 may determine position command initial value Xr0 using two or more of model speed Vm, speed command Vr, and detected speed VFB. In this manner, position command initial value setting unit 13 determines position command initial value Xr0 using at least one of model speed Vm, speed command Vr, and detected speed VFB. When using two or more of model speed Vm, speed command Vr, and detected speed VFB, position command initial value setting unit 13 determines position command initial value Xr0 using, for example, an average value of at least two of model speed Vm, speed command Vr, and detected speed VFB.
[0119] Furthermore, in equations (11) and (12), the delay of the model position Xm relative to the position command Xr is determined based on the model velocity Vm and the time constant 1 / ωf, but as is clear from equation (9), position command initial value setting unit 13 can also determine the delay of the model position Xm relative to the position command Xr using the difference between the position command Xr and the model position Xm. Since the output of calculator 5b, which is a signal obtained by integrating velocity command Vr, corresponds to position command Xr, position command initial value setting unit 13 may determine position command initial value Xr0 using the following equation (13).
[0120]
[0121] Here, Xme(ts-tm) is the output of calculator 5d1 at time (ts-tm) and corresponds to the delay of model position Xm relative to position command Xr. Xme(ts-tm) is the model position deviation indicating the difference between the time integral value of model speed Vm and the time integral value of speed command Vr. In other words, Xme(ts-tm) corresponds to the time integral value of the difference between model speed Vm and speed command Vr.
[0122] The time integration process of the speed command Vr corresponds to the process of integrating the speed command Vr by the gain 5a, the calculator 5b, and the delay device 5c during speed control. Therefore, the time integral value of the speed command Vr corresponds to the value input from the switch 5e to the calculator 5d1 during speed control.
[0123] Furthermore, the time integration process of model speed Vm corresponds to the process of integrating model speed Vm by calculator 5d5, delay device 5d2, and gain 5d4 during speed control. Therefore, the time integration value of model speed Vm corresponds to the value input from delay device 5d2 to calculator 5d1 during speed control.
[0124] The process of calculating the difference between the time integral of model velocity Vm and the time integral of velocity command Vr corresponds to the process in which calculator 5d1 calculates the difference between the output value from switch 5e and the output value from delay device 5d2. Therefore, position command initial value setting unit 13 can set position command initial value Xr0 using equation (13) by receiving the output value (model position error) output from calculator 5d1. In this way, position command initial value setting unit 13 determines position command initial value Xr0, which is used when calculating model position Xm at the time of switching, so that it coincides with the sum of detected position XFB(ts) and model position error Xme(ts-tm).
[0125] Furthermore, although the low-pass filter 5d is a first-order low-pass filter in the above example, the low-pass filter 5d may be an n-th-order (n≧2) low-pass filter as expressed by the following equation (14).
[0126]
[0127] Here, 1 / a1 to 1 / a n is a time constant. The reference model unit 5A can calculate the model position Xm by inputting the position command Xr to a low-pass filter as expressed by equation (14).
[0128] When the transfer function of the low-pass filter 5d is expressed by equation (13), the position command initial value setting unit 13 determines the position command initial value Xr0 based on equation (12) with the time constant set to 1 / a1.
[0129] With this configuration, the motor control device 101 can prevent the movement of the object 7 from suddenly changing when switching from speed control to position control, even if there is a filter (such as low-pass filter 5d) in the position command Xr.
[0130] The model position Xm, the position command Xr, and the detected position XFB may be signals relating to the position of the motor or the position of the moving object, and the model velocity Vm, the velocity command Vr, and the detected velocity VFB may be signals relating to the velocity of the motor or the velocity of the moving object.
[0131] However, when the position command Xr is subjected to filtering, a delay occurs in the actual position of the object 7 relative to the position command Xr. In this case, if the position command Xr at the time of switching from non-position control such as speed control to position control is made to coincide with the detected position XFB of the object 7 at the time of switching without taking filtering into consideration, the filtering causes a delay in the signal, which causes a sudden change in machine operation when switching to position control, resulting in a deterioration in positioning accuracy.
[0132] On the other hand, in motor control device 101 of the first embodiment, position command initial value setting unit 13 determines position command initial value Xr0 based on detected position XFB at switching time ts, model velocity Vm, and time constant 1 / ωf of low-pass filter 5d. Therefore, even if a delay occurs in the signal due to filtering, there is no sudden change in machine operation when switching to position control, and there is no deterioration in positioning accuracy.
[0133] As described above, in the motor control device 101 of the first embodiment, the position command initial value setting unit 13 sets the position command initial value Xr0 based on the velocity information V of the object 7 at the time of switching (switching time ts), the detected position XFB at the time of switching, and the transfer characteristic (time constant 1 / ωf), which is the characteristic of the transfer function of the low-pass filter 5d that smooths the position command Xr. The position command generating unit 2 then generates the position command Xr at the time of switching based on the position command initial value Xr0, and this position command Xr is passed through the low-pass filter 5d. This allows the motor control device 101 to smooth the position command Xr and adjust the position command Xr when switching from velocity control to position control to a command that corresponds to the signal delay due to the time constant 1 / ωf. Therefore, the motor control device 101 can suppress a sudden change in machine operation while smoothing the position command Xr.
[0134] Second Embodiment Next, a second embodiment will be described with reference to Fig. 7. In the second embodiment, during speed control, the speed command Vr is input to the reference model unit without being integrated, and the model speed Vm output from the calculator 5d5 is output to the speed control unit 10A.
[0135] The motor control device 101 of the second embodiment differs from the motor control device 101 of the first embodiment only in the configuration of the reference model unit, and the other configurations are the same.
[0136] Fig. 7 is a block diagram showing the configuration of a reference model unit included in a motor control device according to embodiment 2. Of the components in Fig. 7, components that achieve the same functions as those in reference model unit 5A of embodiment 1 shown in Fig. 5 are assigned the same reference numerals, and duplicated explanations will be omitted.
[0137] The reference model unit 5B of the second embodiment does not include the gain 5a, the calculator 5b, the delay unit 5c, and the switch 5e, as compared with the reference model unit 5A of the first embodiment. Furthermore, the reference model unit 5B includes switches 5g and 5h, as compared with the reference model unit 5A. That is, the reference model unit 5B includes a low-pass filter 5d and switches 5f, 5g, and 5h.
[0138] The switch 5g has terminals 54 to 56. The terminal 54 is connected to the calculator 5d5, the terminal 55 is connected to the gain 5d3, and the terminal 56 is connected to the speed control unit 10A.
[0139] Switch 5g switches the connection destination of terminal 56 between terminal 54 and terminal 55 based on a switching command Sw sent from switching command unit 3. Switch 5g connects terminal 56 to terminal 54 in a speed control section Vs where speed control is performed, and connects terminal 56 to terminal 55 in a position control section Ps where position control is performed.
[0140] The switch 5h is a switch that switches the position control section Ps ON and the speed control section Vs OFF based on a switching command Sw sent from the switching command unit 3. When the switch 5h is switched ON, the switch 5h outputs the model position Xm to the position control unit 6, and when the switch 5h is switched OFF, the switch 5h cuts off the output of the model position Xm to the position control unit 6.
[0141] In the speed control section Vs, speed command Vr is input as command XVr to calculator 5d1, and model speed Vm is output from calculator 5d5. In the speed control section Vs, terminal 56 of switch 5g is connected to terminal 54, and switch 5h is turned off. As a result, in the speed control section Vs, model speed Vm output from calculator 5d5 is output to speed control section 10A via switch 5g. In addition, no signal is sent from switch 5h to position control section 6.
[0142] On the other hand, in the position control interval Ps, the position command Xr is input as command XVr to calculator 5d1, and a model position Xm is output from calculator 5d5. Then, in the position control interval Ps, terminal 56 of switch 5g is connected to terminal 55, and switch 5h is turned on. As a result, in the position control interval Ps, the model velocity Vm output from gain 5d3 is output to velocity control unit 10A via switch 5g. Also, the model position Xm is output from switch 5h to position control unit 6.
[0143] In this way, when the reference model unit 5B receives the speed command Vr as the command XVr in the speed control section Vs, it outputs the model speed Vm from the switch 5g. Also, when the reference model unit 5B receives the position command Xr as the command XVr in the position control section Ps, it outputs the model speed Vm from the switch 5g and outputs the model position Xm from the switch 5h.
[0144] The differences between the operation of the reference model unit 5B and the operation of the reference model unit 5A are the following differences D1 to D4. The differences D1 to D4 are operations during speed control, and operations during position control are the same in the first and second embodiments.
[0145] (D1) In the reference model unit 5B of the second embodiment, during speed control, the speed command Vr is not integrated but is input directly to the low-pass filter 5d. (D2) In the reference model unit 5B of the second embodiment, during speed control, the output of the calculator 5d5 is the model speed Vm, and the calculator 5d5 outputs the model speed Vm to the speed control unit 10A. (D3) In the reference model unit 5B of the second embodiment, during speed control, the gain 5d3 does not output the model speed Vm to the speed control unit 10A. (D4) In the reference model unit 5B of the second embodiment, during speed control, the model position Xm is not output to the position control unit 6 (equivalent to outputting the model position as zero).
[0146] In the second embodiment, the motor control device 101 does not necessarily have to include the switch 9. In this case, the motor control device 101 of the second embodiment does not necessarily have to include the switch 5h.
[0147] In this way, motor control device 101 of embodiment 2 does not require the calculation of integrating speed command Vr, thereby reducing calculation costs. When transporting object 7 over a long distance, if speed command Vr is integrated, the result of the integral calculation may become very large and overflow, but since motor control device 101 does not need to integrate speed command Vr, it is possible to prevent overflow.
[0148] Third Embodiment Next, a third embodiment will be described with reference to Figures 8 to 10. In the third embodiment, the motor control device switches from torque control to position control.
[0149] Fig. 8 is a block diagram showing the configuration of a motor control device according to embodiment 3. Of the components in Fig. 8, those that achieve the same functions as those in motor control device 101 according to embodiment 1 shown in Fig. 1 are assigned the same reference numerals, and duplicated explanations will be omitted.
[0150] Motor control device 102 of embodiment 3 includes torque command generation unit 22, torque command initial value setting unit 23, and switch 21 in addition to the components included in motor control device 101 of embodiment 1. Furthermore, motor control device 102 does not include speed command generation unit 1, switch 4, or switch 9. Furthermore, motor control device 102 includes reference model unit 5C instead of reference model unit 5A, and speed control unit 10C instead of speed control unit 10A. In embodiment 3, a system including motor control device 102, driving machine 14, and target object 7 is a motor control system.
[0151] In embodiment 3, the torque command Tr1 calculated and output by the speed control unit 10C in the position control section Ps is the first torque command, and the torque command Tr2 generated and output by the torque command generation unit 22 in the torque control section is the second torque command.
[0152] The following description will mainly focus on the differences between the processing executed in embodiment 3 and the processing executed in embodiments 1 and 2. Torque command generation unit 22 is connected to torque command initial value setting unit 23 and switch 21. Torque command initial value setting unit 23 is connected to speed control unit 10C, and speed control unit 10C is connected to switch 21.
[0153] The torque command generating unit 22 outputs a torque command Tr2, which is a torque command for operating the object 7 at a specific torque, to the switch 21 in a torque control section, which is a period during which torque control is executed. This torque command Tr2 is output to the driving device 14 as a torque command Tr3 in the torque control section. The torque command generating unit 22 also outputs the torque command Tr2 to the torque command initial value setting unit 23. In the third embodiment, the torque command generating unit 22 is a non-position command generating unit. In the third embodiment, the torque command Tr2 generated by the torque command generating unit 22 is a non-position command.
[0154] The switching command unit 3 of the third embodiment outputs "0" as the switching command Sw in the torque control section. When the switching command Sw is "0", the object 7 is driven by torque control. Furthermore, the switching command unit 3 of the third embodiment outputs "1" as the switching command Sw in the position control section Ps. When the switching command Sw is "1", the object 7 is driven by position control. The switching command unit 3 sends the switching command Sw to the position command generation unit 2, the reference model unit 5C, the speed control unit 10C, the model initial value setting unit 12, the position command initial value setting unit 13, and the switch 21.
[0155] The switch 21 has terminals 211 to 213. The terminal 211 is connected to the torque command generating unit 22, the terminal 212 is connected to the speed control unit 10C, and the terminal 213 is connected to the driving machine 14.
[0156] Switch 21 switches the connection destination of terminal 213 between terminal 211 and terminal 212 based on a switching command Sw sent from switching command unit 3. Switch 21 connects terminal 213 to terminal 211 in the torque control period, and connects terminal 213 to terminal 212 in the position control period Ps. The output of switch 21 is torque command Tr3. That is, switch 21 outputs torque command Tr2 sent from torque command generation unit 22 as torque command Tr3 in the torque control period, and outputs torque command Tr1 sent from speed control unit 10C as torque command Tr3 in the position control period Ps. Switch 21 outputs torque command Tr3 to driving machine 14.
[0157] The only speed-related signal used by motor control device 102 of embodiment 3 is detected speed VFB; motor control device 102 does not use speed command Vr or model speed Vm. Therefore, position command generator 2 (speed command calculator 2b) of motor control device 102 of embodiment 3 matches command speed Vrx to detected speed VFB. That is, while motor control device 101 of embodiments 1 and 2 match the command speed to either speed command Vr, model speed Vm, or detected speed VFB, motor control device 102 of embodiment 3 matches the command speed to detected speed VFB.
[0158] 9 is a block diagram showing the configuration of a reference model unit included in a motor control device according to embodiment 3. Compared to reference model unit 5A of embodiment 1, reference model unit 5C does not include gain 5a, calculator 5b, delay unit 5c, or switch 5e. That is, reference model unit 5C includes low-pass filter 5d and switch 5f.
[0159] The low-pass filter 5d of the reference model unit 5C receives the position command Xr output from the position command generator 2. In this way, the reference model unit 5C of the third embodiment has the same functions as the reference model unit 5A during position control.
[0160] 10 is a block diagram showing the configuration of a speed control unit included in a motor control device according to embodiment 3. Speed control unit 10C includes a switch 10m in addition to the components included in speed control unit 10A of embodiment 1. Switch 10m is connected to delay device 10d.
[0161] A position compensation signal CX output from position control unit 6 is input to calculator 10a of speed control unit 10C. In motor control device 102 of embodiment 3, switch 9 is not provided upstream of speed control unit 10C, and position compensation signal CX calculated by position control unit 6 is input to calculator 10a without passing through switch 9.
[0162] The switch 10m receives a switching command Sw from the switching command unit 3 and switches between on and off based on the switching command Sw. The switch 10m has its terminals connected and turned on at the switching time ts from torque control to position control, and is turned off at other times. That is, the switch 10m has its terminals connected and turned on at the switching time ts from torque control to position control, and is turned off at times other than the switching time ts. When the switch 10m is turned on, the torque command initial value Tr0 is input to the delay unit 10d, and the output value from the delay unit 10d is rewritten as the torque command initial value Tr0. It should be noted that immediately after switching from torque control to position control, if the object 7 is driven at a constant speed, the output of the acceleration gain 10i is zero.
[0163] As a result, the torque command Tr2 during torque control and the torque command Tr1 during position control match before and after switching from torque control to position control, so switching of the switch 21 does not cause any sudden abnormal changes in the operation of the object 7.
[0164] Next, a description will be given of the operation of the motor control device 102 according to the third embodiment. Here, the differences between the operation of the motor control device 102 according to the third embodiment and the operation of the motor control device 101 according to the first and second embodiments will be mainly described.
[0165] When switch 10m receives a switching command Sw from switching command unit 3, its terminals are connected, its state is turned on, and the initial torque command value Tr0 is input to delay unit 10d. As a result, the output value from delay unit 10d is rewritten as the initial torque command value Tr0. As described in the first embodiment, at switching time ts, model speed Vm and detected speed VFB match, and model position Xm and detected position XFB match, so that position compensation signal CX = 0. Therefore, the output of calculator 10a becomes zero. From the above, the torque command Tr(ts) for position control at switching time ts can be expressed by the following equation (15).
[0166]
[0167] In this way, by rewriting the value of delay device 10d with torque command initial value Tr0, motor control device 102 can determine torque command Tr(ts) for position control at switching time ts in accordance with torque command initial value Tr0.
[0168] The torque command initial value setting unit 23 of the third embodiment determines a torque command initial value Tr0 based on the torque command Tr2 during torque control. Specifically, when switching from torque control to position control, the torque command initial value setting unit 23 determines the torque command initial value Tr0 so that the torque command Tr2 for torque control and the torque command Tr1 for position control coincide with each other. The torque command Tr(ts) for position control at the time ts when switching from torque control to position control can be expressed by the above-mentioned equation (15). Therefore, if the torque command initial value setting unit 23 determines the torque command initial value Tr0 using the following equation (16), the torque command Tr2 for torque control and the torque command Tr(ts) for position control can coincide with each other.
[0169]
[0170] In the third embodiment, the torque command Tr1 for position control and the torque command Tr2 for torque control coincide at the time of switching, so that the switching of the switch 21 does not cause a sudden change in the movement of the object 7.
[0171] Note that if external disturbances such as friction on the object 7 are sufficiently small, the torque command Tr1 for position control will be an extremely small value. In other words, if external disturbances such as friction on the object 7 are sufficiently small, the object 7 can be driven with a small torque command Tr1, and therefore the motor control device 102 can switch to position control without suddenly changing the operation of the object 7, even without rewriting the value of the delay device 10d at the switching time ts.
[0172] Motor control device 102 of embodiment 3 does not calculate speed command Vr or model speed Vm. Therefore, position command initial value setting unit 13 of embodiment 3 refers to detected speed VFB, but does not refer to speed command Vr or model speed Vm, when determining position command initial value Xr0. That is, while position command initial value setting unit 13 of embodiments 1 and 2 sets position command initial value Xr0 by referring to model speed Vm, detected speed VFB, or speed command Vr, position command initial value setting unit 13 of embodiment 3 sets position command initial value Xr0 by referring only to detected speed VFB.
[0173] In the motor control device 102 of the third embodiment, the position control unit 6, the driving machine 14, the speed detection unit 11, the position detection unit 8, and the model initial value setting unit 12 also perform the same operations as those in the first and second embodiments.
[0174] In this way, motor control device 102 according to the third embodiment can suppress sudden changes in mechanical operation, similar to motor control device 101, even when switching from torque control to position control.
[0175] In the first to third embodiments, the non-position control is described as being speed control or torque control, but the non-position control may be sensorless control. In speed control, an encoder is used to detect the detected speed VFB, but in sensorless control, there is no sensor (speed detection unit 11) that measures the speed of the object 7, and the speed is estimated from the current and voltage.
[0176] The configurations shown in the above embodiments are merely examples, and may be combined with other known technologies, or different embodiments may be combined with each other. It is also possible to omit or modify parts of the configurations as long as they do not deviate from the gist of the invention.
[0177] 1 Speed command generation unit, 2 Position command generation unit, 2a, 2d, 5b, 5d1, 5d5, 6a, 10a, 10c, 10f, 10h, 10k Calculator, 2b Speed command calculation unit, 2c, 5a, 5d3, 5d4, 10b, 10l Gain, 2e, 5c, 5d2, 10d, 10j Delay unit, 2f, 4, 5e, 5f, 5g, 5h, 9, 10m, 21 Switch, 3 Switching command unit, 5A to 5C Reference model unit, 5d Low-pass filter, 6 Position control unit, 6b Position proportional gain, 7 Object, 8 Position detection unit, 10A, 10C Speed control unit, 10e Speed integral gain, 10g Speed proportional gain, 10i Acceleration gain, 11 Speed detection unit, 12 Model initial value setting unit, 13 Position command initial value setting unit, 14 Driving equipment, 22 torque command generation unit, 23 torque command initial value setting unit, 41 to 43, 51 to 56, 211 to 213 terminals, 101, 102 motor control device, CV speed compensation signal, CX position compensation signal, Ps position control section, Sw switching command, T reference model time constant, Tm model torque, Tr0 torque command initial value, Tr1 to Tr3 torque commands, V speed information, VFB detected speed, Vm model speed, Vr speed command, Vrx command speed, Vs speed control section, XFB detected position, XVr command, Xe command remaining distance, Xea actual remaining distance, Xm model position, Xm0 model position initial value, Xr position command, Xr0 position command initial value, Xt target stop position.
Claims
1. A motor control device that controls an object to be driven by switching between position control for the object and non-position control, which is a control mode different from the position control, a position command generating unit that generates a position command that is a command for the position control; a reference model unit that determines a model position indicating a position corresponding to the filtered position command by filtering the position command with a filter; a speed control unit that determines a first torque command for driving the object using a signal calculated based on a detected position, which is a position detected for the object, and the model position during the position control; and a model initial value setting unit that sets a model position initial value, which is a signal used when calculating the model position at the time of switching from the non-position control to the position control, based on the detected position at the time of switching from the non-position control to the position control; a position command initial value setting unit that sets a position command initial value based on the detected position at the time of switching, velocity information that is a signal related to the velocity of the object at the time of switching, and a transfer characteristic that is a characteristic of a transfer function of the filter; Equipped with the position command generating unit generates the position command at the time of the switching based on the position command initial value. A motor control device characterized by:
2. A non-position command generating unit that generates a non-position command that is a command for the non-position control, During the non-position control, a second torque command corresponding to the non-position command is output to a driving device that drives the object, for driving the object; the speed control unit outputs, at the time of switching, the first torque command corresponding to the position command at the time of switching to the driving device; 2. The motor control device according to claim 1.
3. The model initial value setting unit determining the model position initial value so that the model position at the time of switching coincides with the detected position at the time of switching; 2. The motor control device according to claim 1.
4. The position command initial value setting unit a time constant of the transfer function is used as the transfer characteristic, and the initial value of the position command is determined so that the position command at the time of switching coincides with the sum of the detected position at the time of switching and a multiplication result of the time constant multiplied by the velocity information at the time of switching; 2. The motor control device according to claim 1.
5. The position command generation unit determining the position command so that a command speed corresponding to a signal obtained by time-differentiating the position command at the time of switching coincides with the speed information at the time of switching; 5. The motor control device according to claim 1, wherein the motor control device comprises: a first input terminal for inputting a first current;
6. the non-position control is a velocity control for controlling a velocity of the object, the non-position command generation unit is a speed command generation unit that generates a speed command that is a command for the speed as the non-position command, the reference model unit determines a model speed indicating a speed corresponding to the speed command and the transfer characteristic; the speed control unit calculates the second torque command based on the model speed, and outputs the second torque command to the driving device during the non-position control.
3. The motor control device according to claim 2.
7. the position command initial value setting unit sets the position command initial value by using at least one of the velocity command, the model velocity, and a detected velocity which is a detected value of the velocity of the object as the velocity information at the time of the switching.
7. The motor control device according to claim 6.
8. The position command initial value setting unit a model position error, which is the difference between the time integral value of the model velocity and the time integral value of the velocity command, is used as the transfer characteristic, and the position command initial value is set so that the position command at the time of switching coincides with the sum of the detected position and the model position error.
7. The motor control device according to claim 6.
9. the non-position control is torque control that controls a torque of the object, the non-position command generation unit is a torque command generation unit that generates the second torque command as the non-position command, the torque command generation unit outputs the second torque command to the driving device during the non-position control.
3. The motor control device according to claim 2.
10. the position command initial value setting unit sets the position command initial value by using a detected speed, which is a detected value of the speed of the object, as the speed information at the time of the switching.
10. The motor control device according to claim 9.
11. a torque command initial value setting unit that sets a torque command initial value that is an initial value of the first torque command used when the first torque command at the time of the switching is generated, the speed control unit determines the first torque command at the time of the switching based on the torque command initial value.
11. The motor control device according to claim 10.
12. the torque command initial value setting unit sets the torque command initial value so that the first torque command at the time of the switching coincides with the second torque command at the time of the switching. The motor control device according to claim 11 .
13. A motor control device according to any one of claims 2 and 6 to 12; The driving device; The object; A motor control system comprising: