Prius IPM controller

Dependencies:   mbed

Fork of analoghalls5_5 by N K

Committer:
bwang
Date:
Mon Mar 16 15:40:07 2015 +0000
Revision:
35:83cf9564bd0c
Parent:
33:e7b132029bae
Set for 3A Iq, 0A Id, Ki = 1e-3, Kp = Kd = 0, loop still oscillates but is passable

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bwang0:54cf32d35f4d 1#ifndef __INCLUDES_H
bwang0:54cf32d35f4d 2#define __INCLUDES_H
bwang0:54cf32d35f4d 3
bwang0:54cf32d35f4d 4#include "mbed.h"
nki5:ee1e6c84c302 5#include "math.h"
nki9:d3b70c15baa9 6#include "fastmath.h"
bwang11:dccbaa9274c5 7#include "transforms.h"
nki10:b4abecccec7a 8
nki9:d3b70c15baa9 9using namespace FastMath;
bwang11:dccbaa9274c5 10using namespace Transforms;
bwang11:dccbaa9274c5 11
bwang24:f1ff9c7256b5 12extern float debug_registers[32];
bwang16:fd6771a6685a 13
nki21:da41c08e51bc 14#define dbg_angle debug_registers[0]
nki21:da41c08e51bc 15#define dbg_dtcA debug_registers[1]
nki21:da41c08e51bc 16#define dbg_dtcB debug_registers[2]
nki21:da41c08e51bc 17#define dbg_dtcC debug_registers[3]
nki22:46d164aa4f1c 18#define dbg_t1 debug_registers[4]
nki22:46d164aa4f1c 19#define dbg_t2 debug_registers[5]
bwang24:f1ff9c7256b5 20#define dbg_loop_q debug_registers[6]
bwang24:f1ff9c7256b5 21#define dbg_loop_d debug_registers[7]
bwang24:f1ff9c7256b5 22#define dbg_ib debug_registers[8]
bwang24:f1ff9c7256b5 23#define dbg_ic debug_registers[9]
bwang24:f1ff9c7256b5 24#define dbg_d_filtered debug_registers[10]
bwang24:f1ff9c7256b5 25#define dbg_q_filtered debug_registers[11]
bwang24:f1ff9c7256b5 26#define dbg_ref_d debug_registers[12]
bwang24:f1ff9c7256b5 27#define dbg_ref_q debug_registers[13]
nki34:bfe180de813a 28#define dbg_valpha debug_registers[14]
nki34:bfe180de813a 29#define dbg_vbeta debug_registers[15]
bwang16:fd6771a6685a 30
bwang0:54cf32d35f4d 31#endif