How can I determine which torque control method was used in velocity control?

Hi everyone, I am a college student and I am using this amazing library to do my assignment of Control theory.

I need to demonstrate how the PID parameters (of closed-loop velocity control) were determined in my paper, so I think I should get the transfer function of my BLDC motor first. I decided to achieve that goal by measuring the frequency response of the motor under closed-loop torque control.

So, to make sure what is the input of the system (which might be voltage or current accroding to this document), I need to know which torque control method was used in velocity control. But the document page of closed-loop velocity control only says The velocity control is created by adding a PID velocity controller to the torque control loop. :sob:

Thank you all in advance :bowing_man:.


By the way, according to the closed-loop velocity control document, the PID output could be current or voltage, dose it mean the PID output will be target current once the phase resistance is provided? (Since I really don’t know much about FOC and i believe my driver board don’t have current sensor built in :sob:)

And here is my code:

BLDCMotor motor = BLDCMotor(7 , 6.12, 295.1642857);
1 Like

Yes, if you provide the motor phase resistance, the PID operates on “estimated current”…

The velocity control loop uses the PID, which outputs a target current or voltage. If the phase resistance is known, then the output is a current, and this is then converted to the target voltage after the PID.

This target voltage (actually 2 voltages, Uq and Ud) are then passed to the FOC control loop. This loop does not use a PID. It takes the target Uq/Ud and the current rotor angle, and converts these (using inverse park/clarke) to the 3 phase voltages for the stator to keep the magnetic fields of rotor and stator orthogonal.

We call this method “torque-voltage” control because the currents are not measured and therefore we assume current is proportional to voltage. This assumption is ok for small motors / low power systems.

Does this answer your question?

Thanks for the reply!

I am sorry I didn’t make my question clear, I am still confusing about what dose the “Torque control loop” stands for in this box diagram, since there are four modes in Torque control loop.

I am sorry I should have put the image on the post, I didn’t know I can insert images at that time :tired_face:

Hey,

So the torque control loop is what I called the FOC loop in my post above. If you don’t have current sensing, then the current is just assumed to be proportional to voltage, and so the input current is converted to voltage according to V=IR and this is applied to the motor phases using the FOC clarke/parke transformations.
See also here: Torque control | Arduino-FOC

If you have current sensing, then there is another control loop with PIDs to regulate the current. This is what you see if you click on “FOC current mode” in the Torque Control | Arduino-FOC page:

I am now fully cleared of my question! :smiling_face: Thank you so much for your help!

Wouldn’t the best figure to use for calculating current from voltage include the frequency of the signal and the inductance? We would want to use the total impedance of the system divided by voltage, not just the resistance, I think. This won’t make any difference at smaller speeds where the frequency is low, but it should make a difference at higher speeds.
12 ohm motor with 1.3 mH inductance is at 100 hz(~100 rads per sec for a 7 pole motor ) is 12.11 ohm impedance so not a big difference
14.51 ohms at 1000 hz. more significant difference.

It still doesn’t account for my observations, I noticed during stall the motor current does not actually match ohms law drawn from motor.voltage and the impedance for some reason, I wasn’t clear why, or maybe my power supply current is not accurate or something.

A bigger concern with the assumption that voltage *resistance = torque is that it’s not factoring in back emf. Actual torque control should use the relevant figure coming out from the park transform, which factors in actual current, rotor angle and electrical angle. Shouldn’t it? Or one could use voltage, back emf and ohms law to calculate expected current at near optimal drive angle, and given the way things are happening in simpleFOC specifically, assuming the drive angle is optimal is ok I guess.

If you supply the motor KV value to the constructor, we also take estimated BEMF into account.

If you supply the phase inductance, we also do lag compensation.

Yes, and this is what happens if you have current sensing, but the OP was asking about the situation when you don’t have current sensing, and hence are working with the estimated current or voltage…

But you’re quite right that ideally the actual current should factor into it. Its just that this complicates things quite a bit, and isn’t really needed in practice for many small motor applications…

1 Like