Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions +acrobot/acrobot_torque_in.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
classdef acrobot_torque_in < matlab.System

% Public, tunable properties
properties

end

properties(DiscreteState)

end

% Pre-computed constants
properties(Access = private)

end

methods(Access = protected)
function setupImpl(obj)
% Perform one-time calculations, such as computing constants
end

function tau = stepImpl(obj, pwm, tau_in)
tau = 0; % Translate pwm to tau using resistance
end

function resetImpl(obj)
% Initialize / reset discrete-state properties
end
end
end
30 changes: 30 additions & 0 deletions +acrobot/acrobot_torque_out.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
classdef acrobot_torque_out < matlab.System

% Public, tunable properties
properties

end

properties(DiscreteState)

end

% Pre-computed constants
properties(Access = private)

end

methods(Access = protected)
function setupImpl(obj)
% Perform one-time calculations, such as computing constants
end

function pwm_ratio = stepImpl(obj, tau, tau_in)
pwm_ratio = 1; % Between 1 and 0, where 1 is maximum speed, 0 is mininum speed
end

function resetImpl(obj)
% Initialize / reset discrete-state properties
end
end
end
Binary file modified acrobot_sim.slx
Binary file not shown.