UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Observer droid77
Observer
4,097 Views
Registered: ‎07-22-2010

Bandstop (notch) filter not working in SysGen

Hello,

 

I am trying to implement a second order, butterworth, bandstop filter with a notch frequency of 60 Hz, and with a sampling rate of 100KHz.  I have begun to do this using the "fdatool", using a Direct-Form I Structure and also using the "Convert to single section" option in the fdatool's Edit menu.  I then exported my subsystem to Simulink environment and also built a functionally equivalent subsystem using the System Generator blocks.  I then simulated them side-by-side to observe performance differences and the subsystem implemented using the fdatool works as designed but the SysGen subsystem is not.  I think it might be a quantization error and I have tried modifying the precision of blocks with no success.

 

I have attached a screenshot of the fdatool settings and the model file in question

fdatool screenshot

 

Any advice in helping me troubleshoot this problem would be greatly appreciated.

 

Thanks for your time.

Tags (3)
0 Kudos
1 Reply
Explorer
Explorer
4,090 Views
Registered: ‎12-08-2010

Re: Bandstop (notch) filter not working in SysGen

Hello.

1. What is the purpose of 'Delay6' block in sysgen's implementation? Remove it ot set zero latency. Otherwise, output register will latch wrong sample.

2. When you are dealing with the fixed-point numbers, you should pay an attention to bitwidths and binary point position. Your input signal has amplitude 50. Then 'Gateway In' block samples it with fixed-point representation 'Fix18_0'. 'Fix18_0' means that samples are in range [-2^17; 2^17-1] = [-131072; 131071]. I.e., your input signal has amplitude 20*log10(50 / 131072) = -68.37 dB (of full 18 bit scale). I guess, you would like to use higher amplitude. So check carefully all your fixed-point formats, especially after the multiplications.

3. Add 'Gateway Out' blocks to suppress warning message.

4. FDAtool allows you to quantize designed filter with custom intermediate fixed-point formats. So you can check whether your filter is stable with current quantization.

 

5. If you are using System Generator 13.4, then you can set floating-point arithmetic in properties of the multipliers and input gateways.

Best Regards,
Vitaly.
0 Kudos