freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

簡易旋轉(zhuǎn)倒立擺及控制裝置(c題)_大學(xué)生電子設(shè)計(jì)大賽論文-資料下載頁

2025-07-06 02:14本頁面

【導(dǎo)讀】由于直流電機(jī)屬于一階慣性,經(jīng)分析在控制周期遠(yuǎn)小于電機(jī)時(shí)間常數(shù)的。情況下建立電壓與加速度的近似比例關(guān)系模型。選擇減速直流電機(jī)帶動(dòng)旋轉(zhuǎn)臂旋。擺桿的擺動(dòng)幅度并達(dá)到和保持平衡狀態(tài)??刂品绞讲捎肞ID控制,比例環(huán)節(jié)進(jìn)。行快速響應(yīng),積分環(huán)節(jié)實(shí)現(xiàn)無靜差,微分環(huán)節(jié)減小超調(diào),加快動(dòng)態(tài)響應(yīng)。該系統(tǒng)具有良好的性能,能很好的實(shí)現(xiàn)起振、圓周運(yùn)動(dòng)、倒立、360度倒立旋轉(zhuǎn),同時(shí)具有很好的抗擾動(dòng)性能。

  

【正文】 P = 120。 SPEED_CONTROL_I = 1。 } //if(g_ucBegin == 0) { //SPEED_CONTROL_P = 0。 //SPEED_CONTROL_I = 0。 //SPEED_CONTROL_D = 0。 //} fP = SPEED_CONTROL_P*(RightMotorSpeedErr2 RightMotorSpeedErr1)。 fI = SPEED_CONTROL_I*RightMotorSpeedErr2。 fD = SPEED_CONTROL_D*(RightMotorSpeedErr2 2*RightMotorSpeedErr1 + RightMotorSpeedErr0)。 //SpeedControlOld = SpeedControlNew。 SpeedControlOut += fP + fI + fD。 } void AngleCalculate(void) { LeftMotorSpeedOld = LeftMotorSpeed。 LeftMotorSpeed = LeftMotorPulseSigma。 20 LeftMotorPulseSigma = 0。 GravityAngle = ((int)(GRAVITY_ANGLE_RATIO*g_lPosition))%360。 if(GravityAngle 180) GravityAngle = GravityAngle 360。 AngleSpeed = ANGLE_SPEED_RATIO*LeftMotorSpeed。 } void Delay(int num) { int delay_c。 for(delay_c=0。delay_cnum。delay_c++)。 } void PositionSetOut(void) { float fvalue。 fvalue = PositionControlNew PositionControlOld。 PositionControlOut = fvalue*(PositionControlCount + 1)/POSITION_CONTROL_COUNT + PositionControlOld。 } 主函數(shù): include include include include const float tancode[181]= { ,,,6, ,,,63, ,,,13, ,,,49, 21 ,,,03, ,,,15, ,,,0, ,,,713, ,,,2.4751, ,,,1.4826, ,,,0.9657, ,,,0.6249, ,,,0.3640, ,,,0.1405, ,, }。 //const float float POSITION_CONTROL_P,POSITION_CONTROL_D,POSITION_CONTROL_I。 float SPEED_CONTROL_P,SPEED_CONTROL_I,SPEED_CONTROL_D。 float GRAVITY_ANGLE_RATIO = ,ANGLE_SPEED_RATIO = 100。 float K=650。 unsigned char g_ucBegin,g_ucRight,g_ucLeft。 unsigned char PositionControlCount。 int LeftMotorPulse。 //int g_iZOffset。 int g_lPosition = 0,g_lPositionBase = 0。 //long g_lPositionGoal。 22 //float PositionControlNew,PositionControlOld。 float PositionControlOut,PositionControlNew,PositionControlOld,SpeedControlOut。 //int PositionErr = 5500,PositionErrOld。 float LeftMotorSpeed,LeftMotorSpeedOld。 int RightMotorPulseSigma,LeftMotorPulseSigma,RightMotorSpeed,RightMotorSpeedGoal,RightMotorSpeedGoal1。 float RightMotorSpeedErr0,RightMotorSpeedErr1,RightMotorSpeedErr2。 int LeftMotorOutput。 //float fI1 = 0。 int GravityAngle。 float AngleSpeed。 /**************************主程序 *********************************/ void main(void) { //總線頻率設(shè)置為 80Mhz PLL_init()。 PIT_init()。 //定時(shí)器中斷初始化 PWM_init()。 TIM_init()。 GPIO_init()。 XINT_init()。 g_ucBegin = 0。 //初始化 Z 信號(hào)尚未到來 EnableInterrupts。 for(。) { //if(PORTB_PB1 == 1) // EnableInterrupts。 } } pragma CODE_SEG __NEAR_SEG NON_BANKED //中斷函數(shù)置于非分頁區(qū)內(nèi) void interrupt VectorNumber_Vpit0 PIT0Interrupt(void) { EnableInterrupts。 GetMotorPulse()。 //獲取編碼器脈沖 PositionControlCount ++。 23 if(PositionControlCount == POSITION_CONTROL_COUNT) { if(RightMotorSpeedGoal RightMotorSpeedGoal1) RightMotorSpeedGoal += 。 AngleCalculate()。 PositionControl()。 PositionControlCount = 0。 } //SpeedSetOut()。 PositionSetOut()。 //PositionControl()。 SpeedControl()。 if((PORTB_PB1 == 0) || (PORTB_PB3 == 0) || (PORTB_PB4 == 0)) MotorOutput()。 PITTF_PTF0=1。 EnableInterrupts。 } void interrupt VectorNumber_Vtimch0 TIM0Interrupt(void) { //EnableInterrupts。 LeftMotorPulse = 360。 if(PORTB_PB4 == 0) { if ((LeftMotorSpeed 2) amp。amp。(LeftMotorSpeed 2) ) { SPEED_CONTROL_P = 30。 SPEED_CONTROL_I = 。 g_ucBegin = 1。 RightMotorSpeedGoal1 = 20。 } g_ucRight= 0。 g_ucLeft = 0。 } TFLG1_C0F = 1。 } //pragma CODE_SEG DEFAULT //后續(xù)代碼置于默認(rèn)區(qū)域內(nèi) 24
點(diǎn)擊復(fù)制文檔內(nèi)容
研究報(bào)告相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1