Adding a delay in state space form
조회 수: 8 (최근 30일)
이전 댓글 표시
I have a control block diagram
The value of tf_b is written as
tf_b=((0.5*s)+1)/(s^2)*(kp + kd*s);
The transport delay block is equivalent to value of . I made a state space form of the above system. It is written as:
I tried adding a delay as shown in the diagram.
sys=ss(A,B,C,D,'InputDelay',theta,'OutputDelay',0);
The simulink model and the state space give different settling times when given as step input. The settling time for the simulink model is 1.82 appoximately and for the state space is 1.97. Is there something I can do to correct this or add a delay properly?
댓글 수: 0
채택된 답변
Paul
2022년 6월 1일
The command
sys=ss(A,B,C,D,'InputDelay',theta,'OutputDelay',0);
puts a delay on the input signal, i.e., at the output of the a1input block to the left of the node (assuming that A,B,C,D as written is the state space model for the Simulink block diagram, but with zero transport delay; I did not verify this myself). In other words, the delay is applied to both forward paths, not just the "upper" path.
댓글 수: 5
Paul
2022년 6월 1일
I don't believe that a system with a delay can be represented in the simple A,B,C,D form.
This doc page should be of interest.
Though you're not showing your code, I suspect that the descriptor form you're seeing is because you're constructing the model using "transfer function math," like so:
s = tf('s');
Gamma2 = ((exp(-0.02*s)*s^2)+(0.6*s)+0.2)/((0.5*s+1)*(s^2+(0.6*s)+0.2));
Gamma2
Note also that the model has eight states.
I don't have a clear explanation as to why this results in a descriptor form, but I suspect it has to do with how the Control System Toolbox represents that first term in Gamma2 with the delay, and then combines that with all the other terms.
However, transfer function math is generally not recommended; instead use the interconnection fucntions, like so (based on the similar problem discussed here)
Kp = 0.1; Kd = 0.6; theta = 0.02;
pid = Kp + Kd*s;
P = tf(1,[.5 1]);
H = tf([.5 1],[1 0 0]);
clsys = series(parallel(exp(-theta*s),pid/s^2),feedback(P,series(pid,H)));
clsys
Note that clsys doesn't include the E and it also only has 5 states, likely because the CST is smarter when it uses interconnection functions (link).
However, Gamma2 and clsys both represent the same dynamics
bode(Gamma2,clsys)
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Verification, Validation, and Test에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!