- pmsm_mpc_cep.ps
- Thesis HMM
- Fictive Constraints
- Routh Hurwitz Analysis
- 1403793781 653 Deber Espacio Estados
- Ieee Tf2ss Mimo
- Lesson5 State Variable
- Spatial Variation Effects on Seismic Response Control of Cable-stayed Bridges
- Lecture 3
- cs april 2010
- TEMPERATURE CONTROLLABILITY IN CROSS-FLOW HEAT EXCHANGERS AND LONG DUCTS
- Control Example Using Matlab
- 1-s2.0-S0376042114000803-mainj
- Control System I
- Track 7
- Constant Potential Panels Slideshow (1)
- Control Adaptativo
- Lyapunov-Based Control for Three-Phase PWM
- 526
- MA101_Tutorial5
- Eat 239 (Pipe Network) Example 4 Solution
- Answers to Notes Graph Translate Absolute Value Functions 1-31-13
- 1.1
- MCT Module 2
- 1. Mathematical Physics Mathematical Physics_NET-JRF June 2011-Dec 2014
- Ifp Bhss Maths Eoy Exam_sept 12
- MATLAB Command
- Feedback Control of Dynamic Systems
- Mathematics book list « Prakash Rajpurohit's Blog
- 3CE04 Civil Engg Unit-IV & V
- Rta i Install
- Job Application Form Template
- Characteristics of the Hypocrites
- Sp Bulog 2016
- lab2
- Job Appl
- Lec6 Robot Sensors
- low-cost data acquisition system arduino 1.pdf
- Workshop Coverlettertemplate
- root_cause_analysis.ppt
- Tiny Hydraulic Power Supply (Durfee).pdf
- Makeblock 1dof Robot
- hb-eng-h.pdf
- 20Ruqyah Various
- gp2d12
- 551150 Leseprobe En
- Feedback Control System Design
- Diagram Blok Pengaturan Kecepatan Motor Dc
- matlab_1
- QUBE-Servo LQR Control Workbook (Student)
- Pangeran Diponegoro
- Robert WearableRobots
- AIP Journal
- Schaum Laplace
- Admittance Matrix 2 Thesis
- Xcos Beginners
- RBucher_ScilabTec
- HapticMaster_vanderlinde
- Scilab4Matlab

Cruise Control

**Modeling a Cruise Control System
**

Physical setup and system equations

**• The inertia of the wheels is
**

neglected

• Aerodynamic Drag is neglected

– is proportional to the square

of the car’s speed

• It is assumed that friction is opposing the motion of the car

–is proportional to the car's speed

• The problem is reduced to the simple mass and damper system

**Modeling a Cruise Control System
**

• Using Newton's law, the dynamic equation

for this system is:

mxbx u

**where u is the force from the engine.
**

• There are several different ways to describe a system of

linear differential equations.

• To calculate the Transfer Function, we shall use the Stare

Space representation then transform it to TF using ss2tf

.State-space equations • The state-space representation is given by the equations: dx A x Bu dt y C x Du where x is an n by 1 vector representing the state (commonly position and velocity variables in mechanical systems). and y is a scalar representing the output. u is a scalar representing the input (commonly a force or torque in mechanical systems).

State Equation for our CC model The state vector x is [ x. x ] and y is x The equation mx bx u is b 1 u x x m m or 1 x 0 0 0 b 1 u x m x m x y 0 1 0 u x x .

a 10% overshoot on the velocity will not do much damage. let's assume that m = 1000kg b = 50Nsec/m u = 500N • Design requirements – When the engine gives a 500 Newton force. – Rise time < 5 sec Overshoot < 10% Steady state error < 2% . the car will reach a maximum velocity of 10 m/s (22 mph).Design requirements • For this example. A 2% steadystate error is also acceptable for the same reason. Since this is only a cruise control system. – An automobile should be able to accelerate up to that speed in less than 5 seconds.

The system is overdamped. 0 -b/m] B = [0.u*B. u = 500. b = 50. but the rise time is too slow. . 1/m] C = [0 1] D=0 step(A. A = [0 1.D) this step response does not meet the design criteria placed on the problem.Matlab representation and open-loop response m = 1000. so the overshoot response is fine.C.

1/m] C = [0 1] D = 0 [num.denc] = cloop(k*num.D) • Next.denc. step(10*numc. close the loop and add some proportional control to see if the response can be improved.B. function %Closed-loop transfer t = 0:0.t) %for 10m/sec the signal used by step axis([0 20 0 10]) . k = 100.den]=ss2tf(A. [numc.P controller • The first thing to do in this problem is to transform the state-space equations into transfer function form. b = 50.C.den. m = 1000. 0 -b/m] B = [0. u = 500. A = [0 1.1:20.-1).

0500 0 • This is the way Matlab presents the TF 0.Get the Transfer Function • For m = 1000.001s + 0 -----------------s^2 + 0.C. b = 50.D) • Matlab should return the following to the command window: num = 0 0. 0 -b/m] B = [0. 1/m] C = [0 1] D =0 [num. u = 500.05s + 0 . A = [0 1.0010 0 den = 1.den]=ss2tf(A.B.0000 0.

• A step input can be described as a change in the input from zero to a finite value at time t = 0.e. • By default.C. the step command performs a unit step (i. • The basic command to use the step function is one of the following – (depending if you have a set of state-space equations or a transfer function form): step(A. the input goes from zero to one at time t = 0).B.den) . the response to a step input can immediately be plotted.D) step(num. • Given a system that can be described by either a transfer function or a set of state-space equations.Step function • The step function is one of most useful functions in Matlab for control design.

• You must always keep in mind that you are designing a real system. • To illustrate this idea.000. adjust the k value to equal 10. but you will not be able to make the steady state value go to 10m/sec without getting rise times that are too fast. and you should get the following velocity response: . and the rise time is still too slow. and for a cruise control system to respond 0-10m/sec in less than half of a second is unrealistic.P controller • The steady state error is more than 10%. • Adjust the proportional gain to make the response better.

– For example. with k = 600. • Adjust k until you get a reasonable rise time.P controller • The solution to this problem is to add some integral control to eliminate the steady state error. the response should now look like: .

num1).denc] = cloop(num2. num2 = conv(num.1:20. k = 600.den2. % convolution used to multiply the % polynomials representing the gains den2 = conv(den. so adding too much initially can make the response unrecognizable. % small to get feeling for integral response num1 = [k ki]. t = 0:0. % PI has two gains den1 = [1 0].den1).t) axis([0 20 0 10]) . integral control makes the transient response worse. ki = 1.denc. [numc. step(10*numc.PI controller Remember.-1).

PI controller • Now you can adjust the ki value to reduce the steady state error. • With ki = 40 and k adjusted up a little more to 800. this step response meets all of the design criteria. It is also noteworthy that no derivative control was needed in this example . and therefore no more iteration is needed. the response looks like the following: As you can see.

• כוח האינרציה שווה לכוח המניע פחות כוח החיכוך d (t ) (t ) u (t ) dt 2 :כלומר :וכאשר v v max v max C B CB M 0 u (t ) 1 . dv(t ) M Cu (t ) Bv (t ) dt 2 מסת המכונית.מקדם חיכוךB . proportional to normal force).Modeling a Cruise Control System Physical setup and system equations Let’s now add Drag and assume the friction to be non velocity dependent (the static friction.כח המנוע שלC המכונית .M .

בנית מערכת ב Simulink • עבור ]C = 6250 [N ]B = 2.5 [N/(m/s)2 ]M = 1250 [Kg הערה :אות הבקרה משתנה בין 0ל .1 -לכן כדאי להשתמש ב - Saturation .

• From this window. – We’ll use only the Simulink library (also called toolbox) for now. in which we will build our model.Very Short Simulink Tutorial • In the Matlab command window write simulink. . will be the windows we’ll work with. – This blank window and the library browser window. – Now we have a blank window. and then New (Model). – It is used to choose various Simulink modules to use in your simulation. choose the File menu. • We choose components from the library browser. and then drag them to our work window. • The window that has opened is the Simulink Library Browser.

limiters. derivative. display it on the screen). 3. 7. . Funcitons & Tables – Just what the name says. Nonlinear – Several non-linear functions. 4. Discrete – Provides functions for discrete time. 8. Sources – Components that generate source signals for the system. the Simulink library is divided into several categories: 1. Math – Simple math functions. Signals & Systems – Components that work with signals.g. Pay attention to the mux/demux. such as switches. 2. 5.Simulink Tutorial As we can see. 6. Continuous – Provides functions for continuous time. such as integration. etc. Sinks – Components that handle the outputs of the system (e. etc.

drag the mouse to the left side of the scope (input port) and then release it. • Double click the Constant module to open its dialog window. • Change the constant value to 5. • Now you can change this module’s parameters. You should see a pointed arrow being drawn.Simulink Tutorial: First simulation • • Drag the Constant component from the Simulink library (Sources) to the work window. and then drag the Scope module (Sinks) in the same manner. . Now. click the little triangle (output port) to the right of the Constant module. and while holding the mouse button down.

Simulink Tutorial: First simulation • Double-click the scope to view its window. • Choose Start from the Simulation menu (or press Ctrl+T. . or click the play button on the toolbar) to start the simulation. • You can choose Simulation Parameters… from the Simulation to change the time limits for your simulation.

• Right-click on the scope’s graph window and choose Autoscale to get the following result: . All it does is output the constant value 5 to the graph (the x-axis represents the simulation time). or click the play button on the toolbar) to start the simulation.Simulink Tutorial: First simulation • Choose Start from the Simulation menu (or press Ctrl+T. • Now this is a rather silly simulation.

• First. • The Trigonometric Function and Sum modules reside in the Math category): . build the following system (you can find the Clock module in the Sinks category.Simulink Tutorial • Now let’s try something a little bit more complicated.

• Build the following system (the Derivative module is located in the Continuous category): We can see that this is indeed a cosine. .Simulink Tutorial • Now. but something is wrong at the beginning. let’s see if the derivative is really a cosine.

. the derivative has no prior information for calculation – there’s no initial value for the derivative.Simulink Tutorial • This is because at time 0. – so at the first time step. the derivative assumes that its input has a constant value (and so the derivative is 0).

5 A 2 A 0. The equation is: A 0.5. We can get out of this loop by using the initial condition.5 0 • How can we solve this numerically using Simulink? We’ll notice 2 simple facts: 1.An other example • Let’s say that we have a differential equation that we want to model. If we have A. then we have A (integration). 2. then we have A' (multiplication). If we have A'. . We know that A0 = 0. and so on. so now we can calculate A' and then recalculate the new A.

Simulink Tutorial • double-click the Integrator and choose Initial Condition Source: External. • Note that pressing ctrl when clicking the mouse button on a line.5 seconds –the solution goes to infinity • and see the results in the scope: . allows you to split it into 2 lines: • Set the simulation stop time to 3.

Simulink בנית מערכת ב Automatic Cruise Control • עבור C = 6250 [N] B = 2.5 [N/(m/s)2] M = 1250 [Kg] . לכן כדאי להשתמש ב. ל0 אות הבקרה משתנה בין:הערה Saturation .1 .

Automatic Cruise Control (plant) • נבנה את הסימולציה של הרכב .

Automatic Cruise Control .

בחן את התנהגות המערכת רצויה 0 . .5 • עבור תנאי . – הערה :תגובה רצויה אמורה להיות: מהירה.Automatic Cruise Control ההתחלה (0) 0. -שגיאת המצב התמיד היא "אפס" )קטנה ככל שניתן(. ערך מקסימלי של ) (tלא יעלה "מדי" מעל הערךהנדרש במצב מתמיד.8 ומהירות r – עם בקר .Pעם בקר Iועם בקר ) PIכל מקרה בנפרד(.

Automatic Cruise Control P controller – No wind .

Automatic Cruise Control P controller – with wind .

Automatic Cruise Control I controller – No wind .

Automatic Cruise Control PI controller – No wind .

Automatic Cruise Control PI controller – with wind .

Automatic Cruise Control .

Automatic Cruise Control .

- pmsm_mpc_cep.psUploaded byAlimamy Koroma
- Thesis HMMUploaded byhanim rahim
- Fictive ConstraintsUploaded byfarukt90
- Routh Hurwitz AnalysisUploaded byilg1
- 1403793781 653 Deber Espacio EstadosUploaded byJosué Chalén Sárez
- Ieee Tf2ss MimoUploaded bylarasmoyo
- Lesson5 State VariableUploaded byMirza Shawon
- Spatial Variation Effects on Seismic Response Control of Cable-stayed BridgesUploaded byHarikrishnan P
- Lecture 3Uploaded byvka_prince
- cs april 2010Uploaded by29viswa12
- TEMPERATURE CONTROLLABILITY IN CROSS-FLOW HEAT EXCHANGERS AND LONG DUCTSUploaded byImam Zakki Nanthaba
- Control Example Using MatlabUploaded byshahbaz8081
- 1-s2.0-S0376042114000803-mainjUploaded byEirick Wayne Zuñigga De-Itzel
- Control System IUploaded byKhawar Riaz
- Track 7Uploaded byMohamed Shamseldein
- Constant Potential Panels Slideshow (1)Uploaded byCarlos Gulbenkian Galdames
- Control AdaptativoUploaded byPini Veo
- Lyapunov-Based Control for Three-Phase PWMUploaded byHoàng Hải
- 526Uploaded byJeeva Sathya Theesar
- MA101_Tutorial5Uploaded byDivyam Khandelwal
- Eat 239 (Pipe Network) Example 4 SolutionUploaded bykhai9000
- Answers to Notes Graph Translate Absolute Value Functions 1-31-13Uploaded byRocket Fire
- 1.1Uploaded byAisha Butt
- MCT Module 2Uploaded byAnish Benny
- 1. Mathematical Physics Mathematical Physics_NET-JRF June 2011-Dec 2014Uploaded bynbp_principal
- Ifp Bhss Maths Eoy Exam_sept 12Uploaded byYousif Mousa Adam
- MATLAB CommandUploaded byVineeth Venu Nambiar
- Feedback Control of Dynamic SystemsUploaded byPanayiotis Papadopoulos
- Mathematics book list « Prakash Rajpurohit's BlogUploaded bydkdhiraj
- 3CE04 Civil Engg Unit-IV & VUploaded bysss

- Rta i InstallUploaded byRizkie Denny Pratama
- Job Application Form TemplateUploaded byRizkie Denny Pratama
- Characteristics of the HypocritesUploaded byRizkie Denny Pratama
- Sp Bulog 2016Uploaded byRizkie Denny Pratama
- lab2Uploaded byRizkie Denny Pratama
- Job ApplUploaded byRizkie Denny Pratama
- Lec6 Robot SensorsUploaded byRizkie Denny Pratama
- low-cost data acquisition system arduino 1.pdfUploaded byRizkie Denny Pratama
- Workshop CoverlettertemplateUploaded byRizkie Denny Pratama
- root_cause_analysis.pptUploaded byRizkie Denny Pratama
- Tiny Hydraulic Power Supply (Durfee).pdfUploaded byRizkie Denny Pratama
- Makeblock 1dof RobotUploaded byRizkie Denny Pratama
- hb-eng-h.pdfUploaded byRizkie Denny Pratama
- 20Ruqyah VariousUploaded byRizkie Denny Pratama
- gp2d12Uploaded byRizkie Denny Pratama
- 551150 Leseprobe EnUploaded byRizkie Denny Pratama
- Feedback Control System DesignUploaded byRizkie Denny Pratama
- Diagram Blok Pengaturan Kecepatan Motor DcUploaded byRizkie Denny Pratama
- matlab_1Uploaded byRizkie Denny Pratama
- QUBE-Servo LQR Control Workbook (Student)Uploaded byRizkie Denny Pratama
- Pangeran DiponegoroUploaded byRizkie Denny Pratama
- Robert WearableRobotsUploaded byRizkie Denny Pratama
- AIP JournalUploaded byRizkie Denny Pratama
- Schaum LaplaceUploaded byRizkie Denny Pratama
- Admittance Matrix 2 ThesisUploaded byRizkie Denny Pratama
- Xcos BeginnersUploaded byRizkie Denny Pratama
- RBucher_ScilabTecUploaded byRizkie Denny Pratama
- HapticMaster_vanderlindeUploaded byRizkie Denny Pratama
- Scilab4MatlabUploaded byRizkie Denny Pratama