Mor,
Motor Modeling
The only reason I mentioned the motor issue is that you had a resistance and inductance but eliminated them (from a dynamics point of view) by forcing current. With the new model, your resistance and inductance now have an effect. Note that the L/R time constant of that motor is approximately 0.0005 (0.5 ms). On the time scales you seem to be considering, it is very fast. This means that you can probably ignore the motor dynamics and remove the resistor and inductor and just command a current to the emf component. Alternatively, you can keep your new, more realistic motor model and control it with your PI controller. The PI controller you designed is very slow for that motor. Your response takes seconds but the motor can respond significantly faster when controlled (I mention this just to help your future modeling efforts). Your current loop bandwidth will be your limiting factor (which depends on your control).
Modeling Inertia
The inertia in the model I provided is behaving correctly. You are commanding torque (i.e. current) to the motor. By changing the inertia of the flywheel or of the motor, you do not significantly change the torque transferred from the motor to the pendulum -- you only affect how fast the rotor accelerates. Torque is Torque -- your control is pushing against a rotating mass to create torque. You command the torque and over a wide range of parameters, you get the torque you command. (To verify this, plot the motor shaft torque and change parameters). That torque then accelerates an inertia, so the larger the inertia the slower the acceleration. BUT the torque is (roughly) the same and the pendulum is "kicked" by roughly the same amount.
However, your instinct is also correct that a larger rotor would swing less! The reason is usually when we significantly increase the inertia, we also increase the weight of the structure -- As I said in my last post, the rotor (and inertia) models do not add non-rotating mass so you would need to model a larger inertia by increasing the inertia AND increasing the pendulum mass. If you increase the mass, THEN, you would get a significant change in the swing due to a given torque. This is the affect you expected to see. To "properly" model this in WSM, I would make my mass be a function of the rotor inertia (or vice-versa) -- there are many equations relating mass and inertia for many different shapes. You can model the rotor as a cylinder and the moving arms sticking out have relatively little mass but relatively lots of inertia. Alternatively, weigh your components and separately estimate or measure the inertia experimentally.
Why the motor should use a flange to attach to the system
The proper way to model a motor mounted on something moving is to have the torque generated between the rotor and the stator. The rotor is free to rotate. The stator tries to rotate but is stopped by the motor mount. To model the affects of this, you need to transfer those torques to the rest of the structure (unless that structure is immovable). When you attach the EMF to ground, those torques are eliminated and you break what you are trying to model. To see this, take a look at how modelica models motors. They extend the "PartialBasicMachine" class which has two inertias, some friction and an optional reaction flange. You need the reaction flange as well.
Why your original model appeared to work
Your original model is doing a strange type of torque transfer. You use an inertia to push back on the motor mount through friction. Because of this you do get a reaction torque and it appears to work. However, it is a flawed model for the motor. Motors do not rely on velocity dependent friction to push on their mounts. They use the torque generated by the emf in the motor to push on the mounts. Your model will alter torque transferred to the mount as a function of rotor speed which is why the inertia magnitude matters in your original model -- However, the inertia should not matter if the motor is modeled in a way that it actually works.
UPDATE: In thinking about my answer, I wanted to clarify why it is not a good physical representation of a motor to have more torque transfer to the base increase as the speed increases. As a mental exercise: run a motor at two different constant speeds. In both cases, the reaction torque (without losses) is zero and no reaction force is passed to the motor mount. With your friction-based torque transfer model, significant, non-zero torque is transferred in both cases, with the higher-speed case transferring more torque. This is non-physical behavior and not a good model for a motor.
I hope this helps
Regards,
Neil