Before starting the experiment write down the number of your experiment rig in your lab logbook. You should keep using the same rig for all the 5 experiments because each motor has its own transfer function.
The text is more regularly updated according to feedback in comparison with the videos. If there is a difference between the text and a video you should follow the text.
Task 1 - Learn how to use the Simulink software.
Follow the guide "Creating a simple model". This guide can be found by opening MATLAB and typing simulink into the command window. Click "help" from the Simulink toolbar and navigate to Simulink Help --> Getting Started --> Creating a simple model. Build and simulate the simple model given in the section.
At some points in the coming experiments you will need to take measurements from signals in the Simulink scope. This can be done in two ways:
1) Run the simulation. Open the Simulink scope by double click on it. Pick a point of interest on the signal, click and hold on an area around this point by dragging the mouse across the point of interest. This will zoom in the scope over the area you highlighted. You may need to do this a few times to increase the accuracy of your measurements.
2) Open the Simulink scope before running the simulation. Click on the scope parameters button, navigate to the History tab and check the "Save data to workspace" box and make sure the variable name is "ScopeData". Also make sure that the "limit data points to last" option is sufficiently high. Approx. 10000. Run the simulation and navigate to the MATLAB command window and type plot(ScopeData.time,ScopeData.signals.values). Open the MATLAB figure. To measure specific values you may want to use the Data Cursor by clicking the data cursor button . Once the data cursor icon is selected a point on the signal can be selected and the data points will be displayed.
Assess the advantages and disadvantages of both of these methods with regards to both signal visualization and taking measurements at specific points.
Make sure the circuit is set up as shown below. If it is not call your demonstrator for an inspection.
Note: P0_A could also be red+black
and P0_B could also be purple
under our new colour code.
Open MATLAB. Navigate the directory to C:\Program Files(x86)\Hilink. Copy and paste all of the files in this folder to another folder, preferably on your USB drive. Then change the MATLAB working directory to your new directory where all the files were pasted. This directory will need to be used as the working directory for all experiments in ECTE344 so take note of where it is located. Save all files produced in all experiments to this directory (not in subfolders).In the MATLAB command window set S = inf and T = 1/2048.
Note: This will need to be done at the start of every experiment so take note on how to do it.
(If the program keeps crashing do the following:
Open windows task manager by pressing ctrl+alt+del. Select the processes tab, find the MATLAB process, right click on it and choose set affinity. Select only one core that the process will run on. You should try CPU7 first.)
Visit the Control Tutorials at http://ctms.engin.umich.edu/ and study the DC Motor Speed: Simulink Modelling section by clicking on MOTOR SPEED at the top and MODELLING at the bottom-left under SIMULINK. Following the instructions to create the DC motor block using Simulink. Delete the input and output terminals by right click on it and select delete. Connect a step block from the Source section of the Simulink Library Browser to the voltage input of the DC motor. Connect a scope from the Sink section of the Library to the speed output of the DC motor block. Simulate the speed of the motor to a step voltage. This is the step response of the DC motor.
Left click MODELLING at the top-left under SYSTEM and study the motor transfer function. Study the effects of the moment of inertia on the step response of the DC motor speed using Matlab command step. Increase the value of the moment of inertia from 3.2284E-6 to 3.2284E-5 step by step with a step size of 3.2284E-6. Represent your results using a graph and comment on how the moment of inertia affects the step speed response of the DC motor.
Task 5 - DC motor position: system modelling
Visit the Control Tutorials at http://ctms.engin.umich.edu/ and study the DC Motor Position: System Modelling section by clicking on MOTOR POSITION at the top and MODELLING on the left. Simulate the step response of the motor transfer function.