Republic of the Philippines
BATANGAS STATE UNIVERSITY
The National Engineering University
Alangilan Campus
Golden Country Homes, Alangilan Batangas City, Batangas, Philippines 4200
Tel Nos.: (+63 43) 425-0139 local 2121 / 2221
E-mail Address:[Link]@[Link] | Website Address: [Link]
CHAPTER 1 - FEATURES AND CONFIGURATIONS OF CONTROL SYSTEMS
PRE-LABORATORY SIMULATION (MATLAB OFFLINE)
Procedures:
1. Open the script in MATLAB and locate the first insert section. Type clear, clc, and close
all to reset the workspace, clear the command window, and close any open figures.
2. Go to Part 1 and declare the historical baseline metrics using the required snake_case
naming conventions. Assign a value of 60 to watt_governor_rpm, 5 to flyball_mass_kg,
and 50 to steady_valve_pct.
3. Navigate to Part 2 and type save('historical_metrics.mat'); to save your newly created
workspace variables to a file.
4. Run the script to launch the Advanced Historical Centrifugal Governor simulation.
Observe the 3D kinematic animation of the flyballs and the real-time telemetry plot.
Guide Questions:
1. Based on the 3D animation, what physical movement happens to the governor's flyballs
and the sliding throttle sleeve as the motor speed (RPM) increases?
2. Looking at the "Live System Telemetry" plot, how does the behavior of the Valve curve
change in response to the fluctuations in the Speed (RPM) curve?
Republic of the Philippines
BATANGAS STATE UNIVERSITY
The National Engineering University
Alangilan Campus
Golden Country Homes, Alangilan Batangas City, Batangas, Philippines 4200
Tel Nos.: (+63 43) 425-0139 local 2121 / 2221
E-mail Address:[Link]@[Link] | Website Address: [Link]
LABORATORY SIMULATION (MATLAB ONLINE)
Procedures:
1. Open the script within your MATLAB Online workspace.
2. Review STEP 1 to observe how the 2x4 matrix ErrorData is constructed, noting that Row
1 represents Open-Loop data and Row 2 represents Closed-Loop data.
3. Navigate to STEP 2 to examine standard matrix indexing. Note the use of the colon
operator : in the command ErrorData(1, :) to extract all columns for a specific row,
creating a 1D array.
4. Check STEP 3 to understand logical indexing. Observe how mathematical conditions,
such as OpenLoopErrors > 1.0, are placed directly inside the parentheses to filter out
specific data points that meet the criteria.
5. Run the script and look at your MATLAB "Workspace" pane to verify the dimensions
and values of the newly created array variables. Intentionally alter the logical condition in
STEP 3 (e.g., change > to <) and re-run to see how the filtered data changes.
Guide Questions:
1. Looking at the standard matrix extraction syntax in STEP 2, how would you modify the
command ErrorData(1, :) if you needed to extract the entire third column of the
ErrorData matrix instead of the first row?
2. Based on the logical filtering demonstrated in STEP 3, what exact line of code would you
write to filter the OpenLoopErrors array to find values that are exactly equal to 0.8?
(Hint: Pay attention to the specific MATLAB operator required for checking equality
versus assigning a value).