How would I visually represent my State Space Model?
4 ビュー (過去 30 日間)
古いコメントを表示
I have made a program to determine the state space model of a ball and beam system. I wanted to visualise the output as I believe a graph is more beneficial than a series of matricies. However, I do not know how.
I was thinking of shoowing the displacement along the beam across time
Below is my program , any advice would be appreciated.
clear;
close all;
clc;
%% Setting Base Parameters %%
m = 0.5; % Allows Input for Mass of Ball %
R = 0.02; % Allows Input for Radius of Ball %
d = 1; % Allows Input for Lever Arm offset of Ball %
g_acc = 9.8; % Sets Value of Gravitational acceleration %
L = 10; % Allows Input for Beam Length %
Mu = 0.35; % Allows Input for Co-efficient of Friction %
Fr = -(Mu*m*g_acc); % Calculates Friction of the Beam %
T = 10; % Allows viewing of system within a specific time frame %
%% Solid Ball System %%
%% Calculation for Solid Ball Transfer Function %%
R2 = R^2;
J = (2/5)*m*R2; % Calculates Moment of Inertia %
s = tf('s');
SB_TF = -(m*g_acc*d)/(L*(J/R2)+m*(s^2))
%% Graphing Transfer Function of Solid Ball %%
%% Linearised State Space Model of Solid Ball %%
H = - m*g_acc/(J/(R^2) + m); % Characteristic Equation %
A = [0 1 0 0;
0 0 H 0;
0 0 0 1;
0 0 0 0];
B = [0 0;
0 ((1/(J/(R^2) + m))*Fr);
0 0;
1 0];
C = [1 0 0 0];
D = 0*C*B;
SB_Fr = ss(A, B, C, D)
9 件のコメント
回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!