long meiFilterPostfilterSectionGet(MPIFilter             filter,
                                   long                  sectionNumber,
                                   MEIPostfilterSection  *section);

Required Header: stdmei.h


meiFilterPostfilterSectionGet reads the configuration of a single section of an MPIFilter object's postfilter. It writes to *section the configuration of filter's postfilter sectionNumberth section.

The MPI calculates the post filter coefficients and takes into consideration the sample rate of the controller at that time. If you change the sample rate of the controller, you will need to recalculate the post filters. This can be done for all filters specified in Hertz by setting the filters again with the MPI. The MPI will calculate the filters using the current servo sample rate.

Postfilters are used to digitally filter the output of a control loop. One common use for postfilters is the compensation of system resonances.

filter the handle of the MPIFilter object whose postfilter section configuration is to be read.
sectionNumber the index of the postfilter section whose configuration is to be read.
section the data location where the postfilter's current section configuration data will be written.
Return Values

Sample Code

/*   Test a section of a MPIFilter object's postfilter to 
     see if it is a notch type. 
     Sample usage:   

     returnValue =        
         isSectionTypeNotch(filter, 0, &isNotch);
long isSectionTypeNotch(MPIFilter filter, long sectionIndex, long* isNotch)
    MPIFilterConfig config;    
    MEIPostfilterSection section;    
    long returnValue = (isNotch==NULL) ? MPIMessageARG_INVALID : MPIMessageOK; 

    if (returnValue == MPIMessageOK)    
        returnValue =            
            meiFilterPostfilterSectionGet(filter, sectionIndex, §ion);
        if (returnValue == MPIMessageOK)        
            *isNotch = (section.type == MEIFilterTypeNOTCH) ? TRUE : FALSE; 

     return returnValue;

See Also

MEIPostfilterSection | meiFilterPostfilterGet | meFilterPostfilterSectionSet | MEIMaxBiQuadSections | Post Filter Theory


       Legal Notice  |  Tech Email  |  Feedback
Copyright ©
2001-2021 Motion Engineering