@@ -59,7 +59,7 @@ matrices, _ = get_comp_sensitivity(sys, :plant_input)
59
59
60
60
# # get_looptransfer
61
61
62
- matrices, _ = Blocks. get_looptransfer (sys, :plant_input ; p = Dict (P . input . u => P . u_start) )
62
+ matrices, _ = Blocks. get_looptransfer (sys, :plant_input )
63
63
@test matrices. A[] == - 1
64
64
@test matrices. B[] * matrices. C[] == - 1 # either one negative
65
65
@test matrices. D[] == 0
@@ -308,7 +308,7 @@ T = -CS.feedback(Kss * Pss, I(2), pos_feedback = true)
308
308
@test CS. tf (CS. ss (matrices... )) ≈ CS. tf (T)
309
309
310
310
matrices, _ = Blocks. get_looptransfer (
311
- sys, :plant_input ; p = Dict (P . input . u[ 1 ] => 0.0 , P . input . u[ 2 ] => 0.0 ) )
311
+ sys, :plant_input )
312
312
L = Kss * Pss
313
313
@test CS. tf (CS. ss (matrices... )) ≈ CS. tf (L)
314
314
@@ -361,18 +361,17 @@ To = CS.feedback(Ps * Cs)
361
361
362
362
# matrices, _ = get_looptransfer(sys_outer, [:inner_plant_input, :inner_plant_output])
363
363
matrices, _ = get_looptransfer (
364
- sys_outer, :inner_plant_input ; p = Dict (sys_inner . P . input . u => sys_inner . P . u_start) )
364
+ sys_outer, :inner_plant_input )
365
365
L = CS. ss (matrices... ) |> sminreal
366
366
@test tf (L) ≈ - tf (Cs * Ps)
367
367
368
368
matrices, _ = get_looptransfer (
369
- sys_outer, :inner_plant_output ; p = Dict (sys_inner . add . input2 . u => 0.0 ) )
369
+ sys_outer, :inner_plant_output )
370
370
L = CS. ss (matrices... ) |> sminreal
371
371
@test tf (L[1 , 1 ]) ≈ - tf (Ps * Cs)
372
372
373
373
# Calling looptransfer like below is not the intended way, but we can work out what it should return if we did so it remains a valid test
374
- matrices, _ = get_looptransfer (sys_outer, [:inner_plant_input , :inner_plant_output ];
375
- p = Dict (sys_inner. P. input. u => sys_inner. P. u_start, sys_inner. add. input2. u => 0.0 ))
374
+ matrices, _ = get_looptransfer (sys_outer, [:inner_plant_input , :inner_plant_output ])
376
375
L = CS. ss (matrices... ) |> sminreal
377
376
@test tf (L[1 , 1 ]) ≈ tf (0 )
378
377
@test tf (L[2 , 2 ]) ≈ tf (0 )
0 commit comments