mirror of https://github.com/rusefi/bldc.git
Renamed foc_f_sw to foc_f_zv
This commit is contained in:
parent
aeda17e38e
commit
af55c79a2a
|
@ -537,7 +537,7 @@ Item {
|
|||
mMcConf.updateParamDouble("l_temp_motor_end", 135, null)
|
||||
mMcConf.updateParamDouble("l_temp_accel_dec", 0, null)
|
||||
|
||||
mMcConf.updateParamDouble("foc_f_sw", 30000, null)
|
||||
mMcConf.updateParamDouble("foc_f_zv", 30000, null)
|
||||
mMcConf.updateParamEnum("foc_sensor_mode", 2, null)
|
||||
mMcConf.updateParamDouble("foc_openloop_rpm", 350, null)
|
||||
mMcConf.updateParamDouble("foc_sl_erpm", 6000, null)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#include "er_qml.h"
|
||||
|
||||
uint8_t data_qml_app[4375] = {
|
||||
uint8_t data_qml_app[4376] = {
|
||||
0x00, 0x00, 0x6b, 0xac, 0x78, 0xda, 0xed, 0x5c, 0x6d, 0x53, 0xdb, 0x48, 0x12, 0xfe, 0xce, 0xaf,
|
||||
0x98, 0xf5, 0xd5, 0x55, 0xd9, 0x1b, 0x47, 0xd8, 0x06, 0x93, 0x1c, 0x7b, 0xa9, 0x2b, 0xde, 0x92,
|
||||
0xa5, 0x2e, 0x04, 0x16, 0xb3, 0x9b, 0x0f, 0x09, 0xa5, 0x12, 0xd2, 0xd8, 0x56, 0x21, 0xcd, 0xe8,
|
||||
|
@ -225,56 +225,56 @@ uint8_t data_qml_app[4375] = {
|
|||
0x7c, 0xb9, 0x25, 0xb1, 0x2c, 0x20, 0xe2, 0x70, 0x5e, 0x19, 0x7b, 0x1b, 0x01, 0x51, 0x86, 0xe5,
|
||||
0xca, 0xdd, 0xc1, 0x66, 0x4a, 0x81, 0x4c, 0x21, 0x48, 0x37, 0x78, 0x26, 0x59, 0x7f, 0x30, 0x6c,
|
||||
0x2c, 0x98, 0x02, 0x23, 0xe5, 0xea, 0xef, 0xac, 0x09, 0x62, 0x81, 0x7b, 0x03, 0x5b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e, 0x5e, 0x21, 0x74, 0x79, 0x91, 0x66,
|
||||
0x8f, 0xf9, 0xe7, 0x9b, 0x4d, 0x56, 0xa5, 0x18, 0x56, 0x2a, 0xd8, 0xea, 0xeb, 0x73, 0xac, 0x28,
|
||||
0xe3, 0xdb, 0x58, 0x92, 0xaa, 0x89, 0x16, 0x0f, 0x1c, 0xc5, 0x3c, 0x98, 0x6b, 0x1e, 0xe3, 0x01,
|
||||
0x74, 0xea, 0x9d, 0x0d, 0x57, 0x29, 0xea, 0xc5, 0x9c, 0xeb, 0x25, 0xd3, 0xd0, 0x2a, 0x3e, 0xf9,
|
||||
0xc8, 0xf2, 0xec, 0xc4, 0x03, 0x64, 0x92, 0x7d, 0x9d, 0x98, 0x2d, 0xbf, 0xab, 0xd4, 0xa3, 0xa1,
|
||||
0xb0, 0x01, 0xfc, 0x26, 0xa2, 0xe1, 0x1d, 0x7c, 0xc0, 0x96, 0x77, 0xd4, 0x28, 0xf8, 0x49, 0x39,
|
||||
0x65, 0x1f, 0xbe, 0x4b, 0xda, 0x7d, 0xa3, 0x47, 0x5f, 0xee, 0x40, 0x02, 0x3a, 0x5f, 0x43, 0x3f,
|
||||
0x66, 0xa2, 0x82, 0x3b, 0xc2, 0xed, 0xaa, 0x0d, 0x88, 0xc5, 0x1b, 0x84, 0xb6, 0xfc, 0x72, 0xc4,
|
||||
0xe2, 0x86, 0x16, 0xef, 0x86, 0xcf, 0xe4, 0x17, 0x17, 0x02, 0x70, 0x6c, 0x37, 0x11, 0x30, 0x8b,
|
||||
0x28, 0x6e, 0x03, 0x65, 0x8b, 0xde, 0xcc, 0xd6, 0xd8, 0xe9, 0x73, 0x24, 0x37, 0x33, 0x17, 0x95,
|
||||
0x48, 0xc5, 0x09, 0xb8, 0x82, 0x20, 0x84, 0x82, 0x5b, 0x84, 0xe5, 0x5d, 0xbf, 0xbd, 0x63, 0x39,
|
||||
0xd7, 0xca, 0xf6, 0x16, 0x55, 0x16, 0xd1, 0xee, 0x8b, 0x8a, 0xae, 0xc5, 0x58, 0xc4, 0xe3, 0xab,
|
||||
0x47, 0x8a, 0x82, 0xc7, 0xe6, 0x7e, 0xb0, 0x66, 0x7c, 0x38, 0xe7, 0x87, 0x34, 0x05, 0x02, 0x45,
|
||||
0xfc, 0x88, 0x5f, 0xc8, 0x23, 0xc5, 0x58, 0x45, 0x17, 0x3f, 0x43, 0x40, 0x45, 0x62, 0x4b, 0x2d,
|
||||
0x05, 0x6b, 0x55, 0x81, 0x81, 0x57, 0xd9, 0xcc, 0x21, 0xf7, 0x5b, 0x6e, 0x97, 0xcd, 0xdb, 0xb0,
|
||||
0x57, 0xb6, 0x62, 0x08, 0x81, 0xd3, 0xb4, 0xe4, 0xe5, 0xbb, 0x1a, 0x0b, 0x26, 0x84, 0x1d, 0x89,
|
||||
0x14, 0x21, 0x5a, 0xdd, 0x82, 0x09, 0xd1, 0xa3, 0x5a, 0xae, 0xaf, 0xbf, 0xbc, 0x24, 0xe2, 0x5f,
|
||||
0x9c, 0x71, 0x11, 0x01, 0x8b, 0x09, 0x33, 0xcd, 0x1e, 0xcc, 0xb5, 0xd0, 0x6a, 0xff, 0xba, 0x49,
|
||||
0x18, 0x5d, 0x84, 0xe9, 0x67, 0x30, 0x83, 0x8d, 0x60, 0x06, 0x19, 0xcc, 0xce, 0x46, 0x30, 0x3b,
|
||||
0x19, 0xcc, 0xee, 0x46, 0x30, 0xbb, 0x19, 0xcc, 0x70, 0x23, 0x98, 0x61, 0x06, 0xb3, 0xb7, 0x11,
|
||||
0xcc, 0x5e, 0x06, 0xf3, 0x6a, 0x23, 0x98, 0x57, 0x19, 0xcc, 0xeb, 0xeb, 0xe5, 0xb9, 0xd8, 0xf7,
|
||||
0xac, 0xe6, 0x6b, 0xd9, 0xcf, 0xcb, 0x1e, 0x58, 0x78, 0xd8, 0xca, 0x2f, 0xfe, 0xe6, 0x3b, 0x57,
|
||||
0xba, 0xf7, 0x7e, 0xf1, 0x6b, 0xc3, 0x7e, 0xd0, 0x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 0x24,
|
||||
0xf2, 0x64, 0x09, 0xb7, 0x4b, 0xf6, 0x56, 0x1f, 0xc5, 0x21, 0xe7, 0x5e, 0xca, 0x6e, 0xe1, 0x97,
|
||||
0x49, 0x99, 0x53, 0x08, 0xeb, 0xe6, 0xc5, 0x75, 0x51, 0x33, 0x6d, 0x2c, 0x48, 0x30, 0xb5, 0x22,
|
||||
0x6a, 0x42, 0xc4, 0x16, 0xe3, 0xdb, 0x51, 0xb0, 0x1f, 0x52, 0xb1, 0xfa, 0x7b, 0xbd, 0xe5, 0x13,
|
||||
0xb5, 0xbd, 0x4d, 0xde, 0xba, 0x14, 0x3c, 0xee, 0x47, 0x0a, 0x41, 0x12, 0x7e, 0x01, 0x4e, 0xa3,
|
||||
0x79, 0x9c, 0x15, 0x8d, 0x41, 0x6f, 0x7d, 0xf7, 0xe1, 0xa7, 0x0b, 0x55, 0x2c, 0x37, 0x9c, 0xe4,
|
||||
0xcc, 0x8b, 0xec, 0x36, 0xf1, 0x22, 0xbe, 0x39, 0xb5, 0x3c, 0x98, 0x9a, 0xfb, 0x38, 0xb4, 0x52,
|
||||
0x25, 0x47, 0x55, 0x18, 0xf5, 0x3f, 0x15, 0x41, 0x54, 0x34, 0x0f, 0xa2, 0x34, 0x91, 0x46, 0x65,
|
||||
0x24, 0x95, 0xb1, 0x63, 0x2c, 0x65, 0xd9, 0xb7, 0xd9, 0x17, 0xf9, 0xb4, 0x7f, 0x19, 0xc5, 0x21,
|
||||
0x28, 0x7d, 0xcd, 0xb0, 0xea, 0x23, 0x56, 0xb0, 0x9a, 0xc6, 0x55, 0xa2, 0xec, 0xf5, 0x0d, 0x07,
|
||||
0x56, 0xb0, 0x64, 0x2f, 0x69, 0xe4, 0x62, 0x3e, 0x69, 0x53, 0xc8, 0x74, 0xf0, 0xd8, 0xb9, 0x93,
|
||||
0xd8, 0xe2, 0x63, 0x35, 0x97, 0xe8, 0x8c, 0x79, 0xca, 0x2b, 0x10, 0x3e, 0xb5, 0x30, 0xee, 0xbf,
|
||||
0x7c, 0x7f, 0xe8, 0xe1, 0x79, 0x5b, 0x36, 0xd1, 0xbe, 0x04, 0x81, 0x13, 0x1a, 0x7a, 0xea, 0x8b,
|
||||
0x17, 0xe4, 0xcf, 0x3f, 0x01, 0xe8, 0x53, 0xef, 0x9a, 0xfc, 0x93, 0xf4, 0x29, 0x38, 0xd1, 0x66,
|
||||
0x53, 0x76, 0x26, 0x1f, 0x4b, 0x2e, 0xdf, 0x2f, 0x9f, 0xa9, 0x54, 0x44, 0x3c, 0x90, 0xa4, 0x1f,
|
||||
0xee, 0xb7, 0x31, 0x61, 0xa0, 0xad, 0x3e, 0x56, 0x66, 0xe5, 0xff, 0x3f, 0xa2, 0xd6, 0xf6, 0xd6,
|
||||
0x76, 0x1d, 0xd2, 0x46, 0x60, 0xb0, 0x2a, 0x26, 0x61, 0x0d, 0x7b, 0x29, 0x11, 0x3c, 0x89, 0x20,
|
||||
0x04, 0xea, 0x19, 0xff, 0x58, 0x66, 0x1e, 0x4a, 0x46, 0xd3, 0x4b, 0xee, 0x89, 0xe7, 0xb2, 0x5b,
|
||||
0x98, 0xda, 0xfa, 0x45, 0x97, 0x12, 0x95, 0x57, 0xde, 0x7b, 0x79, 0xe3, 0x3c, 0x75, 0x46, 0x85,
|
||||
0x65, 0x98, 0x36, 0xcf, 0x64, 0x0b, 0xb1, 0x67, 0xec, 0xcc, 0xc7, 0x2b, 0x84, 0x2e, 0x2f, 0xd2,
|
||||
0xec, 0x31, 0xff, 0x7c, 0xb3, 0xc9, 0xaa, 0x14, 0xc3, 0x4a, 0x05, 0x5b, 0x7d, 0x7d, 0x8e, 0x15,
|
||||
0x65, 0x7c, 0x1b, 0x4b, 0x52, 0x35, 0xd1, 0xe2, 0x81, 0xa3, 0x98, 0x07, 0x73, 0xcd, 0x63, 0x3c,
|
||||
0x80, 0x4e, 0xbd, 0xb3, 0xe1, 0x2a, 0x45, 0xbd, 0x98, 0x73, 0xbd, 0x64, 0x1a, 0x5a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0xd4, 0x74, 0xdc, 0x50, 0x7e, 0x3f, 0x77,
|
||||
0x55, 0x8c, 0xfd, 0xbd, 0x02, 0xf5, 0x84, 0x15, 0xa8, 0xff, 0xa3, 0xea, 0xd2, 0x57, 0x58, 0x57,
|
||||
0x1a, 0x28, 0x65, 0xa5, 0xc1, 0x5f, 0xba, 0xac, 0xf4, 0xa5, 0xfa, 0xf9, 0x1b, 0x57, 0x7c, 0x96,
|
||||
0x97, 0xa3, 0x86, 0xf5, 0xe5, 0xa8, 0x6f, 0xac, 0x64, 0xb4, 0xf7, 0xbd, 0x64, 0xf4, 0x17, 0x2e,
|
||||
0x19, 0x7d, 0xcf, 0x2a, 0xbf, 0x88, 0x41, 0xda, 0x24, 0x23, 0x54, 0xd2, 0x98, 0x27, 0x4b, 0x09,
|
||||
0x1f, 0xb7, 0xfe, 0x0b, 0xff, 0x5c, 0x4a, 0x51,
|
||||
};
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <stdbool.h>
|
||||
|
||||
// Constants
|
||||
#define DATA_QML_APP_SIZE 4375
|
||||
#define DATA_QML_APP_SIZE 4376
|
||||
|
||||
// Variables
|
||||
extern uint8_t data_qml_app[];
|
||||
|
|
16
commands.c
16
commands.c
|
@ -1698,15 +1698,15 @@ void commands_apply_mcconf_hw_limits(mc_configuration *mcconf) {
|
|||
#ifdef HW_LIM_FOC_CTRL_LOOP_FREQ
|
||||
if (mcconf->foc_sample_v0_v7 == true) {
|
||||
//control loop executes twice per pwm cycle when sampling in v0 and v7
|
||||
utils_truncate_number(&mcconf->foc_f_sw, HW_LIM_FOC_CTRL_LOOP_FREQ);
|
||||
ctrl_loop_freq = mcconf->foc_f_sw;
|
||||
utils_truncate_number(&mcconf->foc_f_zv, HW_LIM_FOC_CTRL_LOOP_FREQ);
|
||||
ctrl_loop_freq = mcconf->foc_f_zv;
|
||||
} else {
|
||||
#ifdef HW_HAS_DUAL_MOTORS
|
||||
utils_truncate_number(&mcconf->foc_f_sw, HW_LIM_FOC_CTRL_LOOP_FREQ);
|
||||
ctrl_loop_freq = mcconf->foc_f_sw;
|
||||
utils_truncate_number(&mcconf->foc_f_zv, HW_LIM_FOC_CTRL_LOOP_FREQ);
|
||||
ctrl_loop_freq = mcconf->foc_f_zv;
|
||||
#else
|
||||
utils_truncate_number(&mcconf->foc_f_sw, HW_LIM_FOC_CTRL_LOOP_FREQ * 2.0);
|
||||
ctrl_loop_freq = mcconf->foc_f_sw / 2.0;
|
||||
utils_truncate_number(&mcconf->foc_f_zv, HW_LIM_FOC_CTRL_LOOP_FREQ * 2.0);
|
||||
ctrl_loop_freq = mcconf->foc_f_zv / 2.0;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
@ -1976,7 +1976,7 @@ static THD_FUNCTION(blocking_thread, arg) {
|
|||
float current = buffer_get_float32(data, 1e3, &ind);
|
||||
|
||||
mcconf->motor_type = MOTOR_TYPE_FOC;
|
||||
mcconf->foc_f_sw = 10000.0;
|
||||
mcconf->foc_f_zv = 10000.0;
|
||||
mcconf->foc_current_kp = 0.01;
|
||||
mcconf->foc_current_ki = 10.0;
|
||||
mc_interface_set_configuration(mcconf);
|
||||
|
@ -2024,7 +2024,7 @@ static THD_FUNCTION(blocking_thread, arg) {
|
|||
float current = buffer_get_float32(data, 1e3, &ind);
|
||||
|
||||
mcconf->motor_type = MOTOR_TYPE_FOC;
|
||||
mcconf->foc_f_sw = 10000.0;
|
||||
mcconf->foc_f_zv = 10000.0;
|
||||
mcconf->foc_current_kp = 0.01;
|
||||
mcconf->foc_current_ki = 10.0;
|
||||
mc_interface_set_configuration(mcconf);
|
||||
|
|
|
@ -1516,7 +1516,7 @@ int conf_general_detect_apply_all_foc(float max_power_loss,
|
|||
|
||||
mcconf->motor_type = MOTOR_TYPE_FOC;
|
||||
mcconf->foc_sensor_mode = FOC_SENSOR_MODE_SENSORLESS;
|
||||
mcconf->foc_f_sw = 10000.0; // Lower f_sw => less dead-time distortion
|
||||
mcconf->foc_f_zv = 10000.0; // Lower f_zv => less dead-time distortion
|
||||
mcconf->foc_current_kp = 0.0005;
|
||||
mcconf->foc_current_ki = 1.0;
|
||||
mcconf->l_current_max = MCCONF_L_CURRENT_MAX;
|
||||
|
@ -1532,7 +1532,7 @@ int conf_general_detect_apply_all_foc(float max_power_loss,
|
|||
#ifdef HW_HAS_DUAL_MOTORS
|
||||
mcconf_second->motor_type = MOTOR_TYPE_FOC;
|
||||
mcconf_second->foc_sensor_mode = FOC_SENSOR_MODE_SENSORLESS;
|
||||
mcconf_second->foc_f_sw = 10000.0; // Lower f_sw => less dead-time distortion
|
||||
mcconf_second->foc_f_zv = 10000.0; // Lower f_zv => less dead-time distortion
|
||||
mcconf_second->foc_current_kp = 0.0005;
|
||||
mcconf_second->foc_current_ki = 1.0;
|
||||
mcconf_second->l_current_max = MCCONF_L_CURRENT_MAX;
|
||||
|
@ -1629,12 +1629,12 @@ int conf_general_detect_apply_all_foc(float max_power_loss,
|
|||
// Increase switching frequency for flux linkage measurement
|
||||
// as dead-time distortion has less effect at higher modulation.
|
||||
// Having a smooth rotation is more important.
|
||||
mcconf->foc_f_sw = 20000.0;
|
||||
mcconf->foc_f_zv = 20000.0;
|
||||
mc_interface_set_configuration(mcconf);
|
||||
|
||||
#ifdef HW_HAS_DUAL_MOTORS
|
||||
mc_interface_select_motor_thread(2);
|
||||
mcconf_second->foc_f_sw = 20000.0;
|
||||
mcconf_second->foc_f_zv = 20000.0;
|
||||
mc_interface_set_configuration(mcconf_second);
|
||||
mc_interface_select_motor_thread(1);
|
||||
#endif
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#define FW_VERSION_MAJOR 5
|
||||
#define FW_VERSION_MINOR 03
|
||||
// Set to 0 for building a release and iterate during beta test builds
|
||||
#define FW_TEST_VERSION_NUMBER 76
|
||||
#define FW_TEST_VERSION_NUMBER 77
|
||||
|
||||
#include "datatypes.h"
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ int32_t confgenerator_serialize_mcconf(uint8_t *buffer, const mc_configuration *
|
|||
buffer_append_float32_auto(buffer, conf->hall_sl_erpm, &ind);
|
||||
buffer_append_float32_auto(buffer, conf->foc_current_kp, &ind);
|
||||
buffer_append_float32_auto(buffer, conf->foc_current_ki, &ind);
|
||||
buffer_append_float32_auto(buffer, conf->foc_f_sw, &ind);
|
||||
buffer_append_float32_auto(buffer, conf->foc_f_zv, &ind);
|
||||
buffer_append_float32_auto(buffer, conf->foc_dt_us, &ind);
|
||||
buffer[ind++] = conf->foc_encoder_inverted;
|
||||
buffer_append_float32_auto(buffer, conf->foc_encoder_offset, &ind);
|
||||
|
@ -426,7 +426,7 @@ bool confgenerator_deserialize_mcconf(const uint8_t *buffer, mc_configuration *c
|
|||
conf->hall_sl_erpm = buffer_get_float32_auto(buffer, &ind);
|
||||
conf->foc_current_kp = buffer_get_float32_auto(buffer, &ind);
|
||||
conf->foc_current_ki = buffer_get_float32_auto(buffer, &ind);
|
||||
conf->foc_f_sw = buffer_get_float32_auto(buffer, &ind);
|
||||
conf->foc_f_zv = buffer_get_float32_auto(buffer, &ind);
|
||||
conf->foc_dt_us = buffer_get_float32_auto(buffer, &ind);
|
||||
conf->foc_encoder_inverted = buffer[ind++];
|
||||
conf->foc_encoder_offset = buffer_get_float32_auto(buffer, &ind);
|
||||
|
@ -790,7 +790,7 @@ void confgenerator_set_defaults_mcconf(mc_configuration *conf) {
|
|||
conf->hall_sl_erpm = MCCONF_HALL_ERPM;
|
||||
conf->foc_current_kp = MCCONF_FOC_CURRENT_KP;
|
||||
conf->foc_current_ki = MCCONF_FOC_CURRENT_KI;
|
||||
conf->foc_f_sw = MCCONF_FOC_F_SW;
|
||||
conf->foc_f_zv = MCCONF_FOC_F_ZV;
|
||||
conf->foc_dt_us = MCCONF_FOC_DT_US;
|
||||
conf->foc_encoder_inverted = MCCONF_FOC_ENCODER_INVERTED;
|
||||
conf->foc_encoder_offset = MCCONF_FOC_ENCODER_OFFSET;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <stdbool.h>
|
||||
|
||||
// Constants
|
||||
#define MCCONF_SIGNATURE 2090246193
|
||||
#define MCCONF_SIGNATURE 919732468
|
||||
#define APPCONF_SIGNATURE 3733512279
|
||||
|
||||
// Functions
|
||||
|
|
|
@ -368,7 +368,7 @@ typedef struct {
|
|||
// FOC
|
||||
float foc_current_kp;
|
||||
float foc_current_ki;
|
||||
float foc_f_sw;
|
||||
float foc_f_zv;
|
||||
float foc_dt_us;
|
||||
float foc_encoder_offset;
|
||||
bool foc_encoder_inverted;
|
||||
|
|
|
@ -455,9 +455,9 @@ void mc_interface_set_configuration(mc_configuration *configuration) {
|
|||
case MOTOR_TYPE_FOC:
|
||||
#ifdef HW_HAS_DUAL_MOTORS
|
||||
if (motor == &m_motor_1) {
|
||||
m_motor_2.m_conf.foc_f_sw = motor->m_conf.foc_f_sw;
|
||||
m_motor_2.m_conf.foc_f_zv = motor->m_conf.foc_f_zv;
|
||||
} else {
|
||||
m_motor_1.m_conf.foc_f_sw = motor->m_conf.foc_f_sw;
|
||||
m_motor_1.m_conf.foc_f_zv = motor->m_conf.foc_f_zv;
|
||||
}
|
||||
#endif
|
||||
mcpwm_foc_set_configuration(&motor->m_conf);
|
||||
|
|
|
@ -244,8 +244,8 @@
|
|||
#ifndef MCCONF_FOC_CURRENT_KI
|
||||
#define MCCONF_FOC_CURRENT_KI 50.0
|
||||
#endif
|
||||
#ifndef MCCONF_FOC_F_SW
|
||||
#define MCCONF_FOC_F_SW 25000.0
|
||||
#ifndef MCCONF_FOC_F_ZV
|
||||
#define MCCONF_FOC_F_ZV 25000.0
|
||||
#endif
|
||||
#ifndef MCCONF_FOC_DT_US
|
||||
#define MCCONF_FOC_DT_US 0.12 // Microseconds for dead time compensation
|
||||
|
|
52
mcpwm_foc.c
52
mcpwm_foc.c
|
@ -327,7 +327,7 @@ static void update_hfi_samples(foc_hfi_samples samples, volatile motor_all_state
|
|||
utils_sys_unlock_cnt();
|
||||
}
|
||||
|
||||
static void timer_reinit(int f_sw) {
|
||||
static void timer_reinit(int f_zv) {
|
||||
utils_sys_lock_cnt();
|
||||
|
||||
TIM_DeInit(TIM1);
|
||||
|
@ -348,7 +348,7 @@ static void timer_reinit(int f_sw) {
|
|||
// Time Base configuration
|
||||
TIM_TimeBaseStructure.TIM_Prescaler = 0;
|
||||
TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_CenterAligned1;
|
||||
TIM_TimeBaseStructure.TIM_Period = (SYSTEM_CORE_CLOCK / f_sw);
|
||||
TIM_TimeBaseStructure.TIM_Period = (SYSTEM_CORE_CLOCK / f_zv);
|
||||
TIM_TimeBaseStructure.TIM_ClockDivision = 0;
|
||||
TIM_TimeBaseStructure.TIM_RepetitionCounter = 0;
|
||||
|
||||
|
@ -595,7 +595,7 @@ void mcpwm_foc_init(volatile mc_configuration *conf_m1, volatile mc_configuratio
|
|||
ADC_Cmd(ADC2, ENABLE);
|
||||
ADC_Cmd(ADC3, ENABLE);
|
||||
|
||||
timer_reinit((int)m_motor_1.m_conf->foc_f_sw);
|
||||
timer_reinit((int)m_motor_1.m_conf->foc_f_zv);
|
||||
|
||||
stop_pwm_hw(&m_motor_1);
|
||||
#ifdef HW_HAS_DUAL_MOTORS
|
||||
|
@ -746,7 +746,7 @@ void mcpwm_foc_set_configuration(volatile mc_configuration *configuration) {
|
|||
|
||||
// Below we check if anything in the configuration changed that requires stopping the motor.
|
||||
|
||||
uint32_t top = SYSTEM_CORE_CLOCK / (int)configuration->foc_f_sw;
|
||||
uint32_t top = SYSTEM_CORE_CLOCK / (int)configuration->foc_f_zv;
|
||||
if (TIM1->ARR != top) {
|
||||
#ifdef HW_HAS_DUAL_MOTORS
|
||||
m_motor_1.m_control_mode = CONTROL_MODE_NONE;
|
||||
|
@ -757,7 +757,7 @@ void mcpwm_foc_set_configuration(volatile mc_configuration *configuration) {
|
|||
m_motor_2.m_state = MC_STATE_OFF;
|
||||
stop_pwm_hw(&m_motor_2);
|
||||
|
||||
timer_reinit((int)configuration->foc_f_sw);
|
||||
timer_reinit((int)configuration->foc_f_zv);
|
||||
#else
|
||||
motor_now()->m_control_mode = CONTROL_MODE_NONE;
|
||||
motor_now()->m_state = MC_STATE_OFF;
|
||||
|
@ -1113,7 +1113,7 @@ float mcpwm_foc_get_pid_pos_now(void) {
|
|||
* The switching frequency in Hz.
|
||||
*/
|
||||
float mcpwm_foc_get_switching_frequency_now(void) {
|
||||
return motor_now()->m_conf->foc_f_sw;
|
||||
return motor_now()->m_conf->foc_f_zv;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1125,12 +1125,12 @@ float mcpwm_foc_get_switching_frequency_now(void) {
|
|||
float mcpwm_foc_get_sampling_frequency_now(void) {
|
||||
#ifdef HW_HAS_PHASE_SHUNTS
|
||||
if (motor_now()->m_conf->foc_sample_v0_v7) {
|
||||
return motor_now()->m_conf->foc_f_sw;
|
||||
return motor_now()->m_conf->foc_f_zv;
|
||||
} else {
|
||||
return motor_now()->m_conf->foc_f_sw / 2.0;
|
||||
return motor_now()->m_conf->foc_f_zv / 2.0;
|
||||
}
|
||||
#else
|
||||
return motor_now()->m_conf->foc_f_sw / 2.0;
|
||||
return motor_now()->m_conf->foc_f_zv / 2.0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -1140,12 +1140,12 @@ float mcpwm_foc_get_sampling_frequency_now(void) {
|
|||
float mcpwm_foc_get_ts(void) {
|
||||
#ifdef HW_HAS_PHASE_SHUNTS
|
||||
if (motor_now()->m_conf->foc_sample_v0_v7) {
|
||||
return (1.0 / motor_now()->m_conf->foc_f_sw) ;
|
||||
return (1.0 / motor_now()->m_conf->foc_f_zv) ;
|
||||
} else {
|
||||
return (1.0 / (motor_now()->m_conf->foc_f_sw / 2.0));
|
||||
return (1.0 / (motor_now()->m_conf->foc_f_zv / 2.0));
|
||||
}
|
||||
#else
|
||||
return (1.0 / motor_now()->m_conf->foc_f_sw) ;
|
||||
return (1.0 / motor_now()->m_conf->foc_f_zv) ;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -1818,7 +1818,7 @@ float mcpwm_foc_measure_inductance(float duty, int samples, float *curr, float *
|
|||
volatile motor_all_state_t *motor = motor_now();
|
||||
|
||||
mc_foc_sensor_mode sensor_mode_old = motor->m_conf->foc_sensor_mode;
|
||||
float f_sw_old = motor->m_conf->foc_f_sw;
|
||||
float f_zv_old = motor->m_conf->foc_f_zv;
|
||||
float hfi_voltage_start_old = motor->m_conf->foc_hfi_voltage_start;
|
||||
float hfi_voltage_run_old = motor->m_conf->foc_hfi_voltage_run;
|
||||
float hfi_voltage_max_old = motor->m_conf->foc_hfi_voltage_max;
|
||||
|
@ -1841,8 +1841,8 @@ float mcpwm_foc_measure_inductance(float duty, int samples, float *curr, float *
|
|||
motor->m_conf->foc_hfi_samples = HFI_SAMPLES_32;
|
||||
motor->m_conf->foc_sample_high_current = false;
|
||||
|
||||
if (motor->m_conf->foc_f_sw > 30.0e3) {
|
||||
motor->m_conf->foc_f_sw = 30.0e3;
|
||||
if (motor->m_conf->foc_f_zv > 30.0e3) {
|
||||
motor->m_conf->foc_f_zv = 30.0e3;
|
||||
}
|
||||
|
||||
mcpwm_foc_set_configuration(motor->m_conf);
|
||||
|
@ -1880,7 +1880,7 @@ float mcpwm_foc_measure_inductance(float duty, int samples, float *curr, float *
|
|||
stop_pwm_hw(motor);
|
||||
|
||||
motor->m_conf->foc_sensor_mode = sensor_mode_old;
|
||||
motor->m_conf->foc_f_sw = f_sw_old;
|
||||
motor->m_conf->foc_f_zv = f_zv_old;
|
||||
motor->m_conf->foc_hfi_voltage_start = hfi_voltage_start_old;
|
||||
motor->m_conf->foc_hfi_voltage_run = hfi_voltage_run_old;
|
||||
motor->m_conf->foc_hfi_voltage_max = hfi_voltage_max_old;
|
||||
|
@ -1920,7 +1920,7 @@ float mcpwm_foc_measure_inductance(float duty, int samples, float *curr, float *
|
|||
mcpwm_foc_set_current(0.0);
|
||||
|
||||
motor->m_conf->foc_sensor_mode = sensor_mode_old;
|
||||
motor->m_conf->foc_f_sw = f_sw_old;
|
||||
motor->m_conf->foc_f_zv = f_zv_old;
|
||||
motor->m_conf->foc_hfi_voltage_start = hfi_voltage_start_old;
|
||||
motor->m_conf->foc_hfi_voltage_run = hfi_voltage_run_old;
|
||||
motor->m_conf->foc_hfi_voltage_max = hfi_voltage_max_old;
|
||||
|
@ -2002,7 +2002,7 @@ float mcpwm_foc_measure_inductance_current(float curr_goal, int samples, float *
|
|||
bool mcpwm_foc_measure_res_ind(float *res, float *ind, float *ld_lq_diff) {
|
||||
volatile motor_all_state_t *motor = motor_now();
|
||||
|
||||
const float f_sw_old = motor->m_conf->foc_f_sw;
|
||||
const float f_zv_old = motor->m_conf->foc_f_zv;
|
||||
const float kp_old = motor->m_conf->foc_current_kp;
|
||||
const float ki_old = motor->m_conf->foc_current_ki;
|
||||
const float res_old = motor->m_conf->foc_motor_r;
|
||||
|
@ -2030,7 +2030,7 @@ bool mcpwm_foc_measure_res_ind(float *res, float *ind, float *ld_lq_diff) {
|
|||
motor->m_conf->foc_motor_r = *res;
|
||||
*ind = mcpwm_foc_measure_inductance_current(i_last, 200, 0, ld_lq_diff);
|
||||
|
||||
motor->m_conf->foc_f_sw = f_sw_old;
|
||||
motor->m_conf->foc_f_zv = f_zv_old;
|
||||
motor->m_conf->foc_current_kp = kp_old;
|
||||
motor->m_conf->foc_current_ki = ki_old;
|
||||
motor->m_conf->foc_motor_r = res_old;
|
||||
|
@ -2609,12 +2609,12 @@ void mcpwm_foc_adc_int_handler(void *p, uint32_t flags) {
|
|||
#ifdef HW_HAS_PHASE_SHUNTS
|
||||
float dt;
|
||||
if (conf_now->foc_sample_v0_v7) {
|
||||
dt = 1.0 / conf_now->foc_f_sw;
|
||||
dt = 1.0 / conf_now->foc_f_zv;
|
||||
} else {
|
||||
dt = 1.0 / (conf_now->foc_f_sw / 2.0);
|
||||
dt = 1.0 / (conf_now->foc_f_zv / 2.0);
|
||||
}
|
||||
#else
|
||||
float dt = 1.0 / (conf_now->foc_f_sw / 2.0);
|
||||
float dt = 1.0 / (conf_now->foc_f_zv / 2.0);
|
||||
#endif
|
||||
|
||||
// This has to be done for the skip function to have any chance at working with the
|
||||
|
@ -3488,9 +3488,9 @@ static void hfi_update(volatile motor_all_state_t *motor) {
|
|||
// we should lag 1/2 HFI buffer behind in phase. Compensate for that here.
|
||||
float dt_sw;
|
||||
if (motor->m_conf->foc_sample_v0_v7) {
|
||||
dt_sw = 1.0 / motor->m_conf->foc_f_sw;
|
||||
dt_sw = 1.0 / motor->m_conf->foc_f_zv;
|
||||
} else {
|
||||
dt_sw = 1.0 / (motor->m_conf->foc_f_sw / 2.0);
|
||||
dt_sw = 1.0 / (motor->m_conf->foc_f_zv / 2.0);
|
||||
}
|
||||
angle_bin_2 += motor->m_motor_state.speed_rad_s * ((float)motor->m_hfi.samples / 2.0) * dt_sw;
|
||||
|
||||
|
@ -3946,7 +3946,7 @@ static void control_current(volatile motor_all_state_t *motor, float dt) {
|
|||
motor->m_hfi.buffer_current[motor->m_hfi.ind] = di;
|
||||
|
||||
if (di > 0.01) {
|
||||
motor->m_hfi.buffer[motor->m_hfi.ind] = hfi_voltage / (conf_now->foc_f_sw * di);
|
||||
motor->m_hfi.buffer[motor->m_hfi.ind] = hfi_voltage / (conf_now->foc_f_zv * di);
|
||||
}
|
||||
|
||||
motor->m_hfi.ind++;
|
||||
|
@ -4075,7 +4075,7 @@ static void update_valpha_vbeta(volatile motor_all_state_t *motor, float mod_alp
|
|||
const float mod_alpha_filter_sgn = (1.0 / 3.0) * (2.0 * SIGN(ia_filter) - SIGN(ib_filter) - SIGN(ic_filter));
|
||||
const float mod_beta_filter_sgn = ONE_BY_SQRT3 * (SIGN(ib_filter) - SIGN(ic_filter));
|
||||
|
||||
const float mod_comp_fact = conf_now->foc_dt_us * 1e-6 * conf_now->foc_f_sw;
|
||||
const float mod_comp_fact = conf_now->foc_dt_us * 1e-6 * conf_now->foc_f_zv;
|
||||
const float mod_alpha_comp = mod_alpha_filter_sgn * mod_comp_fact;
|
||||
const float mod_beta_comp = mod_beta_filter_sgn * mod_comp_fact;
|
||||
|
||||
|
|
|
@ -127,12 +127,12 @@ void virtual_motor_set_configuration(volatile mc_configuration *conf){
|
|||
virtual_motor.km = 1.5 * virtual_motor.pole_pairs;
|
||||
#ifdef HW_HAS_PHASE_SHUNTS
|
||||
if (m_conf->foc_sample_v0_v7) {
|
||||
virtual_motor.Ts = (1.0 / m_conf->foc_f_sw) ;
|
||||
virtual_motor.Ts = (1.0 / m_conf->foc_f_zv) ;
|
||||
} else {
|
||||
virtual_motor.Ts = (1.0 / (m_conf->foc_f_sw / 2.0));
|
||||
virtual_motor.Ts = (1.0 / (m_conf->foc_f_zv / 2.0));
|
||||
}
|
||||
#else
|
||||
virtual_motor.Ts = (1.0 / m_conf->foc_f_sw) ;
|
||||
virtual_motor.Ts = (1.0 / m_conf->foc_f_zv) ;
|
||||
#endif
|
||||
|
||||
if(m_conf->foc_motor_ld_lq_diff > 0.0){
|
||||
|
|
Loading…
Reference in New Issue