I am currently implementing a filter in RSI on axes positions using ST_IIRFILTER. The system is working reasonably well, and is producing graphs (see attached). a4 is the position of the A4 axis, and a4_f is the filtered position.I have not yet tuned the filter, so I'm not concerned about the accuracy yet. However, I am having initial condition difficulties with the filter. See attached documentation from RSILIB.SRC file on ST_IIRFILTER.
Versions:
I am using RSILIB v2.1.1, and software version V5.6.12.
Problem:
The initial conditions of the filter are currently starting at 0, which is not where the axes start. this means that the filter needs some period of time to "catch up" to the axes, and correct the initial offset.
Question:
Is there a way to specify the initial conditions for the RSI IIR_FILTER block? Is it related to RSI object initial conditions in general?
Alternately: Is it not worth solving, and I should add a "calibrating delay" at the beginning of my program?
;************************************* ST_IIRFILTER ***********
;# Function:
;# ST_IIRFILTER
;#
;# Description:
;# Creates a RSI object with IIR filter functionality.
;#
;# Declaration:
;# GLOBAL DEFFCT RSIERR ST_IIRFILTER(OBJID:OUT,CONTID:IN,ID1:IN,IDX1:IN,TYPE:IN,NAME:IN,ORDER:IN,CUTOFFFREQ:IN)
;#
;# Parameters:
;# OUT OBJID (INT): ID of the created RSI object
;# IN CONTID (INT): ID of container for the new object
;# IN ID1 (INT): ID of the object to link to input 1
;# IN IDX1 (INT): Output index of ID1 to link to input 1
;# IN TYPE (INT): Type of filter
;# -> 0: Lowpass
;# -> 1: Highpass
;# IN NAME (INT):
;# -> 0: Bessel
;# -> 1: Butterworth
;# -> 2: Tschebyscheff with ripple 0.5 db
;# -> 3: Tschebyscheff with ripple 1 db
;# -> 4: Tschebyscheff with ripple 2 db
;# -> 5: Tschebyscheff with ripple 3 db
;# IN ORDER (INT) 2,4,6,8,10
;# IN CUTFREQ (REAL):Cutoff frequency in [Hz]
;#
;# Object Parameters:
;# 1: RESET (BOOL): Reset the internal values
;#
;# Object Inputs:
;# 1 (REAL): input signal 1
;#
;# Object Outputs:
;# 1 (REAL): output signal 1
;#
;# Return Type:
;# RSIERR
;#
;# Return Values:
;# RSIOK: Successful
;# RSIINVCONT: Invalid container
;# RSICONTOVERFLOW: Container overflow
;# RSILNKOUTOBJ: Invalid ID for linkage
;# RSILNKOUTINDEX: Invalid index for linkage
;# RSILNKSIGNAL: Input output signal mismatch
;# RSILNKCYCLE: Cyclic linkage
;# RSINOLNKOBJ: Object not linkable
Display More