wolson/mime3380/lecture 7 m… · web view(from matlab)finally, complete the loops, establish the...
TRANSCRIPT
Notes for MIME 3380 Controls Lecture 7
Screen formatting command used:format compact
Complex numbers:v = 12 + 14*j ... note Matlab defaults to iv = complex(12,14)w = 2+5iv+wv-wv*wv/wv^3 ... Note: read result as -5328. +3304. iu = v^-3real(u)imag(u)r =abs(u) ... the magnitude or vectorial lengtha=angle(u) ... argument in radiansx = r*exp(a*i)y = r*(cos(a)+ i*sin(a))u
Clear Workspace (Use Edit > Clear Workspace in the menu)
Workspace commandsclear allclc
System representations:
k = 250000 kt = 5000000
b = 125000 m = 250000 mu = 50A = [ 0 1 0 0; -k/m -b/m k/m b/m; 0 0 0 1; ... NOTE the use of ...
k/mu b/mu -(k+kt)/mu -b/mu]B = [0;0;0;kt/mu] C = [1,0,0,0] D= [ 0 ] sys = ss(A,B,C,D)
System response:step(sys)Step(0.01*sys)impulse(sys)
Page 1
Notes for MIME 3380 Controls Lecture 7
Simulink
either from the icon or the command, simulink
To build models, drop and drag into place.
Connect lines either be using the control key or by clicking point to point
Developing the following model
Page 2
Notes for MIME 3380 Controls Lecture 7
Using the component representation approach:
Begin by placing the parameters and developing the state variables as integrators;
Also comment your model!
Then using the equations build the parts of the equations:
Page 3
Notes for MIME 3380 Controls Lecture 7
Finally, complete the loops, establish the input and test the model:
Another way to set the parameters using Matlab: (note: use of Mux to put two curves on graph and also not the form of zr in Matlab)
Page 4
(From Matlab)
Notes for MIME 3380 Controls Lecture 7
Another approach using the System Model (less desirable):
Page 5