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.

CCS/TMS320F28054F: _IQ in Motorware Lab Documentation

Part Number: TMS320F28054F
Other Parts Discussed in Thread: MOTORWARE, CONTROLSUITE

Tool/software: Code Composer Studio

The Motorware Lab User Guides mention using _IQ throughout the labs.  For example, on page 29 of the first manual, it shows the code setting pDacData->offset and pDacData->gain values.as part of step 2a, set the right offset and gain for each PWMDAC channel in proj_lab01bc and hal.c   The values shown are as they are in the source code with no hint whether we should change them or use them as is.  We are used to using V/Hz so this is a bit confusing.   In addition if our cpu has floating point, how are these assignments being ignored to use floating point math sinch it isn't mentioned in the manual?

  • The IQ values can represent some variables in actual terms, such as SpeedRef_krpm, or as a per-unitized value. The compiler will take care of converting the _IQ variables to float when setting some #defines in the labs. More on that process is explained in section 3.11 of the IQ math quickstart guide located in ControlSUITE here: C:\ti\controlSUITE\libs\math\IQmath\v160\doc

    Certain variables that represent the hardware (feedback poles, ADC offsets, etc) should most likely not be changed unless experimenting in certain InstaSPIN labs. The DacData should not need to be changed unless stated in the lab guide. Some of the future labs will ask you to manipulate variables in IQ format, and should give details as to whether they're per-unitized for full-scale

    Sean
  • Thanks for the reply.   My main concern is the MotorWare lab manuals don't make it clear if you are supposed to change any of the _IQ settings or not when it describes those sections for the labs.  Lab 01b is an example.   We have been concentrating on the user.h settings which are not IQ values.  If I find out some should be changed, then I will study the IQ math formulas.  Otherwise my only concern would be avoiding number overflow when they get converted from floating point.

  • In addition of above as asked Sean, motorware uses Per Unit values so you don't need to study IQ while changing the variable. The base value is equivalent to 1 (floating point ) and _IQ(1) in IQ math. But yes while change the value need to be careful with whole code.
  • I apologize, let me clarify - we typically use IQ24, because that is the format the library was compiled to use. That said, you can change the IQ format to another base when used for intermediate calculations. You will need to format the value in IQ24 values when presenting them to the estimator (ie when calling EST_run() )

    Sean