@@ -151,18 +151,26 @@ def plant(self, request):
151151 'syscont221' :StateSpace ([[- .3 , 0 ],[1 ,0 ]],[[- 1 ,],[.1 ,]], [0 , - .3 ], 0 )}
152152 return plants [request .param ]
153153
154- # check
155- # cont or discrete, vary P I or D
156- # @pytest.mark.parametrize('plant', (syscont, sysdisc1))
157- @pytest .mark .parametrize ('plant' , ('syscont' , 'sysdisc1' ), indirect = True )
154+ # test permutations of system construction without plotting
155+ @pytest .mark .parametrize ('plant' , ('syscont' , 'sysdisc1' , 'syscont221' ), indirect = True )
158156 @pytest .mark .parametrize ('gain' , ('P' , 'I' , 'D' ))
159- @pytest .mark .parametrize ("kwargs" , [{'Kp0' :0.1 , 'noplot' :True },])
160- def test_pid_designer_1 (self , plant , gain , kwargs ):
161- rootlocus_pid_designer (plant , gain , ** kwargs )
162-
157+ @pytest .mark .parametrize ('sign' , (1 ,))
158+ @pytest .mark .parametrize ('input_signal' , ('r' , 'd' ))
159+ @pytest .mark .parametrize ('Kp0' , (0 ,))
160+ @pytest .mark .parametrize ('Ki0' , (1. ,))
161+ @pytest .mark .parametrize ('Kd0' , (0.1 ,))
162+ @pytest .mark .parametrize ('tau' , (0.01 ,))
163+ @pytest .mark .parametrize ('C_ff' , (0 , 1 ,))
164+ @pytest .mark .parametrize ('derivative_in_feedback_path' , (True , False ,))
165+ @pytest .mark .parametrize ("kwargs" , [{'plot' :False },])
166+ def test_pid_designer_1 (self , plant , gain , sign , input_signal , Kp0 , Ki0 , Kd0 , tau , C_ff ,
167+ derivative_in_feedback_path , kwargs ):
168+ rootlocus_pid_designer (plant , gain , sign , input_signal , Kp0 , Ki0 , Kd0 , tau , C_ff ,
169+ derivative_in_feedback_path , ** kwargs )
170+
171+ # test creation of sisotool plot
163172 # input from reference or disturbance
164173 @pytest .mark .parametrize ('plant' , ('syscont' , 'syscont221' ), indirect = True )
165- # @pytest.mark.parametrize('plant', (syscont, syscont221))
166174 @pytest .mark .parametrize ("kwargs" , [
167175 {'input_signal' :'r' , 'Kp0' :0.01 , 'derivative_in_feedback_path' :True },
168176 {'input_signal' :'d' , 'Kp0' :0.01 , 'derivative_in_feedback_path' :True },])
0 commit comments