Sensing, Control and Automation
Lab 1: Motor Modelling and Open vs Closed Loop Analysis
Introduction:
Simulink is the graphical front end for Matlab, and enables block schematic representations ofa variety of systems to be produced and analysed. Block diagram representations of control systems are a particularly important capability, and provide a direct link to the principal representation method being studied in lectures.
Some basic guidance can be found in the document “Matlab/Simulink – Getting Started on Control Analysis” handed-out with this assignment. However once you have understood the use of libraries and the elements they contain, Simulink is simple and intuitive to use. The document also explains how to transfer results from Simulink into the Matlab workspace, which can help to create comparative graphs from different simulations.
You will be modelling a motor and carrying out various open and closed-loop simulations. The motor parameters representing a real DC motor driving a small load are as follows:
Back emf constant Kv = 0.024 V/rad s-1
Torque constant Kt = 0.024 Nm/A
Inertia (motor + load) J = 1.1x10-5 kg m2
Armature resistance R = 4 Ω
Armature inductance L = 0.01 H
Friction coefficient Kf = 2.5x10-5 Nm/rad s-1
Exercise Aims:
1) To gain familiarity in modelling and simulating systems using Matlab/Simulink
2) To compare the usefulness of open-loop and closed-loop control for a DC motor.
How to work:
Work either individually or in pairs and keep rough notes for your own future reference in your notebook.
The Tasks to be undertaken
There are six distinct tasks, and it may be sensible to have separate file names for each task so that you can keep track of your work. The first four are considered essential. Tasks 5 and 6 are optional depending on time.
Deliverables:
The results will be discussed during the exercise. A brief feedback session will be done at the end of the exercise.
Task 1. Development and validation of DC motor model
1.1 Based upon the block diagram of the DC motor which was discussed in lectures, create a Simulink model with armature voltage as the input and angular velocity as the output.
To create this model in Simulink, you will need to use a Sum block, a number of Gain blocks and an Integrator. You can either directly assign values to the gain blocks corresponding to the motor parameters, or you can enter them symbolically in Simulink (e.g. R for the armature resistance, Kt for the torque constant, etc.) assigns values to the parameters from a Matlab m-file. We recommend the latter, in which case you need to run this m-file (from the
Matlab command line) before doing anything with the model. Make sure that you save the Simulink model with an appropriate filename.
1.2 Test that your model is correct by applying a step input of 1V at t = 1 second
and simulate for 2 seconds. Check that the output is what you would expect.
Task 2. Open-loop velocity response
2.1 Calculate or work out the gain (G0) to be applied (as an open-loop controller) in order to give a steady-state speed which follows the command speed.
2.2 Apply this gain (G0) and set the command step input to 100rads-1. Simulate it and verify that the velocity reaches the correct steady-state. Note that if you apply the step after (say) 0.5 second it will be easier to see the response. (If you have incorrectly worked out what gain to apply it will not of course give a response tending towards 100rads-1, so this provides a useful check.). Make a note of the rise time2.
2.3 Increase the friction level Kf by 100% and run the simulation again. This should change the response of the system
- Note the steady state value and the new rise time
- By what percentage has the steady state changed?
Task 3 Closed-loop velocity control
(Now set your system parameters back to the default.)
3.1 Modify your model to create a closed-loop system, setting the proportional control gain (G) to an initial value of 0.1 V/rads-1.
3.2 Simulate the response for a step input of 100 rads-1 and observe how it changes as you decrease/increase the control gain (G).
3.3 Select a suitable gain (G) to achieve smaller steady-state error, faster response, but voltage applied must be less than 50V at its peak.
Note the steady state value and the rise time
3.4 Now change the value of the motor friction similar to task 2.3.
Note the steady state value and the new rise time
By what percentage has the steady state changed?
What have we discovered so far?
You have considered open-loop and closed-loop control of the motor. You should have noticed that:
1) The transient response is much shorter in closed-loop than open-loop.
2) There is a steady-state error in closed-loop - it can be made smaller by increasing the gain (but will never be zero with just proportional control).
3) There is no steady-state error from the open-loop control when the parameters are known perfectly
4) The effect on the transient & steady-state response of uncertainty (changes in
system parameters such as friction) is less in the closed than the open-loop.
|
Task 4: Effect of a disturbance (e.g. an applied external torque).
(Set your system parameters back to the default.)
4.1 Modify block diagram of the motor model to allow a disturbance torque to be applied.
4.2 Copy the motor model so you can implement the open and closed loop models alongside one another.
4.3 Put in a command step of 100 rad/s at t=0 seconds and a disturbance torque step of amplitude 0.02Nm (this may sound small - but the motor is small and it is around 10% of the motors load capacity).
4.4 Run the simulation. How do the open-loop and closed-loop strategies compare with external loads applied?
What did you see?
The closed loop control overcomes the effect of disturbance far better than the open- loop control scheme.
|
Additional Tasks Time Permitting
Task 5
Add an integral action to the closed loop (to give a PI controller) and see what effect it has on the steady state error (the integral gain must not be too large if the system is to be stable - so it may need some trial and error tuning).
Task 6
Try using EITHER the frequency design method demonstrated in the lectures OR a method you have been taught in previous studies to design the P+I controller for motor speed control.