So I have to create a control system simulation from scratch for the following scenario. For a bicycle-like system, there is a motor attached directly to the rear wheel. From here, the goal of the control system is to use the motor to maintain a constant speed, rejecting a small disturbance force pushing against the system from the front.
With the context out of the way, I've been struggling to create the transfer function that allows me to get the linear velocity from the rest of the system. So far, I've tried the process vaguely outlined in the picture below, where I've tried to rearrange a DC motor system to output torque instead of angular position, and then scaled that torque into a linear force before applying that force to the mass and air resistance to get the speed output.
(R and L are the internal resistance and inductance of the motor, respectively, Rw is the wheel radius, m is the total mass of the system J is the inertia of the rear wheel, b is the air resistance drag, Ke and Kt are motor coefficients and K is the constant for a tiny spring-like component. 1/(Js^2+K) is supposed to be the inertial load of the motor, and although I'm starting to suspect the spring component isn't necessary the system acts worse without it.)
The issue is that, when I try to simulate this open-loop system in Matlab, I get a rise/settling time that's almost 100 times larger than I'd consider acceptable for this kind of system. The poles and zeros aren't exactly confidence-inspiring either, with unstable zeros and poles that hang a fraction of a unit from the imaginary axes. None of my experimenting with controllers, closing the loop or tweaking my imperfect input variables has done anything to change the overall structure of the output.
So is there an easier or well established method to create the kind of transfer function I'm looking for? I've been hammering away at this for long enough that I'm starting to think the process I tried isn't fixable.
With everything said, I apologize if my terminology is incorrect or I'm missing something super simple. Control systems are not my forte, and I've only started with them a couple of months ago. Thank you so much for your time!
Edit: Here are the plots requested. These definitely don't look right. Also, here's a diagram that represents what I'm trying to refer to in my second comment.