.

meiFilterPosfilterSectionSet

Declaration

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

Required Header: stdmei.h

Description

meiFilterPostfilterSectionSet sets the configuration of a single section of an MPIFilter object's postfilter. It sets filter's postfilter sectionNumberth section to the configuration specified in *section. If the postfilter type is IIR, then this method is essentially equivalent to meiFilterPostfilterSet().

The MPI calculates the post filter coefficients taking into consideration the sample rate of the controller at that time. If you change the change the sample rate of the controller, you will need to recalculate your post filters. This can be done for all filters specified in Hertz by setting the filters again using 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 set.
sectionNumber the index of the postfilter section whose configuration is to be set.
*section the data location of the section configuration to copy to the controller.
   
 
Return Values
MPIMessageOK  

Sample Code


/*   Set a section of a MPIFilter object's postfilter 
     to a unity gain filter type.   
     Sample usage:   

     returnValue =        
         setSectionTypeUnityGain(filter, 3);
*/
long setSectionTypeUnityGain(MPIFilter filter, long sectionIndex)
{
    MPIFilterConfig config;    
    MEIPostfilterSection section;    
    long returnValue;    

    section.type = MEIFilterTypeUNITY_GAIN;    
    section.form = MEIFilterFormBIQUAD;    

    returnValue =       
        meiFilterPostfilterSectionSet(filter, sectionIndex, §ion);    

    return returnValue;
}

See Also

MEIPostfilterSection | meiFilterPostfilterSet | meFilterPostfilterSectionGet | MEIMaxBiQuadSections | Post Filter Theory

 

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