by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Auxiliary function
Introduced first in SolidGeometry 5.0, Creation date: 2021-02-08, Last change: 2025-09-15
[y,ai]=MGTmotor([u,m,d,c,ss])
u: | input signal | |
m: | mass constant kg; default is 0.1kg (increasing means higher mass) | |
d: | damper constant kg/sec; default is 0.01 kg/sec (increasing means higher damping) | |
c: | spring constant kg/sec^2; default is 1 kg/sec^2 (increasing means higher stiffness) | |
ss: | if true, progress is shown step by step |
y: | motor response | |
ai: | ai coifficients calculated from m d c |
Impulse=[0 1 1 1 1 1 1 1 1 1 1 1]
MGTmotor(Impulse,1,2,1); % Standard motor behavior
MGTmotor(Impulse,0.1,0.01, 1);
MGTmotor([0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1],1,0.2, 0.01); % Spread of any other contagious disease or any product in 100 percent market distribution
ai=[ 4.000,-4.000,1.000]
MGTsystemIIR(MGTsystemFIR(Impulse,ai),ai)