辅导案例-AENG-31300

欢迎使用51辅导,51作业君孵化低价透明的学长辅导平台,服务保持优质,平均费用压低50%以上! 51fudao.top
February 2020 Page 1
Aerospace Engineering - Sensors Signals and Control AENG-31300
Quanser Control COURSEWORK

Goal and objectives

The main goal of the Quanser lab is “to learn by flying”

The specific objectives are:
• Evaluate, estimate and analyze open-loop behaviour of a system
• Design, evaluate and tune classical controllers using:
o Theory
o Simulation: Matlab / Simulink
o Practice: Quanser hardware
• Understand the difference between theory and practice
• Work in pairs

Self-taught control lab. You can find resources in Blackboard:
• quanser_getting_started_quarc.pdf
• signs.ppt
• QuanserIntro2.wmv
• quanser_start.mdl




February 2020 Page 2
1. Instructions

*** QUANSER LAB ONLY ACCESSIBLE FROM Thursday 13th FEBRUARY ***
The permitted Quanser usage hours are Monday to Friday, from 9 am to 4 pm
Students cannot access lab outside the operating time

Lab PG support & queries: [email protected]




There are 3 parts for the coursework, but a single report and two Simulink files to be submitted.

Part 1: Transfer Function Identification of Quanser
Part 2: PID theory, Matlab & Simulink in Computer
Part 3: PID implementation, validation and retuning in Quanser

Each team must submit a single report plus Simulink files for part 2 & part 3 by: noon 27th April.
*** Working in pairs means both working together in the whole coursework ***
DO NOT DISTRIBUTE THE WORK!!!

The report (pdf) and Simulink files filenames MUST FOLLOW the convention given below:
SSC20_#ID_QuanserReport.pdf
SSC20_#ID_QuanserPart2_PIDdesign.slx
SSC20_#ID_QuanserPart3_SetupQuanser.slx
Where #ID is the two students’ alphanumeric ID: e.g. AAXXXXXBBYYYYY.


IMPORTANT:
The report must be submitted as a PDF via Blackboard.

The report should be prepared on at most six A4-size sheets (12 pages) in 11pt font, with 2cm
margins all around. Reports should follow best practice* for writing technical reports (e.g.
introduction, figures and tables captions, cross-referencing…).
Provide the controller diagrams (clearly stating inputs, outputs and interconnection) and
analysis, design and tuning process (supported by equations and figures) in the reports.

* Refer to IET “A guide to Technical Report Writing” in PDF document guide-to-technical-writing.pdf

Simulink files submitted via email to: [email protected]

February 2020 Page 3
1 Equipment
*** Use only Matlab R2019a (and associated Simulink) ***
Be especially careful not to open, run or save in a different version of Matlab/Simulink
As this will then save the files in that version and may result in corruption for Quanser



For Part 1 and 3 you will perform your experiments on the 3-degree-of-freedom helicopters from Quanser
Consulting found in the BLADE lab (only accessible during normal university hours).
For Part 2, Simulink files are provided to facilitate understanding the gap between theory, (computer)
simulation and (lab) practice.

2 Quanser Tips and Guidelines

EXTREMELY
IMPORTANT
* Do always follow the switch-on AND switch-off procedure
* Do always hold the Quanser before starting AND stopping
(to avoid damage from hard crash with the table)
* Do always read the tips, guidelines, instructions and watch the videos
before contacting PG support
* Do respect your time, but also that of your colleagues and staff!!
An improper log-off/switch-off procedure might mean 30mins or more for
the next person operating the Quanser.

1. Power supply supply units (two per Quanser): Switch-on before use AND switch-off after use.
If they happen to be on when you arrive, it is recommended to switch off the power units and power plugs
before switching them back on.
2. Don’t forget to log-off in the computer after use.
3. Once the real-time code is built in Simulink, click ‘start’ in the ‘Quarc’ menu while holding the helicopter to
begin the experiment. One of the team members should supervise the behaviour of the helicopter while the
other manages the Simulink model.
4. Be careful not to put any object inside the fan cage while the propeller is spinning.
5. Make sure that helicopter is at a safe height before clicking the ‘stop’ button - Avoid stopping the
experiment when the helicopter is at high elevation above the table to avoid hard landing impact which may
damage the fan cage. If possible, safely catch the helicopter before it lands on the table.
6. Avoid large oscillations or fast movements of the helicopter arms which may cause forceful crash of the fan
cages on the table. Note that large gains often times lead to unstable response.
7. If propellers are spinning but the helicopter does not take off, or if it has a problem taking off properly, or if
it starts spinning around tilted to one side, then click ‘stop’ and:
• Check all connections to make sure wires are securely connected.
• If necessary, switch-off power supply units and disconnect wires, then reconnect everything and start.
Note that both propellers must spin for the Quanser helicopter to operate properly.
If problem persists, contact PG support.
February 2020 Page 4
8. Quanser rigs should have similar dynamics, but not exactly. Hence, it is recommended to try to use always
the same Quanser (if availability allows it).
9. If there is a persistent problem with the equipment, shut it down, place a note on it and contact PG support.
Please be clear in your email about what kind of problem you are having. Things to mention:
1. Specific Quanser with the problem (Quanser letter: A, B, C, D).
2. Detailed description of the problem.
3. Copy error message from Matlab/Simulink command window or send a print screen of the error.


Common Problems:
1. Model needs to be re-built. This occurs every time after changing the model in Simulink, the solution is to re-
build the model.
2. Clicking ‘stop’ does not switch-off the equipment. The only solution is to turn off the power supply to the
motors by turning off the switch on the back of the black power supplies. This should never happen but make
sure you are aware of these switches during operation. Please inform PG support if this happens.
3. The Quanser does not settle for a long time and the data saved is insufficient. Solution: check the Simulink
help page for “data saving” and for the block “scope”.
Any operation questions or concerns, please email PG support: [email protected]



February 2020 Page 5
Part 1: Transfer Function Identification of Quanser

This part is based on AENG21330 and AENG21301 with additional theoretical material given in class.
After completing Part 1 of this coursework, you should be able to:
- Analyze the open-loop behaviour of a system
- Estimate a transfer function from experimental data
The main goal of this experiment is to evaluate, estimate and analyse the open-loop (i.e. without a control
system) behaviour of a real system.

Task 1.1 Quanser introduction
➢ Follow “Quanser_2020_OperatingInstructions.pdf”
➢ Consult all documents and videos in BlackBoard: “signs.ppt”, “Qlabshortened.wmv” and
“QuanserIntro2.wmv”

Task 1.2 Open-loop analysis
Simulink File: SSC20_QuanserPart1_SetupQuanser.slx
➢ Using step commands, show & describe the open-loop behaviour of the elevation axis.
Important: Never start the step command from the “fans off” condition (i.e. at beginning, t=0seconds)
as the start-up is highly nonlinear and may result in very oscillatory behaviour (prone to crashing the
helicopter against the table, plus the system typically requires some time to settle before measuring the
effects of the command). Build and start the model, let it settle, and then introduce the command. Note
that “zero elevation” is taken to be the resting (fans off) position, so request elevations in  5 range.

➢ Estimate & report the transfer functions for the open-loop behaviour using 1st and 2nd order models.
Important: provide equations and sufficient information (methodology, input/outputs plots and
numerical results) on the identification of the transfer functions (TFs).

➢ Compare in time-domain the responses obtained by simulating the obtained TFs with the data
obtained from the Quanser. (A single plot showing the experimental and the estimated results is
recommended –but see table below on the format of figures).

➢ Analyze the estimated TFs (i.e. show its stability, and the time and s-domain metrics). Show the
pole-zero diagram of the identified transfer functions on the s-plane.

Task 1.3 Discussion and conclusions
➢ Discuss the results obtained and present your conclusions.





Report (applicable to each and all parts)
- Enumerate figures, tables and equations and refer them in the text.
- Show the units of the variables you are presenting.
- Use fonts and line types that are readable.
- Figures should be self-explanatory. Always include legends, units and
axes with readable fonts and line-types/markers of sufficient size.
(providing an unintelligible figure is as bad as not providing it)
February 2020 Page 6
Part 2: PID theory, Matlab & Simulink

After completing Part 2 of this coursework, you should be able to:
- Design, evaluate and tune PID controllers using theory and Matlab/Simulink.
- Explain the effect of the proportional, integral and derivative actions of a controller.
- Use the root locus diagram to predict and explain controller behaviour.
- Apply classical control design techniques to obtain a controller.

Part 2.1 PID analysis using Theory and Matlab
In this part, you will analyse using Theory and Matlab the Quanser open-loop transfer functions for the
elevation axis obtained in Part 1 when in a standard unity feedback with a P-I-D controller.

The main goal of this exercise is to analyse the individual contributions of the proportional, derivative and
integral terms for a classical PID controller architecture. This analysis will be performed in terms of time-
domain simulations (using Matlab) and theory (using the root locus diagram).

Task 2.1.A Proportional feedback controller
➢ Assume a proportional gain controller with the elevation as the control variable (CV) and the elevation
input as measured variable (MV).
➢ Using step responses, show the effect of the proportional term by varying the controller gain.
Tip: start with zero gain and increase in intervals of small values (e.g. 0.01 or 0.1 as you see fit).
➢ Using the root locus diagram approach, compare above findings with the theory predictions.

Task 2.1.B Proportional-Derivative feedback controller
➢ Add now a derivative feedback controller to the controller from Task 2.1.A.
➢ Repeat as in previous task but for the derivative gain.

Task 2.1.C Proportional-Derivative-Integral feedback controller
➢ Add an integral feedback controller to the controller from Task 2.1.B.
➢ Repeat as in previous task but for the integral gain.

Task 2.1.D Discussion and conclusions
➢ Present your preferred controller and state your reasons.
➢ Give a brief summary of the contribution of each P-I-D term.











February 2020 Page 7
Part 2.2 PID design
In this part, you will design a classical controller for the identified open-loop transfer functions.

The main goal of this part is to use Theory and Matlab/Simulink to apply a classical frequency-domain
design technique until a controller is found that satisfies the following requirements (minimum the required):

Objective Required Desired
Rise time, Tr [seconds] 12 6
Overshoot, OS [%] 10 5
Settling time, Ts
[seconds] wrt 4%
20 15
Steady-state error [%] 5 0
Table I – Part 2Design requirements

Task 2.2.A Theoretical/Matlab PID design
➢ Using Theory and Matlab apply the design process of your choice from those taught in class until
a desired controller architecture (P, PD, PI, PID or combination, as you wish) and gains are obtained.
➢ Clearly give the transfer functions used, the control architecture, and also the design process steps.
Tip: for the theoretical design, consider first the “required” requirements in Table I.
Suggestion: use and test several of the taught controller techniques (you only need to report one, but if
you check more then by all means tell us about it and compare).
February 2020 Page 8
Part 2.3 Controller analysis and verification
In this part, you will analyze and verify the controller from Part 2.2.

Task 2.3.A Simulink implementation, retuning and test with extreme plants
Simulink File: SSC20_QuanserPart2a_PIDdesign.slx
➢ Implement the controller from Task 2.2.A within, see Figure 1, the block “Place here your THEORY
controller (Task 2.A)” and your identified plant, 1st or 2nd order, within block “Place your plant here
(the one identified in Part 1)” in the provided Simulink file.
➢ Test & manually tune if necessary the gains for your controller directly in the Simulink (using a copy
of it placed in the block “Place here your SIMULINK-TUNED controller (TASK 2.B)” until the
selected-level of objectives are fulfilled.

Figure 1 Simulink model: Simulink File: SSC20_QuanserPart2a_PIDdesign.slx

➢ Check the resulting tuned-controller for the two “extreme” plants (representing different possible
plants for the Quanser) by appropriately setting the “Plant switch”. This will allow you to ensure that
your controller is “robust” to differences between your identified model and the real Quanser systems.
➢ Provide a table with the controller gains obtained from the theoretical part (task 2.2.A) and from the
tuning in Simulink (task 2.3.A).
➢ Show the closed-loop output responses for 2.2.A and 2.3.A (both for the plant and controller).
➢ Provide a table with the time-domain metrics of your theoretical and re-tuned design (rise time,
settling time, overshoot, etc.).
Tip I: if you designed in 2.2.A for “desired” and in Simulink the response is close to fulfilling them,
then try directly tuning for this harder level of requirements.




February 2020 Page 9
Task 2.3.B Simulink test with nonlinearities
Simulink File: SSC20_QuanserPart2b_SetupSIMULINK_NL.slx
➢ Implement the controller from Task 2.3.A in the 2nd Simulink file for Part2.
The setup employed in Part 2.3.A assumed an ideal behaviour of the actuation system (i.e. controller
deflections sent to plant input without any real physical limit). In real applications this can be
erroneous and result in a change in system performance and even stability. If your controller works in
this Part2b Simulink with the nonlinearities (rate and magnitude limiters) active, then the “jump” to the
real Quanser in Part 3 will be smooth (i.e. if the controller works with all the plants and the NLs,
chances are it will work –almost- correctly in the real Quanser maybe requiring only minor tuning).
➢ The saturation and rate limiter nonlinearities (NLs) are mathematical models to represent
respectively a limit in amplitude and rate of change of a signal, see Figure 2, in this case the controller
output.
If you open the Help of the associated Simulink blocks, you will find their exact definitions. They are
often used in control design to properly consider the physical limits experienced by actuators. In this
particular case, the phenomena described by these operators are one of the main sources of
discrepancies in system response that you will experience going from the Simulink model to the
helicopter rig. This task shows, and allows you, to take into account these mismatches already from the
simulation stage –while ensuring that the “jump” to the Quanser is not that drastic. Do not change the
limits defined in the Simulink blocks.

Figure 2 Simulink model with nonlinearities: SSC20_QuanserPart2b_SetupSIMULINK_NL.slx
➢ Test, and tune if necessary, the controller with the active magnitude and rate limits.
➢ Add to the previous tables the controller tuning performed in this task as well as the resulting time-
domain metrics.
➢ Add to the previous plot the closed-loop output responses for 2.3.B

PART 2.4 Discussion
Discuss the results obtained in this Part.


Nonlinearities
February 2020 Page 10
Part 3: PID implementation, validation and retuning in Quanser

After completing Part 3 of this coursework, you should be able to:
- Design, evaluate and tune a controller from theory through simulation to experiment.
The main goal of this part is to evaluate the behaviour of the Part 2 controller using now the real Quanser.
As a minimum, the design must satisfy in the Quanser the required objectives in Table I.

Any design that also achieves the desired objectives will obtain an extra 10% to be added to the total Quanser
coursework grade up to the maximum mark of 100%.

Objective Required Desired
Rise time, Tr [seconds] 6 4
Overshoot, OS [%] 5 5
Settling time, Ts
[seconds] wrt 4%
15 10
Steady-state error [%] 0 0
Table II – Part 3 Design requirements
Task 3.1 Quanser implementation and evaluation
Simulink File: SSC20_QuanserPart3_SetupQuanser.slx
➢ Implement the controller from Part 2 in the above Part3 Simulink file used by the Quanser.
➢ Use step responses to evaluate the behaviour of the real system.
➢ If the Quanser shows unstable behaviour (i.e. fast and oscillatory travel –please try not to allow it to
hard crash against the table), stop and go to the next task.
Tip I: check the controller output behaviour to ensure is adequate. If the action is too large (in terms of
magnitude) or too fast (in terms of rate, e.g. you will see a thick solid band in the scope indicating very
fast oscillatory actuation), then although the requirements might be satisfied in Simulink, you may
have problems using this controller in the Quanser.
Task 3.2 Re-tuning phase
➢ [1] Theory: apply the design process of your choice within Matlab until a desired controller
architecture and gains are obtained (as in Part 2 but with the new requirements).
➢ [2] Simulink: implement controller in Part2 provided Simulink files and test & tune if necessary.
➢ [3] Quanser: implement the new tuned controller in the SetUpQuanser Simulink file and test & tune.
➢ Augment the table with the controller gains with those from above tunings.
➢ Show the closed-loop output responses for Tasks 3.1 and 3.2 (of both, plant and controller).
➢ Augment the table of time-domain metrics from Part 2 with those from the above retuned design

Task 3.3 Discussion and conclusions
➢ Discuss the results obtained and present your final conclusions.



51作业君

Email:51zuoyejun

@gmail.com

添加客服微信: abby12468