MATLAB project

profileturtletime98
ProjectAssignment3.pdf

ENEE 3533 Classical Control System Design Spring 2021

Matlab Project

Compensator Design & Simulation

Objective

Your term project will be to design and simulate PI compensators for a control system using Matlab/Simulink (using Octave is also accepted).

System Model

FYI, a possible block diagram of a speed control scheme for a hybrid electric vehicle driven by a dc motor is

With typical values of the parameters, the system can represented in a simplified unity-feedback form as follows:

where R(s) is the reference voltage, C(s) = KssV (s) is the output voltage of the speed sensor, and GSC(s) denotes a controller (to be designed).

Assignment

Task 1. Proportional compensation Assume GSC(s) is a proportional (P) controller, i.e., GSC(s) = KP .

(a) Find the closed-loop system transfer function and determine the range of KP > 0 for stability.

(b) For the uncompensated closed-loop system (i.e., with KP = KP1 = 1):

—Simulate and plot the system unit-step response c(t).

—Determine (from the plot) the P.O., peak time Tp, rise time Tr, settling time Ts, and steady-state error estep(∞) in % of the input.

—Find also eramp(∞) =? —Plot the Bode diagrams and indicate the bandwidth, and the phase and gain margins.

(c) Find KP = KP2 that yields a steady-state error estep(∞) = 1%.

—Repeat part (b) with the found KP2.

(d) Plot the RL for KP and determine KP = KP3that yields critically damped closed-loop response.

—Repeat part (b) with the found KP3.

(e) Compare the results from (b), (c) and (d), and make comments.

Task 2. PI compensation Now assume GSC(s) is a PI controller, i.e.

GSC(s) = KP + KI s = KP (s + KI/KP)

s (1)

(a) With KP = KP2 as determined in Task 1 (c), find KI2 that yields a steady-state error eramp(∞) = 2.5%. For this KI2, find estep(∞) =?

—Repeat the simulation of Task 1 (b) with GSC(s) = KP2 + KI2 s .

Compare this PI controller with the P controller KP2 from Task 1 (c).

(b) Now, assume in Eqn. (1) that KI/KP = 0.4, i.e., GSC(s) = KP (s+0.4)

s .

—Plot the RL for KP and from the RL determine KP = KP4that yields a closed-loop step response with P.O. = 10%.

—Simulate and plot the unit-step system response c(t) and determine (from the plot) the actual P.O., peak time Tp, rise time Tr, settling time Ts, and steady state error estep(∞) in % of the input. Is the actual P.O. = 10%? Why?

—Plot also the Bode diagrams and indicate the bandwidth, and the phase and gain margins.

(c) Design a PI controller (choose both KP an KI) such that the closed-loop system achieves the following design objectives:

(i) P.O. ≤ 4.32%, (ii) Ts ≤ 4sec, (iii) estep(∞) = 0, (iv) eramp(∞) ≤ 2%

—Simulate and plot the step and ramp responses of the compensated system to illustrate how your design actually achieves the objectives.

—Plot also the Bode diagrams and indicate the bandwidth, and the phase and gain margins.

—Make comments on how the compensation was achieved, in terms of the frequency responses in comparison with the previous (P and PI) compensators.

Task 3: Summary & Comparison.

• Summarize your results from all tasks (except 1 (a)) in a table with the following format:

Task KP KI P.O. Tp Tr Ts estep(∞) eramp(∞) ωB G.M. φPM 1 (b) 1 (c) 1 (d) 2 (a) 2 (b) 2 (c)

• Which one of your designs provides the best performance? Why?

2

Organization

For all students: everything (design, program code, report) must be individual. Consultation with the instructor is available through email if you have some questions.

Report

As a minimum, you should include the following information in your Project Report (must be in PDF format):

• Cover Page: Title, author, date, course information.

• Introduction: Concise description of the problem, project objectives and tasks, and content of the report.

• Design and Simulation Results: For each task give description of the performed work and obtained analytical and simulation results. Include: design objectives, method used, details of your design, iterations performed, simulation results, your comments, findings, etc.

• Conclusions: Provide brief conclusions of your work.

• References: List all references used.

• Appendix: Matlab code

Deliverables (to be uploaded on Moodle under Project)

1. One PDF-file with the Report

2. One Zip-file including all program code files

Due (uploaded on Moodle): 5/4/2021 Assigned: 4/20/2021

3