21.02.2013 Views

Dynamics and motion control - KTH

Dynamics and motion control - KTH

Dynamics and motion control - KTH

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Dynamics</strong> <strong>and</strong> <strong>motion</strong> <strong>control</strong><br />

<strong>KTH</strong> MMK<br />

Date: 2011-01-14<br />

File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2011\L1.fm<br />

Lecture 1<br />

Course introduction <strong>and</strong> overview<br />

Date: 2011-01-14<br />

File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2011\L1.fm<br />

Bengt Eriksson, Jan Wik<strong>and</strong>er<br />

<strong>KTH</strong>, Department of Machine Design<br />

Division of Mechatronics<br />

e-mail: {benke, jan}@md.kth.se<br />

Mechatronics at Machine Design, <strong>KTH</strong><br />

Real-time<br />

communication<br />

Computer<br />

hardware<br />

<strong>and</strong><br />

software<br />

Middle 70s:<br />

"The microprocessor<br />

is a machine element",<br />

Prof. Jan Schnittger<br />

Real-time computer <strong>control</strong> system<br />

Drive<br />

circuitry<br />

� Control of complex mechanical systems (Prof. Jan Wik<strong>and</strong>er)<br />

� Embedded <strong>control</strong> systems (Prof. Martin Törngren)<br />

� Education in Mechatronics (Prof. Mats Hanson)<br />

<strong>KTH</strong> MMK<br />

Signal<br />

conditioning<br />

Interdisciplinarity<br />

Actuator(s)<br />

Actuator(s)<br />

Automatic <strong>control</strong><br />

Sensor(s)<br />

. intelligent leg actuator<br />

Mechatronics Lab<br />

Mechanical<br />

subsystem<br />

Mechatronics Lab<br />

Slide: 1(35)<br />

Slide: 2(35)


Motivation: multidisciplinarity is required!<br />

Mechanics<br />

development<br />

CAD<br />

<strong>Dynamics</strong><br />

FEM<br />

<strong>KTH</strong> MMK<br />

Date: 2011-01-14<br />

File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2011\L1.fm<br />

1.1. Lecture outline<br />

• 1. Course goal<br />

Analysis <strong>and</strong> specifications<br />

Conceptual design, functions, technical implementation<br />

Control function Software- Electronics<br />

development development development<br />

Integration<br />

• 2. Course implementation<br />

<strong>KTH</strong> MMK<br />

Date: 2011-01-14<br />

File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2011\L1.fm<br />

Application<br />

software<br />

Supporting software<br />

Input/output drivers<br />

Hardware<br />

Network<br />

Mechatronics Lab<br />

• 3. Overview of <strong>and</strong> introduction to modelling <strong>and</strong> <strong>control</strong> of<br />

mechanical systems<br />

Mechatronics Lab<br />

Slide: 3(35)<br />

Slide: 4(35)


1.1.1 Overall course goal<br />

To provide an underst<strong>and</strong>ing <strong>and</strong> the skills of modelling <strong>and</strong><br />

design of <strong>motion</strong> <strong>control</strong> systems;<br />

"from modelling to implementation"<br />

<strong>KTH</strong> MMK<br />

Date: 2011-01-14<br />

File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2011\L1.fm<br />

1.1.2 After the course you should be able to<br />

• Specify overall performance requirements for a <strong>motion</strong> <strong>control</strong> system<br />

• Derive models of typical mechatronic applications<br />

<strong>KTH</strong> MMK<br />

Date: 2011-01-14<br />

File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2011\L1.fm<br />

Mechatronics Lab<br />

• Find good parameters of dynamic models in both frequency <strong>and</strong> time domain<br />

• Design model based feedback <strong>and</strong> feed forward <strong>control</strong> both in continuous <strong>and</strong><br />

discrete time<br />

• Simulate process <strong>and</strong> <strong>control</strong> system models in both continuous <strong>and</strong> discrete time<br />

• Design <strong>and</strong> structure the <strong>control</strong>ler software for microprocessor implementation<br />

• Underst<strong>and</strong> the limitations <strong>and</strong> restrictions due to computing speed.<br />

Read more in the course PM<br />

Mechatronics Lab<br />

Slide: 5(35)<br />

Slide: 6(35)


1.1.3 Further course goals<br />

<strong>KTH</strong> MMK<br />

Date: 2011-01-14<br />

File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2011\L1.fm<br />

1.2. Lecture outline<br />

• 1. Course goal<br />

Date: 2011-01-14<br />

File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2011\L1.fm<br />

Learning how your theoretical knowledge from earlier<br />

courses in math, mechanics,<br />

numeric methods <strong>and</strong> <strong>control</strong> should best be<br />

used to avoid chaos in real world experiments.<br />

• 2. Course implementation<br />

<strong>KTH</strong> MMK<br />

Mechatronics Lab<br />

• 3. Overview of <strong>and</strong> introduction to modelling <strong>and</strong> <strong>control</strong> of<br />

mechanical systems<br />

Mechatronics Lab<br />

Slide: 7(35)<br />

Slide: 8(35)


1.2.1 Prerequisites<br />

• Some mechanical <strong>and</strong> electrotechnical knowledge<br />

• Very litle programming knowledge<br />

• Good <strong>control</strong> knowledge it should corespond to the content of a basic<br />

course in <strong>control</strong> engineering<br />

<strong>KTH</strong> MMK<br />

Date: 2011-01-14<br />

File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2011\L1.fm<br />

1.2.2 Course outline<br />

• 2 two hour lectures per week (except first week -> three)<br />

• Basic theory <strong>and</strong> calculated examples<br />

• 2 three hour per week lab working<br />

• Mainly computer simulation work, Matlab/Simulink<br />

• Woking with Exercises <strong>and</strong> Workshops<br />

• Assistance by<br />

Suleman Khan<br />

Ashan Qamar<br />

<strong>KTH</strong> MMK<br />

Date: 2011-01-14<br />

File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2011\L1.fm<br />

Mechatronics Lab<br />

Mechatronics Lab<br />

Slide: 9(35)<br />

Slide: 10(35)


1.2.3 Literature <strong>and</strong> course material<br />

� The course specification<br />

� The reading material<br />

� The lecture notes<br />

�St<strong>and</strong>ard book in <strong>control</strong><br />

� The exercises<br />

� The workshops<br />

<strong>KTH</strong> MMK<br />

Date: 2011-01-14<br />

File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2011\L1.fm<br />

1.2.4 Examination<br />

• 1. Completed exercises<br />

<strong>KTH</strong> MMK<br />

Date: 2011-01-14<br />

File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2011\L1.fm<br />

L2, modelling<br />

L3, feedback design in continuous time<br />

L4, feedback design in discrete time<br />

L5, Model following <strong>control</strong> -servo<br />

L6, Implementation on real-time HW<br />

L7, Robustness issues<br />

Mechatronics Lab<br />

• The exercises are completed by showing the results to an assistant in the lab.<br />

Exercises part 1, modeling of mechanical systems<br />

Exercises part 2, modeling of a DC motor system<br />

Exercises part 3, <strong>control</strong> of a DC motor system<br />

• 2. Written reports on the workshops, A <strong>and</strong> B.<br />

• 3. Written exam.<br />

Grading: A-F according to ECTS based on a weighted combination of the<br />

bullets 2 <strong>and</strong> 3 above.<br />

Mechatronics Lab<br />

Slide: 11(35)<br />

Slide: 12(35)


1.2.5 Exercises <strong>and</strong> laboratory facilities<br />

• Working in groups of preferably three people in each group<br />

• Where to work?<br />

- MMT computer rooms: Matlab/Simulink<br />

- Mechatronics-lab: ("FIM-labbet") Matlab/Simulink <strong>and</strong> experiments on real<br />

motor.<br />

- Wennström-lab: ("elektro-labbet") Matlab/Simulink<br />

- Your own computers, <strong>KTH</strong> CD’n with Matlab/Simulink<br />

• Mechatronics-lab: "passerkort": need card numbers<br />

• The labs are free to use 7/24 if they not are booked for other courses, booking<br />

schedule is available from course home page.<br />

• The course material <strong>and</strong> course web: www.md.kth.se/mmk/gru/mda/MF2007/<br />

<strong>KTH</strong> MMK<br />

Date: 2011-01-14<br />

File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2011\L1.fm<br />

1.2.6 Additional useful material<br />

• The course builds upon earlier courses!<br />

- math, mechanics, machine elements, numerical methods, <strong>control</strong><br />

engineering,<br />

computer science <strong>and</strong> programming, electrical engineering<br />

• General textbooks in<br />

<strong>KTH</strong> MMK<br />

Date: 2011-01-14<br />

File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2011\L1.fm<br />

Mechatronics Lab<br />

• Control engineering -from a first course in automatic <strong>control</strong>. e.g. Glad och Ljung:<br />

Reglerteknik - Grundlägg<strong>and</strong>e teori<br />

• Electric circuit theory -from a first course in electric circuits. e.g. Hans Johansson<br />

Elektroteknik<br />

• Mechanical enginering. -from a course in dynamics. e.g. ------<br />

Mechatronics Lab<br />

Slide: 13(35)<br />

Slide: 14(35)


1.2.7 File system, AFS<br />

• Disk space for each person is given by kth.se<br />

Path: \afs\kth.se\home\"first letter in account"\"second letter in account"\"account<br />

name"\<br />

• Log in with Kerbrose using your kth.se account <strong>and</strong> password.<br />

• Map your home account path to the computer using AFS Client<br />

(could have changed from last year)<br />

• The main advantage is that you can work with your own applications<br />

on any computer where Kerbrose <strong>and</strong> the AFS client are installed as if<br />

they were on the local disc. No need for copying files.<br />

<strong>KTH</strong> MMK<br />

Date: 2011-01-14<br />

File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2011\L1.fm<br />

1.2.8 Learning philosophy<br />

• It is about your learning - for which You is the boss!<br />

Date: 2011-01-14<br />

File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2011\L1.fm<br />

Mechatronics Lab<br />

• We employ feed forward <strong>and</strong> feedback to improve the learning process<br />

• Feed forward concepts: material, lectures, the project etc.<br />

• Feedback mechanisms<br />

1) Participant representatives: to collect important feedback info<br />

2) Lecture <strong>and</strong> workshop follow up questions<br />

3) H<strong>and</strong> ins of project parts<br />

4) Course evaluation in the end<br />

<strong>KTH</strong> MMK<br />

Mechatronics Lab<br />

Slide: 15(35)<br />

Slide: 16(35)


1.3. Lecture outline<br />

• 1. Course goal<br />

• 2. Course implementation<br />

• 3. Overview of <strong>and</strong> introduction to <strong>control</strong> of mechanical<br />

systems<br />

<strong>and</strong> a brief introduction to tools<br />

<strong>KTH</strong> MMK<br />

Date: 2011-01-14<br />

File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2011\L1.fm<br />

1.3.1 Forecasts!<br />

<strong>KTH</strong> MMK<br />

Date: 2011-01-14<br />

File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2011\L1.fm<br />

Mechatronics Lab<br />

• "I think there is a world market for about five computers", Tomas J Watson Sr,<br />

IBM 1943<br />

• "There are no reasons for any individuals to have a computer in their home",<br />

Ken Olson, Digital Equipment 1977<br />

• "The current rate of progress cannot continue much longer", various computer<br />

technologists, 1950<br />

’Moore’s law’ (Intel, 1965):<br />

Microelectronics (MOS) performance is ~doubled every 18 months <strong>and</strong> chip<br />

size is reduced by 50%<br />

Intel 4004/1971 vs. Intel Pentium/1996: from 2300 to 5.5 million transistors<br />

One prediction for "2006: One chip with 200M transistors with 2GHZ frequency"<br />

Mechatronics Lab<br />

Slide: 17(35)<br />

Slide: 18(35)


1.3.2 Control technologies over time<br />

Mechanical, hydraulic <strong>and</strong><br />

pneumatic <strong>control</strong>lers<br />

(e.g. centrifugal regulator,<br />

18th century)<br />

<strong>KTH</strong> MMK<br />

Date: 2011-01-14<br />

File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2011\L1.fm<br />

Combustion engine<br />

19th century<br />

(Pneumatic <strong>control</strong>lers<br />

early 20th century)<br />

Electrical relays<br />

(Babbages analytical<br />

Analogue electronic <strong>control</strong>lers<br />

(1940-50)<br />

engine, ~1840) (transistor, 1947)<br />

Direct digital<br />

<strong>control</strong><br />

(early 1960:ies)<br />

Distributed<br />

computer <strong>control</strong><br />

(~1970:ies)<br />

(4004 microprocessor, 1971)<br />

1.3.3 Control development over time<br />

Date: 2011-01-14<br />

File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2011\L1.fm<br />

Mechatronics Lab<br />

• All mechanical <strong>control</strong>lers, e.g. the centrifugal governor (wind mills, steam engines,<br />

telephones), from 1700 <strong>and</strong> onwards.<br />

• Early theoretical results, e.g Routh, Hurwitz <strong>and</strong> Lyapunov on stability, late 1800’s.<br />

• Ziegler’s <strong>and</strong> Nichols’ method for tuning of PID <strong>control</strong>lers in 1942.<br />

• Computers in <strong>control</strong> from the mid 50’s.<br />

• New <strong>control</strong> design methods in the late 20th century: Optimal, Adaptive, Non-linear,<br />

Robust, Fuzzy, Neural, etc.<br />

• Still in use!<br />

- Mechanical <strong>control</strong>lers, e.g the flapper servo stage in hydraulic valves. Temperature<br />

<strong>control</strong> in shower taps.<br />

- Analog electronic <strong>control</strong>lers, e.g. for PID <strong>control</strong><br />

<strong>KTH</strong> MMK<br />

Mechatronics Lab<br />

Slide: 19(35)<br />

Slide: 20(35)


1.3.4 The paradigm shift<br />

Servo steering with<br />

mechanical backup<br />

<strong>KTH</strong> MMK<br />

Date: 2011-01-14<br />

File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2011\L1.fm<br />

Date: 2011-01-14<br />

File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2011\L1.fm<br />

Steer by wire<br />

1.3.5 What can be achieved?<br />

Hy-Wire from GM<br />

(autonomy 2)<br />

<strong>KTH</strong> MMK<br />

� More digital <strong>control</strong>!<br />

Mechatronics Lab<br />

Mechatronics Lab<br />

Slide: 21(35)<br />

Skateboard concept<br />

Fuel cell 94kW<br />

Integrated distributed <strong>control</strong><br />

Weight: 2 tons, Distance: 480km<br />

Slide: 22(35)


1.3.6 Why models? - active body <strong>control</strong><br />

• Many sensors<br />

• 4 actuators<br />

• Complex dynamics<br />

• Mechanical <strong>and</strong><br />

<strong>control</strong> design not<br />

separable<br />

• Simulation necessary<br />

sensors<br />

actuators<br />

<strong>KTH</strong> MMK<br />

Date: 2011-01-14<br />

File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2011\L1.fm<br />

1.3.7 More than just feedback<br />

Trajectory<br />

planner<br />

Implemented on embedded<br />

<strong>control</strong> platform<br />

Mode logic<br />

Diagnostics<br />

Model following<br />

<strong>control</strong><br />

References<br />

Human machine<br />

interface<br />

Feedback<br />

<strong>control</strong><br />

<strong>KTH</strong> MMK<br />

Date: 2011-01-14<br />

File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2011\L1.fm<br />

Observer<br />

Actuator<br />

Disturbance<br />

Controlled process<br />

Mechatronics Lab<br />

Mechatronics Lab<br />

Slide: 23(35)<br />

Output<br />

Sensors<br />

Slide: 24(35)


1.3.8 Example <strong>motion</strong> <strong>control</strong> applications<br />

• Industrial robot <strong>control</strong><br />

• Vehicular systems (suspension, brakes, engine <strong>control</strong>...)<br />

• Aircraft <strong>control</strong> <strong>and</strong> space applications<br />

• Axis <strong>control</strong> in various production machines<br />

• Hydraulic servo, e.g. in forest harvester or excavator<br />

• Master <strong>and</strong> slave <strong>control</strong> in teleoperated systems<br />

• Mobile robots/machines<br />

<strong>KTH</strong> MMK<br />

Date: 2011-01-14<br />

File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2011\L1.fm<br />

1.3.9 The complete <strong>control</strong> design process<br />

• Design of the mechanical system<br />

Either prior to, or in conjunction with <strong>control</strong> design<br />

Date: 2011-01-14<br />

File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2011\L1.fm<br />

Mechatronics Lab<br />

• Modelling of the system <strong>and</strong> in some cases also modelling of the system’s<br />

interaction with the environment<br />

• Analysis of dynamic properties including simulation<br />

• Control requirement specifications<br />

• Control design including choice of related components such as sensors,<br />

<strong>control</strong> computer <strong>and</strong> sometimes actuator(s)<br />

• Simulation, verification <strong>and</strong> <strong>control</strong> prototyping<br />

• Real-time implementation<br />

<strong>KTH</strong> MMK<br />

Mechatronics Lab<br />

Slide: 25(35)<br />

Slide: 26(35)


1.3.10 Mechanical system modelling<br />

• Degrees of freedom - DOF: The number of inertia in a dynamic system<br />

that can move relative each other<br />

• The <strong>motion</strong> of each DOF is modelled by, , or = .<br />

Example:<br />

m 1<br />

k d y 2<br />

<strong>KTH</strong> MMK<br />

Date: 2011-01-14<br />

File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2011\L1.fm<br />

F<br />

m 2<br />

∑<br />

mx ·· = Fy Jϕ ··<br />

1.3.11 Modelling <strong>and</strong> dynamic analysis<br />

of mechanical systems<br />

• Putting up the differential equations<br />

• Linearization<br />

y 1<br />

• Formulations:<br />

- State space; matrix equations<br />

- Input-output; transfer functions<br />

<strong>KTH</strong> MMK<br />

Date: 2011-01-14<br />

File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2011\L1.fm<br />

∑<br />

M y<br />

Two DOFs coupled by a weak link.<br />

4:th order differential equation<br />

Mechatronics Lab<br />

• Different levels of simplification depending on purpose, e.g. simulation vs<br />

<strong>control</strong> design, feed forward vs feedback - model validation<br />

• Finding the parameters; system identification<br />

• Computer tools such as Maple <strong>and</strong> Matlab e.g. with the Identification toolbox<br />

Mechatronics Lab<br />

Slide: 27(35)<br />

Slide: 28(35)


.6<br />

.4<br />

.2<br />

1<br />

.8<br />

.6<br />

.4<br />

.2<br />

1.3.12 Different domains for different tasks<br />

yt () A<br />

i<br />

e λ – it = cos(<br />

ω<br />

i<br />

t + φ<br />

i<br />

)<br />

∑<br />

0<br />

0 5 10 15 20 25 30<br />

Time<br />

domain<br />

10 −1<br />

−40<br />

<strong>KTH</strong> MMK<br />

Date: 2011-01-14<br />

File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2011\L1.fm<br />

1.3.13 Feedback <strong>control</strong><br />

Date: 2011-01-14<br />

File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2011\L1.fm<br />

Gain dB<br />

Phase deg<br />

20<br />

0<br />

−20<br />

0<br />

−90<br />

−180<br />

10 −1<br />

Gs ( )<br />

Different <strong>control</strong>ler structures<br />

• PID <strong>control</strong>:<br />

=<br />

10 0<br />

Frequency (rad/sec)<br />

10 0<br />

Frequency (rad/sec)<br />

<strong>KTH</strong> MMK<br />

dx<br />

----- = fxu ( , ) y = h( x)<br />

dt<br />

2<br />

ω0 s 2<br />

----------------------------------------<br />

2<br />

+ 2ξω0 s + ω0 t<br />

d<br />

ut () = Kp ⋅ et () + KI ⋅ ∫es<br />

( ) ds+<br />

KD⋅ et ()<br />

dt<br />

0<br />

10 1<br />

10 1<br />

Frequency domain<br />

+<br />

+<br />

Im<br />

Complex plane<br />

Re<br />

Mechatronics Lab<br />

• Cascade <strong>control</strong>: inner loop viewed as an ideal servo by outer loop<br />

y ref<br />

Controller 2<br />

z ref<br />

Controller 1<br />

u<br />

G 1(s), e.g.<br />

actuator<br />

z<br />

Controlled<br />

system, G 2(s)<br />

y<br />

Mechatronics Lab<br />

Slide: 29(35)<br />

Slide: 30(35)


1.3.14 Feedback <strong>control</strong> properties<br />

The main principle in <strong>control</strong> engineering<br />

• Typically model based (but not required to be)<br />

• Produces <strong>control</strong> signals after an error has occurred<br />

• Disturbance rejection is achieved<br />

• Effect of process parameter variations is reduced<br />

• Leads to a closed loop<br />

• Sensor noise may be amplified <strong>and</strong> deteriorate performance<br />

• May lead to instability if designed incorrectly<br />

<strong>KTH</strong> MMK<br />

Date: 2011-01-14<br />

File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2011\L1.fm<br />

1.3.15 Discrete time <strong>control</strong><br />

Digital <strong>control</strong> system<br />

Constant sampling frequency<br />

<strong>KTH</strong> MMK<br />

Date: 2011-01-14<br />

File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2011\L1.fm<br />

Mechatronics Lab<br />

y(tk) u(tk) u(t)<br />

Sampling Controller<br />

Actuation<br />

Continuous time y(t)<br />

process<br />

Synchronized actions<br />

Sampling interval h = t k - t k-1<br />

Sampling frequency f = 1/h<br />

Other tasks<br />

Antialiasing filter<br />

y, y(t k)<br />

e.g. communication <strong>and</strong><br />

diagnostics<br />

h<br />

Sensor<br />

Mechatronics Lab<br />

t<br />

Slide: 31(35)<br />

Slide: 32(35)


1.3.16 Brief introduction to tools<br />

• Modelling <strong>and</strong> simulation<br />

+ Matlab/Simulink<br />

+ Purpose: Modeling, analysis <strong>and</strong> design + model verification<br />

• Rapid <strong>control</strong> prototyping (RCP), 2 different systems<br />

dSPACE<br />

<strong>KTH</strong> MMK<br />

Date: 2011-01-14<br />

File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2011\L1.fm<br />

Date: 2011-01-14<br />

File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2011\L1.fm<br />

- Power PC on PCI bus inside PC<br />

- I/O on the same PCI board<br />

- Programmed with Simulink<br />

- RTW, C-code generator<br />

- Microtec C cross compiler<br />

- 4 systems in lab<br />

- Host PC env. ControlDesk<br />

1.3.17 Modelling <strong>and</strong> simulation<br />

u Simulated<br />

process<br />

y<br />

Real process<br />

abstraction<br />

<strong>KTH</strong> MMK<br />

dx<br />

----- = fxu ( , ) y = h( x)<br />

dt<br />

Mechatronics Lab<br />

• Numerical solution: non real-time<br />

Mechatronics Lab<br />

Slide: 33(35)<br />

Integration solvers, e.g., runge kutta order<br />

2-5 using variable step size for<br />

efficient simulation time <strong>and</strong><br />

stable solution.<br />

Slide: 34(35)


1.3.18 Rapid <strong>control</strong> prototyping (RCP)<br />

Non real-time<br />

simulation<br />

Include I/O<br />

drivers<br />

Automatic<br />

C-code<br />

generation<br />

<strong>KTH</strong> MMK<br />

Date: 2011-01-14<br />

File: Q:\md.kth.se\md\mmk\gru\mda\mf2007\arbete\Lectures\FinalVersions\For2011\L1.fm<br />

Modelling<br />

<strong>and</strong> design<br />

Control implementation<br />

needs tools for<br />

quick iterations<br />

Evaluate <strong>and</strong><br />

redesign<br />

Instrumentation<br />

for tuning <strong>and</strong><br />

measurement<br />

Compile <strong>and</strong><br />

down load<br />

on RCP HW<br />

Mechatronics Lab<br />

Slide: 35(35)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!