PMAC/PMAC2 V1.17C A DDENDUM J UL -2005 ACC-14P Port Entries … Low-Pass Filter Entries ($D): The $D entry is used to create one of two types of low-pass filters on a word of input data to provide smoothing of noisy measurements. The two types of filter are distinguished by bit 19 of the first setup line of the entry. If bit 19 is 0, making the second hex digit $0, the filter is a simple exponential filter. If bit 19 is 1, making the second hex digit $8, the filter is a more sophisticated tracking filter that includes an integrator to eliminate steady-state errors.
The simpler exponential filter, which is a three-line entry in the table, is suitable for the smoothing of noisy master data used for electronic gearing (position following) or electronic cams (external time base). However, it will produce lags even in the steady state (e.g. at constant velocity), so it is usually not suitable for smoothing servo feedback data because of the delays it introduces. The more complex tracking filter, which is a five-line entry in the table, is suitable for smoothing either master data or feedback data, because its integrator eliminates steady-state errors. Still, its filtering can introduce delays in responding to dynamic changes (e.g.
accelerations), so it needs to be set up carefully. This software tracking filter is dynamically equivalent to the hardware tracking filters common in resolver-to-digital converter ICs. It is commonly used to smooth the results of direct conversion of sinusoidal encoders and resolvers. Exponential Filter ($D0xxxx) The equation of the exponential filter executed every servo cycle n is: If [In(n) - In(n-1)] > Max_change, In(n) = In(n-1) + Max_change If [In(n) - In(n-1)] Out(n) = Out(n-1) + (K/2 23 )*[In(n)-Out(n-1)] In , Out , and K are all signed 24-bit numbers (range -8,388,608 to 8,388,607). The difference [In(n)-Out(n-1)] is truncated to 24 bits to handle rollover properly.
The time constant of the filter, in servo cycles, is (2 23 /K)-1. The lower the value of K, the longer the time constant. V1.17C Firmware Version 19 ACC 14 # Port Entry ACC 14 # Port Entry 1 A $35FFD0 4 A $35FFE8 1 B $35FFD3 4 B $35FFEB 1 C $36FFD0 4 C $36FFE8 1 D $36FFD3 4 D $36FFEB 2 A $35FFD8 5 A $35FFF0 2 B $35FFDB 5 B $35FFF3 2 C $36FFD8 5 C $36FFF0 2 D $36FFDB 5 D $36FFF3 3 A $35FFE0 6 A $35FFF8 3 B $35FFE3 6 B $35FFFB 3 C $36FFE0 6 C $36FFF8 3 D $36FFE3 6 D $36FFFB