主题:[讨论]求助高手
各位高手好
我现在碰上了一个难题,请各位高手指导!
我已经画出了加速度的倒数曲线图(速度和加速度倒数的关系),如何画加速度时间曲线?
加速度倒数曲线代码如下:
Private Sub Command1_Click()
Dim F!, n!, u!, i!, T!, y!, a!
i = Val(Text1.Text)
n = 600
u = 0.377 * 0.367 * n / (i * 5.83) '车速与转速的关系
CurrentX = u
T = -19.313 + 295.27 * n / 1000 - 165.44 * n * n / 1000000 + 40.874 * n ^ 3 / (1000 ^ 3) - 3.8445 * n ^ 4 / (1000 ^ 4) '转矩与转速
F = T * i * 5.83 * 0.85 / 0.367 - 3880 * 9.8 * 0.013 - u * u * 2.77 / 21.15 'Ft-Ff-Fw
y = 1 + (1.798 + 3.598) / (3880 * 0.367 * 0.367) + (0.218 * 5.83 * 5.83 * 0.85 * i * i) / (3880 * 0.367 * 0.367) 'y为旋转质量系数
a = F / (y * 3880) '驱动力与加速度
a = (1 / a) * 1000
CurrentY = a '设定起点
For n = 600 To 4000
u = 0.377 * 0.367 * n / (i * 5.83)
T = -19.313 + 295.27 * n / 1000 - 165.44 * n * n / 1000000 + 40.874 * n ^ 3 / (1000 ^ 3) - 3.8445 * n ^ 4 / (1000 ^ 4)
F = T * i * 5.83 * 0.85 / 0.367 - 3880 * 9.8 * 0.013 - u * u * 2.77 / 21.15
y = 1 + (1.798 + 3.598) / (3880 * 0.367 * 0.367) + (0.218 * 5.83 * 5.83 * 0.85 * i * i) / (3880 * 0.367 * 0.367)
a = F / (y * 3880)
a = (1 / a) * 1000
If a > 9000 Then
Exit For
Else
Line -(u, a), QBColor(10)
End If
Next n
End Sub
Private Sub Form_Click()
Dim i%, j%, x!, y!
Scale (-20, 11000)-(200, -1000) '设定图的位置
Line (0, 0)-(100, 0)
Line (0, 0)-(0, 9000)
For i = 0 To 10
Line (i * 10, 0)-(i * 10, 100)
x = i * 10
CurrentY = -200
Print x
Next i
CurrentX = 110
CurrentY = -40
Print "车速u(kM/h)" '画X轴
For j = 1 To 20
Line (0, j * 450)-(2, j * 450)
y = j * 450
CurrentX = -10
Print y
Next j
CurrentX = 8
CurrentY = 9500
Print "1/a *10^-3" '画Y轴
End Sub
Private Sub Command2_Click()
Form1.Cls
End Sub
Private Sub Command3_Click()
Unload Me
End Sub
我现在碰上了一个难题,请各位高手指导!
我已经画出了加速度的倒数曲线图(速度和加速度倒数的关系),如何画加速度时间曲线?
加速度倒数曲线代码如下:
Private Sub Command1_Click()
Dim F!, n!, u!, i!, T!, y!, a!
i = Val(Text1.Text)
n = 600
u = 0.377 * 0.367 * n / (i * 5.83) '车速与转速的关系
CurrentX = u
T = -19.313 + 295.27 * n / 1000 - 165.44 * n * n / 1000000 + 40.874 * n ^ 3 / (1000 ^ 3) - 3.8445 * n ^ 4 / (1000 ^ 4) '转矩与转速
F = T * i * 5.83 * 0.85 / 0.367 - 3880 * 9.8 * 0.013 - u * u * 2.77 / 21.15 'Ft-Ff-Fw
y = 1 + (1.798 + 3.598) / (3880 * 0.367 * 0.367) + (0.218 * 5.83 * 5.83 * 0.85 * i * i) / (3880 * 0.367 * 0.367) 'y为旋转质量系数
a = F / (y * 3880) '驱动力与加速度
a = (1 / a) * 1000
CurrentY = a '设定起点
For n = 600 To 4000
u = 0.377 * 0.367 * n / (i * 5.83)
T = -19.313 + 295.27 * n / 1000 - 165.44 * n * n / 1000000 + 40.874 * n ^ 3 / (1000 ^ 3) - 3.8445 * n ^ 4 / (1000 ^ 4)
F = T * i * 5.83 * 0.85 / 0.367 - 3880 * 9.8 * 0.013 - u * u * 2.77 / 21.15
y = 1 + (1.798 + 3.598) / (3880 * 0.367 * 0.367) + (0.218 * 5.83 * 5.83 * 0.85 * i * i) / (3880 * 0.367 * 0.367)
a = F / (y * 3880)
a = (1 / a) * 1000
If a > 9000 Then
Exit For
Else
Line -(u, a), QBColor(10)
End If
Next n
End Sub
Private Sub Form_Click()
Dim i%, j%, x!, y!
Scale (-20, 11000)-(200, -1000) '设定图的位置
Line (0, 0)-(100, 0)
Line (0, 0)-(0, 9000)
For i = 0 To 10
Line (i * 10, 0)-(i * 10, 100)
x = i * 10
CurrentY = -200
Print x
Next i
CurrentX = 110
CurrentY = -40
Print "车速u(kM/h)" '画X轴
For j = 1 To 20
Line (0, j * 450)-(2, j * 450)
y = j * 450
CurrentX = -10
Print y
Next j
CurrentX = 8
CurrentY = 9500
Print "1/a *10^-3" '画Y轴
End Sub
Private Sub Command2_Click()
Form1.Cls
End Sub
Private Sub Command3_Click()
Unload Me
End Sub