Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
33 views11 pages

CS Lab7 Ali Report

This document describes a lab experiment to design PI and PD controllers using MATLAB and Simulink. The objectives are to design a PI controller based on a desired settling time and damping ratio, and to design a PD controller with the same. Theoretical calculations are shown to determine the controller gains. Code is provided to simulate the step response in MATLAB. Simulink models are created to visualize the system response with the controllers. Results are analyzed and found to match between the two tools.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views11 pages

CS Lab7 Ali Report

This document describes a lab experiment to design PI and PD controllers using MATLAB and Simulink. The objectives are to design a PI controller based on a desired settling time and damping ratio, and to design a PD controller with the same. Theoretical calculations are shown to determine the controller gains. Code is provided to simulate the step response in MATLAB. Simulink models are created to visualize the system response with the controllers. Results are analyzed and found to match between the two tools.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Namal University, Mianwali

Department of Electrical Engineering


EE 361L: Control Systems Lab

Lab 7
To Design PI and PD controller to check the system response using
Simulink

Student’s Name Muhammad Ali


Roll No. NIM-BSEE-21-34
Date Performed 19/11/2023
Marks Obtained

Instructor’s signature

Course Instructor Dr Sami Ud Din

Lab Engineer Engr.Faizan


Fall 2023 Control Systems Lab

Table of Contents
Introduction............................................................................................................................................. 2
Lab Objective: ........................................................................................................................................ 3
Apparatus ................................................................................................................................................ 3
Lab Tasks: ............................................................................................................................................... 3
Question # 1.1: ........................................................................................................................................ 3
MATLAB PART ............................................................................................................................... 4
Theoritical Calculation ................................................................................................................. 4
Code: .............................................................................................................................................. 5
Result: ............................................................................................................................................ 5
SIMULINK PART ............................................................................................................................ 6
Circuit: ........................................................................................................................................... 6
Result: ............................................................................................................................................ 6
Explanation ................................................................................................................................... 6
Question # 1.2: ........................................................................................................................................ 7
Theoritical Calculation: ............................................................................................................... 7
Code: .............................................................................................................................................. 8
Result: ............................................................................................................................................ 8
SIMULINK PART ............................................................................................................................ 9
Circuit: ........................................................................................................................................... 9
Result: ............................................................................................................................................ 9
Explanation ............................................................................................................................................. 9
Conclusion: ........................................................................................................................................... 10

Introduction
PID and PD controllers are two of the most common types of feedback controllers used in control
systems. PID controllers use proportional, integral, and derivative gain terms to adjust the output

Page2
Fall 2023 Control Systems Lab

of the controller in order to minimize the error between the desired and actual output of the system.
PD controllers use proportional and derivative gain terms to achieve this goal. Simulink is a
graphical modeling environment that can be used to simulate and design control systems. To design
a PI or PD controller in Simulink, you can use the PID Controller block. This block allows you to
specify the proportional, integral, and derivative gains of the controller.

Lab Objective:
• To design Proportional Integral controller using MATLAB/Simulink
• To design Proportional Derivative controller using MATLAB/Simulink

Apparatus
Computer with installed MATLAB software

Lab Tasks:
Question # 1.1:
Design a PI controller using theoretical calculations. If settling time Ts=0.07s and damping ratio zeta=0.82 and
find the step response of system with controller using both MATLAB and Simulink.

Page3
Fall 2023 Control Systems Lab

MATLAB PART
Theoritical Calculation

Page4
Fall 2023 Control Systems Lab

Code:
num=[112.27 4855.30]
den=[1 114.27 4855.30]
G=tf(num,den)
step(G)
Result:

Page5
Fall 2023 Control Systems Lab

SIMULINK PART
Circuit:

Result:

Explanation

Page6
Fall 2023 Control Systems Lab

Question # 1.2:
Design a PD controller using theoretical calculations. If settling time T p=0.14s and damping ratio zeta=0.3 and
find the step response of system with controller using both MATLAB and Simulink.

Theoritical Calculation:

Page7
Fall 2023 Control Systems Lab

Code:
num=[7.112 543.1904]
den=[1 14.112 553.1904]
G=tf(num,den)
step(G)
Result:

Page8
Fall 2023 Control Systems Lab

SIMULINK PART
Circuit:

Result:

Explanation

Page9
Fall 2023 Control Systems Lab

Conclusion:
In this lab, we successfully designed and implemented PI and PD controllers using MATLAB and
Simulink. We calculated the controller gains based on the desired settling time and damping ratio for each
controller type. We simulated the step response of the system with both controllers and analyzed the
results. The Simulink models accurately represented the system behavior with the respective controllers.
The simulation results matched the MATLAB results, validating the models' accuracy. The Simulink
models provided visual representations of the system's behavior, facilitating understanding and analysis.
Overall, the lab successfully demonstrated the design and implementation of PI and PD controllers for
system response control using MATLAB and Simulink.

P a g e 10
Fall 2023 Control Systems Lab

Lab Rubric

Performance Allocated
Domain Excellent (10) Good (7-9) Satisfactory (4-6) Unsatisfactory (13) Poor (0)
indicator Marks

Outcomes are Outcomes are not


All Outcomes Outcomes are
partially analyzed properly
Cognitive Lab Demonstration are critically partially analyzed / Outcomes are not
but need more analyzed/student
(20%) (C) analyzed in a need minor analyzed
emphasis regarding understanding is
meaningful way. improvement. conclusion. weak.

All tasks
Most tasks Some tasks Most tasks
Task Completion completed All task incomplete
completed correctly completed correctly incomplete or
(P) correctly in or incorrect
in given time in given time incorrect
given time

Psychomotor Correct code but Slightly incorrect Almost Incorrect


Code (P) Correct Code Code not Submitted .
(60%) without explanation code code

Most Some
Output correctly Most of the required
Output/Figures/Plots Output/Figures/Plots Output/Figures/Plots
Output (P) shown with Output/Figures/Plots
displayed with displayed with not displayed
proper labeled not displayed
proper labeled proper labeled

Perform as an
Actively perform as Partially perform as Does not perform
Affective individual or in a Have not attend the
Discipline (A) an individual or in a an individual or in a any task individual
(20%) group with lab session
group group or in a group
enthusiasm

You might also like