第五届飞思卡尔智能车电磁组获奖程序

飞思卡尔比赛,电磁组程序,提供参考,多多努力

#include <hidef.h> /* common defines and macros */

#include "derivative.h" /* derivative-specific definitions */

#include <stdio.h>

#include <MC9S12XS128.h>

#include <stdlib.h>

#include <math.h>

#pragma LINK_INFO DERIVATIVE "mc9s12xs128"

#define K 1

#define N 3

unsigned int i=0,j=0,m=0,n=0;

unsigned char str[]={'0'};

signed int b=0,c=0,d=0,e=0,f=0,g=0,spe=0,r=0,l,x3,y,z,x1,x2,x4;

int time;

int zd=0,flag;

int pp;

/////////////////////////////////////

//// 电机 PID 定义

/////////////////////////////////////

int SetPoint=0; //设定目标 Desired Value

int FeedBack=0;

float KKp=1.5; //比例常数 Proportional Const

float KKi=0;

float KKd=0.6; //微分常数 Derivative Const

signed int EE0=0; //当前误差

signed int EE1=0; //Error[-1]

signed int EE2=0; //Error[-2]

signed int EError0=0,EError1=0;

你可能喜欢

  • 飞思卡尔电磁组程序
  • 电磁设计
  • 飞思卡尔智能车光电组
  • 硬件设计
  • 飞思卡尔智能车制作
  • 飞思卡尔技术报告

第五届飞思卡尔智能车电磁组获奖程序相关文档

最新文档

返回顶部