Adding a delay in state space form
7 次查看(过去 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!