主要内容

simulateSNR

SNR for delta-sigma modulator from simulations

Since R2026a

Description

[snr,amp] = simulateSNR(ntf,osr,amp,f0,nlev,f,k,quadrature) simulates an delta-sigma modulator with sine wave inputs of various amplitudes specified by an ntf and calculates the signal-to-noise ratio in dB for each input.

[snr,amp] = simulateSNR(ABCD,osr,amp,f0,nlev,f,k,quadrature) calculates the SNR from inputs specified by the state-space description of the loop filter.

Examples

Input Arguments

collapse all

Noise transfer function of the delta-sigma modulator in pole zero form, specified as a zpk object.

Note

Poles of NTF must match those of STF to realize STF without the addition of extra state variables.

State space description of the loop filter of the delta-sigma modulator, specified as a matrix.

Data Types: double

Oversampling ratio of the delta-sigma modulator, specified as a real scalar. It is the ratio of the delta-sigma modulator sampling rate to the Nyquist rate.

Data Types: double

Amplitudes used to calculate SNR, specified as a row vector in dB.

Data Types: double

Center frequency of the binary delta-sigma modulator, specified as a real scalar.

Data Types: double

Number of levels in the quantizer, specified as a real scalar for a single quantizer or real-valued vector for multiple quantizers.

Input signal frequency adjusted to be an FFT bin, specified as a real scalar.

Data Types: double

Determines the number of time points used for FFT, specified as a real scalar. The function uses 2k time points for FFT.

Data Types: double

A flag to indicate if the modulator being simulated is quadrature. The flag is automatically set to 1 if ntf or ABCD is complex.

Data Types: double

Output Arguments

collapse all

Calculated SNR values, returned as a row vector in dB.

Amplitudes used to calculate SNR, returned as a row vector in dB.

Version History

Introduced in R2026a