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.

Where is the explanation document for First Order Filter in the MotorWare Lib

Other Parts Discussed in Thread: MOTORWARE, TMS320F28069M

Hi,

I used the first order filter in the MotorWare Lib as following:

MCU: TMS320F28069M

Library: MotorWare 1.01.00.13

in configuration code

// Sine
 FILTER_FO_setDenCoeffs(obj->filterFoHandleA0,_IQ(0.01));
 FILTER_FO_setInitialConditions(obj->filterFoHandleA0, _IQ(0.0), _IQ(0.0));
 FILTER_FO_setNumCoeffs(obj->filterFoHandleA0, _IQ(1.0), _IQ(1.0));

in using adc code

A0value = FILTER_FO_run(obj->filterFoHandleA0, A0value);

I don't understand how to set parameter values, because I didn't find the intruction manual for Filter in MotorWare Lib.

I just put the each value by testing without understanding.

Where is the explanation document for First Order Filter in the MotorWare?

I want to understand how to tune the values with calculation like 1MHz low pass filter.

  • in latest release MotorWare 15 there are some new simplified projects which show you all the CTRL code. You can see how this is set-up

    // initialize and configure offsets using filters
    {
    uint16_t cnt = 0;
    _iq b0 = _IQ(gUserParams.offsetPole_rps/(float_t)gUserParams.ctrlFreq_Hz);
    _iq a1 = (b0 - _IQ(1.0));
    _iq b1 = _IQ(0.0);

    for(cnt=0;cnt<6;cnt++)
    {
    filterHandle[cnt] = FILTER_FO_init(&filter[cnt],sizeof(filter[0]));
    FILTER_FO_setDenCoeffs(filterHandle[cnt],a1);
    FILTER_FO_setNumCoeffs(filterHandle[cnt],b0,b1);
    FILTER_FO_setInitialConditions(filterHandle[cnt],_IQ(0.0),_IQ(0.0));
    }

    gMotorVars.Flag_enableOffsetcalc = false;
    }