@@ -754,6 +754,12 @@ def test_statefbk_errors(self):
754754 sys = ct .rss (4 , 4 , 2 , strictly_proper = True )
755755 K , _ , _ = ct .lqr (sys , np .eye (sys .nstates ), np .eye (sys .ninputs ))
756756
757+ with pytest .warns (UserWarning , match = "cannot verify system output" ):
758+ ctrl , clsys = ct .create_statefbk_iosystem (sys , K )
759+
760+ # reset the system output
761+ sys .C = np .eye (sys .nstates )
762+
757763 with pytest .raises (ControlArgument , match = "must be I/O system" ):
758764 sys_tf = ct .tf ([1 ], [1 , 1 ])
759765 ctrl , clsys = ct .create_statefbk_iosystem (sys_tf , K )
@@ -806,11 +812,8 @@ def unicycle():
806812 def unicycle_update (t , x , u , params ):
807813 return np .array ([np .cos (x [2 ]) * u [0 ], np .sin (x [2 ]) * u [0 ], u [1 ]])
808814
809- def unicycle_output (t , x , u , params ):
810- return x
811-
812815 return ct .NonlinearIOSystem (
813- unicycle_update , unicycle_output ,
816+ unicycle_update , None ,
814817 inputs = ['v' , 'phi' ],
815818 outputs = ['x' , 'y' , 'theta' ],
816819 states = ['x_' , 'y_' , 'theta_' ])
0 commit comments