代做ELEC4632 Lab 3代做留学生Matlab程序

ELEC4632 Lab 3

Design of state feedback control with observer for both regulation and set-point control (Output feedback control)

In this lab, you are going to design a control system for your identified model of W-T system and simulate it using MATLAB and Simulink. You have to design state feedback control with observer using trial-and-error approach, and then examine the designed control system in terms of the following control system characteristics,

Stability in both regulation and set-point tracking

Acceptable transient response (rise time and overshoot) and steady-state response (settling time and steady-state error)

Disturbance rejection

Robustness against parametric uncertainty

Bounded control input signal within the linear input range obtained in Lab 2

This assignment is designed to examine your knowledge on discrete-time state space systems topic in theory and simulation. This includes analyzing stability and verifying the performance of your designed control system under different circumstances such as external disturbances and model parameter uncertainty. You must study your lecture notes on “Pole Placement Design” and “Digital Control System Characteristics”. Any other resources that would be needed for this lab will be provided in this Lab note. You are also encouraged to explore different resources if needed.

Throughout this Lab, you must use your identified linear discrete-time model you obtained in Lab 2 from  a  W-T  setup.  Note  that  all  the  simulations  and  control  system  requirements  should  be considered for offset-free  model,  including  control  input  range,  initial  conditions,  and  set-point values.

Pre-lab Exercise

Answer the following  questions and  provide  MATLAB  codes  and  results  using  your  identified model parameters you obtained in Lab 2.

1.   Recreate transfer function and state space models of your identified model as you did in Lab 2. Then, find system eigenvalues and determine whether the open-loop system is stable or not. Also, find the zero of the system using zero function in MATLAB. Is your identified system a minimum phase system (stable zero)?

Note: Recall that the transfer function and the canonical controllable state space form can be defined using the identified model parameters as below,

Transfer function in Z domain:

(1)

Canonical controllable state space form. in discrete-time:

(2)

where U(z)/u(k)  is  offset-free  input voltage of the  pump, which  is called control input,  and Y(z)/y(k) is the offset-free output (offset-free water level).

2.   Is the system reachable and controllable, and, observable and detectable?

3.   Use  the Duality property  between  controllability  and  observability  and  find  the canonical observable form. of the state space model.

Hint: If a state space system is describes by matrices {G, H, C, D}, the Dual system is defined by {GT, CT, HT, DT}. One result of this property is that if a pair (G, H) is reachable, then the pair (GT, HT) is observable. Also, if the pair (G, C) is observable, then the pair (GT, CT) is reachable. Therefore, if you use canonical controllable form given in Eq. (2) to create your state space representation in question 1, you can use this property to find the canonical observable form.

Lab Exercise (2 marks)

1. Regulation by state feedback (0.6 marks)

a.   Choose the initial conditions for your system model, i.e., x(0) = [x1(0) x2(0)]T such that the

initial value of the offset-free output is equal to 0.3, i.e., y(0) = Cx(0) = 0.3. (0.15 marks)

Note: Recall that the output (water level) is measured by a pressure sensor that generates a voltage signal in the range of 0-5 volts corresponding to water levels between 0-300ml. If the  sensor  is  working  linearly  with  no  y-axis  intercept,  you  can  consider  the sensor conversion rate as 5/300 V/ml or 300/5 ml/V, which enables you to convert any sensor voltage value to the corresponding water  levels  in  millilitre.  For  instance,  if  the  sensor measures 2.5V for output, that means the actual water level is  150ml.  In  the identified linear model, however, the output, y(k), is the offset-free output in volts which is defined as a linear combination of states in state space form, i.e., y(k) = Cx(k). Thus, x(0) should be chosen such that the actual output remains in-between the linear output range we specified in Lab 2, thus satisfying the following inequality,

However,  since  the  system  states  in  canonical  controllable  form  are  not  necessarily physical  quantities  (y(k)  = b2x1(k)  + b1x2(k)),  it  makes  more  sense  to  use  canonical observable form for choosing initial conditions for a specific initial offset-free output value because in canonical observable form we have y(k) = HTx(k) = [0 1]×[x1(k) x2(k)]T= x2(k). Thus, it is suggested to use canonical observable form of the state space model from now on.

b.  After finding  the  initial  conditions  in  the  previous  question  (Q1.a),  calculate  two  state feedback  gains  (L)  if  the  control  input  is  given  as  follows  (known  as state feedback control law),

u(k ) = -Lx(k).                                                                                                                            (4)

One feedback gain for deadbeat control and name it L_db, and another feedback gain for non-deadbeat  control and  name  it  L_ndb.  For  non-deadbeat  feedback  gain    L_ndb, closed-loop eigenvalues should be chosen such that it ensures stability of the closed-loop system with fastest possible response without exceeding your control input limits (offset- free input voltage range you obtained in Lab 2, umin ≤ u(k) ≤ umax). You can use place or acker functions in MATLAB or directly apply Ackerman Formula to find feedback gains. (0.15 marks)

Hint: The closer the closed-loop eigenvalues to the origin, the  higher the control input amplitude would be. This means that having small closed-loop eigenvalues would lead to a faster response, and accordingly, higher control input. However, since any real system has constraint on the amplitude of its control input, we have to accept a compromise between an  ideal  system  response  (deadbeat control)  and  maximum  accessible  control  input amplitude. This requires you to simulate the closed-loop system and check its control input u(k) to make sure that your choice of closed-loop eigenvalues is suitable. For regulation by state feedback, you can choose your closed-loop eigenvalues to be close to the open-loop ones to prevent violation of control input limits.

c.   Simulate  the  two  closed-loop  control  systems,  and   plot  the  outputs  (initial  condition responses)  and  control  inputs.  For  example,  the  results  of  deadbeat  control  and  non- deadbeat  control  for  the  model  obtained  from  SysIdenData_StudentVersion.mat data  (Lab  1)  are  shown  in Fig.  1 with  the  closed-loop  eigenvalues  [0.4  0.9]  for  non- deadbeat control and canonical observable form of the state space model. You can see that deadbeat control input in Fig. 1(b) is way over the control input limit of ±0.5V. You can use  initial or  lsim functions  to  simulate  the  closed-loop  systems  in  MATLAB,  or alternatively, you can use Simulink (0.3 marks).

Fig. 1. Initial condition responses and control inputs, (a) Output responses, (b) Control input signals.

2. Set-point control (0.7 marks)

The structure of the set-point control system using state feedback approach is illustrated inFig.

2. The objective of set-point control is to design a control system such that the output follows some specific constant reference output values, i.e., y(k) → yref(k) as k → ∞ . Thus, the control law for this task using state feedback approach is given as follows,

Fig. 2. Block diagram of set-point control using state feedback approach and DC gain compensation.

(5)

where Gcl-1(z)|z=1  is the inverse of the DC gain of the closed-loop transfer function and yref(k) is the  reference or desired output  (refer to  lecture  notes on  how to find closed-loop transfer function from closed-loop state space system). The addition of Gcl-1(1)yref(k) to the control input in Eq. (5) is to compensate for a steady state error that is created due to the structure of control law in Eq.(5) (refer to Tutorial 7, Question 3). Now, follow the steps below for this part of lab exercise.

a.   Find a non-deadbeat feedback gain for set-point control (similar to regulation) such that the output can follow a reference signal yref(k) = {0, 0.7, -0.2, 0.5, 0} with the period for each level to be  140×0.75 =  105sec, as fast as  possible without exceeding the control input limits.  Note  that yref(k)   has  the  same   unit  as  system  output  (offset-free  water  level measured  in  volts).  Similar  to  the  choice  of  initial  conditions,  these  levels  have  to  be chosen to be consistence with the actual output constraints as given in Eq(3), i.e., 80ml ≤ (yref(k) + y_offset) × 300/5 ≤ 240ml.  Furthermore, you cannot  expect to design a state feedback gain to fill the tank to  its  maximum  level  faster than  its  settling time without violating control input constraints. Thus, you should have a reasonable view on “how fast” you want your control system to change water level and “how much” when you choose desired levels for yref(k). (0.2 marks)

b.   Simulate the closed-loop system with zero initial conditions to verify your feedback gain and control system design. Plot the output response with reference output and control input similar to Fig. 3. This figure shows the results of the same set-point control in this exercise for the example model obtained from  SysIdenData_StudentVersion.mat data with closed-loop eigenvalues of [0.92 0.92]. You can use dcgain function to find DC gain of the closed-loop transfer function, or directly calculate it. You can use lsim function to simulate your  system  or  build  the  model  in  Simulink.  Comment  on  transient  and  steady-state responses (0.5 marks)

Fig. 3. Set-point control response, (a) Output response compared with reference output, (b) Control input.

3. Output feedback control (Set-point control with observer) (0.7 marks)

a.   Suppose that you are only able to measure the output not the states. Design a deadbeat observer and find matrix gain K (refer to Tutorial 7 Question 1.c). You can either directly calculate observer gain using Ackerman formula, or use similar functions as for feedback gain in MATLAB to find observer gain using Duality property, i.e., find feedback gain for the pair of (GT, CT) and then transpose it. (0.2 marks)

b.  Simulate the complete output feedback control system for set-point control with deadbeat observer as shown  in Fig. 4 using the same reference signal you have constructed in previous exercise and the same non-deadbeat controller (Q2.a and Q2.b). Use the same initial conditions as for regulation exercise (Q1.a) to verify your observer behaviour in the first period. Plot closed-loop output response with reference signal, input signal, and state estimation error (i.e., x(k) -x(^)(k)) similar toFig. 5(plot state estimation error for only the first

3 seconds). Fig. 5 shows the results of the output feedback control in this exercise for the example model obtained from SysIdenData_StudentVersion.mat data with closed- loop eigenvalues of [0.9 0.9], deadbeat observer, and initial output of y(0) = 0.3. Comment on transient and steady-state responses.  How many time steps at most would take for state estimation error to reach zero in general?(0.5 marks)

Fig. 4. Block diagram of the output feedback control system with observer.

Fig. 5. Set-point control response with observer and non-zero initial conditions, (a) Output response compared with reference output, (b) Control input, and (c) State estimation error.

Post-lab Exercise

1. Disturbance rejection

Disturbance can be modelled as a second input in the state-space model as follows,

x(k + 1) = Ax(k) + Bu(k) + Wd(k),                                                                                                       (6)

where d(k) is input disturbance and W is the disturbance matrix. You can choose a unit step signal for d(k) with a delay (for example after 100 seconds) and W = [0.5 0]T.

a.   Examine  the  effect  of  disturbance  acting  on  the  input  for  set-point  control  using  non- deadbeat feedback control as you designed in lab exercise 2. Comment on the ability of state feedback control in disturbances rejection by plotting the simulation results similar to Fig. 3.

b. Optional as Bonus: Is it possible to consider any value for input disturbance? What could be viewed as a source of input disturbance in the actual W-T system?

c. Optional  as  Super Bonus:  Can  you  design  a state feedback control  law such that  it eliminates the effect of constant disturbance assuming that only output can be measured? (refer to Tutorial 7 Question 1.c and show your simulation and worked-out solution)

2. Robustness analysis

When dealing with model uncertainty, it is assumed that the model for which the controller is

designed ( G(^)(z)) is slightly different with the actual model of the process (Greal(z)). For instance,

5% uncertainty for a second-order discrete-time model can be described as follows,

(7)

where {a(^)1, a(^)2 , b(^)1, b(^)2 }  are the estimated parameter of the identified linear model (the parameters you have already calculated in Lab 2). To simulate the effect of uncertainty, you can design the feedback gain according to estimated model  G(^)(z) , which you already did in lab exercise 2, and then use that feedback gain for Greal(z) (they can be expressed in state space from too).

a.   Examine  robustness  of  the  control system  by  adding  uncertainty  to  the  system  model parameters by up to 5% for set-point control using non-deadbeat state feedback controller as you designed in lab exercise 2. Remember that you DO NOT need to change feedback gain. Only apply the same feedback gain to the modified system model. You can use rand function in MATLAB as you used in Lab 1 pre-lab exercise to generate random numbers between ±0.05, and then create new model parameters that satisfy the inequality in Eq.(7). Comment on the ability of state feedback controller in robust behaviour against uncertainty by plotting the simulation results similar to Fig. 3.





热门主题

课程名

mktg2509 csci 2600 38170 lng302 csse3010 phas3226 77938 arch1162 engn4536/engn6536 acx5903 comp151101 phl245 cse12 comp9312 stat3016/6016 phas0038 comp2140 6qqmb312 xjco3011 rest0005 ematm0051 5qqmn219 lubs5062m eee8155 cege0100 eap033 artd1109 mat246 etc3430 ecmm462 mis102 inft6800 ddes9903 comp6521 comp9517 comp3331/9331 comp4337 comp6008 comp9414 bu.231.790.81 man00150m csb352h math1041 eengm4100 isys1002 08 6057cem mktg3504 mthm036 mtrx1701 mth3241 eeee3086 cmp-7038b cmp-7000a ints4010 econ2151 infs5710 fins5516 fin3309 fins5510 gsoe9340 math2007 math2036 soee5010 mark3088 infs3605 elec9714 comp2271 ma214 comp2211 infs3604 600426 sit254 acct3091 bbt405 msin0116 com107/com113 mark5826 sit120 comp9021 eco2101 eeen40700 cs253 ece3114 ecmm447 chns3000 math377 itd102 comp9444 comp(2041|9044) econ0060 econ7230 mgt001371 ecs-323 cs6250 mgdi60012 mdia2012 comm221001 comm5000 ma1008 engl642 econ241 com333 math367 mis201 nbs-7041x meek16104 econ2003 comm1190 mbas902 comp-1027 dpst1091 comp7315 eppd1033 m06 ee3025 msci231 bb113/bbs1063 fc709 comp3425 comp9417 econ42915 cb9101 math1102e chme0017 fc307 mkt60104 5522usst litr1-uc6201.200 ee1102 cosc2803 math39512 omp9727 int2067/int5051 bsb151 mgt253 fc021 babs2202 mis2002s phya21 18-213 cege0012 mdia1002 math38032 mech5125 07 cisc102 mgx3110 cs240 11175 fin3020s eco3420 ictten622 comp9727 cpt111 de114102d mgm320h5s bafi1019 math21112 efim20036 mn-3503 fins5568 110.807 bcpm000028 info6030 bma0092 bcpm0054 math20212 ce335 cs365 cenv6141 ftec5580 math2010 ec3450 comm1170 ecmt1010 csci-ua.0480-003 econ12-200 ib3960 ectb60h3f cs247—assignment tk3163 ics3u ib3j80 comp20008 comp9334 eppd1063 acct2343 cct109 isys1055/3412 math350-real math2014 eec180 stat141b econ2101 msinm014/msing014/msing014b fit2004 comp643 bu1002 cm2030
联系我们
EMail: 99515681@qq.com
QQ: 99515681
留学生作业帮-留学生的知心伴侣!
工作时间:08:00-21:00
python代写
微信客服:codinghelp
站长地图