Please help creating proper filters in HLS/System generator!

Status
Not open for further replies.

electrodarkness

Member level 1
Joined
May 2, 2010
Messages
39
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
Ganesti, Transylvania, Romania
Activity points
1,649
Hi everyone!
I wanted to design some digital filters for an ECG device based on Zynq SoC. Since The device works with 24bits of data, I can't use the FIR block present in System generator. So I designed a low-pass 65th order FIR filter with 250Hz cutoff frequency, and a 2nd order band-stop IIR filter with 50Hz center frequency, and created them in HLS. The problem arises when I try to simulate the blocks in System generator, The FIR filter has a periodical overshoot with a chirp signal as input. I'm still struggling to find the cause.

The second problem is: The final filter would be one generated by the convolution of the FIR and IIR filter coefficients, to simplify the use (although, if I can't manage to do this, the separate filtering will be used). I used convolution and tested the complex filter in Matlab, it works, while in system generator it gives some noise.

I've attached my HLS filter files, the simulation setup, and a picture of the raw/filtered data plot.

Any help would be appreciated!

Feher Aron.
 

Attachments

  • filter.txt
    1.7 KB · Views: 71
  • fir.txt
    1.6 KB · Views: 75
  • iir.txt
    968 bytes · Views: 83
  • sim.jpg
    99.7 KB · Views: 93
  • overfl.jpg
    235.4 KB · Views: 91
  • sysgen.jpg
    301.7 KB · Views: 92

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…