Main Content

defcx

Help specify cTx objectives for mincx solver

    Description

    [V1,...,Vk] = defcx(lmisys,m,X1,...,Xk) computes the values [V1,...,Vk] of the matrix variables X1,...,Xk of an LMI system when the decision variable having index m is set to 1 and all other decision variables are set to 0. These values are useful for deriving the c vector that you need to express the objective in terms of the matrix variables for mincx.

    example

    Examples

    collapse all

    The LMI solver mincx minimizes linear objectives of the form cTx, where x is the vector of decision variables. In most control problems, however, such objectives are expressed in terms of the matrix variables X rather than the decision variables x. Use defcx to compute the c vector for input into mincx.

    Suppose that you want to minimize a linear objective given by

    Trace(X)+x0TPx0

    Suppose further that you have already defined x0 = [1;1], specified the LMI variables X and P using lmivar, and specified the LMI relationships using lmiterm. Get the internal representation of the system.

    lmisys = getlmis
    

    For mincx, you must obtain a vector c such that

    cTx=Trace(X)+x0TPx0

    Use a for loop to get the values of each matrix variable with each decision variable set to one and the rest set to zero. The loop also evaluates the objective for X = Xm and P = Pm. This evaluation gives the mth entry of c by definition.

    n = decnbr(lmisys) 
    c = zeros(n,1)
    
    for m = 1:n, 
    	[Xm,Pm] = defcx(lmisys,m,X,P) 
    	c(m) = trace(Xm) + x0'*Pm*x0 
    end
    

    You can now use c as an input to mincx with the system lmisys.

    Input Arguments

    collapse all

    Optimization problem to solve, specified as a vector that encodes the internal representation of an LMI system. To obtain this vector, use setlmis, lmivar, lmiterm, and getlmis, as described in Specify LMI System at the Command Line.

    Index of decision variable to set to 1, specified as an integer. Typically, you use defcx in a loop that steps through all n decision variables in the problem, where n = decnbr(lmisys).

    Matrix variable identifiers, specified as integer values. You obtain these identifiers when you define the matrix variables using lmivar.

    Output Arguments

    collapse all

    Values of matrix variables, returned as matrices. defcx computes the values of each matrix variable in lmisys with decision variable m set to 1 and all other decision variables set to 0.

    Version History

    Introduced before R2006a

    See Also

    |