Date post: | 09-Feb-2018 |
Category: |
Documents |
Upload: | nicholas-ang |
View: | 218 times |
Download: | 0 times |
7/22/2019 APC 2009 MATLAB Demo 1 Slides
http://slidepdf.com/reader/full/apc-2009-matlab-demo-1-slides 1/16
MATLAB / SIMULINK
Lab Demonstration No.2by Faye & Shahin 2009
ChE 411/558 Advanced Process Control
7/22/2019 APC 2009 MATLAB Demo 1 Slides
http://slidepdf.com/reader/full/apc-2009-matlab-demo-1-slides 2/16
Contents
Simulink ® Control Design Graphical User
Interface (GUI):1. Configure the model and GUI for controller
design
2. Design a PID controller using Ziegler-Nichols tuning and Bode graphical design.
3. Simulate the closed-loop system.
7/22/2019 APC 2009 MATLAB Demo 1 Slides
http://slidepdf.com/reader/full/apc-2009-matlab-demo-1-slides 3/16
1. Problem
Cascade control: CST composition mixer
AC
AT
Product, C
FT
FC
F1, C1
F2, C2
7/22/2019 APC 2009 MATLAB Demo 1 Slides
http://slidepdf.com/reader/full/apc-2009-matlab-demo-1-slides 4/16
CV: Product composition, MV: F1 flow rate,
DV: Changes in F1 flow rate
Aim: To eliminate the disturbance from F1 flow
rate, and good setpoint tracking.Tuning Criteria:1.The fluctuations after tuning for disturbance
rejection should lie within 5%.2.Whereas for setpoint tracking, the overshoot
less than 50%, and
3.The rise time less than 5 seconds.
7/22/2019 APC 2009 MATLAB Demo 1 Slides
http://slidepdf.com/reader/full/apc-2009-matlab-demo-1-slides 5/16
Process transfer functions:
Gpp: Product composition subject to changes in F1flowrate:
Gps: Valve stem position subject to changes in F1
flowrate:
Assume negligible sensor dynamics.
s
PPe
ssF
sC G 19.0
1 165.0
73.0
)(
)( −
+
==
s
PS e
ssF s X G
02.0
111.0
1
)(
)( −
+
==
7/22/2019 APC 2009 MATLAB Demo 1 Slides
http://slidepdf.com/reader/full/apc-2009-matlab-demo-1-slides 6/16
Note
Model configuration in Simulink:
‘Continuous’ Transfer Function, Transport Delay
‘Sources’ Step, Clock ‘Sinks’ To Workspace, Scope
‘Math Operations’ Sum (double-click to change
the signs) ‘Simulink Extras’ ‘Additional Linear’ PID
Controller
NOTE:
Don’t forget to change all ‘To Workspace’ blocks to array format
7/22/2019 APC 2009 MATLAB Demo 1 Slides
http://slidepdf.com/reader/full/apc-2009-matlab-demo-1-slides 7/16
7/22/2019 APC 2009 MATLAB Demo 1 Slides
http://slidepdf.com/reader/full/apc-2009-matlab-demo-1-slides 8/16
1. Open-loop step test
2. Design the controllers using Ziegler-Nicholsmethod:
Select Tools > Control Design > Compensator
Design
Click ‘Select Blocks’ tick the controllers - OK
Right click on the input line to the closed loop
Select ‘Linearization Points > Input Point’ .
Right click on the output line from the closed loop
Select ‘Linearization Points > Output Point’.
Click ‘Tune Blocks’.
2. Controller Design & Tuning
7/22/2019 APC 2009 MATLAB Demo 1 Slides
http://slidepdf.com/reader/full/apc-2009-matlab-demo-1-slides 9/16
• Under the tab ‘Analysis plot’, select ‘Step’
and tick the closed loop box.• Under the tab ‘Automated tuning’, select
any of the design method, in this case, we
have chosen PID tuning ZN open loop Update compensator Update simulinkblock parameters
• Alternatively, you can use ‘Graphicaltuning’/ ‘Compensator editor’.
• Check if the responses meet the tuning
criteria
7/22/2019 APC 2009 MATLAB Demo 1 Slides
http://slidepdf.com/reader/full/apc-2009-matlab-demo-1-slides 10/16
After tuning: ‘Store Design’
7/22/2019 APC 2009 MATLAB Demo 1 Slides
http://slidepdf.com/reader/full/apc-2009-matlab-demo-1-slides 11/16
Disturbance Rejection:
Fluctuationsappro. 3%
when subjectto a unit stepchange in
D(s).
0 1 2 3 4 5 6 7 8 9 10-0.04
-0.03
-0.02
-0.01
0
0.01
0.02
0.03
0.04
0.05
7/22/2019 APC 2009 MATLAB Demo 1 Slides
http://slidepdf.com/reader/full/apc-2009-matlab-demo-1-slides 12/16
>> stepinfo(y)
ans =
RiseTime: 3.8370SettlingTime: 139.7210
SettlingMin: 0.8769SettlingMax: 1.4054Overshoot: 40.4407
Undershoot: 0Peak: 1.4054
PeakTime: 22
Criteria achieved~
Setpoint Tracking:
0 2 4 6 8 10
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
1.1
1.2
1.3
1.4
1.5
7/22/2019 APC 2009 MATLAB Demo 1 Slides
http://slidepdf.com/reader/full/apc-2009-matlab-demo-1-slides 13/16
3. Stability Analysis
Carry out at least 1 stability analysis, such as
open-loop bode plot, root locus, nyquist,nichols, etc.
Describe.
7/22/2019 APC 2009 MATLAB Demo 1 Slides
http://slidepdf.com/reader/full/apc-2009-matlab-demo-1-slides 14/16
4. Performance Evaluation Disturbance
rejection +5 and +10
increase in
D(s): Others: +5 and
-5,
Etc. Describe.
0 2 4 6 8 10-0.4
-0.3
-0.2
-0.1
0
0.1
0.2
0.3
0.4
D(s)=+5
D(s)=+10
Can your controller eliminate large
disturbances? What range?
>> plot(t,y,t1,y1) > > legend('D(s)=+5','D(s)=+10')
7/22/2019 APC 2009 MATLAB Demo 1 Slides
http://slidepdf.com/reader/full/apc-2009-matlab-demo-1-slides 15/16
Setpoint tracking
+1, +2 and +5step changesin Ysp(s):
Others: -1,-2, -5changes
Etc.
Describe. Can work well for
large setpoint
changes?
0 1 2 3 4 5 6 7 8 9 100
1
2
3
4
5
6
7
8
Ysp(s)=+1
Ysp(s)=+2
Ysp(s)=+5
0 2 4 6 8 10 12 14 16 18 20-4
-3
-2
-1
0
1
2
3
4
5
7/22/2019 APC 2009 MATLAB Demo 1 Slides
http://slidepdf.com/reader/full/apc-2009-matlab-demo-1-slides 16/16
Have fun~!
Reference: [1] The MathWorksTM
Do free out some time to go through this tutorial:
http://www.mathworks.com/access/helpdesk/help/toolbox/slc
ontrol/index.html?/access/helpdesk/help/toolbox/slcontrol/gs/ brrzwxv.html