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 - CONTROL SYSTEMS ANALYSIS AND DESIGN
PRE-LABORATORY SIMULATION (MATLAB OFFLINE)
Procedures:
1. Open the script in MATLAB and review Part 1 to understand the master_flight_log
matrix, which contains the flight time and altitude telemetry data for the UAV.
2. Navigate to Part 2 to slice the data matrix using the colon (:) operator. Extract all rows
but only columns 1 through 51 to isolate the transient_log. Then, extract all rows but only
columns 151 through 201 to create the steady_log.
3. Go to Part 3 to clean the corrupted telemetry data. Target Row 2, Column 101 of the
master_flight_log matrix, and overwrite the false zero value with the correct hovering
altitude of 50.
4. Run the script to execute your data processing and launch the validation dashboard.
Observe the 2D "UAV Altitude Response" plot, specifically the highlighted transient and
steady-state windows.
5. Watch the 3D "Cinematic Flight Trajectory" visualization and note how the thrust vector
and ground shadow change as the UAV maneuvers.
Guide Questions:
1. Based on the "UAV Altitude Response" plot, how would you describe the difference in
the drone's vertical movement during the "TRANSIENT" window compared to the
"STEADY-STATE" window?
2. Why is it important to identify and repair corrupted sensor data (like the zero value at
index 101) before running a system simulation or flight algorithm?
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 understand how the simulated dataset of 100 data points is generated
for the time vector (t) and the amplitude response vector (y).
3. Navigate to STEP 2 to examine the array slicing syntax. Note the use of the colon
operator : in the command t(10:40) to extract the 10th through 40th elements, effectively
isolating the transient performance window.
4. Check STEP 3 to see how the extracted data is analyzed using the max() function to find
the maximum peak overshoot strictly within that specific sliced window.
5. Run the script and review the MATLAB Workspace pane to verify the dimensions of the
newly created sliced arrays (they should be 1x31). Try modifying the slicing indices in
STEP 2 (e.g., change 10:40 to 20:50) and re-run the script to observe the changes in your
workspace.
Guide Questions:
1. Looking at the array slicing syntax in STEP 2, how would you modify the code y(10:40)
if you wanted to extract data starting from the 50th index all the way to the very end of
the array without explicitly typing the final index number? (Hint: Think about the
specific MATLAB keyword used to denote the last element of an array).
2. Based on the analysis performed in STEP 3, if you wanted to find the lowest undershoot
value within that same isolated transient window instead of the peak overshoot, what
MATLAB function would you substitute in place of max()?