having trouble defining a non-linear state space model
조회 수: 3 (최근 30일)
이전 댓글 표시
Ive been trying for the past few hours to figure out how to input a non-linear ss model and Im at a loss. the model ive been trying to input is a simple pendulum with an applied torque Tc with x1=theta and x2=thetadot
[xdot1;xdot2] = [0 x2; -9.81sin(x1) +Tc 0] y=x1
^^that is not the code i used thats the model on paper that ive been trying to input.
when i define the matricies A,B,C,and D using this code; A= [0 1;(-9.81*sin(x1)+Tc) 0]; B= [0]; C= [1]; D=[0];
then run ss(A,B,C,D)
i get an error saying: Error using ss (line 274) The value of the "a" property must be a numeric array without any Inf's or NaN's.
now im assuming the error is because of the way ive defined the A matrix with the sin(x1) in there but i have no idea how else to define that model and ive been searching the matlab guide and the internet for hours now.
anyhelp would be AWESOME
댓글 수: 0
답변 (1개)
Ryan G
2012년 11월 27일
There are two issues here:
1) The SS model is incorrect. The applied torque should be modeled as an input which is part of the B matrix. 2) You are attempting to symbolically utilize the SS function and this cannot be done.
If you want to model the system I would suggest Simulink. Otherwise you can linaerize the model at difference points along the arc.
댓글 수: 0
참고 항목
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!