diff --git a/+acrobot/acrobot_torque_in.m b/+acrobot/acrobot_torque_in.m new file mode 100644 index 0000000..4e34158 --- /dev/null +++ b/+acrobot/acrobot_torque_in.m @@ -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 diff --git a/+acrobot/acrobot_torque_out.m b/+acrobot/acrobot_torque_out.m new file mode 100644 index 0000000..14be269 --- /dev/null +++ b/+acrobot/acrobot_torque_out.m @@ -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 diff --git a/acrobot_sim.slx b/acrobot_sim.slx index 564a041..b7f3294 100644 Binary files a/acrobot_sim.slx and b/acrobot_sim.slx differ