Modelling and control by Anthony Rossiter

MATLAB GUIs or virtual laboratories to support learning of system analysis and design

 

A number of GUIS have been developed to act like virtual laboratories. These allow students to interact with a scenario a little like in a laboratory by changing parameters and viewing the impact. The intention is that students can check behaviours against expected behaviours and thus reinforce their understanding of key priniciples, analysis techniques and systems.

GUIs are written so that students do not need MATLAB skills, however they do need the basic awareness of how to ensure MATLAB can find the file they wish to run.

ADVICE: (i) Create a folder on your computer; (ii) copy the GUI files (usually a *.p and *.fig file) to this folder; (iii) move MATLAB to this folder and (iv) run the file by typing its name in the command window. A simple illustration of this via screen dumps is given here.

The available GUIs are listed nexted. With each of these there is a separate file which gives some of the modelling and theoretical background to the simulations.

  1. Matlab GUIs - 1st order responses.
  2. Matlab GUIs - tank level system.
  3. Matlab GUIs - tank level with disturbances.
  4. Matlab GUIs - mixing tank.
  5. Matlab GUIs - house temperature.
  6. Matlab GUIs - servo position control.
  7. Matlab GUIs - cruise control.
  8. Matlab GUIs - experimental modelling of a DC servo.
  9. Matlab GUIs - landing aircraft.
  10. Matlab GUIs - Heat exchanger.
  11. Matlab GUIs - Heat exchanger with disturbances.
  12. Matlab GUIs - gain and phase cross-over frequencies and margins.
  13. Matlab GUIs - Aeroplane roll example with lead compensator design.
  14. Matlab GUIs - satellite tracking with a radar and lag compensator design.

Matlab GUIs - 1st order responses

Demonstrates the dependence of 1st order step responses on the time constant and gain. View the corresponding section for information on these responses.

Return to top of this page

Matlab GUIs - tank level system

Illustrates the behaviour of a single tank model (see section on 1st order models) with and without feedback to control the input flow rate. Users can change the PI parameters and thus investigate the impact of different choices on behaviour; the behaviour reduces to standard 1st order and 2nd order dynamics.

Matlab GUIs - tank level with disturbances

This GUI builds on the previous one and introduces uncertainty that is present in real world scenarios. The main purpose is to help students understand the need for closed-loop control. The system is affected by small but time varying disturbances to the inflow rate and outlet resistance. Users are challenged to maintain the desired depth in the tank using open-loop or manual control (dynamically changing the in flow directly through a slider) and then to compare this with automatic control.

Return to top of this page

Matlab GUIs - mixing tank

Illustrates the behaviour of a simple mixng tank common in chemical engineering (see section on 1st order models). Users can change the tank volume, flow rate, inlet concentration and initial tank concentration and thus observe the impact of these changes on the concentration in the tank over time. The behaviour reduces to standard 1st order dynamics so students can compare with the expectations of the corresponding analysis.

Return to top of this page

Matlab GUIs - house temperature

Illustrates the behaviour of a simple heating system (see section on 1st order models).

In the first GUI, users can change the heat capacitance, the heat loss coefficient, the target temperature and the PI compensators used to control the heat supply. The behaviour reduces to standard 1st and 2nd order dynamics (depending on whether integral is included) so students can compare with the expectations of the corresponding mathematical analysis.

The second GUI has a similar scenario but fixes the model parameters and allows students to compare between the use of PI control and a simpler on-off control with a dead-band.

Return to top of this page

Matlab GUIs - servo position control

Demonstrates the use of PI compensation in order to realise position control of an object moved by a DC servo. The underlying model for the DC servo is an over damped 2nd order model and it moves a man on a seat. Users can manipulate the choices of PI paramters to investigate their impact on behaviour.

Return to top of this page

Matlab GUIs - cruise control

Demonstrates how PI control is effective for cruise control of a car. Specifically it allows the user to explore the impact of uncertainty on the behaviour of speed. This GUI allows for variations in the car mass, engine power and road slope, that is three different types of realistic uncertainty.

Return to top of this page

Matlab GUIs - experimental modelling of a DC servo

Demonstrates an experimental technique for finding the parameters of a 1st order model representing the dynamics of a DC servo (between applied voltage and steady-state velocity). Students are encouraged to use the GUI in a formulaic way to represent the processes required with equipment.

Return to top of this page

Matlab GUIs - landing aircraft

This GUI is a bit of fun and looks at 2nd order dynamics (Mass-spring-damper) through the passenger motion of a landing aircraft. Users investigate the effects of different choices on passenger comfort.

Return to top of this page

Matlab GUIs - heat exchanger

This GUI illustrates the dynamic behaviour of a simple steam powered heat exchanger. The key variables are the temperature of the inlet flow, the flow rate through the exchanger, the tank volume and the flow rate of steam. As the USER modifies each of these, they will be able to oberve the impact on outlet temperature dynamics.

Return to top of this page

Matlab GUIs - heat exchanger with disturbances

This GUI builds on the previous one and introduces uncertainty that is present in real world scenarios. The main purpose is to help students understand the need for closed-loop control. The system is affected by small but time varying disturbances to the inflow temperature and flow rate. Users are challenged to maintain the desired outlet temperature using open-loop or manual control (dynamically changing the steam flow directly through a slider) and then to compare this with automatic control.

Return to top of this page

Matlab GUIs - gain and phase cross-over frequencies and margins

This GUI is focussed on process for finding gain and phase margins and the intermediate computations for gain and phase cross over frequencies. It is designed to help students think systematically about the required computations and ordering and thus takes them through one step at a time, encouuraging some reflection or individual work to compare with the answers provided.

Return to top of this page

Aeroplane roll example with lead compensator design

This GUI is focussed on the process of finding a lead compensator for roll control in an aircraft, and of course assessing the efficacy and limitations. Students are able to see the Bode and root-loci diagrams and select the lead parameters as well as viewing the impact on behaviour. The aeroplane time constant and gain can also be changed.

Return to top of this page

Matlab GUIs - satellite tracking with a radar and lag compensator design

This GUI is focussed on the process of tracking a satellite, or other flying object, with a radar. The GUI assumes given radar dynamics and that the tracking problem is equivalent to following a ramp target. Lag compensation is used to increase the low frequency gain. Students can test the efficacy of different uplifts in low frequency gain.

Return to top of this page