the state representation of the dynamic system

조회 수: 1 (최근 30일)
belal hariz belgacem
belal hariz belgacem 2019년 6월 6일
댓글: belal hariz belgacem 2019년 6월 6일
state equation
A B
Capture.PNG
exit equation
C
Capture.PNG
K=2; K1=0.5; L=0.02; R=2; J=0.0005; f=0.00008; Cr =20 N.m
Capture.PNG

채택된 답변

Priysha Aggarwal
Priysha Aggarwal 2019년 6월 6일
Error is in line 8
x = A*x + B*U
To be able to multiply A with x, you need to predefine x. You cannot initiate a variable x with an equation which already has x in it.
Solution :
x = 1 %replace 1 by whatever initial value of x is required
x = A*x + B*U
  댓글 수: 1
belal hariz belgacem
belal hariz belgacem 2019년 6월 6일
the programme not work
I want to extract curves
clear all
clc
k=2; k1=0.5; L=0.02;
R=2; J=0.0005; f=0.00008;Cr=20;
A=[-f/J k1/J;(-k-k1)/L -R/L];
B=[0 -1/f;k/L 0];
C=[1 0;0 1];
x=[1;1];
D=[0];
t=0:0.1:7;
[x,y]= lsim(A,B,C,D);
Error in Untitled (line 11)
[x,y]= lsim(A,B,C,D,t);
Error in Untitled (line 11)
[x,y]= lsim(A,B,C,D,t);
>> Untitled
Error: File: Untitled.m Line: 11 Column: 21
Unbalanced or unexpected parenthesis or bracket.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

belal hariz belgacem
belal hariz belgacem 2019년 6월 6일
Capture.PNG

카테고리

Help CenterFile Exchange에서 Just for fun에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by