This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

sensorless control of pmsm motor

Hi,

I am working on sensorless control of pmsm motor by estimating speed from stationary currents.  I bought SMC75 EVM kit from Syncworks. The company gave me one practice code for PID controller of PMSM motor using IQ math library. Now I changed the code  by adding SMO(sliding mode observer) module to the existing code for sensorless control. Here when I built the code it saying that

1)" undefined symbols _IQ,_IQ21"

2)" undefined symbols remain"

3)"errors encountered during linking"

but IQ math library header file is already existed in the PID controller file.

Can someone help on this issue.

regards,

Suneel

  • The linker found some references (probably function calls) to the symbols _IQ and _IQ21.  But it never found any definition (i.e. the main function body) of those symbols.  You need to determine how _IQ and _IQ21 should be defined, and supply those definitions.  I'm not familiar with the IQ math library.  But it is a good guess those symbols are not actually functions, but macros from some header file.  If I'm right, then the fix is to include that header file in all the files that invoke  _IQ and _IQ21.

    Thanks and regards,

    -George

  • Hi,

    I already defined IQ math header file "IQmath.h", but it shows the same error.

    Regards,

    Suneel

     

  • What are _IQ and _IQ21?  Are they macros that are defined in IQmath.h, or some header file included by IQmath.h?  Or, are they ordinary C functions?  If they are ordinary C functions, where is the source for those functions?

    Thanks and regards,

    -George

     

  • _IQ and _IQ21 are typedefs in the IQmathLib.h

    I think you'd have to add the search path to these libraries in your compiler. In Code Composer Studio, go to your project's build properties, File search path and then add the path to the IQ math directory. 

    Once this is done, your #include IQmathLib.h should work.