How to multiply transfer function in matrix form?
Afficher commentaires plus anciens
I want to multiply transfer function in matrix form in order to calculate gain for compensator
which requires to do following calculation:
Dc = - K * (sI - A + BK + LC)^(-1) *L
where K and L are matices designed with pole placement,
A is a matrix for my state space
I is an Identity matrix of a size defined by A
s is frequency domain variable.
My challenge/problem here is that:
Whenever I multiply K matrix with the following matrix
the pole and zero increases as well.
I somehow can't find a way to make 'Dc' into the form of Dc1

Here is my code:
% define A B C for state space
A = [0 1; 0 0];
B = [0 ; 1];
C = [1 0];
% design pole for control
pc = [-0.7071067812+0.7071067812j -0.7071067812-0.7071067812j];
K = place(A,B,pc); %calculate control gain
K = real(K)
% design pole for estimator
% 4 times the frequecy of controller
% but not to large to decrease bandwith for noise
pe = [-2.5+4.330127019j -2.5-4.330127019j];
Lt = place(A',C',pe); %calculate estimator gain
L = Lt'
% define s and I before calculate overall gain
s = tf('s');
[row, column] = size(A)
I = eye(row)
sI = s*I
INV = sI-A+B*K+L*C
X = INV\L
Dc = -mtimes(K,X)
Dc1=-40.4*(s+0.619)/(s+3.21+4.77j)/(s+3.21-4.77j)
rlocus(Dc);
bode(Dc);
margin(Dc);
Réponse acceptée
Plus de réponses (1)
The result you seek can be found by (after running the code in the original question):
>> minreal(Dc)
ans =
-40.36 s - 25
---------------------
s^2 + 6.414 s + 33.07
Continuous-time transfer function.
The transfer function algebra in the code is introducing artificial poles and zeros. There is probably a better way solve the whole problem from the start. Such as:
> tf(ss(A-B*K-L*C,L,-K,0))
ans =
-40.36 s - 25
---------------------
s^2 + 6.414 s + 33.07
Continuous-time transfer function.
Catégories
En savoir plus sur State-Space Control Design and Estimation dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

