1. Trang chủ
  2. » Công Nghệ Thông Tin

control example using matlab

37 141 1

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Control Example using Matlab Cruise Control Modeling a Cruise Control System •   •   – is proportional to the square of the car’s speed Physical setup and system equations • The problem is reduced to the simple mass and damper system • It is assumed that friction is opposing the motion of the car – is proportional to the car's speed Modeling a Cruise Control System •   ubm xx =+ ••• 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 • state-space representation  where is an n by 1 vector representing the state (commonly position and velocity variables in mechanical systems), u is a scalar representing the input (commonly a force or torque in mechanical systems), and y is a scalar representing the output. DuCy BuA dt d x x x += += → → → x → State Equation for our CC model The state vector is [ x, ] and y is x → x • x • The equation u m 1 m b xx +−= ••• is ubm xx =+ ••• or [ ] [ ] u0 x 10y u m 1 0 x m b 0 10 x x x x +       =       +             − =       • • •• • Design requirements •  ! m = 1000kg b = 50Nsec/m u = 500N • Design requirements – When the engine gives a 500 Newton force, the car will reach a maximum velocity of 10 m/s (22 mph). – An automobile should be able to accelerate up to that speed in less than 5 seconds. Since this is only a cruise control system, a 10% overshoot on the velocity will not do much damage. A 2% steady- state error is also acceptable for the same reason. – Rise time < 5 sec Overshoot < 10% Steady state error < 2% Matlab representation and open-loop response "#$$$% "&$% "&$$% "'$#%$()* +"'$%#)* ,"'$#* "$ !-.+,/ this step response does not meet the design criteria placed on the problem. The system is overdamped, so the overshoot response is fine, but the rise time is too slow. P controller • 0! (!transfer function1 "#$$$%"&$%"&$$%"'$#%$()*+"'$%#)*,"'$#*"$ '*"2-+,/  •  !!! !!1 3"#$$% '*"!-3.(#/%4,(!  "$$1#2$% !-#$./4#$) !  -'$2$$#$*/ Get the Transfer Function 5  "#$$$%"&$%"&$$%"'$#%$()*+"'$%#)*,"'$#*"$ '*"2-+,/ • 6  num = 0 0.0010 0 den = 1.0000 0.0500 0 • 6! $1$$#7$ (((((((((((((((((( 827$1$&7$  Step function 5 ! 61 5 9 (! !!! !1 5 !! !:0"$1 5 +!!! -11!:"$/1 5 !  ; -!(! / !-+,/ !-/ [...]... במצב מתמיד.‬ ‫- שגיאת המצב התמיד היא "אפס" )קטנה ככל שניתן(.‬ 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 ... value to equal 10,000, and you should get the following velocity response: P controller • The solution to this problem is to add some integral control to eliminate the steady state error • Adjust k until you get a reasonable rise time – For example, with k = 600, the response should now look like: PI controller Remember, integral control makes the transient response worse, so adding too much initially... infinity • and see the results in the scope: Simulink ‫בנית מערכת ב‬ Automatic Cruise Control ‫• עבור‬ C = 6250 [N] B = 2.5 [N/(m/s)2] M = 1250 [Kg] - ‫הערה: אות הבקרה משתנה בין 0 ל - 1, לכן כדאי להשתמש ב‬ Saturation Automatic Cruise Control (plant) ‫• נבנה את הסימולציה של הרכב‬ Automatic Cruise Control ‫‪Automatic Cruise Control ‬ ‫ההתחלה.0 = )0( ‪ω‬‬ ‫5‬ ‫ומהירות 8.0 = ‪ω‬‬ ‫רצויה‬ ‫• עבור תנאי‬ ‫, בחן... 20 0 10]) 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, the response looks like the following: As you can see, this step response meets all of the design criteria, and therefore no more iteration is needed It is also noteworthy that no derivative control was needed in this example Modeling a Cruise Control System... (and so the derivative is 0) An other example • Let’s say that we have a differential equation that we want to model The equation is: A′ = 0.5 ⋅ A 2 A = 0.5 0 • How can we solve this numerically using Simulink? We’ll notice 2 simple facts: 1 If we have A, then we have A' (multiplication) 2 If we have A', then we have A (integration) We can get out of this loop by using the initial condition We know that...P controller • The steady state error is more than 10%, and the rise time is still too slow • Adjust the proportional gain to make the response better  but you will not be able to make the steady state value go to 10m/sec without getting rise times that are too fast • You must always keep in mind that you are designing a real system, and for a cruise control system to respond... ‫בנית מערכת ב ‪Simulink‬‬ ‫• עבור‬ ‫]‪C = 6250 [N‬‬ ‫]2)‪B = 2.5 [N/(m/s‬‬ ‫]‪M = 1250 [Kg‬‬ ‫הערה: אות הבקרה משתנה בין 0 ל - 1, לכן כדאי להשתמש ב -‬ ‫‪Saturation‬‬ Very Short Simulink Tutorial • In the Matlab command window write simulink • The window that has opened is the Simulink Library Browser – It is used to choose various Simulink modules to use in your simulation • From this window, choose the . Control Example using Matlab Cruise Control Modeling a Cruise Control System •   •   – is. more iteration is needed. It is also noteworthy that no derivative control was needed in this example Modeling a Cruise Control System • . ךוכיחה חוכ תוחפ עינמה חוכל הווש היצרניאה חוכ Physical. -'$2$$#$*/ Remember, integral control makes the transient response worse, so adding too much initially can make the response unrecognizable. PI controller •  <3  1 • @3"A$ 3<! B$$ !3 3 As

Ngày đăng: 24/10/2014, 23:49

Xem thêm:

TỪ KHÓA LIÊN QUAN