Skip to content

[FEATURE] Include motor inductance in voltage control. #246

Open
@dzid26

Description

@dzid26

I want to just lay out the foundation for a possible improvement, and also get feedback to verify the idea.

Issue

Lemma 1
Current is proportional to forward torque but only when its vector is at a 90-degree electrical angle.
Lemma 2
The current always lags the rotating voltage vector.

In the present Voltage control scheme, a 90-degree electrical angle is not maintained when speed increases.
Currently, this is the control scheme

else voltage.q = target*phase_resistance + voltage_bemf;
voltage.q = _constrain(voltage.q, -voltage_limit, voltage_limit);
voltage.d = 0;
:
Vd=0
Vq=BEMF+ Itarget R
image
(Source)

Proposal

The voltage vector must be phase-shifted to compensate for the current vector lag. Since Park transform is already implemented, the phase lead angle can happen naturally by manipulating Vd. (White vector below)
The control should look like this:
image
Setting Vd=-Itarget * ω*RL will shift the effective current target vector to the desired 90deg. Only then will this current be proportional to torque.
ω is the electrical angular speed in rad/s. I.e. shaft speed * poles_pairs.
If the combined motor inductance RL is unknown, it can be set to 0.
From what I know, coil inductance can be an approximation of motor inductance, but I don't know how good. On the other hand, RLcan be found experimentally presumably by optimizing the value for maximum motor power.

References:

https://docs.simplefoc.com/voltage_torque_mode#voltage-control-with-current-estimation-and-back-emf-compensation
https://endless-sphere.com/sphere/threads/tsdz2-mid-drive-with-860c-850c-or-sw102-displays-only-flexible-opensource-firmware-casainho-code-only.93818/post-1376865
https://github.com/EGG-electric-unicycle/documentation/blob/master/Shane_Colton/3phduo.pdf - page 27.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions