Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

MATHLAB HELP!! Controller design and simulations are often done by Simulink; how

ID: 2081331 • Letter: M

Question

MATHLAB HELP!!

Controller design and simulations are often done by Simulink; however it is possible to do this in MATLAB also, though it is not as flexible. To get some practice with a PID controller design, you are going to design a PID controller for the following transfer function (same model as the subject of simulations on pages 4 and 5 of Handout 6): G(s) = 3.60.6 times 10^6/s^2 + 2.667 times 10^5 + 1.124 times 10^6 The goal is to select PID gains so that the plant output due to a step input to the feedback system has no steady state error and an overshoot less than 10%. MATLAB pidtune command is sufficient for this purpose. a. Draw the feedback system block diagram. b. Define above transfer function in MATLAB and use the following commands to create the PID and find overall feedback system unit step responses:

Explanation / Answer

MATLAB code for default info crossover frequency design.

>> G=tf([3.6036*10^6],[1 2.667*10^5 1.124*10^6])

Transfer function:
3.604e006
--------------------------
s^2 + 266700 s + 1.124e006

>> OPT = pidtuneOptions('Crossover',2*Info.CrossoverFrequency);
>> [C Info] = pidtune(G,'pid',OPT)
Continuous-time I-only controller:

1
Ki * ---
s

with Ki = 0.25398

Info =

Stable: 1
CrossoverFrequency: 0.8000
PhaseMargin: 79.2519

>>

MATLAB code for perticilar cross over frequency design.

>> G=tf([3.6036*10^6],[1 2.667*10^5 1.124*10^6])

Transfer function:
3.604e006
--------------------------
s^2 + 266700 s + 1.124e006

>> OPT = pidtuneOptions('Crossover',2*(10/100));
>> [C Info] = pidtune(G,'pid',OPT)
Continuous-time I-only controller:

1
Ki * ---
s

with Ki = 0.062452

Info =

Stable: 1
CrossoverFrequency: 0.2000
PhaseMargin: 87.2830

>>