Austin Brown
/
CurrentModeSine
Slurp
Embed:
(wiki syntax)
Show/hide line numbers
structs.h
00001 #ifndef STRUCTS_H 00002 #define STRUCTS_H 00003 00004 //#include "CANnucleo.h" 00005 #include "mbed.h" 00006 #include "FastPWM.h" 00007 00008 00009 typedef struct{ 00010 DigitalOut *enable; 00011 FastPWM *pwm_ul, *pwm_vl, *pwm_wl, *pwm_uh, *pwm_vh, *pwm_wh; 00012 int phasing; 00013 } GPIOStruct; 00014 00015 typedef struct{ 00016 00017 }COMStruct; 00018 00019 typedef struct{ 00020 int adc1_raw, adc2_raw; 00021 float i_a, i_b, i_c; 00022 float v_bus; 00023 float theta_mech, theta_elec; 00024 float dtheta_mech, dtheta_elec; 00025 float i_d, i_q; 00026 float v_d, v_q; 00027 float dtc_u, dtc_v, dtc_w; 00028 float v_u, v_v, v_w; 00029 float d_int, q_int; 00030 int adc1_offset, adc2_offset; 00031 float i_d_ref, i_q_ref; 00032 int loop_count; 00033 int mode; 00034 float cogging[128]; 00035 } ControllerStruct; 00036 00037 typedef struct{ 00038 float vel_1; 00039 float vel_1_old; 00040 float vel_1_est; 00041 float vel_2; 00042 float vel_2_old; 00043 float vel_2_est; 00044 float ts; 00045 float est; 00046 } VelocityEstimatorStruct; 00047 00048 #endif
Generated on Tue Jul 12 2022 16:57:53 by 1.7.2