raiden00pl
fa19b71ba4
examples/foc: get iphase scale from the FOC device interface
2023-11-15 03:48:53 -08:00
raiden00pl
1095aec162
examples/foc: start from the beginning if control loop is started
...
After the start request to FOC device, we should return to the
beginning of the loop and wait for the first synchronization event.
This also fixes the problem with the extended first loop cycle,
so we can remove the workaround in foc_perf.
2023-11-13 08:48:22 -08:00
raiden00pl
9ba7092000
examples/foc: add support for control loop performance measurements
...
also format CMakeLists.txt
2023-11-06 09:02:28 +08:00
raiden00pl
73ab7dedd4
examples/foc: refactor control loop
...
1. get FOC device state at the beginning of the loop
2. simplify if-else block
2023-11-05 13:56:52 +08:00
raiden00pl
1c922f2d2d
examples/foc: add phase angle observer support (sensorless mode)
...
This app can work now as sensorless ESC.
Also introduce a cmd line option that force open-loop control
which is useful when tuning angle/velocity observers
2023-10-19 19:33:43 +08:00
raiden00pl
8398297518
examples/foc: add an option to call nxscope work from control thread
...
This alows nxscope data to be sent with every cycle of the control loop,
which increases the execution time of the control loop, but allows data
to be sent at a highier frequency using the small nxscope buffer.
Useful when tuning and debuging using RTT transfer.
2023-10-19 01:24:07 +08:00
raiden00pl
de6a384668
examples/foc: add velocity PI controller
2023-10-18 14:15:12 +08:00
raiden00pl
8e0819df04
examples/foc: add velocity observers
2023-10-17 22:42:42 +08:00
raiden00pl
b88057fffd
examples/foc: support svm3 state with nxscope
2023-10-05 20:42:46 +08:00
raiden00pl
a56f0922c5
industrial/foc: add an interface that returns the modulation state
...
Useful for debugging and demonstrating FOC operation
2023-10-05 20:42:46 +08:00
raiden00pl
7e5a436ff9
examples/foc: add real time data capture with the NxScope library
2023-05-19 20:18:38 +08:00
Gustavo Henrique Nihei
efb4e0bc91
Add another batch of missing headers throughout the repository
...
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-03-28 14:54:16 -03:00
Xiang Xiao
a29d9ea9da
fsutils/examples: Include unistd.h explicitly
...
to get the prototypes or macros are defined in it
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-05 08:46:59 +02:00
Xiang Xiao
81de5d4c59
Fix foc_fixed16_thr.c:188:27: error: variable 'time' set but not used
...
and foc_float_thr.c:189:27: error: variable 'time' set but not used
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-19 18:47:41 +01:00
raiden00pl
429f5a166f
examples/foc: terminate the control thread if no work to do
2022-08-27 23:50:58 +08:00
raiden00pl
b30f3329f6
foc/examples: initial logic to support torque, velocity and position controller modes
2021-11-04 13:50:57 -05:00
raiden00pl
b0eeefd0a5
examples/foc: add logic for controller state machine
2021-11-04 13:50:57 -05:00
raiden00pl
f9cec1c770
examples/foc: move the motor controller code to separate files
2021-10-31 12:13:45 -05:00
raiden00pl
22ed7da99c
examples/foc: move the common FOC dev logic from threads to one place
2021-10-31 12:13:45 -05:00
raiden00pl
e0ef3cecb9
examples/foc: move FOC device data to foc_device_s
2021-10-31 12:13:45 -05:00
raiden00pl
33b34f8852
examples/foc: open FOC device in FOC threads
2021-10-31 12:13:45 -05:00
raiden00pl
2d034ed09a
examples/foc: separate motor control logic from motor state logic
2021-10-31 12:13:45 -05:00
raiden00pl
2fb79db8b4
examples/foc: replace the requested velocity input with a more general setpoint input.
...
This is the inital step to support torque/velocity/position control
2021-10-30 13:50:56 -05:00
raiden00pl
9c8e3cc46a
examples/foc: add option to disable open-loop operations
...
Initial step towards sensored control
2021-10-30 10:00:38 -05:00
raiden00pl
10ab78b028
examples/foc/foc_float_thr.c: fix incorect variable type
2021-05-31 08:31:45 -05:00
Xiang Xiao
213e60232f
Include assert.h in necessary place
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-05-31 08:51:22 +02:00
raiden00pl
864a61a431
Add FOC motor controller example
...
For now, only open-loop velocity control is supported.
2021-04-10 00:40:43 -05:00