U,V | Phi, % |
---|---|
37.52 | 18% |
80.25 | 6% |
123.3 | 4% |
183.6 | 2% |
219.9 | 2% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openocd -f interface/stlink-v2-1.cfg -f target/stm32f3x.cfg -c init -c "program PWM.elf verify reset exit" | |
Стирать | |
openocd -f interface/stlink-v2-1.cfg -f target/stm32f3x.cfg -c "init" -c "halt" -c "wait_halt" -c "stm32f1x mass_erase 0" -c "sleep 200" -c "reset run" -c "shutdown" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <stdio.h> | |
#include <math.h> | |
int fSampleRate; | |
// Filter parameters, set by init function | |
float a; | |
float b; | |
float c; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <stdio.h> | |
#include <math.h> | |
int fSampleRate; | |
// Filter parameters, set by init function | |
float a; | |
float b; | |
float c; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Новый вариант truncated_mean | |
Полный код 4385 | |
Полный код -D FIXMATH_NO_OVERFLOW 4195 | |
Полный код -D FIXMATH_NO_64BIT 3235 | |
Полный код оба флага 3137 | |
Старый вариант truncated_mean |
Код, изменения на строках 6, 8
fix16_t divergence = knob_normalized - speed;
// БЫЛО ТАК
fix16_t proportional = fix16_mul(cfg_pid_p, divergence);
// СДЕЛАЛ ВОТ ТАК
fix16_t proportional = fix16_mul(cfg_pid_p, divergence) + knob_normalized;
if (pid_i_enabled)
AC 80 Volts RMS, C8=2.2 uF
R2 | 1kOhm | 500 Ohm |
---|---|---|
Umax, Volts | 108 | 112 |
Umin, Volts | 88 | 94 |
R, Ohm | C, uF | E, J |
---|---|---|
20 | 4.7 | 0.2270 |
20 | 2.2 | 0.1063 |
100 | 4.7 | 0.2160 |
100 | 2.2 | 0.1055 |
1.5mH, 4.7uF. RMS/Ripple
Rectifier | Stepdown out | LDO out | AVDD | |
---|---|---|---|---|
min speed | 3.522v/12v | 25.19mV/100mV | 3.57mV/40mV | 1.89mV/15mV |
max speed | 2.382v/9v | 24mV/100mV | 4.319mV/50mV | 1.89mV/15mV |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdio> | |
// Internal integration step in seconds | |
#define STEP 0.01 | |
// Calculate temperature after delta_t seconds of heating | |
// with power P in watts | |
double calculate_temp(double temp_start, double P, double delta_t) | |
{ | |
// Heat capacity, for aluminium = 920 J/K/Kg * (body mass, Kg) | |
double C = 920 * 0.02; |
NewerOlder