noisepsdopts
Create an options object for output noise PSD computation
Description
Examples
Use the noisepsdopts function to set options to compute the output noise PSD. filt1 and filt2 are lowpass filters that use different design methods. The opts object makes it easier to set the same conditions for the noise PSD computation in the noisepsd function.
d = fdesign.lowpass
d =
lowpass with properties:
Response: 'Lowpass'
Specification: 'Fp,Fst,Ap,Ast'
Description: {4×1 cell}
NormalizedFrequency: 1
Fpass: 0.4500
Fstop: 0.5500
Apass: 1
Astop: 60
filt1 = design(d,'butter','Systemobject',true)
filt1 =
dsp.SOSFilter with properties:
Structure: 'Direct form II'
CoefficientSource: 'Property'
Numerator: [13×3 double]
Denominator: [13×3 double]
HasScaleValues: true
ScaleValues: [0.4151 0.3718 0.3374 0.3099 0.2878 0.2701 0.2558 0.2445 0.2358 0.2293 0.2248 0.2221 0.4704 1]
Show all properties
filt2 = design(d,'cheby2','Systemobject',true)
filt2 =
dsp.SOSFilter with properties:
Structure: 'Direct form II'
CoefficientSource: 'Property'
Numerator: [5×3 double]
Denominator: [5×3 double]
HasScaleValues: true
ScaleValues: [0.7003 0.5771 0.4734 0.3925 0.3466 1]
Show all properties
opts = noisepsdopts(filt1)
opts =
struct with fields:
FreqPoints: 'All'
NFFT: 512
NormalizedFrequency: true
Fs: 'Normalized'
SpectrumType: 'Onesided'
CenterDC: false
ConfLevel: 'Not Specified'
ConfInterval: []
opts.NFFT = 256; % Same as set(opts,'nfft',256).
opts.NormalizedFrequency = false;
opts.Fs = 1.5e3;
opts.CenterDC = trueopts =
struct with fields:
FreqPoints: 'All'
NFFT: 256
NormalizedFrequency: false
Fs: 1500
SpectrumType: 'Twosided'
CenterDC: true
ConfLevel: 'Not Specified'
ConfInterval: []
With opts configured as needed, use it as an input argument for the noisepsd function.
npsd = noisepsd(filt1,20,opts);
plot(npsd)
title("Round-off Noise Power Spectrum")
npsd = noisepsd(filt2,20,opts);
plot(npsd)
title("Round-off Noise Power Spectrum")
Input Arguments
Input filter, specified as one of the following filter System objects:
Output Arguments
Options object which contains the options for computing the output noise PSD,
returned as a spectrum object. You pass the opts
object as an input argument to the noisepsd function to specify values for the input parameters.
Using opts, you can set the following properties for
noisepsd:
Property Name | Default Value | Description and Valid Entries |
|---|---|---|
|
| Specify the number of FFT points to use to calculate the PSD. |
|
| Determine whether to use normalized frequency. Enter a logical value
of the logical |
|
| Specify the sampling frequency to use when you set
|
|
| Specify how
|
|
| Shift the zero-frequency component to the center of a two-sided spectrum.
|
Arithmetic | arithType | Analyze the filter System object, based on the arithmetic specified in the
arithType input. arithType can be set to
'double', 'single', or
'fixed'. The analysis tool assumes a double-precision
filter when the arithmetic input is not specified and the filter System object is in an unlocked state. |
Version History
Introduced in R2011aThe dsp.BiquadFilter object issues a warning and will be removed in a
future release. Use the dsp.SOSFilter object
instead. For more information on how to replace your existing code, see the
Compatibility Considerations section in the dsp.BiquadFilter reference page.
Starting in R2024b, this function supports the dsp.DCBlocker object.
The dsp.BiquadFilter object will be removed in a future release. Use
the dsp.SOSFilter object
instead.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Seleccione un país/idioma
Seleccione un país/idioma para obtener contenido traducido, si está disponible, y ver eventos y ofertas de productos y servicios locales. Según su ubicación geográfica, recomendamos que seleccione: .
También puede seleccionar uno de estos países/idiomas:
Cómo obtener el mejor rendimiento
Seleccione China (en idioma chino o inglés) para obtener el mejor rendimiento. Los sitios web de otros países no están optimizados para ser accedidos desde su ubicación geográfica.
América
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)