wolson/mime3380/lecture 7 m… · web view(from matlab)finally, complete the loops, establish the...

6
Notes for MIME 3380 Controls Lecture 7 Screen formatting command used: format compact Complex numbers: v = 12 + 14*j ... note Matlab defaults to i v = complex(12,14) w = 2+5i v+w v-w v*w v/w v^3 ... Note: read result as -5328. +3304. i u = v^-3 real(u) imag(u) r =abs(u) ... the magnitude or vectorial length a=angle(u) ... argument in radians x = r*exp(a*i) y = r*(cos(a)+ i*sin(a)) u Clear Workspace (Use Edit > Clear Workspace in the menu) Workspace commands clear all clc System representations: k = 250000 kt = 5000000 b = 125000 m = 250000 mu = 50 A = [ 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) Page 1

Upload: others

Post on 11-May-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: wolson/mime3380/Lecture 7 m… · Web view(From Matlab)Finally, complete the loops, establish the input and test the model: Another way to set the parameters using Matlab: (note:

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

Page 2: wolson/mime3380/Lecture 7 m… · Web view(From Matlab)Finally, complete the loops, establish the input and test the model: Another way to set the parameters using Matlab: (note:

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

Page 3: wolson/mime3380/Lecture 7 m… · Web view(From Matlab)Finally, complete the loops, establish the input and test the model: Another way to set the parameters using Matlab: (note:

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

Page 4: wolson/mime3380/Lecture 7 m… · Web view(From Matlab)Finally, complete the loops, establish the input and test the model: Another way to set the parameters using Matlab: (note:

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)

Page 5: wolson/mime3380/Lecture 7 m… · Web view(From Matlab)Finally, complete the loops, establish the input and test the model: Another way to set the parameters using Matlab: (note:

Notes for MIME 3380 Controls Lecture 7

Another approach using the System Model (less desirable):

Page 5