how to use connect command for connecting blocks ?
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello, I am doing simulation with LQG controller and for plant and controller connection i am using "connect" command, but i am not getting its right or wrong could you please check it ?
here is my code for connect
*************
G = plant , C = controller , v= noise
***********************
sum = sumblk('yo=y+v');
G.InputName ='u'; G.OnputName='y';
C.InputName='yo'; C.OnputName ='u';
T = connect (G,C,sum,'v','yo');
*********************** here yo is sum output that is addition of noise 'v' and plant output 'y'
and i have generated noise
v = randn(1,10)
and then save to noise.mat and this file i am loading in the simulation
load noise.mat;
in this file variable v contains noise.
could you tell any one i have written code is correct or wrong because i want to measure output sensitivity using connect command and compare it with loopsens command use to measure sensitivity. I have done this but the both graphs are shwing different.
block diagram
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Classical Control Design에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!