lq/dynamics.py
def cost_inf_K(self, K):
        '''
          Arguments:
            Control Gain K
            process noise covariance Qn
            observation noise covariance Rn
          Outputs:
            cost: Infinite time horizon LQR cost of static gain K
            u=Kx
        '''
        if self.is_stable(K):
            P,_ = self.P_and_Pe_associated_to_K(K)
            cost = np.trace(P @ self.Qn)
        else:
            cost = float("inf")

        return cost

          Arguments:
            Control Gain K
            process noise covariance Qn
            observation noise covariance Rn
          Outputs:
            cost: Infinite time horizon LQR cost of static gain K
            u=Kx
        
Control Gain K
process noise covariance Qn
observation noise covariance Rn
Outputs:
cost: Infinite time horizon LQR cost of static gain K
u=Kx
Control Gain K process noise covariance Qn observation noise covariance Rn Outputs : cost : Infinite time horizon LQR cost of static gain K u = Kx
def cost_inf_K(self, K):
        if self.is_stable(K):
            P,_ = self.P_and_Pe_associated_to_K(K)
            cost = np.trace(P @ self.Qn)
        else:
            cost = float("inf")
        return cost
def cost_inf_K ( self , K ) : if self . is_stable ( K ) : P , _ = self . P_and_Pe_associated_to_K ( K ) cost = np . trace ( P @ self . Qn ) else : cost = float ( "inf" ) return cost
Arguments:
Control Gain K
process noise covariance Qn
observation noise covariance Rn
Outputs:
cost: Infinite time horizon LQR cost of static gain K
u=Kx
Arguments : Control Gain K process noise covariance Qn observation noise covariance Rn Outputs : cost : Infinite time horizon LQR cost of static gain K u = Kx
'''
          Arguments:
            Control Gain K
            process noise covariance Qn
            observation noise covariance Rn
          Outputs:
            cost: Infinite time horizon LQR cost of static gain K
            u=Kx
        '''
self
K