From bbc2766c2ff5a9c2d474ff1b16f8866344bd6862 Mon Sep 17 00:00:00 2001 From: Richard Unger Date: Wed, 20 Apr 2022 23:02:21 +0200 Subject: [PATCH 01/12] added a reference section to the docs --- .../reference/build_flags.md | 30 ++++++++ docs/simplefoc_library/reference/index.md | 23 ++++++ docs/simplefoc_library/reference/options.md | 75 +++++++++++++++++++ 3 files changed, 128 insertions(+) create mode 100644 docs/simplefoc_library/reference/build_flags.md create mode 100644 docs/simplefoc_library/reference/index.md create mode 100644 docs/simplefoc_library/reference/options.md diff --git a/docs/simplefoc_library/reference/build_flags.md b/docs/simplefoc_library/reference/build_flags.md new file mode 100644 index 0000000..50de55b --- /dev/null +++ b/docs/simplefoc_library/reference/build_flags.md @@ -0,0 +1,30 @@ +--- +layout: default +title: Build Flags +nav_order: 2 +permalink: /reference/build_flags +parent: Reference +grand_parent: Arduino SimpleFOClibrary +has_children: False +has_toc: False +--- + + +# Build flags + +SimpleFOClibrary supports a few compiler options which might be interesting to advanced users. They are described below. + +## Available build flags + +Build flags control the way the compiler generates the code for SimpleFOClibrary. Some are supported on all architectures, while some are MCU-architecture dependent. + +Flag | Architecture | Description +--- | --- | --- +`SIMPLEFOC_DISABLE_DEBUG` | All | set this to disable the entire debugging code +`SIMPLEFOC_STM32_DEBUG` | STM32 | set to enable extra debug output for STM32 MCUs. +`SIMPLEFOC_STM32_MAX_PINTIMERSUSED` | STM32 | maximum number of PWM pins configurable, default is 12 (up to 2x 6PWM, normally that's plenty) +`SIMPLEFOC_SAMD_DEBUG` | SAMD21 / SAMD51 | set to enable extra debug output for SAMD MCUs. +`SIMPLEFOC_SAMD_MAX_TCC_PINCONFIGURATIONS` | SAMD21 / SAMD51 | maximum number of PWM pins configurable, default is 24 (for up to 4x6PWM, that should be enough ;-) ) +`SIMPLEFOC_SAMD51_DPLL_FREQ` | SAMD21 / SAMD51 | expected frequency on DPLL, since we don't configure it ourselves. Typically this is the CPU frequency. For custom boards or overclockers you can override it using this define. Default is 120000000 +`SIMPLEFOC_DEBUG_RP2040` | RP2040 | set to enable extra debug output on Raspberry Pico. +`SIMPLEFOC_ESP32_USELEDC` | ESP32 | force use of the LEDC PWM driver even on ESP32s that support MCPWM. Mainly useful for testing purposes, normally you would prefer MCPWM if it is available. diff --git a/docs/simplefoc_library/reference/index.md b/docs/simplefoc_library/reference/index.md new file mode 100644 index 0000000..8fbebb0 --- /dev/null +++ b/docs/simplefoc_library/reference/index.md @@ -0,0 +1,23 @@ +--- +layout: default +title: Reference +nav_order: 9 +permalink: /reference +parent: Arduino SimpleFOClibrary +has_children: True +has_toc: True +--- + + +# Reference + +Find in these pages a summary of library options and build flags for your reference. + +## Options + +[Commonly used options](options_reference) of SimpleFOClibrary objects. + +## Build flags + +[Build flags](build_flags) control the way the compiler generates the code for SimpleFOClibrary. + diff --git a/docs/simplefoc_library/reference/options.md b/docs/simplefoc_library/reference/options.md new file mode 100644 index 0000000..83edeea --- /dev/null +++ b/docs/simplefoc_library/reference/options.md @@ -0,0 +1,75 @@ +--- +layout: default +title: Options Reference +nav_order: 1 +permalink: /reference/options_reference +parent: Reference +grand_parent: Arduino SimpleFOClibrary +has_children: False +has_toc: False +--- + + +# Options + +SimpleFOClibrary has many options, and the following tables summarize the important ones, collected in one convenient place for your immediate reference. + +## Driver Options + +Driver options are set before calling `driver.init()`, and normally never changed after intialization. + +Option | Default value | Supported on | Description +--- | --- | --- | --- +driver.pwm_frequency | depends on MCU | BLDC, Stepper | PWM frequency, in Hz +driver.voltage_power_supply | 12V | BLDC, Stepper | Power supply voltage in volts +driver.voltage_limit | NOT SET | BLDC, Stepper | Hard limit on output voltage, in volts. Effectively limits PWM duty cycle proportionally to power supply voltage. +driver.intialized | | BLDC, Stepper | Read-only. true if initialized successfully, false otherwise +driver.enable_active_high | true | BLDC | If true, driver is enabled by writing '1' to enable pin. If false, driver is enabled by writing '0' to enable pin. +driver.dead_zone | 0.02 | BLDCDriver6PWM | Amount of dead-time for each pwm cycle, as a proportion of 100% duty cycle. A float in the range [0,1]. Values under 10% make sense. + +## Motor Options + +Option | Default value | Description +--- | --- | --- +motor.controller | MotionControlType::torque | Motion control mode +motor.torque_controller | TorqueControlType::voltage | Torque control mode +motor.motion_downsample | 0 | Set to values > 1 to reduce how often move() is executed compared to loopFOC(). On fast MCUs it makes sense to reduce how often move() gets called. +motor.phase_resistance | NOT SET | Motor phase resistance. If set, used to calculate current limits based on voltage limits. Value in Ohms. +motor.K_bemf | NOT SET | motor back emf constant, as 1/KV. Units 1/rad/s/V. Set via motor constructor, where you can specify KV in RPM/V. +motor.voltage_limit | 12V | Global voltage limit. Limits Q-axis voltage. +motor.current_limit | 2A | Global current limit. Limits Q-axis current. +motor.velocity_limit | 20rad/s | Global velocity limit. Value in rad/s. +motor.foc_modulation | FOCModulationType::SinePWM | FOC modulation mode. +motor.modulation_centered | 1 (true) | 1/True: centered modulation around driver.voltage_limit÷2 or 0/False: pulled to 0 +motor.sensor_offset | 0 | Offset of motor zero to sensor zero. Can be used to make position 0 take on a specific motor orientation. For user convenience. Value in rad. +motor.voltage_sensor_align | motor.voltage_limit | Limits voltage (and therefore current) during motor alignment. Value in Volts. +motor.velocity_index_search | NOT SET | Limits motor velocity during motor initialization. Give value in rad/s. +motor.zero_electric_angle | NOT SET | Needed for FOC control. Normally set during motor FOC initialization. Can be stored and supplied as a parameter to motor.initFOC(). +motor.sensor_direction | NOT SET | Normally set during motor FOC initialization. Determines sensor direction vs positive motor direction (can be opposite, depending how you connect your motor cables). Can be stored and supplied as a parameter to motor.initFOC(). +motor.motor_status | FOCMotorStatus::motor_uninitialized | Read-only. Tracks the motor initialization status. You can check it to see if initialization succeeded, calibration is complete, etc. + +## PID Tuning Options + +Option | Modes used | Description +--- | --- | --- +motor.PID_velocity.P | All closed loop modes | Velocity PID controller P value. Varies by situation. Typical values are 0.2 to 0.6, but could be quite different. +motor.PID_velocity.I | All closed loop modes | Velocity PID controller I value. Varies by situation. Typical values are 2.0 to 20.0, but could be quite different. +motor.PID_velocity.D | All closed loop modes | Velocity PID controller D value. Normally set to 0. Typical values are 0, or a very low value like 0.001. +motor.PID_velocity.ramp | All closed loop modes | Velocity PID controller maximum change. Typical value 1000.0, set lower to limit accelleration. +motor.PID_velocity.limit | All closed loop modes | Velocity PID controller output limit. Set to limit velocity to this maximum. +motor.P_angle.P | Closed loop position control | Angle P controller P value. Varies by situation. Typical values are 10.0 to 20.0, but could be quite different. +motor.LPF_velocity.Tf | All closed loop modes | Velocity low pass filter time constant. Values larger than 0, max 1.0. The lower the value, the slower the effect of velocity changes from the sensor. +motor.LPF_angle.Tf | All closed loop modes | Angle low pass filter time constant. Values larger than 0, max 1.0. The lower the value, the slower the effect of angle changes from the sensor. +motor.PID_current_q.P | Torque current control | Q-Axis current controller P value. +motor.PID_current_q.I | Torque current control | Q-Axis current controller I value. +motor.PID_current_q.D | Torque current control | Q-Axis current controller D value. +motor.PID_current_q.ramp | Torque current control | Q-Axis current controller maximum change. +motor.PID_current_q.limit | Torque current control | Q-Axis current controller output limit. +motor.PID_current_d.P | Torque current control | D-Axis current controller P value. +motor.PID_current_d.I | Torque current control | D-Axis current controller I value. +motor.PID_current_d.D | Torque current control | D-Axis current controller D value. +motor.PID_current_d.ramp | Torque current control | D-Axis current controller maximum change. +motor.PID_current_d.limit | Torque current control | D-Axis current controller output limit. +motor.LPF_current_q.Tf | Torque current control | Q-Axis current low pass filter time constant. +motor.LPF_current_d.Tf | Torque current control | D-Axis current low pass filter time constant. + From e0295c7cc52d0e465d2fc7d4f2021b59fd747dd7 Mon Sep 17 00:00:00 2001 From: Richard Unger Date: Sat, 23 Apr 2022 23:22:23 +0200 Subject: [PATCH 02/12] added docs for the new debugging --- docs/simplefoc_library/code/debug.md | 145 ++++++++++++++++++ .../simplefoc_library/code/drivers_library.md | 2 +- docs/simplefoc_library/code/monitoring.md | 63 +++----- ...simplefocstudio..md => simplefocstudio.md} | 0 4 files changed, 166 insertions(+), 44 deletions(-) create mode 100644 docs/simplefoc_library/code/debug.md rename docs/simplefoc_library/{simplefocstudio..md => simplefocstudio.md} (100%) diff --git a/docs/simplefoc_library/code/debug.md b/docs/simplefoc_library/code/debug.md new file mode 100644 index 0000000..165db6c --- /dev/null +++ b/docs/simplefoc_library/code/debug.md @@ -0,0 +1,145 @@ +--- +layout: default +title: Debugging +nav_order: 9 +permalink: /debugging +parent: Writing the Code +grand_parent: Arduino SimpleFOClibrary +--- + +# Debugging SimpleFOClibrary sketches + +So you hooked everything up, downloaded your sketch, applied power, and... nothing. Or another common scenario: motor jerks around and makes terrible sounds. + +Don't worry! Trust us, we've been there. *Everyone* has this experience, *nobody* has a working setup on the first try. BLDC motor control isn't always easy, and there are lots of mistakes to be made. + +There are different techniques to help you find problems on the software side, but one extremely useful one is to produce some debug output, and having a way to see debug output in a `Serial` terminal will be invaluable when hunting for problems. + +## Debug functionality + +SimpleFOClibrary provides debug output using the `Serial` port which is enabled by adding the following line to your `setup` function. + +Place this function call early in the `setup` function to see the debug output of the motor intialization, which can be important to help you find problems with your setup. + + +```cpp +SimpleFOCDebug::enable(); +``` + +or specify the `Serial` port instance to use: +```cpp +SimpleFOCDebug::enable(&Serial); +``` + +
+Note: you can also use other serial ports, e.g. Serial1, Serial2, as supported by your MCU. +
+ +### Debugging the motor init + +The `motor` will produce debug output about its status during the initialization `motor.init()` and the alignment procedure `motor.initFOC()`. Enabling this functionality will not directly influence the real-time performance because there is no debug output in real time-loop in the functions `motor.loopFOC()` and `motor.move()`. + +This is an example of the `motor` initialization monitoring output gone well: +```sh +MOT: Monitor enabled! +MOT: Init +MOT: Enable driver. +MOT: Align sensor. +MOT: sensor direction==CW +MOT: PP check: OK! +MOT: Zero elec. angle: 4.28 +MOT: Align current sense. +MOT: Success: 2 +MOT: Ready. +``` + +Failed motor initialization due to the position sensor: +```sh +MOT: Monitor enabled! +MOT: Init +MOT: Enable driver. +MOT: Align sensor. +MOT: Failed to notice movement +MOT: Init FOC failed. +``` + +And failed motor initialization due to the current sense: +```sh +MOT: Monitor enabled! +MOT: Init +MOT: Enable driver. +MOT: Align sensor. +MOT: sensor direction==CW +MOT: PP check: OK! +MOT: Zero elec. angle: 4.28 +MOT: Align current sense. +MOT: Fail! +MOT: Init FOC failed. +``` + +### Writing your own debug statements + +You can use the SimpleFOClibrary easily for your own purposes: + +```cpp +SimpleFOCDebug::println("Hello world!"); +SimpleFOCDebug::println("Float value: ", fval); +SimpleFOCDebug::println("Int value: ", ival); +``` + +See the [SimpleFOCDebug class header](https://github.com/simplefoc/Arduino-FOC/blob/master/src/communication/SimpleFOCDebug.h) for all available methods. + +### FlashStringHelper + +SimpleFOCDebug automatically uses FlashStringHelper, and you should not use the F() macro on strings supplied to `SimpleFOCDebug::println` functions. + +### Debug - global disable + +Using the build flag `SIMPLEFOC_DISABLE_DEBUG` you can globally disable all debug output, potentially also saving a few bytes of program space if you are short on memory. + +### Rationale + +Why have our own `SimpleFOCDebug::println`? Wny not just use `Serial.println`? + +When supporting many hardware platforms (as SimpleFOClibrary does), we can't make assumptions about the availability of the `Serial` object. While it is a pretty standard feature of Arduino framework, a given board may not support it, or may for whatever reasons have a different name for it. We also can't make assumptions about *which* `Serial` object you would want to use. Some MCUs support 6 or more Serial ports. + +We also like the abstraction it provides, making it easier to port SimpleFOClibrary to other platforms/frameworks. In future we may abstract the debug output functionality one level further, allowing debug output via SPI, MQTT or other protocols. For this reason it is also good to have a seperation between debug and `Serial`. + +## Other debugging methods + +### Plain old Serial.println + +*Can I just use `Serial` output as per normal in my SimpleFOClibrary sketch?* + +Yes and no... There is no problem with calling Serial.println() in your sketches, you are not forced to use our debug facility as described above. + +*But* you have to care not to use too much time for `Serial` output. The `move` and `loopFOC` functions need to called very often in your main `loop` and you can't output to the `Serial` port all time. You will have to write the code in such a way to minimize the bytes you output, and include some timing code to make sure you only output once or twice a second. + +### Spare pins + +A great way to debug simple things is to use `digitalWrite` and an usused pin: +```cpp +digitalWrite(5, HIGH); // 5 is an unused pin + +// ... + +digitalWrite(5, LOW); +``` + +Using this technique will not impact the execution time, and using your oscilloscope or logic analyser you can check the output pin and see things like how long calls are taking to execute, whether the code is taking certain branches, etc... + +### IDE Debugger + +Using a real debugger with SimpleFOClibrary can be a challenge. The code is very real-time dependent, and can't easily be paused or run more slowly. In the author's experience using the debugger slows execution to the point that BLDC motor control is quite impossible. + +But it would depend on the problem you're trying to catch, the MCU and debugging hardware used and other factors, so keeping the real-time considerations in mind, give it a shot in the debugging tool of your choice and see how it goes. + +### Crowdsource it! + +We can't stress enough how much help the SimpleFOClibrary communities can be if you're having problems! + +We have a [Discourse Forum](https://community.simplefoc.com/) and a [Discord Server](https://discord.com/invite/JbH772tfnB) you can join any time and ask questions. Our members are both knowledgable and helpful, so rather than sweat it out by yourself, drop by and ask some like-minded souls for advice. + +### Report it! + +If you isolate your problem, and find it to be *our* problem, please don't hesitate to [file a bug report on GitHub](https://github.com/simplefoc/Arduino-FOC/issues/new)! diff --git a/docs/simplefoc_library/code/drivers_library.md b/docs/simplefoc_library/code/drivers_library.md index cbeda54..e09ed25 100644 --- a/docs/simplefoc_library/code/drivers_library.md +++ b/docs/simplefoc_library/code/drivers_library.md @@ -1,7 +1,7 @@ --- layout: default title: SimpleFOC Drivers Library -nav_order: 9 +nav_order: 10 permalink: /drivers_library parent: Writing the Code grand_parent: Arduino SimpleFOClibrary diff --git a/docs/simplefoc_library/code/monitoring.md b/docs/simplefoc_library/code/monitoring.md index f85c303..b5b8f76 100644 --- a/docs/simplefoc_library/code/monitoring.md +++ b/docs/simplefoc_library/code/monitoring.md @@ -8,66 +8,43 @@ grand_parent: Arduino SimpleFOClib --- -# Monitoring functionality +# Monitoring (telemetry) functionality + +Both `BLDCMotor` and `StepperMotor` classes support a basic telemetry function using the `Serial` port. + +This telemetry (also called *monitoring* in the following documentation), will allow you to visualize key parameters from the motor using tools like the Arduino IDE serial plotter, or our [SimpleFOCStudio tool](/studio). + +SimpleFOClibrary monitoring is the real-time tab separated output of the motor variables to the serial terminal. And it is enabled by including this line in your `setup` function: -Both `BLDCMotor` and `StepperMotor` classes support monitoring using `Serial` port which is enabled by: ```cpp motor.useMonitoring(Serial); ``` -Monitoring has two main goals: -- [Display motor status during the init and alignment procedure](#monitoring-the-motor-init) -- [Real-time monitoring of motor variables](#real-time-motor-variables-monitoring) +
+Note: you can also use other serial ports, e.g. Serial1, Serial2, as supported by your MCU. +
-## Monitoring the motor init -The `motor` will output to the serial port its status during the initialization `motor.init()` and the alignment procedure `motor.initFOC()`. Enabling this functionality will not directly influence the real-time performance because there is no predefined monitoring in real time-loop in the functions `motor.loopFOC()` and `motor.move()`. +
+At the moment, enabling monitoring using motor.useMonitoring will also enable debug output - see [debugging] for details. -This is an example of the `motor` initialization monitoring output gone well: -```sh -MOT: Monitor enabled! -MOT: Init -MOT: Enable driver. -MOT: Align sensor. -MOT: sensor direction==CW -MOT: PP check: OK! -MOT: Zero elec. angle: 4.28 -MOT: Align current sense. -MOT: Success: 2 -MOT: Ready. -``` +In a future release, debug output and telemetry output will be seperated and the motor.useMonitoring function will likely be deprecated. -Failed motor initialization due to the position sensor: -```sh -MOT: Monitor enabled! -MOT: Init -MOT: Enable driver. -MOT: Align sensor. -MOT: Failed to notice movement -MOT: Init FOC failed. -``` +If the debug output is undesired or causing you problems, you can disable debug output (but keep monitoring) like this: +
-And failed motor initialization due to the current sense: -```sh -MOT: Monitor enabled! -MOT: Init -MOT: Enable driver. -MOT: Align sensor. -MOT: sensor direction==CW -MOT: PP check: OK! -MOT: Zero elec. angle: 4.28 -MOT: Align current sense. -MOT: Fail! -MOT: Init FOC failed. +```cpp +motor.useMonitoring(Serial); +SimpleFOCDebug::enable(NULL); ``` ## Real-time motor variables monitoring -Second role of the monitoring is the real-time tab separated output of the motor variables to the serial terminal. And it is enabled including this line in to `loop` function: +To actually produce any output you also have to add this line in to `loop` function: ```cpp motor.monitor() ``` -Monitoring function can output 7 different motor specific variables: +The monitoring function can output 7 different motor specific variables: - `target` - current target value, specific to the motion control used (either current [A], voltage [V], velocity [rad/s], or position [rad]) - `voltage.q` - [V] - set voltage in q direction - `voltage.d` - [V] - set voltage in d direction diff --git a/docs/simplefoc_library/simplefocstudio..md b/docs/simplefoc_library/simplefocstudio.md similarity index 100% rename from docs/simplefoc_library/simplefocstudio..md rename to docs/simplefoc_library/simplefocstudio.md From f5533605739d3df12087fbe98f7d2170bfd5e1d0 Mon Sep 17 00:00:00 2001 From: Richard Unger Date: Sun, 24 Apr 2022 09:55:08 +0200 Subject: [PATCH 03/12] fixed docs to use macro rather than debug object --- docs/simplefoc_library/code/debug.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/simplefoc_library/code/debug.md b/docs/simplefoc_library/code/debug.md index 165db6c..f02a785 100644 --- a/docs/simplefoc_library/code/debug.md +++ b/docs/simplefoc_library/code/debug.md @@ -82,16 +82,18 @@ MOT: Init FOC failed. You can use the SimpleFOClibrary easily for your own purposes: ```cpp -SimpleFOCDebug::println("Hello world!"); -SimpleFOCDebug::println("Float value: ", fval); -SimpleFOCDebug::println("Int value: ", ival); +SIMPLEFOC_DEBUG("Hello world!"); +SIMPLEFOC_DEBUG("Float value: ", fval); +SIMPLEFOC_DEBUG("Int value: ", ival); ``` +Using this macro has several advantages, see FlashStringHelper, global disable and rationale, below. + See the [SimpleFOCDebug class header](https://github.com/simplefoc/Arduino-FOC/blob/master/src/communication/SimpleFOCDebug.h) for all available methods. ### FlashStringHelper -SimpleFOCDebug automatically uses FlashStringHelper, and you should not use the F() macro on strings supplied to `SimpleFOCDebug::println` functions. +The SimpleFOCDebug macro automatically uses FlashStringHelper, and you should not use the F() macro on strings supplied to the `SIMPLEFOC_DEBUG` macro. ### Debug - global disable @@ -99,7 +101,7 @@ Using the build flag `SIMPLEFOC_DISABLE_DEBUG` you can globally disable all debu ### Rationale -Why have our own `SimpleFOCDebug::println`? Wny not just use `Serial.println`? +Why have our own `SimpleFOCDebug`? Wny not just use `Serial.println`? When supporting many hardware platforms (as SimpleFOClibrary does), we can't make assumptions about the availability of the `Serial` object. While it is a pretty standard feature of Arduino framework, a given board may not support it, or may for whatever reasons have a different name for it. We also can't make assumptions about *which* `Serial` object you would want to use. Some MCUs support 6 or more Serial ports. From e7b528559fd69ff3590bf3296f17c03c5dc7e345 Mon Sep 17 00:00:00 2001 From: askuric Date: Sun, 24 Apr 2022 19:20:04 +0200 Subject: [PATCH 04/12] preparations for v2.2.2 - KV rating added, low-side sensing, discord button, mathjax added,removed gifs and added galleries, new esplanation of the voltage torque control --- _includes/head_custom.html | 4 +- _includes/js/custom.js | 4 +- _includes/nav.html | 31 ++- _layouts/default.html | 35 ++- _sass/navigation.scss | 11 + _sass/overrides.scss | 16 +- .../code/communication/commander/motion.md | 2 +- .../code/current_sense/index.md | 15 +- .../code/current_sense/inline.md | 171 +++++++++--- .../code/current_sense/low_side.md | 184 ++++++++++--- docs/simplefoc_library/code/from_scratch.md | 6 +- .../closed_loop_control/angle.md | 2 +- .../closed_loop_control/index.md | 26 +- .../closed_loop_control/torque.md | 177 ------------- .../torque_control/dc_current.md | 9 +- .../torque_control/foc_current.md | 9 +- .../torque_control/index.md | 98 +++++++ .../torque_control/voltage.md | 243 ++++++++++++++++++ .../closed_loop_control/velocity.md | 4 +- .../code/motion_control/index.md | 27 +- .../open_loop/angle_openloop.md | 23 +- .../code/motion_control/open_loop/index.md | 23 +- .../motion_control/open_loop/index_search.md | 2 +- .../open_loop/velocity_openloop.md | 21 +- .../motion_control/torque_control/index.md | 40 --- .../motion_control/torque_control/voltage.md | 117 --------- .../code/motors/bldc_motors.md | 6 +- .../code/motors/stepper_motors.md | 4 +- docs/simplefoc_library/hardware/mcus/index.md | 15 +- .../hardware/motors/index.md | 2 +- docs/simplefoc_library/index.md | 39 +-- extras/Images/closedloop_0000_Layer 3.jpg | Bin 0 -> 49132 bytes extras/Images/closedloop_0001_Layer 2.jpg | Bin 0 -> 39438 bytes extras/Images/closedloop_0002_Layer 1.jpg | Bin 0 -> 28710 bytes extras/Images/discord.png | Bin 0 -> 10168 bytes extras/Images/open_loop_angle (1).png | Bin 0 -> 32330 bytes extras/Images/open_loop_angle (2).png | Bin 0 -> 35764 bytes extras/Images/open_loop_angle (3).png | Bin 0 -> 30674 bytes extras/Images/open_loop_velocity (1).png | Bin 0 -> 26872 bytes extras/Images/open_loop_velocity (2).png | Bin 0 -> 23035 bytes extras/Images/open_loop_velocity (3).png | Bin 0 -> 21414 bytes extras/Images/opneloop_0000_Layer 2.jpg | Bin 0 -> 66584 bytes extras/Images/opneloop_0001_Layer 0.jpg | Bin 0 -> 79145 bytes extras/Images/torque_modes_0000.jpg | Bin 0 -> 54541 bytes extras/Images/torque_modes_0000_Layer 3.jpg | Bin 0 -> 37975 bytes extras/Images/torque_modes_0001.jpg | Bin 0 -> 52088 bytes extras/Images/torque_modes_0001_Layer 2.jpg | Bin 0 -> 32598 bytes extras/Images/torque_modes_0002.jpg | Bin 0 -> 34257 bytes extras/Images/torque_modes_0002_Layer 1.jpg | Bin 0 -> 33407 bytes extras/Images/torque_modes_0003.jpg | Bin 0 -> 31438 bytes extras/Images/voltage_loop_0000.jpg | Bin 0 -> 36538 bytes extras/Images/voltage_loop_0001.jpg | Bin 0 -> 34864 bytes extras/Images/voltage_loop_0002.jpg | Bin 0 -> 42192 bytes extras/Images/voltage_loop_0003_Layer 0.jpg | Bin 0 -> 110875 bytes extras/Images/voltage_loop_0004_Layer 2.jpg | Bin 0 -> 90707 bytes index.md | 85 +++--- 56 files changed, 924 insertions(+), 527 deletions(-) delete mode 100644 docs/simplefoc_library/code/motion_control/closed_loop_control/torque.md rename docs/simplefoc_library/code/motion_control/{ => closed_loop_control}/torque_control/dc_current.md (95%) rename docs/simplefoc_library/code/motion_control/{ => closed_loop_control}/torque_control/foc_current.md (95%) create mode 100644 docs/simplefoc_library/code/motion_control/closed_loop_control/torque_control/index.md create mode 100644 docs/simplefoc_library/code/motion_control/closed_loop_control/torque_control/voltage.md delete mode 100644 docs/simplefoc_library/code/motion_control/torque_control/index.md delete mode 100644 docs/simplefoc_library/code/motion_control/torque_control/voltage.md create mode 100644 extras/Images/closedloop_0000_Layer 3.jpg create mode 100644 extras/Images/closedloop_0001_Layer 2.jpg create mode 100644 extras/Images/closedloop_0002_Layer 1.jpg create mode 100644 extras/Images/discord.png create mode 100644 extras/Images/open_loop_angle (1).png create mode 100644 extras/Images/open_loop_angle (2).png create mode 100644 extras/Images/open_loop_angle (3).png create mode 100644 extras/Images/open_loop_velocity (1).png create mode 100644 extras/Images/open_loop_velocity (2).png create mode 100644 extras/Images/open_loop_velocity (3).png create mode 100644 extras/Images/opneloop_0000_Layer 2.jpg create mode 100644 extras/Images/opneloop_0001_Layer 0.jpg create mode 100644 extras/Images/torque_modes_0000.jpg create mode 100644 extras/Images/torque_modes_0000_Layer 3.jpg create mode 100644 extras/Images/torque_modes_0001.jpg create mode 100644 extras/Images/torque_modes_0001_Layer 2.jpg create mode 100644 extras/Images/torque_modes_0002.jpg create mode 100644 extras/Images/torque_modes_0002_Layer 1.jpg create mode 100644 extras/Images/torque_modes_0003.jpg create mode 100644 extras/Images/voltage_loop_0000.jpg create mode 100644 extras/Images/voltage_loop_0001.jpg create mode 100644 extras/Images/voltage_loop_0002.jpg create mode 100644 extras/Images/voltage_loop_0003_Layer 0.jpg create mode 100644 extras/Images/voltage_loop_0004_Layer 2.jpg diff --git a/_includes/head_custom.html b/_includes/head_custom.html index adbe4d7..5e1bd17 100644 --- a/_includes/head_custom.html +++ b/_includes/head_custom.html @@ -1,4 +1,6 @@ - \ No newline at end of file + + + \ No newline at end of file diff --git a/_includes/js/custom.js b/_includes/js/custom.js index 6a7c882..6f89dd9 100644 --- a/_includes/js/custom.js +++ b/_includes/js/custom.js @@ -53,7 +53,8 @@ var defines =[ "_2PI", "HIGH", "LOW", - "DEF_VEL_LIM" + "DEF_VEL_LIM", + "_NC" ] var classNames = [ @@ -154,6 +155,7 @@ var funcNames = [ "getCurrent", "getPhaseCurrents", "getFOCCurrents", + "getDCCurrent", "driverAlign", "setPhaseState", "handle", diff --git a/_includes/nav.html b/_includes/nav.html index 3201d76..02844ea 100644 --- a/_includes/nav.html +++ b/_includes/nav.html @@ -4,8 +4,8 @@ {%- for node in pages_list -%} {%- unless node.nav_exclude -%} {%- if node.parent == nil -%} -