フィルターのクリア

i have a problem ..help me

1 回表示 (過去 30 日間)
belal hariz belgacem
belal hariz belgacem 2019 年 10 月 25 日
コメント済み: Walter Roberson 2019 年 10 月 31 日
clear all, close all, clc;
syms f j k1 k R l
%% State space representation
A = [-f/j k1/j;(-k-k1)/l -R/l];
% the state matrix
B = [0 -1/j;k/j 0];
% the input vector
C = [1 0;0 1];
% the output vector
D = zeros(size(C,2),size(B,2));
% the feedforward
%% Verify the controllability and observability
Mc = ctrb(A,B);
% Controllability matrix
Om = obsv(A,C)
% matrix
the_means_not_controllable = length(A)-length(Mc)
if rank(Mc) == size(A,2)
'It is controllable'
else
'It is not controllable'
end
if rank(Om) == size(A,2)
'It is observable'
else
'It is not observable'
end
%% Transform into transfer function
[num,den] = ss2tf(A,B,C,D)
sys = tf(num,den)
%Order system
Order_system = order(sys)
step(sys,'g')
grid on
.................................................................the problem
Error using ctrb (line 20)
The "ctrb" command cannot be used for models of class "sym".
Error in state_space (line 19)
Mc = ctrb(A,B);
  3 件のコメント
Renato SL
Renato SL 2019 年 10 月 31 日
from my experience with these functions, you don't need to declare the variables symbolically (no need for the line syms f j k k1 , etc) & you only need to assign the numeric values for all of the variables.
Walter Roberson
Walter Roberson 2019 年 10 月 31 日
The Control System Toolbox does not support any symbolic parameters, for anything. There are some things that it support "tunable" parameters for, but at any given time a tunable parameter has a specific value.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeFunctional Programming についてさらに検索

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by