首页 > > 详细

代做CSE 535、MATLAB编程设计辅导

CSE 535 Project 2: Context-Aware Adaptation
**Note: The provided content, along with any associated project materials, is exclusively intended for
classroom use. Any form of sharing, posting, or redistribution, even after the completion of this course, is
strictly prohibited in accordance with ASU regulations. Such actions are considered violations of the FSE
code of conduct and may result in severe academic consequences.
In Project 1 you learnt about developing a monitoring application using on-board sensors in a smart
phone. In this project, we will design a context aware adaptation strategy for the development of
autonomous braking system for Level 3 autonomous cars which assumes an underlying distributed
monitoring and actuation cyber-physical system specifically human-in-the-loop and human-in-the plant.
Before we delve into the details let us understand some basic definitions.
Level 3 autonomy: The vehicle operates autonomously, however, requires the driver to be
attentive at all times for potential switch to manual mode.
Controller: It is a software that takes sensor data from the vehicle such as speed, distance
between cars and acceleration or deceleration and outputs the braking pressure to apply
deceleration to stop the car.
Controller gain: It is a property of the controller that determines how aggressively a controller
will apply brakes and stop the car.
Deceleration Limit: This is the maximum limit on the deceleration applied by the controller.
High deceleration can lead to unwanted harm to the driver behind the wheel. The controller can
never apply deceleration that is higher than the maximum limit.
Controller frequency: It is the number of times the controller needs to compute a new braking
input per second.
Reaction time: It is the time taken for the human to decide on an action after a switch to
manual mode
Action time: Time taken to execute the action decided by the human and stop the car.
Autonomous vehicle braking system example

Figure 1: Autonomous Driving example
Consider a user driving a Level 3 autonomous car (Fig. 1). We are specifically focusing on the
autonomous braking system. As a part of the autonomous braking system, there is an advisory control
that:
a) processes a driving scenario, by sensing environmental conditions
b) Predicts if the autonomous braking system will be able to stop the car
c) Determines if the control should be transferred to the human behind the wheel
Autonomous braking system has a feed-back loop controller that senses the distance between the
autonomous car and the car in front , and computes a braking force as a function of the ’s initial
speed !, and distance between and . The braking force applied is also a function of the controller
gain , which is a design parameter that you will have to tune.
The braking force is constrained by the maximum deceleration limit "#$, which is dependent on the
road condition. For example, on dry road you can apply more deceleration than on wet road in rainy
season. The braking force is thus given by the following equation:
= min ( ( !, !%, ), "#$).
Once the braking force is applied, the vehicle kinematics show how the vehicle behaves in the real
world. Given the initial speed ! and initial distance between and , !%, the vehicle kinematics gives
the stopping distance &'(), and stopping time &'() for the vehicle. This you can obtain using the
vehicle kinematics Simulink model ( *+,-./+) provided to you.
If &'() ≥ !% then the autonomous vehicle fails, and the cars collide, else there is no collision. If cars
collide, then stopping time &'() is same as collision time ..
In this example, we will fix the distance between cars and , !%. However, changing initial velocity !,
controller gain , and deceleration limit "#$, can change the stopping distance and stopping time
resulting in potential collisions.
Human driver model
The human driver is assumed to be alert all the time to take over control. However, we have to account
for the reaction time 0 of the human driver after a switching signal is sent through the dashboard
controls. In addition to the reaction time the human action also takes some time to execute.
In this example, we assume that the human provides a deceleration that is 10% higher than the
deceleration limit "#$, i.e. ℎ# = 1.1 "#$. The action time # can be obtained by removing the braking
controller from the Simulink model and applying a static deceleration of ℎ# into the vehicle kinematics
model. After simulation the action time can be obtained as the stopping time reported in the Simulink
model.
The total time taken by the human to completely stop the car is ℎ&'() = 0 + #.
We are now in a position to define a basic logic for the advisory control. The advisory control uses the
following algorithm to decide if it wants to switch:
SWITCH = ADVISORY CONTROL ( !, , "#$, 0)
Step 1: Predict if autonomous braking control collides or not using !, , "#$.
Step 2: If no collision then
Step 3: Do not switch to manual control
Step 4: Else
Step 5: Collision time .= predicted stopping time from Step 1
Step 6: Predict action time #, using !, remove controller, and constant
deceleration 1.1 "#$.
Step 7: Predict reaction time 0
Step 8: Compute ℎ&'() = 0 + #
Step 9: if <
Step 10: Switch to human
Step 11: Else
Step 12: Do not switch.
Driving Context Changes
Road conditions depend on several factors including:
a) User mobility patterns
b) Traffic conditions
c) Weather patterns
Each context can be modeled using stochastic modeling techniques such as Markov chains. In this
assignment you are given a composite model of driving context that has two states: a) normal with
deceleration limit -200 "
&+.! and b) poor road conditions with deceleration limit -150 "
678! .
The prior probabilities of each state ( ) = 0.6, ( ) = 0.4. The transition probabilities
are given by the matrix:
=

0.6 0.4
0.85 0.15
Human Reaction time model
The cognitive workload of a human changes based on driving context. We will assume that normal
driving conditions have low workload, and poor driving conditions require high workload.
Consider Table 1 in https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6338053/pdf/fnhum-12-00525.pdf
The heart rate and respiratory rate is provided for single task under low cognitive workload (LCW) and
high cognitive workload (HCW) tasks. Use the mean and standard deviation to create a gaussian model
of heart rate and respiratory rate. For each driving condition, the heart rate and respiratory rate
is sampled from the gaussian model. The respiratory quotient can be computed as = 90
:0
. The human
reaction time 0 can be computed using the following equation:
0 = 0.01 ∗
Project Tasks
The project has three specific tasks as shown in Fig 2.
Fig 2: Project tasks
In this project, we will first attempt to design the advisory control for an average user. Then choose a
specific user and modify the advisory control design at deployment. Finally, after deployment revert
back to the design phase to change the advisory control and personalize it for the specific user.
This mimics the standard context aware application development workflow. Here the manufacturer
initially designs a system to be used for a large set of users. After deployment, a specific user can make
some limited configuration changes to the system. The data is collected during deployment. This data is
then used to redesign the system to personalize for specific user profiles.
Task 1: Controller design
Given:
1. A set of initial speeds, 20 kmph to 40 kmph
2. Deceleration limits of normal (-200 / ) and poor (-150 / )
3. User profiles
User LCW HCW
HR RR HR RR
1 80 (± ) 16 (±6) 95 (± ) 21 (± )
2 65 (± ) 13 (± ) 71 (± ) 14 (±5)
3 61 (± ) 17 (± ) 92 (± ) 26 (± )
To do:
1: Create an average user profile
2. Determine reaction time model
3. Determine controller gain for each road condition such that collision is minimized for the given
initial speed range
4. Determine the number of switches necessary to avoid collision for your design
Task 2: Reaction time update in advisory control
Given:
1. User 3 as the actual user of the system
2. Initial speed range 20 kmph to 60 kmph
3. Fix the gains for Normal and Poor road condition from Task 1.
4. Markov chain model for road condition generation
To do:
1. Using the monte Carlo Markov chain simulation method generate a sequence of length
100 of normal and poor road conditions
2. For each road condition in the sequence, sample the initial speed range uniformly to get
one initial speed
3. For each road condition in the sequence, sample the HR and RR models of User 3 to obtain
one HR, one RR and consequently one reaction time for the user.
4. Evaluate collision status for each road condition in the sequence.
5. Evaluate the number of switches in each road condition in the sequence.
6. Determine the reaction time setting in the advisory control that gives the least number of
collisions with the least number of switches.
Note here that the reaction time of the human user is independent of the reaction time setting of
the controller.
So there will be scenarios where even if you decide to switch according to the current reaction
time of the human driver it is not feasible for the user to stop the car and as a result there is a
collision.
Task 3: Gain personalization
Given:
1. User 3 as the actual user of the system
2. Fixed reaction time setting of advisory control
3. Initial speed range of 20 to 60 kmph
To do:
1. Update the gains for each road condition such that the number of collisions and number
of switches are both reduced.
DETAILS FOR PROJECT SUBMISSION:
Software required: MATLAB
To get Started with MATLAB:
Refer to the documentation uploaded on Canvas – ‘Software Requirements and Guidelines for Project 2’
Provided Files:
You have been provided with some files in the Github repository:
https://github.com/ImpactLabASU/MC535Project2
These files contain components related to the project or task you are working on.
Deliverables:
1.Kindly submit three separate MATLAB files for Task 1, 2, and 3, along with an output CSV file.
2.The MATLAB submission files should follow the naming convention:
.m
3.All output data should be saved in a CSV file containing two columns: 'Tasks' and 'Output.' The task
name should adhere to this format: Task.: . For instance, if Task 1
involves 2 switches, it should be displayed as follows in the CSV:
Tasks Output
Task1.4 2
Append all outputs of Task 1, 2 and 3 to the same csv file. The naming convention for the CSV file should
be .csv

联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!