MATLAB code
Jump to navigation
Jump to search
Contents
MATLAB files
animateBike.m
Inputs:
- state
- p
- motCommands
- delta_offset
- phi_offset
balanceControlOptimizer.m
BikeAndMotorConstants.m
CircleAboutZ.m
Inputs:
- r - radius of the circle
drawBike.m
Inputs:
- x
- y
- z
- yaw
- roll
- steer
- p
lqr_BC_optimizer.m
plotMultipleControllersTogether.m
rhs.m
- currentState
- p
- K
- delta_offset
- phi_offset
runBicycleTest.m
Inputs:
- x0,y0 - intial location
- v0 - initial speed
- delta0 - intial steer angle
- phi0 - intial lean angle
- phi_dot0 - intial derivative of lean angle
- psi0 - intial yaw angle (heading)
- K - vector of gains (k1, k2, k3)
- delta_offset - either a scalar (a constant offset), or a vector of offsets (the bike will attempt to hit delta_offset(n) at the nth timestep
- numTimeSteps - the number of time steps to run the simulation for
- graph - 1= draws graph, 0 =does not