delayss - State Space Model with two states

2 ビュー (過去 30 日間)
Rodrigo Zenon Guzman Iturra
Rodrigo Zenon Guzman Iturra 2020 年 4 月 9 日
コメント済み: Ameer Hamza 2020 年 4 月 9 日
Dear comunnity:
Nowadays i am trying to create a state space model of a system with two states (x1,x2) and a delay in the state x2. The state space representation of my system is as follows:
dx1/dt = x2(t)/LS
dx2/dt = -x1(t)/CF - (1/CF*K)*x2(t-Td) + u/CF
Where x1,x2 are the states, x2(t-Td) is the delayed state by a time Td and u is the input of the system.
Even due the help file of delayss.m is helpful, the example is given for a system with a single state x1 only. I tried the following code:
% Clear the workspace
clc
clear all
% Electrical Parameters Values
LS = 32.6e-06 ; % H
CF = 300e-06 ; % F
K = 100e-03; ; % Ohms
Td = 1e-06;
%Definition of the State Matrices
% States defined as:
A = [0 (1/LS);
(-1/CF) 0];
Ad = [0 0;
(-1/(CF*K)) 0];
B = [0;
(1/CF)];
C = [0 1];
D = 0;
%System Definition in SS
DelayT(1) = struct('delay',Td,'a',Ad,'b',[0;0],'c',[0 0],'d',0);
sys = delayss(A,B,C,D,DelayT)
step(sys);
But the step response of the system is not as expected, therefore i know that there is a error on how i defined the system. Could anybody support me with the correct way to define my system using delayss.
Kinds Regards
Rodrigo Guzman

採用された回答

Ameer Hamza
Ameer Hamza 2020 年 4 月 9 日
The value of Ad is wrong according to your equations. Change it to
Ad = [0 0;
0 (-1/(CF*K))];
Similarly, do you want to output x1 or x2 as output? If you want to output x1, then change C to
C = [1 0];
Apart from that, your code is correct.
  2 件のコメント
Rodrigo Zenon Guzman Iturra
Rodrigo Zenon Guzman Iturra 2020 年 4 月 9 日
I truly apologize, it was a foolish mistake. Thank you for your support.
Rodrigo Guzman
Ameer Hamza
Ameer Hamza 2020 年 4 月 9 日
Glad to be of help.

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by