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.

MCF8329A: How does MotorStudio measure the rotation speed for MCF8329A

Part Number: MCF8329A
Other Parts Discussed in Thread: MOTORSTUDIO

Tool/software:

Hello, I'm using MCF8329A to control a BLDC motor. Everything works fine so far, but the value for the Speed FDBK in MotorStudio window is about 4 times higher than a real speed value which I observe.

My BLDC Motor has 4 pole pairs (or 8 poles), so I guess the difference is related to this.

I don't find any pole settings in the datasheet except of FG_DIV in CLOSED_LOOP1 register, I tried to configure it there but without any changes of the measured values.

Where does this Speed FDBK value come from? How can i set something up so that it shows the correct value?

  • Hi Alex,

    Thanks for reaching out. Could you read the FG_SPEED_FDBK instead, after setting FG_DIV appropriately. 

    Do note that this variable is refreshed much slower compared to SPEED_FDBK.

    Regards,

    Sachin S

  • Hi Alex,

    Speed FDBK is per unit value, how are you converting? This is signed value.

    FG Feed back provided cycles , you can verify that as well.

    Can you share JSON and RSHUNT value?

    Thanks and Best Regards

    Venkatadri S

  • Hello Venkatadri,

    here is my JSON file, Rshunt is 1mOhm. Actually I don't convert the feedback value, I am working with MotorStudio, the question is how MotorStudio does measure this feedback. I can see, that FG_DIV can be configured for different amount of pole pairs, but does it affect another feedbacks?

    {
    "signature":"oneui-register-data",
    "data":[
    [
    {
    "idx":0,
    "id":"ISD_CONFIG",
    "value":"0x65A2D4E1",
    "addr":"0x00000080"
    },
    {
    "idx":1,
    "id":"REV_DRIVE_CONFIG",
    "value":"0x48300000",
    "addr":"0x00000082"
    },
    {
    "idx":2,
    "id":"MOTOR_STARTUP1",
    "value":"0x086650C0",
    "addr":"0x00000084"
    },
    {
    "idx":3,
    "id":"MOTOR_STARTUP2",
    "value":"0x2B81C007",
    "addr":"0x00000086"
    },
    {
    "idx":4,
    "id":"CLOSED_LOOP1",
    "value":"0x157181B8",
    "addr":"0x00000088"
    },
    {
    "idx":5,
    "id":"CLOSED_LOOP2",
    "value":"0x0AAD123A",
    "addr":"0x0000008A"
    },
    {
    "idx":6,
    "id":"CLOSED_LOOP3",
    "value":"0x50800000",
    "addr":"0x0000008C"
    },
    {
    "idx":7,
    "id":"CLOSED_LOOP4",
    "value":"0x485204B0",
    "addr":"0x0000008E"
    },
    {
    "idx":8,
    "id":"REF_PROFILES1",
    "value":"0x00000000",
    "addr":"0x00000094"
    },
    {
    "idx":9,
    "id":"REF_PROFILES2",
    "value":"0x00000000",
    "addr":"0x00000096"
    },
    {
    "idx":10,
    "id":"REF_PROFILES3",
    "value":"0x00000004",
    "addr":"0x00000098"
    },
    {
    "idx":11,
    "id":"REF_PROFILES4",
    "value":"0x00000000",
    "addr":"0x0000009A"
    },
    {
    "idx":12,
    "id":"REF_PROFILES5",
    "value":"0x00000000",
    "addr":"0x0000009C"
    },
    {
    "idx":13,
    "id":"REF_PROFILES6",
    "value":"0x00000000",
    "addr":"0x0000009E"
    }
    ],
    [
    {
    "idx":0,
    "id":"FAULT_CONFIG1",
    "value":"0x465A31A6",
    "addr":"0x00000090"
    },
    {
    "idx":1,
    "id":"FAULT_CONFIG2",
    "value":"0x71422888",
    "addr":"0x00000092"
    }
    ],
    [
    {
    "idx":0,
    "id":"INT_ALGO_1",
    "value":"0x0A86037D",
    "addr":"0x000000A0"
    },
    {
    "idx":1,
    "id":"INT_ALGO_2",
    "value":"0x020082E3",
    "addr":"0x000000A2"
    }
    ],
    [
    {
    "idx":0,
    "id":"PIN_CONFIG",
    "value":"0x40032308",
    "addr":"0x000000A4"
    },
    {
    "idx":1,
    "id":"DEVICE_CONFIG1",
    "value":"0x20100002",
    "addr":"0x000000A6"
    },
    {
    "idx":2,
    "id":"DEVICE_CONFIG2",
    "value":"0x03E8C00C",
    "addr":"0x000000A8"
    },
    {
    "idx":3,
    "id":"PERI_CONFIG1",
    "value":"0x2A9845C0",
    "addr":"0x000000AA"
    },
    {
    "idx":4,
    "id":"GD_CONFIG1",
    "value":"0x0100807B",
    "addr":"0x000000AC"
    },
    {
    "idx":5,
    "id":"GD_CONFIG2",
    "value":"0x00000400",
    "addr":"0x000000AE"
    }
    ],
    [
    {
    "idx":0,
    "id":"GATE_DRIVER_FAULT_STATUS",
    "value":"0x00000000",
    "addr":"0x000000E0"
    },
    {
    "idx":1,
    "id":"CONTROLLER_FAULT_STATUS",
    "value":"0x00000000",
    "addr":"0x000000E2"
    }
    ],
    [
    {
    "idx":0,
    "id":"ALGO_STATUS",
    "value":"0x0B610004",
    "addr":"0x000000E4"
    },
    {
    "idx":1,
    "id":"MTR_PARAMS",
    "value":"0x00000000",
    "addr":"0x000000E6"
    },
    {
    "idx":2,
    "id":"ALGO_STATUS_MPET",
    "value":"0x00000000",
    "addr":"0x000000E8"
    }
    ],
    [
    {
    "idx":0,
    "id":"ALGO_CTRL1",
    "value":"0x20000000",
    "addr":"0x000000EA"
    }
    ],
    [
    {
    "idx":0,
    "id":"ALGO_DEBUG1",
    "value":"0x80000000",
    "addr":"0x000000EC"
    },
    {
    "idx":1,
    "id":"ALGO_DEBUG2",
    "value":"0x00000018",
    "addr":"0x000000EE"
    },
    {
    "idx":2,
    "id":"CURRENT_PI",
    "value":"0x00280236",
    "addr":"0x000000F0"
    },
    {
    "idx":3,
    "id":"SPEED_PI",
    "value":"0x01480048",
    "addr":"0x000000F2"
    },
    {
    "idx":4,
    "id":"DAC_1",
    "value":"0x00000000",
    "addr":"0x000000F4"
    }
    ],
    [
    {
    "idx":0,
    "id":"ALGORITHM_STATE",
    "value":"0x00000000",
    "addr":"0x00000196"
    },
    {
    "idx":1,
    "id":"FG_SPEED_FDBK",
    "value":"0x00BEE3B6",
    "addr":"0x0000019C"
    },
    {
    "idx":2,
    "id":"BUS_CURRENT",
    "value":"0x00000000",
    "addr":"0x0000040E"
    },
    {
    "idx":3,
    "id":"PHASE_CURRENT_A",
    "value":"0xFFFC0000",
    "addr":"0x0000043C"
    },
    {
    "idx":4,
    "id":"PHASE_CURRENT_B",
    "value":"0x00080000",
    "addr":"0x0000043E"
    },
    {
    "idx":5,
    "id":"PHASE_CURRENT_C",
    "value":"0xFFFC0000",
    "addr":"0x00000440"
    },
    {
    "idx":6,
    "id":"CSA_GAIN_FEEDBACK",
    "value":"0x00000000",
    "addr":"0x00000450"
    },
    {
    "idx":7,
    "id":"VOLTAGE_GAIN_FEEDBACK",
    "value":"0x00000000",
    "addr":"0x00000458"
    },
    {
    "idx":8,
    "id":"VM_VOLTAGE",
    "value":"0x040B0000",
    "addr":"0x0000045C"
    },
    {
    "idx":9,
    "id":"PHASE_VOLTAGE_VA",
    "value":"0x02D93181",
    "addr":"0x00000460"
    },
    {
    "idx":10,
    "id":"PHASE_VOLTAGE_VB",
    "value":"0x02D93181",
    "addr":"0x00000462"
    },
    {
    "idx":11,
    "id":"PHASE_VOLTAGE_VC",
    "value":"0x02DCA850",
    "addr":"0x00000464"
    },
    {
    "idx":12,
    "id":"SIN_COMMUTATION_ANGLE",
    "value":"0x06AD19F0",
    "addr":"0x000004AA"
    },
    {
    "idx":13,
    "id":"COS_COMMUTATION_ANGLE",
    "value":"0x04635970",
    "addr":"0x000004AC"
    },
    {
    "idx":14,
    "id":"IALPHA",
    "value":"0xFFD10000",
    "addr":"0x000004CC"
    },
    {
    "idx":15,
    "id":"IBETA",
    "value":"0x000AF83B",
    "addr":"0x000004CE"
    },
    {
    "idx":16,
    "id":"VALPHA",
    "value":"0xFFB79D69",
    "addr":"0x000004D0"
    },
    {
    "idx":17,
    "id":"VBETA",
    "value":"0x00393012",
    "addr":"0x000004D2"
    },
    {
    "idx":18,
    "id":"ID",
    "value":"0xFFEE7B0D",
    "addr":"0x000004DC"
    },
    {
    "idx":19,
    "id":"IQ",
    "value":"0x002CEAAA",
    "addr":"0x000004DE"
    },
    {
    "idx":20,
    "id":"VD",
    "value":"0x00080AD3",
    "addr":"0x000004E0"
    },
    {
    "idx":21,
    "id":"VQ",
    "value":"0x005C063E",
    "addr":"0x000004E2"
    },
    {
    "idx":22,
    "id":"IQ_REF_ROTOR_ALIGN",
    "value":"0x00000000",
    "addr":"0x0000051A"
    },
    {
    "idx":23,
    "id":"SPEED_REF_OPEN_LOOP",
    "value":"0x00000000",
    "addr":"0x00000532"
    },
    {
    "idx":24,
    "id":"IQ_REF_OPEN_LOOP",
    "value":"0x02665D58",
    "addr":"0x00000542"
    },
    {
    "idx":25,
    "id":"SPEED_REF_CLOSED_LOOP",
    "value":"0x00000000",
    "addr":"0x000005D0"
    },
    {
    "idx":26,
    "id":"ID_REF_CLOSED_LOOP",
    "value":"0x00000000",
    "addr":"0x0000060A"
    },
    {
    "idx":27,
    "id":"IQ_REF_CLOSED_LOOP",
    "value":"0x00000000",
    "addr":"0x0000060C"
    },
    {
    "idx":28,
    "id":"ISD_STATE",
    "value":"0x00000005",
    "addr":"0x000006B0"
    },
    {
    "idx":29,
    "id":"ISD_SPEED",
    "value":"0x00000295",
    "addr":"0x000006BA"
    },
    {
    "idx":30,
    "id":"IPD_STATE",
    "value":"0x00000000",
    "addr":"0x000006E4"
    },
    {
    "idx":31,
    "id":"IPD_ANGLE",
    "value":"0x00000000",
    "addr":"0x0000071A"
    },
    {
    "idx":32,
    "id":"ED",
    "value":"0x00000000",
    "addr":"0x0000075C"
    },
    {
    "idx":33,
    "id":"EQ",
    "value":"0x00000000",
    "addr":"0x0000075E"
    },
    {
    "idx":34,
    "id":"SPEED_FDBK",
    "value":"0x00000000",
    "addr":"0x0000076E"
    },
    {
    "idx":35,
    "id":"THETA_EST",
    "value":"0x00000000",
    "addr":"0x00000774"
    }
    ]
    ]
    }

  • Hello Sachin,

    does it mean that SPEED_FDBK value is reported in MotorStudio as Speed FDBK? Does FG_DIV affect this value then?

  • Hi Alex,

    You are right, SPEED_FDBK is reported as Speed FDBK in MotorStudio. FG_DIV does not affect this value.

    Regards,
    Sachin S

  • Also FG_DIV affects the FG pin output frequency too.

  • Hello Sachin, thanks for your reply, now I understand what I observe. So if I want to get a right value, I have to divide it in my software and there is no possibility to compensate it internally?

  • Hi Alex,

    For SPEED_FDBK yes, but for FG_SPEED_FDBK you can use the FG_DIV to compensate as I mentioned before

    o if I want to get a right value, I have to divide it in my software and there is no possibility to compensate it internally
  • Hello Sachin, thank you for the clarification!

  • Alex, I was referring to the MOTORSTUDIO charts. The actual value of FG_SPEED_FDBK does not change. Apologies for the wrong information previously. 

    Thanks for reaching out. Could you read the FG_SPEED_FDBK instead, after setting FG_DIV appropriately. 

    Do note that this variable is refreshed much slower compared to SPEED_FDBK.