noisepsdopts
Create an options object for output noise PSD computation
Description
Examples
Set the Noise PSD Options
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: {4x1 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: [13x3 double] Denominator: [13x3 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] Use get to show all properties
filt2 = design(d,'cheby2','Systemobject',true)
filt2 = dsp.SOSFilter with properties: Structure: 'Direct form II' CoefficientSource: 'Property' Numerator: [5x3 double] Denominator: [5x3 double] HasScaleValues: true ScaleValues: [0.7003 0.5771 0.4734 0.3925 0.3466 1] Use get to 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 = true
opts = 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
sysobj
— Input filter
filter System object
Input filter, specified as one of the following filter System objects:
Output Arguments
opts
— Options object
spectrum
object
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 R2011aR2024b: dsp.BiquadFilter
object warns
The 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.
R2024b: Support for dsp.DCBlocker
object
Starting in R2024b, this function supports the dsp.DCBlocker
object.
R2023b: dsp.BiquadFilter
object will be removed
The dsp.BiquadFilter
object will be removed in a future release. Use
the dsp.SOSFilter
object
instead.
Comando MATLAB
Hai fatto clic su un collegamento che corrisponde a questo comando MATLAB:
Esegui il comando inserendolo nella finestra di comando MATLAB. I browser web non supportano i comandi MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- 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)