Modeling an eccentric shaft with Simscape

5 visualizaciones (últimos 30 días)
Martin O'Connor
Martin O'Connor el 6 de Mayo de 2019
Respondida: Olalowo Olaleye el 19 de Sept. de 2019
I am trying to model an eccentric shaft in the simscape mechanical domain, i.e. a linear displacement varying sinusoidally with a frequency proportional to the angular displacement of a shaft. I have written a component for this (see below) that seems to be working, however it is very slow to solve. Does anyone have any advice on how to make this model run more efficiently, or if there is a different method that would achieve the same thing? I have also tried using just a linear velocity source, however the displacement was drifting over time and causing the simulation to crash.
Thanks,
Martin
component EccentricShaft
nodes
A = foundation.mechanical.rotational.rotational; % A:left
P = foundation.mechanical.translational.translational; % P:right
end
parameters
offset = { 0, 'rad'}; % Initial angular position
initPos = {0, 'm'}; % Initial linear position
eccentricity = { 0.05, 'm'}; %Shaft Eccentricity
initV = {0, 'm/s'}; %Initial linear velocity
initomega = {0,'rad/s'}; %Initial angular velocity
end
variables(Access = private)
V = {value = initV, priority = priority.high}; % V:Left
X = {value = initPos, priority = priority.high}; % X:Left
F = { 0, 'N' }; % F:Left
theta = {value = offset, priority = priority.high} % theta:Right
omega = {value = initomega, priority = priority.high}; % omega:Right
tau = { 0, 'N*m'}; % tau:Right
end
branches
tau : A.t -> *;
F : P.f -> *;
end
equations
assert(eccentricity>0)
X - eccentricity/2*(1-cos(theta)) == 0;
V == P.v;
omega == A.w;
X.der == V;
theta.der == omega;
F*V - omega*tau == 0;
end
end

Respuestas (1)

Olalowo Olaleye
Olalowo Olaleye el 19 de Sept. de 2019
A more diligent and concise approach must be used here.

Categorías

Más información sobre Creating Custom Components and Libraries en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by