This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Hilbert filter specification object


d = fdesign.hilbert
d = fdesign.hilbert(specvalue1,specvalue2)
d = fdesign.hilbert(spec)
d = fdesign.hilbert(spec,specvalue1,specvalue2)
d = fdesign.hilbert(...,Fs)
d = fdesign.hilbert(...,MAGUNITS)


d = fdesign.hilbert constructs a default Hilbert filter designer d with N, the filter order, set to 30 and TW, the transition width set to 0.1π radians/sample.

d = fdesign.hilbert(specvalue1,specvalue2) constructs a Hilbert filter designer d assuming the default specification 'N,TW'. You input specvalue1 and specvalue2 for N and TW.

d = fdesign.hilbert(spec) initializes the filter designer Specification property to spec. You provide one of the following as input to replace spec. The specification options are not case sensitive.

    Note:   Specifications marked with an asterisk require the DSP System Toolbox™ software.

  • 'N,TW' default specification option.

  • 'TW,Ap' *

The filter specifications are defined as follows:

  • Ap — amount of ripple allowed in the pass band in decibels (the default units). Also called Apass.

  • N — filter order.

  • TW — width of the transition region between the pass and stop bands.

By default, fdesign.hilbert assumes that all frequency specifications are provided in normalized frequency units. Also, decibels is the default for all magnitude specifications.

Different specifications may have different design methods available. Use designmethods(d) to get a list of the design methods available for a given specification.

d = fdesign.hilbert(spec,specvalue1,specvalue2) initializes the filter designer specifications in spec with specvalue1, specvalue2, and so on. To get a description of the specifications specvalue1 and specvalue2, enter


at the Command prompt.

d = fdesign.hilbert(...,Fs) adds the argument Fs, specified in Hz to define the sampling frequency. In this case, all frequencies in the specifications are in Hz as well.

d = fdesign.hilbert(...,MAGUNITS) specifies the units for any magnitude specification you provide in the input arguments. MAGUNITS can be one of

  • 'linear' — specify the magnitude in linear units

  • 'dB' — specify the magnitude in dB (decibels)

  • 'squared' — specify the magnitude in power units

When you omit the MAGUNITS argument, fdesign assumes that all magnitudes are in decibels. Note that fdesign stores all magnitude specifications in decibels (converting to decibels when necessary) regardless of how you specify the magnitudes.


Design a Hilbert transformer of order 30 with a transition width of 0.2π radians/sample. Plot the zero phase response from [-π,π) radians/sample and the impulse response.

d = fdesign.hilbert('N,TW',30,0.2);
% Show available design methods
% Use least square minimization to obtain linear-phase FIR filter
Hd = design(d,'equiripple');
% Display zero phase response from [-pi,pi)
'frequencyrange','[-pi, pi)')

The impulse response of this even order filter is antisymmetric (type III).


Apply the filter to a discrete-time sinusoid with a frequency of π/2 radians/sample.

n = 0:99;
x = cos(pi/2*n);
y = filter(Hd,x);
% Correct for the filter delay
Delay = floor(length(Hd.Numerator)/2);
y = y(Delay+1:end);

Plot a the filter input and output and validate the approximate π/2 phase shift obtained with the Hilbert transformer.

stem(x(1:end-Delay),'markerfacecolor',[0 0 1]);
hold on;
stem(y,'Color',[1 0 0],'markerfacecolor',[1 0 0]);
axis([10 20 -1.5 1.5]); grid on;
xlabel('Samples'); ylabel('Amplitude');

Because the frequency of the discrete-time sinusoid is π/2 radians/sample, a one sample shift corresponds to a phase shift of π/2.

Form the analytic signal and demonstrate that the frequency content of the analytic signal is zero for negative frequencies and approximately twice the spectrum of the input for positive frequencies.

x1 = x(1:end-Delay);
% Form the analytic signal
xa = x1+1j*y;
freq = -pi:(2*pi)/length(x1):pi-(2*pi)/length(x);
hold on;
plot(freq,abs(fftshift(fft(xa))),'r'); grid on;
xlabel('Radians/Sample'); ylabel('Magnitude');
legend('Input DFT','Analytic Signal DFT','Location','NorthWest');

Design a minimum-order Hilbert transformer that has a sampling frequency of 1 kHz. Specify the passband ripple to be 1 dB.

d = fdesign.hilbert('TW,Ap',1,0.1,1e3);
hd = design(d,'equiripple');
fvtool(hd,'magnitudedisplay','zero-phase', ...
'frequencyrange','[-Fs/2, Fs/2)');

See Also

| |

Introduced in R2009a

Was this topic helpful?