Processor, motor control device and control method for controlling motor
Abstract
A processor for controlling a motor, a motor control device and a control method therefore are provided. The processor includes a feedback calculator, a control calculator and a drive calculator. The feedback calculator calculates a direct-axis current and a quadrature-axis current according to a drive current driving a motor and an operating angle of the motor. The control calculator includes a reinforcement learning controller. The reinforcement learning controller uses a reinforcement learning algorithm to calculate a direct-axis voltage and a quadrature-axis voltage according to a quadrature-axis current command, the direct-axis current and the quadrature-axis current. The quadrature-axis current command is obtained according to a reference rotational speed and the operating speed of the motor. The drive calculator generates a switching signal according to the direct-axis voltage, quadrature-axis voltage and an operating angle of the motor. The switching signal is used to control a driving circuit to drive the motor.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1 . A processor for controlling a motor, comprising:
a feedback calculator, calculating a direct-axis current and a quadrature-axis current according to a drive current configured to drive the motor and an operating angle of the motor; a control calculator, coupled to the feedback calculator, the control calculator comprising a reinforcement learning controller, wherein the reinforcement learning controller uses a reinforcement learning algorithm to calculate a direct-axis voltage and a quadrature-axis voltage according to a quadrature-axis current command, the direct-axis current, and the quadrature-axis current, wherein the quadrature-axis current command is obtained according to a reference rotational speed and an operating speed of the motor; and a drive calculator, coupled to the control calculator, generating a switching signal according to the direct-axis voltage, the quadrature-axis voltage, and the operating angle, wherein the switching signal is configured to control a driving circuit to drive the motor.
2 . The processor according to claim 1 , wherein the reinforcement learning algorithm uses the direct-axis current, the quadrature-axis current, a direct-axis current error value, and a quadrature-axis current error value as observation item of the reinforcement learning algorithm, uses a previous one of the direct-axis voltage and the quadrature-axis voltage as action item of the reinforcement learning algorithm, calculates a current reward according to a corresponding data of the observation item and the action item based on a reward equation, and calculates an estimated action item according to the observation item, the current reward, and completed data based on a decision equation in the reinforcement learning algorithm and a reinforcement learning control training algorithm, wherein the estimated action item comprises the direct-axis voltage and the quadrature-axis voltage.
3 . The processor according to claim 2 , wherein the reward equation is:
rt
=
-
(
Q
1
×
iderror
2
+
Q
2
×
iqerror
2
+
R
×
∑
j
(
u
t
-
1
j
)
2
)
wherein, iderror is the direct-axis current error value, iqerror is the quadrature-axis current error value, Q1, Q2 and R are default parameters, and rt is the current reward.
4 . The processor according to claim 1 , wherein training steps of the reinforcement learning control training algorithm comprises:
selecting a first action, the first action comprising current state and random noise; executing a second step, the second step comprising executing the second action to generate an action value, calculating the current reward based on the reward equation, calculating a corresponding state of a next observation item as state data, and storing the current state, the action value, the current reward and the state data as a set of training patterns; executing the second step multiple times to randomly generate multiple sets of training patterns; calculating a plurality of value function targets based on the sets of training patterns; and correcting comment parameters in a neural network based on the sets of training patterns and the value function targets to train the reinforcement learning control training algorithm.
5 . The processor according to claim 1 , wherein the control calculator further comprises:
a pseudo-derivative feedback with feedforward gain controller, coupled to the reinforcement learning controller and calculating the quadrature-axis current command according to the reference rotational speed and the operating speed of the motor.
6 . The processor according to claim 5 , wherein the pseudo-derivative feedback with feedforward gain controller calculates the quadrature-axis current command according to a following equation:
iqref
=
(
Wref
-
W
)
×
(
KI
1
-
Z
-
1
+
r
×
Kpf
)
+
W
×
(
r
-
1
)
×
Kpf
wherein, W is the operating speed of the motor, Wref is the reference rotational speed, r is a feedforward proportional coefficient, Kpf is a feedback proportional gain, KI is an integral gain, Z −1 is a Z conversion value, and iqref is the quadrature-axis current command.
7 . The processor according to claim 1 , wherein the reinforcement learning algorithm is twin delayed deep deterministic policy gradients (TD3) algorithm.
8 . The processor according to claim 1 , wherein the feedback calculator comprises:
a Clarke transformation controller, converting the drive current located in a time domain coordinate system into a first current and a second current located in an orthogonal stationary coordinate system; and a Park transformation controller, coupled to the Clarke transformation controller, converting the first current and the second current located in the orthogonal stationary coordinate system into the direct-axis current and the quadrature-axis current located in an orthogonal rotational coordinate system.
9 . The processor according to claim 7 , wherein the drive calculator comprises:
a Park inverse transformation controller, converting the direct-axis voltage and the quadrature-axis voltage located in the orthogonal rotational coordinate system into a first voltage and a second voltage located in the orthogonal stationary coordinate system; and a Clarke inverse transformation controller, coupled to the Park inverse transformation controller, converting the first voltage and the second voltage located in the orthogonal stationary coordinate system into the switching signal.
10 . The processor according to claim 1 , further comprising:
a zero current supplier, coupled to the reinforcement learning controller, configured to provide zero current as a direct-axis current command, wherein the reinforcement learning controller uses the reinforcement learning algorithm to calculate the direct-axis voltage and the quadrature-axis voltage according to the quadrature-axis current command, the direct-axis current command, the direct-axis current, and the quadrature-axis current.
11 . A motor control device, comprising:
a processor; a driving circuit, coupled to the processor and controlled by the processor to drive a motor; and a sensor, coupled to the processor, configured to sense an operating speed of the motor and an operating angle, wherein the processor controls the driving circuit according to a drive current of the driving circuit, the operating speed of the motor and the operating angle, wherein the processor comprises:
a feedback calculator, calculating a direct-axis current and a quadrature-axis current according to the drive current and the operating angle of the motor;
a control calculator, coupled to the feedback calculator, the control calculator comprising a reinforcement learning controller, wherein the reinforcement learning controller uses a reinforcement learning algorithm to calculate a direct-axis voltage and a quadrature-axis voltage according to a quadrature-axis current command, the direct-axis current, and the quadrature-axis current, wherein the quadrature-axis current command is obtained according to a reference rotational speed and the operating speed of the motor; and
a drive calculator, coupled to the control calculator, generating a switching signal according to the direct-axis voltage, the quadrature-axis voltage, and the operating angle, wherein the switching signal is configured to control the driving circuit.
12 . The motor control device according to claim 11 , wherein the reinforcement learning controller uses the reinforcement learning algorithm to calculate the direct-axis voltage and the quadrature-axis comprises:
using the direct-axis current, the quadrature-axis current, a direct-axis current error value, and a quadrature-axis current error value as observation item of the reinforcement learning algorithm; using a previous one of the direct-axis voltage and the quadrature-axis voltage as action item of the reinforcement learning algorithm; calculating a current reward according to a corresponding data of the observation item and the action item based on a reward equation; and calculating an estimated action item according to the observation item, the current reward, and completed data based on a reinforcement learning control training algorithm, wherein the estimated action item comprises the direct-axis voltage and the quadrature-axis voltage.
13 . The motor control device according to claim 12 , wherein the reward equation is:
rt
=
-
(
Q
1
×
iderror
2
+
Q
2
×
iqerror
2
+
R
×
∑
j
(
u
t
-
1
j
)
2
)
wherein, iderror is the direct-axis current error value, iqerror is the quadrature-axis current error value, Q1, Q2 and R are default parameters, and rt is the current reward.
14 . The motor control device according to claim 13 , wherein training of the reinforcement learning control training algorithm comprises:
selecting a first action, the first action comprising current state and random noise; executing a second step, the second step comprising executing the second action to generate an action value, calculating the current reward based on the reward equation, calculating a corresponding state of a next observation item as state data, and storing the current state, the action value, the current reward and the state data as a set of training patterns; executing the second step multiple times to randomly generate multiple sets of training patterns; calculating a plurality of value function targets based on the sets of training patterns; and correcting comment parameters in a neural network based on the sets of training patterns and the value function targets to train the reinforcement learning control training algorithm.
15 . The motor control device according to claim 11 , wherein the control calculator further comprises:
a pseudo-derivative feedback with feedforward gain controller, coupled to the reinforcement learning controller and calculating the quadrature-axis current command according to the reference rotational speed and the operating speed of the motor.
16 . The motor control device according to claim 15 , wherein the pseudo-derivative feedback with feedforward gain controller calculates the quadrature-axis current command according to a following equation:
iqref
=
(
Wref
-
W
)
×
(
KI
1
-
Z
-
1
+
r
×
Kpf
)
+
W
×
(
r
-
1
)
×
Kpf
wherein, W is the operating speed of the motor, Wref is the reference rotational speed, r is a feedforward proportional coefficient, Kpf is a feedback proportional gain, KI is an integral gain, Z −1 is a Z conversion value, and iqref is the quadrature-axis current command.
17 . The motor control device according to claim 11 , wherein the reinforcement learning algorithm is twin delayed deep deterministic policy gradients (TD3) algorithm.
18 . A control method for a motor, comprising:
sensing operating speed and operation angle of the motor; calculating a direct-axis current and a quadrature-axis current according to a drive current driving the motor and an operating angle; calculating a direct-axis voltage and a quadrature-axis voltage according to a quadrature-axis current command, the direct-axis current, and the quadrature-axis current by using a reinforcement learning algorithm, wherein the quadrature-axis current command is obtained according to a reference rotational speed and the operating speed of the motor; and generating a switching signal according to the direct-axis voltage, the quadrature-axis voltage and the operating angle, wherein the switching signal is configured to control a driving circuit to drive the motor.
19 . The control method according to claim 18 , wherein calculating the direct-axis voltage and the quadrature-axis voltage according to the quadrature-axis current command, the direct-axis current, and the quadrature-axis current by using the reinforcement learning algorithm comprises:
using the direct-axis current, the quadrature-axis current, a direct-axis current error value, and a quadrature-axis current error value as observation item of the reinforcement learning algorithm; using a previous one of the direct-axis voltage and the quadrature-axis voltage as action item of the reinforcement learning algorithm; calculating a current reward according to a corresponding data of the observation item and the action item based on a reward equation; and calculating an estimated action item according to the observation item, the current reward, and completed data based on a reinforcement learning control training algorithm, wherein the estimated action item comprises the direct-axis voltage and the quadrature-axis voltage.
20 . The motor control device according to claim 19 , wherein training of the reinforcement learning control training algorithm comprises:
selecting a first action, the first action comprising current state and random noise; executing a second step, the second step comprising executing the second action to generate an action value, calculating the current reward based on the reward equation, calculating a corresponding state of a next observation item as state data, and storing the current state, the action value, the current reward and the state data as a set of training patterns; executing the second step multiple times to randomly generate multiple sets of training patterns; calculating a plurality of value function targets based on the sets of training patterns; and correcting comment parameters in a neural network based on the sets of training patterns and the value function targets to train the reinforcement learning control training algorithm.Join the waitlist — get patent alerts
Track US2025175107A1 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.