Products & Services Solutions Academia Support User Community Company

Learn more about Filter Design Toolbox   

qreport - Most recent fixed-point filtering operation report

Syntax

rlog = qreport(h)

Description

rlog = qreport(h) returns the logging report stored in the filter object h in the object rlog. The ability to log features of the filtering operation is integrated in the fixed-point filter object and the filter method.

Each time you filter a signal with h, new log data overwrites the results in the filter from the previous filtering operation. To save the log from a filtering simulation, change the name of the output argument for the operation before subsequent filtering runs.

Enable logging during filtering by setting LoggingMode to on for fi objects for your MATLAB session. Trigger logging by setting the Arithmetic property for h to fixed, making h a fixed-point filter and filtering an input signal.

Using Fixed-Point Filtering Logging

Filter operation logging with qreport requires some preparation in MATLAB. Complete these steps before you use qreport.

  1. Set the fixed-point object preference for LoggingMode to on for your MATLAB session. This setting enables data logging.

    fipref('LoggingMode','on')
  2. Create your fixed-point filter.

  3. Filter a signal with the filter.

  4. Use qreport to return the filtering information stored in the filter object.

qreport provides a way to instrument your fixed-point filters and the resulting data log offers insight into how the filter responds to a particular input data signal.

Report object rlog contains a filter-structure-specific list of internal signals for the filter. Each signal contains

Examples

qreport depends on the LoggingMode preference for fixed-point objects. This example demonstrates the process for enabling and using qreport to log the results of filtering with a fixed-point filter. hd is a fixed-point direct-form FIR filter.

f = fipref('loggingmode','on');
hd = design(fdesign.lowpass,'equiripple');
hd.arithmetic = 'fixed';
fs = 1000;          % Input sampling frequency.
t = 0:1/fs:1.5;     % Signal length = 1501 samples.
x = sin(2*pi*10*t); % Amplitude = 1 sinusoid.
y = filter(hd,x); 
rlog = qreport(hd)

View the logging report of a direct-form II, second-order sections IIR filter the same way. While this example sets loggingmode to on, you do that only once for a MATLAB session, unless you reset the mode to off during the session.

fipref('loggingmode','on');
hd = design(fdesign.lowpass,'ellip');
hd.arithmetic = 'fixed';
rand('state',0);
y = filter(hd,rand(100,1));
rlog = qreport(hd)

See Also

dfilt, mfilt

  


Free Early Verification Kit

Learn how to apply early verification to your development process through these technical resources.

How much time do you spend on testing to ensure implementation meets system-level requirements?

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS