DCMotor to use for CTRE simulation

For simulation in what context should I use an FOC version of DCMotor like DCMotor.getKrakenX60FOC(1) vs a non FOC like DCMotor.getKrakenX60(1).

Here is my thinking:
If I use voltage control, and set enableFOC to false then I would certainly use the non FOC DCMotor.

If I use FOC voltage control with the TorqueCurrentFOC requests in their API then I would assume I would use the FOC version of the DCMotor.

If I use the voltage control API, but enable FOC to true then do I use the FOC DCMotor or the non FOC DCMotor?

I understand that I would have to get Closed Loops constants in the units of the control setup I’m using either way, but I’m not sure about the DCMotor side of things.

Use DCMotor.getKrakenX60FOC(1).

FOC improves motor torque by keeping the motor’s magnetic field perfectly aligned with the rotor’s position. It improves the performance of the motor even if you’re requesting for a voltage output.

1 Like

I think you’re just overthinking things.

If you have Phoenix Pro, use the FOC model, if not then use the regular one.

Possibly, but fundamentally there are 3 ways to simulate a CTRE motor based on its different control modes from what catrix just pointed out.

Voltage - enableFOC=False: DCMotor is Not FOC
Voltage - enableFOC-True: DCMotor is FOC
TorqueCurentFOC: DCMotor is FOC

I would argue either way no matter what combo you use to characterize them individually.

I guess the real question is, when/why are you disabling FOC when you have Phoenix Pro?

Regardless of control mode used.

I think CTRE’s documentation gave some vague example as to when to use FOC with voltage control.

Suffice it to say if you are using voltage control on a CTRE motor enableFOC is set to true by default. I’m assuming it’s ignored if you don’t have PRO. Since I noticed that I thought it would be good to clarify the issue with which DCMotor to use while simulating

I don’t think I’ve seen anywhere in CTRE’s documentation that suggests a use case for disabling FOC. Could you point out where you saw that?