DC current limiting in FOC for PMSM
Ordinarily the battery current would not be limited except to disconnect or shut down to protect the battery. You could monitor the battery current and send a command to the FOC to reduce the limit setting if the battery current reaches a certain level. That would be somewhat problematic however because the battery current directly represents power and the motor current represents torque. At low motor speed, you can have maximum motor current with low battery current.