29
Filter Examples Lab View William Rose Department of Kinesiology and Applied Physiology

Filter Examples Lab View William Rose Department of Kinesiology and Applied Physiology

Embed Size (px)

Citation preview

Page 1: Filter Examples Lab View William Rose Department of Kinesiology and Applied Physiology

Filter Examples Lab View

William Rose

Department of Kinesiology and Applied Physiology

Page 2: Filter Examples Lab View William Rose Department of Kinesiology and Applied Physiology

Department of Kinesiology and Applied Physiology

filter1.vi

Page 3: Filter Examples Lab View William Rose Department of Kinesiology and Applied Physiology

Department of Kinesiology and Applied Physiology

filter1.vi

Page 4: Filter Examples Lab View William Rose Department of Kinesiology and Applied Physiology

Department of Kinesiology and Applied Physiology

filter1.vi

Zoom in to beginning to see filter edge effects.

Page 5: Filter Examples Lab View William Rose Department of Kinesiology and Applied Physiology

Department of Kinesiology and Applied Physiology

Page 6: Filter Examples Lab View William Rose Department of Kinesiology and Applied Physiology

Department of Kinesiology and Applied Physiology

filter2.vi

Similar to filter1.vi, but uses Zero Phase.vi.

Page 7: Filter Examples Lab View William Rose Department of Kinesiology and Applied Physiology

Department of Kinesiology and Applied Physiology

Page 8: Filter Examples Lab View William Rose Department of Kinesiology and Applied Physiology

Department of Kinesiology and Applied Physiology

Page 9: Filter Examples Lab View William Rose Department of Kinesiology and Applied Physiology

Department of Kinesiology and Applied Physiology

Page 10: Filter Examples Lab View William Rose Department of Kinesiology and Applied Physiology

Department of Kinesiology and Applied Physiology

Page 11: Filter Examples Lab View William Rose Department of Kinesiology and Applied Physiology

Department of Kinesiology and Applied Physiology

Another example of edge effects.

Page 12: Filter Examples Lab View William Rose Department of Kinesiology and Applied Physiology

Department of Kinesiology and Applied Physiology

Another example of edge effects at each end of a data record.

Page 13: Filter Examples Lab View William Rose Department of Kinesiology and Applied Physiology

Department of Kinesiology and Applied Physiology

Fix for Filter Edge Effects Problem

1.Extend the record by adding a segment of time-reversed, inverted-about-the-endpoint data on each end.

2.Filter the extended record.

3.Cut off the extended parts.

4.extend_data.vi does step 1.

Page 14: Filter Examples Lab View William Rose Department of Kinesiology and Applied Physiology

Department of Kinesiology and Applied Physiology

extend_data.vi

Page 15: Filter Examples Lab View William Rose Department of Kinesiology and Applied Physiology

Department of Kinesiology and Applied Physiology

extend_data_test.vi

Page 16: Filter Examples Lab View William Rose Department of Kinesiology and Applied Physiology

Department of Kinesiology and Applied Physiology

Page 17: Filter Examples Lab View William Rose Department of Kinesiology and Applied Physiology

Department of Kinesiology and Applied Physiology

filter3.vi

filter3.vi calls extend_data.vi to extend the raw data, then filters the extended data, then cuts off the extended parts.

Page 18: Filter Examples Lab View William Rose Department of Kinesiology and Applied Physiology

Department of Kinesiology and Applied Physiology

filter3.vi

Page 19: Filter Examples Lab View William Rose Department of Kinesiology and Applied Physiology

Department of Kinesiology and Applied Physiology

Page 20: Filter Examples Lab View William Rose Department of Kinesiology and Applied Physiology

Department of Kinesiology and Applied Physiology

No more edge problems.

filter3.vi

Page 21: Filter Examples Lab View William Rose Department of Kinesiology and Applied Physiology

Department of Kinesiology and Applied Physiology

filter1.m

Page 22: Filter Examples Lab View William Rose Department of Kinesiology and Applied Physiology

Department of Kinesiology and Applied Physiology

filter1.m

Page 23: Filter Examples Lab View William Rose Department of Kinesiology and Applied Physiology

Department of Kinesiology and Applied Physiology

filter1.mZoomed-in view of start

Page 24: Filter Examples Lab View William Rose Department of Kinesiology and Applied Physiology

Department of Kinesiology and Applied Physiology

Phase-less Philtering•Use filtfilt.m in Matlab.

•Labview routine filter2.vi does forward –backward filtering with Zero Phase.vi, but it has edge effects at start and finish.

•We do not give a Matlab analog to filter2.vi, because, by default, Matlab’s forward-backward filter (filtfilt.m) eliminates edge effects.

Page 25: Filter Examples Lab View William Rose Department of Kinesiology and Applied Physiology

Department of Kinesiology and Applied Physiology

filter3.mHighlighted lines differ from filter1.m.

Page 26: Filter Examples Lab View William Rose Department of Kinesiology and Applied Physiology

Department of Kinesiology and Applied Physiology

filter3.mNo visible edge effects.

Page 27: Filter Examples Lab View William Rose Department of Kinesiology and Applied Physiology

Department of Kinesiology and Applied Physiology

filter3.mNo visible edge effects at either end.

Page 28: Filter Examples Lab View William Rose Department of Kinesiology and Applied Physiology

Department of Kinesiology and Applied Physiology

filter3.mNo visible edge effects.Data file: force_isometricelbowext_healthyadult_shortseg.txt

Page 29: Filter Examples Lab View William Rose Department of Kinesiology and Applied Physiology

Department of Kinesiology and Applied Physiology

filter3.mNo visible edge effects at either end.Data file: force_isometricelbowext_healthyadult_shortseg.txt