How to implement a simscape cam component (variable ratio transmission)?

1 view (last 30 days)
Hello,
I am trying to make a cam component in simscape. A cam has a fixed relation between the input shaft angle (phi_in) and the output shaft angle (phi_out). It can be regarded as a sort of variable ratio transmission, where the transmission ratio is function of the input angle. phi_out = f(phi_in); w_out = dfdphi_in(phi_in)*w_in t_in = -dfdphi_in(phi_in)*t_out
When I simulate the model, I get "Initial conditions solve failed to converge". What is the reason for this? How can I diagnose the initial conditions? If I put a spring+damper between the cam component and the cam follower inertia, the simulation works.
In the explanation for a variable ratio transmission http://www.mathworks.nl/help/physmod/sdl/ref/variableratiotransmission.html it is mentioned that the transmission ratio cannot be negative. In a cam component, the instantaneous transmission ratio crosses zero. Is this maybe the reason for the numerical problems of my cam component? I don't see how this is a problem physically. Is it a problem numerically?
Thank you!
My component looks as follows: component cam % Cam % The block represents an ideal cam. % Connections S and O are mechanical % rotational conserving ports associated with the cam input and % output shaft, respectively. %
outputs A = {0,'rad'}; % A:right W = {0,'rad/s'}; % W:right end
nodes S = foundation.mechanical.rotational.rotational; % S:left O = foundation.mechanical.rotational.rotational; % O:right end
variables t_in = { 0, 'N*m' }; t_out = { 0, 'N*m' }; phi_in = {0, 'rad'}; phi_out = {0, 'rad'}; end
function setup % Parameter range checking end
branches t_in : S.t -> *; t_out : O.t -> *; end
equations let f = 5*cos(phi_in); dfdphi_in = -5*sin(phi_in); in -dfdphi_in * t_out == t_in; dfdphi_in * S.w == O.w; phi_in.der == S.w; phi_out.der == O.w; A == f; W == dfdphi_in * S.w; end end
end

Answers (0)

Categories

Find more on Composite Components in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!