Final Exam M.Eng. Amjad Elshenawy RTECS 2010 1 1 Gc(s)Gc(s) Gc(s)Gc(s) Controller n sensor noise ...

28
Final Exam M.Eng. Amjad Elshenawy RTECS 2010 1 1 G c (s) Controller + + n sensor noise + w load disturbance + G p (s) Plant u control y output + - r reference input, or set-point e sensed error

Transcript of Final Exam M.Eng. Amjad Elshenawy RTECS 2010 1 1 Gc(s)Gc(s) Gc(s)Gc(s) Controller n sensor noise ...

Page 1: Final Exam M.Eng. Amjad Elshenawy RTECS 2010 1 1 Gc(s)Gc(s) Gc(s)Gc(s) Controller   n sensor noise  w load disturbance  Gp(s)Gp(s) Gp(s)Gp(s) Plant.

Final Exam

M.Eng. Amjad Elshenawy

RTECS 2010

11

Gc(s)Gc(s)

Controller

+ + n

sensornoise

+

w load disturbance

+Gp(s)Gp(s)

Plant

ucontrol

youtput

+-

rreferenceinput, orset-point

esensed

error

Page 2: Final Exam M.Eng. Amjad Elshenawy RTECS 2010 1 1 Gc(s)Gc(s) Gc(s)Gc(s) Controller   n sensor noise  w load disturbance  Gp(s)Gp(s) Gp(s)Gp(s) Plant.

Instructions

RTECS 2010

2

Page 3: Final Exam M.Eng. Amjad Elshenawy RTECS 2010 1 1 Gc(s)Gc(s) Gc(s)Gc(s) Controller   n sensor noise  w load disturbance  Gp(s)Gp(s) Gp(s)Gp(s) Plant.

Instruction

•The exam is an open book exam•Internet and network connections are not

allowed•Create a new folder

“FirstName_LastName”

RTECS 2010

3

Page 4: Final Exam M.Eng. Amjad Elshenawy RTECS 2010 1 1 Gc(s)Gc(s) Gc(s)Gc(s) Controller   n sensor noise  w load disturbance  Gp(s)Gp(s) Gp(s)Gp(s) Plant.

Antenna Azimuth Position Control System

RTECS 2010

4

Page 5: Final Exam M.Eng. Amjad Elshenawy RTECS 2010 1 1 Gc(s)Gc(s) Gc(s)Gc(s) Controller   n sensor noise  w load disturbance  Gp(s)Gp(s) Gp(s)Gp(s) Plant.

Problem Description

•The aim is to control the antenna azimuth angle

RTECS 2010

5

Page 6: Final Exam M.Eng. Amjad Elshenawy RTECS 2010 1 1 Gc(s)Gc(s) Gc(s)Gc(s) Controller   n sensor noise  w load disturbance  Gp(s)Gp(s) Gp(s)Gp(s) Plant.

System Concept

•Closed loop control is used to control the antenna position

RTECS 2010

6

Page 7: Final Exam M.Eng. Amjad Elshenawy RTECS 2010 1 1 Gc(s)Gc(s) Gc(s)Gc(s) Controller   n sensor noise  w load disturbance  Gp(s)Gp(s) Gp(s)Gp(s) Plant.

Block Diagram

RTECS 2010

7

Page 8: Final Exam M.Eng. Amjad Elshenawy RTECS 2010 1 1 Gc(s)Gc(s) Gc(s)Gc(s) Controller   n sensor noise  w load disturbance  Gp(s)Gp(s) Gp(s)Gp(s) Plant.

Modelling The Physical System

RTECS 2010

8

Page 9: Final Exam M.Eng. Amjad Elshenawy RTECS 2010 1 1 Gc(s)Gc(s) Gc(s)Gc(s) Controller   n sensor noise  w load disturbance  Gp(s)Gp(s) Gp(s)Gp(s) Plant.

Model Name

•Create a model named▫FirstName_LastName_PhysicalSystem.mdl

RTECS 2010

9

Page 10: Final Exam M.Eng. Amjad Elshenawy RTECS 2010 1 1 Gc(s)Gc(s) Gc(s)Gc(s) Controller   n sensor noise  w load disturbance  Gp(s)Gp(s) Gp(s)Gp(s) Plant.

Physical System DescriptionPower Amplifier [2.5 Points]•Power Amplifier

▫To drive the dc Motor•The transfer function of the power

amplifier is given as

RTECS 2010

10

100

100)(

ssG

Page 11: Final Exam M.Eng. Amjad Elshenawy RTECS 2010 1 1 Gc(s)Gc(s) Gc(s)Gc(s) Controller   n sensor noise  w load disturbance  Gp(s)Gp(s) Gp(s)Gp(s) Plant.

Physical System DescriptionDC Motor [10 Points]•Armature controller DC Motor

RTECS 2010

11

neglected isfriction Static

02.0 :tcoefficienfriction Dynamic

03.0 :Inertia

:tCoefficien EMFBack

5.0 :constant ueMotor torq

0:inductance Armature

8:resistance Armature

d

TEMF

T

a

a

K

J

KK

K

L

R

Where

Page 12: Final Exam M.Eng. Amjad Elshenawy RTECS 2010 1 1 Gc(s)Gc(s) Gc(s)Gc(s) Controller   n sensor noise  w load disturbance  Gp(s)Gp(s) Gp(s)Gp(s) Plant.

Block Diagram

RTECS 2010

12

Page 13: Final Exam M.Eng. Amjad Elshenawy RTECS 2010 1 1 Gc(s)Gc(s) Gc(s)Gc(s) Controller   n sensor noise  w load disturbance  Gp(s)Gp(s) Gp(s)Gp(s) Plant.

Check Your Model (Optional)Compare with S-Function Model

RTECS 2010

13

Plant_Model_SFunction_Verification.zip

Page 14: Final Exam M.Eng. Amjad Elshenawy RTECS 2010 1 1 Gc(s)Gc(s) Gc(s)Gc(s) Controller   n sensor noise  w load disturbance  Gp(s)Gp(s) Gp(s)Gp(s) Plant.

Analogue Controller Design & Tuning

RTECS 2010

14

Page 15: Final Exam M.Eng. Amjad Elshenawy RTECS 2010 1 1 Gc(s)Gc(s) Gc(s)Gc(s) Controller   n sensor noise  w load disturbance  Gp(s)Gp(s) Gp(s)Gp(s) Plant.

Model Name

•Create a model named▫FirstName_LastName_Analogue_Controller

.mdl

RTECS 2010

15

Page 16: Final Exam M.Eng. Amjad Elshenawy RTECS 2010 1 1 Gc(s)Gc(s) Gc(s)Gc(s) Controller   n sensor noise  w load disturbance  Gp(s)Gp(s) Gp(s)Gp(s) Plant.

Potentiometer Transfer Functoin [2.5 Points]•Both input and output potentiometers

map the angle range [0 ... π] to the voltage range [0 ... 5V]

RTECS 2010

16

Page 17: Final Exam M.Eng. Amjad Elshenawy RTECS 2010 1 1 Gc(s)Gc(s) Gc(s)Gc(s) Controller   n sensor noise  w load disturbance  Gp(s)Gp(s) Gp(s)Gp(s) Plant.

Controller Implementation[15 Points]•Implement a PID controller•Tune the controller parameters using

Ziegler-Nichols Oscillation Method with the Tyreus & Luyben Tuning Values using either▫Manual tuning▫Tuning using Simulink control design and

the PID controller block from Simulink Extras Additional linear

RTECS 2010

17

Page 18: Final Exam M.Eng. Amjad Elshenawy RTECS 2010 1 1 Gc(s)Gc(s) Gc(s)Gc(s) Controller   n sensor noise  w load disturbance  Gp(s)Gp(s) Gp(s)Gp(s) Plant.

Controller Implementation (Cont.)[15 Points]•Apply a unit step input then using Matlab

calculate▫RiseTime▫SettlingTime▫Overshoot

RTECS 2010

18

Page 19: Final Exam M.Eng. Amjad Elshenawy RTECS 2010 1 1 Gc(s)Gc(s) Gc(s)Gc(s) Controller   n sensor noise  w load disturbance  Gp(s)Gp(s) Gp(s)Gp(s) Plant.

Digital Controller Design

RTECS 2010

19

Page 20: Final Exam M.Eng. Amjad Elshenawy RTECS 2010 1 1 Gc(s)Gc(s) Gc(s)Gc(s) Controller   n sensor noise  w load disturbance  Gp(s)Gp(s) Gp(s)Gp(s) Plant.

Model Name

•Create a model named▫FirstName_LastName_Digital_Controller.m

dl

RTECS 2010

20

Page 21: Final Exam M.Eng. Amjad Elshenawy RTECS 2010 1 1 Gc(s)Gc(s) Gc(s)Gc(s) Controller   n sensor noise  w load disturbance  Gp(s)Gp(s) Gp(s)Gp(s) Plant.

Digital Control Loop[5 Points]•Introduce the elements of the digital

control loop▫Quantizer▫Delay

•Design the system with a sampling time = 2ms

•No. Of bits used in quantization = 8 bits•Time delay in the loop = 1ms

RTECS 2010

21

Page 22: Final Exam M.Eng. Amjad Elshenawy RTECS 2010 1 1 Gc(s)Gc(s) Gc(s)Gc(s) Controller   n sensor noise  w load disturbance  Gp(s)Gp(s) Gp(s)Gp(s) Plant.

Controller Discretization[5 Points]•Perform discretization of the analogue

PID controller using Trapezoidal discretization method for both the integrator and the derivative.

RTECS 2010

22

Page 23: Final Exam M.Eng. Amjad Elshenawy RTECS 2010 1 1 Gc(s)Gc(s) Gc(s)Gc(s) Controller   n sensor noise  w load disturbance  Gp(s)Gp(s) Gp(s)Gp(s) Plant.

Results Comparison[Bonus Points]•Apply a unit step input and using Matlab

calculate▫RiseTime▫SettlingTime▫Overshoot

•Compare the results with those of the analogue controller results

RTECS 2010

23

Page 24: Final Exam M.Eng. Amjad Elshenawy RTECS 2010 1 1 Gc(s)Gc(s) Gc(s)Gc(s) Controller   n sensor noise  w load disturbance  Gp(s)Gp(s) Gp(s)Gp(s) Plant.

Software In the LoopTesting

RTECS 2010

24

Page 25: Final Exam M.Eng. Amjad Elshenawy RTECS 2010 1 1 Gc(s)Gc(s) Gc(s)Gc(s) Controller   n sensor noise  w load disturbance  Gp(s)Gp(s) Gp(s)Gp(s) Plant.

Model Name

•Create a model named▫FirstName_LastName_Digital_Controller_SI

L.mdl

RTECS 2010

25

Page 26: Final Exam M.Eng. Amjad Elshenawy RTECS 2010 1 1 Gc(s)Gc(s) Gc(s)Gc(s) Controller   n sensor noise  w load disturbance  Gp(s)Gp(s) Gp(s)Gp(s) Plant.

Model Configuration[10 Points]•Configure the model to be suitable for SIL•Create an S-function wrapper in which

the PID gains are tunable•Replace the controller by the S-function

wrapper•Perform simulation

RTECS 2010

26

Page 27: Final Exam M.Eng. Amjad Elshenawy RTECS 2010 1 1 Gc(s)Gc(s) Gc(s)Gc(s) Controller   n sensor noise  w load disturbance  Gp(s)Gp(s) Gp(s)Gp(s) Plant.

Results Comparison[Bonus Points]•Apply a unit step input and using Matlab

calculate▫RiseTime▫SettlingTime▫Overshoot

•Compare the results with those of the digital controller results

RTECS 2010

27

Page 28: Final Exam M.Eng. Amjad Elshenawy RTECS 2010 1 1 Gc(s)Gc(s) Gc(s)Gc(s) Controller   n sensor noise  w load disturbance  Gp(s)Gp(s) Gp(s)Gp(s) Plant.

References

•Norman S. Nise, “Control Systems Engineering”

RTECS 2010

28