How do I control the individual products and accumulator

Illustration
camillajoy - 2021-03-13T14:03:00+00:00
Question: How do I control the individual products and accumulator

How do I control the individual products and accumulators of my DFILT object in Signal Processing Blockset 6.9 (R2009a)?   I can set the properties for my DFILT object, but I do not have access to each accumulator and multiplier input and output of a FIR and IIR filter, needed to assign their attributes, e.g., bit width and type of rounding. I can assign the attributes all at once. However, for optimal design, I may want to have some of the internal accumulators and multipliers of different sizes or do a different rounding.  

Expert Answer

Profile picture of John Williams John Williams answered . 2025-11-20

You can start with a DFILT object "Hd" that has a filter structure and coefficients and then use:
 
 
realizemdl(Hd)
to get a Simulink model in which you can control individual adders and gains. The following is an example:
 
 
[b,a] = butter(5,.5);

Hd = dfilt.df1(b,a);

%#1 Default syntax:

realizemdl(Hd);

%#2 Using parameter/value pairs:

realizemdl(Hd, 'Blockname', 'My Filter', 'OptimizeZeros', 'on');


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!