필터 지우기
필터 지우기

Simulating a non linear model in Simulink

조회 수: 2 (최근 30일)
Ryan Rizzo
Ryan Rizzo 2018년 11월 28일
편집: Ryan Rizzo 2018년 11월 28일
I am trying to model the non-linear system.
System Equations in Vector format:
Physical Parameters:
where x01, x02 and x03 are initial conditions representing displacement, velocity and acceleration.
In order to simulate this non-linear model I used a function block in Simulink:
My question is: Should I inlcude the initial conditions to the code below, and if so, how can I achieve this? Since in the code below the initial conditions are unused if initialized as they are.
function [xdot,y] = fcn(x,u)
% define your constants
g = 9.81;
m = 0.05;
R = 1;
L = 0.01;
C = 0.0001;
% x1 = 0.012;
% x2 = 0;
% x3 = 0.84;
% nonlinear set of equations
xdot = [x(2); g-((C/m)*(x(3)/x(1))^2); -((R/L) +(((2*C)/L)*(((x(2)*x(3))/((x(1))^2)))))] + [0;0;1/L]*u;
y = x';

답변 (0개)

카테고리

Help CenterFile Exchange에서 Modeling에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by