State Space system and PID Controller Implementation
7 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello,
I'm stil a struggling a bit with Matlab and Simulink trying to combine both to implement a PID Controller to my state space model.
I have set up matrices A, B, C,D to give me a 4x4 state space model which I can transform into a series of transfer functions. I understand that for my PID controller analysis I need to decouple my model to be able to select 1 dimension, 1 control input of motion to give me 1 output for me to analyse this with a PID controller.
Another difficulty is how do I define the error and gains I need to render my model stable: which is the objective of this exercice. I have found some values of static gain although I do not know how they connect to my model and where I should implement these after.
On another note, I am confused between the difference between the tf and ss2tf functions.
% A, B, C, D Matrices
A = [0 0 0 1 0 0 0 0 0 0 0 0;
0 0 0 0 1 0 0 0 0 0 0 0;
0 0 0 0 0 1 0 0 0 0 0 0;
0 0 0 -0.0855 0 0 0 -9.81 0 0 0 0;
0 0 0 0 -0.0855 0 9.81 0 0 0 0 0;
0 0 0 0 0 0 0 0 0 0 0 0;
0 0 0 0 0 0 0 0 0 1 0 0;
0 0 0 0 0 0 0 0 0 0 1 0;
0 0 0 0 0 0 0 0 0 0 0 1;
0 0 0 0 0.7415 0 0 0 0 0 0 0;
0 0 0 0.7415 0 0 0 0 0 0 0 0;
0 0 0 0 0 0 0 0 0 0 0 0];
B = [0 0 0 0;
0 0 0 0;
0 0 0 0;
0 0 0 0;
0 0 0 0;
-0.01435 -0.01435 -0.01435 -0.01435;
0 0 0 0;
0 0 0 0;
0 0 0 0;
0 -124.4 0 124.4;
124.4 0 -124.4 0;
-0.01999 0.01999 -0.01999 0.01999];
C = [1 0 0 0 0 0 0 0 0 0 0 0;
0 1 0 0 0 0 0 0 0 0 0 0;
0 0 1 0 0 0 0 0 0 0 0 0;
0 0 0 0 0 0 0 0 1 0 0 0];
D = zeros(4, 4);
G = ss(A, B, C, D);
I = tf(G);
J = ss2tf(A, B, C, D, 4);
Coming back to simulink, how do I simplify my model for it to hold true and facilitate a Simulink analysis?
If you could elaborate, or give me any advice/information, I would be extremely grateful!
Regards,
Maxence
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur PID Controller Tuning dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!