主要内容

crlb

Cramer-Rao lower bound

Since R2026a

    Description

    lb=crlb(sig,ncov,param) computes the Cramer-Rao lower bound, lb, of the estimate of the unknown parameters, param, of a deterministic signal, sig in noise. The noise is assumed to follow a zero-mean Gaussian random distribution with covariance, ncov.

    example

    [lb,fim]=crlb(___) also returns the Fisher Information Matrix, fim, which represents the information content of the observations.

    [___] = crlb(___,DataComplexity=complexity) specifies the complexity of the data model as "Auto", "Complex", or "Real". When the value of complexity is "Complex", the data model follows a complex multivariate normal distribution. When the value is "Real", the data model follows a real multivariate normal distribution. The default "Auto" automatically determines the complexity based on the inputs.

    Examples

    collapse all

    Start with a sinusoid signal model:

    x[n] = A*cos(2*pi*f*T*n + phi) + w[n], n = 0, 1, ..., N-1

    where A is the unknown amplitude, f is the unknown frequency, and phi is the unknown phase.

    Specify w[n] as a zero-mean real white Gaussian noise with known variance, ncov. Assume the signal has 1000 samples with a sample interval (T) of 10 msec. Then, calculate the CRLB of amplitude, frequency, and phase under the sinusoid signal model.

    n = (0:999)';
    T = 0.01;

    Specify a noise power of 0.01.

    noise_level = 0.1;
    ncov = noise_level^2;

    Create an anonymous function with three parameters p(1), p(2), and p(3) corresponding to A, f, and phi.

    sig = @(p) p(1)*cos(2*pi*p(2)*T*n + p(3));

    Calculate the Cramer-Rao lower bound of the amplitude, frequency, and phase parameters evaluated at parameter values of 2, 0.1, 0, respectively.

    param = [2, 0.1, 0]';
    crlb_numerical = crlb(sig,ncov,param,DataComplexity="Real")
    crlb_numerical = 3×3
    10-4 ×
    
        0.2197   -0.0020    0.0618
       -0.0020    0.0002   -0.0062
        0.0618   -0.0062    0.2443
    
    

    Use a signal model x[n] = A + w[n], n = 0, 1, ..., N-1, where A is a random DC signal modeled as a zero-mean Gaussian random variable with unknown amplitude. w[n] is zero-mean real white Gaussian noise with known variance. A is independent of w[n]. Use 100 time-domain samples.

    Calculate CRLB of the DC power under the data model.

    The signal model has 100 time samples.

    N = 100;
    sig = zeros(N,1);

    Set the known noise power

    npow = 0.05;

    and the noise covariance.

    ncov = @(dcpow) dcpow*ones(N,1)*ones(1,N) + npow*eye(N);

    Set the DC power.

    dcpow = 1.5;

    Compute the CRLB of the DC power evaluated at value of 1.5.

    crlb_est = crlb(sig,ncov,dcpow,DataComplexity="Real")
    crlb_est = 
    4.5030
    

    Start with a five-element ULA with half-wavelength element spacing. The ULA receives a signal from a target at a direction of arrival of 45 degrees. The signal is contained in complex Gaussian white noise. Calculate the DOA estimation CRLB via two ways:

    • Compute the CRLB using existing the steervec function.

    • Compute the CRLB using an anonymous function.

    The two formulations should lead to the same estimated DOA CRLB. The estimate is in degrees squared.

    Set up the ULA with equally spaced elements.

    N = 5;
    elementPos = (0:N-1)/2;

    Set the known noise power.

    noise_level = 0.1;
    ncov = noise_level^2;

    The target DOA is 45 degrees azimuth.

    ang = 45;

    Create a function handle from using the steervec function.

    sig_steervec = @(ang)steervec(elementPos,ang);

    Create a function handle from an anonymous function.

    sig_anonymous = @(ang)exp(1j*(2*pi*sind(ang)*elementPos'));

    Find the numerical CRLB of DOA estimation computed using the two approaches.

    crlb_steervec = crlb(sig_steervec,ncov,ang)
    crlb_steervec = 
    0.1109
    
    crlb_anonymous = crlb(sig_anonymous,ncov,ang, ...
        DataComplexity = "Complex")
    crlb_anonymous = 
    0.1109
    

    Input Arguments

    collapse all

    Deterministic input signal, specified as an N-by-1 real-valued vector, an N-by-1 complex-valued vector, or function handle that returns such a vector.

    When sig or ncov are function handles, they must accept param as input arguments to model any unknown parameters. At least one of sig or ncov must be a function handle. When sig and ncov are both function handles, they must both employ param as inputs to the functions.

    Data Types: single | double | function_handle
    Complex Number Support: Yes

    Noise covariance matrix, specified as a positive scalar, an N-by-N positive definite matrix, or a function handle that outputs either a scalar or matrix.

    • When ncov is a scalar, it indicates the noise power of white Gaussian noise.

    • When ncov is a positive definite N-by-N matrix, it represents the noise covariance matrix.

    Example: 50

    Data Types: single | double | function_handle
    Complex Number Support: Yes

    Unknown model parameters, specified as a real P-by-1 vector. The argument param represents the parameter vector at the point of evaluation, where P is the number of unknown parameters to be estimated.

    Data Types: single | double

    Date complexity, specified as "Auto", "Complex", or "Real". When the value is "Complex", the data model follows a complex multivariate normal distribution. When the value is "Real", the data model follows a real multivariate normal distribution. When the value is the default, "Auto", the function automatically determines the complexity based on the inputs.

    Example: "Complex"

    Dependencies

    Use is argument as part of the Name-value pair DataComplexity=compexity.

    Data Types: char | string

    Output Arguments

    collapse all

    Cramer-Rao lower bound returned as a real-valued P-by-P positive definite symmetric matrix. The matrix represents the CRLB of the parameters evaluated at param. If some parameters are not used in the model, the corresponding rows and columns of lb will contain NaN values, meaning the CRLB related to these unused parameters is unknown.

    Data Types: single | double

    Fisher information matrix, returned as a real-valued P-by-P positive definite symmetric matrix. fim represents the information content of the observations.

    Data Types: single | double

    More About

    collapse all

    Algorithms

    The Cramér-Rao Lower Bound (CRLB) sets lower bounds on the variances of an unbiased estimator. Consider a simple data model x[n] that depends on N parameters:

    x[n]=s[n;θ]+w[n],n=0,,N1

    where ϴ represents unknown parameters, param. The covariance matrix of any unbiased estimator satisfies CΘCRLB(θ). For the case when ϴ is a scalar, the Cramer-Rao bound satisfies:

    CRLB(θ)=-1E[2lnL(x;θ)θ2]

    where L(x;ϴ) is the likelihood function of x[n]. The likelihood function is the probability of the data values given the model parameters.

    When ϴ is a parameter vector, the CLRB is a matrix,

    CRLB(θ)=F1(θ)

    where F is the Fisher information matrix (FIM).

    [F(θ)]i,j=E[2lnL(x;θ)θiθj].

    The diagonal elements of the CRLB matrix represent lower bounds on the variance of an unbiased estimator for the model parameters. When the data samples are independent and identically distributed and the sample size N approaches infinity, the variance of the Maximum Likelihood Estimator (MLE) can achieve the CRLB. The off-diagonal elements signify the correlation between parameter estimates.

    References

    [1] Steven M. Kay, Fundamentals of Statistical Signal Processing, Estimation Theory, 1993.

    Version History

    Introduced in R2026a