3 views

Uploaded by teknikpembakaran2013

- WhatIsD
- LMVC
- Untitled
- LQR
- 00 Index
- ICCMS_2009.pdf
- Project Lab04
- Dyn Controls Motor
- Science
- out24
- s71500 Pid Control Function Manual EnUS en-US
- 00526915.pdf
- MAE334_DynControlsMotorLab
- Servo Trainer Theory
- AcodsAutomatic Generation Control of Single Area Thermal Power System with Fractional Order PID (PIλDμ) Controllers
- HASHIM_Optimal Speed Control for DC Motors Using LQR
- PIDControllers Simplified
- Process Instrumentation and Control Lab
- Control Theory Tutorial
- ConstantPressure_EL.pdf

You are on page 1of 32

11/2/2013

Syllabus

DATE TOPIC 1. Sep. 20 2. Sep. 25 3. Sep. 27 4. Oct. 2 5. Oct. 4 6. Oct. 9 7. Oct. 11 8. Oct. 16 9. Oct. 18 10. Oct. 23

Mechatronics Design Process System Modeling and Simulation Laplace Transforms and Transfer Functions Electrical Examples Mechanical Examples More Examples, Thermal and Fluid Examples, QUIZ 1 (Take Home) Sensors and Transducers Digital control, Advanced MATLAB Analog and Digital Sensing Ch. 3, Notes Actuating Devices, time and frequency response

Ch. 4

11. Oct. 25

12. Oct. 30 13. Nov. 1 14. Nov. 6 15. Nov. 8 16. Nov. 13 17. Nov. 15 18. Nov. 20 19. Nov. 22 20. Nov. 27 21. Nov. 29 22. Dec.

DC Motor Model,

Examples

Boolean Logic ,Programmable Logic Controllers

Ch. 5, Notes Ch. 6 Ch. 7 Ch. 8 Ch. 9, Notes Ch. 9, Notes Ch. 9, Notes Comprehensive

Stability and Compensators, P, PI and PD PID Controllers - Review QUIZ 2 (In Class - Open Book) Practical and Optimal Compensator Design Frequency Response Methods THANKSGIVING HOLIDAY Optimal Design of a Motion Control System REVIEW QUIZ 3 (In Class - Closed Book) FINAL EXAM (In Class - Closed Book)

11/2/2013

Todays objective

To test the accomplishment of our objective of understanding systems theory by solving problems related to the concepts of optimal control systems for feedback control lets try some practice problems.

11/2/2013

Unconstrained example Consider the problem of finding a set of values[x1,x2] that solves

x1 2 1 2 2

min f ( x) (2 x 4 x 2 x1 x2 4 x2 2)

x

11/2/2013

Solution

Call it objfun.m

Use fminunc

11/2/2013

Function

function f = objfun(x)

f=exp(x(1))*(2*x(1)^2+4*x(2)^2+2*x(1)*x(2)+4*x(2)+2);

11/2/2013

[x,fval,exitflag,output]=fminunc(objfun,x0,options); Try this. After 40 iterations, it should produce the solution X= 0.50000 -1.0000

(C) 2001, Ernest L. Hall, University of Cincinnati 7

11/2/2013

And

fval =

1.3030e-10

The exitflag tells if the algorithm converged. An exitflag > 0 means than a local minimum was found. exitflag = 1

11/2/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 8

For fminunc, it includes the number of iterations, the number of function elaluations, the final step size, a measure of first-order optimality, and the type algorithm used. output =

iterations: 7 funcCount: 40 stepsize: 1 firstorderopt: 9.280e-004 algorithm: medium-scale: Quasi-Newton line search

(C) 2001, Ernest L. Hall, University of Cincinnati 9

11/2/2013

Simulink Example

This model may be found in the Optimization Toolbox directory. Lets look for it. Try it. This will also check that Simulink is installed.

(C) 2001, Ernest L. Hall, University of Cincinnati 10

11/2/2013

11/2/2013

11

The actuator limits are a saturation limit and a slew rate limit. The saturation limit cuts off input values greater than 2 units and less than -2 units The slew rate limit is 0.8 units/sec.

(C) 2001, Ernest L. Hall, University of Cincinnati 12

11/2/2013

optsim

Open the Scope block by double clicking on it. Run the simulation. The output is oscillatory. The problem is to design a feedback control law that tracks a unit step input function.

11/2/2013

13

The closed-loop plant is entered in terms of the blocks where the plant and actuator have been placed in a hierarchical Subsystem block. A Scope block displays output trajectories during the design process. A PID controller is used.

11/2/2013

14

Optimization approach

One way to solve the problem is to minimize the error between the output and input signals. The variables are the parameters of the PID controller. If you need to minimize the error at one time value, the problem would require a single objective function. However, let us set the goal to minimize the error for all time steps from 0 to 100. This produces a multiobjective function with one function per time step.

(C) 2001, Ernest L. Hall, University of Cincinnati 15

11/2/2013

lsqnonlin is used to perform a least squares fit on tracking the output. This is defined by a Matlab function in the file

tracklsq.m It defines the error signal, yout. The output is computed by calling sim, minus the input signal 1

Error =yout-1

11/2/2013

16

tracklsq

tracklsq must run the simulation. The simulation may be run either in the base workspace or the current workspace, i.e, the workspace of the function calling sim which in this case is the tracklsqs workspace. In this example, the simset command is used to tell sim to run the simulation in the current workspace by setting SrcWorkspace to current.

(C) 2001, Ernest L. Hall, University of Cincinnati 17

11/2/2013

Kp, Kd and Ki And a1 and a2 that are variables in the plant block Must all be defined.

You can initialize a1 and a2 before calling lsqnonlin and then pass these two variables as additional arguments. lsqnonlin will then pass a1 and a2 to tracklsq each time it is called so you do not have to use global variables.

(C) 2001, Ernest L. Hall, University of Cincinnati 18

11/2/2013

Choosing a solver

After choosing a solver using the simset function, the simulation is run using sim. The simulation is performed using a fixed-step fifthorder method to 100 seconds. When the simulation completes, the variables tout, xout and your are now in the current workspace (the workspace of tracklsq). The Outport block is used in the block diagram model to put yout into the current workspace at the end of the simulation.

(C) 2001, Ernest L. Hall, University of Cincinnati 19

11/2/2013

Procedure

tracklsq.m

11/2/2013

20

tracklsq.m

Function F = tracklsq(pid,a1,a2)

Kp = pid(1); % Move variables into model parameters Ki = pid(2); Kd = pid(3); % choose solver and set model workspace to this function opt = simset('solver', 'ode5', 'SrcWorkspace', 'Current'); [tout, xout, yout] = sim('optsim', [0 100], opt); F = yout-1; % compute error signal

11/2/2013

21

optsim

Step 2: The second file invokes the model and the optimizing routine

optsim % load the model pid0 = [0.63 0.0504 1.9688] % setting initial values a1 = 3; a2 = 43;% initialize Plant variables in model options = optimset('LargeScale', 'off', 'Display', 'iter', 'TolX', 0.001, 'TolFun', 0.001); pid = lsqnonlin(tracklsq', pid0, [], [], options, a1, a2) % put variables back into the base workspace Kp = pid(1); Ki = pid(2); Kd = pid(3);

11/2/2013

22

Options

The variable options passed to lsqnonlin define the criteria and display characteristics. In this case you ask for output, use the medium-scale algorithm, and give termination tolerances for the step and objective function on the order of 0.001.

11/2/2013

23

Try it!

This should converge in 10 iterations and give final values of pid = 2.9108 0.1443 12.8161

11/2/2013

24

Challenge-Given the Simulink model of the motor system- select the optimum values of the digital PID controller (a,b,g,f).

Step Input

+ Sum

0.00122 DAC

2 AMP

11/2/2013

25

Model explanation

Step input signal fed to a summation block Constant values to be used are calculated using a separate M-file Analog values in the Mat lab kernel Zero order hold DAC Amplifier Encoder feedback fed to the summation block for correction

11/2/2013

26

11/2/2013

Non-linear model Enables the system to track a unit step input into the system Two methods are used lsqnonlin is the non-linear least squares method. It minimizes the error between the output and input fminmax minimizes the maximum value of the output at anytime. The first method is chosen It is a multi-objective function because the error needs to be minimized for all time steps

(C) 2001, Ernest L. Hall, University of Cincinnati 27

lsqnonlin method

Least square fit on the tracking of output E = input-output Objective is Minimize

11/2/2013

28

function F = lsq(pid, a1, a2) Kp = pid(1); % Move variables into model parameters Ki = pid(2); Kd = pid(3); % choose solver and set model workspace to this function opt = simset('solver', 'ode5', 'SrcWorkspace', 'Current'); [tout, xout, yout] = sim('optsim', [0 100], opt); F = yout-1; % compute error signal

11/2/2013

29

Step 2: The second file invokes the model and the optimizing routine

kolmodel % loads the model pid0 = [1 10 12] % setting initial values a1 = 0; a2 = 0.0005; options = optimset('LargeScale', 'off', 'Display', 'iter', 'TolX', 0.001, 'TolFun', 0.001); pid = lsqnonlin('lsq', pid0, [], [], options, a1, a2) % put variables back into the base workspace Kp = pid(1); Ki = pid(2); Kd = pid(3);

(C) 2001, Ernest L. Hall, University of Cincinnati 30

11/2/2013

Optimization results

pid0 = 1 5 10 Step-size 1 0.375 0.253 0.293 0.0868 0.119 3.28e-007 Directional derivative -4.91e+012 -1.51e+011 -2.33e+011 -8.38e+010 -8.32e+010 -1.63e+011 -3.27e+011 Lambda 1.32032e+012 8.77204e+011 1.68981e+012 2.02202e+012 2.60576e+012 1.07078e+018

Iteration Func-count Residual 1 3 4.76719e+012 2 10 4.70723e+012 3 17 4.65431e+012 4 24 4.58281e+012 5 31 4.56367e+012 6 39 4.53102e+012 7 55 4.53102e+012 Optimization terminated successfully: Search direction less than tolX pid = 0.7234

4.9399 10.0233

11/2/2013

31

Any questions?

11/2/2013

32

- WhatIsDUploaded bythang543210
- LMVCUploaded byrehan_sadiq1991
- UntitledUploaded bysaggu_libra
- LQRUploaded byChevalier De Balibari
- 00 IndexUploaded byElies Ciutat
- ICCMS_2009.pdfUploaded byVignesh Ramakrishnan
- Project Lab04Uploaded byjaskaran singh chauhan
- Dyn Controls MotorUploaded byJanett Trujillo
- ScienceUploaded byCharles
- out24Uploaded bymfmechanics
- s71500 Pid Control Function Manual EnUS en-USUploaded byTonheca Rockk
- 00526915.pdfUploaded byErna Utami
- MAE334_DynControlsMotorLabUploaded bydalbaas
- Servo Trainer TheoryUploaded byHaasen Hill
- AcodsAutomatic Generation Control of Single Area Thermal Power System with Fractional Order PID (PIλDμ) ControllersUploaded byemyimran
- HASHIM_Optimal Speed Control for DC Motors Using LQRUploaded byAnonymous PsEz5kGVae
- PIDControllers SimplifiedUploaded byganesh_n1412
- Process Instrumentation and Control LabUploaded byPiru Piwu
- Control Theory TutorialUploaded byananda melania prawesti
- ConstantPressure_EL.pdfUploaded byIov Iftode
- CondeUploaded bytariq76
- Modelling simulation analysis of induction motor using artificial intelligent controller.pdfUploaded byDrPrashant M. Menghal
- 1558280056725_AUTOMATIC_LOAD_FREQUENCY_CONTROL.docUploaded byRam Yadav
- Dissertation 4 : Rosdiazli IbrahimUploaded byMAT JIBRUD
- pUploaded byvikash
- 27.Ijaest Vol No 8 Issue No 2 Dc Motor Control Using Fuzzy Logic Controller 291 296Uploaded byvenkatv1986
- Manual Sf 960 CctUploaded bykennty
- XMTG818Uploaded byAndres Fernando
- 35006242_K01_000_10Uploaded byarfeem
- CHEE 3006 - 2011 Exam and Solutions(1).pdfUploaded bymlhy2680

- Cover.pdfUploaded byteknikpembakaran2013
- PK3-Business plan.PPTUploaded byteknikpembakaran2013
- Manajemen Pemasaran_Chapter 5.pptUploaded byteknikpembakaran2013
- A Concise Guide of Business PlanUploaded byslamet99
- Manajemen Pemasaran_Chapter 7.pptUploaded byteknikpembakaran2013
- hovercraft toy patent.docUploaded byteknikpembakaran2013
- Business Plan BS.docUploaded byteknikpembakaran2013
- Manajemen Pemasaran_Chapter 6.pptUploaded byteknikpembakaran2013
- tugas Kelompok 1 ( Kamis Pagi).docxUploaded byteknikpembakaran2013
- Business Plan MAJU BERSIH SEJAHTERA.pdfUploaded byteknikpembakaran2013
- DAFTAR ISI.pdfUploaded byteknikpembakaran2013
- MANAJEMEN PEMASARAN_Chapter 1.pptUploaded byteknikpembakaran2013
- Lembar Kerja(03)_Ragil Tri Indrawati (0806316726).docUploaded byteknikpembakaran2013
- P11.pptUploaded byteknikpembakaran2013
- Business Plan Template_FinalUploaded byNanda Excell Vezp
- apply_worldinbritain_2013-2014.pdfUploaded byteknikpembakaran2013
- examination questions chemistryUploaded byRegina Arifenty
- 2012 Application FormUploaded byphonghoangdthv
- scan0001.pdfUploaded byteknikpembakaran2013
- 1-s2.0-S0360544211003616-main.pdfUploaded byteknikpembakaran2013
- applicants_e13.pdfUploaded byteknikpembakaran2013
- 1-s2.0-S089417770900171X-main_2.pdfUploaded byteknikpembakaran2013
- Scholar.docUploaded byteknikpembakaran2013
- catur_bistari_rule(2).docUploaded byteknikpembakaran2013
- Part 3 Application form Msc Scholarhip.docxUploaded byteknikpembakaran2013
- application_form13.pdfUploaded byteknikpembakaran2013
- OTS ApplicationForm 2013 R1.docxUploaded byteknikpembakaran2013
- Program Research Student.docUploaded byteknikpembakaran2013
- Sample_Letter_of_Application_for_Scholarship.pdfUploaded byteknikpembakaran2013
- Lembar Kerja(03)_Ragil Tri Indrawati (0806316726).docUploaded byteknikpembakaran2013

- Lab Assignment 2 Ms Excel 2 InstructionsUploaded bysangeet711
- D800010X062Uploaded byZakaria Ahmed Khan
- PhD_Thesis_on_Big_Data_in_Official_Stati.pdfUploaded byJoel Yury Vargas Soto
- OM Drop_Ship_from_Supplier_Process_1153AUploaded byVenkatesh Rao
- PLSQL Tutorial 11gUploaded byRamanje Sir
- List all IS Journals.docxUploaded byDr Riktesh Srivastava
- 164 Java Interview Questions by Nageswara Rao _ JAVAbyNATARAJUploaded byabhishek
- Guidelines for MANUAL TestingUploaded byPadmashree Deepak
- Introduction to Symmetry AnalysisUploaded byKarel Brg
- Algoritmo Topsis Em PytonUploaded byLeonardo Oliveira
- ZXIN10 Backup and Recovery Guide 5Uploaded byAhmed Badr
- 50 YEARS of CFD Keynote LectureUploaded byshamoon1985
- Spru422j - Programmer’s ReferenceUploaded byCarlos Mejías
- Risk ManagmentUploaded byreramapuitis
- What is VoIPUploaded byhonhattruong33
- 55438501 Micro Processor Lab ManualUploaded byDeepthi Aras
- [MS-VBAL]Uploaded bySurinder Singh
- LabView Mathscript and Formula NodeUploaded byJesus Mitchell
- Connection Log 27015Uploaded byM Hasanul Qathi
- Oracle Forms 6i and Reports 6i Training - 080112Uploaded byGaurav Sharma
- Cons Tru Cri on Technology and Project ManagementUploaded byNavin Sj
- Briefing Working TrackUploaded byJoao Ricardo Serra
- Universal Uberoid WM8650 v10.1Uploaded bynoniggin nignog
- An Actor-Centric, Asset-Based Monitor Deployment Model for Cloud ComputingUploaded byWarren Smith QC (Quantum Cryptanalyst)
- Cognos Event Studio v1Uploaded byAmit Sharma
- SDLC - Quick GuideUploaded bysvdontha
- Combinational Logic Circuit Applications[1]Uploaded byMiguel John So
- matlabUploaded byKama Raj Kr
- Dell Inspiron 1120 - 1121 Service Manual en UsUploaded byMiguel Angel Hernández Noriega
- Q&AUploaded bybabusan81