# Radius in cm of the tail
Radius = 10
LegRadius = 10
source(‘~/EE400d/Analysis/HeadandTailServoAnalysis.R’)
TailPositionX10 = TailPositionX
TailPositionY10 = TailPositionY
HeadPositionX10 = HeadPositionX
HeadPositionY10 = HeadPositionY
X_Moment10 = X_Moment
Y_Moment10 = Y_Moment
Radius10 = 10
LegRadius10 = 10
MaxTorqueHeadX10 = MaxTorqueHeadX
MaxTorquePlatform10 = MaxTorquePlatform
LegTorque10 = LegTorque
RealMaxLegTorque10 = RealMaxLegTorque
MaxTurningTorque10 = MaxTurningTorque
##
Radius = 9
LegRadius = 9
source(‘~/EE400d/Analysis/HeadandTailServoAnalysis.R’)
TailPositionX9 = TailPositionX
TailPositionY9 = TailPositionY
HeadPositionX9 = HeadPositionX
HeadPositionY9 = HeadPositionY
X_Moment9 = X_Moment
Y_Moment9 = Y_Moment
Radius9 = 9
LegRadius9 = 9
MaxTorqueHeadX9 = MaxTorqueHeadX
MaxTorquePlatform9 = MaxTorquePlatform
LegTorque9 = LegTorque
RealMaxLegTorque9 = RealMaxLegTorque
MaxTurningTorque9 = MaxTurningTorque
##
Radius = 8
LegRadius = 8
source(‘~/EE400d/Analysis/HeadandTailServoAnalysis.R’)
TailPositionX8 = TailPositionX
TailPositionY8 = TailPositionY
HeadPositionX8 = HeadPositionX
HeadPositionY8 = HeadPositionY
X_Moment8 = X_Moment
Y_Moment8 = Y_Moment
Radius8 = 8
LegRadius8 = 8
MaxTorqueHeadX8 = MaxTorqueHeadX
MaxTorquePlatform8 = MaxTorquePlatform
LegTorque8 = LegTorque
RealMaxLegTorque8 = RealMaxLegTorque
MaxTurningTorque8 = MaxTurningTorque
##
Radius = 7
LegRadius = 7
source(‘~/EE400d/Analysis/HeadandTailServoAnalysis.R’)
TailPositionX7 = TailPositionX
TailPositionY7 = TailPositionY
HeadPositionX7 = HeadPositionX
HeadPositionY7 = HeadPositionY
X_Moment7 = X_Moment
Y_Moment7 = Y_Moment
Radius7 = 7
LegRadius7 = 7
MaxTorqueHeadX7 = MaxTorqueHeadX
MaxTorquePlatform7 = MaxTorquePlatform
LegTorque7 = LegTorque
RealMaxLegTorque7 = RealMaxLegTorque
MaxTurningTorque7 = MaxTurningTorque
##
Radius = 6
LegRadius = 6
source(‘~/EE400d/Analysis/HeadandTailServoAnalysis.R’)
TailPositionX6 = TailPositionX
TailPositionY6 = TailPositionY
HeadPositionX6 = HeadPositionX
HeadPositionY6 = HeadPositionY
X_Moment6 = X_Moment
Y_Moment6 = Y_Moment
Radius6 = 6
LegRadius6 = 6
MaxTorqueHeadX6 = MaxTorqueHeadX
MaxTorquePlatform6 = MaxTorquePlatform
LegTorque6 = LegTorque
RealMaxLegTorque6 = RealMaxLegTorque
MaxTurningTorque6 = MaxTurningTorque
plot(X_Moment10,Y_Moment10, col = “green”, lwd = 5, xlab = “X Shift (cm)”, ylab = “Y Shift (cm)”, main = “CoG Shift By H/T Motion” )
lines(X_Moment9,Y_Moment9, col = “red” , lwd = 5)
lines(X_Moment8,Y_Moment8, col = “blue” , lwd = 5)
lines(X_Moment7,Y_Moment7, col = “cyan” , lwd = 5)
lines(X_Moment6,Y_Moment6, col = “purple” , lwd = 5)
legend(“topleft”, lty =c(1,1,1,1,1), lwd = c(1,1,1,1,1), col = c(“green”,”red”,”blue”,”cyan”,”purple”), legend = c(“R = 10cm”,”R = 9cm”,”R = 8cm”,”R = 7cm”,”R = 6cm”))
plot(MaxSpeed,2*MaxTorqueHeadX10, ylim = c(0,max(MaxTorqueHeadX10)), pch = “.”, col = “green”, xlab = “Servo Speed (RPM)”, ylab = “Servo Torque (N-m)”, main = ” H/T Servo Torque vs RPM at Differing Radii”)
lines(MaxSpeed,2*MaxTorqueHeadX9, pch = “.”, col = “red”)
lines(MaxSpeed,2*MaxTorqueHeadX8, pch = “.”, col = “blue”)
lines(MaxSpeed,2*MaxTorqueHeadX7, pch = “.”, col = “cyan”)
lines(MaxSpeed,2*MaxTorqueHeadX6, pch = “.”, col = “purple”)
legend(“topleft”, lty =c(1,1,1,1,1), lwd = c(1,1,1,1,1), col = c(“green”,”red”,”blue”,”cyan”,”purple”), legend = c(“R = 10cm”,”R = 9cm”,”R = 8cm”,”R = 7cm”,”R = 6cm”))
plot(MaxSpeed,MaxTorquePlatform10 , ylim = c(0,max(MaxTorquePlatform10)), pch = “.”, col = “green”, xlab = “Servo Speed (RPM)”, ylab = “Servo Torque (N-m)”, main = “Platform Servo Torque vs RPM at Differing Radii”)
lines(MaxSpeed,MaxTorquePlatform9, pch = “.”, col = “red”)
lines(MaxSpeed,MaxTorquePlatform8, pch = “.”, col = “blue”)
lines(MaxSpeed,MaxTorquePlatform7, pch = “.”, col = “cyan”)
lines(MaxSpeed,MaxTorquePlatform6, pch = “.”, col = “purple”)
legend(“topleft”, lty =c(1,1,1,1,1), lwd = c(1,1,1,1,1), col = c(“green”,”red”,”blue”,”cyan”,”purple”), legend = c(“R = 10cm”,”R = 9cm”,”R = 8cm”,”R = 7cm”,”R = 6cm”))
#plot(thetaLeg, LegTorque10 , ylim = c(min(LegTorque10),max(LegTorque10) + .1), pch = “.”, col = “green”, xlab = “Theta (Radians)”, ylab = “Motor Torque (N-m)”, main = “Leg Torque Versus Lever-Arm Angle”)
#lines(thetaLeg, rep(RealMaxLegTorque10, length(LegTorque)), col = “green”, lty = 2)
#lines(thetaLeg, LegTorque9 , ylim = c(min(LegTorque10),max(LegTorque9)), col = “red”)
#lines(thetaLeg, rep(RealMaxLegTorque9, length(LegTorque)), col = “red”, lty = 2)
#lines(thetaLeg, LegTorque8 , ylim = c(min(LegTorque8),max(LegTorque9)), col = “blue”)
#lines(thetaLeg, rep(RealMaxLegTorque8, length(LegTorque)), col = “blue”, lty = 2)
#lines(thetaLeg, LegTorque7 , ylim = c(min(LegTorque7),max(LegTorque9)), col = “cyan”)
#lines(thetaLeg, rep(RealMaxLegTorque7, length(LegTorque)), col = “cyan”, lty = 2)
#lines(thetaLeg, LegTorque6 , ylim = c(min(LegTorque6),max(LegTorque9)), col = “purple”)
#lines(thetaLeg, rep(RealMaxLegTorque6, length(LegTorque)), col = “purple”, lty = 2)
#legend(“topleft”, lty =c(1,1,1,1,1), lwd = c(1,1,1,1,1), col = c(“green”,”red”,”blue”,”cyan”,”purple”), legend = c(“R = 10cm”,”R = 9cm”,”R = 8cm”,”R = 7cm”,”R = 6cm”))
|