Adding a delay in state space form
8 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Kashish Pilyal
il 31 Mag 2022
Commentato: Kashish Pilyal
il 2 Giu 2022
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 Commenti
Risposta accettata
Paul
il 1 Giu 2022
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 Commenti
Paul
il 1 Giu 2022
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)
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Verification, Validation, and Test in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!